/* Estilos do site: a primeira parte é o radar.css do protótipo (prototipo/v3/combinada/radar.css) sem mudança de regra, a não ser o ícone do
   tema (a classe .is-light vira o data-theme que o THEME_SCRIPT sempre grava); a segunda é o que o site precisa e o protótipo não tem. */
/* Radar · versão combinada (futurista + os três caminhos da direção ux)
   Estilo de app "data terminal" (tasteskill, seed 1076281238): algarismos tabulares, e toda seleção marcada
   pela mesma linha de 1px na cor de destaque. A única cor de dado é a etiqueta de facilidade A–E.
   Dois temas: o escuro (poços mais escuros que o chão) e a versão diurna (cartões claros sobre chão cinza).
   O tema segue o sistema; a escolha da pessoa fica em localStorage; ?tema=claro|escuro força um deles.

   Grade: coluna de 1184px centrada (margens iguais de 32px abaixo de 1248px).
   Cabeçalho: 1fr + 440px com vão de 24px -> 720 + 24 + 440 = 1184.
   Caminhos: 720 - 2 × 20 de respiro = 680 -> rótulo 364 + 20 + controles 296.
   Em alta: 1.6fr + 1fr + 1fr com vão de 24px -> 505 + 24 + 316 + 24 + 316 = 1185 (arredondamento). */

/* Public Sans do próprio site (variável, pesos 400 a 700; licença OFL em assets/fonts/OFL.txt), no lugar do Google Fonts: sem pedir nada a terceiros.
   Dois arquivos por faixa de caracteres; o navegador só baixa o que a página usa (o latin vai com preload no <head>). */
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #171719;
  --surface: #131217;
  --raised: #212023;
  --hover: #1d1c21;
  --press: #2c2b31;
  --border: #2a292e;
  --rule: #1f1e23;
  --control: #3a3a3e;
  --control-hover: #55555a;
  --track: #2a292f;
  --text: #ffffff;
  --muted: #8a8c92;
  --accent: #5b9fe9;
  --primary: #ffffff;
  --primary-ink: #111113;
  --primary-hover: #e4e4e7;
  --pill-warning-bg: #2a2416; --pill-warning-ink: #d9a441;
  --pill-negative-bg: #2c1a20; --pill-negative-ink: #e5566f;
  --pill-neutral-bg: #2a292e; --pill-neutral-ink: #c9cacd;
  --ga: #00843d; --gb: #5bb031; --gc: #e8b600; --gd: #f07d00; --ge: #d7262c;
  --sel-bg: #2c4a6e;
  --well: #131217; --chip: #212023; --chip-on: #212023;
  --tip-bg: #2c2b31; --tip-shadow: rgba(0, 0, 0, .45);
  --backdrop: rgba(0, 0, 0, .58); --sheet-shadow: rgba(0, 0, 0, .42);
  /* o radar lê estas cores (radar.js) */
  --scope-ring: #2a292f; --scope-tick: #3a3a3e; --scope-hl: #ffffff;
  --scope-sweep: rgba(91, 159, 233, .07); --scope-sector: rgba(91, 159, 233, .10); --blip-base: .5;

  --font: "Public Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-title: 28px; --fs-section: 20px; --fs-card: 16px; --fs-body: 14px; --fs-small: 12px;

  --col: 1184px; --gutter: 32px; --gap: 24px;
  --radius-card: 6px; --radius-control: 999px; --radius-chip: 4px;
  --control-h: 34px;
  --sticky-h: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms; --t-hover: 180ms; --t-ui: 240ms;
}
/* versão diurna: a mesma identidade, cartões claros sobre um chão cinza */
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #f1f2f4; --surface: #ffffff; --raised: #ffffff; --hover: #f0f2f5; --press: #e5e8ec;
  --border: #dde0e5; --rule: #eceef1; --control: #c5c9d0; --control-hover: #8f959e; --track: #e0e3e8;
  --text: #0d0e10; --muted: #5b5f67; --accent: #1d6fd6;
  --primary: #0d0e10; --primary-ink: #ffffff; --primary-hover: #2b2e34;
  --pill-warning-bg: #fcefd4; --pill-warning-ink: #7a4b00;
  --pill-negative-bg: #fde6e9; --pill-negative-ink: #a3172f;
  --pill-neutral-bg: #eceef1; --pill-neutral-ink: #3b3e45;
  --sel-bg: #cfe1f8;
  --well: #eef0f3; --chip: #eef0f3; --chip-on: #e3e6eb;
  --tip-bg: #ffffff; --tip-shadow: rgba(16, 24, 40, .16);
  --backdrop: rgba(13, 14, 16, .34); --sheet-shadow: rgba(16, 24, 40, .16);
  --scope-ring: #e0e3e8; --scope-tick: #c5c9d0; --scope-hl: #0d0e10;
  --scope-sweep: rgba(29, 111, 214, .07); --scope-sector: rgba(29, 111, 214, .08); --blip-base: .72;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #f1f2f4; --surface: #ffffff; --raised: #ffffff; --hover: #f0f2f5; --press: #e5e8ec;
    --border: #dde0e5; --rule: #eceef1; --control: #c5c9d0; --control-hover: #8f959e; --track: #e0e3e8;
    --text: #0d0e10; --muted: #5b5f67; --accent: #1d6fd6;
    --primary: #0d0e10; --primary-ink: #ffffff; --primary-hover: #2b2e34;
    --pill-warning-bg: #fcefd4; --pill-warning-ink: #7a4b00;
    --pill-negative-bg: #fde6e9; --pill-negative-ink: #a3172f;
    --pill-neutral-bg: #eceef1; --pill-neutral-ink: #3b3e45;
    --sel-bg: #cfe1f8;
    --well: #eef0f3; --chip: #eef0f3; --chip-on: #e3e6eb;
    --tip-bg: #ffffff; --tip-shadow: rgba(16, 24, 40, .16);
    --backdrop: rgba(13, 14, 16, .34); --sheet-shadow: rgba(16, 24, 40, .16);
    --scope-ring: #e0e3e8; --scope-tick: #c5c9d0; --scope-hl: #0d0e10;
    --scope-sweep: rgba(29, 111, 214, .07); --scope-sector: rgba(29, 111, 214, .08); --blip-base: .72;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 var(--fs-body)/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
html.locked { overflow: hidden; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--sel-bg); color: var(--text); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: var(--radius-control); text-decoration: none; }
.skip:focus { top: 8px; }

.blk { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }

/* ---------- barra do topo ---------- */
.topbar { height: 52px; }
.topbar-in { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-name { font-weight: 400; white-space: nowrap; }
.brand-name strong { font-weight: 700; }
.mark { color: var(--text); flex: none; }
.mark-sweep { transform-box: view-box; transform-origin: 12px 19px; }
.scan { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.scan b { color: var(--text); font-weight: 500; }
.s-short { display: none; }
.scan-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.scan-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; }
.toplink { font-size: 13px; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.toplink:hover { text-decoration-color: var(--text); }
/* o link dos guias só aparece onde cabe: o texto da varredura (que encolhe e quebra linha) já ocupa 2 a 4 linhas entre 641 e 900px, e mais um
   link o faria quebrar até perto de 1000px; no telefone e no tablet, os guias ficam no rodapé */
@media (max-width: 999px) { .toplink-guides { display: none; } }

/* sobre o Radar: botão "i" ao lado do nome, abre um texto curto */
.about { position: relative; display: inline-flex; margin-left: -6px; }
.about-btn {
  width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--control);
  border-radius: 50%; background: transparent; color: var(--muted);
  transition: color var(--t-hover) ease, border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.about-btn:hover, .about-btn[aria-expanded="true"] { color: var(--text); border-color: var(--control-hover); background: var(--press); }
.about-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70; width: 340px; max-width: calc(100vw - 32px);
  padding: 16px 18px; background: var(--raised); color: var(--text); font-size: 14px; line-height: 1.55;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 16px 36px var(--tip-shadow); /* taste-skill-ignore: texto que flutua sobre a página */
}
/* uma ponte invisível sobre o vão, para o ponteiro passar do botão para o texto */
.about-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.about-pop p + p { margin-top: 8px; }
.about-h { font-weight: 600; }
.about-link { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 500; text-underline-offset: 3px; }
.about-link:hover { text-decoration-thickness: 2px; }

/* idioma: por enquanto só mostra onde vai morar */
.lang { position: relative; display: inline-flex; align-items: center; }
.lang-ico { position: absolute; left: 12px; top: 50%; margin-top: -8px; color: var(--muted); pointer-events: none; }
.lang select {
  height: var(--control-h); padding: 0 32px 0 34px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a8c92' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--control); border-radius: var(--radius-control); font-size: 13px;
  transition: border-color var(--t-hover) ease;
}
.lang select:hover { border-color: var(--control-hover); }
.lang select option { background: var(--raised); color: var(--text); }
.lang-note {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; white-space: nowrap;
  background: var(--tip-bg); color: var(--text); padding: 6px 10px; border-radius: var(--radius-chip); font-size: 12px;
  box-shadow: 0 8px 20px var(--tip-shadow); /* taste-skill-ignore: aviso que flutua */
}
.lang-note:empty { display: none; }
/* tema: segue o sistema; o botão troca e a escolha fica guardada */
.theme-btn {
  width: var(--control-h); height: var(--control-h); flex: none; display: grid; place-items: center;
  border: 1px solid var(--control); border-radius: 50%; background: transparent; color: var(--text);
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) ease;
}
.theme-btn:hover { background: var(--press); border-color: var(--control-hover); }
.theme-btn:active { transform: scale(.94); }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }

/* ---------- página ---------- */
.page { display: flex; flex-direction: column; padding-bottom: 8px; }

/* cabeçalho: título à esquerda, o radar da seleção à direita */
.head {
  width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px); grid-template-rows: auto 1fr auto;
  grid-template-areas: "text scope" "paths scope" "start start"; gap: 20px var(--gap); padding-top: 24px;
}
.head > .blk { width: auto; margin: 0; }
.head-text { grid-area: text; }
.paths { grid-area: paths; align-self: end; }
.head > .scope { grid-area: scope; align-self: start; }
.head > .start { grid-area: start; }

/* "Por onde começar": os guias, um de cada vez. No computador, uma faixa da largura toda embaixo dos caminhos e do radar (na coluna
   do radar ela abria um buraco na coluna da esquerda): o título, o guia numa linha e os pontos. Até 900px, um painel logo depois do
   título. No HTML é uma lista que rola de lado; o ponto aceso enche em 7 s e o navegador passa para o próximo guia (client/start.ts) */
.start {
  min-width: 0; background: var(--surface); border-radius: var(--radius-card); padding: 12px 16px 12px 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 28px;
}
.start-head { display: flex; flex-direction: column; gap: 1px; }
.start-head h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.start-head .link { font-size: 13px; white-space: nowrap; }
.start-track {
  display: flex; gap: 16px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.start-track::-webkit-scrollbar { display: none; }
.start-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; align-self: center; }
.start-go { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; color: var(--text); text-decoration: none; }
.start-go strong { font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: underline 1px transparent; text-underline-offset: 4px; transition: text-decoration-color var(--t-hover) ease; }
.start-go:hover strong { text-decoration-color: var(--accent); }
.start-go span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.start-ctl { display: flex; align-items: center; gap: 4px; }
.start-dot { position: relative; width: 28px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.start-dot::before, .start-dot i { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 1px; }
.start-dot::before { background: var(--track); }
.start-dot i { background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.start-dot.on i { transform: none; }
.start-pause {
  margin-left: 8px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--control); border-radius: 50%; background: transparent; color: var(--muted);
  transition: color var(--t-hover) ease, border-color var(--t-hover) ease;
}
.start-pause:hover { color: var(--text); border-color: var(--control-hover); }
.start-pause .i-play, .start.stopped .start-pause .i-pause { display: none; }
.start.stopped .start-pause .i-play { display: block; }
@keyframes start-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .start-dot.on i { animation: start-fill 7s linear forwards; }
  .start:hover .start-dot.on i, .start:has(:focus-visible) .start-dot.on i, .start.stopped .start-dot.on i, .start.away .start-dot.on i { animation-play-state: paused; }
}
/* com movimento reduzido nada passa sozinho: o botão de pausa não tem o que pausar */
@media (prefers-reduced-motion: reduce) { .start-pause { display: none; } }
html:not(.js) .start-ctl { display: none; }

/* os três caminhos: um painel com três linhas, rótulo à esquerda e o controle numa coluna de 296px */
.paths { background: var(--surface); border-radius: var(--radius-card); padding: 2px 20px; }
.path { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 8px 20px; align-items: center; padding: 14px 0; }
.path + .path { border-top: 1px solid var(--rule); }
.path h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.path-k p { margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.path-do { min-width: 0; }
.path-do > .btn { width: 100%; }
.os-row { display: flex; gap: 8px; }
.os-row .btn { flex: 1 1 auto; min-width: 0; padding: 0 9px; gap: 5px; }
.os-row .btn .num { color: var(--muted); font-weight: 400; }
.ex, .lead {
  display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px;
  transition: text-decoration-color var(--t-hover) ease;
}
.ex:hover, .lead:hover { text-decoration-color: var(--accent); }
.quick-k { margin-right: 2px; }
.combo { position: relative; }
.combo input {
  width: 100%; height: var(--control-h); padding: 0 14px; background: var(--ground);
  border: 1px solid var(--control); border-radius: var(--radius-control); font-size: 14px;
  transition: border-color var(--t-hover) ease;
}
.combo input:hover { border-color: var(--control-hover); }
.combo input::placeholder { color: var(--muted); }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; list-style: none; margin: 0; padding: 4px;
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 16px 32px var(--tip-shadow); /* taste-skill-ignore: lista de sugestões, flutua */
  max-height: 336px; overflow-y: auto;
}
.combo-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--radius-chip); font-size: 14px; cursor: pointer; }
.combo-list li .sm { font-size: 12px; color: var(--muted); white-space: nowrap; }
.combo-list li:hover, .combo-list li[aria-selected="true"] { background: var(--press); }
.combo-list li[aria-selected="true"] > span:first-child { text-decoration: underline 1px var(--accent); text-underline-offset: 4px; }
.combo-list li.none { color: var(--muted); cursor: default; }
.combo-list li.none:hover { background: none; }
h1 { font-size: var(--fs-title); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; max-width: 22em; }
.finding { margin-top: 14px; font-size: 16px; line-height: 1.5; max-width: 40em; }
.finding strong { font-weight: 600; }
/* a frase de abertura do início: o mesmo corpo do .finding, em cor de apoio */
.lede { margin-top: 14px; font-size: 16px; line-height: 1.5; max-width: 40em; color: var(--muted); }
.stamp { margin-top: 8px; font-size: 13px; color: var(--muted); }
/* três leituras da seleção: barra na proporção verdadeira, as duas pontas escritas */
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 12px 0 0; }
.readouts > div { position: relative; min-width: 0; padding-bottom: 10px; }
.readouts dt { font-size: 12px; line-height: 1.3; color: var(--muted); }
.readouts dd { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.readouts dd b { font-size: 18px; font-weight: 500; color: var(--text); }
.st-scan { display: none; }
.swap-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-top: 14px; }
.swap-foot p { font-size: 14px; color: var(--muted); }
.ro-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.ro-bar i { position: absolute; inset: 0; background: var(--muted); border-radius: 2px; transform-origin: 0 50%; transform: scaleX(0); }
@media (prefers-reduced-motion: no-preference) { .ro-bar i { transition: transform 700ms var(--ease-out); } }

