/* Base: guia Agenti-quette (coluna de 623 px, página limpa, linhas finas). Cores: aplicativo do Grok Bot. */
@font-face { font-family: Geist; font-weight: 100 900; font-display: swap; src: url(/fontes/geist.woff2) format("woff2"); }
:root {
  color-scheme: light dark;
  --fundo: #fff; --tinta: #2b1810; --texto: #5e483d; --fraco: #85685a; --linha: #f1ddcd; --lavado: #fdeee1; --link: #0b6bd3; --vao: #ececeb; --pilula: #2b1810; --pilula-texto: #fff;
  --painel: #33201a; --balao: #4d342a; --painel-texto: #fff3e8; --painel-fraco: #dcc3b4;
  --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Display", Geist, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --fundo: #1a110d; --tinta: #fff3e8; --texto: #dfcdc0; --fraco: #bba393; --linha: #3d2a21; --lavado: #2a1c16; --link: #64b1ff; --vao: #0e0e10; --pilula: #fff3e8; --pilula-texto: #2b1810; }
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--fundo); color: var(--texto); font: 400 16px/1.8 var(--fonte); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.pular { position: absolute; left: -999px; }
.pular:focus { left: 16px; top: 16px; z-index: 9; background: var(--fundo); padding: 8px 16px; }

nav.topo { position: sticky; top: 0; z-index: 99; transition: opacity 0.2s; display: flex; justify-content: center; gap: 4px; padding: 12px 24px; background: color-mix(in srgb, var(--fundo) 88%, transparent); backdrop-filter: blur(12px); }
nav.topo a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 15px; line-height: 24px; text-decoration: none; transition: background 0.16s; }
nav.topo a[aria-current] { background: var(--lavado); color: var(--tinta); font-weight: 500; }
main { width: 100%; max-width: 671px; margin: 0 auto; padding: 32px 24px 96px; }

.painel { background: var(--painel); color: var(--painel-texto); border-radius: 24px; overflow: hidden; }
.fig { display: block; width: 100%; height: auto; font-family: var(--fonte); }
.fig.media { max-width: 480px; margin: 0 auto; }

h1 { color: var(--tinta); font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
h2 { color: var(--tinta); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.03em; margin: 64px 0 20px; scroll-margin-top: 80px; text-wrap: balance; }
h3 { color: var(--tinta); font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -0.02em; margin: 40px 0 12px; scroll-margin-top: 80px; }
p { text-wrap: pretty; }
.coluna > p + p, .coluna > p + ul, .coluna > p + ol, .coluna > ul + p, .coluna > ol + p { margin-top: 20px; }
article strong { color: var(--tinta); font-weight: 600; }
article p a, article li a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.coluna > ul, .coluna > ol { padding-left: 22px; display: grid; gap: 10px; }
.coluna > ul::marker { color: var(--fraco); }

.cabeca { display: grid; gap: 16px; text-align: center; padding: 32px 0 40px; border-bottom: 1px solid var(--linha); margin-bottom: 40px; }
.cabeca p { font-size: 17px; max-width: 54ch; margin: 0 auto; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; font-size: 15px; color: var(--fraco); margin-bottom: 12px; }
.meta > a, .meta button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 500 15px/1 var(--fonte); letter-spacing: inherit; color: var(--fraco); background: none; border: 0; padding: 0; text-decoration: none; cursor: pointer; }
.meta button { color: var(--link); }
.meta div { display: flex; align-items: center; gap: 16px; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

figure { margin: 32px 0; }
figure .painel { padding: 28px 20px; }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--fraco); text-align: center; text-wrap: balance; }

.tabela { margin: 32px 0; border-top: 1px solid var(--linha); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--linha); }
th { color: var(--tinta); font-weight: 600; }
td:first-child:has(.nome) { white-space: nowrap; }
td:first-child:not(:has(.nome)) { width: 44%; }
td a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.nome { display: inline-flex; align-items: center; gap: 10px; }
.avatar { flex: none; display: block; }
.claro .avatar { background: var(--painel); border-radius: 50%; padding: 4px; }

