/* =============================================================================
   WhatTheChip · 什么芯片 — Design System (redesenho "Render", flat)
   Reimplementação fiel do handoff de design (index + casca). Carregado DEPOIS
   de style.css — governa a nav, a index (finder/resultado/stats), o footer e o
   modal "Adicionar chip". Só é incluído nas páginas públicas (base.html →
   pages/page.html); a bancada logada usa base_estoque.html e NÃO carrega este
   arquivo. Tema escuro via html[data-theme="dark"].
   ============================================================================= */

/* -----------------------------------------------------------------------------
   TOKENS — paleta do handoff (ink / blue / green / amber / red) + semânticos
   ----------------------------------------------------------------------------- */
:root {
  --ink-100:#161616; --ink-90:#21272a; --ink-80:#343a3f; --ink-70:#4d5358;
  --ink-60:#697077;  --ink-50:#878d96; --ink-40:#a2a9b0; --ink-30:#c1c7cd;
  --ink-20:#dde1e6;  --ink-10:#f2f4f8; --ink-05:#f7f8fb; --white:#ffffff;

  --blue-10:#edf5ff; --blue-20:#d0e2ff; --blue-40:#78a9ff;
  --blue-60:#0f62fe; --blue-60h:#0353e9; --blue-70:#0043ce;

  --green-10:#e6f7ec; --green-40:#42be65; --green-50:#24a148; --green-60:#198038; --green-70:#0e6027;
  --amber-10:#fdf3d6; --amber-40:#f1c21b; --amber-60:#b28600; --amber-70:#8a6a00;
  --red-10:#fff1f1;  --red-50:#fa4d56;  --red-60:#da1e28;  --red-70:#a2191f;

  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-pill:999px;

  --sh-1:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.05);
  --sh-2:0 6px 16px -6px rgba(16,24,40,.14),0 2px 6px -2px rgba(16,24,40,.08);
  --sh-3:0 24px 48px -20px rgba(15,98,254,.22),0 8px 20px -12px rgba(16,24,40,.14);

  --sans:'Helvetica Neue',Helvetica,Arial,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
  --cjk:'Noto Sans SC',var(--sans);

  --dur-1:120ms; --dur-2:240ms; --ease:cubic-bezier(.2,0,.2,1);

  /* Semânticos — tema claro (padrão) */
  --bg:var(--ink-05); --surface:var(--white); --surface-2:var(--ink-10);
  --line:var(--ink-20); --line-2:var(--ink-30);
  --text:var(--ink-100); --muted:var(--ink-60); --faint:var(--ink-50);
  --accent:var(--blue-60); --focus:var(--blue-60);
  --nav-h:56px;
}

/* -----------------------------------------------------------------------------
   TEMA ESCURO — remapeia os semânticos sob html[data-theme="dark"]
   ----------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg:#0b0e11; --surface:#14181c; --surface-2:#1b2026;
  --line:#272d33; --line-2:#3a4249;
  --text:#f2f4f8; --muted:#a2a9b0; --faint:#878d96;
  --accent:var(--blue-40); --focus:var(--blue-40);
  --blue-10:#0a2150; --blue-20:#0b2f74;
  --green-10:#0c2b18; --amber-10:#2c2306; --red-10:#2c0f11;
  --sh-1:0 1px 2px rgba(0,0,0,.4);
  --sh-2:0 8px 20px -8px rgba(0,0,0,.55);
  --sh-3:0 28px 56px -22px rgba(0,0,0,.7);
}

/* -----------------------------------------------------------------------------
   BASE / LAYOUT — sticky footer (body em coluna flex; <main> cresce)
   ----------------------------------------------------------------------------- */
body {
  background:var(--bg); color:var(--text); font-family:var(--sans);
  -webkit-font-smoothing:antialiased; line-height:1.45;
  display:flex; flex-direction:column; min-height:100vh;
}
.wtc-main { display:flex; flex-direction:column; flex:1; min-height:0 !important; }
footer.foot { flex-shrink:0; }
::selection { background:var(--blue-20); color:var(--ink-100); }

