:root {
  --brand: #f04142;
  --brand-2: #2fa84f;
  --brand-soft: rgba(240, 65, 66, 0.12);
  --brand-2-soft: rgba(47, 168, 79, 0.12);
  --ink: #1a1a1a;
  --ink-2: #3a3a40;
  --muted: #5c5c63;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-elev: #ffffff;
  --line: #e5e5e7;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 26, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 26, 0.16);
  --grad: linear-gradient(135deg, #f04142 0%, #ff6a3d 45%, #2fa84f 100%);
  --grad-soft: linear-gradient(135deg, rgba(240, 65, 66, 0.14), rgba(47, 168, 79, 0.14));
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 64px;
}

html[data-theme="dark"] {
  --ink: #f2f2f4;
  --ink-2: #d6d6dc;
  --muted: #a8a8b0;
  --bg: #141416;
  --bg-soft: #1c1c20;
  --bg-elev: #202026;
  --line: #2c2c32;
  --glass: rgba(28, 28, 32, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.62);
  --grad-soft: linear-gradient(135deg, rgba(240, 65, 66, 0.22), rgba(47, 168, 79, 0.22));
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, var(--brand-2-soft), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

::selection {
  background: var(--brand);
  color: #fff;
}

img,
svg,
video {
  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(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

h1 {
  font-size: clamp(1.6rem, 1.15rem + 2.2vw, 2.5rem);
  margin-top: 0;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.75rem);
  position: relative;
  padding-left: 0.85em;
  margin-top: 0;
}

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

h3 {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

li {
  margin-bottom: 0.4em;
}

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

blockquote {
  margin: 1.4em 0;
  padding: 1em 1.3em;
  border-left: 4px solid var(--brand-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--grad-soft);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

blockquote footer {
  margin-top: 0.5em;
  font-size: 0.88rem;
  color: var(--muted);
}

time {
  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);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

#site-header.is-stuck {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.brand svg {
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(240, 65, 66, 0.35);
  transition: transform 0.5s var(--ease), box-shadow 0.3s var(--ease);
}

.brand:hover svg {
  transform: rotate(-12deg) scale(1.06);
  box-shadow: 0 6px 20px rgba(240, 65, 66, 0.5);
}

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

#main-nav {
  flex: 1 1 auto;
}

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

#main-nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

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

#main-nav a:hover::after {
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  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 var(--brand-soft);
}

.site-search input {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  width: 190px;
  border-radius: var(--radius-pill);
  font-family: inherit;
}

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

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

.site-search button,
#theme-toggle,
#menu-toggle,
#back-to-top {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-search button {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(240, 65, 66, 0.3);
}

.site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover,
#back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.site-search button:hover {
  filter: brightness(1.06);
}

#theme-toggle:hover,
#menu-toggle:hover,
#back-to-top:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}

#menu-toggle {
  display: none;
}

/* ============ Main layout ============ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: block;
}

section {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

section:last-of-type {
  border-bottom: none;
}

section > h2:first-child {
  margin-top: 0;
}

.meta-line {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0.4em 0 0.8em;
  letter-spacing: 0.01em;
}

/* ============ Hero ============ */
#hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  opacity: 0.6;
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.4em;
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 22px rgba(240, 65, 66, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}

.btn-primary:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(240, 65, 66, 0.45);
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  color: var(--brand);
  text-decoration: none;
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hero-facts li {
  flex: 1 1 150px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hero-facts li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

.hero-facts strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ============ Hero banner ============ */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.hero-banner:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 26px 60px rgba(240, 65, 66, 0.22);
}

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

.banner-slide {
  position: relative;
}

.banner-slide[hidden] {
  display: none;
}

.banner-slide p {
  margin: 0;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
}

.banner-nav {
  position: absolute;
  bottom: 58px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.banner-nav button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.banner-nav button:hover {
  transform: scale(1.15);
  background: var(--brand);
  color: #fff;
}

.banner-nav button[aria-current="true"] {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(240, 65, 66, 0.4);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  padding: 14px 0;
}

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

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--muted);
  opacity: 0.7;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ============ Cards & content blocks ============ */
#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#howto,
#faq,
#extended,
#contact,
#sitemap,
#links {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

#intro > p,
#products > p,
#solutions > p,
#news > p,
#articles > p,
#howto > p,
#extended > p,
#contact > p {
  color: var(--ink-2);
}

#products ul,
#howto ul,
#howto ol,
#extended ul {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

#products > ul > li,
#howto > ul > li,
#extended > ul > li {
  position: relative;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

#products > ul > li::before,
#howto > ul > li::before,
#extended > ul > li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

#products > ul > li:hover,
#howto > ul > li:hover,
#extended > ul > li:hover {
  transform: translateX(4px);
  border-color: var(--brand);
  background: var(--bg-elev);
}

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

