:root {
  --brand: #c2185b;
  --brand-dark: #880e4f;
  --brand-deep: #ad1457;
  --brand-light: #f06292;
  --brand-pale: #f8bbd0;
  --accent: #7c4dff;
  --accent-2: #00bcd4;
  --grad-brand: linear-gradient(135deg, #c2185b 0%, #7c4dff 100%);
  --grad-banner: linear-gradient(135deg, #c2185b 0%, #6a1b9a 55%, #283593 100%);
  --grad-soft: linear-gradient(135deg, rgba(194, 24, 91, 0.08), rgba(124, 77, 255, 0.08));
  --bg: #f7f4f8;
  --bg-soft: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --text: #231a26;
  --text-soft: #5c5262;
  --text-mute: #8a8090;
  --border: rgba(35, 26, 38, 0.1);
  --shadow-sm: 0 2px 8px rgba(35, 26, 38, 0.06);
  --shadow: 0 10px 30px rgba(35, 26, 38, 0.1);
  --shadow-lg: 0 22px 60px rgba(35, 26, 38, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 68px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.dark-mode {
  --bg: #100c14;
  --bg-soft: #1a1420;
  --bg-glass: rgba(26, 20, 32, 0.66);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #f2eaf4;
  --text-soft: #c3b8ca;
  --text-mute: #8f8497;
  --border: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.62);
  --grad-soft: linear-gradient(135deg, rgba(194, 24, 91, 0.18), rgba(124, 77, 255, 0.16));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 77, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(194, 24, 91, 0.12), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  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);
}

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

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
}

h2 {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-brand);
}

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  color: var(--brand-dark);
}

body.dark-mode h3 {
  color: var(--brand-light);
}

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

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

li {
  margin-bottom: 0.45em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.3em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--grad-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

blockquote p {
  margin: 0.35em 0;
  color: var(--text);
}

time {
  color: var(--text-mute);
  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;
}

.meta-line {
  font-size: 0.86rem;
  color: var(--text-mute);
  margin-bottom: 0.9em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(194, 24, 91, 0.24);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

#site-header.is-stuck {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(194, 24, 91, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.06);
}

.brand-name {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

#main-nav {
  margin-left: auto;
}

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  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-brand);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

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

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

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.14);
}

#search-input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  width: 150px;
  padding: 4px 0;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-mute);
}

#site-search button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-search button:hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

#breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px 0;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-mute);
}

#breadcrumb li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#breadcrumb li + li::before {
  content: "/";
  color: var(--text-mute);
  opacity: 0.6;
}

#breadcrumb a {
  color: var(--text-soft);
  font-weight: 600;
}

#breadcrumb a:hover {
  color: var(--brand);
}

#breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 700;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

main section {
  margin-top: 28px;
  padding: 34px clamp(18px, 3vw, 40px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main section:hover {
  box-shadow: var(--shadow);
  border-color: rgba(194, 24, 91, 0.22);
}

main section.reveal {
  opacity: 0;
  transform: translateY(28px);
}

main section.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.4s var(--ease);
}

#hero {
  margin-top: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

#hero:hover {
  box-shadow: none;
  border-color: transparent;
}

#hero-title {
  padding: 36px clamp(18px, 3vw, 44px) 8px;
  background: var(--grad-banner);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
}

.hero-lead {
  padding: 0 clamp(18px, 3vw, 44px);
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 900px;
}

#banner-carousel {
  position: relative;
  margin: 22px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--grad-banner);
}

.banner-slide {
  animation: fadeSlide 0.7s var(--ease);
}

.banner-slide svg {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.banner-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
}

.banner-controls button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.banner-controls button:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 12px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-mute);
  font-weight: 600;
}

#about ul,
#product ul {
  display: grid;
  gap: 8px;
}

#product h3 {
  padding-left: 14px;
  border-left: 4px solid var(--brand-light);
}

#scenes h3,
#solutions h3,
#cases h3 {
  margin-top: 1.4em;
}

#cases blockquote {
  display: grid;
  gap: 6px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateX(6px);
  border-color: rgba(194, 24, 91, 0.3);
  box-shadow: var(--shadow-sm);
}

