/* Krytum Labs — materiais gratuitos das aulas. Página de leitura: papel claro, texto escuro, vermelho só para ação. */
@font-face { font-family: "Archivo"; src: url("../fontes/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fontes/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root { --papel: #f3f2ee; --folha: #fff; --tinta: #0a0a0a; --fraca: #55534d; --linha: #cfcdc5; --vermelho: #c81e10; --preto: #000; --titulo: "Archivo", "Arial Narrow", sans-serif; --texto: "Geist", system-ui, sans-serif; --margem: clamp(20px, 5vw, 72px); --sai: cubic-bezier(.16, 1, .3, 1); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 18px/1.6 var(--texto); -webkit-font-smoothing: antialiased; }
::selection { background: var(--tinta); color: var(--papel); }
:focus-visible { outline: 2px solid var(--vermelho); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { fill: currentColor; }
[hidden] { display: none !important; }
.so-leitor { position: absolute; }
.pular { position: absolute; left: 12px; top: -60px; background: var(--tinta); color: var(--papel); padding: 10px 14px; z-index: 5; }
.pular:focus { top: 12px; }
.rascunho { background: #ff3b2b; color: #000; font-weight: 600; font-size: 13px; text-align: center; padding: 6px 12px; }

.topo { background: var(--preto); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--margem); }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 19px/1 var(--titulo); font-stretch: 112%; }
.marca b { font-weight: 800; }
.marca-k { width: 26px; height: 24px; }
.topo-link { font-size: 15px; font-weight: 600; }
.topo-link:hover { color: #ff3b2b; }

.capa { padding: clamp(40px, 7vw, 96px) var(--margem) clamp(32px, 5vw, 56px); max-width: 1100px; }
.capa-tipo { font-size: 15px; font-weight: 600; color: var(--fraca); }
h1 { margin-top: 16px; font: 800 clamp(2.2rem, 5.6vw, 4.6rem)/1 var(--titulo); letter-spacing: -.035em; text-wrap: balance; }
.capa-sub { margin-top: 24px; max-width: 38em; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #2b2a27; }
.botao { margin-top: 32px; display: inline-flex; align-items: center; gap: 12px; background: var(--tinta); color: var(--papel); padding: 17px 24px; font: 700 17px/1 var(--texto); text-decoration: none; transition: background .2s, transform .2s var(--sai); }
.botao svg { width: 20px; height: 20px; }
.botao:hover { background: var(--vermelho); color: #fff; }
.botao:active { transform: scale(.98); }
.capa-nota { margin-top: 12px; font-size: 14px; color: var(--fraca); }

.indice { position: sticky; top: 0; z-index: 4; display: flex; gap: 6px 22px; overflow-x: auto; padding: 14px var(--margem); background: var(--papel); border-block: 1px solid var(--linha); font-size: 15px; font-weight: 600; white-space: nowrap; scrollbar-width: none; }
.indice::-webkit-scrollbar { display: none; }
.indice a { text-decoration: none; color: var(--fraca); }
.indice a:hover { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--vermelho); text-decoration-thickness: 2px; }

.texto { padding: 0 var(--margem); max-width: calc(46rem + 2 * var(--margem)); }
.texto section { padding: clamp(40px, 6vw, 72px) 0 0; scroll-margin-top: 56px; }
h2 { font: 800 clamp(1.6rem, 3.2vw, 2.4rem)/1.08 var(--titulo); letter-spacing: -.025em; text-wrap: balance; display: flex; align-items: baseline; gap: 14px; }
.num { flex: none; font-stretch: 125%; color: var(--vermelho); }
.texto p { margin-top: 16px; }
.texto code { font: 500 .9em/1 ui-monospace, "Cascadia Mono", Consolas, monospace; background: #e6e4dc; padding: 3px 6px; }
.como { margin-top: 18px; counter-reset: como; display: grid; gap: 10px; }
.como li { counter-increment: como; padding-left: 34px; position: relative; }
.como li::before { content: counter(como); position: absolute; left: 0; top: .22em; width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--tinta); border-radius: 50%; font: 700 12px/1 var(--texto); }
.avisos { margin-top: 20px; border-top: 2px solid var(--tinta); }
.avisos li { padding: 16px 0; border-bottom: 1px solid var(--linha); }
.padrao { margin-top: 20px; border-top: 2px solid var(--tinta); }
.padrao div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--linha); }
.padrao dt { font-weight: 600; color: var(--fraca); font-size: 16px; }
.padrao dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.obs { color: var(--fraca); font-size: 16px; }

.copiar { margin-top: 22px; background: var(--folha); border: 1px solid var(--linha); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.copiar figcaption { grid-column: 1; grid-row: 1; align-self: center; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--fraca); }
.copiar button { all: unset; grid-column: 2; grid-row: 1; box-sizing: border-box; cursor: pointer; padding: 10px 16px; font: 700 14px/1.4 var(--texto); border-left: 1px solid var(--linha); min-width: 6.2em; text-align: center; transition: background .15s, color .15s; }
.copiar button:hover { background: var(--tinta); color: var(--papel); }
.copiar button:focus-visible { outline: 2px solid var(--vermelho); outline-offset: -2px; }
.copiar button.ok { background: var(--tinta); color: var(--papel); }
.copiar pre { grid-column: 1 / -1; padding: 16px; border-top: 1px solid var(--linha); font: 400 15px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }

.chamada { margin: clamp(56px, 8vw, 104px) var(--margem) 0; padding: clamp(28px, 5vw, 56px); background: var(--preto); color: #fff; max-width: 1100px; }
.chamada h2 { display: block; font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
.chamada p { margin-top: 16px; max-width: 34em; color: #d6d6d6; }
.chamada .botao { background: #ff3b2b; color: #000; }
.chamada .botao:hover { background: #fff; color: #000; }
.chamada ::selection { background: #ff3b2b; color: #000; }

.rodape { padding: 40px var(--margem) 56px; display: grid; gap: 8px; color: var(--fraca); font-size: 13px; max-width: 60em; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .padrao div { grid-template-columns: minmax(0, 1fr); }
  .topo-link { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

.copiar.longo pre { max-height: 26rem; overflow-y: auto; font-size: 14px; }

.botao-linha { margin-top: 6px; }
