/* ──────────────────────────────────────────────────────────────────────────
   aylos · site
   A página é o tesseract: a treliça fica atrás de tudo (canvas fixo) e cada
   capítulo é uma estante. Mesma linguagem do app: uma matiz (--h, --s) governa
   tudo; Sora leve nos títulos, Manrope no texto, JetBrains Mono nos rótulos;
   cantos quase vivos e a célula marcada por cantos em L.
   ──────────────────────────────────────────────────────────────────────── */

@font-face { font-family: 'Sora'; src: url('/static/fonts/sora-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/static/fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --h: 188;
  --s: 90%;
  --void: hsl(var(--h) 30% 1.4%);
  --ink: hsl(var(--h) 16% 93%);
  --ink-2: hsl(var(--h) 10% 78%);
  --ink-3: hsl(var(--h) 8% 60%);
  --acc: hsl(var(--h) var(--s) 66%);
  --acc-hi: hsl(var(--h) var(--s) 80%);
  --acc-ink: hsl(var(--h) 45% 7%);
  --acc-wash: hsl(var(--h) var(--s) 50% / 0.13);
  --line: hsl(var(--h) var(--s) 66% / 0.2);
  --line-strong: hsl(var(--h) var(--s) 66% / 0.48);
  --glass: hsl(var(--h) 30% 3.2% / 0.84);
  --panel: hsl(var(--h) 26% 7% / 0.7);
  --ok: hsl(152 58% 62%);
  --ok-wash: hsl(152 58% 50% / 0.14);
  --bad: hsl(6 82% 68%);
  --bad-wash: hsl(6 82% 55% / 0.14);
  --f-title: 'Sora', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --top: 68px;
  --gut: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:not(.js) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, figure, ul, ol, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
::selection { background: hsl(var(--h) var(--s) 50% / 0.35); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: -9999px; top: 8px; z-index: 50; background: var(--void); padding: 10px 14px; border: 1px solid var(--acc); }
.skip:focus { left: 12px; }
kbd { font: 500 11px/1 var(--f-mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: 3px 6px; border-radius: 3px; color: var(--ink); }

/* ------------------------------------------------------------------ fundo */
.tess {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
.copy { position: relative; }
.copy::before, .shelf-center .copy-center::before, .hero::before {
  content: '';
  position: absolute;
  inset: -60px -90px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, hsl(var(--h) 30% 1.4% / 0.72), hsl(var(--h) 30% 1.4% / 0));
}
.hero, .copy-center { position: relative; }

.tess-still {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 62% 44%, hsl(var(--h) var(--s) 30% / 0.18), transparent 60%),
    linear-gradient(hsl(var(--h) var(--s) 66% / 0.06) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, hsl(var(--h) var(--s) 66% / 0.06) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--void);
  transition: opacity 0.8s;
}
.gl-ready .tess-still { opacity: 0; }

/* ------------------------------------------------------------------ HUD */
.hud-top {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gut);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(hsl(var(--h) 30% 1.4% / 0.86), hsl(var(--h) 30% 1.4% / 0));
}
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 23px/1 var(--f-title); letter-spacing: -0.06em; color: var(--ink); }
.brand svg { width: 28px; height: 28px; color: var(--acc); }
.path {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.path #pathHere { color: var(--ink); }
.hud-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.hud-link { font-size: 14.5px; color: var(--ink-2); }
.hud-link:hover { color: var(--ink); }
.hud-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-2);
}
.hud-icon:hover { border-color: var(--line-strong); color: var(--ink); }
.hud-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hud-icon .i-play { display: none; fill: currentColor; stroke: none; }
.hud-icon[aria-pressed='true'] .i-pause { display: none; }
.hud-icon[aria-pressed='true'] .i-play { display: block; }

