:root {
  --paper:#FBFAF7; --surface:#FFFFFF; --surface-2:#F4F2EA;
  --border:#E7E4DB; --border-strong:#D8D4C8;
  --text:#20242B; --text-dim:#6A6F77; --text-faint:#93979E;
  --accent:#F5B301; --accent-strong:#8A6300; --accent-soft:#FCEFC2;
  --shadow:0 1px 0 rgba(20,22,27,.03), 0 8px 30px -18px rgba(20,22,27,.28);
  --mono:ui-monospace,"SF Mono","JetBrains Mono","Menlo",monospace;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){
  --paper:#14161B; --surface:#1B1E25; --surface-2:#232730;
  --border:#2C313B; --border-strong:#3A404B;
  --text:#ECEEF1; --text-dim:#99A0A9; --text-faint:#6E757F;
  --accent:#FFC72C; --accent-strong:#FFC72C; --accent-soft:#3a3416;
  --shadow:0 1px 0 rgba(0,0,0,.2), 0 10px 34px -20px rgba(0,0,0,.7);
}}
:root[data-theme="dark"]{
  --paper:#14161B; --surface:#1B1E25; --surface-2:#232730;
  --border:#2C313B; --border-strong:#3A404B;
  --text:#ECEEF1; --text-dim:#99A0A9; --text-faint:#6E757F;
  --accent:#FFC72C; --accent-strong:#FFC72C; --accent-soft:#3a3416;
  --shadow:0 1px 0 rgba(0,0,0,.2), 0 10px 34px -20px rgba(0,0,0,.7);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth}
body{margin:0; background:var(--paper); color:var(--text); font-family:var(--sans); font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased}
.wrap{max-width:1100px; margin:0 auto; padding:0 24px}
a{color:var(--accent-strong)}

/* top bar + hero */
.bar{display:flex; align-items:center; padding:22px 0 0}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:-.02em; font-size:1.05rem; color:var(--text); text-decoration:none}
.bubble{width:15px; height:15px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft)}
header.hero{padding:48px 0 32px}
.kicker{font-family:var(--mono); font-size:.74rem; letter-spacing:.14em; text-transform:uppercase; color:var(--accent-strong); margin:0 0 14px; display:flex; align-items:center; gap:9px}
.kicker::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--accent)}
h1{font-size:clamp(2.2rem,6vw,3.3rem); line-height:1.04; letter-spacing:-.035em; font-weight:800; margin:0; text-wrap:balance}
h1 em{font-style:normal; color:var(--accent-strong)}
.lede{margin:16px 0 0; max-width:56ch; font-size:1.075rem; color:var(--text-dim)}
.updated{margin:12px 0 0; font-family:var(--mono); font-size:.8rem; color:var(--text-dim)}

/* layout: sumário fixo à esquerda */
.layout{display:grid; grid-template-columns:230px minmax(0,1fr); gap:48px; align-items:start}
nav.toc{position:sticky; top:20px; max-height:calc(100vh - 40px); overflow:auto; font-size:.88rem; padding-bottom:20px}
nav.toc p{font-family:var(--mono); font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color:var(--text-faint); margin:0 0 10px}
nav.toc ol{list-style:none; margin:0; padding:0; border-left:1px solid var(--border)}
nav.toc a{display:block; padding:5px 0 5px 14px; margin-left:-1px; border-left:2px solid transparent; color:var(--text-dim); text-decoration:none}
nav.toc a:hover{color:var(--text); border-left-color:var(--accent)}

/* prosa */
article.prose{max-width:72ch; min-width:0}
article.prose h2{font-size:1.55rem; letter-spacing:-.02em; margin:52px 0 12px; padding-top:8px; scroll-margin-top:16px}
article.prose h2:first-child{margin-top:0}
article.prose h3{font-size:1.12rem; margin:30px 0 8px; scroll-margin-top:16px}
article.prose p, article.prose li{text-wrap:pretty}
article.prose li{margin:4px 0}
article.prose code{font-family:var(--mono); font-size:.88em; background:var(--surface-2); padding:1px 5px; border-radius:5px}
article.prose blockquote{margin:16px 0; padding:12px 18px; border-left:3px solid var(--accent); background:var(--surface-2); border-radius:0 10px 10px 0; color:var(--text-dim)}
article.prose blockquote p{margin:0}

/* tabelas */
article.prose table{width:100%; border-collapse:collapse; margin:16px 0; font-size:.93rem; background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; box-shadow:var(--shadow); border-collapse:separate; border-spacing:0}
article.prose th, article.prose td{text-align:left; vertical-align:top; padding:10px 14px; border-top:1px solid var(--border)}
article.prose th{background:var(--surface-2); font-family:var(--mono); font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-dim); border-top:0}

/* destaque */
.callout{margin:24px 0; padding:18px 22px; background:var(--accent-soft); border:1px solid var(--accent); border-radius:14px}
.callout > p:first-child{margin-top:0}
.callout ol{margin-bottom:0}
.callout > :last-child{margin-bottom:0}

/* lista de pessoas */
ul.people{list-style:none; padding:0; display:flex; flex-wrap:wrap; gap:8px}
ul.people li{margin:0}
ul.people a{display:inline-block; font-family:var(--mono); font-size:.84rem; text-decoration:none; padding:5px 11px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text)}
ul.people a:hover{border-color:var(--accent); color:var(--accent-strong)}

footer{margin:64px 0 40px; padding-top:22px; border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:6px 14px; justify-content:center; color:var(--text-dim); font-size:.85rem}
footer a{text-decoration:none; font-family:var(--mono); font-size:.82rem}
footer a:hover{text-decoration:underline}
footer .sep{color:var(--text-faint)}

@media (max-width:860px){
  article.prose table{display:block; overflow-x:auto}
  .wrap{padding:0 16px}
  .layout{grid-template-columns:1fr; gap:8px}
  nav.toc{position:static; max-height:none; padding:16px 18px; background:var(--surface); border:1px solid var(--border); border-radius:14px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
