/* ezkeep website. Tokens come from the ezkeep design system (docs/DESIGN.md). */

@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --background: #F7F5FC;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-high: #EEEAF7;
  --border: #E3DEEF;
  --border-strong: #8A82A2;
  --text: #0F0C1B;
  --text-secondary: #3A3450;
  --text-muted: #625B78;
  --brand: #7F00FF;
  --on-brand: #FFFFFF;
  --accent: #7F00FF;
  --accent-soft: #EFE6FF;
  --note-back: #B98CFF;
  --note-shadow: #2C0059;
  --online: #047857;
  --warning: #A84D06;
  --danger: #C62828;
  --shadow-float: 0 8px 24px rgba(44, 0, 89, 0.14);
  /* Website only: the deep band behind the security section and the footer. */
  --band: #0F0C1B;
  --band-surface: #171327;
  --band-border: #2A2440;
  --band-text: #F8F7FF;
  --band-muted: #CEC8DE;
  --band-accent: #B98CFF;

  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --gutter: 16px;
  --max: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0F0C1B;
    --surface: #171327;
    --surface-raised: #1D1830;
    --surface-high: #241E3A;
    --border: #2A2440;
    --border-strong: #6F668C;
    --text: #F8F7FF;
    --text-secondary: #CEC8DE;
    --text-muted: #9C94B2;
    --brand: #8B22FF;
    --accent: #B98CFF;
    --accent-soft: #2B1A52;
    --note-back: #A469FF;
    --online: #34D399;
    --warning: #F5B047;
    --danger: #F2847C;
    --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);
    --band: #130F22;
    --band-surface: #1D1830;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0F0C1B;
  --surface: #171327;
  --surface-raised: #1D1830;
  --surface-high: #241E3A;
  --border: #2A2440;
  --border-strong: #6F668C;
  --text: #F8F7FF;
  --text-secondary: #CEC8DE;
  --text-muted: #9C94B2;
  --brand: #8B22FF;
  --accent: #B98CFF;
  --accent-soft: #2B1A52;
  --note-back: #A469FF;
  --online: #34D399;
  --warning: #F5B047;
  --danger: #F2847C;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);
  --band: #130F22;
  --band-surface: #1D1830;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-high); padding: 1px 6px; border-radius: var(--radius-xs); color: var(--text-secondary); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.ms { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; display: inline-block; white-space: nowrap; font-size: 22px; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; -webkit-font-feature-settings: "liga"; user-select: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-md); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--accent);
}
.section { padding: 96px 0; }
@media (max-width: 719px) { .section { padding: 64px 0; } }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 700; margin-top: 12px; }
.section-head p { color: var(--text-secondary); font-size: 19px; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none !important;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}
.btn .ms { font-size: 20px; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface-high); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 0 12px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-high); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.nav-links { display: flex; gap: 4px; margin: 0 auto 0 16px; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-high); text-decoration: none; }
.nav-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; min-width: 40px; padding: 0 10px;
  border-radius: var(--radius-md); border: 0; background: transparent;
  color: var(--text-secondary); font: 600 13px/1 var(--mono); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-high); color: var(--text); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.menu-btn { display: none; }
@media (max-width: 899px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav .nav-cta { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    margin: 0; padding: 8px var(--gutter) 16px; background: var(--background); border-bottom: 1px solid var(--border);
  }
  .nav-links.open a { padding: 12px; font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin-top: 18px; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-secondary); margin-top: 24px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; color: var(--text-muted); font-size: 14px; }
.hero-meta .ms { font-size: 18px; color: var(--online); vertical-align: -4px; margin-right: 4px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface);
  font-size: 14px; color: var(--text-secondary);
}
.pill b { background: var(--accent-soft); color: var(--accent); font: 500 12px/1 var(--mono); padding: 5px 8px; border-radius: var(--radius-full); }

