/*
 * Layout: janela escura com barra lateral fixa e área principal em degradê.
 * Cada módulo tem sua cor (data-module no body). Cartões em vidro fosco.
 * Visual deliberadamente escuro em qualquer tema do sistema.
 */
:root {
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.82);
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.22);
  --card: rgba(16, 8, 40, 0.30);
  --card-hi: rgba(255, 255, 255, 0.10);
  --field: rgba(0, 0, 0, 0.24);
  --sidebar: rgba(8, 4, 24, 0.38);

  /* séries dos gráficos: claras para ler sobre qualquer degradê */
  --cbs: #9cc4ff;
  --ibs: #7ff0c9;
  --old: #ffcd70;
  --oldb: #ffa77a;
  --pc: #f6e7b2;
  --on-series: #160a2e;

  --good: #8cf5b2;
  --warn: #ffd27a;
  --bad: #ffa3a3;
  --warn-bg: rgba(255, 196, 80, 0.16);
  --bad-bg: rgba(255, 110, 110, 0.18);

  /* cor do módulo (substituída por [data-module]) */
  --g1: #2a0f6e;
  --g2: #7b2cbf;
  --g3: #1b0b4a;
  --accent: #d63bc8;
  --accent-2: #ff8be8;

  --f-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 18px;
  --sidebar-w: 268px;
  color-scheme: dark;
}

