/* ReaderNext design system. System fonts only; no external assets. Teal and amber from the app. */
:root {
  --bg: #faf8f4;
  --bg-2: #f2efe9;
  --surface: #ffffff;
  --ink: #171a1c;
  --ink-2: #3a4144;
  --muted: #5b6265;
  --line: #e6e2da;
  --line-2: #d5d1c9;
  --accent: #1d5f6b;
  --accent-ink: #1a5662;
  --accent-soft: #d6ecee;
  --amber: #e9a93b;
  --amber-ink: #8a5c0c;
  --amber-soft: #fbebcb;
  --on-accent: #ffffff;
  --focus: #1f5fd6;
  --shadow: 0 1px 2px rgb(23 26 28 / 0.04), 0 10px 28px rgb(23 26 28 / 0.07);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1415;
  --bg-2: #141b1d;
  --surface: #182123;
  --ink: #ecefef;
  --ink-2: #c6cdce;
  --muted: #9aa5a7;
  --line: #263133;
  --line-2: #33403f;
  --accent: #7cc4ce;
  --accent-ink: #8fd2db;
  --accent-soft: #16444c;
  --amber: #e9a93b;
  --amber-ink: #f0bd62;
  --amber-soft: #3a2a0c;
  --on-accent: #00363e;
  --focus: #8ab4ff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px rgb(0 0 0 / 0.28);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.icon { width: 22px; height: 22px; flex: none; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.section { padding-top: 64px; }
@media (min-width: 900px) { .section { padding-top: 96px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn .icon path { fill: currentColor; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -10px var(--accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.lg { min-height: 54px; padding: 12px 26px; font-size: 1.05rem; }
.btn.small { min-height: 42px; padding: 8px 16px; font-size: .92rem; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand .mark { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
@media (max-width: 560px) { .hide-sm { display: none; } }
.theme { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--line-2); }
.theme .icon { width: 20px; height: 20px; }
:root[data-theme="light"] .theme .sun, :root[data-theme="dark"] .theme .moon { display: none; }

/* hero */
.hero { padding: 40px 0 8px; background: radial-gradient(900px 480px at 85% -10%, var(--accent-soft), transparent 70%); }
.hero-inner { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero { padding-top: 72px; } .hero-inner { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.pill .icon { width: 16px; height: 16px; color: var(--accent); }
.hl { color: var(--accent); background: linear-gradient(transparent 68%, color-mix(in srgb, var(--amber) 45%, transparent) 68%); padding: 0 .06em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.hero-art img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }

/* content blocks */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.eyebrow .icon { width: 18px; height: 18px; }
.eyebrow.amber { color: var(--amber-ink); }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.reverse > :first-child { order: 2; } }
.art { width: 100%; border-radius: 22px; box-shadow: var(--shadow); }
.gallery { margin-top: 32px; }
@media (min-width: 860px) { .gallery { gap: 24px; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: .55em; }
.ticks li::before { content: ""; position: absolute; left: 5px; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.formats { list-style: none; padding: 0; margin: 32px 0 16px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.formats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.formats strong { display: block; font-size: 1.02rem; color: var(--accent-ink); }
.formats span { font-size: .9rem; color: var(--muted); line-height: 1.45; display: block; }

.features { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.feature-ic, .point-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 12px; }
:root[data-theme="dark"] .feature-ic, :root[data-theme="dark"] .point-ic { color: var(--accent); }

.band { background: var(--accent-soft); border-radius: 28px; padding: 40px 20px 24px; }
@media (min-width: 720px) { .band { padding: 56px 44px 32px; } }
.points { display: grid; gap: 16px; margin: 28px 0; }
@media (min-width: 800px) { .points { grid-template-columns: repeat(3, 1fr); } }
.point { background: var(--surface); border-radius: var(--radius); padding: 22px; }
.point p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.band > p { max-width: 46em; margin: 0 auto 12px; color: var(--ink-2); }

.cta { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 44px 20px; box-shadow: var(--shadow); }
.cta img { margin: 0 auto 16px; border-radius: 18px; }
.cta p { color: var(--muted); }

/* FAQ */
.faq h2 { margin-bottom: 16px; }
.faq-list { border-top: 1px solid var(--line); max-width: 820px; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; font-weight: 650; padding: 18px 32px 18px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { color: var(--ink-2); padding-bottom: 8px; max-width: 46em; }
.faq + .faq { padding-top: 48px; }

/* prose */
.prose-wrap { padding-top: 48px; }
.prose { max-width: 740px; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; scroll-margin-top: 80px; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose ul.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 20px 12px 40px; }
.legal-doc .lede { font-size: 1rem; color: var(--muted); }
.contact { font-style: normal; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; display: inline-block; }
.toc ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; font-size: .92rem; }
.callout { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; max-width: 820px; }
.callout .icon { color: var(--accent); margin-top: 3px; }
.callout p { margin: 0; }
.center-block { text-align: center; }
.center-block .hero-actions { justify-content: center; }
.nf-art { margin: 0 auto 24px; width: 250px; border-radius: 22px; }

/* footer */
.foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 24px; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot h2 { font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand p { color: var(--muted); font-size: .95rem; margin: 12px 0 16px; max-width: 32ch; }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.legal p { margin: 0; }
