/* =========================================================================
   BOSIA — Preview Visual / Fundação de frontend reutilizável
   Design system: tokens, componentes, estados e utilitários.
   A construção real reutiliza esta base (Reuse-First / Design Freeze).
   ========================================================================= */

/* O atributo [hidden] deve prevalecer sobre o display dos componentes
   (ex.: .contact-form, .form-success). Sem esta regra, o display do
   componente sobrepõe o estado oculto nativo e os estados do formulário
   não são alternados corretamente. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #070b13;
  --bg-2: #0a1019;
  --surface: #0e1626;
  --surface-2: #111c30;
  --surface-3: #16233a;
  --line: #1c2941;
  --line-2: #2a3d61;
  --text: #e9effb;
  --text-muted: #96a6c3;
  --text-dim: #6c7d9e;
  --accent: #5b8cff;
  --accent-strong: #7ba2ff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --evidence: #34d399;
  --evidence-soft: rgba(52, 211, 153, 0.12);
  --warn: #f5b544;
  --danger: #f47575;
  --danger-soft: rgba(244, 117, 117, 0.12);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --header-h: 68px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.8);
  --shadow-accent: 0 18px 50px -20px rgba(91, 140, 255, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -0.018em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--text); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(91, 140, 255, 0.35); }

/* --------------------------------------------------------------- utilities */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

/* ------------------------------------------------------------- eyebrow/heads */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 14px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-title {
  font-size: clamp(1.7rem, 1.15rem + 2vw, 2.6rem);
  letter-spacing: -0.025em;
}
.section-sub { margin-top: 16px; color: var(--text-muted); font-size: 1.06rem; }
.subsection-title { font-size: 1.12rem; margin: 26px 0 8px; }
.subsection-title:first-child { margin-top: 0; }

/* ------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }

.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn.is-loading { background: var(--line-2); color: var(--text-muted); box-shadow: none; cursor: progress; }
.btn.is-disabled,
.btn:disabled { background: var(--surface-3); color: var(--text-dim); border-color: var(--line); box-shadow: none; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------- tags */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--line);
}
.tag-ok { background: var(--evidence-soft); color: var(--evidence); border-color: rgba(52, 211, 153, 0.35); }
.tag-pending { background: rgba(245, 181, 68, 0.1); color: var(--warn); border-color: rgba(245, 181, 68, 0.3); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), backdrop-filter 0.25s var(--ease);
}
.site-header.is-condensed {
  background: rgba(7, 11, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; width: 100%; min-width: 0; }
.header-inner > .brand { order: 0; }
.header-inner > .site-nav { order: 1; }
.header-inner > .header-cta { order: 2; }
.header-inner > .nav-toggle { order: 3; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-size: 1.16rem; letter-spacing: 0.02em; }
.brand-sm .brand-name { font-size: 1rem; }

.site-nav {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-list { display: flex; align-items: center; gap: 4px; width: max-content; min-width: 0; }
.nav-cta-item { display: none; }
.nav-link {
  display: block;
  padding: 8px 11px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.header-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-box { display: grid; gap: 4px; }
.nav-toggle-box span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
body.nav-open .nav-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle-box span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 7, 12, 0.6);
  backdrop-filter: blur(2px);
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 84px) 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.16;
  mask-image: radial-gradient(120% 90% at 70% 10%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 10%, #000 20%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  top: -160px; right: -80px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.22), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-title {
  font-size: clamp(2.3rem, 1.3rem + 4.2vw, 4.1rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 22px;
}
.hero-title::after {
  content: "";
  display: block;
  width: 76px; height: 4px;
  margin-top: 26px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--evidence));
}
.hero-sub { color: var(--text-muted); font-size: 1.12rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}
.hero-facts li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--evidence);
}

/* hero console */
.console {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.console-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}
.console-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.console-badge { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.console-list { padding: 8px; max-height: 420px; overflow: auto; }
.console-step {
  display: grid;
  grid-template-columns: 26px 1fr 10px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.94rem;
}
.console-step.is-active { background: var(--accent-soft); color: var(--text); }
.console-num { font-family: var(--mono); font-size: 12px; color: var(--accent-strong); }
.console-name { font-weight: 500; }
.console-status { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-2); }
.console-step.is-active .console-status { background: var(--evidence); border-color: var(--evidence); }
.console-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--evidence);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 22px; height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-cue span {
  width: 3px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(9px); opacity: 0.35; }
}

