/* Estante de autos: a estante de aço de um cartório, com um volume por matéria.
   O 3D fica na navegação (estante, volumes, viradas de folha, fichas, carimbo); a leitura é plana e calma. */
:root {
  --bg: #E7EAED;
  --paper: #FCFBF7;
  --ink: #16202A;
  --muted: #58656F;
  --line: #C8D0D6;
  --accent: #B4232C;      /* vermelho de carimbo */
  --link: #1D4C86;        /* azul de tinta */
  --ok: #1B6655;
  --amber: #9A5D08;
  --violet: #574A86;
  --steel-front: #A9B3BC;
  --steel-top: #C6CDD3;
  --wall: #8A959F;
  --page-edge: #EDEAE0;
  --shadow: 0 1px 2px rgb(22 32 42 / .08), 0 10px 30px rgb(22 32 42 / .10);
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs: 18.5px;
  --d: 150px;             /* profundidade da estante */
  --k: 1;                 /* escala dos volumes */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F151B; --paper: #18212A; --ink: #E7ECF1; --muted: #97A5B2; --line: #2C3945;
    --accent: #F0726E; --link: #8DBBF0; --ok: #5CC2A6; --amber: #E6AE4E; --violet: #AFA3E6;
    --steel-front: #2B3742; --steel-top: #364450; --wall: #141B23; --page-edge: #C9C5B8;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 34px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F151B; --paper: #18212A; --ink: #E7ECF1; --muted: #97A5B2; --line: #2C3945;
  --accent: #F0726E; --link: #8DBBF0; --ok: #5CC2A6; --amber: #E6AE4E; --violet: #AFA3E6;
  --steel-front: #2B3742; --steel-top: #364450; --wall: #141B23; --page-edge: #C9C5B8;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 34px rgb(0 0 0 / .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--display); font-size: 16px; line-height: 1.45;
  overflow-x: clip; min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--link); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; margin: 0; }