.tessera { display: inline-block; width: 8px; height: 8px; background: var(--acc); border-radius: 1px; flex: none; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  font: 600 15px/1.2 var(--f-body);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-solid { background: var(--acc); color: var(--acc-ink); }
.btn-solid:hover { background: var(--acc-hi); }
.btn-line { border-color: var(--line-strong); background: hsl(var(--h) 30% 4% / 0.5); color: var(--ink); }
.btn-line:hover { border-color: var(--acc); background: var(--acc-wash); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.hud-cta { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Bússola */
.compass {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-areas:
    '. up .'
    'left core right'
    'front down back'
    'where where where';
  gap: 4px;
}
.compass a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--glass);
  color: var(--ink-3);
  transition: color 0.2s, border-color 0.2s, background 0.2s, opacity 0.3s;
}
.compass a:hover { color: var(--ink); border-color: var(--line-strong); }
.compass a.is-here { color: var(--acc); border-color: var(--acc); background: var(--acc-wash); }
.compass a.is-closed { opacity: 0.28; pointer-events: none; }
.compass svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.compass span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.c-up { grid-area: up; } .c-left { grid-area: left; } .c-core { grid-area: core; } .c-right { grid-area: right; }
.c-down { grid-area: down; } .c-front { grid-area: front; } .c-back { grid-area: back; }
.compass-where {
  grid-area: where;
  margin-top: 6px;
  font: 500 10px/1.2 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  white-space: nowrap;
  justify-self: center;
}

/* Medidor: os capítulos, como as estantes de um corredor. */
.meter {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}
.meter ol { display: grid; gap: 2px; }
.meter a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 3px 0;
  font: 500 10.5px/1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--h) 8% 46%);
  transition: color 0.25s;
}
.meter a::after { content: ''; width: 10px; height: 1px; background: currentColor; transition: width 0.3s var(--ease); }
.meter a:hover { color: var(--ink-2); }
.meter a.is-here { color: var(--acc); }
.meter a.is-here::after { width: 26px; }

/* Sessão de foco: segue com a pessoa pela página inteira. */
.focus-pill {
  position: fixed;
  top: calc(var(--top) + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 2 * var(--gut));
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--glass);
  font: 500 12px/1 var(--f-mono);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.focus-pill[hidden] { display: none; }