/* ---------------------------------------------------------------- sections */
.section { position: relative; padding: 92px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* split painel (problema/solução) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.panel-problem { border-top: 3px solid var(--danger); }
.panel-solution { border-top: 3px solid var(--evidence); }
.panel-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.panel-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 999px;
}
.tag-problem { background: var(--danger-soft); color: var(--danger); }
.tag-solution { background: var(--evidence-soft); color: var(--evidence); }
.panel-title { font-size: 1.35rem; }
.panel-lead { color: var(--text-muted); font-size: 0.98rem; margin-bottom: 22px; }

.feature-list { display: grid; gap: 14px; }
.feature { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.feature-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  margin-top: 2px;
  border: 1px solid var(--line-2);
  position: relative;
}
.feature-problem .feature-mark::before,
.feature-problem .feature-mark::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 2px;
  background: var(--danger);
  border-radius: 2px;
}
.feature-problem .feature-mark::before { transform: translate(-50%, -50%) rotate(45deg); }
.feature-problem .feature-mark::after { transform: translate(-50%, -50%) rotate(-45deg); }
.feature-solution .feature-mark { border-color: rgba(52, 211, 153, 0.4); background: var(--evidence-soft); }
.feature-solution .feature-mark::before {
  content: "";
  position: absolute;
  top: 4px; left: 7px;
  width: 5px; height: 9px;
  border: solid var(--evidence);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.feature-title { font-size: 0.99rem; }
.feature-text { color: var(--text-muted); font-size: 0.9rem; }

/* ------------------------------------------------------- cadeia (pipeline) */
.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}
.pipeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pipeline-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease), color 0.15s var(--ease);
}
.pipeline-node:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.pipeline-node[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}
.pipeline-icon { color: var(--accent-strong); display: inline-flex; }
.pipeline-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  min-width: 20px;
}
.pipeline-name { font-weight: 600; font-size: 0.96rem; }
.pipeline-panels { position: sticky; top: calc(var(--header-h) + 20px); }
.pipeline-panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 220px;
}
.pipeline-panel-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.pipeline-panel-title { font-size: 1.5rem; margin-bottom: 10px; }
.pipeline-panel-text { color: var(--text-muted); }
.pipeline-panel-hint { margin-top: 22px; font-size: 0.82rem; color: var(--text-dim); }

/* ----------------------------------------------------------------- cards */
.card-grid { display: grid; gap: 16px; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }
.card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 16px;
}
.card-title { font-size: 1.05rem; margin-bottom: 8px; }
.card-text { color: var(--text-muted); font-size: 0.92rem; }

/* ----------------------------------------------------------------- rotas */
.routes {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.route-tabs { display: grid; gap: 8px; }
.route-tab {
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.route-tab:hover { border-color: var(--line-2); color: var(--text); }
.route-tab.is-active { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.route-panel {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 30px;
  min-height: 220px;
}
.route-title { font-size: 1.4rem; margin-bottom: 10px; }
.route-text { color: var(--text-muted); }
.route-label {
  margin: 22px 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(91, 140, 255, 0.3);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- design */
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.design-copy p { color: var(--text-muted); }
.freeze-card {
  margin-top: 28px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), transparent);
  border-radius: var(--radius);
  padding: 24px;
}
.freeze-head { margin-bottom: 10px; }
.freeze-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--evidence);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
}
.freeze-title { font-size: 1.15rem; margin-bottom: 8px; }
.freeze-card p { color: var(--text-muted); font-size: 0.94rem; }

