/* ============================================================
   A8 Capital — tokens e componentes compartilhados.
   Preto do banner, ouro do traço do logo, creme das letras.
   Archivo em largura expandida para títulos (ecoa o "CAPITAL"
   estendido do logo) e largura normal para texto e números.
   ============================================================ */

:root {
  /* Paleta do tradedesk: preto profundo, amarelo de pista e grafite. */
  --black: #070605;
  --bg: #09090b;
  --panel: #111114;
  --panel-2: #17171b;
  --raised: #202026;
  --line: #25252d;
  --line-2: #33333d;

  --cream: #f3f3f5;
  --sand: #a4a4ae;
  --mute: #6c6c78;
  --faint: #4a4a55;

  --gold: #ffd60a;
  --gold-hi: #fff07a;
  --gold-lo: #c9a400;
  --gold-bg: rgba(255, 214, 10, .1);
  --gold-line: rgba(255, 214, 10, .35);
  --grad-volt: linear-gradient(135deg, #fff07a 0%, #ffd60a 45%, #f2b705 100%);

  --up: #19c37d;
  --up-bg: rgba(25, 195, 125, .12);
  --down: #ff4d5e;
  --down-bg: rgba(255, 77, 94, .12);
  --warn: #ff9f1a;
  --warn-bg: rgba(255, 159, 26, .13);
  --info: #5ea4ff;
  --info-bg: rgba(94, 164, 255, .13);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  --font: "Inter", "Segoe UI", -apple-system, system-ui, sans-serif;
  --display: "Saira", "Inter", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #000; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 4px; }

.wide { font-stretch: 125%; font-variation-settings: "wdth" 125; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.dim { color: var(--sand); }
.mute { color: var(--mute); }
.gold { color: var(--gold); }
.right { text-align: right; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-line { border-color: var(--line-2); background: transparent; }
.btn-line:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.btn-ghost { background: transparent; color: var(--sand); }
.btn-ghost:hover { color: var(--cream); background: rgba(244,238,225,.05); }
.btn-danger { background: var(--down-bg); color: var(--down); border-color: rgba(229,96,79,.3); }
.btn-danger:hover { background: rgba(229,96,79,.2); }
.btn-ok { background: var(--up-bg); color: var(--up); border-color: rgba(63,182,139,.3); }
.btn-ok:hover { background: rgba(63,182,139,.2); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 11px; font-size: 12px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------ formulários */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--sand); display: flex; justify-content: space-between; }
.field .hint { color: var(--mute); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--black); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s;
}
.textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); }
.input::placeholder { color: var(--faint); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sand) 50%), linear-gradient(135deg, var(--sand) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--sand); cursor: pointer; }
.check input { accent-color: var(--gold); margin-top: 3px; }

.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--raised); border: 1px solid var(--line-2); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--sand); transition: .2s var(--ease); }
.switch input:checked + span { background: var(--gold-bg); border-color: var(--gold-line); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--gold); }

/* ------------------------------------------------------ selos */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: rgba(244,238,225,.06); color: var(--sand);
}
.tag svg { width: 12px; height: 12px; }
.tag-gold { background: var(--gold-bg); color: var(--gold-hi); }
.tag-up { background: var(--up-bg); color: var(--up); }
.tag-down { background: var(--down-bg); color: var(--down); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-info { background: var(--info-bg); color: var(--info); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot.live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,182,139,.6); } 70% { box-shadow: 0 0 0 7px rgba(63,182,139,0); } 100% { box-shadow: 0 0 0 0 rgba(63,182,139,0); } }

/* ------------------------------------------------------ avisos */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 600; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--panel-2); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  animation: toast-in .28s var(--ease);
  font-size: 13.5px;
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast strong { display: block; font-size: 13.5px; }
.toast span { color: var(--sand); }
.toast.ok svg { color: var(--up); }
.toast.bad svg { color: var(--down); }
.toast.info svg { color: var(--gold); }
.toast.out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }

/* ------------------------------------------------------ modal e gaveta */
.overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; display: grid; place-items: center; padding: 18px; }
.overlay.in { opacity: 1; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 36px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; transform: translateY(14px); transition: transform .25s var(--ease); }
.overlay.in .modal { transform: none; }
.modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.modal .lead { margin: 0 0 20px; color: var(--sand); font-size: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.overlay.drawer-wrap { place-items: stretch end; padding: 0; }
.drawer { width: min(560px, 100vw); height: 100vh; overflow: auto; background: var(--panel); border-left: 1px solid var(--line-2); transform: translateX(30px); transition: transform .28s var(--ease); }
.overlay.in .drawer { transform: none; }

/* ------------------------------------------------------ tabelas */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 500; color: var(--mute); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr:hover { background: rgba(244,238,225,.025); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t .right { text-align: right; }
table.t td.strong { font-weight: 600; }
tr.flash-up td { animation: flash-up 1s ease-out; }
tr.flash-down td { animation: flash-down 1s ease-out; }
@keyframes flash-up { from { background: rgba(63,182,139,.14); } }
@keyframes flash-down { from { background: rgba(229,96,79,.14); } }

/* ------------------------------------------------------ medidores */
.meter { height: 6px; border-radius: 99px; background: rgba(244,238,225,.07); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--gold); transition: width .6s var(--ease); }
.meter.up > i { background: var(--up); }
.meter.down > i { background: var(--down); }
.meter.warn > i { background: var(--warn); }

/* ------------------------------------------------------ gráficos */
.chart { position: relative; width: 100%; }
.chart canvas { display: block; width: 100%; height: 100%; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; line-height: 1.45; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; transition: opacity .1s;
  font-variant-numeric: tabular-nums;
}
.chart-tip b { font-weight: 600; }
.chart-tip .k { color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------ utilitários */
.small { font-size: 12.5px; }
.d-block { display: block; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.warn-t { color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input.sm, .select.sm { height: 36px; font-size: 13px; }
.select.input { padding-right: 36px; }
code.inline-code { font-size: 12px; background: var(--black); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* seletor de idioma */
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang a { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--mute); padding: 4px 8px; border-radius: 99px; }
.lang a:hover { color: var(--cream); }
.lang a.on { background: var(--gold); color: #000; }

/* faixa da demo */
.demo-bar { position: relative; z-index: 60; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 7px 16px; background: var(--gold); color: #000; font-size: 12.5px; font-weight: 600; text-align: center; }
body.site .demo-bar + .top { top: 33px; }


/* ================================================================
   Camada visual tradedesk: títulos em Saira, números em mono,
   botão principal com gradiente amarelo de pista.
   ================================================================ */
.wide, h1, h2, h3, .hero h1, .sec-h h2, .band h2, .final h2, .page-h h2, .plan-detail h3, .picker-list .pn,
.plan-opt h3, .step .n, .step h3, .auth-art h2, .auth-card h1, .modal h3, .bar h1, .card-h h2, .hero-acc .who h2 {
  font-family: var(--display); font-variation-settings: normal; letter-spacing: -.02em;
}
.hero h1, .sec-h h2, .band h2, .final h2, .page-h h2, .auth-art h2 { font-weight: 700; letter-spacing: -.035em; }
.num, .stat .v, .hero-acc .big, .big2, .mock-stats b, .rules-grid b, .plan-detail .price b, .picker-list .pp, .lane-legend b,
.corridor-legend b, table.t td.right, .kv dd, .tape-item, .plan-opt .p, .sum-row, .lane .me-pt span, .band-facts dd, .console {
  font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.stat .v { font-weight: 600; }
.btn { border-radius: 12px; font-weight: 700; }
.btn-gold { background: var(--grad-volt); color: #151000; box-shadow: 0 10px 30px rgba(255, 214, 10, .2); }
.btn-gold:hover { background: var(--grad-volt); color: #151000; filter: brightness(1.06); }
.btn-line { border-color: rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .35); }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }
.tag-gold, .lang a.on { color: #151000; background: var(--gold); }
.tag-gold svg { color: #151000; }
::selection { background: rgba(255, 214, 10, .35); color: #fff; }

/* etiqueta acima dos títulos (estilo tradedesk) */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 12px var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