.mono, .eyebrow { font-family: var(--mono); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* ---------- Barra superior ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: 54px;
  display: flex; align-items: center; gap: 14px; padding: 0 clamp(16px, 3vw, 32px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; flex: none; }
.selo {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px double var(--accent); color: var(--accent);
  font: 600 11px var(--mono); letter-spacing: .04em; transform: rotate(-9deg);
}
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { flex: none; opacity: .6; }
.crumbs .aqui { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools { display: flex; gap: 4px; flex: none; }
.ib {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px;
  background: none; color: var(--ink);
}
.ib:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ib svg .fill { fill: currentColor; stroke: none; }
.ib .aa { font-weight: 700; font-size: 15px; }
.ib[aria-pressed="false"] { color: var(--muted); }
.ib[aria-pressed="false"] svg { stroke-dasharray: 2.5 3; }
@media (max-width: 560px) { .brand-t { display: none; } .crumbs a:not(:last-of-type) { display: none; } .crumbs .sep:not(:last-of-type) { display: none; } }

/* ---------- Palco e vistas ---------- */
#stage { position: relative; }
.view { padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 48px) 72px; background: var(--bg); min-height: calc(100vh - 54px); }
.wrap { max-width: 1180px; margin: 0 auto; }
html.trans { overflow: hidden; }
.erro { padding: 40px; font-size: 18px; }

/* ---------- Início: a estante ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 4.9rem); line-height: .92; font-weight: 800; font-stretch: 78%; letter-spacing: -.02em; margin: 12px 0 18px; }
.hero h1 span { display: block; color: var(--accent); }
.lede { font-family: var(--body); font-size: 1.14rem; line-height: 1.5; max-width: 34em; margin: 0 0 24px; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0 0 24px; border-top: 1.5px solid var(--ink); }
.facts div { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.facts small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.andamento { display: grid; gap: 10px; }
.meter { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c, var(--ok)); border-radius: inherit; min-width: 0; }
.andamento p { margin: 0; font-size: .92rem; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 10px;
  background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem;
  transition: transform .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.sec { background: transparent; color: var(--ink); }
.btn small { font: 500 12px var(--mono); opacity: .75; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; }

.scene { perspective: 1500px; perspective-origin: 46% 38%; padding: 26px 34px 30px 6px; display: flex; justify-content: center; touch-action: pan-y; }
.case {
  position: relative; transform-style: preserve-3d; min-width: min(100%, 380px);
  transform: rotateX(var(--rx, -5deg)) rotateY(var(--ry, -17deg)); transition: transform .25s ease-out;
}
.case::before, .case::after {
  content: ""; position: absolute; top: 0; height: 100%; width: var(--d); transform-origin: left; transform: rotateY(90deg);
  background: linear-gradient(90deg, var(--steel-front), var(--wall));
}
.case::before { left: 0; }
.case::after { left: 100%; background: linear-gradient(90deg, var(--steel-top), var(--steel-front)); }
.shelf { position: relative; transform-style: preserve-3d; }
.shelf .back { position: absolute; inset: 0; transform: translateZ(calc(var(--d) * -1)); background: linear-gradient(180deg, var(--wall), color-mix(in srgb, var(--wall) 80%, #000)); }
.row { position: relative; display: flex; align-items: flex-end; gap: 2px; padding: 22px 16px 0; min-height: calc(252px * var(--k)); transform-style: preserve-3d; }
.plank {
  position: relative; transform-style: preserve-3d; min-height: 30px; padding: 6px 16px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  background: var(--steel-front); color: var(--ink); font: 500 11.5px var(--mono); letter-spacing: .03em;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), inset 0 -2px 0 rgb(0 0 0 / .14);
}
.plank b { font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.plank::before {
  content: ""; position: absolute; left: 0; bottom: 100%; width: 100%; height: var(--d);
  transform-origin: bottom; transform: rotateX(90deg);
  background: linear-gradient(0deg, var(--steel-top), color-mix(in srgb, var(--steel-top) 62%, var(--wall)));
}
.vol {
  position: relative; flex: none; display: block; width: calc(var(--w) * var(--k)); height: calc(var(--h) * var(--k));
  transform-style: preserve-3d; text-decoration: none; color: #fff; outline-offset: 6px;
  transition: transform .42s cubic-bezier(.2, .8, .2, 1);
  animation: guardar .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 45ms);
}
@keyframes guardar { from { transform: translateZ(110px); } }
.vol:hover, .vol:focus-visible { transform: translateZ(58px); }
.vol.pick { transform: translateZ(250px) translateX(-30px) rotateY(-71deg); transition-duration: .5s; }
.vol .sp, .vol .sd, .vol .tp { position: absolute; display: block; }
.vol .sp {
  inset: 0; background: linear-gradient(90deg, rgb(255 255 255 / .16), transparent 22%, transparent 74%, rgb(0 0 0 / .24)), var(--c);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 0 10px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18);
}
.sp-n { font: 600 calc(11px + 2px * var(--k)) var(--mono); padding-bottom: 7px; border-bottom: 1.5px solid rgb(255 255 255 / .55); width: 62%; text-align: center; }
.sp-t {
  writing-mode: vertical-rl; transform: rotate(180deg); flex: 1; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-stretch: 76%; font-size: calc(10px + 9px * var(--k)); line-height: 1.02; letter-spacing: .01em; text-align: center; padding: 8px 0; max-height: 100%;
}
.sp-p { width: 5px; height: 34px; border-radius: 3px; background: rgb(255 255 255 / .28); display: flex; align-items: flex-end; overflow: hidden; }
.sp-p i { display: block; width: 100%; background: #fff; border-radius: 3px; }
.vol .sd {
  top: 0; left: 100%; width: var(--d); height: 100%; transform-origin: left; transform: rotateY(90deg);
  background: linear-gradient(90deg, rgb(0 0 0 / .22), transparent 14%), var(--c);
  padding: 16px 12px 12px 18px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2);
}
.sd-k { font: 500 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.sd-t { font-weight: 800; font-stretch: 76%; font-size: 21px; line-height: 1; }
.vol .tp {
  left: 0; bottom: 100%; width: 100%; height: var(--d); transform-origin: bottom; transform: rotateX(90deg);
  background: repeating-linear-gradient(90deg, var(--page-edge) 0 2px, color-mix(in srgb, var(--page-edge) 82%, #000) 2px 3px);
  border: solid var(--c); border-width: 0 3px;
}
.cartao {
  align-self: flex-end; margin-left: 46px; width: calc(120px + 70px * var(--k)); padding: 12px 13px 14px; margin-bottom: 0;
  background: var(--paper); color: var(--ink); border-top: 5px solid var(--accent);
  transform-origin: bottom; transform: translateZ(-46px) rotateY(9deg) rotateX(-7deg);
  font-size: 12.5px; line-height: 1.35; box-shadow: 0 1px 0 rgb(0 0 0 / .2);
}
.cartao b { display: block; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

.indice { margin-top: clamp(36px, 6vw, 72px); display: grid; gap: 34px; }
.indice h2 { font-size: 1.5rem; font-stretch: 82%; font-weight: 800; }
.bloco-h { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.bloco-h p { margin: 0; color: var(--muted); font-size: .92rem; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 0 28px; }
.mrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.mrow:hover .mn { text-decoration: underline; }
.mrow .chip { width: 10px; height: 34px; background: var(--c); border-radius: 2px; }
.mn { font-weight: 700; display: block; }
.ms { font-size: .84rem; color: var(--muted); display: block; }
.mp { font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.rodape { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); max-width: 70ch; }
.rodape p { margin: 0 0 8px; }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .scene { order: 2; padding-right: 26px; }
}
@media (max-width: 560px) { :root { --k: .62; --d: 96px; } .scene { perspective: 1000px; padding: 14px 22px 22px 0; } .row { padding: 16px 8px 0; } .plank { padding: 5px 8px; font-size: 10px; } .cartao { margin-left: 12px; font-size: 11px; } }

/* ---------- Matéria: o volume aberto ---------- */
.mat { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(22px, 4vw, 52px); align-items: start; }
.capa {
  position: sticky; top: 76px; padding: 26px 24px 24px; color: #fff; display: grid; gap: 14px;
  background: linear-gradient(90deg, rgb(0 0 0 / .26), transparent 9%), var(--c);
  border-radius: 3px 12px 12px 3px; box-shadow: var(--shadow);
}
.capa .eyebrow { color: rgb(255 255 255 / .82); }
.capa h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: .96; font-weight: 800; font-stretch: 78%; letter-spacing: -.01em; }
.capa p { margin: 0; }
.capa .meter { background: rgb(255 255 255 / .28); }
.capa .meter i { background: #fff; }
.capa .st { font-size: .9rem; opacity: .92; }
.capa .btn { background: #fff; color: #14202A; border-color: #fff; justify-self: start; }
.capa details { border-top: 1px solid rgb(255 255 255 / .35); padding-top: 12px; }
.capa summary { cursor: pointer; font: 500 11.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.capa details p { margin-top: 10px; font: 400 12.5px/1.55 var(--mono); opacity: .95; }
.folhas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; perspective: 1200px; }
.folha {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; padding: 15px 18px 15px 16px;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 2px 8px 8px 2px;
  text-decoration: none; transform-origin: left center;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s;
}
.folha:hover, .folha:focus-visible { transform: translateZ(26px) rotateY(-2.4deg); box-shadow: var(--shadow); }
.fl { font: 500 12px var(--mono); color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.ft strong { display: block; font-size: 1.12rem; font-weight: 700; line-height: 1.2; }
.ft em { display: block; font: 400 12px var(--mono); color: color-mix(in srgb, var(--c) 55%, var(--ink)); margin-top: 3px; }
.ft span { display: block; font-family: var(--body); font-size: .95rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.fm { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; padding-top: 3px; text-align: right; }
.fm b { display: block; margin-top: 6px; color: var(--accent); font-weight: 600; letter-spacing: .08em; }
.vazio { padding: 28px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--muted); }
@media (max-width: 860px) { .mat { grid-template-columns: minmax(0, 1fr); } .capa { position: static; } }
@media (max-width: 480px) { .folha { grid-template-columns: minmax(0, 1fr) auto; } .fl { display: none; } }

/* ---------- Tópico: a folha ---------- */
.leitor { display: grid; grid-template-columns: 216px minmax(0, 760px); gap: clamp(20px, 3.4vw, 48px); justify-content: center; align-items: start; }
.toc { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; display: grid; gap: 2px; padding-right: 4px; }
.toc .eyebrow { margin-bottom: 8px; }
.toc button { all: unset; cursor: pointer; display: block; padding: 6px 10px; border-left: 2px solid var(--line); font-size: .9rem; line-height: 1.3; color: var(--muted); }
.toc button:hover { color: var(--ink); border-color: var(--ink); }
.toc button:focus-visible { outline: 2.5px solid var(--link); }
.toc button.on { color: var(--ink); border-color: var(--c); font-weight: 600; }
.sheet {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow);
  padding: clamp(22px, 4.4vw, 54px) clamp(18px, 4.6vw, 60px) clamp(22px, 4vw, 44px);
}
.sheet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); border-radius: 3px 0 0 3px; }
.sheet-h { display: grid; gap: 9px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1.5px solid var(--ink); position: relative; }
.folio { position: absolute; right: 0; top: 0; margin: 0; font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-h .eyebrow { color: color-mix(in srgb, var(--c) 60%, var(--ink)); padding-right: 110px; }
.sheet-h h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1; font-weight: 800; font-stretch: 80%; letter-spacing: -.012em; max-width: calc(100% - 150px); }
.sheet-h .sub { margin: 0; font: 500 13px var(--mono); color: var(--ink); }
.sheet-h .res { margin: 2px 0 0; font-family: var(--body); font-size: 1.1rem; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.sheet-h .meta { margin: 0; font: 400 12px var(--mono); color: var(--muted); }
.stamp {
  display: none; position: absolute; right: 2px; top: 34px; transform: rotate(-9deg);
  padding: 7px 12px 6px; border: 3px double var(--accent); border-radius: 4px; color: var(--accent);
  font: 600 14px var(--mono); letter-spacing: .14em; text-transform: uppercase; text-align: center; line-height: 1.15; opacity: .86;
}
.stamp small { display: block; font-size: 10px; letter-spacing: .08em; font-weight: 500; }
.sheet.done .stamp { display: block; }
.stamp.slam { animation: slam .6s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes slam {
  0% { transform: perspective(700px) translate3d(46px, -70px, 430px) rotateX(58deg) rotate(-26deg); opacity: 0; }
  58% { transform: perspective(700px) translate3d(0, 0, 0) rotateX(0) rotate(-9deg) scale(1.1); opacity: 1; }
  100% { transform: rotate(-9deg); opacity: .86; }
}
@media (max-width: 980px) { .leitor { grid-template-columns: minmax(0, 760px); } .toc { display: none; } }
@media (max-width: 640px) {
  .sheet-h h1 { max-width: none; }
  .stamp { position: static; justify-self: start; font-size: 11px; margin-top: 6px; }
}

/* Texto corrido */
.prose { font-family: var(--body); font-size: var(--fs); line-height: 1.62; }
.prose > * { max-width: 68ch; }
.prose > .tbl, .prose > .co, .prose > .revisao { max-width: none; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.5em; font-weight: 800; font-stretch: 84%; line-height: 1.1; margin: 1.9em 0 .6em; padding-top: .5em; border-top: 1px solid var(--line); scroll-margin-top: 76px; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.14em; font-weight: 700; line-height: 1.2; margin: 1.5em 0 .45em; scroll-margin-top: 76px; }
.prose h4 { font-size: 1em; font-weight: 700; margin: 1.2em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.35em; }
.prose li { margin: .28em 0; }
.prose li > ul, .prose li > ol { margin: .25em 0 .35em; }
.prose li > p { margin: .3em 0; }
.prose strong { font-weight: 700; }
.prose a { color: var(--link); text-underline-offset: 2px; }
.prose code { font: 500 .84em var(--mono); background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .12em .36em; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; padding: 14px 16px; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 8px; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.8em 0; }
.prose blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.tbl { overflow-x: auto; margin: 0 0 1.25em; border: 1px solid var(--line); border-radius: 8px; }
.tbl table { border-collapse: collapse; width: 100%; font-family: var(--display); font-size: .82em; line-height: 1.38; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl th { font: 600 .78em var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, transparent); border-bottom: 1.5px solid var(--ink); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 600; }
.co { --t: var(--link); margin: 0 0 1.2em; padding: 13px 16px 13px 17px; border-left: 4px solid var(--t); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--t) 8%, var(--paper)); font-size: .95em; line-height: 1.55; }
.co > :last-child { margin-bottom: 0; }
.co-h { margin: 0 0 .45em !important; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-family: var(--display); }
.co-k { font: 600 .68em var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t); }
.co-t { font-weight: 700; font-size: .92em; }
.co-lei { --t: var(--link); }
.co-lei > p:not(.co-h) { font-style: italic; }
.co-atencao { --t: var(--amber); }
.co-pegadinha { --t: var(--accent); }
.co-dica { --t: var(--ok); }
.co-mnemonico { --t: var(--violet); }
.co-exemplo { --t: var(--muted); }
.co-verificar { --t: var(--amber); border: 1.5px dashed var(--amber); border-left-width: 4px; border-left-style: solid; }
.revisao { margin: 2.2em 0 0; padding: 20px 22px 14px; border: 1.5px solid var(--ink); border-radius: 8px; background: color-mix(in srgb, var(--c) 6%, var(--paper)); }
.revisao h2 { margin: 0 0 .55em; padding: 0; border: 0; font-size: 1.25em; }
.revisao ul { margin-bottom: .4em; }