/* Links das páginas públicas: acento azul, nunca o roxo visitado herdado do style.css */
a { color:var(--accent); }
a:visited { color:var(--accent); }
a:hover { color:var(--blue-70); }
[data-theme="dark"] a:hover { color:var(--blue-40); }

/* =============================================================================
   HOME ESTÁTICA (landing sem busca — logo + frase centralizados)
   ============================================================================= */
.home-static { flex:1; display:flex; align-items:center; justify-content:center; padding:48px 24px 72px; }
.home-static__inner { display:flex; flex-direction:column; align-items:center; text-align:center; gap:24px; max-width:620px; }
.home-static__logo { display:flex; justify-content:center; }
.home-static__logo img { height:64px; width:auto; max-width:100%; display:block; user-select:none; -webkit-user-drag:none; }
.home-static__logo .is-dark { display:none; }
[data-theme="dark"] .home-static__logo .is-light { display:none; }
[data-theme="dark"] .home-static__logo .is-dark { display:block; }
@media (max-width:600px) { .home-static { padding:32px 20px 56px; } .home-static__logo img { height:48px; } }

/* =============================================================================
   TOP NAV — barra 56px, sticky, blur (classes .topnav* do base.html)
   ============================================================================= */
.topnav {
  position:sticky; top:0; z-index:60;
  height:var(--nav-h); min-height:var(--nav-h);
  display:flex; align-items:center; gap:6px; padding:0 20px;
  background:color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  font-family:var(--sans);
}
/* Sem roxo nos links da nav — o a:visited herdado do style.css os pintaria; acento = azul */
.topnav__link:visited, .topnav__navbtn:visited { color:var(--muted); }
.topnav__link.is-active, .topnav__link.is-active:visited { color:var(--text); }
.topnav__login:visited { color:var(--white) !important; }

.topnav__links { display:flex; align-items:center; gap:2px; }
.topnav__link, .topnav__navbtn {
  display:flex; align-items:center; gap:6px;
  padding:7px 12px; border-radius:var(--r-sm);
  font-size:14px; color:var(--muted);
  background:none; border:0; cursor:pointer; text-decoration:none;
  font-family:var(--sans);
  transition:color var(--dur-1), background var(--dur-1);
}
.topnav__link:hover, .topnav__navbtn:hover { color:var(--text); background:var(--surface-2); text-decoration:none; }
.topnav__link.is-active { color:var(--text); font-weight:600; }

.topnav__right { margin-left:auto; display:flex; align-items:center; gap:6px; }

/* Pill de idioma (o botão .topnav__util dentro de .topnav__lang) */
.topnav__lang { position:relative; display:flex; align-items:center; }
.topnav__lang > .topnav__util {
  display:flex; align-items:center; gap:6px; height:36px; padding:0 10px;
  border-radius:var(--r-sm); border:1px solid var(--line);
  background:var(--surface); color:var(--muted);
  font-size:12px; font-family:var(--mono); letter-spacing:.04em;
  cursor:pointer; transition:color var(--dur-1), border-color var(--dur-1);
}
.topnav__lang > .topnav__util:hover { color:var(--text); border-color:var(--line-2); }
.topnav__lang .swatch { font-family:var(--mono); }
.topnav__lang .caret {
  width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-1px); display:inline-block;
}
.topnav__lang-menu {
  position:absolute; top:calc(100% + 6px); right:0;
  margin:0; padding:5px; list-style:none;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-md); box-shadow:var(--sh-2);
  min-width:180px; z-index:100; display:none;
}
.topnav__lang.is-open .topnav__lang-menu { display:block; }
.topnav__lang-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:var(--r-sm); cursor:pointer;
  font-size:13px; color:var(--text);
  transition:background var(--dur-1);
}
.topnav__lang-item:hover { background:var(--surface-2); }
.topnav__lang-item.is-active { background:var(--blue-10); color:var(--blue-70); font-weight:600; }
[data-theme="dark"] .topnav__lang-item.is-active { color:var(--blue-40); }
.topnav__lang-item .swatch { font-family:var(--mono); font-size:11px; color:var(--faint); min-width:24px; }
.topnav__lang-item.is-active .swatch { color:inherit; }

