/* FundDesk marketing site — no external fonts or frameworks. */

:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --bg-soft: #eef2fa;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --ink: #101a2b;
  --ink-2: #35415a;
  --muted: #66738b;
  --line: #e1e6f0;
  --line-soft: #edf0f7;
  --brand: #3d63d6;
  --brand-strong: #2c4db3;
  --brand-soft: rgba(61, 99, 214, 0.09);
  --brand-line: rgba(61, 99, 214, 0.34);
  --gold: #d5a13f;
  --gold-soft: rgba(213, 161, 63, 0.13);
  --gold-ink: #8a6517;
  --band: #0b1b2d;
  --band-2: #0e2238;
  --band-ink: #eef3fc;
  --band-muted: #a7b6cb;
  --header: rgba(247, 248, 252, 0.82);
  --grid: rgba(15, 26, 43, 0.045);
  --frame-bg: linear-gradient(180deg, #ffffff, #f2f5fb);
  --frame-line: rgba(16, 26, 43, 0.1);
  --btn-bg: #101a2b;
  --btn-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 26, 43, 0.05), 0 8px 24px rgba(15, 26, 43, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 26, 43, 0.06), 0 18px 44px rgba(15, 26, 43, 0.1);
  --shadow-lg: 0 30px 80px rgba(15, 26, 43, 0.18);
  --radius: 16px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07131f;
    --bg-soft: #0b1b2c;
    --surface: #0d1e31;
    --surface-2: #10253a;
    --ink: #e9effb;
    --ink-2: #c2cee0;
    --muted: #92a3bb;
    --line: #1b3349;
    --line-soft: #14293d;
    --brand: #86a5f7;
    --brand-strong: #a9c1ff;
    --brand-soft: rgba(126, 162, 245, 0.13);
    --brand-line: rgba(134, 165, 247, 0.42);
    --gold: #e0b45c;
    --gold-soft: rgba(224, 180, 92, 0.14);
    --gold-ink: #f0c874;
    --band: #06101c;
    --band-2: #0a1a2b;
    --band-ink: #e9effb;
    --band-muted: #94a7bf;
    --header: rgba(7, 19, 31, 0.82);
    --grid: rgba(255, 255, 255, 0.04);
    --frame-bg: linear-gradient(180deg, #12283f, #0a1a2b);
    --frame-line: rgba(255, 255, 255, 0.12);
    --btn-bg: #e9effb;
    --btn-ink: #07131f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.26), 0 18px 44px rgba(0, 0, 0, 0.36);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07131f;
  --bg-soft: #0b1b2c;
  --surface: #0d1e31;
  --surface-2: #10253a;
  --ink: #e9effb;
  --ink-2: #c2cee0;
  --muted: #92a3bb;
  --line: #1b3349;
  --line-soft: #14293d;
  --brand: #86a5f7;
  --brand-strong: #a9c1ff;
  --brand-soft: rgba(126, 162, 245, 0.13);
  --brand-line: rgba(134, 165, 247, 0.42);
  --gold: #e0b45c;
  --gold-soft: rgba(224, 180, 92, 0.14);
  --gold-ink: #f0c874;
  --band: #06101c;
  --band-2: #0a1a2b;
  --band-ink: #e9effb;
  --band-muted: #94a7bf;
  --header: rgba(7, 19, 31, 0.82);
  --grid: rgba(255, 255, 255, 0.04);
  --frame-bg: linear-gradient(180deg, #12283f, #0a1a2b);
  --frame-line: rgba(255, 255, 255, 0.12);
  --btn-bg: #e9effb;
  --btn-ink: #07131f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.26), 0 18px 44px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: rgba(61, 99, 214, 0.22);
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.skip:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(15, 26, 43, 0.02);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(11, 27, 45, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-text small {
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.nav a {
  padding: 6px 0;
  transition: color 0.15s ease;
}

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

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

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: block;
  }
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-close {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 10px 24px rgba(15, 26, 43, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 26, 43, 0.26);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  color: var(--brand);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13.5px;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 52px;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(61, 99, 214, 0.13), transparent 62%),
    radial-gradient(720px 460px at 4% 4%, rgba(213, 161, 63, 0.1), transparent 62%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 72%);
  mask-image: linear-gradient(180deg, #000, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  color: var(--muted);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 4.35vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(100deg, #2c4db3 0%, #5b7fe8 58%, #8aa5f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="dark"] .grad {
  background: linear-gradient(100deg, #9db9ff 0%, #c3d3ff 58%, #e4c27a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grad {
    background: linear-gradient(100deg, #9db9ff 0%, #c3d3ff 58%, #e4c27a 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.lede {
  max-width: 560px;
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 14px;
}

.cta-row.center {
  justify-content: center;
}

.cta-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  padding: 6px 0;
}

.hero-visual .glow {
  position: absolute;
  inset: 8% -6% -8%;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 60% 40%, rgba(61, 99, 214, 0.22), transparent 70%),
    radial-gradient(40% 40% at 82% 82%, rgba(213, 161, 63, 0.16), transparent 70%);
  filter: blur(22px);
}

.shot-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--frame-line);
  border-radius: 18px;
  background: var(--frame-bg);
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shot-frame:hover {
  transform: translateY(-3px);
}

.shot-frame img {
  width: 100%;
  border-radius: 11px;
}

.hero-shot {
  animation: hero-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 11.5px;
  color: var(--muted);
  animation: float 6s ease-in-out infinite;
}

.float-chip strong {
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.float-chip .chip-k {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 9.5px;
  color: var(--muted);
}

.float-chip .chip-d {
  color: var(--muted);
}

.chip-a {
  top: -18px;
  right: -14px;
}

.chip-b {
  bottom: -22px;
  left: -22px;
  animation-delay: -3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 56px 0 0;
  padding: 22px 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.stats li:first-child {
  border-left: 0;
}

.stats strong {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stats span {
  font-size: 12.5px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 96px 0;
}

.section-head {
  max-width: 740px;
  margin-bottom: 42px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-head .eyebrow {
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}

.section-head p {
  margin: 0;
  font-size: 15.5px;
  color: var(--muted);
}

.section-head code,
.muted-code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.9em;
}

/* Features */
.features {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* Gallery */
.screens {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.g-item {
  position: relative;
  grid-column: span 4;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.g-item.g-hero {
  grid-column: span 12;
}

.g-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.g-item img {
  width: 100%;
  transition: transform 0.45s ease;
}

.g-item:hover img {
  transform: scale(1.015);
}

.g-item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 38px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(5, 13, 24, 0.78));
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}

.g-item figcaption span {
  font-size: 11.5px;
  opacity: 0.72;
}

/* Local-first band */
.local-band {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  background:
    radial-gradient(700px 380px at 92% 0%, rgba(61, 99, 214, 0.24), transparent 65%),
    radial-gradient(560px 320px at 0% 100%, rgba(213, 161, 63, 0.13), transparent 65%),
    var(--band);
  color: var(--band-ink);
}

.local-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  pointer-events: none;
}

.band-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.eyebrow.light {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: #c8d4e4;
}

.band-copy h2 {
  margin: 16px 0 16px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.band-copy p {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--band-muted);
}

.text-link {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 14px;
}

.text-link:hover {
  border-color: #fff;
}

.band-grid {
  display: grid;
  gap: 14px;
}

.band-item {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.band-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #fff;
}

.band-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--band-muted);
}

/* Download */
.download {
  position: relative;
}

.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dl-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dl-card.is-current {
  border-color: rgba(213, 161, 63, 0.55);
  box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-sm);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.dl-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink);
}

.dl-logo svg {
  width: 22px;
  height: 22px;
}

.dl-head h3 {
  margin: 0;
  font-size: 18px;
}

.dl-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.rec {
  display: none;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgba(213, 161, 63, 0.35);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 11px;
}

.dl-card.is-current .rec {
  display: inline-block;
}

.dl-card .btn {
  justify-content: space-between;
  margin-bottom: 18px;
}

.btn-size {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.68;
}

.dl-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.dl-meta li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dl-meta svg {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  flex: 0 0 auto;
  color: var(--brand);
}

.dl-foot {
  margin-top: 26px;
}

.dl-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.dl-note a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

details.help {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

details.help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

details.help summary::-webkit-details-marker {
  display: none;
}

details.help summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
}

details.help[open] summary::after {
  content: "−";
}

details.help p {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* FAQ */
.faq {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.faq-list {
  max-width: 840px;
  margin: 0 auto;
}

.faq details {
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}

.faq details:first-child {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  list-style: none;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 720px;
  margin: 10px 0 2px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.faq details a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  padding: 60px 0 28px;
  background: var(--band);
  color: var(--band-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand .brand-text strong {
  color: #fff;
}

.footer-brand .brand-text small {
  color: #8fa3bd;
}

.footer-brand p {
  max-width: 330px;
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--band-muted);
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fa3bd;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  color: #c6d2e2;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
  font-size: 12px;
  color: #8fa3bd;
}

.footer-bottom p {
  margin: 0;
}

/* Doc pages */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(61, 99, 214, 0.1), transparent 65%),
    var(--bg);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.page-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.doc-section {
  padding: 48px 0 88px;
}

.doc-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 118px);
  padding-left: 18px;
  overflow: auto;
  border-left: 1px solid var(--line);
  font-size: 13px;
}

.doc-toc h2 {
  margin: 0 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-toc a {
  display: block;
  padding: 5px 0;
  line-height: 1.5;
  color: var(--muted);
}

.doc-toc a:hover,
.doc-toc a.is-active {
  color: var(--brand);
}

.doc-toc a.is-active {
  font-weight: 600;
}

.doc-body {
  min-width: 0;
  max-width: 860px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.doc-toc {
  min-width: 0;
}

.doc-body > *:first-child {
  margin-top: 0;
}

.doc-body h2 {
  margin: 56px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.doc-body h3 {
  margin: 34px 0 12px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
}

.doc-body h4 {
  margin: 26px 0 10px;
  font-size: 16px;
  color: var(--ink);
}

.doc-body p {
  margin: 0 0 16px;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.doc-body li {
  margin: 6px 0;
}

.doc-body li > ul,
.doc-body li > ol {
  margin: 6px 0 0;
}

.doc-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.doc-body a:hover {
  color: var(--brand-strong);
}

.doc-body strong {
  color: var(--ink);
}

.doc-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.doc-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #0b1b2d;
  color: #dbe6f4;
  line-height: 1.7;
}

.doc-body pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: 13px;
}

.doc-body blockquote {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: var(--gold-soft);
  color: var(--ink-2);
}

.doc-body blockquote p:last-child {
  margin-bottom: 0;
}

.doc-body hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-body .table-wrap {
  max-width: 100%;
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

.doc-body th,
.doc-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.doc-body tr:last-child td {
  border-bottom: 0;
}

.doc-body figure {
  margin: 26px 0 30px;
}

.doc-body img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}

.doc-body figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  text-align: center;
  color: var(--muted);
}

.doc-end {
  margin-top: 52px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.doc-end h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 19px;
}

.doc-end p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Changelog */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.release {
  position: relative;
  padding-bottom: 44px;
}

.release::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -30px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.release.latest::before {
  border-color: var(--gold);
  background: var(--gold);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}

.release h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.release time {
  font-size: 13px;
  color: var(--muted);
}

.badge-latest {
  padding: 2px 8px;
  border: 1px solid rgba(213, 161, 63, 0.35);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 10.5px;
}

.release ul {
  margin: 14px 0 10px;
  padding-left: 20px;
}

.release li {
  margin: 7px 0;
  color: var(--ink-2);
}

.release .gh-link {
  font-size: 12.5px;
  color: var(--brand);
}

.release .gh-link:hover {
  text-decoration: underline;
}

/* 404 */
.notfound {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 80px 0;
  text-align: center;
}

.notfound-code {
  font-size: clamp(80px, 16vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  background: linear-gradient(120deg, var(--brand), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound h1 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.notfound p {
  margin: 0 0 26px;
  color: var(--muted);
}

/* Lightbox */
dialog.lightbox {
  width: min(1200px, 94vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

dialog.lightbox::backdrop {
  background: rgba(4, 10, 18, 0.84);
  backdrop-filter: blur(6px);
}

.lightbox-inner {
  position: relative;
}

.lightbox img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  background: #0b1b2d;
}

.lightbox-cap {
  margin: 10px 0 0;
  font-size: 13px;
  text-align: center;
  color: #c8d4e4;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(5, 13, 24, 0.68);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    max-width: 780px;
    margin: 0 auto;
  }

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

  .band-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .doc-shell {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 960px) {
  .nav {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(15, 26, 43, 0.12);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line-soft);
  }

  .menu-toggle {
    display: grid;
  }

  .doc-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .doc-toc {
    position: static;
    max-height: none;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .doc-toc h2 {
    margin-bottom: 8px;
  }

  .doc-toc a {
    display: inline-block;
    margin-right: 14px;
    padding: 4px 0;
  }
}

@media (max-width: 860px) {
  .g-item {
    grid-column: span 6;
  }

  .dl-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .float-chip {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    padding: 40px 0 36px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.5vw, 48px);
  }

  .lede {
    font-size: 15.5px;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 40px;
  }

  .stats li {
    padding: 12px 0;
    border-left: 0;
  }

  .stats li:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .g-item,
  .g-item.g-hero {
    grid-column: span 12;
  }

  .local-band {
    padding: 64px 0;
  }

  .dl-card {
    padding: 22px;
  }

  .dl-head {
    flex-wrap: wrap;
  }

  .rec {
    margin-left: 0;
  }

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

  .page-hero {
    padding: 40px 0 30px;
  }

  .doc-section {
    padding: 32px 0 64px;
  }

  .doc-body {
    font-size: 15px;
  }

  .doc-body h2 {
    font-size: 22px;
  }

  .timeline {
    padding-left: 24px;
  }

  .release::before {
    left: -24px;
  }
}

@media (max-width: 480px) {
  .header-dl {
    display: none;
  }

  .cta-meta {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

@media print {
  .site-header,
  .site-footer,
  .doc-toc,
  .doc-end {
    display: none;
  }

  .page-hero {
    padding: 0 0 20px;
    background: none;
  }

  .doc-section {
    padding: 0;
  }

  .doc-shell {
    display: block;
  }
}