.preview-frame {
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.preview-dots { display: inline-flex; gap: 5px; }
.preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.preview-url { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.preview-lock {
  margin-left: auto;
  width: 14px; height: 14px;
  border: 1.5px solid var(--evidence);
  border-radius: 3px;
  position: relative;
}
.preview-lock::before {
  content: "";
  position: absolute;
  left: 2.5px; top: -6px;
  width: 6px; height: 7px;
  border: 1.5px solid var(--evidence);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.preview-body { padding: 22px; display: grid; gap: 12px; }
.wire { background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; }
.wire-head { height: 16px; width: 60%; }
.wire-hero { height: 66px; }
.wire-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wire-card { height: 52px; }
.wire-line { height: 10px; }
.wire-line-short { width: 70%; }
.wire-cta { height: 26px; width: 130px; background: var(--accent); border-color: var(--accent); opacity: 0.85; }
.preview-caption { padding: 14px 22px 20px; color: var(--text-dim); font-size: 0.84rem; }

/* prévia ampliável */
.preview-stage { position: relative; }
.preview-zoom-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 0;
}
.preview-zoom-trigger::after {
  content: "Ampliar";
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}
.preview-stage:hover .preview-zoom-trigger { background: rgba(91, 140, 255, 0.06); }
.preview-zoom-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.preview-zoom-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.preview-zoom-btn:hover { background: rgba(91, 140, 255, 0.2); color: var(--text); }
.preview-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(980px, 94vw);
  max-width: 94vw;
}
.preview-dialog::backdrop { background: rgba(4, 7, 14, 0.82); backdrop-filter: blur(4px); }
.preview-dialog-inner {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.preview-dialog-close {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.preview-dialog-close:hover { color: var(--text); border-color: var(--accent); }
.preview-dialog-body .preview-body { padding: 34px; gap: 18px; }
.preview-dialog-body .wire-head { height: 22px; }
.preview-dialog-body .wire-hero { height: 120px; }
.preview-dialog-body .wire-card { height: 92px; }
.preview-dialog-body .wire-line { height: 14px; }
.preview-dialog-body .wire-cta { height: 36px; width: 190px; }

/* -------------------------------------------------------------- evidence */
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.evidence-statement { font-size: 1.18rem; color: var(--text); margin-bottom: 26px; }
.evidence-highlights { display: grid; gap: 16px; }
.evidence-highlight {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--evidence);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.evidence-highlight h3 { font-size: 1rem; margin-bottom: 4px; }
.evidence-highlight p { color: var(--text-muted); font-size: 0.9rem; }

.log-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.log-title { font-weight: 600; font-size: 0.95rem; }
.log-badge { font-family: var(--mono); font-size: 11px; color: var(--evidence); }
.log-foot { padding: 14px 18px; color: var(--text-dim); font-size: 0.82rem; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------- tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--surface-2);
  white-space: nowrap;
}
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table-compact th, .table-compact td { padding: 9px 12px; }

/* --------------------------------------------------------------- gates */
.gates { display: grid; gap: 12px; }
.gate {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.gate[open] { border-color: var(--line-2); }
.gate-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.gate-summary::-webkit-details-marker { display: none; }
.gate-marker {
  width: 10px; height: 18px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  flex: none;
}
.gate-name { flex: 1; }
.gate-toggle {
  width: 12px; height: 12px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.gate[open] .gate-toggle { transform: rotate(225deg); }
.gate-body { padding: 0 20px 20px 44px; color: var(--text-muted); }
.gates-note { margin-top: 18px; font-size: 0.88rem; color: var(--text-dim); }

/* ------------------------------------------------------------- autonomy */
.autonomy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.autonomy-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--surface);
}
.autonomy-card.is-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-accent);
}
.autonomy-card[role="button"] { cursor: pointer; transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.autonomy-card[role="button"]:hover { transform: translateY(-3px); border-color: var(--line-2); }
.autonomy-card[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.autonomy-card.is-selected {
  border-color: var(--evidence);
  box-shadow: 0 0 0 1px var(--evidence), var(--shadow);
}
.autonomy-select-hint {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.autonomy-card.is-selected .autonomy-select-hint { color: var(--evidence); border-color: rgba(52, 211, 153, 0.4); }
.autonomy-flag {
  position: absolute;
  top: -11px; left: 24px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.autonomy-name { font-size: 1.3rem; margin-bottom: 10px; }
.autonomy-desc { color: var(--text-muted); font-size: 0.92rem; min-height: 66px; }
.autonomy-attrs { margin: 20px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.autonomy-attrs > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--surface); }
.autonomy-attrs dt { color: var(--text-dim); font-size: 0.82rem; }
.autonomy-attrs dd { margin: 0; font-weight: 600; font-size: 0.88rem; }

/* ---------------------------------------------------------------- publico */
.segment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.segment {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  background: var(--surface);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.segment:hover { border-color: var(--line-2); transform: translateY(-3px); }
.segment-title { font-size: 1rem; margin-bottom: 8px; }
.segment-text { color: var(--text-muted); font-size: 0.9rem; }

/* -------------------------------------------------------------- compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare-col { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.compare-against { background: var(--surface); }
.compare-for { background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), var(--surface)); border-color: rgba(52, 211, 153, 0.3); }
.compare-title { font-size: 1.15rem; margin-bottom: 18px; }
.compare-list { display: grid; gap: 14px; }
.compare-list li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; color: var(--text-muted); font-size: 0.94rem; }
.compare-mark { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; border: 1px solid var(--line-2); position: relative; }
.compare-against .compare-mark::before,
.compare-against .compare-mark::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 2px; background: var(--danger); border-radius: 2px;
}
.compare-against .compare-mark::before { transform: translate(-50%, -50%) rotate(45deg); }
.compare-against .compare-mark::after { transform: translate(-50%, -50%) rotate(-45deg); }
.compare-for .compare-mark { border-color: rgba(52, 211, 153, 0.5); background: var(--evidence-soft); }
.compare-for .compare-mark::before {
  content: ""; position: absolute; top: 3px; left: 6px; width: 4px; height: 8px;
  border: solid var(--evidence); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ------------------------------------------------------------------ CTA */
.section-cta { background: var(--bg-2); border-top: 1px solid var(--line); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.check-list { display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; color: var(--text-muted); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 17px; height: 17px;
  border-radius: 5px;
  background: var(--evidence-soft);
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 5px;
  width: 5px; height: 8px;
  border: solid var(--evidence);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.channels { margin-top: 34px; }
.channels-title { font-size: 0.82rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 14px; }
.channel-list { display: grid; gap: 10px; }
.channel-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.channel-link { color: var(--text); font-weight: 550; }
.channel-link:hover { color: var(--accent-strong); }

/* ------------------------------------------------------------------ form */
.form-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 30px;
  box-shadow: var(--shadow);
}
.form-title { font-size: 1.25rem; margin-bottom: 6px; }
.form-note { color: var(--text-dim); font-size: 0.86rem; margin-bottom: 22px; }
.contact-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--text-muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); }
.field.is-valid input, .field.is-valid textarea { border-color: rgba(52, 211, 153, 0.5); }
.field-error { color: var(--danger); font-size: 0.82rem; }
.field-check .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--text-muted); font-size: 0.88rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

.form-status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}
.form-status.is-sucesso { border-color: rgba(52, 211, 153, 0.4); background: var(--evidence-soft); color: var(--evidence); }
.form-status.is-erro { border-color: rgba(244, 117, 117, 0.4); background: var(--danger-soft); color: var(--danger); }
.form-status.is-offline { border-color: rgba(245, 181, 68, 0.4); background: rgba(245, 181, 68, 0.1); color: var(--warn); }
.form-offline { color: var(--warn); font-size: 0.84rem; }

.form-success {
  text-align: center;
  padding: 22px 8px;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.form-success h3 { font-size: 1.2rem; }
.form-success p { color: var(--text-muted); }
.form-receipt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}
.success-mark {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--evidence-soft);
  border: 1px solid rgba(52, 211, 153, 0.5);
  position: relative;
}
.success-mark::after {
  content: "";
  position: absolute;
  left: 18px; top: 13px;
  width: 13px; height: 22px;
  border: solid var(--evidence);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-tagline { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 8px; }
.footer-desc { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 16px; }
.footer-heading { font-size: 0.8rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 16px; }
.footer-list { display: grid; gap: 9px; }
.footer-list a { color: var(--text-muted); font-size: 0.9rem; }
.footer-list a:hover { color: var(--accent-strong); }
.footer-channels li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-list + .btn { margin-top: 18px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.82rem;
}
.footer-meta { font-family: var(--mono); }

/* --------------------------------------------------- app shell (governança) */
.app { background: var(--bg); }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 11, 19, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-topbar-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.app-nav { display: flex; gap: 4px; }
.app-nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 550;
}
.app-nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.app-nav-link.is-active { color: var(--accent-strong); background: var(--accent-soft); }
.app-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--warn);
  border: 1px solid rgba(245, 181, 68, 0.3);
  background: rgba(245, 181, 68, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.app-main { padding: 40px 0 72px; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.app-title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.2rem); }
