/* BolsaLab v3.1: tokens de cor e ajustes de contraste.
   Camada carregada por último. Sobrescreve apenas o necessário em product.css e motion.css.
   Contrastes (WCAG 2.x) calculados sobre o fundo indicado. */
:root{
  /* Superfícies */
  --bg:#10171d;            /* fundo principal */
  --surface-1:#1e2a35;     /* cards e painéis (substitui #16212A); 1,24:1 vs bg */
  --surface-2:#26333f;     /* hover e elementos elevados */
  --border-subtle:#344049; /* divisórias decorativas */
  --border-field:#6b7782;  /* inputs, botão secundário: 3,95:1 no bg, 3,19:1 na surface-1 */
  /* Texto no escuro */
  --text-1:#f5f6f7;        /* 16,7:1 */
  --text-2:#a8b1b9;        /* 8,3:1 */
  --text-3:#8a949e;        /* 5,9:1 no bg, 4,7:1 na surface-1 */
  /* Texto no claro */
  --text-1-light:#17232d;  /* 14,2:1 sobre #F0F2F3 */
  --text-2-light:#4a5560;  /* 6,8:1 sobre #F0F2F3, 6,2:1 sobre #E6E9EB */
  /* Ouro */
  --gold:#d4b98a;          /* único ouro de texto e destaque no escuro: 9,5:1 */
  --gold-brand:#b3925f;    /* somente no logo */
  --gold-light:#7a5f38;    /* ouro sobre fundo claro: 5,3:1 */
  /* Estados (sempre com sinal, seta ou texto) */
  --pos:#5fbf8f;           /* 8,0:1 bg, 6,5:1 surface-1 */
  --neg:#e8837a;           /* 6,9:1 bg, 5,5:1 surface-1 */
  --info:#8fb3e0;          /* 8,3:1 */
  --pos-light:#1e7047;     /* 5,6:1 sobre #F5F6F7 */
  --neg-light:#a8382c;     /* 5,9:1 */
  --info-light:#2e6e9e;    /* 5,0:1 */
  /* Gráficos: ordem categórica. Benchmark em --text-2, tracejado */
  --chart-1:var(--gold);--chart-2:#8fb3e0;--chart-3:#6fb7b7;--chart-4:#9c8fd6;--chart-ref:var(--text-2);
  --focus:var(--gold);
  /* Variáveis herdadas de site.css e product.css */
  --dark:var(--surface-1)
}

/* 1. Superfícies: separa painel e fundo */
.product-stage{background:var(--surface-1)}
.ranking .selected{background:var(--surface-2)}
.ranking .selected td:first-child{box-shadow:inset 2px 0 0 var(--gold)}
.chart .mk circle{fill:var(--bg)}

/* 2. Texto: tons que ficavam abaixo de 4,5:1 */
.portfolio-score>span{color:var(--text-3)}
.teachers .chapter-label>span,.teachers .chapter-label p,.teacher-intro p.small,.teacher-steps li>span{color:var(--text-2-light)}

/* 3. Ouro: um tom por contexto */
.ranking .selected td:nth-child(2),.contact .email{color:var(--gold)}
.chapter-label>span,.research-questions li>span{color:var(--text-2)}
.overall strong{color:var(--gold-light)}
.teacher-observation{border-color:var(--gold-light)}

/* 4. Estados de retorno */
.pos{color:var(--pos)}.neg{color:var(--neg)}
.score-section .pos,.teachers .pos{color:var(--pos-light)}.score-section .neg,.teachers .neg{color:var(--neg-light)}

/* 5. Números tabulares */
.portfolio-score,.portfolio-metrics strong,.portfolio-note>span,.overall strong,.diagnosis dd{font-variant-numeric:tabular-nums}

/* 6. Componentes */
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.teachers :focus-visible{outline-color:var(--text-1-light)}
.score-section :focus-visible{outline-color:var(--gold-light)}
.button:hover{background:#fff;color:var(--bg);border-color:#fff}
.teacher-intro .button:hover{background:#344957;color:#f6f7f8;border-color:#344957}
.header-contact,.motion-toggle{border-color:var(--border-field)}
.header-contact:hover,.motion-toggle:hover{border-color:var(--gold)}

/* 7. HDR: mídia não ultrapassa o branco da interface */
img,video{dynamic-range-limit:standard}

/* Design book */
.swatch.slate,.logo-stage,.logo-variants figure{background:var(--surface-1)}
.logo-variants .logo-white{background:#f0f2f3}

/* 8. Ficha da empresa: barras por atributo (escala sequencial de ouro, fundo claro).
   A nota numérica sempre acompanha a barra; a cor não é a única informação. */
.company-sheet{--track:#e6e9eb;--b-crit:#aab3bb;--b-fraco:#d9c49c;--b-neutro:#b99a66;--b-forte:#8f6f41;--b-exc:#5e4726}
.overall b{font-size:21px;letter-spacing:-.02em}
.overall p{font-size:13px;margin-top:4px}
.attributes th{width:34%}
.attributes .bar-cell{width:52%;padding-inline:12px 24px}
.bar{display:block;width:100%;height:6px}
.bar .track{fill:var(--track)}
.bar .b-crit{fill:var(--b-crit)}.bar .b-fraco{fill:var(--b-fraco)}.bar .b-neutro{fill:var(--b-neutro)}.bar .b-forte{fill:var(--b-forte)}.bar .b-exc{fill:var(--b-exc)}
.scale-legend{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px 18px;font-size:11px;color:var(--text-2-light);font-variant-numeric:tabular-nums}
.scale-legend li{display:flex;align-items:center;gap:7px}
.scale-legend li::before{content:'';width:14px;height:6px;background:var(--b)}
.scale-legend .b-crit{--b:var(--b-crit)}.scale-legend .b-fraco{--b:var(--b-fraco)}.scale-legend .b-neutro{--b:var(--b-neutro)}.scale-legend .b-forte{--b:var(--b-forte)}.scale-legend .b-exc{--b:var(--b-exc)}
.company-sheet .reading{margin-top:22px;padding:18px 20px;background:#f0f2f3;border-radius:4px}
.company-sheet .reading p{margin:0;font-size:13px;line-height:1.65;color:var(--text-2-light)}
.company-sheet .reading b{color:var(--text-1-light);font-weight:600}
@media print{.bar,.scale-legend li::before{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* 9. Replay: resultado da decisão. Sinal sempre explícito */
.diagnosis .outcome>div{align-items:baseline}
.diagnosis .outcome dt{font-size:13px;color:var(--text-2)}
.diagnosis .outcome dd{font-weight:600;color:var(--text-1)}
.diagnosis .outcome dd.neg{color:var(--neg)}
.diagnosis .outcome dd.cost{color:var(--gold)}
.diagnosis .outcome>div:last-child{border-bottom:1px solid var(--border-subtle)}
.diagnosis>p.outcome-note{margin-top:14px;font-size:11px;color:var(--text-3)}