/* Botão de tema (ícone) — #theme-btn é .topnav__util mas vira icon-btn */
#theme-btn.topnav__util {
  width:36px; height:36px; padding:0; gap:0;
  display:grid; place-items:center;
  border-radius:var(--r-sm); border:1px solid transparent; background:none;
  color:var(--muted); cursor:pointer; transition:color var(--dur-1), background var(--dur-1);
}
#theme-btn.topnav__util:hover { color:var(--text); background:var(--surface-2); }
#theme-btn svg { width:18px; height:18px; }

/* Entrar (a.topnav__login) */
.topnav__login {
  display:flex; align-items:center; gap:7px; height:36px; padding:0 14px;
  border-radius:var(--r-sm); border:0;
  background:var(--blue-60); color:var(--white) !important;
  font-size:13px; font-weight:600; text-decoration:none; cursor:pointer;
  transition:background var(--dur-1);
}
.topnav__login:hover, .topnav__login:visited, .topnav__login:active { background:var(--blue-60h); color:var(--white) !important; text-decoration:none; }
.topnav__login svg { width:15px; height:15px; }

/* Hamburger — escondido no desktop */
.topnav__hamburger {
  display:none; appearance:none; border:0; cursor:pointer; background:transparent;
  width:40px; height:40px; padding:0; margin-left:2px;
  flex-direction:column; align-items:center; justify-content:center; gap:4px;
  border-radius:var(--r-sm);
}
.topnav__hamburger:hover { background:var(--surface-2); }
.topnav__hamburger span {
  width:18px; height:2px; background:var(--text); display:block; border-radius:2px;
  transition:transform var(--dur-1), opacity var(--dur-1);
}
.topnav__hamburger.is-open span:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.topnav__hamburger.is-open span:nth-child(2) { opacity:0; }
.topnav__hamburger.is-open span:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }

/* =============================================================================
   INDEX — palco (.app / .stage), brandmark, finder bar
   ============================================================================= */
.app { display:flex; flex-direction:column; flex:1; min-height:0; width:100%; }
.stage { width:100%; max-width:760px; margin:0 auto; padding:0 24px; display:flex; flex-direction:column; }
.col-main { min-width:0; width:100%; }
.app[data-state="idle"] .col-main { padding-top:9vh; padding-bottom:40px; }
.app[data-state="result"] .col-main,
.app[data-state="notfound"] .col-main { padding-top:16px; padding-bottom:40px; }

/* Brandmark (logo grande estilo Google no idle; pequeno à esquerda no resultado) */
.brandmark { display:flex; justify-content:center; margin-bottom:30px; }
.brandmark img { height:62px; width:auto; display:block; max-width:100%; user-select:none; -webkit-user-drag:none; }
.brandmark .is-dark { display:none; }
[data-theme="dark"] .brandmark .is-light { display:none; }
[data-theme="dark"] .brandmark .is-dark { display:block; }
.app[data-state="result"] .brandmark,
.app[data-state="notfound"] .brandmark { justify-content:flex-start; margin-bottom:16px; }
.app[data-state="result"] .brandmark img,
.app[data-state="notfound"] .brandmark img { height:34px; }