.app-sub { color: var(--text-muted); margin-top: 12px; max-width: 720px; font-size: 0.94rem; }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--text-dim); }
.app-footer p { font-size: 0.86rem; }

/* filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 26px;
}
.filter { display: grid; gap: 6px; min-width: 150px; }
.filter-grow { flex: 1 1 180px; min-width: 0; }
.filter label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.filter select, .filter input {
  padding: 9px 11px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xs);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
  min-width: 0;
}
.filter select:focus, .filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-status { margin: -12px 0 24px; color: var(--text-dim); font-size: 0.82rem; }
.filter-status:empty { display: none; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease);
}
.kpi:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2); }
.kpi-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-family: var(--mono); }
.kpi-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.kpi-foot { display: flex; flex-direction: column; gap: 4px; }
.kpi-delta { font-size: 0.8rem; font-weight: 600; }
.kpi-delta.is-alta { color: var(--evidence); }
.kpi-delta.is-baixa { color: var(--danger); }
.kpi-delta.is-estavel { color: var(--text-muted); }
.kpi-metric { font-size: 0.74rem; color: var(--text-dim); line-height: 1.4; }
.drill-hint { margin: 12px 0; font-size: 0.82rem; color: var(--text-dim); }
.drill:empty { display: none; }
.drill-card { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 26px; overflow: hidden; }
.drill-title { padding: 14px 18px; font-size: 0.95rem; border-bottom: 1px solid var(--line); }

/* charts + tables */
.block-heading { margin: 40px 0 16px; font-size: 1.05rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-block {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  overflow: hidden;
}
.chart-block figcaption { margin-bottom: 12px; }
.chart-block h3 { font-size: 1rem; }
.chart-block p { color: var(--text-dim); font-size: 0.82rem; margin-top: 3px; }
.chart-wide { grid-column: 1 / -1; }
.chart { width: 100%; height: 260px; }
.chart-tall { height: 340px; }
.table-block { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.table-title { padding: 16px 18px; font-size: 1rem; border-bottom: 1px solid var(--line); }
.table-note { padding: 12px 18px 0; color: var(--text-dim); font-size: 0.8rem; }

/* states gallery */
.states-block { margin-top: 44px; }
.states-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.state-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); display: grid; gap: 14px; align-content: start; }
.state-col h3 { font-size: 0.82rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.state-buttons { display: grid; gap: 10px; }
.state-messages { display: grid; gap: 10px; }

/* reports */
.report { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 26px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.report-title { font-size: 1.3rem; }
.report-objetivo { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }
.report-selo { font-family: var(--mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.totais { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.total { border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 14px; background: var(--bg-2); }
.total-rotulo { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-family: var(--mono); }
.total-valor { display: block; margin-top: 6px; font-size: 1.15rem; font-weight: 700; }
.report-foot { margin-top: 16px; color: var(--text-dim); font-size: 0.8rem; }

/* --------------------------------------------------- reveal (movimento leve) */
body.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
body.js .reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------------- preferência por menos movimento (G06) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  body.js .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot,
  .scroll-cue span { animation: none; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .console { max-width: 520px; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline-panels { position: static; }
  .design-grid { grid-template-columns: 1fr; gap: 28px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .routes { grid-template-columns: 1fr; }
  .route-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .states-grid { grid-template-columns: 1fr; }
  .totais { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .section { padding: 72px 0; }
  .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .autonomy-grid { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 95;
    margin: 0;
    background: rgba(9, 14, 24, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-2);
    padding: 14px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
    mask-image: none;
    -webkit-mask-image: none;
  }
  body.nav-open .site-nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 11px 14px; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-link.is-active { background: var(--accent-soft); }
  .nav-link.is-active::after { display: none; }
  .nav-cta-item { display: block; margin-top: 10px; }
  .hero { padding-top: calc(var(--header-h) + 56px); }
  .hero-cta .btn { width: 100%; }
  .pipeline-track { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .app-topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 12px; }
  .app-badge { margin-left: 0; order: 3; }
  .kpi-grid { grid-template-columns: 1fr; }
  .totais { grid-template-columns: 1fr; }
  .filter { min-width: 0; flex: 1; }
  .report { padding: 18px; }
  .chart { height: 220px; }
}

/* Tabelas empilháveis em telas estreitas: cada linha vira um bloco com
   rótulos, evitando corte de colunas (ex.: "Resultado" em #evidencias). */
@media (max-width: 560px) {
  .table-stack thead { display: none; }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { border: 0; padding: 5px 16px; }
  .table-stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
}
