/* PROVISÓRIO até a marca do comitê chegar */
:root { --bg:#F6F3EC; --surface:#FFFFFF; --surface-2:#ECE7DC; --ink:#0E1726; --ink-2:#36404F; --muted:#68707C; --line:#DCD6C9; --accent:#E0A100; --accent-ink:#8A5A00; --accent-2:#1D4ED8; --positive:#1F7A8C; --negative:#C2410C; --chart-1:#C2410C; --chart-2:#1D4ED8; --chart-3:#0E7490; --chart-4:#9333EA; --chart-5:#B45309; --font-serif: Georgia, serif; --font-sans: system-ui, sans-serif; --font-mono: ui-monospace, monospace; --radius:6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bg:#0E1726; --surface:#152033; --surface-2:#1B2840; --ink:#F2EEE6; --ink-2:#C9CFDA; --muted:#97A0AE; --line:#2A3850; --accent:#F2B705; --accent-ink:#F6C944; --chart-1:#F97316; --chart-2:#60A5FA; --chart-3:#2DD4BF; --chart-4:#C084FC; --chart-5:#FBBF24; } }
:root[data-theme=dark] { --bg:#0E1726; --surface:#152033; --surface-2:#1B2840; --ink:#F2EEE6; --ink-2:#C9CFDA; --muted:#97A0AE; --line:#2A3850; --accent:#F2B705; --accent-ink:#F6C944; --chart-1:#F97316; --chart-2:#60A5FA; --chart-3:#2DD4BF; --chart-4:#C084FC; --chart-5:#FBBF24; }

/* rapidearn.one — layout e componentes. Cores e fontes vêm de tokens.css (marca). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.6; font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
@media (min-width: 720px) { body { font-size: 18px; } }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.05em; text-wrap: pretty; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.num, .stat-value, .fig-source, .tag { font-variant-numeric: tabular-nums lining-nums; }

/* cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.wordmark { font-family: var(--wordmark-font, var(--font-serif)); font-weight: var(--wordmark-weight, 600); letter-spacing: var(--wordmark-tracking, -0.01em); font-size: 21px; line-height: 1; }
.site-nav { margin-left: auto; display: flex; gap: clamp(10px, 2.4vw, 28px); font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.theme-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer; }
.theme-btn:hover { color: var(--ink); border-color: var(--ink-2); }
@media (max-width: 640px) {
  .header-in { height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; gap: 6px 12px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; font-size: 14px; }
  .theme-btn { margin-left: auto; }
  html { scroll-padding-top: 104px; }
}

/* abertura */
.hero { position: relative; color: #F7F4EE; background: #0B1424; isolation: isolate; overflow: hidden; }
.hero picture, .hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .hero-img { object-fit: cover; object-position: center 60%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 28, 0.55) 0%, rgba(8, 14, 28, 0.35) 35%, rgba(8, 14, 28, 0.82) 78%, rgba(8, 14, 28, 0.96) 100%); }
.hero-in { min-height: min(92vh, 860px); display: flex; flex-direction: column; justify-content: flex-end; padding-top: 96px; padding-bottom: clamp(32px, 6vh, 64px); }
.kicker { font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.hero .kicker { color: var(--hero-accent, var(--accent)); }
.hero h1 { font-size: clamp(38px, 6.4vw, 84px); line-height: 1.02; max-width: 15ch; letter-spacing: -0.02em; }
.hero .dek { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 40em; color: rgba(247, 244, 238, 0.86); margin: 22px 0 0; }
.hero .dek a, .hero a { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: clamp(28px, 5vh, 52px); border-top: 1px solid rgba(247, 244, 238, 0.28); }
.stat { padding: 18px 20px 4px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid rgba(247, 244, 238, 0.2); }
.stat-value { display: block; font-family: var(--font-serif); font-size: clamp(36px, 5vw, 64px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.stat-label { display: block; margin-top: 10px; font-size: 14.5px; line-height: 1.4; color: rgba(247, 244, 238, 0.82); max-width: 24ch; }
.hero .fn a { color: rgba(247, 244, 238, 0.85); }
.img-credit { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: rgba(247, 244, 238, 0.55); margin: 0; }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 14px 0 6px; border-left: 0; border-top: 1px solid rgba(247, 244, 238, 0.18); }
  .stat:first-child { border-top: 0; }
  .stat-label { max-width: none; }
}

/* índice de capítulos */
.toc { position: sticky; top: 60px; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.toc ol { list-style: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); max-width: 1200px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.toc ol::-webkit-scrollbar { display: none; }
.toc a { display: block; white-space: nowrap; padding: 11px 10px; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.toc a span { color: var(--accent-ink); font-variant-numeric: tabular-nums; margin-right: 6px; font-weight: 600; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 640px) { .toc { top: 92px; } }

/* corpo do texto: coluna de leitura e figuras largas */
.story { display: grid; grid-template-columns: [full-start] minmax(16px, 1fr) [wide-start] minmax(0, 140px) [text-start] min(680px, calc(100% - 32px)) [text-end] minmax(0, 140px) [wide-end] minmax(16px, 1fr) [full-end]; }
.story > * { grid-column: text; }
.story > .fig, .story > .photo, .story > .wide { grid-column: wide; }
.story > .full { grid-column: full; }
.chapter { padding-top: clamp(56px, 9vw, 112px); }
.chapter-head { margin-bottom: 28px; }
.chapter-head .num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.08em; display: block; margin-bottom: 10px; }
.chapter h2 { font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -0.02em; }
.chapter .dek { font-family: var(--font-serif); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.42; color: var(--ink-2); margin-top: 16px; font-weight: 400; }
.story h3 { font-size: clamp(22px, 2.6vw, 28px); margin: 1.6em 0 0.6em; }
.story p { margin-bottom: 1.1em; }
.story strong { font-weight: 650; }
.lede::first-letter { font-family: var(--font-serif); float: left; font-size: 3.6em; line-height: 0.86; padding: 6px 10px 0 0; color: var(--accent-ink); font-weight: 600; }
.fn { font-size: 0.66em; line-height: 0; vertical-align: super; margin-left: 1px; font-family: var(--font-sans); font-weight: 600; }
.fn a { text-decoration: none; color: var(--accent-ink); padding: 0 1px; }
.fn a:hover { text-decoration: underline; }

/* números em destaque */
.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 28px 0 34px; }
.story > .callouts { grid-column: wide; }
.callout { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius, 6px); padding: 18px 18px 16px; }
.callout .stat-value { font-size: clamp(32px, 3.6vw, 44px); color: var(--ink); }
.callout .stat-label { color: var(--ink-2); font-size: 15px; max-width: none; margin-top: 8px; }
.pull { font-family: var(--font-serif); font-size: clamp(22px, 2.8vw, 30px); line-height: 1.3; border-left: 3px solid var(--accent); padding: 4px 0 4px 22px; margin: 34px 0; color: var(--ink); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 6px); padding: 22px 24px 8px; margin: 30px 0; }
.box h3 { margin-top: 0; font-size: 21px; }
.box ul, .story ul { padding-left: 1.2em; }
.box li, .story li { margin-bottom: 0.5em; }

