/* ════════════════════════════════════════════════════════════════════
   HAON — Sistema visual disciplinado
   1 cor de marca · 6-step neutral ramp · 2 weights · 3 sizes max
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Tipografia — 1 sans + 1 mono. NADA de serif decorativo. */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* 6-step neutral ramp — desenhado primeiro em grayscale */
  --bg:        #FAFAFA;   /* canvas */
  --surface:   #FFFFFF;   /* cards flat */
  --elevated:  #F4F4F4;   /* surface elevada */
  --border:    #E8E8E8;   /* hairlines 1px */
  --text-2:    #6E6E6E;   /* secundário */
  --text:      #0A0A0A;   /* primário */

  /* Brand — 1 verde, ponto. */
  --brand:     #00B25E;

  /* Estado · só onde semanticamente necessário */
  --negative:  #C7382B;
  --warning:   #B47A1C;

  /* Espaçamento — base 4px, múltiplos de 4/8/16 */
  --gap-tight: 8px;
  --gap-md:    16px;
  --gap-lg:    32px;
  --gap-xl:    48px;
  --gap-xxl:   80px;
}

/* Reset minimalista */
* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--text); color: var(--bg); }

html { scroll-behavior: smooth; }
html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv11', 'ss01';
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ─── Layout ──────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-tight { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.wrap-prose { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* ─── Tipografia ─────────────────────────────────────────────────── */
/* Apenas 2 weights · 3 sizes por screen */
.label {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-2);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
h1 { font-size: clamp(48px, 6.5vw, 88px); letter-spacing: -0.035em; line-height: 1; font-weight: 400; }
h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.025em; }
h3 { font-size: 20px; line-height: 1.3; }
h4 { font-size: 16px; font-weight: 500; line-height: 1.4; }

.lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: pretty;
  font-weight: 400;
}

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }
.tabular { font-feature-settings: 'tnum' 1, 'lnum' 1; font-variant-numeric: tabular-nums lining-nums; }

.dim { color: var(--text-2); }
.small { font-size: 14px; }
.center { text-align: center; }

/* ─── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
  max-width: 1320px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 24px; height: 24px;
  background: var(--text);
  display: grid; place-items: center;
  color: var(--bg); font-weight: 500; font-size: 14px;
  border-radius: 6px;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  font-size: 14px; font-weight: 400;
  color: var(--text-2);
  transition: color 160ms;
}
.nav-links a:hover { color: var(--text); }

@media (max-width: 800px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ─── Buttons ────────────────────────────────────────────────────── */
/* Primary é o ÚNICO elemento de maior contraste em qualquer tela. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  border-radius: 8px;
  transition: background 160ms, color 160ms, border-color 160ms;
}

.btn-primary {
  background: var(--text); color: var(--bg);
}
.btn-primary:hover { background: #1F1F1F; }

.btn-accent {
  background: var(--brand); color: #FFFFFF;
}
.btn-accent:hover { background: #009B52; }

/* Ghost = text link em forma de botão (uso secundário) */
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); }

.btn-link {
  padding: 4px 0;
  background: transparent; color: var(--text);
  font-weight: 500;
  position: relative;
}
.btn-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--text);
  transition: transform 200ms;
  transform-origin: left;
}
.btn-link:hover::after { transform: scaleX(0.5); }

