:root {
  --brand: #c62828;
  --brand-dark: #8e0000;
  --brand-darker: #5c0000;
  --brand-light: #ef9a9a;
  --brand-lighter: #ffcdd2;
  --brand-glow: rgba(198, 40, 40, 0.35);
  --accent: #ff7043;
  --accent-2: #ffb74d;
  --bg: #fdf7f6;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.55);
  --text: #2a1a1a;
  --text-soft: #6b5252;
  --text-muted: #9a8585;
  --border: rgba(198, 40, 40, 0.14);
  --border-strong: rgba(198, 40, 40, 0.28);
  --shadow-sm: 0 2px 8px rgba(92, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(92, 0, 0, 0.1);
  --shadow-lg: 0 18px 48px rgba(92, 0, 0, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --blur: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 120px;
  --grad-hero: linear-gradient(135deg, #c62828 0%, #8e0000 45%, #5c0000 100%);
  --grad-brand: linear-gradient(135deg, #ff7043 0%, #c62828 60%, #8e0000 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 205, 210, 0.6) 0%, rgba(255, 255, 255, 0.9) 100%);
  --grad-line: linear-gradient(90deg, #ff7043, #c62828, #8e0000);
}

html[data-theme="dark"] {
  --bg: #140a0a;
  --bg-alt: #1c0f0f;
  --surface: rgba(38, 20, 20, 0.68);
  --surface-solid: #221313;
  --surface-2: rgba(54, 28, 28, 0.5);
  --text: #f7eaea;
  --text-soft: #d3b8b8;
  --text-muted: #a98f8f;
  --border: rgba(255, 138, 128, 0.18);
  --border-strong: rgba(255, 138, 128, 0.34);
  --brand-light: #ff8a80;
  --brand-lighter: #ffb4ab;
  --brand-glow: rgba(255, 112, 67, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #4a0d0d 0%, #2b0808 50%, #1a0505 100%);
  --grad-soft: linear-gradient(135deg, rgba(74, 13, 13, 0.7) 0%, rgba(28, 15, 15, 0.9) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, var(--brand-glow) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 183, 77, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(198, 40, 40, 0.08) 0%, transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.4rem); }
h4 { font-size: clamp(1rem, 1.5vw, 1.15rem); }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--brand);
}

strong {
  color: var(--text);
  font-weight: 700;
}

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============ HEADER ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  padding: 0.45rem 1.2rem;
  font-size: 0.78rem;
  color: #ffe6e6;
  background: var(--grad-brand);
  letter-spacing: 0.02em;
}

.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.95;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.2rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand-logo svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--brand-glow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand-logo:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 26px var(--brand-glow);
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

.site-search {
  display: flex;
  flex: 1 1 260px;
  max-width: 460px;
  min-width: 180px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.site-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.62rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
}

.site-search input::placeholder {
  color: var(--text-muted);
}

.site-search input:focus {
  outline: none;
}

.site-search button {
  border: 0;
  padding: 0 1.3rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.25s var(--ease), letter-spacing 0.25s var(--ease);
}

.site-search button:hover {
  filter: brightness(1.12);
  letter-spacing: 0.06em;
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px);
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
}

#menu-toggle {
  display: none;
}

/* ============ NAV ============ */
#main-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.2rem 0.6rem;
}

#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-line);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover {
  color: var(--brand);
  background: var(--surface-2);
  transform: translateY(-1px);
}

#main-nav a:hover::after {
  width: 60%;
}

/* ============ MAIN LAYOUT ============ */
#main-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem;
}

#main-content > section {
  margin-bottom: 2.4rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

#main-content > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-line);
  opacity: 0.75;
}

#main-content > section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

#main-content > section > h2 {
  position: relative;
  padding-left: 1rem;
}

#main-content > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--grad-line);
}

#main-content h3 {
  margin-top: 1.4em;
  color: var(--text);
}

#main-content h3:first-of-type {
  margin-top: 0.4em;
}

/* ============ HERO ============ */
.hero {
  background: var(--grad-hero) !important;
  color: #fff;
  border: 0 !important;
  box-shadow: var(--shadow-lg) !important;
}

.hero::before {
  display: none;
}

.hero h1,
.hero h2,
.hero h3 {
  color: #fff;
}

.hero-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.hero-carousel .slide {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.9);
}

.hero-carousel .slide svg {
  width: 100%;
  height: auto;
}

.hero-carousel .slide:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  filter: saturate(1.15);
}

