/*
 * folko.io — long-form reading pages (help/, privacy, terms, security, support, delete-account), phase 4 of the
 * 2026-10 redesign. The markup and every data-i18n binding are unchanged; this file restyles them in the
 * After dark system. Loads after site.css. Reading pages follow the system light/dark setting (html.reading,
 * light token set in legacy.css). Weights <= 700, amber only as a signal, hairlines instead of boxes.
 */
.reading-body { max-width: 760px; margin-inline: auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(64px, 9vw, 120px); }
.reading-body > .eyebrow { display: block; margin-bottom: 14px; }
.reading-body h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; margin-bottom: 20px; }
.reading-body .lead, .reading-body .lede { font-size: 19px; line-height: 1.6; color: var(--text-2); margin-bottom: 18px; max-width: 62ch; }
.reading-body .updated { font-size: 14px; color: var(--muted); margin-bottom: 36px; }
.reading-body h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; color: var(--text); margin: 52px 0 16px; }
.reading-body p, .reading-body li { color: var(--text-2); font-size: 17px; line-height: 1.7; }
.reading-body p { margin-bottom: 16px; }
.reading-body strong { color: var(--text); font-weight: 600; }
.reading-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.reading-body a:hover { text-decoration-color: var(--text); }
.reading-body code { font: 500 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--raised); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.reading-body ul { list-style: disc; padding-inline-start: 22px; margin-bottom: 16px; }
.reading-body ul li::marker { color: var(--dim); }
.reading-body li { margin-bottom: 8px; }

/* Breadcrumb line above the title */
.reading-body .crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 0; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.reading-body .crumbs a { color: var(--muted); text-decoration: none; }
.reading-body .crumbs a:hover { color: var(--text); }

/* Numbered steps in help articles: a numeral in the margin, text flowing normally (inline <strong> must not become a grid item) */
.reading-body ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.reading-body ol.steps > li { counter-increment: step; position: relative; display: block; padding: 20px 0; padding-inline-start: 52px; margin: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.reading-body ol.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 18px; grid-row: auto; font-size: 26px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; color: var(--dim); font-variant-numeric: tabular-nums; }
.reading-body ul.tips { list-style: disc; }
.reading-body ul.tips li::marker { color: var(--dim); }

/* Plan note, lede rule, language notice */
.reading-body .tier-note { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin: 36px 0 0; max-width: none; }
.reading-body .tier-note p { margin: 0; font-size: 16px; }
.reading-body .english-notice { font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 20px; }
.reading-body p.lede { border-inline-start: 2px solid var(--line); padding-inline-start: 18px; color: var(--text); }

/* Legal text: one block per language (scripts/build-legal-pages.mjs); i18n.js sets <html lang>. */
.legal-doc { display: none; }
html[lang="es"] .legal-doc[data-doc-lang="es"],
html[lang="pt"] .legal-doc[data-doc-lang="pt"],
html[lang="fr"] .legal-doc[data-doc-lang="fr"] { display: block; }
html:not([lang="es"]):not([lang="pt"]):not([lang="fr"]) .legal-doc[data-doc-lang="en"] { display: block; }

/* Related articles and the "still stuck" line */
.reading-body .related, .reading-body .contact { display: block; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.reading-body .related h2, .reading-body .contact h2 { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay); }
.reading-body .related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.reading-body .related li { margin: 0; }
.reading-body .related a { display: inline-block; padding: 9px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--text); }
.reading-body .related a:hover { border-color: var(--muted); }
.reading-body .stuck { margin-top: 32px; font-size: 16px; }

/* Help hub: a plain ruled list per group — title and one line. Deliberately not an icon grid. */
.reading-body .group { margin-top: 56px; }
.reading-body .group h2 { margin: 0 0 6px; }
.reading-body .group-intro { font-size: 16px; color: var(--muted); margin-bottom: 14px; }
.reading-body ul.articles { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.reading-body ul.articles li { margin: 0; border-bottom: 1px solid var(--line); }
.reading-body ul.articles a { display: block; padding: 16px 0; text-decoration: none; color: var(--text); }
.reading-body .a-title { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.reading-body .a-sum { display: block; margin-top: 3px; font-size: 15px; color: var(--muted); line-height: 1.55; }
.reading-body ul.articles a:hover .a-title { text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 4px; }

/* 404 */
.notfound { min-height: 56vh; display: grid; align-content: center; justify-items: start; gap: 8px; max-width: var(--wrap); margin-inline: auto; padding: clamp(48px, 8vw, 112px) var(--gutter); }
.notfound .code { font-size: clamp(72px, 14vw, 160px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--dim); font-variant-numeric: tabular-nums; }
.notfound h1 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.notfound p { color: var(--text-2); font-size: 18px; max-width: 44ch; margin-bottom: 20px; }