/* fotos */
.photo { margin: 36px 0; }
.photo img { width: 100%; border-radius: var(--radius, 6px); aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface-2); }
.photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* figuras de dados */
.fig { margin: 40px 0 44px; padding-top: 16px; border-top: 2px solid var(--ink); position: relative; }
.fig-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.story .fig-title, .fig-title { font-family: var(--font-serif); font-size: clamp(21px, 2.4vw, 27px); margin: 6px 0 6px; }
.fig-sub { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.45; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.lg { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: currentColor; }
.sw.c1 { color: var(--chart-1); } .sw.c2 { color: var(--chart-2); } .sw.c3 { color: var(--chart-3); } .sw.c4 { color: var(--chart-4); } .sw.c5 { color: var(--chart-5); }
.fig-body { position: relative; }
.chart--narrow { display: none; }
@media (max-width: 700px) { .chart--wide { display: none; } .chart--narrow { display: block; } }
.chart-svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-svg text { font-family: var(--font-sans); font-size: 12px; fill: var(--muted); }
.chart-svg .ax { fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .grid.zero, .chart-svg .axis { stroke: var(--ink-2); stroke-width: 1; }
.chart-svg .tick { stroke: var(--ink-2); }
.chart-svg .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .line.c1, .chart-svg .dot.c1, .chart-svg .hover-dot.c1 { stroke: var(--chart-1); }
.chart-svg .line.c2, .chart-svg .dot.c2, .chart-svg .hover-dot.c2 { stroke: var(--chart-2); }
.chart-svg .line.c3, .chart-svg .dot.c3, .chart-svg .hover-dot.c3 { stroke: var(--chart-3); }
.chart-svg .line.c4, .chart-svg .dot.c4, .chart-svg .hover-dot.c4 { stroke: var(--chart-4); }
.chart-svg .line.c5, .chart-svg .dot.c5, .chart-svg .hover-dot.c5 { stroke: var(--chart-5); }
.chart-svg .dot { fill: var(--bg); stroke-width: 2.2; }
.chart-svg .hover-dot { fill: var(--bg); stroke-width: 2.4; }
.chart-svg .end-label { font-size: 12.5px; font-weight: 650; }
.chart-svg .end-label.c1 { fill: var(--chart-1); } .chart-svg .end-label.c2 { fill: var(--chart-2); } .chart-svg .end-label.c3 { fill: var(--chart-3); } .chart-svg .end-label.c4 { fill: var(--chart-4); } .chart-svg .end-label.c5 { fill: var(--chart-5); }
.chart-svg .between.real { fill: var(--chart-2); opacity: 0.13; }
.chart-svg .anno { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.chart-svg .anno-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-svg .band { fill: var(--surface-2); }
.chart-svg .band-label { fill: var(--muted); font-size: 11px; }
.chart-svg .band.calm { fill: var(--positive); opacity: 0.09; }
.chart-svg .band-label.strong { fill: var(--positive); font-size: 12px; font-weight: 700; }
.chart-svg .hover { display: none; pointer-events: none; }
.chart-svg .hover-line { stroke: var(--ink-2); stroke-width: 1; }
.chart-svg .bar { fill: var(--chart-3); }
.chart-svg .bar.hl { fill: var(--accent); }
.chart-svg .bar.neg { fill: var(--chart-4); }
.chart-svg .bar.est { opacity: 0.55; }
.chart-svg .bar-label { fill: var(--ink-2); font-size: 12.5px; }
.chart-svg .bar-label.hl, .chart-svg .bar-value.hl { fill: var(--ink); font-weight: 700; }
.chart-svg .bar-value { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-svg .lane { stroke: var(--line); stroke-width: 1; }
.chart-svg .lane-label { font-size: 12.5px; font-weight: 650; }
.chart-svg .ev { stroke: var(--bg); stroke-width: 2; }
.chart-svg .ev.k1, .chart-svg .lane-label.k1 { fill: var(--negative); }
.chart-svg .ev.k2, .chart-svg .lane-label.k2 { fill: var(--chart-4); }
.chart-svg .ev.k3, .chart-svg .lane-label.k3 { fill: var(--chart-3); }
.chart-svg .ev.k4, .chart-svg .lane-label.k4 { fill: var(--positive); }
.chart-svg .ev-label { fill: var(--ink-2); font-size: 11.5px; }
.tip { position: absolute; top: 6px; left: 0; z-index: 5; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14); padding: 8px 10px; font-size: 13px; line-height: 1.5; min-width: 150px; }
.tip-date { display: block; font-weight: 700; margin-bottom: 2px; }
.tip-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tip-row b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.fig-source { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.fig-source .src-label { font-weight: 700; color: var(--ink-2); }
.fig-source .dl { display: inline-block; margin-left: 6px; }
.fig-source .dl a { color: var(--muted); }
.fig-note { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }

/* linha do tempo em lista (fallback legível) */
.events { list-style: none; padding: 0; margin: 18px 0 0; border-left: 2px solid var(--line); }
.events li { position: relative; padding: 0 0 16px 20px; }
.events li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.events li.k1::before { border-color: var(--negative); background: var(--negative); }
.events li.k2::before { border-color: var(--chart-4); }
.events li.k3::before { border-color: var(--chart-3); }
.events li.k4::before { border-color: var(--positive); background: var(--positive); }
.events .yr { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--ink); margin-right: 8px; }

/* glossário */
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; margin: 24px 0; }
.glossary div { border-top: 1px solid var(--line); padding: 14px 0 8px; }
.glossary dt { font-family: var(--font-serif); font-weight: 600; font-size: 19px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }

/* páginas simples (sobre, fontes, legal) */
.page-head { padding: clamp(48px, 8vw, 96px) 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-head h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.02em; max-width: 18ch; }
.page-head .dek { font-family: var(--font-serif); font-size: clamp(19px, 2.2vw, 23px); color: var(--ink-2); margin-top: 16px; max-width: 38em; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); margin: 1.6em 0 0.6em; }
.facts-card { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 6px); padding: 22px 24px; margin: 24px 0 32px; font-size: 16px; }
.facts-card dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.facts-card dd { margin: 0; }
@media (max-width: 560px) { .facts-card { grid-template-columns: 1fr; gap: 2px; } .facts-card dd { margin-bottom: 10px; } }
.table-wrap { overflow-x: auto; margin: 12px 0 32px; border: 1px solid var(--line); border-radius: var(--radius, 6px); }
.src-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 720px; }
.src-table th { text-align: left; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.src-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.src-table td.num { white-space: nowrap; font-weight: 600; }
.src-table .unit { font-weight: 400; color: var(--muted); }
.src-table tr:target { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.dl-list li { margin-bottom: 8px; font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }

/* notas da página */
.notes { grid-column: wide; margin-top: 72px; padding-top: 24px; border-top: 2px solid var(--ink); }
.notes h2 { font-size: 24px; }
.notes-intro { font-size: 14.5px; color: var(--muted); max-width: 52em; }
.notes-list { font-size: 14px; line-height: 1.5; padding-left: 1.6em; columns: 2 380px; column-gap: 40px; }
.notes-list li { break-inside: avoid; margin-bottom: 14px; }
.notes-list li:target { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.n-claim { margin: 0 0 2px; color: var(--ink); }
.n-meta { margin: 0; color: var(--muted); }
.n-val { font-weight: 650; color: var(--ink-2); }
.n-back { text-decoration: none; margin-left: 4px; }

/* rodapé */
.site-footer { margin-top: 96px; background: var(--footer-bg, #0B1424); color: rgba(247, 244, 238, 0.78); padding: 48px 0 40px; font-size: 15px; }
.site-footer a { color: #F7F4EE; }
.site-footer .brand { color: #F7F4EE; }
.footer-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px 40px; }
.f-brand p { margin: 12px 0 0; }
.f-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: start; justify-content: flex-end; }
.f-nav a { text-decoration: none; }
.f-nav a:hover { text-decoration: underline; }
.disclaimer { grid-column: 1 / -1; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid rgba(247, 244, 238, 0.18); color: #F7F4EE; font-weight: 600; }
.f-small { grid-column: 1 / -1; margin: 0; font-size: 13px; color: rgba(247, 244, 238, 0.6); }
@media (max-width: 720px) { .footer-in { grid-template-columns: 1fr; } .f-nav { justify-content: flex-start; } }

/* 404 */
.notfound { padding: 120px 0; text-align: center; }

@media print {
  .site-header, .toc, .theme-btn, .hero::after { display: none; }
  .hero { color: #000; background: none; }
  .chart--narrow { display: none !important; } .chart--wide { display: block !important; }
}