.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ─── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 120px 0 96px;
}
.hero .label { margin-bottom: 32px; }
.hero h1 { max-width: 18ch; }
.hero h1 em {
  color: var(--text-2);
  font-style: normal; font-weight: 400;
}
.hero .lead { max-width: 56ch; margin-top: 32px; }
.hero-cta { margin-top: 48px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-meta {
  margin-top: 96px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-meta > div { display: flex; flex-direction: column; gap: 8px; }
.hero-meta strong { font-size: 24px; font-weight: 400; letter-spacing: -0.02em; color: var(--text); }
.hero-meta span { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.04em; text-transform: uppercase; }
@media (max-width: 800px) { .hero-meta { grid-template-columns: 1fr 1fr; } }

/* ─── Section base ──────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section.dark { background: var(--text); color: var(--bg); }
.section.dark h2, .section.dark h3, .section.dark h4 { color: var(--bg); }
.section.dark .lead { color: rgba(250, 250, 250, 0.7); }
.section.dark .label { color: rgba(250, 250, 250, 0.55); }
.section.dark .border-row { border-color: rgba(255,255,255,0.1); }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head .lead { margin-top: 24px; }
.section-head .label { margin-bottom: 24px; }

/* ─── Grids ───────────────────────────────────────────────────── */
.grid { display: grid; gap: 0; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* ─── Cards (FLAT system: 1px border, no shadow) ─────────────── */
.row {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.row:last-child { border-bottom: 1px solid var(--border); }
.row-grid {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 32px; align-items: start;
}
.row-grid .label { padding-top: 6px; }
.row h3 { margin-bottom: 12px; }
.row p { color: var(--text-2); max-width: 56ch; }
@media (max-width: 700px) {
  .row-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ─── Pillar (4 col layout flat) ─────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.pillar {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--border);
}
.pillar:last-child { border-right: 0; padding-right: 0; }
.pillar:first-child { padding-left: 0; }
.pillar-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; color: var(--text-2);
  margin-bottom: 24px;
}
.pillar h3 { margin-bottom: 12px; }
.pillar p { color: var(--text-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--border); padding: 32px 0; }
  .pillar:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar:nth-child(odd) { padding-right: 0; border-right: 0; }
}

/* ─── Compare table — flat, no fills ─────────────────────────── */
.compare {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.compare-col { padding: 40px 32px 40px 0; border-right: 1px solid var(--border); }
.compare-col:last-child { border-right: 0; padding-left: 32px; padding-right: 0; }
.compare-col .label { margin-bottom: 24px; }
.compare h3 { font-size: 22px; margin-bottom: 32px; max-width: 22ch; }
.compare ul { list-style: none; }
.compare li {
  padding: 14px 0;
  font-size: 15px; line-height: 1.5; color: var(--text-2);
  display: grid; grid-template-columns: 24px 1fr;
  gap: 12px; align-items: flex-start;
  border-top: 1px solid var(--border);
}
.compare li:first-child { border-top: 0; }
.compare li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--text-2); }
.compare-col.good li svg { color: var(--text); }
@media (max-width: 800px) {
  .compare { grid-template-columns: 1fr; }
  .compare-col { border-right: 0; padding: 32px 0; border-bottom: 1px solid var(--border); }
  .compare-col:last-child { padding-left: 0; }
}

/* ─── Display number (hero element) ────────────────────────────── */
.display-num {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
.display-num .unit {
  font-size: 0.4em; font-weight: 400; color: var(--text-2);
  letter-spacing: 0;
  margin-left: 0.2em;
}
.display-num.positive { color: var(--brand); }

/* ─── Calc display ────────────────────────────────────────────── */
.calc {
  border-top: 1px solid var(--border);
}
.calc-formula {
  padding: 64px 0 48px;
  text-align: center;
}
.calc-formula .label { margin-bottom: 24px; }
.calc-formula .expr {
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.5;
}
.calc-formula .expr .var { font-weight: 500; }
.calc-formula .expr .op { color: var(--text-2); }
.calc-formula p { margin-top: 20px; color: var(--text-2); font-size: 14px; max-width: 540px; margin-left: auto; margin-right: auto; }

.calc-rows { border-top: 1px solid var(--border); }
.calc-row {
  display: grid; grid-template-columns: 32px 1fr 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.calc-row .num { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.calc-row .lbl { font-size: 15px; color: var(--text); }
.calc-row .op { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.calc-row .val {
  font-family: var(--font-sans); font-weight: 400;
  font-size: 24px; letter-spacing: -0.02em;
  font-feature-settings: 'tnum' 1;
  color: var(--text);
}
.calc-row.total { padding: 28px 0; }
.calc-row.total .val { font-size: 36px; font-weight: 300; color: var(--text); }
.calc-row.total .lbl { font-weight: 500; }
@media (max-width: 700px) {
  .calc-row { grid-template-columns: 24px 1fr auto; }
  .calc-row .op { display: none; }
}

/* ─── Stats strip (flat, big numbers, no decoration) ──────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  margin-top: 64px;
}
.stat {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: 0; padding-right: 0; }
.stat:first-child { padding-left: 0; }
.stat .n {
  font-weight: 300;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.025em; color: var(--text); line-height: 1;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
.stat .n.positive { color: var(--brand); }
.stat .l { margin-top: 12px; font-size: 12px; color: var(--text-2); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; padding-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--border); padding-top: 32px; }
  .stat:nth-child(3) { padding-left: 0; }
}

/* ─── PoD diagram — flat, only stroke icons ────────────────── */
.pod-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0; border-top: 1px solid var(--border);
}
.pod-actor {
  padding: 40px 24px 40px 0;
  border-right: 1px solid var(--border);
}
.pod-actor:last-child { border-right: 0; padding-right: 0; }
.pod-actor:first-child { padding-left: 0; }
.pod-actor svg.pod-icon { width: 24px; height: 24px; stroke: var(--text); stroke-width: 1.5; fill: none; margin-bottom: 24px; }
.pod-actor .label { margin-bottom: 12px; }
.pod-actor h4 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.pod-actor p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
@media (max-width: 800px) {
  .pod-grid { grid-template-columns: 1fr; }
  .pod-actor { border-right: 0; border-bottom: 1px solid var(--border); padding: 32px 0; }
}

/* ─── Tokenomics ─────────────────────────────────────────────── */
.token-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center;
}
@media (max-width: 900px) { .token-grid { grid-template-columns: 1fr; gap: 48px; } }

/* simple monoline donut: only border ring, no fills, no shadows */
.donut {
  position: relative; width: 280px; aspect-ratio: 1; margin: 0 auto;
}
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut svg circle { fill: none; }
.donut-center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.donut-cap {
  font-weight: 300; font-size: 44px; letter-spacing: -0.03em;
  color: var(--text); font-feature-settings: 'tnum' 1;
}
.donut-sub { font-size: 12px; font-weight: 500; color: var(--text-2); margin-top: 4px; letter-spacing: 0.05em; text-transform: uppercase; }

.token-legend { display: grid; gap: 0; }
.legend-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 16px;
  align-items: center; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.legend-row:first-child { border-top: 1px solid var(--border); }
.legend-line {
  width: 24px; height: 1px; background: var(--text);
}
.legend-line.muted { background: var(--text-2); }
.legend-line.faint { background: var(--border); height: 2px; }
.legend-name { font-size: 15px; color: var(--text); font-weight: 400; }
.legend-name span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.legend-pct { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--text); }

/* ─── FAQ flat ─────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  padding: 24px 0; cursor: pointer; list-style: none;
  display: grid; grid-template-columns: 1fr 24px;
  gap: 24px; align-items: center;
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-sans); font-size: 20px; font-weight: 300;
  color: var(--text-2);
  transition: transform 200ms;
  justify-self: end;
}
.faq-item[open] summary::after { content: '−'; color: var(--text); }
.faq-body { padding: 0 0 28px; color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 64ch; }
.faq-body strong { color: var(--text); font-weight: 500; }

/* ─── Roadmap ─────────────────────────────────────────────── */
.tl-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 32px; align-items: baseline;
  padding: 24px 0; border-top: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: 1px solid var(--border); }
.tl-tag {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--text-2);
  display: flex; align-items: baseline; gap: 8px;
}
.tl-tag .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 6px;
  background: var(--border);
}
.tl-item.done .tl-tag .dot { background: var(--brand); }
.tl-item.active .tl-tag .dot { background: var(--text); }
.tl-item.done .tl-tag { color: var(--brand); }
.tl-item.active .tl-tag { color: var(--text); }
.tl-item h4 { font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.tl-item p { font-size: 14px; color: var(--text-2); max-width: 64ch; }
@media (max-width: 700px) {
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ─── CTA block — flat with single brand button ───────────── */
.cta-block {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
  text-align: center;
}
.cta-block .label { margin-bottom: 24px; }
.cta-block h2 { max-width: 18ch; margin: 0 auto; }
.cta-block .lead { margin: 24px auto 48px; max-width: 52ch; }
.cta-block .hero-cta { justify-content: center; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
}
.footer h5 { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { font-size: 14px; color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer-base {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2);
}
.footer-base .mono { font-size: 12px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: fadeUp 600ms cubic-bezier(.2,.7,.3,1) both; }
.rise-d1 { animation-delay: 60ms; }
.rise-d2 { animation-delay: 120ms; }
.rise-d3 { animation-delay: 180ms; }

/* ─── Download page ─────────────────────────────────────── */
.dl-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.dl-card-top {
  padding: 32px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 32px; align-items: center;
  border-bottom: 1px solid var(--border);
}
.dl-card-top .label { margin-bottom: 12px; }
.dl-card-top h3 { font-size: 22px; margin-bottom: 6px; font-weight: 500; }
.dl-card-top p { color: var(--text-2); font-size: 14px; }

.dl-meta {
  padding: 24px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  border-bottom: 1px solid var(--border);
}
.dl-meta-row { display: grid; gap: 6px; }
.dl-meta-row strong { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--text); }
.dl-meta-row span { font-size: 11px; letter-spacing: 0.05em; color: var(--text-2); text-transform: uppercase; font-weight: 500; }
@media (max-width: 700px) {
  .dl-card-top { grid-template-columns: 1fr; }
  .dl-meta { grid-template-columns: 1fr 1fr; }
}

.dl-checksum {
  padding: 24px 32px;
}
.dl-checksum .label { margin-bottom: 12px; }
.dl-checksum-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 12px 16px; background: var(--elevated); border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  word-break: break-all;
}
.dl-checksum-row button {
  padding: 6px 10px; font-family: var(--font-sans); font-size: 12px;
  font-weight: 500; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface);
  transition: color 160ms, border-color 160ms;
}
.dl-checksum-row button:hover { color: var(--text); border-color: var(--text); }