/* Só o essencial: revisão rápida, alertas, macetes e tabelas */
.prose.ess > :not(.revisao):not(.co-atencao):not(.co-pegadinha):not(.co-mnemonico):not(.co-verificar):not(.tbl) { display: none; }
.prose.ess > .revisao { margin-top: 0; }
.prose.ess { display: flex; flex-direction: column; }
.prose.ess > .revisao { order: -1; margin-bottom: 1.4em; }

/* Fichas */
.fichas-sec { margin-top: 34px; padding-top: 26px; border-top: 1.5px solid var(--ink); }
.fichas-sec > h2 { font-size: 1.5rem; font-weight: 800; font-stretch: 84%; margin-bottom: 4px; }
.fichas-sec > p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.deck { display: grid; gap: 14px; perspective: 1400px; }
.card3d { all: unset; cursor: pointer; display: block; width: 100%; perspective: 1400px; border-radius: 12px; }
.card3d:focus-visible { outline: 2.5px solid var(--link); outline-offset: 4px; }
.card-in { display: grid; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .9, .3, 1); }
.card3d.flip .card-in { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-height: 210px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 20px 24px 18px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--c); box-shadow: var(--shadow);
}
.face.back { transform: rotateY(180deg); border-top-color: var(--ink); background: color-mix(in srgb, var(--c) 7%, var(--paper)); }
.face .k { font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.face .tx { align-self: center; font-family: var(--body); font-size: clamp(1.1rem, 2.3vw, 1.42rem); line-height: 1.38; }
.face.front .tx { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.22; }
.face .h { font: 400 12px var(--mono); color: var(--muted); }
.deck-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deck-nav .n { font: 500 13px var(--mono); min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; }
.deck-nav .sp { flex: 1; }
.nb { padding: 9px 15px; border-radius: 9px; border: 1.5px solid var(--ink); background: transparent; font-weight: 700; font-size: .92rem; }
.nb:hover { background: var(--ink); color: var(--bg); }
.fichas-page { max-width: 780px; margin: 0 auto; display: grid; gap: 20px; }
.fichas-page h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; font-stretch: 78%; line-height: 1; }
.fichas-page .orig { font-size: .92rem; color: var(--muted); margin: 0; }
.fichas-page .orig a { color: var(--link); }

