/*
  reader.tobestbooks.com — "Paper & Ink" design system.
  Every value used on the site comes from the tokens below; components never use raw colours or sizes.
  The token table and component rules are documented in site/reader/DESIGN.md.
*/

/* ---------- 1. Tokens */
:root {
  /* Colour: paper and ink, with the TOBESTBOOKS 2안 chocolate brown as the only accent (same as the app). */
  --paper: #FAF8F3;
  --paper-2: #F3EEE4;
  --surface: #FFFFFF;
  --ink: #2B2B2B;
  --ink-2: #5E574F;
  --ink-3: #736B61;
  --line: #E6DFD3;
  --line-strong: #D3C9B9;
  --brand: #784A2A;
  --brand-hover: #623B20;
  --brand-ink: #FAF8F3;
  --brand-soft: #F1E5D8;
  --brand-text: #784A2A;
  --focus: #2F5D8A;
  --shadow-1: 0 1px 2px rgb(60 36 18 / .06), 0 2px 8px rgb(60 36 18 / .06);
  --shadow-2: 0 2px 6px rgb(60 36 18 / .08), 0 18px 48px rgb(60 36 18 / .16);

  /* Night band: always dark, the app's dark reading colours. Used for one feature band per page. */
  --night: #17110D;
  --night-2: #221913;
  --night-line: #3A2E25;
  --night-ink: #F3EBDF;
  --night-ink-2: #C8B9A6;
  --night-accent: #D9AC84;
  /* Hero wash */
  --wash: radial-gradient(1200px 520px at 50% 0%, #F1E5D8 0%, rgb(241 229 216 / 0) 70%);

  /* Type */
  --font-sans: "Pretendard", system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  /* Serif for Latin display text; Hangul falls through to the sans faces after Georgia. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, var(--font-sans);
  --fs-xs: 13px;
  --fs-sm: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: clamp(28px, 3.6vw, 38px);
  --fs-3xl: clamp(36px, 6.2vw, 62px);
  --lh-tight: 1.15;
  --lh-snug: 1.4;
  --lh-body: 1.75;

  /* Space (4-point scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Layout */
  --max: 1120px;
  --max-text: 680px;
  --gutter: 16px;
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 180ms;

  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 72px; } }

/* Dark: the app's dark brand pair (#C9976B on #1E1611). */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1611;
    --paper-2: #261C16;
    --surface: #2C221B;
    --ink: #EEE6DA;
    --ink-2: #C2B5A4;
    --ink-3: #94877A;
    --line: #3A2E25;
    --line-strong: #4D3E32;
    --brand: #C9976B;
    --brand-hover: #D9AC84;
    --brand-ink: #1E1611;
    --brand-soft: #3A2A1E;
    --brand-text: #D9AC84;
    --focus: #8FB6DD;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-2: 0 2px 6px rgb(0 0 0 / .3), 0 18px 48px rgb(0 0 0 / .45);
    --night: #120D0A;
    --night-2: #1B1410;
    --wash: radial-gradient(1200px 520px at 50% 0%, #3A2A1E 0%, rgb(58 42 30 / 0) 70%);
    color-scheme: dark;
  }
}

/* ---------- 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-md); line-height: var(--lh-body);
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[lang="en"] h1, [lang="en"] h2, [lang="en"] .display { letter-spacing: -0.01em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-3); top: -100px; z-index: 100; padding: var(--s-3) var(--s-4); background: var(--brand); color: var(--brand-ink); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--s-3); }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--max-text); }
/* Grid children may shrink below their content width (no horizontal page scroll on phones). */
.device-row > *, .formats-grid > *, .format-card > *, .sync-band > *, .show-row > *, .faq-layout > *, .download-grid > *, .guide-layout > *, .steps > * { min-width: 0; }

