:root {
  --primary: #1a3a6b;
  --primary-light: #2e5aa8;
  --primary-dark: #102546;
  --accent: #4a7bc8;
  --accent-light: #9db8e0;
  --bg: #f4f7fc;
  --bg-alt: #eef3fb;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.55);
  --text: #1c2536;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #dbe4f0;
  --shadow-sm: 0 2px 8px rgba(26, 58, 107, 0.06);
  --shadow-md: 0 6px 24px rgba(26, 58, 107, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 58, 107, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --gradient-hero: linear-gradient(135deg, #1a3a6b 0%, #2e5aa8 45%, #4a7bc8 75%, #6f9be0 100%);
  --gradient-accent: linear-gradient(90deg, #2e5aa8, #4a7bc8);
  --transition: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6f9be0;
    --primary-light: #8fb3ea;
    --primary-dark: #0c1626;
    --accent: #7aa5e8;
    --accent-light: #2e5aa8;
    --bg: #0c1626;
    --bg-alt: #111f36;
    --surface: #16263f;
    --surface-glass: rgba(22, 38, 63, 0.72);
    --surface-glass-border: rgba(111, 155, 224, 0.18);
    --text: #e6edf7;
    --text-secondary: #b4c2d6;
    --text-muted: #8496b0;
    --border: #24395c;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --gradient-hero: linear-gradient(135deg, #0c1626 0%, #16263f 40%, #1f3a63 75%, #2e5aa8 100%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(74, 123, 200, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(157, 184, 224, 0.12) 0%, transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(46, 90, 168, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

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

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

h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.08rem; }

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

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

li {
  margin-bottom: 0.45em;
}

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

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  background: var(--surface-glass);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Header ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand a:hover {
  color: var(--primary-light);
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(26, 58, 107, 0.28);
  transition: transform var(--transition);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand-name {
  white-space: nowrap;
}

#site-header nav {
  flex: 1 1 auto;
}

#site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

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

#site-header nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  transition: color var(--transition), background var(--transition);
}

#site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  color: var(--primary-light);
  background: rgba(74, 123, 200, 0.08);
}

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

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

#site-header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#site-header input[type="search"] {
  width: 200px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--transition), box-shadow var(--transition), width var(--transition);
}

#site-header input[type="search"]::placeholder {
  color: var(--text-muted);
}

#site-header input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 123, 200, 0.18);
  width: 240px;
}

#site-header button[type="submit"] {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

#site-header button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(46, 90, 168, 0.35);
  filter: brightness(1.06);
}

#site-header button[type="submit"]:active {
  transform: translateY(0);
}

/* ===== Main layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

main > section {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeUp 0.7s ease both;
}

main > section:hover {
  box-shadow: var(--shadow-md);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  main > section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* ===== Hero ===== */
#hero {
  position: relative;
  margin-top: 2rem;
  padding: 3rem 2.5rem;
  background: var(--gradient-hero);
  border: none;
  border-radius: var(--radius-xl);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 45%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.08); }
}

#hero h1 {
  position: relative;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
  max-width: 900px;
}

#hero .hero-lead {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  max-width: 820px;
  line-height: 1.85;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0 2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.9rem;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn-primary {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  color: var(--primary-dark);
  background: #f0f5ff;
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

#hero figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform var(--transition);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.008);
}

#hero figure svg {
  width: 100%;
  display: block;
}

#hero figcaption {
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}

/* ===== Breadcrumb ===== */
main > nav[aria-label="面包屑导航"] {
  margin: 1.4rem 0 0;
  padding: 0.7rem 1.2rem;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border);
}

main > nav[aria-label="面包屑导航"] li[aria-current="page"] {
  color: var(--primary-light);
  font-weight: 600;
}

/* ===== Section headings accent ===== */
main > section > h2 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1.4rem;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-accent);
}

main > section h3 {
  margin-top: 1.6rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--accent);
  line-height: 1.4;
}

main > section h4 {
  margin-top: 1.2rem;
  color: var(--primary-light);
}

/* ===== Cards / lists inside sections ===== */
#products ul,
#howto ul,
#howto ol,
#sitemap ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
}

#products ul li,
#howto ul li,
#sitemap ul li {
  position: relative;
  margin: 0;
  padding: 1rem 1.2rem 1rem 2.6rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

#products ul li::before,
#howto ul li::before,
#sitemap ul li::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 3px rgba(74, 123, 200, 0.15);
}

#products ul li:hover,
#howto ul li:hover,
#sitemap ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
  background: var(--surface);
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1rem 1.2rem 1rem 3.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(46, 90, 168, 0.3);
}

