:root {
  --brand: #c8102e;
  --brand-dark: #a30d25;
  --brand-light: #e63950;
  --accent: #ff8a3d;
  --accent-2: #7b5cff;
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1b1d29;
  --text-soft: #4a4e63;
  --text-muted: #7a7f96;
  --border: rgba(20, 22, 40, 0.1);
  --border-strong: rgba(20, 22, 40, 0.18);
  --shadow-sm: 0 2px 8px rgba(20, 22, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 22, 40, 0.1);
  --shadow-lg: 0 24px 60px rgba(20, 22, 40, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --grad-hero: linear-gradient(135deg, #c8102e 0%, #7b1fa2 55%, #2b1b6e 100%);
  --grad-brand: linear-gradient(135deg, #c8102e 0%, #e63950 100%);
  --grad-accent: linear-gradient(135deg, #ff8a3d 0%, #c8102e 100%);
  --grad-soft: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(123, 92, 255, 0.08));
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(18px) saturate(160%);
  --header-h: 64px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"],
body.dark-mode {
  --bg: #0d0f18;
  --bg-alt: #141726;
  --bg-elev: rgba(24, 27, 44, 0.66);
  --text: #eef0fa;
  --text-soft: #c3c7db;
  --text-muted: #8b90a8;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --grad-soft: linear-gradient(135deg, rgba(230, 57, 80, 0.16), rgba(123, 92, 255, 0.16));
  --glass-bg: rgba(20, 23, 38, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0d0f18;
    --bg-alt: #141726;
    --bg-elev: rgba(24, 27, 44, 0.66);
    --text: #eef0fa;
    --text-soft: #c3c7db;
    --text-muted: #8b90a8;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(135deg, rgba(230, 57, 80, 0.16), rgba(123, 92, 255, 0.16));
    --glass-bg: rgba(20, 23, 38, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(200, 16, 46, 0.1), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(123, 92, 255, 0.1), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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,
a:focus-visible {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

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

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

li {
  margin-bottom: 0.5em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--brand);
  background: var(--grad-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-soft);
  font-style: normal;
}

blockquote p { margin: 0; }

time {
  color: var(--text-muted);
  font-size: 0.88em;
}

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

::selection {
  background: rgba(200, 16, 46, 0.25);
  color: var(--text);
}

.skip-link,
body > a[href="#main-content"] {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  transition: top 0.3s var(--ease);
}

.skip-link:focus,
body > a[href="#main-content"]:focus {
  top: 12px;
  text-decoration: none;
}

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

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.topbar p {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.brand-line strong {
  color: var(--brand);
  font-weight: 800;
}

.update-line {
  white-space: nowrap;
}

#main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-brand svg {
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  transition: transform 0.4s var(--ease);
}

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

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

#nav-list li {
  margin: 0;
}

#nav-list a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#nav-list a:hover,
#nav-list a:focus-visible {
  color: var(--brand);
  background: rgba(200, 16, 46, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.45);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-search input {
  width: 200px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

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

.site-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18);
  width: 240px;
}

.site-search button {
  padding: 9px 18px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4);
  filter: brightness(1.05);
}

.theme-toggle {
  padding: 9px 16px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

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

main > section {
  position: relative;
  margin: 40px 0;
  padding: clamp(22px, 4vw, 44px);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

@supports not (animation-timeline: view()) {
  main > section {
    animation: none;
  }
}

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

main > section > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

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

#hero {
  margin-top: 32px;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
  background: var(--grad-hero);
  background-size: 200% 200%;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: heroShift 14s ease-in-out infinite alternate;
}

@keyframes heroShift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.28), transparent 65%);
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero-lede {
  max-width: 780px;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 30px 0 26px;
}

.hero-carousel .slide {
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}

.hero-carousel .slide:hover {
  transform: translateY(-8px) scale(1.015);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

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

.hero-carousel .slide h2 {
  margin: 16px 18px 6px;
  font-size: 1.15rem;
  color: #fff;
}

.hero-carousel .slide p {
  margin: 0 18px 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.carousel-controls {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
}

.carousel-controls button {
  padding: 9px 22px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.carousel-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  margin: 0;
  padding: 16px 18px;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.hero-stats li:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-stats .num {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-stats .num::after {
  content: "";
}

#breadcrumb {
  margin: -16px 0 24px;
  padding: 0 4px;
}

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

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

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

#breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
}

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

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

#brand-intro ul,
#products ul,
#knowledge ul,
#howto ul,
#howto ol,
#contact ul,
#sitemap ul,
#links ul {
  padding-left: 0;
  list-style: none;
}

#brand-intro ul li,
#products ul li,
#knowledge ul li,
#howto ul li,
#howto ol li,
#contact ul li,
#sitemap ul li,
#links ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

#brand-intro ul li::before,
#products ul li::before,
#knowledge ul li::before,
#howto ul li::before,
#contact ul li::before,
#sitemap ul li::before,
#links ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.14);
}

#howto ol {
  counter-reset: howto;
}

#howto ol li {
  counter-increment: howto;
  padding-left: 42px;
}

#howto ol li::before {
  content: counter(howto);
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.35);
}