.scope { background: var(--surface); border-radius: var(--radius-card); padding: 16px 16px 14px; }
.scope-stage { position: relative; }
.scope canvas { display: block; width: 100%; height: 240px; touch-action: manipulation; }
.scope figcaption { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.scope figcaption #scope-sel { color: var(--text); }
.scope-tip {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  background: var(--tip-bg); color: var(--text); border-radius: var(--radius-chip);
  padding: 6px 10px; font-size: 12px; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 8px 20px var(--tip-shadow); /* taste-skill-ignore: tooltip que flutua */
}
.scope-tip b { font-weight: 600; }
.scope-tip span { color: var(--muted); }
/* sem JavaScript: o palco do radar (o canvas ficaria vazio) e os controles dos caminhos que só funcionam com ele somem;
   as leituras, a legenda e as linhas de texto dos caminhos continuam */
html:not(.js) .scope-stage, html:not(.js) .path-do, html:not(.js) #quick-swap { display: none; }

/* ---------- barra de filtros (vale para a página inteira) ---------- */
.sentinel { height: 1px; }
.filters { position: sticky; top: 0; z-index: 30; background: var(--ground); margin-top: 23px; padding: 12px 0; }
.filters.stuck { border-bottom: 1px solid var(--border); }
.frow1 { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.frow2 { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-top: 12px; }

.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-legend { float: left; padding: 0; margin-right: 14px; line-height: var(--control-h); color: var(--muted); font-size: 13px; }
.seg-opts { position: relative; display: inline-flex; align-items: stretch; gap: 22px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label > span, .seg button {
  display: inline-flex; align-items: center; gap: 6px; height: var(--control-h);
  color: var(--muted); font-size: 14px; white-space: nowrap; transition: color var(--t-hover) ease;
}
.seg button { background: none; border: 0; padding: 0; }
.seg label:hover > span, .seg button:hover { color: var(--text); }
.seg input:checked + span, .seg button[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.seg b { font-weight: 500; color: var(--text); }
.l-short { display: none; }
.sel-line {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; background: var(--accent);
  transform-origin: 0 0; transform: scaleX(0); pointer-events: none;
}
.sel-line.go { transition: transform 360ms var(--ease-out); }

.search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.search svg { position: absolute; left: 13px; top: 50%; margin-top: -8px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: var(--control-h); padding: 0 14px 0 37px;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control);
  font-size: 14px; outline-offset: 1px;
}
.search input::placeholder { color: var(--muted); }
.filters .ftoggle { display: none; }
/* Limpar filtros: entre o Mostrar e a busca; apagado, guarda o lugar. O balão embaixo lista os filtros ligados: aparece com o mouse
   em cima (só em telas com mouse) ou com o foco do teclado, deixa o mouse passar para dentro dele (a ponte do ::before) e sai com o Esc */
.clear-wrap { position: relative; display: inline-flex; flex: none; }
.clear-pop {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; min-width: 200px; max-width: 320px;
  background: var(--tip-bg); color: var(--text); border-radius: var(--radius-chip); padding: 8px 12px; font-size: 12px; line-height: 1.55;
  box-shadow: 0 8px 20px var(--tip-shadow); /* taste-skill-ignore: balão que flutua */
}
.clear-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.clear-pop .pop-t { display: block; margin-bottom: 2px; color: var(--muted); }
.clear-pop .pop-i { display: block; }
.clear-pop b { font-weight: 600; }
@media (hover: hover) { .clear-wrap:hover .clear-all.on + .clear-pop:not(:empty) { display: block; } }
.clear-all.on:focus-visible + .clear-pop:not(:empty) { display: block; }
.clear-wrap.pop-off .clear-pop { display: none !important; }
.clear-all { visibility: hidden; opacity: 0; flex: none; }
.clear-all.on { visibility: visible; opacity: 1; }
/* apagado, o botão leva `hidden` (some para o teclado e para leitores de tela), mas guarda o lugar: a regra global [hidden] o tiraria do fluxo */
.clear-all[hidden] { display: inline-flex !important; }
.clear-all .num { color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: no-preference) {
  .clear-all { transition: opacity 200ms ease, visibility 0s linear 200ms, background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) ease; }
  .clear-all.on { transition: opacity 200ms ease, visibility 0s, background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) ease; }
}

.sel { display: inline-flex; align-items: center; gap: 8px; }
.sel > span { font-size: 13px; color: var(--muted); }
.sel select {
  height: var(--control-h); padding: 0 34px 0 14px; appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a8c92' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--control); border-radius: var(--radius-control); font-size: 14px; cursor: pointer;
}
.sel select:hover { border-color: var(--control-hover); }
#f-cat { width: 200px; }
#f-cost { width: 196px; }
#f-ease { width: 112px; }
#f-os { width: 124px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.altchip-slot:empty { display: none; }
.altchip { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 12px; border-radius: var(--radius-control); background: var(--chip); font-size: 13px; }
.altchip::after { content: ""; position: absolute; left: 12px; right: 34px; bottom: 0; height: 1px; background: var(--accent); }
.altchip button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; color: var(--muted); }
.altchip button:hover { color: var(--text); background: var(--press); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h);
  padding: 0 16px; border-radius: var(--radius-control); border: 1px solid transparent;
  font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; border-color: var(--control); }
.btn.ghost:hover { background: var(--press); border-color: var(--control-hover); }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.text { height: auto; padding: 4px 2px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); font-weight: 400; }
.btn.text:hover { text-decoration-color: var(--text); }
.btn .num { color: var(--muted); font-weight: 400; }

/* ---------- categorias ---------- */
.chips { margin-top: 4px; }
.chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border: 0; border-radius: var(--radius-control); background: var(--surface); font-size: 13px;
  transition: background-color var(--t-hover) ease, transform var(--t-press) ease;
}
.chip:hover { background: var(--chip-on); }
.chip:active { transform: scale(.97); }
.chip .num { color: var(--muted); }
.chip.zero { color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--chip-on); font-weight: 600; }
.chip[aria-pressed="true"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 1px; background: var(--accent); }