.focus-pill .pulse { width: 8px; height: 8px; border-radius: 1px; background: var(--acc); animation: blink 1.6s ease-in-out infinite; flex: none; }
.focus-label { color: var(--acc); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; white-space: nowrap; }
.focus-card { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.focus-pill time { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.focus-pill button { border: 1px solid var(--line); background: transparent; border-radius: 2px; padding: 6px 10px; font: 500 11px/1 var(--f-mono); color: var(--ink-2); }
.focus-pill button:hover { border-color: var(--bad); color: var(--bad); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ------------------------------------------------------------------ capítulos */
main { position: relative; z-index: 2; overflow-x: clip; }
.ch { position: relative; padding-block: 36vh; }
.shelf {
  width: min(1180px, 100% - 2 * var(--gut));
  margin-inline: auto;
  transform-origin: 50% 50%;
}
/* Com a bússola e o medidor nas laterais, a estante abre espaço para os dois. */
@media (min-width: 1181px) {
  .shelf { width: min(1180px, 100% - 2 * clamp(170px, 13vw, 210px)); }
  .foot { padding-left: 190px; padding-right: 190px; }
}
.js .shelf { will-change: transform, opacity; }
.shelf-split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.shelf-flip .copy { order: 2; }
.shelf-wide { display: grid; gap: clamp(24px, 3vw, 40px); }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.shelf-center { display: grid; justify-items: center; text-align: center; }
.copy-center { display: grid; justify-items: center; }
.copy-center p:not(.where) { max-width: 62ch; }
h2 .line { display: block; }

.where {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font: 500 11.5px/1.2 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
}
.copy-center .where { justify-content: center; }
.where .dir { font-size: 15px; letter-spacing: 0; }
h1, h2 { font-family: var(--f-title); font-weight: 300; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(46px, 7.4vw, 118px); line-height: 0.98; letter-spacing: -0.05em; }
h2 { font-size: clamp(34px, 4.3vw, 64px); line-height: 1.03; letter-spacing: -0.042em; }
h2 em, .big em { font-style: normal; color: var(--acc); }
.copy > p:not(.where):not(.note), .copy-row > p, .copy-center > p:not(.where) {
  margin-top: 20px;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: clamp(16px, 1.25vw, 18.5px);
  text-wrap: pretty;
}
.copy-row > p { margin-top: 0; }
.note {
  margin-top: 22px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  max-width: 44ch;
  color: var(--ink-3);
  font-size: 14.5px;
}
.rules { margin-top: 26px; display: grid; gap: 1px; max-width: 420px; border: 1px solid var(--line); }
.rules li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 14px; background: var(--panel); font-size: 14.5px; }
.rules b { font: 500 13px/1.5 var(--f-mono); color: var(--ink); }
.rules span { color: var(--ink-3); }
.rules li:first-child b { color: var(--ok); }

/* Herói */
.ch-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--top) + 40px) 0 110px;
}
.hero h1 { max-width: 10.5ch; }
.strike { position: relative; display: inline-block; color: var(--ink-3); }
.strike::after {
  content: '';
  position: absolute;
  left: -3%;
  right: -3%;
  top: 55%;
  height: 0.055em;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 0.9s 0.8s var(--ease) forwards;
}
@keyframes strike { to { transform: scaleX(1); } }
.lede { margin-top: 28px; max-width: 42ch; font-size: clamp(17px, 1.45vw, 21px); color: var(--ink-2); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.platforms { margin-top: 28px; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--acc), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* Travessia */
.ch-dive { padding-block: 6vh 22vh; }
.dive-line { position: relative; min-height: 88vh; display: grid; place-content: center; text-align: center; }
.dive-line::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, 120%);
  height: 70%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, hsl(var(--h) 30% 1.4% / 0.78), hsl(var(--h) 30% 1.4% / 0));
}
.big { font: 300 clamp(36px, 6.2vw, 96px)/1.02 var(--f-title); letter-spacing: -0.048em; text-wrap: balance; }
.dirs { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dirs span { padding: 7px 12px; border: 1px solid var(--line); background: var(--glass); font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* ------------------------------------------------------------------ telas */
.screen {
  position: relative;
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.screen::before {
  --c: var(--acc);
  --l: 14px;
  --w: 1.5px;
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}
.screen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font: 500 10.5px/1.3 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.screen-bar > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { flex: none; padding: 3px 8px; border: 1px solid var(--line); border-radius: 2px; color: var(--acc); font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.screen-body { padding: clamp(16px, 2.2vw, 26px); container-type: inline-size; }
.label { font: 500 10.5px/1.3 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.board-msg { min-height: 1.4em; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.board-msg.is-bad { color: var(--bad); }
.board-msg.is-ok { color: var(--ok); }

/* Núcleo */
.nucleo-stage {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 26px;
  padding: 18px clamp(0px, 11vw, 170px);
}
.screen-nucleo { width: min(640px, 100%); text-align: left; }
.mouth {
  position: absolute;
  z-index: 2;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--glass);
  font: 500 11.5px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.mouth:hover { color: var(--acc); border-color: var(--acc); }
.m-up { top: 0; left: 50%; transform: translateX(-50%); }
.m-down { bottom: 0; left: 50%; transform: translateX(-50%); }
.m-left { left: 0; top: 50%; transform: translateY(-50%); }
.m-right { right: 0; top: 50%; transform: translateY(-50%); }
.greet { font: 300 clamp(24px, 3vw, 32px)/1.1 var(--f-title); letter-spacing: -0.03em; }
.greet small { display: block; margin-top: 6px; font: 500 11px/1.3 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.next { margin-top: 20px; padding: 16px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 2px; }
.next-title { margin-top: 6px; font: 400 clamp(18px, 2vw, 21px)/1.25 var(--f-title); letter-spacing: -0.02em; }
.next-meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--ink-3); }
.tag { padding: 2px 8px; border-radius: 2px; background: var(--acc-wash); color: var(--acc-hi); font-size: 12px; }
.diff { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 2px; font: 500 11.5px/1 var(--f-mono); color: var(--ink-2); }
.focus-pick { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.focus-pick button {
  display: grid;
  gap: 2px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  font: 500 13px/1.2 var(--f-mono);
  color: var(--ink);
  text-align: center;
}
.focus-pick button small { font: 400 11px/1.2 var(--f-body); color: var(--ink-3); }
.focus-pick button:hover { border-color: var(--acc); background: var(--acc-wash); }
.tiles { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 2px; transition: border-color 0.2s; }
.tile:hover { border-color: var(--line-strong); }
.tile strong { font: 400 17px/1.2 var(--f-title); letter-spacing: -0.02em; }
.tile small { color: var(--ink-3); font-size: 12.5px; }

/* Lição */
.lesson { display: grid; gap: 18px; }
.lesson-text { position: relative; font-size: 15.5px; color: var(--ink-2); }
.lesson-text b { color: var(--ink); font-weight: 600; }
.cite {
  padding: 0 3px;
  border: 0;
  background: var(--acc-wash);
  border-radius: 2px;
  font: 500 12px/1.4 var(--f-mono);
  color: var(--acc);
}
.cite-pop {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  background: var(--void);
  font: 500 11.5px/1.3 var(--f-mono);
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.lesson-text:has(.cite:hover, .cite:focus-visible, .cite[aria-expanded='true']) .cite-pop { opacity: 1; transform: none; }
.tri { display: grid; justify-items: center; }
.tri svg { width: min(300px, 100%); height: auto; overflow: visible; }
.tri-fill { fill: var(--acc-wash); }
.tri-edge { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linejoin: round; }
.tri-right, .tri-angle { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.tri-lbl { font: 500 11px var(--f-mono); fill: var(--ink-2); text-anchor: middle; }
.tri-dim { fill: var(--ink-3); }
.tri-start { text-anchor: start; }
.tri-theta { font: 400 14px var(--f-title); fill: var(--acc-hi); }
.quiz legend { font: 400 clamp(17px, 1.8vw, 19.5px)/1.35 var(--f-title); letter-spacing: -0.015em; color: var(--ink); }
.options { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.options button {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: hsl(var(--h) 30% 4% / 0.6);
  font: 500 16px/1 var(--f-mono);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.options button:hover:not(:disabled) { border-color: var(--acc); background: var(--acc-wash); }
.options button:disabled { cursor: default; }
.options button.is-right { border-color: var(--ok); background: var(--ok-wash); color: var(--ok); }
.options button.is-wrong { border-color: var(--bad); background: var(--bad-wash); color: var(--bad); }
.options button.is-dim { opacity: 0.45; }
.verdict { margin-top: 12px; min-height: 1.5em; font-size: 14.5px; color: var(--ink-2); }
.verdict b { color: var(--ink); }
.verdict .again { margin-left: 6px; border: 0; background: none; padding: 0; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

/* Revisão */
.review { display: grid; gap: 20px; }
@container (min-width: 560px) { .review { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: start; } }
.card-flip { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--panel); }
.flash-q { font: 400 19px/1.3 var(--f-title); letter-spacing: -0.02em; }
.flash-a { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.flash-a[hidden] { display: none; }
.card-flip > .btn { justify-self: start; }
.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grades[hidden] { display: none; }
.grades button { min-height: 40px; border: 1px solid var(--line); border-radius: 2px; background: transparent; font-size: 13px; }
.grades button:hover, .grades button[aria-pressed='true'] { border-color: var(--acc); background: var(--acc-wash); color: var(--acc-hi); }
.curve svg { width: 100%; height: auto; display: block; overflow: visible; }
.curve figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.curve .axis { stroke: var(--line-strong); stroke-width: 1; }
.curve .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.curve .tick { font: 500 9.5px var(--f-mono); fill: var(--ink-3); }
.curve .c-other { fill: none; stroke: hsl(var(--h) 10% 60% / 0.28); stroke-width: 1.2; }
.curve .c-main { fill: none; stroke: var(--acc); stroke-width: 2.2; }
.curve .c-dot { fill: var(--acc-hi); }
.curve .c-lbl { font: 500 10.5px var(--f-mono); fill: var(--acc-hi); }
.curve .c-90 { font: 500 9.5px var(--f-mono); fill: var(--ink-2); }

/* Quadro */
.energy { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--ink-2); }
.energy b { color: var(--ink); font-weight: 500; }
.ebar { width: 72px; height: 6px; border-radius: 1px; background: hsl(var(--h) 20% 20% / 0.6); overflow: hidden; }
.ebar i { display: block; height: 100%; width: 78%; background: var(--acc); transition: width 0.5s var(--ease); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
@container (max-width: 560px) {
  .board { grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .board .col { scroll-snap-align: start; }
}
.col { min-height: 230px; padding: 10px; border: 1px solid var(--line); border-radius: 2px; background: hsl(var(--h) 26% 6% / 0.45); transition: border-color 0.2s, background 0.2s; }
.col.is-over { border-color: var(--acc); background: var(--acc-wash); }
.col-h { display: flex; justify-content: space-between; margin-bottom: 10px; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.col ul { display: grid; gap: 7px; }
.bcard {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--glass);
  text-align: left;
  font-size: 13.5px;
  line-height: 1.35;
  transition: border-color 0.2s, transform 0.3s var(--ease), opacity 0.3s;
  animation: cardIn 0.45s var(--ease);
}
.bcard:hover { border-color: var(--line-strong); }
.bcard[draggable='true'] { cursor: grab; }
.bcard.is-dragging { opacity: 0.4; }
.bcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bcard .tag { font-size: 11px; padding: 1px 6px; }
.bcard .diff { min-width: 20px; height: 20px; font-size: 10.5px; margin-left: auto; }
.bcard .fmin { font: 500 10.5px/1 var(--f-mono); color: var(--acc); }
.col[data-col='done'] .bcard { color: var(--ink-3); }
.col[data-col='done'] .bcard-title::before { content: '✓ '; color: var(--ok); }
@keyframes cardIn { from { opacity: 0; transform: translateY(-6px); } }
.composer { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.composer input, .proj-new input, .cmd input, select, #joinEmail {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: hsl(var(--h) 30% 3% / 0.7);
  color: var(--ink);
  font-size: 16px;
}
.composer input { flex: 1 1 180px; min-width: 0; }
select { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; font-size: 14px; }
input::placeholder { color: var(--ink-3); }
input:focus, select:focus { outline: none; border-color: var(--acc); }
.float {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font: 500 13px/1 var(--f-mono);
  color: var(--ok);
  animation: floatUp 1.4s var(--ease) forwards;
}
@keyframes floatUp { to { transform: translateY(-36px); opacity: 0; } }

/* Projetos */
.project { display: grid; gap: 16px; }
.proj-head { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--acc) calc(var(--p) * 1%), hsl(var(--h) 20% 18% / 0.7) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%);
  mask: radial-gradient(circle, transparent 54%, #000 55%);
  transition: background 0.4s;
}
.ring span { position: relative; font: 500 13px/1 var(--f-mono); }
.proj-name { font: 400 22px/1.2 var(--f-title); letter-spacing: -0.025em; }
.proj-sub { margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.proj-cards { display: grid; gap: 6px; }
.proj-cards li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); font-size: 14px; animation: cardIn 0.45s var(--ease); }
.proj-cards .st { flex: none; width: 9px; height: 9px; border-radius: 1px; border: 1.5px solid var(--ink-3); }
.proj-cards .st-doing { border-color: var(--acc); background: hsl(var(--h) var(--s) 66% / 0.35); }
.proj-cards .st-done { border-color: var(--ok); background: var(--ok); }
.proj-cards .col-name { margin-left: auto; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.proj-actions { display: grid; gap: 8px; }
.proj-actions select { width: 100%; }
.proj-new { display: flex; gap: 8px; }
.proj-new input { flex: 1; min-width: 0; }

/* Objetivos */
.goals { display: grid; gap: 12px; }
.goal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-chips button, .chat-sugs button {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  font-size: 14px;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.goal-chips button:hover, .chat-sugs button:hover, .goal-chips button[aria-pressed='true'] { border-color: var(--acc); background: var(--acc-wash); }
.goal-plan { min-height: 230px; display: grid; gap: 8px; align-content: start; }
.goal-empty { padding: 26px 16px; border: 1px dashed var(--line); color: var(--ink-3); font-size: 14px; text-align: center; }
.goal-research { font: 500 11.5px/1.5 var(--f-mono); color: var(--ink-3); }
.goal-research::after { content: '▍'; animation: blink 0.8s steps(1) infinite; color: var(--acc); }
.meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); animation: cardIn 0.45s var(--ease) both; }
.meta-t { font-size: 14.5px; }
.meta-c { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.meta-c span { padding: 1px 6px; border: 1px solid var(--line); border-radius: 2px; font: 500 10.5px/1.5 var(--f-mono); color: var(--ink-2); }
.toggle {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 6px 0;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acc);
}
.toggle i, .mod i { position: relative; width: 32px; height: 18px; border-radius: 9px; background: var(--acc-wash); border: 1px solid var(--acc); transition: background 0.2s, border-color 0.2s; flex: none; }
.toggle i::after, .mod i::after { content: ''; position: absolute; top: 2px; left: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); transition: left 0.25s var(--ease), background 0.2s; }
.toggle[aria-pressed='false'] { color: var(--ink-3); }
.toggle[aria-pressed='false'] i { background: transparent; border-color: var(--ink-3); }
.toggle[aria-pressed='false'] i::after { left: 2px; background: var(--ink-3); }
.goal-foot { margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* Papers */
.paper { display: grid; gap: 18px; }
@container (min-width: 560px) { .paper { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: stretch; } }
.pdf-stage { position: relative; height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: hsl(var(--h) 14% 10%); }
.pdf {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 300px;
  padding: 22px 22px 26px;
  background: hsl(var(--h) 12% 93%);
  color: hsl(var(--h) 20% 12%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform-origin: 0 0;
  transition: transform 0.9s var(--ease);
  transform: translateX(-50%);
}
.pdf-title { font: 600 13px/1.25 var(--f-title); letter-spacing: -0.01em; }
.pdf-authors { margin-top: 4px; font: 500 8px/1.3 var(--f-mono); color: hsl(var(--h) 8% 40%); text-transform: uppercase; letter-spacing: 0.08em; }
.pdf-block { position: relative; margin-top: 12px; }
.pdf-h { font: 700 8.5px/1.3 var(--f-body); margin-bottom: 4px; }
.pdf-block i { display: block; height: 4px; margin: 4px 0; border-radius: 1px; background: hsl(var(--h) 8% 70%); }
.pdf-block i.short { width: 62%; }
.pdf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pdf-fig { margin-top: 6px; height: 46px; display: flex; align-items: end; gap: 6px; padding: 6px; border: 1px solid hsl(var(--h) 8% 75%); }
.pdf-fig span { flex: 1; background: hsl(var(--h) 30% 45%); }
.pdf-fig span:first-child { height: 45%; background: hsl(var(--h) 8% 62%); }
.pdf-fig span:last-child { height: 85%; }
.pdf table { width: 100%; border-collapse: collapse; font: 500 7px/1.6 var(--f-mono); margin: 2px 0 4px; }
.pdf th, .pdf td { padding: 1px 2px; border-bottom: 1px solid hsl(var(--h) 8% 78%); text-align: left; }
.pdf td:not(:first-child) { color: hsl(var(--h) 40% 35%); letter-spacing: -1px; }
.pdf-hl {
  position: absolute;
  border: 1.5px solid hsl(var(--h) var(--s) 42%);
  background: hsl(var(--h) var(--s) 55% / 0.16);
  border-radius: 2px;
  pointer-events: none;
  transition: all 0.9s var(--ease);
}
.narration { display: grid; gap: 10px; align-content: start; }
.narration p:not(.label) { font-size: 15.5px; color: var(--ink-2); min-height: 6.6em; }
.narration .label { color: var(--acc); }
.narr-nav { display: flex; gap: 8px; }
.narr-nav .btn:first-child { padding: 0 12px; }

/* Assistente */
.chat { display: grid; gap: 12px; }
.chat-log { min-height: 210px; max-height: 300px; overflow-y: auto; display: grid; gap: 10px; align-content: start; padding-right: 4px; }
.chat-hint { color: var(--ink-3); font-size: 14px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 2px; font-size: 14.5px; line-height: 1.5; animation: cardIn 0.35s var(--ease); white-space: pre-line; }
.msg-me { justify-self: end; background: var(--acc-wash); border: 1px solid var(--line-strong); }
.msg-ai { justify-self: start; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); }
.msg-ai .tool { display: block; margin-bottom: 6px; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--acc); }
.msg-ai.is-typing::after { content: '▍'; color: var(--acc); animation: blink 0.8s steps(1) infinite; }
.chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-sugs button { font-size: 13.5px; padding: 8px 11px; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line-strong); border-radius: 2px; background: hsl(var(--h) 30% 3% / 0.8); }
.cmd:focus-within { border-color: var(--acc); }
.cmd-k { font: 500 11px/1 var(--f-mono); color: var(--ink-3); }
.cmd input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 4px; }
.cmd button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 2px; background: transparent; font: 500 16px/1 var(--f-mono); color: var(--acc); }

/* Você */
.hues { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.hues button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--glass);
  font-size: 14px;
  color: var(--ink-2);
}
.hues button i { width: 14px; height: 14px; border-radius: 2px; background: hsl(var(--sw) var(--ss) 62%); }
.hues button[aria-checked='true'] { border-color: var(--acc); color: var(--ink); background: var(--acc-wash); }
.journey { display: grid; gap: 14px; }
.j-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.j-stats p { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); }
.j-stats strong { font: 300 28px/1 var(--f-title); letter-spacing: -0.03em; }
.j-log { display: grid; gap: 1px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); }
.j-log li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 9px 12px; background: var(--panel); font-size: 14px; animation: cardIn 0.4s var(--ease); }
.j-log time { font: 500 11px/1.9 var(--f-mono); color: var(--ink-3); }
.j-log .cat { font: 500 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); margin-right: 6px; }
.j-log .j-empty { display: block; color: var(--ink-3); font-size: 14px; }

/* Módulos */
.modules { display: grid; gap: 8px; }
.mod { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--panel); cursor: pointer; }
.mod span { display: grid; gap: 2px; }
.mod b { font: 400 18px/1.2 var(--f-title); letter-spacing: -0.02em; font-weight: 400; }
.mod small { color: var(--ink-3); font-size: 13px; }
.mod i { margin-left: auto; }
.mod input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mod input:not(:checked) + i { background: transparent; border-color: var(--ink-3); }
.mod input:not(:checked) + i::after { left: 2px; background: var(--ink-3); }
.mod:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
.mod-sealed { border-style: dashed; border-color: var(--line); background: transparent; opacity: 0.55; cursor: default; }
.mod-sealed i { border-style: dashed; border-color: var(--ink-3); background: transparent; }
.mod-sealed i::after { display: none; }