#howto ol li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

/* ===== Articles & News ===== */
#articles article,
#news article {
  position: relative;
  margin: 0 0 1.2rem;
  padding: 1.5rem 1.6rem;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

#articles article::before,
#news article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

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

#articles article h3,
#news article h3 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
  font-size: 1.12rem;
}

#articles article > p:first-of-type,
#news article > p:first-of-type {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
  color: var(--primary-light);
  background: rgba(74, 123, 200, 0.1);
  border-radius: 999px;
}

#articles article a[href^="#article-"] {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-light);
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

#articles article a[href^="#article-"]:hover {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  transform: translateX(3px);
}

#articles article div[id^="article-"] {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

#articles article div[id^="article-"] p {
  font-size: 0.94rem;
  line-height: 1.85;
}

/* ===== FAQ ===== */
#faq details {
  margin-bottom: 0.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

#faq details[open] {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

#faq details:hover {
  border-color: var(--accent-light);
}

#faq summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.3rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition), background var(--transition);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

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

#faq summary:hover {
  color: var(--primary-light);
  background: rgba(74, 123, 200, 0.06);
}

#faq details p {
  margin: 0;
  padding: 0 1.3rem 1.2rem;
  font-size: 0.94rem;
  line-height: 1.85;
  color: var(--text-secondary);
  animation: fadeUp 0.35s ease both;
}

/* ===== Contact & Sitemap ===== */
#contact p,
#sitemap p {
  font-size: 0.96rem;
}

#sitemap h3 {
  margin-top: 1.8rem;
}

#sitemap ul:last-of-type {
  grid-template-columns: 1fr;
}

/* ===== Footer ===== */
footer {
  position: relative;
  margin-top: 3rem;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(160deg, var(--primary-dark) 0%, #16305a 55%, #1a3a6b 100%);
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(111, 155, 224, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

footer > section {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto 1.6rem;
  padding: 1.6rem 1.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), transform var(--transition);
}

footer > section:hover {
  background: rgba(255, 255, 255, 0.09);
}

footer h2,
footer h3 {
  color: #fff;
}

footer h2 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

footer h3 {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
  padding-left: 0;
  border-left: none;
}

footer p {
  margin: 0 0 0.6rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  line-height: 1.8;
}

footer a {
  color: var(--accent-light);
}

footer a:hover {
  color: #fff;
}

footer > p {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

footer small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .header-inner {
    gap: 1rem;
  }

  #site-header nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.88rem;
  }

  #site-header input[type="search"] {
    width: 160px;
  }

  #site-header input[type="search"]:focus {
    width: 190px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    padding: 0.6rem 1rem;
  }

  #site-header nav {
    order: 3;
    flex-basis: 100%;
  }

  #site-header nav ul {
    justify-content: flex-start;
    gap: 0.15rem;
  }

  #site-header form[role="search"] {
    margin-left: auto;
  }

  #hero {
    padding: 2.2rem 1.6rem;
  }

  main > section {
    padding: 1.5rem 1.2rem;
  }

  main {
    padding: 0 1rem 2.5rem;
  }
}

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

  .header-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

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

  #site-header nav ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
  }

  #site-header nav a {
    text-align: center;
    font-size: 0.84rem;
    padding: 0.4rem 0.2rem;
  }

  #site-header form[role="search"] {
    flex-basis: 100%;
    order: 4;
  }

  #site-header input[type="search"] {
    flex: 1 1 auto;
    width: auto;
  }

  #site-header input[type="search"]:focus {
    width: auto;
  }

  #hero {
    padding: 1.8rem 1.2rem;
    border-radius: var(--radius-lg);
  }

  #hero .hero-lead {
    font-size: 0.94rem;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.7rem 1.2rem;
  }

  main > section {
    padding: 1.3rem 1rem;
    border-radius: var(--radius-md);
    margin: 1.6rem 0;
  }

  main > section h3 {
    padding-left: 0.65rem;
  }

  #products ul,
  #howto ul,
  #howto ol,
  #sitemap ul {
    grid-template-columns: 1fr;
  }

  #articles article,
  #news article {
    padding: 1.2rem 1.1rem;
  }

  #faq summary {
    padding: 0.9rem 2.8rem 0.9rem 1rem;
    font-size: 0.92rem;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }

  footer > section {
    padding: 1.2rem 1.1rem;
  }
}

@media (max-width: 380px) {
  #site-header nav ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===== Print ===== */
@media print {
  #site-header,
  #hero::after,
  .hero-actions,
  footer {
    display: none;
  }

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

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