.steps-list { display: grid; }
.step-item {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 24px; padding: 28px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.step-item:first-child { border-top: 0; }
.step-item .num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--text-2);
}
.step-item h4 { margin-bottom: 8px; font-weight: 500; }
.step-item p { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.step-item code {
  display: inline-block; margin-top: 12px;
  font-family: var(--font-mono); font-size: 13px;
  padding: 6px 10px; background: var(--elevated); border-radius: 6px;
  color: var(--text);
}

/* ─── Whitepaper specific ─────────────────────────────────── */
.wp-shell {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 200px 1fr; gap: 80px;
  align-items: start;
}
@media (max-width: 1000px) {
  .wp-shell { grid-template-columns: 1fr; gap: 0; }
  .wp-toc { display: none; }
}
.wp-toc {
  position: sticky; top: 88px;
  padding-top: 64px;
}
.wp-toc-eyebrow {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; color: var(--text-2);
  text-transform: uppercase; margin-bottom: 16px;
}
.wp-toc ol { list-style: none; counter-reset: toc; }
.wp-toc li { counter-increment: toc; }
.wp-toc a {
  display: block; padding: 6px 0;
  font-size: 13px; color: var(--text-2);
  transition: color 160ms;
}
.wp-toc a::before {
  content: counter(toc, decimal-leading-zero) '   ';
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-2);
  white-space: pre;
}
.wp-toc a:hover { color: var(--text); }
.wp-toc a.active { color: var(--text); font-weight: 500; }
.wp-toc a.active::before { color: var(--brand); }