/* Planos */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.plan .screen-body { display: grid; gap: 6px; align-content: start; }
.price { font: 300 clamp(40px, 4vw, 56px)/1 var(--f-title); letter-spacing: -0.04em; }
.price small { font: 400 16px/1 var(--f-body); letter-spacing: 0; color: var(--ink-3); }
.price-alt { font-size: 14px; color: var(--ink-3); }
.plan ul { margin-top: 18px; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 20px; font-size: 15px; color: var(--ink-2); }
.plan li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 1px; background: var(--acc); }
.plan-pro { border-color: var(--line-strong); }

/* Convite */
.ch-gate { min-height: 100svh; display: flex; align-items: center; padding-block: 24vh 18vh; }
.gate { display: grid; }
.gate-panel { width: min(540px, 100%); }
.gate-panel .screen-body { padding: clamp(22px, 3vw, 36px); }
.gate-lede { margin-top: 16px; color: var(--ink-2); font-size: 16.5px; max-width: 40ch; }
#joinForm { margin-top: 26px; }
#joinForm label { display: block; margin-bottom: 8px; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; min-height: 48px; }
.field .btn { min-height: 48px; }
#result { margin-top: 10px; min-height: 1.4em; font-size: 14px; color: var(--ink-2); }
#result.is-bad { color: var(--bad); }
.gate-foot { margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.gate-foot a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.gate-foot a:hover { color: var(--acc); }
.gate-done { max-width: 620px; }
.gate-done[hidden] { display: none; }
.gate-done .big { margin-bottom: 18px; }
.gate-done p:last-child { color: var(--ink-2); font-size: 17px; max-width: 42ch; }
.gate-done:focus { outline: none; }

/* Rodapé */
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding: 34px var(--gut) calc(34px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: hsl(var(--h) 30% 1.4% / 0.86);
  font-size: 14px;
  color: var(--ink-3);
}
.foot .brand { font-size: 20px; }
.foot .brand svg { width: 22px; height: 22px; }
.foot nav { margin-left: auto; display: flex; gap: 22px; }
.foot nav a { color: var(--ink-2); }
.foot nav a:hover { color: var(--acc); }

.dissolve { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ------------------------------------------------------------------ larguras */
@media (max-width: 1180px) {
  .meter { display: none; }
  body { padding-bottom: 0; }
  .compass {
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: hsl(var(--h) 30% 2% / 0.9);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .compass a { width: auto; min-width: 46px; height: 48px; padding: 0 6px; border-color: transparent; background: transparent; display: grid; grid-template-rows: auto auto; gap: 2px; align-content: center; }
  .compass span { position: static; width: auto; height: auto; clip: auto; overflow: visible; font: 500 9px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
  .compass-where { display: none; }
  .c-up { order: 4; } .c-left { order: 2; } .c-core { order: 1; } .c-right { order: 3; } .c-down { order: 5; } .c-front { order: 6; } .c-back { order: 7; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .ch-gate { padding-bottom: 22vh; }
}

@media (max-width: 900px) {
  .shelf-split, .copy-row, .plans { grid-template-columns: minmax(0, 1fr); }
  .shelf-flip .copy { order: 0; }
  .copy-row { align-items: start; }
  .ch:not(.ch-hero):not(.ch-dive) { padding-block: 30vh; }
  /* O hipercubo sobe para o alto da tela; o texto fica embaixo dele. */
  .ch-hero { align-items: flex-end; padding-top: 46svh; padding-bottom: 120px; }
  .scroll-cue { display: none; }
}

@media (max-width: 760px) {
  :root { --top: 58px; }
  .path { display: none; }
  .hud-link { display: none; }
  .hud-actions { gap: 8px; }
  .brand { font-size: 21px; }
  .brand svg { width: 24px; height: 24px; }
  .ch-hero { padding-top: 42svh; }
  .hero h1 { font-size: clamp(40px, 12vw, 64px); }
  .lede { margin-top: 20px; }
  .actions { margin-top: 26px; }
  .actions .btn { flex: 1 1 auto; }
  .nucleo-stage { padding: 0; margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .screen-nucleo { grid-column: 1 / -1; order: -1; }
  .mouth { position: static; transform: none; text-align: center; padding: 12px 8px; }
  .focus-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; }
  .tile .label { grid-column: 1 / -1; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-pill .focus-label { display: none; }
  .field { flex-direction: column; }
  .foot nav { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
  .hud-cta { padding: 0 12px; font-size: 13px; }
  .hud-icon { width: 34px; height: 34px; }
  .compass a { min-width: 40px; padding: 0 3px; }
  .compass span { font-size: 8px; letter-spacing: 0.02em; }
  .j-stats strong { font-size: 22px; }
  .screen-bar { padding: 8px 12px; }
}

/* Sem movimento: a pessoa pediu, ou apertou pausa. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.is-still *, .is-still *::before, .is-still *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
.is-still .shelf { transform: none !important; }

.ch.is-closed .screen { opacity: 0.32; filter: grayscale(1); pointer-events: none; transition: opacity 0.4s, filter 0.4s; }