#products {
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    var(--grad-brand) border-box;
  border: 1px solid transparent;
}

#products ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 4px 24px;
}

#products ul li {
  padding: 12px 14px 12px 38px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.35);
}

#products ul li::before {
  left: 16px;
}

#services h3,
#scenarios h3,
#solutions h3,
#applications h3,
#cases h3,
#knowledge h3,
#howto h3 {
  margin-top: 1.4em;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
  border-radius: 2px;
}

#services h3:first-of-type,
#scenarios h3:first-of-type,
#solutions h3:first-of-type,
#applications h3:first-of-type,
#cases h3:first-of-type,
#knowledge h3:first-of-type,
#howto h3:first-of-type {
  margin-top: 0.6em;
}

#cases blockquote {
  margin: 18px 0;
  padding: 18px 22px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

#cases blockquote p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-soft);
}

#news article {
  position: relative;
  margin: 0 0 18px;
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.3);
}

#news article h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

#news article p {
  margin: 0;
  font-size: 0.92rem;
}

#news article time {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: rgba(200, 16, 46, 0.1);
  border-radius: var(--radius-pill);
}

#articles {
  display: block;
}

#articles > p {
  max-width: 720px;
}

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

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

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.3);
}

#articles article:hover::before {
  transform: scaleY(1);
}

#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

#articles article h3 a {
  color: var(--text);
}

#articles article h3 a:hover {
  color: var(--brand);
}

#articles article p {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

#articles article > p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
}

#articles article a[href^="#article-"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid rgba(200, 16, 46, 0.2);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article a[href^="#article-"]::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article a[href^="#article-"]:hover {
  color: #fff;
  background: var(--grad-brand);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.35);
  text-decoration: none;
}

#articles article a[href^="#article-"]:hover::after {
  transform: translateX(3px);
}

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

#faq details[open] {
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease), background 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;
  line-height: 24px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(200, 16, 46, 0.1);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

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

#faq summary:hover {
  color: var(--brand);
  background: rgba(200, 16, 46, 0.05);
}

#faq details > p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.93rem;
  color: var(--text-soft);
  animation: fadeUp 0.4s var(--ease) both;
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

#contact ul li {
  padding: 14px 16px 14px 38px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

#contact ul li::before {
  left: 16px;
}

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

#sitemap ul li::before,
#links ul li::before {
  display: none;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.35);
  text-decoration: none;
}

#legal {
  background: var(--grad-soft), var(--bg-alt);
}

#author-info {
  background: var(--bg-alt);
  border-left: 4px solid var(--brand);
}

#author-info p {
  font-size: 0.94rem;
}

#author-info time {
  color: var(--brand);
  font-weight: 600;
}

#site-footer {
  margin-top: 60px;
  padding: 40px 20px 28px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

#site-footer p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#site-footer a {
  color: var(--text-soft);
  font-weight: 500;
}

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

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 0;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#back-to-top::before {
  content: "↑";
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 48px;
}

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

#back-to-top:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 32px rgba(200, 16, 46, 0.5);
}

@media (max-width: 1024px) {
  .site-search input {
    width: 160px;
  }

  .site-search input:focus {
    width: 190px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 56px;
  }

  .topbar {
    font-size: 0.76rem;
    padding: 6px 16px;
  }

  .update-line {
    display: none;
  }

  #main-nav {
    gap: 10px;
    padding: 10px 16px;
  }

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  #nav-list {
    display: none;
    order: 10;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.35s var(--ease) both;
  }

  .menu-toggle[aria-expanded="true"] + #nav-list,
  #nav-list.open {
    display: flex;
  }

  #nav-list a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  .site-search {
    order: 11;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .site-search input {
    flex: 1 1 auto;
    width: auto;
  }

  .site-search input:focus {
    width: auto;
  }

  .theme-toggle {
    order: 12;
    flex: 1 1 100%;
    margin-top: 2px;
  }

  #main-content {
    padding: 0 14px 40px;
  }

  main > section {
    margin: 26px 0;
    padding: 22px 18px;
    border-radius: var(--radius);
  }

  #hero {
    margin-top: 20px;
    padding: 26px 18px;
  }

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

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

  #products ul,
  #contact ul {
    grid-template-columns: 1fr;
  }

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

  #back-to-top::before {
    line-height: 44px;
  }
}

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

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

  .nav-brand svg {
    width: 34px;
    height: 34px;
  }

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

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

  #articles article,
  #news article {
    padding: 16px 16px;
  }

  #sitemap a,
  #links a {
    padding: 6px 14px;
    font-size: 0.82rem;
  }
}

@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 {
    animation: none !important;
  }
}

@media print {
  #site-header,
  #back-to-top,
  .carousel-controls,
  .site-search,
  .theme-toggle,
  .menu-toggle {
    display: none !important;
  }

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

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

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