/* Finder bar */
.finder-wrap { transition:padding var(--dur-2); }
.app[data-state="result"] .finder-wrap,
.app[data-state="notfound"] .finder-wrap {
  position:sticky; top:var(--nav-h); z-index:40;
  background:linear-gradient(var(--bg) 78%, transparent);
  padding:18px 0 16px; margin-bottom:2px;
}
.finder {
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--line-2);
  border-radius:var(--r-lg); padding:8px 8px 8px 16px; box-shadow:var(--sh-2);
  transition:border-color var(--dur-1), box-shadow var(--dur-2);
}
.finder:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px var(--blue-10), var(--sh-3); }
.finder__search { color:var(--faint); flex-shrink:0; display:flex; }
.finder__search svg { width:20px; height:20px; display:block; }
.finder__input {
  flex:1; min-width:0; border:0; outline:0; background:none; color:var(--text);
  font-family:var(--mono); font-size:22px; font-weight:500;
  letter-spacing:.06em; text-transform:uppercase; padding:8px 4px;
}
.app[data-state="result"] .finder__input,
.app[data-state="notfound"] .finder__input { font-size:18px; padding:5px 4px; }
.finder__input::placeholder { color:var(--ink-30); text-transform:none; letter-spacing:0; font-weight:400; }

/* Microfone (mic.js) — mantém .wtc-mic-btn + estados is-listening/processing/ok/err */
.finder__mic {
  width:42px; height:42px; flex-shrink:0; display:grid; place-items:center;
  border-radius:var(--r-md); border:1px solid var(--line);
  background:var(--surface); color:var(--muted); cursor:pointer;
  transition:color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.finder__mic:hover { color:var(--text); border-color:var(--line-2); }
.finder__mic svg, .finder__mic .mic-icon { width:18px; height:18px; }
.finder__mic.is-listening { color:var(--white); background:var(--blue-60); border-color:var(--blue-60); animation:micpulse 1.4s ease-in-out infinite; }
.finder__mic.is-processing { color:var(--muted); cursor:wait; }
.finder__mic.is-ok { color:var(--white); background:var(--green-50); border-color:var(--green-50); }
.finder__mic.is-err { color:var(--white); background:var(--red-60); border-color:var(--red-60); }
@keyframes micpulse { 50% { filter:brightness(1.18); } }

/* Botão Identificar (#pn-decode) */
.finder__go {
  height:42px; flex-shrink:0; display:flex; align-items:center; gap:8px;
  padding:0 20px; border-radius:var(--r-md);
  background:var(--blue-60); color:var(--white);
  font-size:14.5px; font-weight:600; border:0; cursor:pointer;
  font-family:var(--sans); transition:background var(--dur-1);
}
.finder__go svg { width:16px; height:16px; }
.finder__go:hover:not(:disabled) { background:var(--blue-60h); }
.finder__go:disabled { background:var(--surface-2); color:var(--ink-40); cursor:not-allowed; }
.finder__go .spin { width:15px; height:15px; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation:spin .6s linear infinite; display:none; }
.finder__go.is-loading .spin { display:block; }
.finder__go.is-loading svg.mag { display:none; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Barra de progresso indeterminada */
.finder-bar { height:2px; border-radius:2px; overflow:hidden; background:transparent; margin-top:2px; }
.finder-bar.is-on { background:var(--blue-10); }
.finder-bar.is-on::after { content:""; display:block; height:100%; width:40%; background:var(--accent); animation:indet 1s var(--ease) infinite; }
@keyframes indet { 0% { transform:translateX(-100%); } 100% { transform:translateX(320%); } }

/* Subline: dica de teclado + pill de detecção de família */
.subline { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:11px; padding:0 4px; min-height:22px; }
.hintkeys { font-size:12.5px; color:var(--faint); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hintkeys.is-warn { color:var(--amber-70); }
.meta-sep { color:var(--line-2); }
.kbd { font-family:var(--mono); font-size:11px; background:var(--surface-2); border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; padding:1px 6px; color:var(--muted); }

/* Exemplos clicáveis (idle) */
.quick { margin-top:30px; }
.quick__label { font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); margin-bottom:12px; text-align:center; }
.quick__grid { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.chip-ex { display:flex; align-items:center; gap:10px; padding:9px 13px; border-radius:var(--r-md); border:1px solid var(--line); background:var(--surface); cursor:pointer; transition:border-color var(--dur-1), box-shadow var(--dur-1), transform var(--dur-1); text-align:left; }
.chip-ex:hover { border-color:var(--line-2); box-shadow:var(--sh-1); transform:translateY(-1px); }
.chip-ex__pn { font-family:var(--mono); font-size:13px; font-weight:600; color:var(--text); }
.chip-ex__meta { font-size:11.5px; color:var(--faint); }
.app[data-state="result"] .quick,
.app[data-state="notfound"] .quick { display:none; }

/* =============================================================================
   INDEX — cartão de resultado (specs-first) + notfound/sugestões
   ============================================================================= */
.result-slot { margin-top:8px; }
.result-slot:empty { display:none; }
.result-slot > .card, .result-slot > .notfound { animation:rise var(--dur-2) var(--ease); }
@keyframes rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-1); overflow:hidden; }
.card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 22px 16px; border-bottom:1px solid var(--line); }
.card__type { font-size:22px; font-weight:700; letter-spacing:-.01em; line-height:1.2; color:var(--text); }
.card__type small { font-size:14px; font-weight:400; color:var(--muted); margin-left:8px; }
.card__mfg { font-size:13px; color:var(--text); margin-top:7px; }
.card__mfg .l { font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin-right:8px; }

