/* ==========================================================================
   ASIO4ALL — site stylesheet
   Palette based on asio4all.org: slate #272B36 / #3C4051, gold #FCB900,
   red #D85B5B, meter green #3DBE7A.
   ========================================================================== */

@font-face { font-family: Poppins; font-weight: 600; font-display: optional; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: optional; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: Poppins; font-weight: 800; font-display: optional; src: url("../fonts/poppins-800.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #272b36;
  --bg-alt: #2c303c;
  --bg-deep: #1f222b;
  --bg-deeper: #1a1c24;
  --surface: #31353f;
  --surface-2: #3c4051;
  --surface-3: #474c5f;
  --line: #424758;
  --line-soft: #ffffff14;
  /* text */
  --text: #d3d7e0;
  --text-strong: #ffffff;
  --muted: #a3aabb;
  --faint: #a0a7b8;
  /* brand */
  --gold: #fcb900;
  --gold-hover: #ffcd3f;
  --gold-soft: #fcb9001f;
  --gold-line: #fcb90059;
  --red: #d85b5b;
  --red-soft: #d85b5b21;
  --green: #3dbe7a;
  --green-soft: #3dbe7a1f;
  --blue: #6cb7ff;
  --blue-soft: #6cb7ff1c;
  /* layout */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 36px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --header-h: 72px;
  --shadow: 0 1px 0 #ffffff0a inset, 0 18px 40px -18px #0000008c;
  --shadow-lg: 0 30px 60px -25px #000000b3;
  --ring: 0 0 0 3px #fcb90066;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --display: Poppins, "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); text-decoration: none; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--text-strong); font-family: var(--display); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.08rem, 1.6vw, 1.22rem); line-height: 1.35; letter-spacing: -.01em; }
p, ol, ul, dl, figure { margin: 0; }
strong { color: var(--text-strong); font-weight: 650; }
code { padding: .1em .4em; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-deep); color: #ffd666; font: .88em/1.4 var(--mono); }
::selection { background: var(--gold); color: #1a1c24; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.shell { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.block { padding-block: clamp(3.5rem, 7vw, 6rem); }
/* Skip rendering work for off-screen sections until they approach the viewport. */
.related-section, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 720px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .7rem 1rem; border-radius: 8px; background: var(--gold); color: #1a1c24; font-weight: 700; transform: translateY(-200%); transition: transform .2s; }
.skip:focus { transform: none; color: #1a1c24; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: #1f222bf0;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -15px #000000b3; }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; color: var(--text-strong); text-decoration: none; }
.brand:hover { color: var(--text-strong); }
.brand img { width: 40px; height: 40px; }
.brand-name { font: 800 1.3rem/1 var(--display); letter-spacing: -.03em; }
.brand-name b, .h1-brand b { color: var(--green); font-weight: 800; }
.brand-name i, .h1-brand i { color: #ec6767; font-style: normal; }
.brand-tag { display: block; margin-top: .28rem; color: var(--muted); font: 500 .66rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.primary-nav ul { display: flex; align-items: center; gap: .25rem; padding: 0; list-style: none; }
.primary-nav a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .85rem; border-radius: 10px;
  color: #c9cedb; font: 600 .875rem/1 var(--display); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.primary-nav a .ico { width: 1rem; height: 1rem; opacity: .75; }
.primary-nav a:hover { color: var(--text-strong); background: #ffffff0d; }
.primary-nav a[aria-current="page"] { color: var(--gold); background: var(--gold-soft); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }

/* mobile menu */
.menu-toggle {
  display: none; align-items: center; justify-content: center; gap: .5rem;
  height: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text-strong); font: 600 .85rem/1 var(--display);
}
.menu-toggle .ico-close { display: none; }
.menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }
.mobile-panel {
  position: fixed; inset: var(--header-h) 0 auto; z-index: 49;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  padding: 1rem var(--gutter) 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px); visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.mobile-panel.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.mobile-panel ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.mobile-panel li a {
  display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--text-strong); font: 600 .9rem/1.2 var(--display); text-decoration: none;
}
.mobile-panel li a .ico { color: var(--gold); }
.mobile-panel li a[aria-current="page"] { border-color: var(--gold-line); background: var(--gold-soft); }
.mobile-panel .btn { width: 100%; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border: 1px solid transparent; border-radius: 12px;
  font: 600 .925rem/1.2 var(--display); text-align: center; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn .ico { width: 1.1rem; height: 1.1rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold); color: #1d1f27; box-shadow: 0 10px 24px -10px #fcb900a6; }
.btn-primary:hover { background: var(--gold-hover); color: #1d1f27; box-shadow: 0 14px 30px -12px #fcb900c7; }
.btn-ghost, .btn-secondary { border-color: #ffffff2e; background: #ffffff0a; color: var(--text-strong); }
.btn-ghost:hover, .btn-secondary:hover { border-color: var(--gold-line); background: #ffffff14; color: var(--text-strong); }
.btn-sm { min-height: 40px; padding: .55rem 1rem; font-size: .85rem; border-radius: 10px; }
.button-row, .text-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.text-link-row { gap: .6rem 1.5rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .45rem; width: fit-content;
  color: var(--gold); font: 600 .9rem/1.4 var(--display); text-decoration: none;
}
.text-link .ico { width: 1rem; height: 1rem; transition: transform .2s var(--ease); }
.text-link:hover .ico { transform: translateX(3px); }
.text-link:hover { color: var(--gold-hover); }

/* ---------- section headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem;
  color: var(--gold); font: 700 .74rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow .ico { width: .95rem; height: .95rem; }
.section-heading h2 { max-width: 22ch; }
.section-heading p:not(.eyebrow) { max-width: 40rem; margin-top: 1rem; color: var(--muted); font-size: 1.04rem; line-height: 1.75; }
.section-heading > .text-link, .section-heading > .button-row { margin-top: 1.4rem; }
.section-heading.center { text-align: center; margin-inline: auto; }
.section-heading.center h2, .section-heading.center p:not(.eyebrow) { margin-inline: auto; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; background: var(--bg-deeper); }
.hero-image { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 70%; height: 100%; object-fit: cover; object-position: 70% 55%; opacity: .9; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg-deeper) 0%, var(--bg-deeper) 30%, #1a1c24e6 45%, #1a1c2466 65%, #1a1c2422 100%),
    linear-gradient(0deg, var(--bg-deeper) 0%, transparent 30%),
    radial-gradient(60% 80% at 10% 0%, #fcb90014, transparent 60%);
}
.hero-shell { display: flex; align-items: center; min-height: clamp(560px, 78vh, 700px); padding-block: clamp(3.5rem, 8vw, 6rem); }
.hero-copy { max-width: 640px; }
.release-label {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .55rem;
  border: 1px solid var(--gold-line); border-radius: 999px; background: #fcb90012;
  color: #ffe08a; font: 600 .78rem/1 var(--display); letter-spacing: .02em; text-decoration: none;
}
.release-label .pill { padding: .28rem .55rem; border-radius: 999px; background: var(--gold); color: #1d1f27; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.release-label:hover { color: #fff1c4; }
.hero h1 { margin: 1.4rem 0 0; }
.h1-brand { display: block; color: var(--text-strong); font: 800 clamp(3.4rem, 8vw, 6.4rem)/.98 var(--display); letter-spacing: -.045em; }
.h1-sub { display: block; margin-top: .9rem; color: #e9ecf3; font: 600 clamp(1.35rem, 2.8vw, 2.05rem)/1.25 var(--display); letter-spacing: -.02em; }
.hero-desc { max-width: 560px; margin: 1.35rem 0 2rem; color: #c3c9d6; font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.8; }
.hero-desc strong { color: var(--text-strong); font-weight: 600; }
.hero-points { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.75rem; padding: 0; list-style: none; color: #c3c9d6; font-size: .9rem; }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points .ico { width: 1.05rem; height: 1.05rem; color: var(--green); }

/* facts */
.facts { border-block: 1px solid var(--line-soft); background: var(--bg-deep); }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0; padding: 0; list-style: none; }
.fact-grid > li > div { display: grid; }
.fact-grid > li { display: flex; align-items: center; gap: .9rem; padding: 1.35rem 1.25rem; border-left: 1px solid var(--line-soft); }
.fact-grid > li:first-child { border-left: 0; padding-left: 0; }
.fact-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--gold-soft); color: var(--gold); }
.fact-icon .ico { width: 1.25rem; height: 1.25rem; }
.fact-label { color: var(--muted); font: 600 .7rem/1.3 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.fact-value { margin: .25rem 0 0; color: var(--text-strong); font: 600 .98rem/1.35 var(--display); }

/* ---------- sticky section nav ("on this page") ---------- */
.section-nav {
  position: sticky; top: var(--header-h); z-index: 40;
  border-bottom: 1px solid var(--line-soft);
  background: #272b36eb;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.section-nav .shell { position: relative; }
.section-nav ul {
  display: flex; align-items: center; gap: .35rem; margin: 0; padding: .6rem 0; list-style: none;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
  padding-inline: 4px;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav li { flex: none; scroll-snap-align: start; }
.section-nav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem;
  border: 1px solid transparent; border-radius: 999px;
  color: #b9bfcc; font: 600 .8rem/1 var(--display); white-space: nowrap; text-decoration: none;
  transition: color .2s, background-color .2s, border-color .2s;
}
.section-nav a .ico { width: .95rem; height: .95rem; opacity: .7; }
.section-nav a:hover { color: var(--text-strong); background: #ffffff0f; }
.section-nav a.is-active { border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold); }
.section-nav a.is-active .ico { opacity: 1; }

/* ---------- home sections ---------- */
.overview-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.intro-copy p { color: var(--text); font-size: 1.04rem; line-height: 1.85; }
.intro-copy p + p { margin-top: 1.1rem; }
.intro-copy .text-link { margin-top: 1.4rem; }
.alt { background: var(--bg-alt); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .7rem;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #353a47, #2f333e);
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold-line); }
.card h3 { margin-top: .4rem; }
.card p { color: var(--muted); font-size: .96rem; line-height: 1.75; }
.card .text-link { margin-top: auto; padding-top: .5rem; }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line); }
.card-icon .ico { width: 1.45rem; height: 1.45rem; }
.card-icon.red { background: var(--red-soft); color: #ef8a8a; border-color: #d85b5b55; }
.card-icon.green { background: var(--green-soft); color: #6fdca2; border-color: #3dbe7a55; }

/* signal path */
.signal { background: radial-gradient(70% 120% at 100% 0%, #fcb9000f, transparent 60%), var(--bg-deep); border-block: 1px solid var(--line-soft); }
.signal-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.signal-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; padding: 0; list-style: none; counter-reset: sig; }
.signal-path li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1.6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center;
}
.signal-path li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; left: 100%; width: 1.4rem; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--green));
}
.signal-path .card-icon { width: 54px; height: 54px; }
.signal-path li > div { display: grid; gap: .25rem; }
.signal-path li > div > span { color: var(--muted); font: 600 .72rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.signal-path strong { font: 700 1.05rem/1.25 var(--display); }

/* platform tabs */
.panel-box { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.tab-list { display: flex; gap: .35rem; padding: .35rem; margin-bottom: 1.4rem; border-radius: 12px; background: var(--bg-deep); }
.tab-list button {
  display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1rem; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font: 600 .88rem/1.2 var(--display); transition: background-color .2s, color .2s;
}
.tab-list button:hover { color: var(--text-strong); }
.tab-list button[aria-selected="true"] { background: var(--surface-2); color: var(--gold); box-shadow: 0 2px 8px #0000004d; }
.panel-box [data-panel] > h3 { margin-bottom: .9rem; }
.panel-box [data-panel] > p { color: var(--muted); line-height: 1.8; }
.panel-box [data-panel] > .text-link, .panel-box .text-link-row { margin-top: 1.25rem; }
.compact-facts > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.compact-facts > div:last-child { border-bottom: 0; }
.compact-facts dt { display: flex; align-items: center; gap: .55rem; color: var(--text-strong); font-weight: 600; }
.compact-facts dt .ico { color: var(--gold); width: 1.05rem; height: 1.05rem; }
.compact-facts dd { margin: 0; color: var(--muted); }

/* tables */
.table-wrap { min-width: 0; padding: clamp(1rem, 2.6vw, 1.6rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.table-wrap .text-link { margin-top: 1.1rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; text-align: left; }
caption { padding-bottom: .85rem; color: var(--text-strong); font: 600 1rem/1.4 var(--display); text-align: left; caption-side: top; }
th, td { padding: .85rem 1rem; vertical-align: top; line-height: 1.6; }
thead th { border-bottom: 2px solid var(--gold-line); background: var(--bg-deep); color: var(--text-strong); font: 600 .78rem/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody tr { border-bottom: 1px solid var(--line); transition: background-color .15s; }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: #ffffff06; }
tbody th { color: var(--gold); font-weight: 600; }
td { color: var(--text); }

/* use-case / media */
.use-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.use-media { position: relative; border-radius: var(--radius-lg); overflow: clip; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.use-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.check-list { display: grid; gap: .7rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text); line-height: 1.65; }
.check-list .ico { margin-top: .2rem; color: var(--green); }

/* steps */
.steps { display: grid; gap: 1rem; padding: 0; list-style: none; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.35rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-number { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 12px; background: var(--gold); color: #1d1f27; font: 800 1rem/1 var(--display); }
.steps h3 { font-size: 1.08rem; }
.steps p { margin-top: .35rem; color: var(--muted); line-height: 1.7; }

/* download card */
.download-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid var(--gold-line); border-radius: 26px;
  background: radial-gradient(80% 140% at 100% 0%, #fcb90026, transparent 55%), linear-gradient(135deg, #343846, #262932);
  box-shadow: var(--shadow-lg);
}
.download-card h2 { max-width: 18ch; }
.download-card p:not(.eyebrow) { margin-top: .8rem; color: var(--muted); }
.download-card .button-row { margin-top: 1.75rem; }
.download-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding: 0; list-style: none; }
.download-meta li { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #ffffff08; color: #d5d9e2; font: 500 .8rem/1.2 var(--display); }
.download-meta .ico { width: .95rem; height: .95rem; color: var(--gold); }
.download-source { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); }
.download-source .card-icon { width: 48px; height: 48px; }
.download-source strong, .download-source span { display: block; }
.download-source span { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }

.note-card { padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); background: var(--surface); }
.note-card h3, .note-card h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.note-card h3 .ico, .note-card h2 .ico { color: var(--gold); }
.note-card p { margin-top: .7rem; color: var(--muted); line-height: 1.75; }
.note-card .text-link { margin-top: 1rem; }

.help-links { display: grid; gap: .75rem; }
.help-link {
  display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text-strong); font: 600 .98rem/1.4 var(--display); text-decoration: none;
  transition: border-color .2s, transform .2s var(--ease), background-color .2s;
}
.help-link > .ico:first-child { width: 40px; height: 40px; padding: 10px; border-radius: 10px; background: var(--red-soft); color: #ef8a8a; }
.help-link > .ico:last-child { margin-left: auto; color: var(--gold); transition: transform .2s var(--ease); }
.help-link:hover { border-color: var(--gold-line); color: var(--text-strong); transform: translateX(4px); }
.help-link:hover > .ico:last-child { transform: translateX(3px); }

/* ---------- post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding: 0; list-style: none; }
.section-heading + .post-grid { margin-top: 2.5rem; }
.post-card { display: flex; min-width: 0; }
.post-link {
  display: flex; flex: 1; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.post-link:hover { transform: translateY(-5px); border-color: var(--gold-line); color: var(--text); box-shadow: var(--shadow-lg); }
.post-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-deep); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-link:hover .post-media img { transform: scale(1.05); }
.post-badge {
  position: absolute; top: .85rem; left: .85rem; display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .7rem; border-radius: 999px; background: #1a1c24d9; backdrop-filter: blur(6px);
  color: var(--gold); font: 600 .72rem/1 var(--display);
}
.post-badge .ico { width: .85rem; height: .85rem; }
.post-info { display: flex; flex: 1; flex-direction: column; gap: .7rem; padding: 1.35rem 1.4rem 1.45rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--faint); font-size: .8rem; }
.post-meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.post-meta .ico { width: .9rem; height: .9rem; }
.post-card h3 { font-size: 1.12rem; line-height: 1.4; transition: color .2s; }
.post-link:hover h3 { color: var(--gold); }
.post-card p { color: var(--muted); font-size: .93rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-action { display: inline-flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .4rem; color: var(--gold); font: 600 .87rem/1 var(--display); }
.card-action .ico { width: 1rem; height: 1rem; transition: transform .2s var(--ease); }
.post-link:hover .card-action .ico { transform: translateX(4px); }
.view-all { display: flex; justify-content: center; margin-top: 2.5rem; }

/* ---------- FAQ (categorised) ---------- */
.faq-section { background: radial-gradient(60% 90% at 0% 0%, #fcb9000d, transparent 60%), var(--bg-deep); border-top: 1px solid var(--line-soft); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; margin-top: 2.75rem; }
.faq-cats { position: sticky; top: calc(var(--header-h) + 80px); display: grid; gap: .65rem; }
.faq-cat {
  display: flex; align-items: center; gap: .95rem; width: 100%; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text-strong); text-align: left;
  transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}
.faq-cat:hover { border-color: #ffffff33; transform: translateX(3px); }
.faq-cat[aria-selected="true"] { border-color: var(--gold-line); background: linear-gradient(90deg, #fcb9001a, var(--surface) 70%); box-shadow: inset 3px 0 0 var(--gold); }
.faq-cat .card-icon { width: 46px; height: 46px; flex: none; }
.faq-cat .card-icon .ico { width: 1.25rem; height: 1.25rem; }
.faq-cat-text { display: grid; gap: .2rem; min-width: 0; }
.faq-cat-text strong { font: 600 .98rem/1.3 var(--display); }
.faq-cat-text span { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.faq-cat .faq-count { margin-left: auto; padding: .25rem .55rem; border-radius: 999px; background: var(--bg-deep); color: var(--muted); font: 600 .72rem/1 var(--display); }
.faq-cat[aria-selected="true"] .faq-count { background: var(--gold); color: #1d1f27; }
.faq-panel-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.faq-panel-head h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
.faq-panel-head p { color: var(--muted); font-size: .92rem; margin-top: .2rem; }
.faq-panel { animation: fadeUp .35s var(--ease); }

/* accordion — shared by home FAQ and article FAQs */
.accordion { display: grid; gap: .75rem; }
.acc-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .25s, background-color .25s, box-shadow .25s; }
.acc-item:hover { border-color: #ffffff2e; }
.acc-item.is-open { border-color: var(--gold-line); background: #353a48; box-shadow: var(--shadow); }
.acc-item h3, .acc-item h4 { margin: 0; font-size: inherit; }
.acc-trigger {
  display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.15rem 1.25rem;
  border: 0; background: transparent; color: var(--text-strong); text-align: left;
  font: 600 1rem/1.5 var(--display); border-radius: inherit;
}
.acc-trigger .q-ico { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--bg-deep); color: var(--gold); }
.acc-trigger .q-ico .ico { width: 1rem; height: 1rem; }
.acc-trigger .chev { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); transition: transform .35s var(--ease), background-color .25s, color .25s, border-color .25s; }
.acc-trigger .chev .ico { width: 1rem; height: 1rem; }
.acc-item.is-open .chev { transform: rotate(180deg); background: var(--gold); border-color: var(--gold); color: #1d1f27; }
.acc-trigger:hover { color: var(--gold); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel > div > div { padding: 0 1.25rem 1.3rem calc(1.25rem + 32px + 1rem); color: var(--text); line-height: 1.8; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .35s var(--ease); }
.acc-item.is-open .acc-panel > div > div { opacity: 1; transform: none; }
.acc-panel p + p { margin-top: .75rem; }

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

/* ---------- page hero / breadcrumbs ---------- */
.page-hero {
  position: relative; overflow: hidden; padding-block: clamp(2rem, 4vw, 2.75rem) clamp(2.75rem, 6vw, 4.5rem);
  background: radial-gradient(60% 120% at 100% 0%, #fcb9001a, transparent 55%), radial-gradient(40% 80% at 0% 100%, #d85b5b12, transparent 60%), var(--bg-deeper);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { max-width: 22ch; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.12; letter-spacing: -.035em; }
.page-lede { max-width: 48rem; margin-top: 1.15rem; color: #c3c9d6; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.8; }
.breadcrumbs { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: 0; list-style: none; color: var(--muted); font: 500 .82rem/1.4 var(--display); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); }
.breadcrumbs a { display: inline-flex; align-items: center; gap: .35rem; color: #d5d9e2; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .ico { width: .95rem; height: .95rem; }
.breadcrumbs [aria-current] { color: var(--faint); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- article ---------- */
.reading-progress { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 3px; background: transparent; pointer-events: none; }
.reading-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); transform-origin: 0 50%; transform: scaleX(0); }
.article-head-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.article-hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); max-width: 24ch; }
.cat-chip { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.1rem; padding: .45rem .85rem; border: 1px solid var(--gold-line); border-radius: 999px; background: var(--gold-soft); color: var(--gold); font: 600 .78rem/1 var(--display); text-decoration: none; }
.cat-chip:hover { background: #fcb9002e; }
.cat-chip .ico { width: .95rem; height: .95rem; }
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: 1.5rem; color: var(--muted); font: 500 .86rem/1.4 var(--display); }
.article-byline > span, .article-byline > a { display: inline-flex; align-items: center; gap: .45rem; }
.article-byline a { color: #e3e6ee; }
.article-byline a:hover { color: var(--gold); }
.article-byline .ico { width: 1rem; height: 1rem; color: var(--gold); }
.article-photo { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.article-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.article-grid { display: grid; grid-template-columns: 280px minmax(0, 760px); gap: clamp(2rem, 5vw, 4.5rem); justify-content: center; align-items: start; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1rem; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.toc { padding: 1.25rem 1.1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; padding: 0 .35rem .85rem; border-bottom: 1px solid var(--line); color: var(--text-strong); font: 700 .8rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.toc-title .ico { color: var(--gold); width: 1rem; height: 1rem; }
.toc ol { display: grid; gap: .15rem; padding: 0; margin: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; min-width: 0; }
.toc a {
  display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .5rem .6rem;
  border-radius: 9px; color: var(--muted); font: 500 .86rem/1.3 var(--display); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.toc a::before { content: counter(toc, decimal-leading-zero); flex: none; width: 1.6rem; color: var(--faint); font: 600 .72rem/1 var(--mono); }
.toc a span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toc a:hover { color: var(--text-strong); background: #ffffff0a; }
.toc a.is-active { color: var(--gold); background: var(--gold-soft); }
.toc a.is-active::before { color: var(--gold); }
.aside-cta { padding: 1.25rem; border: 1px solid var(--gold-line); border-radius: var(--radius); background: radial-gradient(100% 120% at 100% 0%, #fcb90022, transparent 60%), var(--surface); }
.aside-cta strong { display: flex; align-items: center; gap: .5rem; font: 700 1rem/1.3 var(--display); }
.aside-cta strong .ico { color: var(--gold); }
.aside-cta p { margin: .5rem 0 1rem; color: var(--muted); font-size: .86rem; line-height: 1.6; }
.aside-cta .btn { width: 100%; }
.toc-mobile { display: none; }

/* prose */
.prose { min-width: 0; color: #d8dce5; font-size: 1.0625rem; line-height: 1.85; }
.prose > section + section { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line-soft); }
.prose h2 { position: relative; margin-bottom: 1.1rem; font-size: clamp(1.55rem, 2.8vw, 2.05rem); line-height: 1.25; letter-spacing: -.025em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin: 2rem 0 .75rem; font-size: clamp(1.15rem, 1.8vw, 1.3rem); }
.prose p { margin-top: 1.1rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose a:not(.btn):not(.text-link) { color: var(--gold); text-decoration: underline; text-decoration-color: #fcb90066; text-underline-offset: .2em; overflow-wrap: anywhere; }
.prose a:not(.btn):not(.text-link):hover { text-decoration-color: var(--gold); }
.prose ul, .prose ol { display: grid; gap: .6rem; margin-top: 1.1rem; padding: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 1.75rem; }
.prose ul > li::before { content: ""; position: absolute; left: .35rem; top: .72em; width: 7px; height: 7px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.prose ol { counter-reset: step; }
.prose ol > li { position: relative; counter-increment: step; padding-left: 2.6rem; min-height: 1.85rem; }
.prose ol > li::before { content: counter(step); position: absolute; left: 0; top: .1em; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 8px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); font: 700 .8rem/1 var(--display); }
.prose .table-scroll { margin-top: 1.5rem; border: 1px solid var(--line); background: var(--surface); }
.prose table { font-size: .93rem; }
.prose caption { padding: 1rem 1rem .85rem; }
.prose thead th:first-child, .prose thead th:last-child { border-radius: 0; }
.callout { display: flex; gap: .9rem; margin-top: 1.5rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); }
.callout > .ico { margin-top: .25rem; width: 1.25rem; height: 1.25rem; }
.callout p { margin: 0; font-size: .98rem; line-height: 1.75; }
.callout p + p { margin-top: .5rem; }
.callout-tip { border-left-color: var(--green); background: linear-gradient(90deg, #3dbe7a14, var(--surface) 45%); }
.callout-tip > .ico { color: var(--green); }
.callout-warning { border-left-color: var(--red); background: linear-gradient(90deg, #d85b5b17, var(--surface) 45%); }
.callout-warning > .ico { color: #ef8a8a; }
.callout-note { border-left-color: var(--gold); background: linear-gradient(90deg, #fcb90012, var(--surface) 45%); }
.callout-note > .ico { color: var(--gold); }
.prose .accordion { margin-top: 1.25rem; }
.prose .acc-trigger { font-size: 1rem; }
.prose .acc-panel p { margin-top: 0; }
.article-sources { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-sources h2 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; font-size: 1.15rem; }
.article-sources h2 .ico { color: var(--gold); }
.article-sources ul { gap: .5rem; margin: 0; }
.article-sources li { padding-left: 0 !important; }
.article-sources li::before { display: none; }
.article-sources a { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; }
.article-sources a .ico { width: .95rem; height: .95rem; }
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); }
.author-box img { width: 56px; height: 56px; flex: none; }
.author-box strong { display: block; font: 700 1rem/1.3 var(--display); }
.author-box p { margin-top: .35rem; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.related-section { background: var(--bg-alt); border-top: 1px solid var(--line-soft); }

/* ---------- blog listing ---------- */
.blog-list-section { background: var(--bg); }
.blog-controls { display: grid; gap: 1.1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.search-box { position: relative; max-width: 34rem; }
.search-box .ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-box input { width: 100%; min-height: 50px; padding: .75rem 1rem .75rem 2.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep); color: var(--text-strong); font-size: .98rem; transition: border-color .2s, box-shadow .2s; }
.search-box input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.search-box input::placeholder { color: var(--faint); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-deep); color: #c9cedb; font: 600 .82rem/1 var(--display); transition: all .2s; }
.filter .ico { width: .95rem; height: .95rem; }
.filter:hover { border-color: #ffffff38; color: var(--text-strong); }
.filter[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: #1d1f27; }
.listing-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin: 2.25rem 0 1.5rem; }
.listing-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.listing-head p { color: var(--muted); font-size: .9rem; }
.empty-state { padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.empty-state p { margin: .5rem 0 1rem; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.pagination :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-strong); font: 600 .88rem/1 var(--display); }
.pagination a:hover { border-color: var(--gold-line); color: var(--gold); }
.pagination [aria-current="page"] { border-color: var(--gold); background: var(--gold); color: #1d1f27; }

/* ---------- policy / contact ---------- */
.page-body { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.policy-prose { max-width: 780px; margin-inline: auto; }
.policy-date { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.1rem; color: var(--muted); font-size: .88rem; }
.policy-date .ico { width: 1rem; height: 1rem; color: var(--gold); }
.contact-section { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.contact-card { min-width: 0; padding: clamp(1.4rem, 3.5vw, 2.4rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.contact-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.contact-card h2 + p { margin-top: .6rem; color: var(--muted); }
.contact-card form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-aside { display: grid; gap: 1rem; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field label, .draft-fallback label { display: block; margin-bottom: .45rem; color: var(--text-strong); font: 600 .87rem/1.3 var(--display); }
.field label span { color: var(--faint); font-weight: 500; font-size: .78rem; }
.field input, .field select, .field textarea, .draft-fallback textarea {
  width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-deep); color: var(--text-strong); font-size: .97rem; transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.field :is(input, select, textarea):focus, .draft-fallback textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.field textarea, .draft-fallback textarea { display: block; resize: vertical; line-height: 1.6; }
.consent { display: flex; align-items: flex-start; gap: .7rem; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.consent input { width: 18px; height: 18px; margin: .2rem 0 0; flex: none; accent-color: var(--gold); }
.contact-card button[type="submit"] { width: fit-content; }
.form-status { color: var(--green); font-size: .9rem; }
.form-status:empty { display: none; }
.draft-fallback { display: grid; gap: .75rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep); }
.draft-fallback p { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.error-actions { padding-block: 2.5rem 4rem; }

/* ---------- footer ---------- */
.site-footer { position: relative; padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; background: var(--bg-deeper); border-top: 1px solid var(--line-soft); color: var(--muted); }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--green) 20%, var(--gold) 50%, var(--red) 80%, transparent); opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.footer-intro p { max-width: 32ch; margin-top: 1.1rem; font-size: .93rem; line-height: 1.75; }
.footer-column h2 { margin-bottom: 1.1rem; color: var(--text-strong); font: 700 .8rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.footer-column ul { display: grid; gap: .7rem; padding: 0; list-style: none; }
.footer-column a { display: inline-flex; align-items: center; gap: .5rem; color: #c3c8d4; font-size: .93rem; line-height: 1.4; overflow-wrap: anywhere; transition: color .2s; }
.footer-column a .ico { width: .95rem; height: .95rem; color: var(--faint); transition: color .2s; }
.footer-column a:hover, .footer-column a:hover .ico { color: var(--gold); }
.footer-base { margin-top: clamp(2rem, 5vw, 3rem); padding-top: 1.4rem; border-top: 1px solid var(--line-soft); text-align: center; }
.footer-base p { color: var(--muted); font: 500 .9rem/1.6 var(--display); letter-spacing: .01em; }
.footer-base a { color: var(--gold); font-weight: 700; }
.footer-base a:hover { color: var(--gold-hover); text-decoration: underline; }

/* ---------- scroll to top ---------- */
.to-top {
  position: fixed; right: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); z-index: 45;
  display: grid; place-items: center; width: 54px; height: 54px; padding: 0;
  border: 0; border-radius: 50%; background: #1f222bf2; color: var(--gold);
  box-shadow: 0 12px 30px -8px #000000cc, 0 0 0 1px var(--line) inset;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s, background-color .2s, color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top .ring circle { fill: none; stroke-width: 3; }
.to-top .ring .track { stroke: #ffffff14; }
.to-top .ring .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; transition: stroke-dashoffset .1s linear; }
.to-top .ico { position: relative; width: 1.35rem; height: 1.35rem; transition: transform .3s var(--ease); }
.to-top:hover { background: var(--gold); color: #1d1f27; }
.to-top:hover .ico { transform: translateY(-3px); }
.to-top:hover .ring .bar { stroke: #1d1f27; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .primary-nav a { padding-inline: .6rem; }
  .primary-nav a .ico { display: none; }
  .article-grid { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .primary-nav, .nav-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand-tag { display: none; }
  .split, .overview-grid, .signal-grid, .use-grid, .contact-grid, .article-head-grid { grid-template-columns: minmax(0, 1fr); }
  .card-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-grid > li { padding: 1.1rem 1rem; }
  .fact-grid > li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact-grid > li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-intro { grid-column: 1 / -1; }
  .download-card { grid-template-columns: minmax(0, 1fr); }
  .download-source { width: fit-content; max-width: 100%; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-cats { position: static; display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) .25rem; scroll-snap-type: x mandatory; }
  .faq-cats::-webkit-scrollbar { display: none; }
  .faq-cat { flex: 0 0 auto; width: auto; max-width: 300px; scroll-snap-align: start; }
  .faq-cat:hover { transform: none; }
  .faq-cat[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--gold); }
  .faq-cat-text span { display: none; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-aside { display: none; }
  .toc-mobile { display: block; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .toc-mobile summary { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.15rem; list-style: none; cursor: pointer; color: var(--text-strong); font: 700 .92rem/1 var(--display); }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary .ico:first-child { color: var(--gold); }
  .toc-mobile summary .chev-ico { margin-left: auto; transition: transform .3s var(--ease); }
  .toc-mobile[open] summary .chev-ico { transform: rotate(180deg); }
  .toc-mobile .toc { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: transparent; padding-top: .75rem; }
  .hero-image { width: 100%; opacity: .45; }
  .hero::before { background: linear-gradient(90deg, #1a1c24f2 0%, #1a1c24bf 60%, #1a1c2480 100%), linear-gradient(0deg, var(--bg-deeper), transparent 40%); }
  .hero-shell { min-height: 0; }
}
@media (max-width: 640px) {
  .block { padding-block: 3.25rem; }
  .card-grid, .post-grid, .form-pair { grid-template-columns: minmax(0, 1fr); }
  .signal-path { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .signal-path li { flex-direction: row; justify-content: flex-start; text-align: left; padding: 1rem 1.1rem; }
  .signal-path li > div { display: grid; gap: .2rem; }
  .signal-path li:not(:last-child)::after { top: 100%; left: 2.6rem; width: 2px; height: 1rem; background: linear-gradient(180deg, var(--gold), var(--green)); }
  .fact-value { font-size: .9rem; }
  .fact-icon { width: 38px; height: 38px; }
  .button-row .btn { flex: 1 1 100%; }
  .hero-points { gap: .5rem 1rem; font-size: .85rem; }
  .compact-facts > div { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .steps li { padding: 1.1rem; }
  th, td { padding: .7rem .75rem; }
  .prose { font-size: 1.02rem; }
  .acc-trigger { padding: 1rem; gap: .75rem; }
  .acc-trigger .q-ico { display: none; }
  .acc-panel > div > div { padding: 0 1rem 1.1rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .callout { flex-direction: column; gap: .5rem; }
  .breadcrumbs [aria-current] { max-width: 22ch; }
  .to-top { width: 48px; height: 48px; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .mobile-panel ul { grid-template-columns: minmax(0, 1fr); }
  .fact-grid { grid-template-columns: minmax(0, 1fr); }
  .fact-grid > li { border-left: 0 !important; padding-left: 0 !important; }
  .fact-grid > li + li { border-top: 1px solid var(--line-soft); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .section-nav, .site-footer, .to-top, .article-aside, .related-section, .reading-progress { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Download center + premium 3D layered download button
   ========================================================================== */
.download-zone { position: relative; overflow: hidden; background: radial-gradient(55% 70% at 50% 0%, #fcb90014, transparent 70%), var(--bg); }
.dl-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); margin-top: 2.75rem;
  border: 1px solid var(--gold-line); border-radius: 28px; overflow: hidden;
  background: linear-gradient(145deg, #353a48 0%, #2a2e39 55%, #23262f 100%);
  box-shadow: 0 1px 0 #ffffff12 inset, 0 40px 80px -40px #000000d9, 0 0 0 1px #00000033;
}
.dl-card::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); }
.dl-main { padding: clamp(1.5rem, 4vw, 2.75rem); }
.dl-product { display: flex; align-items: center; gap: 1.25rem; }
.dl-product img { width: 76px; height: 76px; flex: none; filter: drop-shadow(0 12px 18px #0000008c); }
.dl-product h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; }
.dl-product p { margin-top: .3rem; color: var(--muted); font-size: .98rem; }
.dl-badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; padding: 0; list-style: none; }
.dl-badges li { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .65rem; border: 1px solid; border-radius: 999px; font: 600 .74rem/1 var(--display); }
.dl-badges .ico { width: .85rem; height: .85rem; }
.dl-badges .b-gold { border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold); }
.dl-badges .b-green { border-color: #3dbe7a55; background: var(--green-soft); color: #6fdca2; }
.dl-badges .b-red { border-color: #d85b5b55; background: var(--red-soft); color: #f09090; }
.dl-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.75rem; }
.dl-specs > div { min-width: 0; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 12px; background: #1f222b99; transition: border-color .2s; }
.dl-specs > div:hover { border-color: #ffffff2e; }
.dl-specs dd.nowrap-file { overflow-wrap: normal; }
.dl-specs dt { display: flex; align-items: center; gap: .45rem; color: var(--muted); font: 600 .7rem/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.dl-specs dt .ico { width: .95rem; height: .95rem; color: var(--gold); }
.dl-specs dd { margin: .3rem 0 0; color: var(--text-strong); font: 600 .95rem/1.35 var(--display); overflow-wrap: anywhere; }
.dl-action {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line-soft);
  background:
    radial-gradient(60% 55% at 50% 42%, #fcb90026, transparent 70%),
    linear-gradient(#ffffff06 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, #ffffff06 1px, transparent 1px) 0 0 / 22px 22px,
    #1c1f27;
}
.dl-stage { position: relative; display: grid; place-items: center; width: 100%; padding: 1.25rem 0 .5rem; }
.dl-stage::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: 78%; height: 46px; border-radius: 50%;
  background: radial-gradient(closest-side, #fcb90059, transparent); filter: blur(10px); transform: translate(-50%, 0);
  animation: dlGlow 3s ease-in-out infinite;
}
.dl-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.1rem; padding: 0; list-style: none; color: #cfd4de; font: 600 .82rem/1.3 var(--display); }
.dl-trust li { display: inline-flex; align-items: center; gap: .35rem; }
.dl-trust .ico { width: 1rem; height: 1rem; color: var(--green); }
.dl-note { display: flex; gap: .5rem; max-width: 34ch; color: var(--muted); font-size: .84rem; line-height: 1.6; text-align: left; }
.dl-note .ico { margin-top: .2rem; width: 1rem; height: 1rem; color: var(--gold); }

/* the 3D layered button: shadow layer + edge layer + front face */
.dl3d {
  position: relative; display: block; width: 100%; max-width: 360px; padding: 0; border: 0; border-radius: 18px;
  background: none; color: #1d1f27; text-decoration: none; cursor: pointer; isolation: isolate;
  -webkit-tap-highlight-color: transparent; outline-offset: 8px; user-select: none;
}
.dl3d:hover { color: #1d1f27; }
.dl3d::before {
  content: ""; position: absolute; inset: -7px -7px -3px; z-index: -1; border-radius: 24px;
  border: 2px solid #fcb90080; opacity: 0; animation: dlPulse 2.6s ease-out infinite;
}
.dl3d-shadow {
  position: absolute; inset: 0; border-radius: inherit; background: #000000a6; filter: blur(6px);
  transform: translateY(6px); transition: transform .55s cubic-bezier(.3, .7, .4, 1.5); will-change: transform;
}
.dl3d-edge {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, #7a4f00 0%, #b57e00 8%, #c98d00 50%, #b57e00 92%, #7a4f00 100%);
}
.dl3d-front {
  position: relative; display: flex; align-items: center; gap: 1rem; overflow: hidden;
  padding: 1rem 1.4rem 1rem 1rem; border-radius: inherit;
  background: linear-gradient(180deg, #ffd65c 0%, #fcb900 55%, #f2a900 100%);
  box-shadow: inset 0 1px 0 #fff3c4, inset 0 -2px 0 #00000014;
  transform: translateY(-8px); transition: transform .55s cubic-bezier(.3, .7, .4, 1.5); will-change: transform;
}
.dl3d-front::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, #ffffffa6, transparent); transform: skewX(-20deg);
  animation: dlShine 3.4s ease-in-out infinite;
}
.dl3d-icon {
  position: relative; display: grid; place-items: center; width: 54px; height: 54px; flex: none; overflow: hidden;
  border-radius: 14px; background: linear-gradient(180deg, #2a2e39, #1a1c24); color: var(--gold);
  box-shadow: inset 0 -3px 0 #00000080, inset 0 1px 0 #ffffff1f;
}
.dl3d-icon .ico { width: 1.55rem; height: 1.55rem; stroke-width: 2.4; animation: dlBob 1.8s ease-in-out infinite; }
.dl3d-label { display: grid; gap: .2rem; text-align: left; }
.dl3d-label strong { color: #1d1f27; font: 800 1.2rem/1.1 var(--display); letter-spacing: -.01em; }
.dl3d-label small { color: #3b3420; font: 600 .78rem/1.2 var(--display); }
.dl3d:hover .dl3d-front { transform: translateY(-11px); transition-duration: .25s; }
.dl3d:hover .dl3d-shadow { transform: translateY(10px); transition-duration: .25s; }
.dl3d:hover .dl3d-icon .ico { animation: dlDrop .85s cubic-bezier(.5, 0, .5, 1) infinite; }
.dl3d:active .dl3d-front { transform: translateY(-2px); transition-duration: 40ms; }
.dl3d:active .dl3d-shadow { transform: translateY(2px); transition-duration: 40ms; }
.dl3d:focus-visible { outline: 2px solid var(--gold); }

@keyframes dlShine { 0%, 55% { left: -70%; } 100% { left: 130%; } }
@keyframes dlBob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@keyframes dlDrop { 0% { transform: translateY(-140%); opacity: 0; } 25% { opacity: 1; } 60% { transform: translateY(0); } 100% { transform: translateY(140%); opacity: 0; } }
@keyframes dlPulse { 0% { opacity: .9; transform: scale(.97); } 80%, 100% { opacity: 0; transform: scale(1.07); } }
@keyframes dlGlow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

/* other files */
.dl-files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.dl-files a {
  display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-strong); text-decoration: none;
  transition: border-color .25s, transform .25s var(--ease), background-color .25s;
}
.dl-files a:hover { border-color: var(--gold-line); color: var(--text-strong); transform: translateY(-3px); }
.dl-files .card-icon { width: 44px; height: 44px; flex: none; }
.dl-files .card-icon .ico { width: 1.2rem; height: 1.2rem; }
.dl-files a > span:nth-child(2) { display: grid; gap: .2rem; min-width: 0; }
.dl-files strong { font: 600 .95rem/1.3 var(--display); }
.dl-files small { color: var(--muted); font-size: .82rem; }
.dl-files a > .ico:last-child { margin-left: auto; width: 1rem; height: 1rem; color: var(--faint); transition: color .2s; }
.dl-files a:hover > .ico:last-child { color: var(--gold); }

@media (max-width: 960px) {
  .dl-card { grid-template-columns: minmax(0, 1fr); }
  .dl-action { border-left: 0; border-top: 1px solid var(--line-soft); }
  .dl-files { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .dl-product { align-items: flex-start; }
  .dl-product img { width: 60px; height: 60px; }
  .dl-specs { gap: .5rem; }
  .dl-specs > div { padding: .65rem .7rem; }
  .dl-specs dt { font-size: .62rem; letter-spacing: .05em; }
  .dl-specs dd { font-size: .86rem; }
  .dl-badges { gap: .35rem; }
  .dl3d-front { padding: .9rem 1.1rem .9rem .9rem; gap: .85rem; }
  .dl3d-icon { width: 48px; height: 48px; }
  .dl3d-label strong { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dl3d::before, .dl3d-front::after, .dl3d-icon .ico, .dl-stage::before { animation: none !important; }
}