.hero-visual { position: relative; min-height: 600px; }
.hero-visual .sheet {
  position: absolute; border-radius: 30%;
}
.hero-visual .sheet.back { width: 300px; height: 300px; background: var(--accent-soft); top: 0; right: 30px; }
.hero-visual .sheet.front { width: 220px; height: 220px; background: var(--note-back); opacity: 0.35; bottom: 40px; left: 10px; }
.hero-visual .phone { position: absolute; }
.hero-visual .phone.p1 { left: 8%; top: 40px; z-index: 2; }
.hero-visual .phone.p2 { right: 4%; top: 0; z-index: 1; transform: scale(0.92); transform-origin: top right; }
.float-card {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-float); font-size: 14px; white-space: nowrap;
}
.float-card .ms { color: var(--online); font-size: 22px; }
.float-card small { display: block; color: var(--text-muted); font: 12px/1.4 var(--mono); }
.float-card.f1 { left: 0; bottom: 70px; }
.float-card.f2 { right: 0; bottom: 150px; }
.float-card.f2 .ms { color: var(--accent); }
@media (max-width: 979px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 560px; max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 520px) {
  .hero-visual { min-height: 470px; }
  .hero-visual .phone.p2 { display: none; }
  .hero-visual .phone.p1 { left: 50%; transform: translateX(-50%); top: 10px; }
  .float-card.f1 { left: 0; bottom: 30px; }
  .float-card.f2 { right: 0; bottom: 110px; }
}

/* ---------- Phone frame ---------- */
.phone {
  --w: 270px;
  width: var(--w); aspect-ratio: 9 / 20;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.15);
  background: #0A0812;
  box-shadow: 0 0 0 1px #2A2440 inset, 0 30px 60px -20px rgba(44, 0, 89, 0.35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--w) * 0.12); background: var(--surface); }
.phone.sm { --w: 230px; }
@media (max-width: 520px) { .phone { --w: 230px; } }