.news-list time {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.86rem;
}

#articles article {
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(194, 24, 91, 0.24);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-bottom: 0.35em;
}

#articles article p:last-child {
  margin-bottom: 0;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

#articles article a:hover {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(194, 24, 91, 0.35);
}

#articles article a:hover::after {
  transform: translateX(4px);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 56px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(194, 24, 91, 0.32);
}

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

#faq details {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details[open] {
  border-color: rgba(194, 24, 91, 0.34);
  box-shadow: var(--shadow);
}

#faq summary {
  cursor: pointer;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
  border-radius: 50%;
  background: var(--grad-soft);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--grad-brand);
  color: #fff;
}

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

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  animation: fadeIn 0.4s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#knowledge h3 {
  margin-top: 1.3em;
}

#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

#contact ul li {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#sitemap ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

#sitemap li {
  margin: 0;
}

#sitemap a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: all 0.28s var(--ease);
}

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

#legal ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#legal ul li {
  margin: 0;
}

#legal ul a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.28s var(--ease);
}

#legal ul a:hover {
  border-style: solid;
  border-color: var(--brand);
  background: var(--grad-soft);
  transform: translateY(-2px);
}

#legal h3 {
  margin-top: 1.4em;
}

#site-footer {
  margin-top: 20px;
  background: linear-gradient(160deg, #1a0d1f 0%, #2a1235 55%, #1b1233 100%);
  color: #d9cfe0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 20px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-brand p {
  color: #c8bcd2;
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
}

#site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-end;
}

#site-footer nav li {
  margin: 0;
}

#site-footer nav a {
  color: #c8bcd2;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 2px;
}

#site-footer nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-light);
  transition: width 0.3s var(--ease);
}

#site-footer nav a:hover {
  color: #fff;
}

#site-footer nav a:hover::after {
  width: 100%;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #9a8fa6;
  text-align: center;
}

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 10px 26px rgba(194, 24, 91, 0.42);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.85);
  transition: all 0.35s var(--ease);
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 34px rgba(194, 24, 91, 0.55);
}

@media (max-width: 1024px) {
  #main-nav a {
    padding: 8px 9px;
    font-size: 0.86rem;
  }

  #search-input {
    width: 120px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 62px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

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

  #main-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), padding 0.35s var(--ease);
  }

  #main-nav.is-open {
    max-height: 520px;
    opacity: 1;
    padding: 8px 0 4px;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  #main-nav a {
    display: block;
    padding: 11px 16px;
    font-size: 0.94rem;
    border-radius: var(--radius-sm);
    background: var(--grad-soft);
  }

  #main-nav a::after {
    display: none;
  }

  .header-tools {
    margin-left: auto;
  }

  #site-search {
    display: none;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #site-footer nav ul {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  .header-inner {
    padding: 8px 14px;
  }

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

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  #theme-toggle,
  #menu-toggle {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  #breadcrumb {
    padding: 12px 14px 0;
  }

  main {
    padding: 0 14px 44px;
  }

  main section {
    margin-top: 20px;
    padding: 24px 18px;
    border-radius: var(--radius);
  }

  #hero {
    padding: 0;
  }

  #hero-title {
    padding: 26px 18px 6px;
  }

  .hero-lead {
    padding: 0 18px;
    font-size: 0.94rem;
  }

  #banner-carousel {
    border-radius: var(--radius);
  }

  .banner-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .banner-controls button {
    padding: 6px 11px;
    font-size: 0.72rem;
  }

  .hero-stats {
    gap: 10px;
    margin-top: 16px;
  }

  .stat {
    padding: 16px 8px;
  }

  .stat-label {
    font-size: 0.74rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #articles article {
    padding: 18px 16px;
  }

  #howto ol li {
    padding: 12px 14px 12px 50px;
  }

  #howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.92rem;
  }

  #sitemap ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #sitemap a {
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .footer-inner {
    padding: 32px 16px 24px;
  }

  #back-to-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  #sitemap ul {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@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;
  }

  main section.reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #site-header,
  #back-to-top,
  #breadcrumb,
  #site-footer,
  .banner-controls {
    display: none !important;
  }

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}