.lad { display: grid; place-items: center; flex: none; width: var(--t); height: var(--t); border-radius: calc(var(--t) * 0.22); }
.lad svg { width: 64%; height: 64%; overflow: visible; }
/* capítulos em cartas: um por vez na tela, com a passagem de base/capitulos.js */
body:has(.pilha) { background: var(--vao); }
html.paginado { overscroll-behavior-y: none; scroll-behavior: auto; }
.pilha { max-width: none; padding: 0; overflow-x: clip; }
.carta { position: relative; min-height: 100vh; background: var(--fundo); }
.carta + .carta { margin-top: 24px; }
.paginado .carta { margin-top: -68px; padding-top: 68px; border-radius: 32px; overflow: clip; }
.paginado .carta[hidden] { position: absolute; height: 0; min-height: 0; padding: 0; margin: 0; overflow: hidden; }
.paginado .carta.entrando { position: fixed; z-index: 5; inset: 0 0 auto 0; margin: 0; will-change: transform; }
.coluna { max-width: 671px; margin: 0 auto; padding: 32px 24px 48px; }
.abre { display: grid; justify-items: center; gap: 12px; text-align: center; padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--linha); }
.abre .lad { margin-bottom: 8px; }
.abre h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.abre p { color: var(--texto); }
.proximo { display: grid; grid-template-columns: 40px 1fr 16px; gap: 16px; align-items: center; margin-top: 64px; padding: 16px 0; border-top: 1px solid var(--linha); font-size: 14px; line-height: 1.5; color: var(--fraco); text-decoration: none; }
.proximo strong { display: block; font-size: 16px; color: var(--tinta); }
.pilula { position: fixed; z-index: 4; left: 50%; top: 0; display: inline-flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); min-height: 44px; padding: 6px 16px 6px 8px; border-radius: 22px; background: var(--pilula); color: var(--pilula-texto); font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; opacity: 0; pointer-events: none; box-shadow: 0 8px 24px -12px rgb(0 0 0 / 0.4); }
.passando .pilula { pointer-events: auto; }
.pilula .lad { border-radius: 50%; margin-left: -38px; }
.cara:empty { display: none; }
.anel-v { width: 32px; height: 32px; flex: none; transform: rotate(-90deg); fill: none; stroke: color-mix(in srgb, var(--pilula-texto) 22%, transparent); stroke-width: 2.5; }
.anel { stroke: var(--pilula-texto); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.passando nav.topo, .passando .indice { opacity: 0; pointer-events: none; }
.capitulos { display: block; margin: -40px 0 40px; }
.capitulos a { display: grid; grid-template-columns: 40px 1fr 16px; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linha); text-decoration: none; font-size: 15px; line-height: 1.5; }
.capitulos strong { display: block; font-size: 16px; }
.capitulos .ico { color: var(--fraco); transition: transform 0.16s; }
.anima li { transition: opacity 0.35s; opacity: 0.72; }
.anima li.agora { opacity: 1; }
[data-cena="dia"] svg { margin-bottom: 20px; }
.dia { list-style: none; padding: 0; display: grid; gap: 20px; max-width: 500px; margin: 0 auto; }
.dia li { display: grid; grid-template-columns: 52px 28px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.55; color: var(--painel-fraco); }
.dia time { font-variant-numeric: tabular-nums; line-height: 28px; color: var(--painel-texto); }
.dia strong { display: block; color: var(--painel-texto); line-height: 28px; }