/* ---------- 3. Typography roles */
.display { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.22; }
.subtitle { font-size: var(--fs-lg); font-weight: 600; line-height: var(--lh-snug); }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.7; color: var(--ink-2); }
.body-sm { font-size: var(--fs-sm); line-height: 1.65; color: var(--ink-2); }
.caption { font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.num { font-family: var(--font-display); font-variant-numeric: lining-nums; }

/* ---------- 4. Buttons, chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 var(--s-3); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--fs-md); }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-xs); }
.btn[aria-disabled="true"] { background: var(--paper-2); color: var(--ink-3); border-color: var(--line); cursor: default; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
.badge { display: inline-block; padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }

/* ---------- 5. Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: var(--s-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 22%; box-shadow: var(--shadow-1); }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
.brand-name span { font-family: var(--font-display); font-weight: 600; font-style: italic; color: var(--brand-text); letter-spacing: 0; margin-left: 2px; }
.site-nav ul { list-style: none; display: flex; gap: var(--s-1); }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-pill); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 899px) {
  .site-nav { display: none; }
  .header-actions .btn-primary { display: none; }
}

/* Language menu: <details> so it works without script. */
.lang-menu { position: relative; }
.lang-menu > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s-3);
  border-radius: var(--r-pill); color: var(--ink-2); font-size: var(--fs-sm); cursor: pointer; user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { background: var(--paper-2); color: var(--ink); }