.wp-body {
  padding: 64px 0 96px;
  font-size: 16px; line-height: 1.65;
  color: var(--text-2);
  max-width: 680px;
}
.wp-body > p { margin: 0 0 20px; }
.wp-body section + section { margin-top: 80px; }
.wp-body h2 {
  font-size: 32px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.15;
  margin: 0 0 24px;
  color: var(--text);
}
.wp-body h2 .num {
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 500; letter-spacing: 0.05em;
  color: var(--text-2); display: block; margin-bottom: 16px;
  text-transform: uppercase;
}
.wp-body h3 {
  font-size: 18px; font-weight: 500;
  margin: 32px 0 12px;
  color: var(--text);
}
.wp-body strong { color: var(--text); font-weight: 500; }
.wp-body em { color: var(--text); font-style: italic; }
.wp-body code {
  font-family: var(--font-mono); font-size: 0.875em;
  padding: 2px 6px; background: var(--elevated);
  border-radius: 4px; color: var(--text);
}
.wp-body ul {
  margin: 0 0 20px; padding: 0; list-style: none;
}
.wp-body li {
  padding: 6px 0 6px 24px; position: relative;
}
.wp-body li::before {
  content: ''; position: absolute; left: 0; top: 16px;
  width: 12px; height: 1px; background: var(--text-2);
}
.wp-body blockquote {
  margin: 32px 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--border);
  font-size: 17px; line-height: 1.5;
  color: var(--text);
  font-style: normal;
}