.conversa { max-width: 460px; margin: 0 auto; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; }
.quem { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.balao { background: var(--balao); border-radius: 16px; padding: 12px 16px; }
.pergunta { display: grid; gap: 12px; }
.pergunta span { color: #ead6c9; }
.pergunta button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid #64646a; border-radius: 12px; background: #5c4135; color: #fff; font: 500 15px/1.4 var(--fonte); text-align: left; cursor: pointer; transition: background 0.16s, transform 0.1s; }
.pergunta button:active { transform: scale(0.985); }
.pergunta i { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 7px; background: #7a3cf0; font: 600 12px/1 var(--fonte); }
.pergunta button[disabled] { cursor: default; background: #3b2c58; border-color: #8a5cf0; }
.depois { display: grid; gap: 8px; }
.js .depois { max-height: 0; margin-top: -8px; overflow: hidden; }
.js .ok .depois { max-height: 400px; margin-top: 0; transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.js .depois > * { opacity: 0; transform: translateY(8px); }
.js .ok .depois > * { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.js .ok .depois > :nth-child(1) { transition-delay: 0.35s; }
.js .ok .depois > :nth-child(2) { transition-delay: 1.3s; }

/* capa do boneco 3D: quadros do Blender num canvas */
.estudio { position: relative; aspect-ratio: 1120 / 520; overflow: hidden; background: #2c1708; }
.estudio img, .estudio canvas, .estudio button { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.estudio canvas { opacity: 0; }
.estudio canvas.ve { opacity: 1; }
.estudio button { border: 0; background: none; cursor: pointer; }
@media (max-width: 600px) { .estudio { aspect-ratio: 4 / 3; } .estudio img, .estudio canvas { object-fit: cover; } }

/* vídeo e testes interativos dentro do painel */
figure .painel:has(> .filme) { padding: 0; }
.filme { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #fbe0ca; }
figure .painel > .lab { max-width: 480px; margin: 0 auto; display: grid; gap: 16px; font-size: 15px; line-height: 1.5; }
.lab-foto { position: relative; aspect-ratio: 560 / 495; }
.lab-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.22s; }
.lab-foto img.ve { opacity: 1; }
.lab-diz { min-height: 3em; color: var(--painel-fraco); text-align: center; text-wrap: balance; }
.lab button { border: 1px solid #775848; border-radius: 12px; background: #4d342a; color: #fff; font: 500 15px/1.35 var(--fonte); cursor: pointer; transition: background 0.16s, border-color 0.16s, transform 0.1s; }
.lab button:active { transform: scale(0.98); }
.lab-chaves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lab-chaves button { display: grid; justify-items: center; align-content: start; gap: 8px; min-height: 96px; padding: 14px 8px; text-align: center; }
.lab-chaves i { width: 12px; height: 12px; border-radius: 50%; background: #8f6d5c; transition: background 0.16s, box-shadow 0.16s; }
.lab-chaves button[aria-pressed='true'] { border-color: #ffb020; }
.lab-chaves button[aria-pressed='true'] i { background: #ffb020; box-shadow: 0 0 0 5px rgb(255 176 32 / 0.22); }
.lab-chaves small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--painel-fraco); }
.lab-regua { display: grid; gap: 4px; }
.lab-regua span { display: flex; justify-content: space-between; }
.lab-regua output { font-weight: 600; font-variant-numeric: tabular-nums; }
.lab-regua input { width: 100%; height: 44px; margin: 0; accent-color: #f0661f; cursor: pointer; }
.lab-abas { display: flex; gap: 8px; justify-content: center; }
.lab-abas button { min-height: 44px; padding: 0 22px; }
.lab-abas button[aria-pressed='true'] { background: #fff3e8; border-color: #fff3e8; color: #2b1810; }
.lab-par { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lab-par[hidden] { display: none; }
.lab-par figure { margin: 0; }
.lab-par img { display: block; width: 100%; height: auto; }
.lab-par figcaption { margin-top: 8px; color: var(--painel-fraco); text-align: left; text-wrap: pretty; }
.lab-par b { display: block; font-size: 15px; }
.lab-par .nao { color: #ff6b7c; }
.lab-par .sim { color: #2fd6a4; }

.prompt { margin: 24px 0; border: 1px solid var(--linha); border-radius: 16px; overflow: hidden; background: var(--lavado); }
.prompt header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 16px; border-bottom: 1px solid var(--linha); font-size: 14px; font-weight: 600; color: var(--tinta); }
.prompt header button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; background: none; border-radius: 12px; color: var(--tinta); font: 500 14px/1 var(--fonte); cursor: pointer; }
.prompt pre { padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 15px/1.65 var(--fonte); color: var(--texto); }
.prompt mark { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); border-radius: 5px; padding: 1px 4px; }

.coluna > ul.checklist { list-style: none; padding: 0; gap: 0; border-top: 1px solid var(--linha); }
.checklist label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--linha); cursor: pointer; line-height: 1.5; }
.checklist input { width: 20px; height: 20px; flex: none; accent-color: #1d8df7; }
.checklist input:checked + span { color: var(--fraco); text-decoration: line-through; }

.indice { display: none; }
@media (min-width: 1180px) {
  .indice { z-index: 98; transition: opacity 0.2s; display: grid; gap: 12px; position: fixed; left: max(32px, calc(50vw - 590px)); top: 112px; width: 200px; font-size: 14px; line-height: 1.45; }
  .indice a { text-decoration: none; color: var(--fraco); }
  .indice a.aqui { color: var(--tinta); font-weight: 500; }
}

.lista { list-style: none; padding: 0; margin-top: 40px; border-top: 1px solid var(--linha); }
.lista a { display: grid; grid-template-columns: 40px 1fr 16px; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--linha); text-decoration: none; line-height: 1.6; }
.lista strong { display: block; color: var(--tinta); font-size: 17px; font-weight: 600; }
.lista time { display: block; margin-top: 4px; font-size: 14px; color: var(--fraco); }
.lista .ladrilho { width: 40px; height: 40px; border-radius: 12px; background: var(--painel); display: grid; place-items: center; }
.lista .ico { color: var(--fraco); transition: transform 0.16s; }
.fim { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--linha); display: grid; gap: 12px; font-size: 15px; color: var(--fraco); overflow-wrap: anywhere; }
.fim a { color: var(--link); }

@media (hover: hover) {
  nav.topo a:hover, .prompt header button:hover { background: color-mix(in srgb, var(--tinta) 7%, transparent); }
  .meta > a:hover, .indice a:hover { color: var(--tinta); }
  .pergunta button:not([disabled]):hover, .lab button:not([aria-pressed='true']):hover { background: #6b4d3f; }
  .lista a:hover .ico, .capitulos a:hover .ico, .proximo:hover .ico { transform: translateX(3px); }
}

@media (max-width: 600px) {
  main { padding-top: 16px; }
  h1 { font-size: 27px; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  td:first-child:not(:has(.nome)) { width: auto; }
  tr { padding: 16px 0; border-bottom: 1px solid var(--linha); }
  td { border: 0; padding: 0 0 8px; }
  td[data-c]::before { content: attr(data-c); display: block; font-size: 13px; color: var(--fraco); }
  figure .painel { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { nav.topo, .indice, .meta button { display: none !important; } .js .depois > * { opacity: 1; } }

:not(pre) > code { padding: 2px 6px; border-radius: 6px; background: var(--lavado); font: 500 0.92em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.baixar { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin: 24px 0; padding: 0 24px; border-radius: 16px; background: var(--pilula); color: var(--pilula-texto) !important; font-weight: 600; text-decoration: none; transition: transform 0.1s; }
.baixar:active { transform: scale(0.99); }

:root { --fundo: #fffaf5; --link: #b93f0a; --vao: #f3c9a8; }
@media (prefers-color-scheme: dark) { :root { --fundo: #1a110d; --link: #ff9a5c; --vao: #0f0906; } }