.sheet-f { margin-top: 34px; padding-top: 22px; border-top: 1.5px solid var(--ink); display: grid; gap: 22px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pn a { display: grid; gap: 3px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; min-width: 0; }
.pn a:hover { border-color: var(--ink); }
.pn a.r { text-align: right; grid-column: 2; }
.pn small { font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pn b { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 480px) { .pn { grid-template-columns: 1fr; } .pn a.r { grid-column: 1; } }

/* ---------- Busca ---------- */
.busca { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; align-items: start; justify-items: center; padding: 9vh 16px 16px; }
.busca[hidden] { display: none; }
.busca-box { width: min(100%, 680px); max-height: 80vh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); animation: desce .32s cubic-bezier(.2, .9, .3, 1); transform-origin: top; }
@keyframes desce { from { transform: perspective(900px) rotateX(-38deg) translateY(-18px); opacity: 0; } }
.busca-l { font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.busca input { width: 100%; padding: 12px 14px; font: 500 1.1rem var(--display); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 9px; }
.busca input:focus { outline: none; border-color: var(--link); }
.busca-r { list-style: none; margin: 0; padding: 0; overflow: auto; display: grid; gap: 2px; }
.busca-r a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; border-left: 4px solid var(--c); }
.busca-r a:hover, .busca-r a:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.busca-r small { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.busca-r b { font-weight: 700; }
.busca-r span { font-family: var(--body); font-size: .92rem; color: var(--muted); line-height: 1.4; }
.busca-r mark { background: color-mix(in srgb, var(--amber) 30%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.busca-d { margin: 0; font: 400 12px var(--mono); color: var(--muted); }

/* ---------- Sem animação ---------- */
.no-motion .vol, .no-motion .folha, .no-motion .card-in, .no-motion .btn, .no-motion .case { transition: none !important; animation: none !important; }
.no-motion .stamp.slam, .no-motion .busca-box { animation: none; }
.no-motion .vol:hover, .no-motion .vol:focus-visible { transform: translateZ(30px); }
.no-motion .folha:hover, .no-motion .folha:focus-visible { transform: none; }