/* Pill de veredito (rentabilidade) */
.verdict { flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:4px; text-align:right; }
.vpill { display:inline-flex; align-items:center; gap:7px; padding:4px 12px; border-radius:var(--r-pill); font-size:12px; font-weight:600; border:1px solid transparent; white-space:nowrap; }
.vpill--rentavel { background:var(--green-10); color:var(--green-70); border-color:var(--green-40); }
[data-theme="dark"] .vpill--rentavel { color:var(--green-40); }
.vpill--nao { background:var(--red-10); color:var(--red-70); border-color:var(--red-50); }
[data-theme="dark"] .vpill--nao { color:var(--red-50); }
.vpill--indet { background:var(--amber-10); color:var(--amber-70); border-color:var(--amber-40); }
[data-theme="dark"] .vpill--indet { color:var(--amber-40); }

/* Grade de specs (protagonista) */
.card__grid { display:grid; grid-template-columns:repeat(4,1fr); }
.spec { padding:16px 20px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.spec:nth-child(4n) { border-right:0; }
.spec__label { font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin-bottom:6px; }
.spec__val { font-size:17px; font-weight:600; color:var(--text); }
.spec__val.dim { color:var(--ink-40); font-weight:400; }
.spec--hi .spec__val { color:var(--blue-70); }
[data-theme="dark"] .spec--hi .spec__val { color:var(--blue-40); }

/* Rodapé do card */
.card__foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:12px 22px; font-size:12.5px; color:var(--muted); }
.pntag { font-family:var(--mono); font-weight:600; color:var(--text); letter-spacing:.03em; }
.conf { display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.conf .dot { width:7px; height:7px; border-radius:50%; }
.conf--confirmed .dot { background:var(--green-50); } .conf--confirmed { color:var(--green-60); }
[data-theme="dark"] .conf--confirmed { color:var(--green-40); }
.conf--manual .dot, .conf--grammar .dot, .conf--distributor .dot { background:var(--blue-60); }
.conf--manual, .conf--grammar, .conf--distributor { color:var(--blue-70); }
[data-theme="dark"] .conf--manual, [data-theme="dark"] .conf--grammar, [data-theme="dark"] .conf--distributor { color:var(--blue-40); }
.conf--ai_high .dot { background:var(--blue-40); } .conf--ai_high { color:var(--muted); }
.conf--estimated .dot { background:var(--amber-40); } .conf--estimated { color:var(--amber-70); }
.dotsep { color:var(--line-2); }
.linkbtn { background:none; border:0; padding:0; font:inherit; color:var(--muted); cursor:pointer; font-weight:600; }
.linkbtn:hover { color:var(--text); text-decoration:underline; }
.linkbtn--danger { color:var(--red-60); } .linkbtn--danger:hover { color:var(--red-70); }
[data-theme="dark"] .linkbtn--danger { color:var(--red-50); }
.card__foot .ok { color:var(--green-60); font-weight:600; } [data-theme="dark"] .card__foot .ok { color:var(--green-40); }

/* Aviso de família não documentada (dentro do card) */
.undoc { margin:0; padding:14px 22px; background:var(--amber-10); border-bottom:1px solid var(--amber-40); }
.undoc__t { font-size:13px; font-weight:700; color:var(--amber-70); margin-bottom:6px; display:flex; align-items:center; gap:7px; }
.undoc__b { font-size:12.5px; color:var(--muted); line-height:1.6; }
.undoc__b strong { color:var(--text); }
.undoc__btn { display:inline-block; margin-top:10px; padding:6px 14px; background:var(--amber-40); color:var(--ink-100) !important; border-radius:var(--r-sm); font-size:12px; font-weight:600; text-decoration:none; }
.undoc__btn:hover { filter:brightness(.95); }

/* Estado "não identificado / sugestões" */
.notfound { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-1); overflow:hidden; }
.notfound__head { display:flex; gap:14px; align-items:center; padding:20px 22px; border-bottom:1px solid var(--line); }
.notfound__badge { width:44px; height:44px; border-radius:var(--r-md); display:grid; place-items:center; background:var(--red-10); color:var(--red-60); flex-shrink:0; }
.notfound__badge svg { width:22px; height:22px; }
.notfound__badge--info { background:var(--blue-10); color:var(--blue-70); }
[data-theme="dark"] .notfound__badge--info { color:var(--blue-40); }
.notfound__t { font-size:18px; font-weight:700; color:var(--text); }
.notfound__t small { display:block; font-size:13px; font-weight:400; color:var(--muted); margin-top:2px; }
.notfound__body { padding:18px 22px; font-size:14px; color:var(--muted); line-height:1.6; }
.notfound__body strong { color:var(--text); }
.suggest { margin-top:16px; }
.suggest__label { font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); margin-bottom:8px; }
.suggest__item { display:flex; align-items:center; gap:10px; width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--surface); cursor:pointer; margin-bottom:7px; transition:border-color var(--dur-1), box-shadow var(--dur-1); text-align:left; }
.suggest__item:hover { border-color:var(--blue-40); box-shadow:var(--sh-1); }
.suggest__pn { font-family:var(--mono); font-size:14px; font-weight:600; color:var(--text); }
.suggest__pn .diff { color:var(--blue-70); font-weight:700; }
[data-theme="dark"] .suggest__pn .diff { color:var(--blue-40); }
.suggest__meta { margin-left:auto; font-size:11.5px; color:var(--faint); white-space:nowrap; }
.suggest__arrow { margin-left:10px; color:var(--blue-60); display:flex; }
.suggest__arrow svg { width:16px; height:16px; display:block; }
.btn-primary { display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 16px; border-radius:var(--r-md); background:var(--blue-60); color:#fff; border:0; font-size:13.5px; font-weight:600; cursor:pointer; margin-top:16px; transition:background var(--dur-1); }
.btn-primary:hover { background:var(--blue-60h); }
.btn-primary svg { width:16px; height:16px; }

/* =============================================================================
   STATS STRIP (números reais do banco — {{STAT_*}})
   ============================================================================= */
.stats { margin-top:auto; border-top:1px solid var(--line); background:var(--surface); }
.stats__inner { max-width:1180px; margin:0 auto; padding:18px 24px; display:flex; flex-wrap:wrap; justify-content:center; gap:18px 64px; }
.stat { text-align:center; }
.stat__v { font-size:26px; font-weight:700; letter-spacing:-.02em; color:var(--text); }
.stat__l { font-size:13px; color:var(--muted); margin-top:3px; }

/* =============================================================================
   FOOTER — marcas suportadas + copyright (base.html: .foot / .foot__brands / .foot__bar)
   ============================================================================= */
footer.foot { border-top:1px solid var(--line); background:var(--surface); font-family:var(--sans); }
.foot__brands { max-width:1180px; margin:0 auto; padding:14px 24px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px 4px; }
.foot__brands-label { font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin-right:10px; white-space:nowrap; }
.foot__brands-item { font-size:12.5px; font-weight:600; color:var(--muted); padding:2px 7px; }
.foot__brands-sep { display:inline-block; width:1px; height:11px; background:var(--line); vertical-align:middle; }
.foot__bar { max-width:1180px; margin:0 auto; padding:12px 24px 20px; font-size:12px; color:var(--faint); text-align:center; }
.foot a, .foot a:visited { color:var(--muted); }

/* =============================================================================
   MODAL "ADICIONAR CHIP" (classes .wtc-modal* do base.html) — flat
   ============================================================================= */
.wtc-modal-overlay { position:fixed; inset:0; z-index:1000; background:rgba(16,24,40,.55); display:none; align-items:flex-start; justify-content:center; padding:48px 16px; overflow-y:auto; }
.wtc-modal-overlay.is-open { display:flex; }
.wtc-modal { width:100%; max-width:460px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-3); font-family:var(--sans); overflow:hidden; }
.wtc-modal__head { display:flex; align-items:flex-start; gap:12px; padding:20px 22px 16px; border-bottom:1px solid var(--line); }
.wtc-modal__title { margin:0; font-size:18px; font-weight:700; color:var(--text); line-height:1.25; }
.wtc-modal__title small { display:block; font-size:12.5px; font-weight:400; color:var(--muted); margin-top:4px; }
.wtc-modal__close { margin-left:auto; appearance:none; border:0; background:transparent; cursor:pointer; width:30px; height:30px; display:grid; place-items:center; border-radius:var(--r-sm); color:var(--muted); }
.wtc-modal__close:hover { background:var(--surface-2); color:var(--text); }
.wtc-modal__body { padding:18px 22px 4px; }
.wtc-modal__intro { font-size:12.5px; line-height:1.55; color:var(--muted); margin:0 0 16px; }
.wtc-field { margin-bottom:14px; }
.wtc-field label { display:block; font-size:12.5px; font-weight:600; color:var(--muted); margin-bottom:7px; }
.wtc-field label .req { color:var(--red-60); }
.wtc-input, .wtc-textarea { width:100%; font-family:var(--sans); font-size:14px; color:var(--text); background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-md); padding:0 14px; outline:none; transition:border-color var(--dur-1), box-shadow var(--dur-1); }
.wtc-input { height:44px; }
.wtc-input.is-mono { font-family:var(--mono); letter-spacing:.04em; text-transform:uppercase; }
.wtc-textarea { min-height:72px; resize:vertical; line-height:1.45; padding:10px 14px; }
.wtc-input:focus, .wtc-textarea:focus { border-color:var(--accent); box-shadow:0 0 0 4px var(--blue-10); }
.wtc-file { display:flex; align-items:center; gap:10px; border:1px dashed var(--line-2); border-radius:var(--r-md); background:var(--surface); padding:10px 14px; cursor:pointer; font-size:13px; color:var(--muted); }
.wtc-file:hover { background:var(--surface-2); }
.wtc-file svg { width:16px; height:16px; flex-shrink:0; }
.wtc-file input[type=file] { display:none; }
.wtc-file .wtc-file-name { color:var(--text); font-size:12px; margin-left:auto; }
.wtc-modal__foot { display:flex; gap:10px; padding:14px 22px 20px; }
.wtc-btn-cancel, .wtc-btn-submit { border:0; cursor:pointer; height:44px; padding:0 18px; border-radius:var(--r-md); font-family:var(--sans); font-size:14px; font-weight:600; }
.wtc-btn-cancel { background:var(--surface-2); color:var(--muted); }
.wtc-btn-cancel:hover { color:var(--text); }
.wtc-btn-submit { flex:1; color:#fff; background:var(--blue-60); display:flex; align-items:center; justify-content:center; gap:8px; transition:background var(--dur-1); }
.wtc-btn-submit:hover { background:var(--blue-60h); }
.wtc-btn-submit:disabled { opacity:.6; cursor:not-allowed; }
.wtc-modal__success { display:none; padding:30px 22px; text-align:center; }
.wtc-modal__success .ok-led { width:44px; height:44px; margin:0 auto 14px; border-radius:50%; background:var(--green-50); box-shadow:0 0 0 6px var(--green-10); display:grid; place-items:center; color:#fff; font-size:20px; font-weight:700; }
.wtc-modal__success h4 { margin:0 0 6px; font-size:16px; color:var(--text); }
.wtc-modal__success p { margin:0; font-size:13px; color:var(--muted); line-height:1.5; }
.wtc-modal.is-done .wtc-modal__body, .wtc-modal.is-done .wtc-modal__foot { display:none; }
.wtc-modal.is-done .wtc-modal__success { display:block; }
.wtc-form-error { font-size:12.5px; color:var(--red-60); margin:0 0 12px; display:none; }
.wtc-form-error.is-shown { display:block; }

/* =============================================================================
   FOCO — anel de acessibilidade
   ============================================================================= */
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; border-radius:4px; }
.topnav button:focus-visible, .topnav a:focus-visible,
.finder__go:focus-visible, .finder__mic:focus-visible,
.card__foot button:focus-visible, .suggest__item:focus-visible,
.chip-ex:focus-visible, .wtc-modal button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }

/* =============================================================================
   RESPONSIVO — 768 (specs 2col) · 600 (nav compacta) · 400 (specs 1col)
   ============================================================================= */
@media (max-width:768px) {
  .stage { padding:0 16px; }
  .brandmark img { height:52px; }
  .card__grid { grid-template-columns:1fr 1fr; }
  .spec:nth-child(4n) { border-right:1px solid var(--line); }
  .spec:nth-child(2n) { border-right:0; }
  .stats__inner { gap:16px 40px; }
}
@media (max-width:600px) {
  .topnav { padding:0 14px; }
  .topnav__links { display:none; }
  .topnav__hamburger { display:flex; }
  /* drawer mobile dos links */
  .topnav__links.is-open {
    display:flex; position:absolute; top:var(--nav-h); left:0; right:0;
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--surface); border-bottom:1px solid var(--line); box-shadow:var(--sh-2); padding:6px;
  }
  .topnav__links.is-open .topnav__link, .topnav__links.is-open .topnav__navbtn { height:44px; justify-content:flex-start; border-radius:var(--r-sm); }
  .finder { padding:6px 6px 6px 12px; gap:6px; }
  .finder__input { font-size:16px; padding:6px 2px; }
  .finder__mic { width:38px; height:38px; }
  .finder__go { padding:0 13px; height:38px; }
  .finder__go .finder__go-label { display:none; }
  .card__head { flex-wrap:wrap; padding:16px 16px 14px; }
  .verdict { align-items:flex-start; text-align:left; }
  .spec { padding:13px 16px; }
  .card__foot { padding:12px 16px; gap:6px 10px; }
  .brandmark img { height:44px; }
  .app[data-state="idle"] .col-main { padding-top:6vh; }
  .stat__v { font-size:22px; }
}
@media (max-width:400px) {
  .card__grid { grid-template-columns:1fr; }
  .spec { border-right:0 !important; }
  .suggest__meta { display:none; }
  .topnav__login span { display:none; }
  .topnav__login { padding:0 10px; }
  .topnav__lang { display:none; }
}