body[data-module="visao"]     { --g1: #03111f; --g2: #0b4f68; --g3: #062240; --accent: #14c7a8; --accent-2: #b6f56e; }
body[data-module="transicao"] { --g1: #06331a; --g2: #2f8f3a; --g3: #0c4a24; --accent: #2fae4f; --accent-2: #9df5b0; }
body[data-module="preco"]     { --g1: #6e1606; --g2: #e0661c; --g3: #9a2a08; --accent: #f07a22; --accent-2: #ffc58a; }
body[data-module="simples"]   { --g1: #4e0640; --g2: #c4268f; --g3: #7a0a5f; --accent: #e0309f; --accent-2: #ff9fe0; }
body[data-module="cadeia"]    { --g1: #10166b; --g2: #2a6fdc; --g3: #1a2a9c; --accent: #3a83f2; --accent-2: #a5d3ff; }
body[data-module="contador"]  { --g1: #053b3a; --g2: #1f9c90; --g3: #0a5552; --accent: #22b3a3; --accent-2: #a3fff0; }
body[data-module="planos"]    { --g1: #061529; --g2: #1d58b8; --g3: #0a2550; --accent: #2fb4ff; --accent-2: #b4ecff; }
body[data-module="fontes"]    { --g1: #1e0a6a; --g2: #6a3cf0; --g3: #2c0f94; --accent: #7a4dff; --accent-2: #cdb8ff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--g1);
  background-image:
    radial-gradient(1100px 760px at 72% 18%, var(--g2) 0%, transparent 62%),
    radial-gradient(900px 700px at 10% 100%, var(--g3) 0%, transparent 70%),
    linear-gradient(140deg, var(--g1) 0%, var(--g3) 100%);
  background-attachment: fixed;
  font: 400 15px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease;
}
a { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; font-family: var(--f-display); }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
small, .small { font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.muted { color: var(--muted); }
.display { font-weight: 300; font-size: clamp(2.3rem, 1.4rem + 3vw, 3.9rem); letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.num, td.n, .kpi-value, .big { font-variant-numeric: tabular-nums; }

/* ============================================================== shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 14px 18px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--sidebar);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 10px; }
.brand-mark { width: 40px; height: auto; flex: none; filter: drop-shadow(0 4px 12px rgba(0, 200, 190, 0.25)); }
.brand-word { display: block; width: 107px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text { gap: 4px; }
.brand-text small { font-size: 0.7rem; line-height: 1.25; }
.nav { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-bottom { margin-top: auto; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 9px 12px; border-radius: 13px; text-decoration: none;
  color: var(--ink-2); font-weight: 500; font-size: 0.97rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 18px rgba(0, 0, 0, 0.18);
}
.nav-ico { width: 28px; height: 28px; flex: none; }
.chip-ico { width: 100%; height: 100%; display: block; }
.chip-ico .glyph, .glass .glyph { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.chip-ico .glyph { stroke-width: 11; }
.glyph .fill { fill: #fff; stroke: none; }
.badge {
  margin-left: auto; font-style: normal; font-size: 0.68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px; background: #ff4fae; color: #fff;
}
.plan-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 4px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 0.8rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
}
.plan-chip:hover { background: rgba(255, 255, 255, 0.14); }
.plan-chip em { font-style: normal; font-weight: 500; color: var(--muted); }
.asof { font-size: 0.74rem; color: var(--muted); padding: 0 10px; }
.asof time { color: var(--ink-2); font-variant-numeric: tabular-nums; }

main { position: relative; min-width: 0; padding-inline: clamp(16px, 3.4vw, 52px); padding-block: calc(env(safe-area-inset-top, 0px) + 34px) 150px; }
.tab { display: flex; flex-direction: column; gap: 22px; max-width: 1240px; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .tab:not([hidden]) { animation: rise 0.45s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0.4; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ============================================================== hero */
.hero {
  min-height: min(640px, calc(100vh - 210px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.hero-art { display: grid; place-items: center; }
.glass { width: min(100%, 420px); height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .glass { animation: float 7s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
}
.hero-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-desc { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); color: var(--ink-2); max-width: 34ch; font-weight: 300; line-height: 1.45; }
.features { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 16px; }
.features li { display: flex; align-items: center; gap: 16px; font-size: 1.08rem; font-weight: 600; }
.features .chip-ico { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25)); }
.hero-refs { font-size: 0.8rem; color: var(--muted); }

.tab.started .hero { display: none; }
.tab:not(.started) .workspace { display: none; }
.workspace { display: flex; flex-direction: column; gap: 20px; }
.ws-head { display: flex; align-items: center; gap: 16px; }
.ws-ico { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3)); }
.ws-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-title h1 { font-weight: 300; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); letter-spacing: -0.01em; }
.ws-title p { color: var(--ink-2); max-width: 70ch; }

/* botão circular */
.cta {
  position: fixed; z-index: 30;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  transform: translateX(-50%);
  width: 128px; height: 128px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle at 34% 28%, var(--accent-2) 0%, var(--accent) 55%, var(--g3) 120%);
  color: #fff; font: 500 1.22rem var(--f-display); letter-spacing: 0.01em;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06), 0 14px 50px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 2px 10px rgba(255, 255, 255, 0.35);
  cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.08), 0 18px 60px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 2px 10px rgba(255, 255, 255, 0.4); }
.cta:active { transform: translateX(-50%) scale(0.97); }
.cta span { display: block; padding: 0 12px; line-height: 1.15; }

/* ============================================================== cartões */
.card {
  position: relative; min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.14);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-label { font-size: 0.95rem; color: var(--ink-2); }
.big { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.7rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.05; }
.delta { font-size: 0.86rem; font-weight: 600; }
.delta.up { color: var(--warn); }
.delta.ok { color: var(--good); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-meta { color: var(--ink-2); font-size: 0.92rem; }
.page-brand { display: flex; align-items: center; gap: 18px; }
.page-logo { width: 76px; height: auto; flex: none; filter: drop-shadow(0 10px 28px rgba(20, 200, 180, 0.35)); }
.page-tag { color: var(--ink-2); margin-top: 6px; }
.section-title { margin-top: 6px; font-size: 1.3rem; font-weight: 600; }

/* ============================================================== painel (visão) */
.dash { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dash .card { display: flex; flex-direction: column; gap: 10px; }
.card-phase { grid-row: span 2; overflow: hidden; }
.card-steps { grid-column: 1 / -1; }
.card-steps .steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.phase-ring { position: absolute; right: -70px; top: -40px; width: 300px; height: 300px; pointer-events: none; }
.phase-name { font-size: clamp(1.9rem, 1.4rem + 1.5vw, 2.5rem); font-weight: 300; color: #8ff3ff; line-height: 1.1; }
.phase-sub { color: var(--ink-2); max-width: 26ch; }
.phase-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.phase-foot .row { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.95rem; }
.progress { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c9f6ff, #6cdcff); }
.split-bar { display: flex; height: 26px; border-radius: 99px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.35); margin: 6px 0 4px; }
.split-bar i { display: block; height: 100%; }
.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.9rem; }
.kv li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; }
.kv .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kv b { font-variant-numeric: tabular-nums; }
.kv .lbl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src { font-size: 0.76rem; color: var(--muted); }
.src a, .cite a { color: var(--ink-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--card-hi); border: 1px solid var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}
.step:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.step .chip-ico { width: 40px; height: 40px; flex: none; }
.step b { display: block; font-size: 0.98rem; }
.step span { font-size: 0.84rem; color: var(--ink-2); }
.card-action { align-self: flex-start; margin-top: auto; }

.timeline { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.tl-year {
  appearance: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); border-radius: 14px; padding: 10px 9px 9px;
  display: flex; flex-direction: column; gap: 8px; transition: background 0.2s ease, border-color 0.2s ease;
}
.tl-year:hover { background: rgba(255, 255, 255, 0.12); }
.tl-year[aria-pressed="true"] { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.16); }
.tl-year .y { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-year .ph { font-size: 0.72rem; color: var(--muted); line-height: 1.2; min-height: 2.4em; }
.tl-stack { height: 86px; display: flex; flex-direction: column-reverse; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.2); }
.tl-stack span { display: block; }
.s-old { background: var(--old); } .s-pc { background: var(--pc); } .s-cbs { background: var(--cbs); } .s-ibs { background: var(--ibs); }
.timeline-detail { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; gap: 6px; }
.timeline-detail .ref { font-size: 0.8rem; color: var(--muted); }
.timeline-detail .ref a { color: var(--ink-2); }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pillar { display: flex; flex-direction: column; gap: 8px; }
.pillar p { font-size: 0.9rem; color: var(--ink-2); }
.pillar p b { color: var(--ink); }
.ref { font-size: 0.76rem; color: var(--muted); margin-top: auto; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.facts.single { grid-template-columns: minmax(0, 1fr); }
.fact { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0 -1px -1px 0; }
.fact h3 { font-size: 0.96rem; }
.fact p { font-size: 0.88rem; color: var(--ink-2); }
.fact .ref { color: var(--muted); }

/* ============================================================== bancada */
.workbench { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.inputs { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; scrollbar-width: thin; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); padding: 0; margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 0.84rem; font-weight: 600; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
input[type="number"], input:not([type]), input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 0.93rem; color: var(--ink);
  background: var(--field); border: 1px solid var(--line-2); border-radius: 11px; padding: 9px 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
select option { background: #1b1240; color: #fff; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14); }
input:user-invalid { border-color: var(--bad); }
input[type="file"] { color: var(--ink-2); font-size: 0.85rem; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 0.86rem; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check small { display: block; }
.segmented { display: inline-flex; align-self: flex-start; background: var(--field); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: block; padding: 7px 16px; border-radius: 9px; font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--muted); }
.segmented input:checked + span { background: rgba(255, 255, 255, 0.2); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.segmented input:focus-visible + span { outline: 2px solid #fff; }

.ref-rates { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px dashed var(--line-2); }
.ref-rates.inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.ref-rates.inline > .field { width: 16rem; max-width: 100%; }
.ref-rates.inline .field-row { display: flex; gap: 10px; }
.ref-rates.inline .field-row .field { width: 7rem; }
.rr-title { font-size: 0.82rem; font-weight: 700; }
.rr-note { font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.rr-note a { color: var(--ink-2); }
.rr-sum { font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.rr-sum.over { color: var(--warn); }

.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.kpis:empty { display: none; }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 0.82rem; color: var(--ink-2); }
.kpi-value { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kpi-sub { font-size: 0.8rem; color: var(--muted); }
.kpi.up .kpi-sub { color: var(--warn); }
.kpi.down .kpi-sub { color: var(--good); }

.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 560px; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f-ui); }
.chart .axis { stroke: rgba(255, 255, 255, 0.12); }
.chart .zero { stroke: rgba(255, 255, 255, 0.5); }
.chart .total-dot { fill: #fff; }
.chart .total-line { stroke: #fff; stroke-width: 1.6; fill: none; stroke-dasharray: 3 4; opacity: 0.85; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.table-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
table.data td.n, table.data th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data td.phase { white-space: nowrap; color: var(--muted); font-size: 0.8rem; }
table.data tr.base td { background: rgba(255, 255, 255, 0.06); font-weight: 600; }
table.data tr.total td { font-weight: 700; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }
.neg { color: var(--good); }
.pos-bad { color: var(--warn); }

details.assumptions { padding: 14px 20px; font-size: 0.88rem; }
details.assumptions summary { cursor: pointer; font-weight: 600; }
details.assumptions ul { margin: 10px 0 2px; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }

.callout { border-radius: 16px; padding: 14px 18px; font-size: 0.92rem; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--line); }
.callout:empty { display: none; }
.callout.warn { background: var(--warn-bg); border-color: rgba(255, 210, 122, 0.35); }
.callout.bad { background: var(--bad-bg); border-color: rgba(255, 163, 163, 0.35); }
.callout a { color: var(--ink); }

.price-bars { display: flex; flex-direction: column; gap: 14px; }
.pbar-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; align-items: center; }
.pbar-row .lbl { font-size: 0.86rem; font-weight: 600; }
.pbar-row .lbl small { display: block; font-weight: 400; }
.pbar { display: flex; height: 32px; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.2); }
.pbar span { display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; color: var(--on-series); white-space: nowrap; overflow: hidden; min-width: 0; }
.pbar .p-cost { background: rgba(255, 255, 255, 0.78); }
.pbar .p-exp { background: rgba(255, 255, 255, 0.42); }
.pbar .p-margin { background: #c6ffd9; }
.pbar .p-old { background: var(--old); }
.pbar .p-pc { background: var(--pc); }
.pbar .p-cbs { background: var(--cbs); }
.pbar .p-ibs { background: var(--ibs); }

.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.option { display: flex; flex-direction: column; gap: 12px; }
.option h3 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 1.05rem; }
.option dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; font-size: 0.9rem; }
.option dt { color: var(--ink-2); }
.option dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.option .strong { font-weight: 700; color: var(--ink); }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.4); border-radius: var(--r); padding: 34px 16px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); transition: background 0.2s ease, border-color 0.2s ease;
}
.dropzone:hover, .dropzone.over { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.dz-title { font-weight: 600; font-size: 1.1rem; }
.dz-sub { color: var(--ink-2); font-size: 0.86rem; max-width: 60ch; }
.cadeia-controls { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.empty { display: flex; flex-direction: column; gap: 10px; }
.empty p { color: var(--ink-2); max-width: 70ch; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.88rem; color: var(--ink-2); }
.chip { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; margin-right: 6px; white-space: nowrap; }
.chip.integral { background: rgba(140, 245, 178, 0.2); color: var(--good); }
.chip.limitado { background: var(--warn-bg); color: var(--warn); }
.chip.sem-grupo, .chip.parcial { background: var(--bad-bg); color: var(--bad); }
.fineprint { font-size: 0.8rem; color: var(--muted); max-width: 90ch; }

.btn {
  appearance: none; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  padding: 9px 16px; border-radius: 11px; color: var(--g1);
  background: #fff; border: 1px solid #fff; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: rgba(255, 255, 255, 0.1); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 163, 163, 0.5); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.msg { font-size: 0.85rem; color: var(--ink-2); min-height: 1.2em; }

.companies { display: grid; gap: 14px; }
.company { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
.company-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.company-head .meta { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-ring { width: 54px; height: 54px; }
.score-ring circle { fill: none; stroke-width: 5; }
.score-ring .bg { stroke: rgba(255, 255, 255, 0.15); }
.score-ring .fg { stroke: #fff; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.score-ring text { font-size: 13px; font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.company .checks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; }
.company .alerts { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.alert { font-size: 0.84rem; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: var(--ink-2); }
.alert.warn { background: var(--warn-bg); }
.alert.bad { background: var(--bad-bg); }
.alert a { color: var(--ink); }
.company .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.deadline-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.deadline-list li { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; font-size: 0.88rem; }
.deadline-list .d { font-variant-numeric: tabular-nums; font-weight: 600; }
.deadline-list small a { color: var(--ink-2); }
.deadline-list .left { font-size: 0.8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.deadline-list .left.soon { color: var(--warn); font-weight: 700; }
.deadline-list .left.past { text-decoration: line-through; }

.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.source { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; }
.source .kind { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--muted); }
.source a { font-weight: 600; text-decoration: none; }
.source a:hover { text-decoration: underline; }
.source p { font-size: 0.85rem; color: var(--ink-2); }

/* ============================================================== planos */
.page-logo-chip { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.3)); }
.callout.launch { background: rgba(47, 180, 255, 0.14); border-color: rgba(120, 210, 255, 0.35); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.current { border-color: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 14px 40px rgba(0, 0, 0, 0.2); }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan h2 { font-size: 1.5rem; font-weight: 300; }
.plan-status { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.plan-status.on { background: rgba(140, 245, 178, 0.2); color: var(--good); }
.plan-status.soon { background: rgba(255, 255, 255, 0.14); color: var(--ink-2); }
.plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-price small { width: 100%; font-size: 0.78rem; color: var(--muted); }
.plan-price small.spacer { visibility: hidden; }
.plan-price b { font-size: clamp(2rem, 1.6rem + 1.2vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--ink-2); font-size: 0.95rem; }
.plan-note { font-size: 0.8rem; color: var(--muted); margin-top: -6px; }
.plan-for { color: var(--ink-2); font-size: 0.9rem; padding-top: 10px; border-top: 1px solid var(--line); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 0.9rem; }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.plan li::before { content: ""; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--ibs); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.15); }
.plan .btn { margin-top: auto; align-self: stretch; text-align: center; text-decoration: none; }
.plan-neg { align-self: center; font-size: 0.82rem; color: var(--ink-2); }
.made-by { display: block; margin: 0 10px; font-size: 0.72rem; color: var(--muted); text-decoration: none; }
.made-by b { color: var(--ink); }
.made-by:hover b { text-decoration: underline; }
.badge.sale { background: #1faa59; }
.signup { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.signup-form, .signup-side { display: flex; flex-direction: column; gap: 14px; }
.checks-group { gap: 10px; }
.consent { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: 0.88rem; }
.remove-form { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.msg.ok { color: var(--good); }
.msg.err { color: var(--bad); }
.usage { font-size: 0.8rem; color: var(--ink-2); }
.usage b { color: var(--ink); }

/* ============================================================== responsivo */
@media (max-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card-phase { grid-row: auto; grid-column: 1 / -1; }
  .card-steps { grid-column: 1 / -1; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .signup { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0; }
  .brand-text, .asof, .plan-chip, .made-by { display: none; }
  .brand-mark { width: 30px; }
  .page-logo { width: 54px; }
  .nav { flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { flex-direction: row; gap: 4px; flex: none; }
  .nav-bottom { margin-top: 0; }
  .nav a { flex: none; padding: 7px 10px; gap: 8px; font-size: 0.86rem; }
  .nav-ico { width: 22px; height: 22px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; padding-bottom: 130px; }
  .glass { width: min(100%, 260px); }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .inputs { position: static; max-height: none; }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .cta { width: 104px; height: 104px; font-size: 1.05rem; left: 50%; }
}
@media (max-width: 560px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .phase-ring { display: none; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company { grid-template-columns: minmax(0, 1fr); }
  .deadline-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pbar-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ws-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .tl-stack span, .pbar span, .score-ring .fg, .progress i { transition: all 0.4s ease; }
}