.hero h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  margin-bottom: 0.7rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.hero-lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  max-width: 62ch;
  line-height: 1.85;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 1.4rem 0 0;
  padding: 1rem 1.3rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  margin-right: 0.15rem;
  text-shadow: 0 0 18px rgba(255, 183, 77, 0.5);
}

/* ============ BREADCRUMB ============ */
#breadcrumb {
  margin-bottom: 1.4rem;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  width: fit-content;
}

#breadcrumb li {
  margin: 0;
  color: var(--text-muted);
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-muted);
}

#breadcrumb a {
  font-weight: 600;
}

/* ============ CARDS: articles, news, faq, cases, reviews ============ */
#news article,
#articles article {
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-line);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#news article:hover::after,
#articles article:hover::after {
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#articles article a:hover {
  transform: translateX(4px);
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
}

/* ============ REVIEWS ============ */
#reviews blockquote {
  margin: 0 0 1rem;
  padding: 1.1rem 1.3rem 1.1rem 3rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#reviews blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.7rem;
  top: 0.1rem;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#reviews blockquote:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-md);
}

#reviews blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-soft);
}

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.8rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#faq summary {
  cursor: pointer;
  padding: 0.9rem 3rem 0.9rem 1.2rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  position: relative;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  font-size: 0.96rem;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
  transition: transform 0.35s var(--ease);
}

#faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

#faq summary:hover {
  background: var(--grad-soft);
  color: var(--brand);
}

#faq details p {
  padding: 0 1.2rem 1rem;
  margin: 0;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.7rem 1rem 0.7rem 3.2rem;
  margin-bottom: 0.6rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 3px 10px var(--brand-glow);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

#howto ul li {
  padding-left: 0.2rem;
}

/* ============ CONTACT ============ */
#contact address {
  font-style: normal;
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

#contact address p {
  margin: 0;
  padding: 0.6rem 1rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact address p:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
}

#contact address a {
  font-weight: 600;
  word-break: break-all;
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.42rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px var(--brand-glow);
}

/* ============ LEGAL ============ */
#legal h3 {
  margin-top: 1.3em;
}

#legal p {
  font-size: 0.92rem;
}

/* ============ FOOTER ============ */
#site-footer {
  background: var(--grad-hero);
  color: rgba(255, 255, 255, 0.82);
  padding: 2.2rem 1.2rem 2.6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-line);
}

#site-footer p {
  margin: 0.3rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

#site-footer a {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.5rem 1.4rem;
  font-weight: 700;
  font-size: 0.86rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#site-footer a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
  border-color: #fff;
  color: #fff;
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 120;
  border: 0;
  padding: 0.7rem 1.05rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 999px;
  box-shadow: 0 10px 26px var(--brand-glow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.92);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), filter 0.25s var(--ease);
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  filter: brightness(1.12);
  transform: translateY(-3px) scale(1.04);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero-carousel {
    grid-template-columns: 1fr;
  }

  .hero-carousel .slide:not(:first-child) {
    display: none;
  }

  .brand-row {
    gap: 0.7rem;
  }

  .site-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  :root {
    --radius-lg: 18px;
    --blur: 14px;
  }

  .top-bar {
    font-size: 0.72rem;
    gap: 0.2rem 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .brand-row {
    padding: 0.6rem 0.9rem;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  #menu-toggle {
    display: inline-block;
  }

  #main-nav {
    max-height: 0;
    overflow: hidden;
    padding: 0 0.9rem;
    transition: max-height 0.45s var(--ease), padding 0.45s var(--ease);
  }

  #main-nav.is-open {
    max-height: 640px;
    padding: 0 0.9rem 0.7rem;
    overflow-y: auto;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  #main-nav a {
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
  }

  #main-content {
    padding: 1.1rem 0.8rem 2.2rem;
  }

  #main-content > section {
    margin-bottom: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 0.35rem;
  }

  #news article,
  #articles article {
    padding: 1rem 1.05rem;
  }

  #reviews blockquote {
    padding: 1rem 1rem 1rem 2.6rem;
  }

  #howto ol li {
    padding: 0.65rem 0.85rem 0.65rem 2.9rem;
  }

  #back-to-top {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .brand-logo svg {
    width: 44px;
    height: 44px;
  }

  .top-bar span:nth-child(2) {
    display: none;
  }

  .site-search button {
    padding: 0 1rem;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ PRINT ============ */
@media print {
  #site-header,
  #back-to-top,
  #site-footer,
  .site-search,
  #theme-toggle,
  #menu-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  #main-content > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}