/* ---------- Platforms strip ---------- */
.platforms { padding: 24px 0 8px; }
.platforms-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 36px; color: var(--text-muted); font-size: 15px; }
.platforms-inner span.label { font-family: var(--mono); font-size: 13px; }
.platforms-inner .os { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-weight: 500; }
.platforms-inner .os i { font-size: 20px; }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.principle { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.principle h3 { font-size: 20px; font-weight: 600; margin-top: 20px; }
.principle p { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }
@media (max-width: 899px) { .principles { grid-template-columns: 1fr; } }

/* Note tile: the brand motif (a sheet with a folded corner). */
.note {
  --s: 52px;
  position: relative; width: var(--s); height: var(--s); border-radius: 30%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.note .ms { font-size: calc(var(--s) * 0.46); }
/* The fold: the flap (note-back) over the cut corner, which shows the ground behind the tile. */
.note::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 30%; height: 30%;
  background: linear-gradient(135deg, var(--note-back) 0 50%, var(--note-ground, var(--background)) 50% 100%);
  border-top-left-radius: 22%;
}
.principle .note, .step .note { --note-ground: var(--surface); }
.chip-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- Features ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--border); }
.feature.reverse .feature-media { order: -1; }
.feature h3 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; margin-top: 12px; }
.feature .desc { color: var(--text-secondary); font-size: 18px; margin-top: 16px; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--text-secondary); font-size: 16px; }
.checks li .ms { color: var(--accent); font-size: 22px; margin-top: 1px; }
.checks li b { color: var(--text); font-weight: 600; }
.feature-media { position: relative; display: flex; justify-content: center; gap: 20px; padding: 40px 0; }
.feature-media::before {
  content: ""; position: absolute; inset: 0 6%; border-radius: 48px; background: var(--accent-soft); z-index: 0;
}
.feature-media .phone { position: relative; z-index: 1; }
.feature-media .phone + .phone { margin-top: 64px; }
@media (max-width: 899px) {
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .feature.reverse .feature-media { order: 0; }
}
@media (max-width: 560px) {
  .feature-media .phone + .phone { display: none; }
  .feature-media::before { inset: 0; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.step .num { font: 500 13px/1 var(--mono); color: var(--accent); }
.step h3 { font-size: 20px; font-weight: 600; margin-top: 18px; }
.step p { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }
@media (max-width: 899px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Diagram frame ---------- */
.diagram {
  margin-top: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  overflow-x: auto;
}
.diagram svg { display: block; width: 100%; height: auto; min-width: 560px; }
.diagram figcaption { margin-top: 14px; color: var(--text-muted); font-size: 14px; }
/* SVG classes share the theme tokens. */
.d-box { fill: var(--surface-high); stroke: var(--border-strong); stroke-width: 1.2; }
.d-box-soft { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.d-box-brand { fill: var(--brand); stroke: none; }
.d-band { fill: var(--background); stroke: var(--border); stroke-width: 1; stroke-dasharray: 5 5; }
.d-line { stroke: var(--text-muted); stroke-width: 1.6; fill: none; }
.d-line-accent { stroke: var(--accent); stroke-width: 2; fill: none; }
.d-line-ok { stroke: var(--online); stroke-width: 2; fill: none; }
.d-dash { stroke-dasharray: 6 5; }
.d-life { stroke: var(--border-strong); stroke-width: 1.2; stroke-dasharray: 3 5; }
.d-text { fill: var(--text); font: 600 14px var(--sans); }
.d-text-on { fill: var(--on-brand); font: 600 14px var(--sans); }
.d-sub { fill: var(--text-muted); font: 12px var(--sans); }
.d-mono { fill: var(--text-secondary); font: 12px var(--mono); }
.d-mono-accent { fill: var(--accent); font: 500 12px var(--mono); }
.d-mono-ok { fill: var(--online); font: 500 12px var(--mono); }
.d-arrow { fill: var(--text-muted); }
.d-arrow-accent { fill: var(--accent); }
.d-arrow-ok { fill: var(--online); }
.d-ic { font-family: "Material Symbols Rounded"; font-size: 22px; fill: var(--accent); }

/* ---------- Security band ---------- */
.band { background: var(--band); color: var(--band-text); position: relative; overflow: hidden; }
.band .eyebrow { color: var(--band-accent); }
.band .section-head p { color: var(--band-muted); }
/* The logo's two sheets, large and faint, behind the security section. */
.band::before, .band::after { content: ""; position: absolute; border-radius: 30%; pointer-events: none; }
.band::before { width: 420px; height: 420px; background: #B98CFF; opacity: 0.07; right: 4%; top: 56px; }
.band::after { width: 420px; height: 420px; background: #8B22FF; opacity: 0.14; right: calc(4% - 90px); top: 150px; }
@media (max-width: 899px) { .band::before, .band::after { display: none; } }
.band .wrap { position: relative; z-index: 1; }
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sec-card { padding: 28px; border: 1px solid var(--band-border); border-radius: var(--radius-xl); background: var(--band-surface); }
.sec-card .top { display: flex; align-items: center; gap: 14px; }
.sec-card .ic { width: 44px; height: 44px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; background: #2B1A52; color: #B98CFF; }
.sec-card h3 { font-size: 19px; font-weight: 600; }
.sec-card p { color: var(--band-muted); margin-top: 14px; font-size: 16px; }
.sec-card .spec { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.sec-card .spec span { font: 500 12px/1 var(--mono); color: #CEC8DE; border: 1px solid var(--band-border); padding: 7px 10px; border-radius: var(--radius-full); }
.band-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.band .btn-outline { color: var(--band-text); border-color: #6F668C; }
.band .btn-outline:hover { background: #241E3A; }
@media (max-width: 899px) { .sec-grid { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.tab {
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-full); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-secondary); font: 500 15px/1 var(--sans); cursor: pointer;
}
.tab:hover { background: var(--surface-high); }
.tab[aria-selected="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.gallery { display: flex; gap: 24px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery[hidden] { display: none; }
.gallery figure { margin: 0; scroll-snap-align: center; flex-shrink: 0; }
.gallery figcaption { margin-top: 14px; text-align: center; color: var(--text-muted); font-size: 14px; }
.gallery-wrap { display: flex; justify-content: center; }
@media (min-width: 1100px) { .gallery { justify-content: center; overflow: visible; } }

/* ---------- Download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.dl-card {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.dl-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dl-card .os-ic { font-size: 30px; color: var(--text); height: 36px; }
.dl-card h3 { font-size: 18px; font-weight: 600; margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dl-card h3 .tag { white-space: nowrap; }
.dl-card .req { color: var(--text-muted); font-size: 13px; }
.dl-card .files { display: grid; gap: 8px; margin-top: 16px; }
.dl-card .files .btn { width: 100%; min-height: 44px; font-size: 14px; padding: 8px 12px; text-align: center; line-height: 1.25; }
.dl-card .soon { font: 500 12px/1 var(--mono); color: var(--text-muted); margin-top: auto; padding-top: 10px; }
.dl-note { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; margin-top: 32px; color: var(--text-muted); font-size: 15px; }
.dl-note span { display: inline-flex; align-items: center; gap: 6px; }
.dl-note .ms { font-size: 18px; color: var(--online); }
.tag { font: 500 10px/1 var(--mono); letter-spacing: 0.04em; padding: 4px 6px; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
@media (max-width: 1079px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 719px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ms { color: var(--text-muted); transition: transform 150ms var(--ease); }
.faq details[open] summary .ms { transform: rotate(45deg); color: var(--accent); }
.faq details > div { padding: 0 22px 22px; color: var(--text-secondary); font-size: 16px; }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Final CTA ---------- */
.cta-final { text-align: center; }
.cta-final .note { --s: 72px; margin-bottom: 24px; }
.cta-final h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; }
.cta-final p { color: var(--text-secondary); font-size: 19px; margin: 16px auto 0; max-width: 560px; }
.cta-final .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; color: var(--text-muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 13px; font-family: var(--mono); font-weight: 500; color: var(--text-secondary); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--text); }
.footer-grid .brand img { height: 26px; }
.footer-grid .tagline { margin-top: 14px; max-width: 300px; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 719px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Document pages (technology, privacy) ---------- */
.doc-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border); }
.doc-hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; margin-top: 14px; }
.doc-hero p { color: var(--text-secondary); font-size: 19px; margin-top: 16px; max-width: 720px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding: 56px 0 96px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc h4 { font: 500 12px/1 var(--mono); color: var(--text-muted); margin-bottom: 14px; letter-spacing: 0.04em; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-secondary); border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface-high); text-decoration: none; color: var(--text); }
.toc a.active { color: var(--accent); background: var(--accent-soft); }
.prose { max-width: 780px; }
.prose section + section { margin-top: 72px; }
.prose h2 { font-size: 30px; font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
.prose h2 .n { font: 500 14px/1 var(--mono); color: var(--accent); }
.prose h3 { font-size: 19px; font-weight: 600; margin-top: 32px; }
.prose p, .prose li { color: var(--text-secondary); font-size: 17px; }
.prose p { margin-top: 14px; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.callout {
  display: flex; gap: 14px; margin-top: 20px; padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--accent-soft); color: var(--text); font-size: 16px;
}
.callout .ms { color: var(--accent); }
.callout.warn { background: var(--surface-high); }
.callout.warn .ms { color: var(--warning); }
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font: 500 12px/1.4 var(--mono); color: var(--text-muted); letter-spacing: 0.03em; background: var(--surface-high); }
tr:last-child td { border-bottom: 0; }
td { color: var(--text-secondary); }
td code { white-space: nowrap; }
.method { font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: var(--radius-xs); }
.method.get { background: color-mix(in srgb, var(--online) 16%, transparent); color: var(--online); }
.method.post { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 979px) {
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
.updated { font: 13px var(--mono); color: var(--text-muted); margin-top: 18px; }