.wp-fig {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.wp-fig pre {
  font-family: var(--font-mono); font-size: 12px;
  line-height: 1.5; color: var(--text);
  white-space: pre; overflow-x: auto;
  margin: 0;
}
.wp-fig-cap {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-2);
  display: flex; gap: 12px;
}
.wp-fig-cap strong { font-family: var(--font-mono); font-weight: 500; color: var(--text); }

.wp-table {
  width: 100%;
  border-collapse: collapse; margin: 24px 0;
  font-size: 14px;
}
.wp-table th {
  text-align: left; padding: 12px 16px 12px 0;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.wp-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.wp-table td.mono { font-family: var(--font-mono); font-size: 13px; }

.wp-callout {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.wp-callout .label { margin-bottom: 8px; }
.wp-callout p { margin: 0; font-size: 15px; color: var(--text); line-height: 1.5; }

.wp-cover { padding: 80px 0 64px; }
.wp-cover h1 { font-size: clamp(44px, 6vw, 72px); max-width: 16ch; }
.wp-cover h1 em {
  color: var(--text-2); font-style: normal; font-weight: 400;
}
.wp-cover .lead { max-width: 56ch; margin-top: 24px; }
.wp-cover-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 64px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.wp-cover-meta > div { display: grid; gap: 6px; }
.wp-cover-meta strong { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--text); }
.wp-cover-meta span { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.05em; text-transform: uppercase; }
@media (max-width: 700px) { .wp-cover-meta { grid-template-columns: 1fr 1fr; } }

/* permission table */
.perm-table {
  width: 100%;
  border-top: 1px solid var(--border);
}
.perm-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 32px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.perm-row strong { font-weight: 500; font-size: 15px; display: block; margin-bottom: 4px; }
.perm-row .dim { font-size: 13px; }
.perm-row p { color: var(--text-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 700px) {
  .perm-row { grid-template-columns: 1fr; gap: 8px; }
}

/* warning row — neutral, no color decoration */
.warn-row {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: grid; grid-template-columns: 24px 1fr;
  gap: 16px; align-items: start;
}
.warn-row svg { width: 18px; height: 18px; stroke: var(--text); stroke-width: 1.5; fill: none; margin-top: 2px; }
.warn-row strong { display: block; margin-bottom: 4px; font-weight: 500; }
.warn-row p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