/* ---------- seções ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.sec-head h2, .legend h2, .app h2 { font-size: var(--fs-section); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.sec-head p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.alta { margin-top: 40px; scroll-margin-top: calc(var(--sticky-h) + 16px); }
.work { margin-top: 56px; scroll-margin-top: calc(var(--sticky-h) + 8px); }

.collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 420ms var(--ease-out); }
.collapse.closed { grid-template-rows: 0fr; }
.collapse-in { min-height: 0; overflow: hidden; }
/* "Em alta" recolhido na última visita: já nasce fechado, sem abrir e fechar no carregamento (o navegador tira a classe depois de pôr o .closed) */
.hot-closed #alta-body { grid-template-rows: 0fr; }

/* ---------- Em alta ---------- */
.rank-switch { display: none; }
.ranks { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.rank { background: var(--surface); border-radius: var(--radius-card); padding: 16px 16px 6px; }
.rank header { margin-bottom: 6px; }
.rank h3 { font-size: var(--fs-card); font-weight: 600; line-height: 1.3; }
.rank header p { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist > li + li { border-top: 1px solid var(--rule); }
.rrow {
  display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  width: calc(100% + 16px); margin: 0 -8px; min-height: 50px; padding: 5px 8px;
  border: 0; border-radius: var(--radius-chip); background: transparent; text-align: left;
  color: inherit; text-decoration: none; /* no site, a linha é um link para a página do programa */
  transition: background-color var(--t-hover) ease, transform var(--t-press) ease;
}
.rrow:hover, .rrow.hl { background: var(--hover); }
.rrow:active { transform: scale(.99); }
.rank-growth .rrow { grid-template-columns: 18px 20px minmax(0, 1fr) 120px 92px; }
.rk { font-size: 12px; color: var(--muted); text-align: right; }
.rn { min-width: 0; display: flex; flex-direction: column; }
.rname { font-size: 14px; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsub { font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv { text-align: right; font-size: 14px; font-weight: 500; white-space: nowrap; line-height: 1.35; }
.rv small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.new-dot { position: relative; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.new-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; }
.rlist .empty, .rlist .err { padding: 14px 0 16px; font-size: 13px; color: var(--muted); }
.rlist .err button { margin-left: 6px; }

/* rastro do crescimento: comprimento = estrelas ganhas, batida = estrelas por dia */
.trail { position: relative; display: block; height: 16px; }
.trail::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--track); border-radius: 1px; }
.trail-fill { position: absolute; left: 0; top: 7px; height: 2px; width: calc(var(--f) * 100%); background: var(--accent); border-radius: 1px; transform-origin: 0 50%; }
.trail-dot { position: absolute; top: 4px; left: calc(var(--f) * 100% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.trail-dot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; }

/* etiqueta de facilidade (a única cor de dado) */
.gb {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none;
  border-radius: var(--radius-chip); font-size: 12px; font-weight: 700; line-height: 1;
}
.g-A { background: var(--ga); color: #fff; }
.g-B { background: var(--gb); color: #0d1a07; }
.g-C { background: var(--gc); color: #1c1600; }
.g-D { background: var(--gd); color: #1f1000; }
.g-E { background: var(--ge); color: #fff; }

.sk { display: block; height: 10px; border-radius: var(--radius-chip); background: var(--chip); }
.sk-row { display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) 64px; gap: 10px; align-items: center; min-height: 50px; }
.sk-row .sk:nth-child(2) { height: 20px; }

/* ---------- abas ---------- */
.tabs { position: relative; display: flex; gap: 32px; border-bottom: 1px solid var(--border); }
.tabs [role="tab"] {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 0 12px; border: 0; background: none;
  color: var(--muted); font-size: var(--fs-card); font-weight: 600; white-space: nowrap;
  transition: color var(--t-hover) ease;
}
.tabs [role="tab"]:hover, .tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.tabs [role="tab"] .num { font-size: 14px; font-weight: 400; color: var(--muted); }
.tabs .sel-line { bottom: -1px; }
.panel { padding-top: 18px; }
.panel[hidden] { display: none; }
/* com JavaScript, o painel da aba inativa some; sem ele, os dois ficam à vista (o HTML do build só marca o inativo) */
.js [data-inactive] { display: none; }
.panel-sub { font-size: 14px; color: var(--muted); }
.more { margin: 16px auto 0; display: flex; }
.more[hidden] { display: none; }
/* "Mostrar todos" e "Mostrar mais" só fazem sentido com JavaScript */
html:not(.js) .more { display: none; }

/* troque um programa pago */
.swap { list-style: none; margin: 14px 0 0; padding: 0; background: var(--surface); border-radius: var(--radius-card); }
.swap > li { display: grid; grid-template-columns: 210px 20px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 20px; }
.swap > li + li { border-top: 1px solid var(--rule); }
.swap-t { min-width: 0; }
.swap-t h3 { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.swap-t p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.swap-arrow { color: var(--muted); transition: transform var(--t-ui) var(--ease-out), color var(--t-hover) ease; }
.swap > li:hover .swap-arrow { transform: translateX(4px); color: var(--accent); }
.swap-alts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.alt {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 5px; border: 0;
  border-radius: var(--radius-control); background: var(--chip); font-size: 13px; font-weight: 500;
  transition: background-color var(--t-hover) ease, transform var(--t-press) ease;
}
.alt:hover { background: var(--press); }
.alt:active { transform: scale(.97); }
.swap .empty { display: block; padding: 18px 20px; color: var(--muted); font-size: 13px; }
/* o aviso de troca vazia ocupa a linha inteira (o grid de quatro colunas do <li> o deixaria preso na primeira) */
.swap > li.empty-li { display: block; padding: 0; }

/* lista de projetos */
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.tbl-wrap { margin-top: 12px; background: var(--surface); border-radius: var(--radius-card); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  position: sticky; top: var(--sticky-h); z-index: 2; background: var(--surface);
  padding: 12px 14px 10px; font-size: 12px; font-weight: 400; color: var(--muted); text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: var(--radius-card); padding-left: 20px; }
.tbl th:last-child { border-top-right-radius: var(--radius-card); padding-right: 20px; }
.tbl td { padding: 12px 14px; vertical-align: top; font-size: 13px; }
.tbl td:first-child { padding-left: 20px; }
.tbl td:last-child { padding-right: 20px; }
.tbl tbody tr + tr td { border-top: 1px solid var(--rule); }
.tbl tbody tr { cursor: pointer; transition: background-color var(--t-hover) ease; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.num { font-size: 14px; }
.tbl td.num small { display: block; font-size: 12px; color: var(--muted); }
.c-name { width: 36%; }
.tname { display: block; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; text-align: left; line-height: 1.35; overflow-wrap: anywhere; }
.tname:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tsum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; color: var(--muted); }
.gcell { display: flex; gap: 8px; align-items: flex-start; }
.gcell span:last-child { padding-top: 1px; }
/* o tipo (fora de "Prontos para usar") fica embaixo do nome, antes do resumo */
.c-name .pill { margin-top: 4px; }
.muted { color: var(--muted); }
.c-risk .muted { white-space: nowrap; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-chip); font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.neu { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.tbl .empty td { padding: 22px 20px; color: var(--muted); cursor: default; }
/* a nota "o projeto nega substituir" entre as linhas da tabela (páginas de alternativas) */
.tbl tbody tr.note-row, .tbl tbody tr.note-row:hover { background: none; cursor: default; }
.tbl tbody tr.note-row td { padding-top: 0; border-top: 0; }

/* ---------- legenda e app ---------- */
.end { margin-top: 64px; display: grid; gap: 32px; }
.legend .panel-sub { margin-top: 4px; }
.leg { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.leg li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.leg .gb { width: 32px; height: 32px; font-size: 16px; }
.leg li > div > strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.leg li > div > span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.app { background: var(--surface); border-radius: var(--radius-card); padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 8px 32px; align-items: center; }
.app h2 { grid-column: 1; }
.app > p { grid-column: 1; font-size: 15px; }
.app form { grid-column: 2; grid-row: 1 / span 2; }
.app label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.wait-row { display: flex; gap: 8px; }
.wait-row input { flex: 1; min-width: 0; height: 40px; padding: 0 16px; background: var(--ground); border: 1px solid var(--control); border-radius: var(--radius-control); font-size: 14px; }
.wait-row input::placeholder { color: var(--muted); }
.wait-row .btn { height: 40px; }
.wait-msg { min-height: 20px; margin-top: 8px; font-size: 13px; color: var(--muted); }
/* a lista de espera do site leva o consentimento (caixa de marcar com texto): o rótulo do e-mail não pode achatá-lo */
.app .consent { display: flex; margin: 10px 0 0; }
.foot { margin-top: 40px; margin-bottom: 32px; font-size: 12px; color: var(--muted); max-width: 72em; }

/* ---------- mini ficha (flutua: pode ter sombra) ---------- */
.peek {
  position: fixed; left: 0; top: 0; z-index: 90; width: 320px; max-width: calc(100vw - 16px); pointer-events: none;
  padding: 14px 16px; background: var(--raised); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 16px 36px var(--tip-shadow); /* taste-skill-ignore: mini ficha que flutua */
  animation: peek-in 180ms var(--ease-out);
}
@keyframes peek-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.peek-name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.peek-repo { margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.peek-sum { margin: 8px 0 10px; font-size: 13px; line-height: 1.5; }
.peek-ez { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.peek-facts { display: grid; margin: 0; font-size: 13px; line-height: 18px; }
.peek-facts > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; padding: 5px 0; border-top: 1px solid var(--rule); }
.peek-facts dt { color: var(--muted); }
.peek-facts dd { margin: 0; overflow-wrap: anywhere; }
.peek-facts .pill { height: 20px; }
.peek-hint { margin-top: 8px; font-size: 12px; color: var(--muted); }
.lead-strong { font-weight: 600; text-decoration-color: transparent; }
.lead-strong:hover { text-decoration-color: var(--accent); }

/* ---------- ficha do programa ----------
   A folha é um <dialog> (o foco, o Esc e o fundo escurecido ficam por conta dele): cabeçalho no alto, corpo e rodapé embaixo, tudo
   na mesma rolagem. A página própria /p/<slug>/ usa a mesma marcação (.sh-head, .sh-body, .sh-foot) dentro de .project-page. */
dialog.sheet {
  position: fixed; display: none; margin: 0 0 0 auto; padding: 0; width: min(580px, 100vw); height: 100dvh; max-width: none; max-height: none;
  border: 0; background: var(--raised); color: var(--text); outline: none; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -24px 0 48px var(--sheet-shadow); /* taste-skill-ignore: ficha em diálogo, flutua */
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: var(--backdrop); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in 420ms var(--ease-out); }
  dialog.sheet[open]::backdrop { animation: fadein 320ms ease; }
}
@keyframes sheet-in { from { transform: translateX(104%); } }
.sh-head { position: sticky; top: 0; z-index: 1; flex: none; background: var(--raised); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 28px 8px; }
.sh-head h1, .sh-head h2 { padding-block: 3px; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sh-head h1:focus, .sh-head h2:focus { outline: none; }
.sh-owner { margin-top: -2px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.sh-close { width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--well); color: var(--text); transition: background-color var(--t-hover) ease; }
.sh-close:hover { background: var(--press); }
.sh-body { flex: 1 0 auto; padding: 0 28px 28px; }
.sh-alert { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-card); background: var(--pill-negative-bg); color: var(--pill-negative-ink); font-size: 13px; }
.sh-sum { font-size: 15px; line-height: 1.55; }
.sh-sec { margin-top: 28px; }
.sh-sec h3 { font-size: var(--fs-card); font-weight: 600; margin-bottom: 10px; }
.ladder { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding-bottom: 7px; }
.lad { height: 40px; display: grid; place-items: center; border-radius: var(--radius-chip); background: var(--well); color: var(--muted); font-size: 15px; font-weight: 700; }
.lad.on.g-A { background: var(--ga); color: #fff; }
.lad.on.g-B { background: var(--gb); color: #0d1a07; }
.lad.on.g-C { background: var(--gc); color: #1c1600; }
.lad.on.g-D { background: var(--gd); color: #1f1000; }
.lad.on.g-E { background: var(--ge); color: #fff; }
.ladder .sel-line { width: calc((100% - 16px) / 5); transform: none; }
.lad-label { margin-top: 10px; font-size: 15px; font-weight: 600; }
/* as notas por sistema: "Windows C · macOS A", cada letra na cor da nota */
.lad-os { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 8px; font-size: 13px; color: var(--muted); }
.lad-os li { display: inline-flex; align-items: center; gap: 6px; }
.lad-os li + li::before { content: "·"; content: "·" / ""; margin: 0 10px; }
.lad-why { margin-top: 6px; font-size: 14px; line-height: 1.55; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats > div { padding: 0 16px; border-left: 1px solid var(--border); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin-top: 4px; font-size: 20px; font-weight: 500; white-space: nowrap; }
.stats dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.facts > div:last-child { border-bottom: 1px solid var(--border); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { font-size: 14px; overflow-wrap: anywhere; }
.facts dd .muted { font-size: 13px; }
.signals { list-style: none; margin: 0; padding: 0; }
.signals li { padding: 12px 0; border-top: 1px solid var(--border); }
.signals li:last-child { border-bottom: 1px solid var(--border); }
.sig-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sig-head strong { font-size: 14px; font-weight: 600; }
.sig-ev { margin-top: 6px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.sig-src { margin-top: 4px; font-size: 12px; color: var(--muted); }
.sh-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.nv { margin: 0; padding-left: 18px; list-style: disc; font-size: 14px; line-height: 1.55; }
.nv li + li { margin-top: 6px; }
/* links da ficha para outras páginas: o programa pago em "Pode substituir" e os projetos parecidos (o nome e, ao lado, a nota) */
.facts dd a, .related a { text-underline-offset: 3px; text-decoration-color: var(--muted); }
.facts dd a:hover, .related a:hover { text-decoration-color: var(--text); }
.related li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.related li:last-child { border-bottom: 1px solid var(--border); }
.related a { min-width: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.sh-foot { position: sticky; bottom: 0; z-index: 1; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 28px 18px; border-top: 1px solid var(--border); background: var(--raised); }
.sh-foot p { font-size: 12px; color: var(--muted); flex: 1 1 220px; }
.sh-foot code { font: inherit; }

/* ---------- movimento (desligado com prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .mark-sweep { animation: msweep 4.2s var(--ease-in-out) infinite alternate; }
  .scan-dot::after { animation: ping 2.4s var(--ease-out) infinite; }
  .trail-dot::after { animation: beat var(--beat, 2s) var(--ease-out) infinite; }
  .new-dot::after { animation: ping 2.4s var(--ease-out) infinite; }
  .is-new .trail-fill { animation: grow 900ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
  .is-new .trail-dot { animation: fadein 300ms ease both; animation-delay: calc(var(--d, 0ms) + 700ms); }
}
@keyframes msweep { from { transform: rotate(-76deg); } to { transform: rotate(76deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
@keyframes beat { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .collapse, .sel-line.go { transition: none; }
  .btn:active, .chip:active, .alt:active, .rrow:active { transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 24px; }
  .head { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
  .path { grid-template-columns: minmax(0, 1fr) 260px; }
  .ranks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rank-growth { grid-column: 1 / -1; }
  .rank-growth .rrow { grid-template-columns: 18px 20px minmax(0, 1fr) minmax(120px, 34%) 92px; }
  .swap > li { grid-template-columns: 170px 20px minmax(0, 1fr) auto; }
  .search { max-width: none; }
  .filters { position: static; }
}
@media (max-width: 900px) {
  .head { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "text" "start" "paths" "scope"; }
  /* "Por onde começar" vira painel: o título com o link em cima, o guia (título sobre a frase) e os pontos embaixo */
  .start { display: block; padding: 14px 16px 8px; }
  .start-head { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .start-track { margin-top: 8px; }
  .start-go { display: block; }
  .start-go span { display: block; margin-top: 3px; }
  .start-ctl { margin-top: 4px; }
  .start-pause { margin-left: auto; }
  .head > .scope { max-width: 560px; }
  .leg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app form { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .tbl .c-dl { display: none; }
}

/* ---------- telefone ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; --fs-title: 24px; --sticky-h: 0px; }
  .topbar { height: 48px; }
  .toplink { display: none; }
  .scan { display: none; }
  .lang { margin-left: auto; }
  .lang select { padding-right: 28px; background-position: right 10px center; }
  .topbar-in { gap: 10px; }
  .head { gap: 16px; padding-top: 16px; }
  .head > .scope { max-width: none; }
  .st-scan { display: inline; }
  .paths { padding: 2px 16px; }
  /* no celular o guia seguinte aparece na beira: dá para ver que a lista anda e arrastar com o dedo */
  .start { padding: 12px 14px 6px; }
  .start-slide { flex-basis: 86%; }
  .path { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #hot-line, #os-line { display: none; }
  .combo input, .path-do > .btn, .os-row .btn { height: 44px; }
  /* o radar fica menor, com as leituras ao lado */
  .scope { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 0 14px; align-items: center; padding: 12px 14px; }
  .scope-stage { grid-column: 1; grid-row: 1; }
  .readouts { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
  .scope figcaption { grid-column: 1 / -1; grid-row: 2; }
  .alta .sec-head p { display: none; }
  .alta .sec-head { align-items: center; }
  /* com o seletor de ranking (só com JavaScript) o título do painel fica só para leitor de tela; sem ele, os três painéis aparecem com título */
  .js .ranks[data-k] .rank h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js .ranks[data-k] .rank { padding-top: 12px; }
  .stamp .st-long { display: none; }
  .finding { font-size: 15px; margin-top: 10px; }
  .lede { font-size: 15px; margin-top: 10px; }
  .readouts dd b { font-size: 16px; }

  .filters { position: static; margin-top: 12px; padding: 8px 0 4px; }
  .frow1 { gap: 8px; }
  .seg-show { flex: 1 1 100%; }
  .seg-show .seg-legend { float: none; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .seg-show .seg-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 100%; background: var(--surface); border-radius: var(--radius-card); }
  .seg-show label > span { justify-content: center; height: 44px; width: 100%; }
  .l-long { display: none; }
  .l-short { display: inline; }
  .search { flex: 1 1 0; margin-left: 0; }
  .search input { height: 44px; }
  .filters .ftoggle { display: inline-flex; height: 44px; }
  .frow2 { display: none; margin-top: 10px; }
  .frow2.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sel { flex-direction: column; align-items: stretch; gap: 4px; }
  .sel select { width: 100%; height: 44px; }
  #f-cat, #f-cost, #f-ease, #f-os { width: 100%; }
  .check, .altchip-slot { grid-column: 1 / -1; }
  /* no telefone: na linha da busca, depois de Filtros; a busca encolhe para dar lugar */
  .search { order: 1; min-width: 0; }
  .filters .ftoggle { order: 2; }
  .clear-wrap { order: 3; }
  .clear-wrap:has(> .clear-all[hidden]) { display: none; }
  .clear-all { display: none; height: 44px; padding: 0 12px; }
  .clear-all.on { display: inline-flex; }
  .clear-all[hidden] { display: none !important; }
  .clear-pop { left: auto; right: 0; }
  .check { min-height: 44px; }

  .chips { margin-top: 8px; }
  .chips ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips ul::-webkit-scrollbar { display: none; }
  .chips li { flex: none; }
  .chip { height: 40px; }

  .alta { margin-top: 28px; }
  .sec-head { margin-bottom: 12px; }
  .sec-head .btn { height: 40px; }
  /* o seletor e "um ranking por vez" só valem com JavaScript; sem ele, os três painéis aparecem um embaixo do outro */
  .js .rank-switch { display: block; margin-bottom: 12px; }
  .rank-switch .seg-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 100%; background: var(--surface); border-radius: var(--radius-card); }
  .rank-switch button { justify-content: center; height: 44px; }
  .ranks { grid-template-columns: minmax(0, 1fr); }
  .js .ranks[data-k] .rank { display: none; }
  .js .ranks[data-k="growth"] .rank[data-k="growth"], .js .ranks[data-k="dl"] .rank[data-k="dl"], .js .ranks[data-k="new"] .rank[data-k="new"] { display: block; }
  .rank header p { white-space: normal; }
  .rrow { min-height: 54px; }
  .rank-growth .rrow { grid-template-columns: 18px 20px minmax(0, 1fr) auto; row-gap: 2px; padding-bottom: 8px; }
  .rank-growth .trail { grid-column: 3 / -1; grid-row: 2; }

  .work { margin-top: 40px; }
  .tabs { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .tabs [role="tab"] { font-size: 15px; }
  .swap > li { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 16px; }
  .swap-arrow { display: none; }
  .swap-alts { grid-column: 1 / -1; }
  .swap-go { grid-column: 2; grid-row: 1; height: 40px; }

  .tbl, .tbl tbody { display: block; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 14px 16px; }
  .tbl tbody tr + tr { border-top: 1px solid var(--rule); }
  .tbl tbody tr + tr td { border-top: 0; }
  .tbl td, .tbl td:first-child, .tbl td:last-child { padding: 0; }
  .tbl td.c-name { order: 1; flex: 1 1 calc(100% - 110px); min-width: 0; }
  .tbl td.c-stars { order: 2; flex: none; }
  .tbl td.c-ease { order: 3; flex: 1 1 100%; }
  .tbl td.c-need { order: 4; color: var(--muted); }
  .tbl td.c-risk { order: 5; }
  .tbl td.c-dl { order: 6; display: block; color: var(--muted); font-size: 13px; }
  .tbl td.c-dl::after { content: " " attr(data-unit); } /* o texto vem do HTML (4 idiomas), não do CSS */
  .tbl td.c-dl:empty, .tbl td.c-dl.zero { display: none; }
  .tbl .empty td { padding: 6px 0; }

  .end { margin-top: 48px; }
  .leg { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .app { padding: 20px; }
  .wait-row { flex-direction: column; }
  .wait-row input, .wait-row .btn { flex: none; height: 44px; }

  .sh-head { padding: 16px 16px 8px; }
  .sh-body { padding: 0 16px 24px; }
  .sh-foot { padding: 12px 16px 16px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  /* os três números empilham: o maior (mais de 1 bilhão de downloads) não cabe num terço da tela */
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div, .stats > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-left: 0; border-top: 1px solid var(--border); }
  .stats > div:first-child { padding-top: 0; border-top: 0; }
  .stats dd { margin-top: 0; font-size: 18px; text-align: right; }
}
/* o topo inteiro (marca, "i", idioma e tema) pede 412px de largura: abaixo de 420px só a marca fica à vista, com o resto do nome
   encolhido a 0 (é texto solto, sem elemento para esconder) e os espaços do topo um pouco menores */
@media (max-width: 419px) {
  .topbar-in { gap: 8px; }
  .brand-name { font-size: 0; }
  .brand-name strong { font-size: 17px; }
}

/* ---------- o que o site precisa e o protótipo não tem ----------
   O resto do arquivo vem do radar.css; aqui estão só as páginas internas (categoria, alternativas, textos, contato e a página do
   programa), os links de verdade e o gráfico de estrelas. Tudo nos tokens do design oficial: as cores mudam com o tema. */
:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; /* só o ID do commit */
}
ol, ul { margin: 0; padding: 0; list-style: none; }
.col { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }
.sm { font-size: var(--fs-small); line-height: 16px; color: var(--muted); }
code { font-family: var(--mono); font-size: var(--fs-small); }
/* o rodapé começa na borda da coluna, como o resto da página (o protótipo o centra numa caixa de 72em, que desalinha das páginas de texto) */
.foot { max-width: none; }
.foot p { max-width: 72em; }

/* o início: as seções já trazem a largura do .blk; dentro do main.col elas ocupam a coluna inteira */
.col > .head { width: auto; }
.col > .chips, .col > .alta, .col > .work, .col > .end, .col > .filters > .filters-in { width: auto; }

/* a categoria escolhida abre a fileira com o link da página dela; o número é um <b>, que herda o peso do chip */
.chip b { font-weight: inherit; }
.cat-page { display: inline-flex; align-items: center; height: 32px; margin-left: 4px; font-weight: 500; white-space: nowrap; text-underline-offset: 3px; }
/* link para a página com todos os programas pagos, embaixo da troca */
.all-paid { margin-top: 12px; }

/* links: no site os programas são links de verdade (para a página de cada um), sem sublinhado */
.link { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 2px; }
.link:hover { text-decoration-color: var(--accent); }
a.alt, a.tname, a.chip { text-decoration: none; color: inherit; }
a.tname:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
/* o tipo do projeto (fora de "Prontos para usar") é uma etiqueta neutra */
.c-name .pill { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }

/* ---------- páginas internas ---------- */
.back { padding-top: 20px; font-size: 13px; }
.back a { color: var(--muted); text-decoration-color: var(--control); text-underline-offset: 3px; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
.back a:hover { color: var(--text); text-decoration-color: var(--accent); }
/* o cabeçalho da categoria e das alternativas: o título e a frase do início, sem o radar */
.phead { padding-top: 14px; }
.cat-see { margin-top: 10px; font-size: 14px; }
.pg-sec { margin-top: 40px; }
.pg-sec > .swap { margin-top: 0; }
.pg-sec > .sec-head + .tbl-wrap { margin-top: 0; }
/* a linha inteira da tabela leva à página do programa (o link do nome se estica sobre ela; nestas páginas não há ficha em folha) */
.pg-sec .tbl tbody tr { position: relative; }
.pg-sec .tbl .tname::after { content: ""; position: absolute; inset: 0; }
/* com os três rankings, a grade do início; faltando algum (vazio na categoria), os que têm projeto dividem a largura */
.ranks.fit { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* e como os painéis ficam estreitos, o rastro do crescimento desce para a segunda linha, como no telefone */
.ranks.fit .rank-growth .rrow { grid-template-columns: 18px 20px minmax(0, 1fr) auto; row-gap: 2px; padding-bottom: 8px; }
.ranks.fit .rank-growth .trail { grid-column: 3 / -1; grid-row: 2; }
/* a lista de todos os programas pagos: a troca do início, só que cada pago é um link e não há o botão "Ver na lista"
   (as larguras do tablet e do telefone estão no fim do arquivo: esta regra vence as do .swap > li do radar.css) */
.swap.pages > li { grid-template-columns: 210px 20px minmax(0, 1fr); }
/* os outros programas pagos: uma fileira de etiquetas que quebra de linha (a das categorias rola no telefone) */
.chiplist { display: flex; flex-wrap: wrap; gap: 8px; }
/* avisos: o projeto nega substituir o programa pago, rascunho dos termos e da privacidade */
.notice { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.notice a { color: inherit; font-weight: 500; }

/* textos corridos (sobre, termos, privacidade e o pedido de correção): direto no chão, numa coluna de leitura */
.prose { max-width: 72ch; padding-top: 14px; }
.prose h2 { margin-top: 32px; font-size: var(--fs-section); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.prose > p, .prose > ul { margin-top: 14px; font-size: 15px; line-height: 1.6; }
/* a tabela de cookies da Privacidade: no telefone ela rola de lado dentro da caixa, sem alargar a página */
.prose > .tbl-legal { margin-top: 14px; overflow-x: auto; }
.tbl-legal table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.tbl-legal th { padding: 8px 10px; text-align: left; vertical-align: bottom; font-weight: 500; border-bottom: 1px solid var(--rule); }
.tbl-legal td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--rule); }
.prose > ul { padding-left: 20px; list-style: disc; display: grid; gap: 8px; }
.prose a { text-decoration-color: var(--control); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
/* a introdução escrita à mão das alternativas fica entre o cabeçalho e a tabela: já tem o respiro do .finding acima */
.alt-intro { padding-top: 0; }
/* perguntas frequentes das alternativas: o título de seção, cada pergunta em destaque e a resposta numa coluna de leitura */
.faq { max-width: 72ch; }
.faq h2 { font-size: var(--fs-section); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.faq h3 { margin-top: 20px; font-size: var(--fs-card); font-weight: 600; line-height: 1.35; }
.faq p { margin-top: 6px; font-size: 15px; line-height: 1.6; }
.faq a { text-decoration-color: var(--control); text-underline-offset: 3px; }
.faq a:hover { text-decoration-color: var(--accent); }

/* formulários: consentimento sempre visível e obrigatório */
.consent { display: flex; gap: 10px; align-items: flex-start; width: 100%; font-size: 13px; line-height: 1.45; color: var(--muted); }
.consent input { margin-top: 2px; flex: none; accent-color: var(--accent); }
.consent a { text-decoration-color: var(--control); text-underline-offset: 3px; }
.form-note { width: 100%; }
.contest { display: grid; gap: 16px; margin-top: 24px; max-width: 520px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 0 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 400;
  border: 1px solid var(--control); border-radius: var(--radius-control); transition: border-color var(--t-hover) ease;
}
.field input { height: 40px; }
.field textarea { padding: 12px 16px; border-radius: var(--radius-card); resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--control-hover); }

/* a página de cada programa: a ficha da folha (.sh-*) numa coluna de leitura, e o convite do app embaixo */
.pp { max-width: 760px; }
.project-page { margin-top: 12px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-card); }
.project-page .sh-head, .project-page .sh-foot { position: static; }
.project-page .sh-foot { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.pp .app { margin-top: var(--gap); grid-template-columns: minmax(0, 1fr); }
.pp .app form { grid-column: 1; grid-row: auto; margin-top: 8px; }
/* no computador, o convite do app vai para a direita da ficha e acompanha a leitura: a coluna inteira fica usada
   (1184 = ficha 780 + vão 24 + convite 380) e a ficha continua uma coluna de leitura */
@media (min-width: 1101px) {
  .pp { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: var(--gap); align-items: start; }
  .pp > .back { grid-column: 1 / -1; }
  .pp > .project-page { grid-column: 1; }
  .pp > .app { grid-column: 2; grid-row: 2; margin-top: 12px; position: sticky; top: 24px; }
}
/* a linha de baixo dos números da ficha quebra quando precisa ("sin ganancia en la última lectura" não cabe num terço da folha);
   o número em cima continua numa linha só */
.stats dd small { white-space: normal; }

/* sem JavaScript, "Recolher" (do "Em alta") e o "Filtros" do telefone não fariam nada: somem, e o "Em alta" fica aberto */
html:not(.js) #alta-toggle, html:not(.js) .filters .ftoggle { display: none; }
/* sem JavaScript, estes controles ficariam à vista sem fazer nada: a barra de filtros (o "Mostrar", a busca e os filtros), a fileira
   de categorias (botões), a ordem da lista, o "Ver na lista" da troca, o "Limpar filtros" da lista vazia, o "i", o idioma (o
   <select> só troca de página pelo script) e o tema. Rankings, troca, lista e links continuam */
html:not(.js) .filters, html:not(.js) .chips, html:not(.js) #sort, html:not(.js) .swap-go, html:not(.js) #clear-empty,
html:not(.js) .about, html:not(.js) .lang, html:not(.js) .theme-btn { display: none; }

/* gráfico de estrelas (SVG desenhado no build) */
.chart { display: block; width: 100%; max-width: 600px; height: auto; }
.chart.narrow { display: none; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-label { fill: var(--muted); font: 12px var(--font); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 1100px) {
  .swap.pages > li { grid-template-columns: 170px 20px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .back { padding-top: 14px; }
  .phead { padding-top: 8px; }
  .pg-sec { margin-top: 28px; }
  .chart.wide { display: none; }
  .chart.narrow { display: block; }
  /* a troca de todos os pagos empilha como a do início: o nome em cima, as alternativas embaixo (sem a seta) */
  .swap.pages > li { grid-template-columns: minmax(0, 1fr); }
  /* a célula das estrelas fica ao lado do nome, como no protótipo, mesmo com o ganho longo ("+956 por semana, estim."):
     o nome cede a largura que sobra e o ganho quebra em duas linhas */
  .tbl td.c-name { flex: 1 1 0; }
  .tbl td.c-stars { max-width: 40%; }
  .tbl td.c-stars small { white-space: normal; }
  /* sem JavaScript não há o desenho do radar: as três leituras ocupam a largura toda, lado a lado (e não só a coluna da direita) */
  html:not(.js) .readouts { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- anúncios (AdSense) ----------
   Só existem com o AdSense ligado e o ID do bloco preenchido. Cada bloco reserva a altura do anúncio, para a página não pular quando ele
   chega, e traz o rótulo ("Publicidade"). O do meio do conteúdo aparece abaixo de 1400px; o lateral, numa coluna à esquerda do
   conteúdo, só a partir de 1400px (abaixo disso a coluna não é renderizada). */
.ad { margin-top: 24px; }
.ad-label { margin-bottom: 4px; font-size: 11px; line-height: 16px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ad-inline ins { min-height: 280px; }
.ad-side ins { min-height: 600px; }
/* o Google marca o bloco que ficou sem anúncio (data-ad-status="unfilled"): some o bloco inteiro, com o rótulo, para não sobrar uma caixa vazia */
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.rail { display: none; }
@media (min-width: 1400px) {
  .ad-inline { display: none; }
  /* a coluna mora na margem esquerda, então a página encolhe (conteúdo, topo e rodapé usam a mesma largura) até sobrarem 192px de cada lado:
     160 do anúncio, 16 de respiro até o conteúdo e 16 até a borda da janela */
  .has-rail { --col: min(1184px, 100vw - 384px); }
  .has-rail main.col { position: relative; }
  .rail { display: block; position: absolute; top: 0; bottom: 0; right: 100%; width: 160px; margin-right: 16px; }
  .rail .ad-side { position: sticky; top: 16px; margin-top: 24px; }
  /* na ficha, a coluna acaba 280px antes do fim da página: o rodapé da ficha (o botão do GitHub) tem uns 90px, até 120 se quebrar linha,
     e o anúncio, ao parar no fim da rolagem, fica pelo menos 150px acima dele, nunca na mesma faixa do botão */
  .rail-ficha { bottom: 280px; }
}

/* ---------- aviso de cookies dos anúncios ----------
   Só existe com o AdSense ligado. A barra é fixa no pé da tela (não empurra nada: aparecer não faz a página pular) e nasce escondida;
   o client/consent.ts a mostra quando não há escolha guardada e põe em --cookie-h a altura dela, para o pé da página ficar acima da barra
   e o rodapé nunca ficar escondido atrás. Os dois botões têm o mesmo peso (aceitar não é mais fácil que não aceitar). */
.cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--raised); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px var(--tip-shadow);
}
.cookiebar-in { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.cookiebar p { flex: 1 1 380px; max-width: 72ch; font-size: 13px; line-height: 20px; }
.cookiebar p a { text-underline-offset: 3px; text-decoration-color: var(--muted); }
.cookiebar p a:hover { text-decoration-color: var(--text); }
.cookiebar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* o texto do botão pode ser longo (es, zh): quebra em vez de alargar a barra */
.cookiebar .btn { height: auto; min-height: var(--control-h); padding: 6px 16px; white-space: normal; text-align: center; }
body { padding-bottom: var(--cookie-h, 0px); }
/* ao rolar até um elemento (o foco do teclado, um link com âncora), a altura da barra fica livre: o foco nunca para escondido atrás dela */
html { scroll-padding-bottom: var(--cookie-h, 0px); }
/* o link do rodapé é um botão com cara de link (o mesmo sublinhado dos outros links do rodapé) */
.cookie-manage { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; }
html:not(.js) .cookie-manage-wrap { display: none; }
@media (max-width: 640px) {
  .cookiebar-btns { flex-direction: column; width: 100%; }
}