#howto > ol > li {
  position: relative;
  counter-increment: step;
  padding: 14px 16px 14px 58px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s 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;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(240, 65, 66, 0.3);
}

#howto > ol > li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

/* ============ News ============ */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.news-list > li {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  margin: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.news-list > li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

.news-list h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.news-list h3 a {
  color: var(--ink);
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease), color 0.25s var(--ease);
}

.news-list h3 a:hover {
  color: var(--brand);
  text-decoration: none;
  background-size: 100% 2px;
}

.news-list p {
  margin: 0 0 0.4em;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.news-list .meta-line {
  margin: 0 0 0.5em;
}

/* ============ Articles ============ */
#articles {
  display: block;
}

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

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

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

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

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

#articles > article h3 a {
  color: var(--ink);
  transition: color 0.25s var(--ease);
}

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

#articles > article p {
  margin: 0 0 0.5em;
  color: var(--ink-2);
  font-size: 0.94rem;
}

#articles > article > p > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
}

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

#articles > article > p > a:hover {
  text-decoration: none;
  color: var(--brand-2);
}

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

/* ============ FAQ ============ */
#faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px;
  margin: 12px 0;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  background: var(--bg-soft);
  border-color: var(--brand);
}

#faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 14px 30px 14px 0;
  position: relative;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease);
}

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

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

#faq details[open] summary {
  color: var(--brand);
}

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

#faq details p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
  animation: fadeInDown 0.35s var(--ease);
}

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

/* ============ Contact ============ */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 10px;
}

.contact-list li {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 0.95rem;
  margin: 0;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.contact-list li:hover {
  transform: translateX(4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

/* ============ Sitemap & links ============ */
.sitemap-list,
.friend-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sitemap-list li,
.friend-links li {
  margin: 0;
}

.sitemap-list a,
.friend-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.sitemap-list a:hover,
.friend-links a:hover {
  transform: translateY(-3px);
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(240, 65, 66, 0.3);
}

/* ============ Footer ============ */
#site-footer {
  margin-top: 20px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  position: relative;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

.footer-inner section {
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.footer-inner section:last-of-type {
  border-bottom: none;
}

.footer-inner h2 {
  font-size: 1.02rem;
  padding-left: 0;
  margin: 0 0 8px;
}

.footer-inner h2::before {
  display: none;
}

.footer-inner p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.6em;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 12px 0 0;
}

.footer-meta a {
  color: var(--brand);
  font-weight: 600;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--grad);
  color: #fff;
  border: none;
  box-shadow: 0 10px 26px rgba(240, 65, 66, 0.4);
  animation: popIn 0.3s var(--ease);
}

#back-to-top:hover {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(240, 65, 66, 0.5);
}

#back-to-top[hidden] {
  display: none;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#hero.reveal {
  transform: translateY(16px);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  #hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }

  .hero-banner {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }

  #main-nav ul {
    gap: 2px;
  }

  #main-nav a {
    padding: 6px 10px;
    font-size: 0.88rem;
  }

  .site-search input {
    width: 150px;
  }
}

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

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

  #menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  #main-nav {
    display: none;
    flex-basis: 100%;
    order: 5;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    animation: fadeInDown 0.3s var(--ease);
  }

  #main-nav.is-open {
    display: block;
  }

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

  #main-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }

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

  .header-tools {
    gap: 6px;
  }

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

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

  main {
    padding: 0 16px;
  }

  section {
    padding: 34px 0;
  }

  .hero-facts {
    gap: 12px;
  }

  .hero-facts li {
    flex: 1 1 140px;
    padding: 14px;
  }

  .hero-facts strong {
    font-size: 1.45rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
    line-height: 1.72;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.28rem;
  }

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

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 12px 20px;
  }

  .hero-facts {
    flex-direction: column;
  }

  .hero-facts li {
    flex-basis: auto;
  }

  .banner-nav {
    bottom: 52px;
    right: 10px;
  }

  .banner-nav button {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }

  #articles > article,
  .news-list > li {
    padding: 16px 18px;
  }

  #faq details {
    padding: 2px 14px;
  }

  .sitemap-list,
  .friend-links {
    gap: 8px;
  }

  .sitemap-list a,
  .friend-links a {
    padding: 7px 13px;
    font-size: 0.85rem;
  }

  #back-to-top {
    right: 12px;
    bottom: 14px;
    padding: 9px 14px;
    font-size: 0.84rem;
  }

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

/* ============ Accessibility & motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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

@media (prefers-contrast: more) {
  :root {
    --line: #9a9aa2;
    --muted: #3a3a40;
  }

  html[data-theme="dark"] {
    --line: #6a6a74;
    --muted: #d0d0d6;
  }
}

/* ============ Print ============ */
@media print {
  #site-header,
  #back-to-top,
  .banner-nav,
  .header-tools,
  #main-nav {
    display: none !important;
  }

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

  section {
    break-inside: avoid;
    padding: 16px 0;
  }

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

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