.lang-menu svg { width: 18px; height: 18px; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; list-style: none; padding: var(--s-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.lang-menu li a { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.lang-menu li a:hover { background: var(--paper-2); }
.lang-menu li a[aria-current="true"]::after { content: "✓"; color: var(--brand-text); }

/* Mobile menu */
.menu-toggle { display: none; }
@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .mobile-nav { border-top: 1px solid var(--line); padding: var(--s-2) 0 var(--s-4); }
  .mobile-nav ul { list-style: none; display: grid; gap: 2px; }
  .mobile-nav a { display: block; padding: var(--s-3) var(--s-2); color: var(--ink); text-decoration: none; font-weight: 600; border-radius: var(--r-sm); }
  .mobile-nav a:hover { background: var(--paper-2); }
}
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* ---------- 6. Sections */
.section { padding: var(--s-9) 0; }
.section-tint { background: var(--paper-2); }
.section + .section:not(.section-tint) { border-top: 1px solid var(--line); }
.section-tint + .section { border-top: 0; }
.section-head { display: grid; gap: var(--s-4); max-width: 720px; margin-bottom: var(--s-7); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
@media (max-width: 767px) { .section { padding: var(--s-8) 0; } .section-head { margin-bottom: var(--s-6); } }

/* ---------- 7. Hero: centred copy above a three-device stage (computer, tablet, phone) */
.hero { padding: var(--s-8) 0 var(--s-8); overflow: hidden; background: var(--wash); }
.hero-copy { display: grid; gap: var(--s-5); justify-items: center; text-align: center; max-width: 860px; }
.hero-copy .lead { max-width: 640px; }
.hero-copy .display em { font-style: italic; color: var(--brand-text); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }
.hero .chips { justify-content: center; }
@media (min-width: 900px) { .hero { padding-top: var(--s-9); } }

.hero-stage { position: relative; margin: var(--s-8) auto 0; max-width: 1000px; padding: 0 6% 0 8%; }
.hero-stage .stage-desktop { position: relative; z-index: 1; }
.hero-stage .stage-tablet { position: absolute; z-index: 2; left: 0; bottom: -6%; width: 25%; }
.hero-stage .stage-phone { position: absolute; z-index: 3; right: 1%; bottom: -10%; width: 15%; }
@media (max-width: 599px) {
  .hero-stage { margin-top: var(--s-7); padding: 0 0 0 14%; }
  .hero-stage .stage-tablet { width: 34%; bottom: -14%; }
  .hero-stage .stage-phone { width: 22%; right: -2%; bottom: -18%; }
  .hero { padding-bottom: var(--s-9); }
}

/* Device frames. The desktop screenshot is a captured app window (own corners), so it only gets a shadow. */
.window img { width: 100%; height: auto; filter: drop-shadow(0 2px 4px rgb(40 24 12 / .14)) drop-shadow(0 22px 40px rgb(40 24 12 / .22)); }
.tablet { padding: 0; background: #1A1410; border-radius: 7% / 5.2%; box-shadow: var(--shadow-2), inset 0 0 0 1px rgb(255 255 255 / .1); }
.tablet img { width: 95.6%; margin: 2.2%; height: auto; border-radius: 5.2% / 3.9%; background: var(--paper); }
.tablet-land, .device-card-tablet .tablet, .format-media-tablet-land .tablet { border-radius: 5.2% / 7%; }
.device-card-tablet .tablet img { border-radius: 3.9% / 5.2%; }
.phone { position: relative; width: min(240px, 58vw); padding: 0; background: #17110D; border-radius: 16% / 7.4%; box-shadow: var(--shadow-2), inset 0 0 0 1px rgb(255 255 255 / .1); }
.phone img { width: 93.6%; margin: 3.2%; height: auto; border-radius: 13.5% / 6.2%; background: var(--paper); }
.device-card .phone { width: 100%; }

/* ---------- 8. Night band: devices + platforms + sync */
.band-night { background: var(--night); color: var(--night-ink); --ink: var(--night-ink); --ink-2: var(--night-ink-2); --brand-text: var(--night-accent); border-top: 0 !important; }
.band-night .section-head { max-width: 820px; }
.band-night .lead { color: var(--night-ink-2); }
.device-row { display: grid; gap: var(--s-6); align-items: end; }
@media (min-width: 900px) { .device-row { grid-template-columns: .55fr 1.3fr 1.5fr; gap: var(--s-6); } }
.device-card { margin: 0; display: grid; gap: var(--s-5); }
.device-card-media { display: flex; align-items: flex-end; justify-content: center; }
.device-card-phone .device-card-media .phone { width: min(200px, 52vw); }
@media (min-width: 900px) { .device-card-phone .device-card-media .phone { width: 100%; } }
.device-card figcaption { display: grid; gap: 2px; text-align: center; }
.device-card figcaption b { font-size: var(--fs-lg); color: var(--night-ink); }
.device-card figcaption span { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; color: var(--night-accent); }
.device-card figcaption p { font-size: var(--fs-sm); color: var(--night-ink-2); margin-top: var(--s-1); }
.device-card .window img { filter: drop-shadow(0 20px 40px rgb(0 0 0 / .5)); }

.platform-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-8); }
.platform { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--night-line); border-radius: var(--r-pill); background: var(--night-2); }
.platform svg { width: 18px; height: 18px; color: var(--night-accent); }
.platform b { font-size: var(--fs-sm); color: var(--night-ink); }
.platform small { font-size: 12px; color: var(--night-ink-2); }

.sync-band { display: grid; gap: var(--s-6); align-items: center; margin-top: var(--s-7); padding: var(--s-6); background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-xl); }
@media (min-width: 900px) { .sync-band { grid-template-columns: 1.1fr 1fr; padding: var(--s-7); } }
.sync-copy { display: grid; gap: var(--s-3); }
.sync-copy h3 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; color: var(--night-ink); }
.sync-copy p { color: var(--night-ink-2); }
.sync { width: 100%; display: grid; gap: var(--s-4); }
.sync-devices { display: flex; align-items: flex-end; justify-content: center; gap: var(--s-4); color: var(--night-accent); }
.sync-devices svg { height: 64px; width: auto; }
.sync-devices svg.lg { height: 84px; }
.sync-card { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); background: var(--night); border: 1px solid var(--night-line); border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--night-ink); }
.sync-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--night-accent); }
.sync-card span { color: var(--night-ink-2); }
@media (max-width: 479px) { .sync-band { padding: var(--s-5) var(--s-4); } .sync-devices svg { height: 48px; } .sync-devices svg.lg { height: 64px; } }

/* ---------- 8b. Formats: EPUB and PDF side by side */
.formats-grid { display: grid; gap: var(--s-5); }
@media (min-width: 1000px) { .formats-grid { grid-template-columns: 1fr 1.25fr; } }
.format-card { display: grid; gap: var(--s-6); align-content: space-between; padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.format-copy { display: grid; gap: var(--s-3); }
.format-badge { justify-self: start; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; padding: 3px 12px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); }
.format-card h3 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.3; }
.format-card p { color: var(--ink-2); }
.format-card ul { list-style: none; display: grid; gap: var(--s-2); }
.format-card li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: var(--fs-sm); }
.format-card li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 1.5px; background: var(--brand); }
.format-media { display: flex; justify-content: center; align-items: flex-end; padding: var(--s-6) var(--s-4) 0; margin: 0 calc(var(--s-6) * -1) calc(var(--s-6) * -1); background: var(--paper-2); }
.format-media-tablet .tablet { width: min(340px, 78%); margin-bottom: -18%; }
.format-media-desktop { padding: var(--s-6) 0 0 var(--s-6); justify-content: flex-start; }
.format-media-desktop .window { width: 112%; max-width: none; margin-bottom: -4%; }
.format-media { max-height: 440px; overflow: hidden; }
@media (max-width: 479px) { .format-card { padding: var(--s-5) var(--s-4); } .format-media { margin: 0 calc(var(--s-4) * -1) calc(var(--s-5) * -1); } }

/* Brand band (download) */
.band-brand { background: var(--brand-soft); border-top: 0 !important; }
.band-brand + .section { border-top: 0; }

/* ---------- 9. Feature grid */
.features { display: grid; gap: var(--s-4); }
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.feature:hover { border-color: var(--line-strong); }
.icon-tile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand-text); }
.icon-tile svg { width: 22px; height: 22px; }
.feature h3 { font-size: var(--fs-md); line-height: var(--lh-snug); }
.feature p { font-size: var(--fs-sm); line-height: 1.65; color: var(--ink-2); }

.features-extra { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--ink-2); text-align: center; }
.band-night .caption { color: var(--night-ink-2); opacity: .85; }

/* Showcase rows: text beside a screenshot, alternating */
.showcase { display: grid; gap: var(--s-9); margin-top: var(--s-9); }
.show-row { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) {
  .show-row { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .show-row:nth-child(even) .show-media { order: -1; }
}
.show-copy { display: grid; gap: var(--s-4); align-content: center; }
.show-copy ul { list-style: none; display: grid; gap: var(--s-2); margin-top: var(--s-2); }
.show-copy li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: var(--fs-sm); }
.show-copy li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 1.5px; background: var(--brand); }
.show-media { display: flex; justify-content: center; padding: var(--s-7) var(--s-4); background: var(--paper-2); border-radius: var(--r-xl); }
.section-tint .show-media { background: var(--surface); border: 1px solid var(--line); }
.show-media .phone { width: min(250px, 60vw); }
.show-media-pair { gap: 0; }
.show-media-pair .phone { width: min(220px, 44vw); }
.show-media-pair .phone:first-child { transform: rotate(-4deg) translate(8%, 4%); z-index: 1; }
.show-media-pair .phone:last-child { transform: rotate(4deg) translate(-8%, -2%); }

/* ---------- 10. Steps */
.steps { list-style: none; display: grid; gap: var(--s-5); counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.step { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
.step-num { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--brand-text); font-weight: 500; }
.step h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
.step p { color: var(--ink-2); font-size: var(--fs-sm); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-7); }

/* ---------- 11. FAQ (details/summary accordion) */
.faq-layout { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .faq-layout { grid-template-columns: 1fr 1.7fr; gap: var(--s-8); } .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + var(--s-6)); align-self: start; } }
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-5) 0; cursor: pointer; font-weight: 600; font-size: var(--fs-md); line-height: var(--lh-snug);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
  color: var(--ink-2); transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--brand-text); }
.faq .answer { padding: 0 var(--s-7) var(--s-5) 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.75; display: grid; gap: var(--s-2); }

/* ---------- 12. Download panels */
.download-grid { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .download-grid { grid-template-columns: 1fr 1fr; } }
.panel { padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.panel h3 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; margin-bottom: var(--s-4); }
.dl-row { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s-1) var(--s-3); align-items: center; padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.dl-row svg.os { width: 22px; height: 22px; color: var(--ink); }
.dl-row b { font-size: var(--fs-md); }
.dl-row small { grid-column: 2; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.dl-actions { grid-row: 1 / span 2; grid-column: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }
@media (max-width: 479px) { .dl-row { grid-template-columns: 28px 1fr; } .dl-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; padding-top: var(--s-2); } }
.dl-version { margin-top: var(--s-4); }

/* ---------- 13. Support */
.support-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.support-card { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; text-decoration: none; transition: border-color var(--dur) var(--ease); }
a.support-card:hover { border-color: var(--brand); }
.support-card h3 { font-size: var(--fs-md); }
.support-card p { font-size: var(--fs-sm); color: var(--ink-2); }
.support-card .more { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-text); }
.callout { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--brand-soft); border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.65; color: var(--ink); }
.callout svg { width: 20px; height: 20px; color: var(--brand-text); margin-top: 2px; }

/* ---------- 14. Guide page */
.page-head { padding: var(--s-8) 0 var(--s-7); border-bottom: 1px solid var(--line); }
.page-head .container { display: grid; gap: var(--s-4); }
.guide-layout { display: grid; gap: var(--s-7); padding: var(--s-7) 0 var(--s-9); }
@media (min-width: 900px) { .guide-layout { grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-8); } }
.toc { align-self: start; }
@media (min-width: 900px) { .toc { position: sticky; top: calc(var(--header-h) + var(--s-5)); max-height: calc(100vh - var(--header-h) - var(--s-7)); overflow: auto; } }
.toc-title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-3); }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px var(--s-3); margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); line-height: 1.45; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a[aria-current="true"] { color: var(--brand-text); border-left-color: var(--brand); font-weight: 600; }
@media (max-width: 899px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .toc ol { border-left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-3); }
  .toc a { padding: 6px 0; border-left: 0; margin: 0; }
}
.prose { max-width: var(--max-text); }
.prose > section { padding-bottom: var(--s-7); margin-bottom: var(--s-7); border-bottom: 1px solid var(--line); }
.prose > section:last-child { border-bottom: 0; margin-bottom: 0; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); line-height: 1.3; margin-bottom: var(--s-4); display: flex; align-items: baseline; gap: var(--s-3); }
.prose h2 .num { color: var(--brand-text); font-size: var(--fs-lg); }
.prose h3 { font-size: var(--fs-md); margin: var(--s-5) 0 var(--s-2); }
.prose p { color: var(--ink-2); margin: var(--s-3) 0; }
.prose ol, .prose ul { color: var(--ink-2); padding-left: 1.3em; margin: var(--s-3) 0; display: grid; gap: var(--s-2); }
.prose ol { list-style: decimal; }
.prose ul { list-style: disc; }
.prose li::marker { color: var(--brand-text); }
.prose b, .prose strong { color: var(--ink); }
.prose .callout { margin: var(--s-4) 0; }
.ui { display: inline; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); font-size: .9em; font-weight: 600; color: var(--ink); line-height: 1.6; }
.figure { display: flex; justify-content: center; padding: var(--s-6) var(--s-4); margin: var(--s-5) 0; background: var(--paper-2); border-radius: var(--r-lg); }
.figure .phone { width: min(230px, 56vw); }

/* ---------- 15. Footer */
.site-footer { padding: var(--s-8) 0 var(--s-7); background: var(--paper-2); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-brand { display: grid; gap: var(--s-3); align-content: start; }
.footer-brand p { color: var(--ink-2); max-width: 320px; }
.footer-col h2 { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; display: grid; gap: var(--s-2); }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); display: grid; gap: var(--s-2); color: var(--ink-3); font-size: 12px; line-height: 1.7; }

/* ---------- 16. 404 */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: var(--s-9) 0; }
.not-found .container { display: grid; gap: var(--s-4); justify-items: center; }
