/* InnovaAI · site
   Layout: faixas de largura total alternando "sala de controle" (noite, onde a máquina trabalha)
   e "papel" (editorial, onde a decisão é explicada). Miolo de 1280px.
   Gramática de cor: azul = fluxo da máquina · laranja = para e pede (decisão humana) · verde = feito dentro da alçada. */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* sala de controle (igual nos dois temas, um pouco mais funda no escuro) */
  --night: #071320;
  --night-2: #0C1C2D;
  --night-3: #12273B;
  --night-line: #1E3852;
  --night-ink: #EAF1F8;
  --night-ink-2: #B4C4D6;
  --night-ink-3: #8BA0B6;
  --signal: #52AEF6;
  --alert: #FF8A57;
  --ok: #43CF93;
  /* papel (editorial) */
  --paper: #EDF2F7;
  --paper-2: #E1E9F2;
  --card: #FFFFFF;
  --ink: #0F2747;
  --ink-2: #33475E;
  --ink-3: #56687D;
  --rule: #C5D2DF;
  --blue: #1770B7;
  --blue-deep: #0F5A94;
  --orange: #E8602C;
  --orange-ink: #B4461B;
  --green-ink: #1C7A4F;
  --btn: #1770B7;
  --btn-ink: #FFFFFF;
  /* tipo */
  --f-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "DM Sans", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* medidas */
  --wrap: 1280px;
  --gutter: max(clamp(16px, 4.2vw, 48px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4.2vw, 48px), env(safe-area-inset-right, 0px));
  --header-h: 68px;
  --r-s: 6px;
  --r-m: 12px;
  --r-badge: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --night: #050D17; --night-2: #0A1724; --night-3: #0F2031; --night-line: #1A3049;
    --paper: #0D1823; --paper-2: #122131; --card: #132435; --ink: #E6EEF6; --ink-2: #B9C8D7; --ink-3: #93A6BA; --rule: #263A4E;
    --blue: #62B3F2; --blue-deep: #96CBF6; --orange-ink: #FF9A6C; --green-ink: #55D7A0; --btn: #1C74BB; --btn-ink: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --night: #050D17; --night-2: #0A1724; --night-3: #0F2031; --night-line: #1A3049;
  --paper: #0D1823; --paper-2: #122131; --card: #132435; --ink: #E6EEF6; --ink-2: #B9C8D7; --ink-3: #93A6BA; --rule: #263A4E;
  --blue: #62B3F2; --blue-deep: #96CBF6; --orange-ink: #FF9A6C; --green-ink: #55D7A0; --btn: #1C74BB; --btn-ink: #FFFFFF;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--accent, var(--blue)); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--fg, var(--ink)); }
:focus-visible { outline: 2px solid var(--focus, var(--orange)); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
html { scrollbar-color: color-mix(in srgb, var(--ink-3) 55%, transparent) transparent; }
input, textarea { caret-color: var(--blue); }
::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip:focus { left: calc(16px + env(safe-area-inset-left, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: var(--r-s); }

/* faixas e miolo: cada faixa pinta a largura toda; o miolo leva o recuo lateral */
.band { position: relative; background: var(--bg); color: var(--fg); }
.band > .wrap, .wrap {
  max-width: calc(var(--wrap) + 96px);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
.band-night {
  --bg: var(--night); --fg: var(--night-ink); --fg-2: var(--night-ink-2); --fg-3: var(--night-ink-3);
  --line: var(--night-line); --surface: var(--night-2); --surface-2: var(--night-3);
  --accent: var(--signal); --alert-ink: var(--alert); --ok-ink: var(--ok); --focus: var(--alert);
  --chip-bg: rgba(82, 174, 246, .10); --chip-line: rgba(82, 174, 246, .32);
  color-scheme: dark;
}
.band-paper {
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --line: var(--rule); --surface: var(--card); --surface-2: var(--paper-2);
  --accent: var(--blue); --alert-ink: var(--orange-ink); --ok-ink: var(--green-ink); --focus: var(--orange);
  --chip-bg: color-mix(in srgb, var(--blue) 8%, transparent); --chip-line: color-mix(in srgb, var(--blue) 28%, transparent);
}
.band-paper.alt { --bg: var(--paper-2); }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(82, 174, 246, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(82, 174, 246, .055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 85%);
}
.section { padding-block: clamp(72px, 10vw, 140px); }
.section-tight { padding-block: clamp(48px, 6vw, 88px); }
.band + .band.band-paper:not(.alt), .band-paper + .band-paper { border-top: 1px solid var(--rule); }

/* ---------- tipo ---------- */
.display, .h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(50px, 7.4vw, 118px); line-height: .96; letter-spacing: -.012em;
}
.h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 5.1vw, 74px); line-height: 1; letter-spacing: -.018em; }
.h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 2.7vw, 38px); line-height: 1.08; letter-spacing: -.008em; }
.h4 { font-family: var(--f-body); font-weight: 650; font-size: 19px; line-height: 1.3; letter-spacing: -.005em; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--fg-2); max-width: 38em; }
.body-2 { color: var(--fg-2); }
.small { font-size: 14.5px; line-height: 1.5; }
.muted { color: var(--fg-3); }
.eyebrow {
  font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .8; }
.eyebrow.alert { color: var(--alert-ink); }
.mono { font-family: var(--f-mono); font-size: 13px; letter-spacing: .02em; }
.tnum { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-l { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.head { display: flex; flex-direction: column; gap: 18px; max-width: 52em; margin-bottom: clamp(36px, 5vw, 64px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- botões ---------- */
.btn {
  --b-bg: var(--btn); --b-ink: var(--btn-ink); --b-line: var(--btn);
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 20px;
  border-radius: var(--r-s); border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-ink);
  font-family: var(--f-body); font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, filter .2s, transform .16s var(--ease-out);
}
.btn .arr { display: inline-block; transition: transform .25s var(--ease-out); }
.btn:hover { color: var(--b-ink); filter: brightness(1.08); }
.btn:hover .arr { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.band-night .btn { --b-bg: var(--night-ink); --b-ink: var(--night); --b-line: var(--night-ink); }
.btn.ghost { --b-bg: transparent; --b-ink: var(--fg); --b-line: var(--line); }
.btn.ghost:hover { --b-line: var(--accent); }
.band-night .btn.ghost { --b-bg: transparent; --b-ink: var(--night-ink); --b-line: rgba(234, 241, 248, .28); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; color: var(--accent); }
.link-arrow .arr { transition: transform .25s var(--ease-out); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- cabeçalho ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--night) 86%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  color: var(--night-ink);
  view-transition-name: site-header;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: rgba(255, 255, 255, .07); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--night) 35%, transparent), transparent); opacity: 0; transition: opacity .2s ease; }
.site-header.is-scrolled::after { opacity: 1; }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .site-header { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: rgba(255, 255, 255, .45); } }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--night-ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: var(--r-s);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--night-ink); background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--night-ink); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
.nav .btn { margin-left: 10px; min-height: 42px; padding: 8px 16px; font-size: 15px; --b-bg: var(--night-ink); --b-ink: var(--night); --b-line: var(--night-ink); color: var(--night); background: var(--night-ink); }
.nav .btn:hover { color: var(--night); background: #FFFFFF; }
.nav-toggle {
  display: none; margin-left: auto; min-height: 44px; padding: 8px 14px; border-radius: var(--r-s);
  border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: var(--night-ink); cursor: pointer; font-size: 15px;
}
@media (max-width: 1020px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); border-bottom: 1px solid var(--night-line);
    padding: 8px var(--gutter-r) 20px var(--gutter); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .js .nav { opacity: 0; transform: translateY(-6px); transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), display .16s allow-discrete; }
  .js .nav.open { display: flex; opacity: 1; transform: none; transition-duration: .22s; }
  @starting-style { .js .nav.open { opacity: 0; transform: translateY(-6px); } }
  .js .nav a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--night-line); border-radius: 0; }
  .js .nav a[aria-current="page"] { box-shadow: none; color: var(--signal); }
  .js .nav .btn { margin: 16px 0 0; justify-content: center; border-bottom: 1px solid var(--night-ink); }
}

/* ---------- hero ---------- */
.hero { overflow: hidden; }
.hero::after {
  content: ""; position: absolute; pointer-events: none; width: 70vw; height: 70vw; max-width: 980px; max-height: 980px;
  right: -16vw; top: -18vw; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(23, 112, 183, .34), rgba(23, 112, 183, 0) 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero .hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(44px, 6vw, 88px) clamp(36px, 5vw, 64px); }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(46px, 5.7vw, 94px); line-height: .98; letter-spacing: -.022em; }
.hero h1 .l { display: block; }
.hero h1 > [aria-hidden] { display: block; }
.rotator { display: block; color: var(--signal); font-style: italic; position: relative; text-wrap: balance; }
.rotator .wd { display: inline-block; white-space: nowrap; }
.rotator .c { display: inline-block; will-change: transform, opacity; }
.hero .lead { color: var(--night-ink-2); max-width: 33em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--f-mono); font-size: 13px; color: var(--night-ink-3); letter-spacing: .04em; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.stage { position: relative; aspect-ratio: 4 / 4.4; width: 100%; max-width: 560px; justify-self: center; min-width: 0; }
.stage img.stage-still, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage img.stage-still { object-fit: contain; transition: opacity .6s; }
.stage canvas { opacity: 0; transition: opacity .8s; }
.stage.is-3d canvas { opacity: 1; }
.stage.is-3d img.stage-still { opacity: 0; }
.stage-ctrl {
  position: absolute; right: 6px; bottom: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(234, 241, 248, .22);
  background: rgba(7, 19, 32, .66); color: var(--night-ink-2); font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; cursor: pointer;
}
.stage-ctrl:hover { color: var(--night-ink); border-color: rgba(234, 241, 248, .4); }
.stage-ctrl svg { width: 14px; height: 14px; }
.stage-caption { position: absolute; left: 0; bottom: 10px; font-family: var(--f-mono); font-size: 13px; color: var(--night-ink-3); letter-spacing: .06em; max-width: 60%; }
@media (max-width: 900px) {
  .hero .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 440px; aspect-ratio: 1 / 1.02; }
}
@media (max-width: 520px) { .hero h1 { font-size: clamp(42px, 11.5vw, 58px); } }

/* números da fábrica */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 22px 20px 6px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { font-family: var(--f-display); font-weight: 400; font-size: clamp(44px, 4.6vw, 68px); line-height: .9; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat span { font-size: 15px; color: var(--fg-2); line-height: 1.4; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { padding-left: 0; border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- chips e filtros ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg-2); font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { font-family: var(--f-mono); font-size: 13px; opacity: .7; }
.filters { display: grid; gap: 14px; margin-bottom: 28px; }
.filters-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.filters-row > span { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding-top: 11px; }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 12px; background: var(--surface); max-width: 420px; }
.search input { border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; min-height: 44px; width: 100%; outline: none; }
.search:focus-within { border-color: var(--accent); }
.count-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--f-mono); font-size: 13px; color: var(--fg-3); }
@media (max-width: 640px) { .filters-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } .filters-row > span { padding-top: 0; } }

/* ---------- crachá (cartão de cargo) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.cracha {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-badge); padding: 30px 22px 18px;
  transition: border-color .25s, transform .3s var(--ease-out), box-shadow .3s;
}
.cracha::before { content: ""; position: absolute; top: 12px; left: 50%; width: 46px; height: 7px; margin-left: -23px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.cracha:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(7, 19, 32, .45); }
.cracha-top { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.cracha h3 { font-family: var(--f-display); font-weight: 400; font-size: 27px; line-height: 1.08; color: var(--fg); }
.cracha .faz { color: var(--fg-2); font-size: 15.5px; line-height: 1.5; }
.cracha .para { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 8px; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); padding-top: 10px; border-top: 1px dashed var(--line); }
.cracha .para::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; }
.cracha .para b { color: var(--alert-ink); font-weight: 600; }
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.cap { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .03em; padding: 3px 8px; border-radius: 4px; background: var(--chip-bg); color: var(--fg-2); border: 1px solid var(--chip-line); }
.cap svg { width: 13px; height: 13px; color: var(--accent); flex: none; }
.cracha details { border-top: 1px solid var(--line); padding-top: 10px; }
.cracha summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 14.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.cracha summary::-webkit-details-marker { display: none; }
.cracha summary::after { content: "→"; transition: transform .25s var(--ease-out); }
.cracha summary:hover::after { transform: translateX(4px); }
.cracha .more { display: grid; gap: 10px; padding-top: 10px; font-size: 14.5px; color: var(--fg-2); }
.kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 14px; }
.kv dt { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }
.kv dd { margin: 0; color: var(--fg); }
.cracha.invite { background: transparent; border-style: dashed; justify-content: center; }
.cracha.invite h3 { color: var(--fg); }

/* diálogo do crachá */
dialog.cracha-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 22px;
  background: var(--card); color: var(--ink); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .6); overflow: auto;
}
dialog.cracha-dialog::backdrop { background: rgba(5, 13, 23, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cd-inner { --bg: var(--card); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3); --line: var(--rule); --accent: var(--blue); --alert-ink: var(--orange-ink); --chip-bg: color-mix(in srgb, var(--blue) 8%, transparent); --chip-line: color-mix(in srgb, var(--blue) 28%, transparent); padding: 34px 28px 26px; display: grid; gap: 18px; position: relative; }
.cd-inner::before { content: ""; position: absolute; top: 14px; left: 50%; width: 58px; height: 8px; margin-left: -29px; border-radius: 999px; background: var(--paper-2); }
.cd-strap { height: 6px; background: linear-gradient(90deg, var(--orange), #F28A57); }
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cd-head img { height: 22px; width: auto; }
.cd-close { min-height: 40px; padding: 6px 12px; border-radius: var(--r-s); border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.cd-title { font-family: var(--f-display); font-size: clamp(32px, 6vw, 42px); line-height: 1.02; }
.cd-mat { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; color: var(--ink-3); }

/* ---------- história: como ele decide ---------- */
.story { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.story-steps { display: flex; flex-direction: column; min-width: 0; }
.story-step { min-height: 54vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-block: 24px; opacity: .45; transition: opacity .4s; }
.story-step.is-active, .no-js .story-step, [data-motion="reduce"] .story-step { opacity: 1; }
.story-step:first-child { min-height: 40vh; justify-content: flex-start; padding-top: 4vh; }
.story-step:last-child { min-height: 46vh; }
.story-step .n { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; color: var(--accent); }
.story-step.alertstep .n { color: var(--alert-ink); }
.story-step h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.04; }
.story-step p { color: var(--fg-2); max-width: 30em; font-size: 18px; }
.story-visual { position: sticky; top: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)); min-width: 0; }
.diagram { width: 100%; height: auto; display: block; overflow: visible; }
.diagram .node rect { fill: var(--night-2); stroke: var(--night-line); stroke-width: 1.2; transition: stroke .35s, fill .35s; }
.diagram .node text { fill: var(--night-ink-2); font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; transition: fill .35s; }
.diagram .node .t-strong { fill: var(--night-ink); font-family: var(--f-body); font-weight: 600; font-size: 14px; }
.diagram .edge { fill: none; stroke: var(--night-line); stroke-width: 1.6; transition: stroke .35s; }
.diagram .flow { fill: none; stroke: transparent; stroke-width: 2.4; stroke-dasharray: 5 9; stroke-linecap: round; }
.diagram .log text { font-family: var(--f-mono); font-size: 11.5px; fill: var(--night-ink-3); transition: fill .35s, opacity .35s; }
.diagram .log .k { fill: var(--signal); }
.diagram .log .ka { fill: var(--alert); }
.diagram .log .ko { fill: var(--ok); }
.diagram .log .line { opacity: .32; }
.diagram .badge-core rect.core { fill: #0F2B45; stroke: var(--signal); stroke-width: 1.6; }
.diagram .badge-core .hole { fill: var(--night); }
/* estados por passo */
[data-active] .diagram .on-1, [data-active] .diagram .on-2, [data-active] .diagram .on-3, [data-active] .diagram .on-4, [data-active] .diagram .on-5 { transition: stroke .35s, fill .35s, opacity .35s; }
[data-active="1"] .diagram .n-in1 rect, [data-active="2"] .diagram .n-rule rect { stroke: var(--signal); fill: #0E2A42; }
[data-active="1"] .diagram .e-in1 .flow, [data-active="2"] .diagram .e-rule .flow { stroke: var(--signal); }
[data-active="1"] .diagram .e-in1 .edge, [data-active="2"] .diagram .e-rule .edge { stroke: rgba(82, 174, 246, .35); }
[data-active="3"] .diagram .n-out rect { stroke: var(--ok); fill: #0D2C26; }
[data-active="3"] .diagram .e-out .flow { stroke: var(--ok); }
[data-active="3"] .diagram .e-out .edge { stroke: rgba(67, 207, 147, .35); }
[data-active="4"] .diagram .n-owner rect, [data-active="4"] .diagram .n-in2 rect { stroke: var(--alert); fill: #33190F; }
[data-active="4"] .diagram .e-owner .flow, [data-active="4"] .diagram .e-in2 .flow { stroke: var(--alert); }
[data-active="4"] .diagram .e-owner .edge, [data-active="4"] .diagram .e-in2 .edge { stroke: rgba(255, 138, 87, .4); }
[data-active="5"] .diagram .n-log rect { stroke: var(--signal); }
[data-active="5"] .diagram .e-log .flow { stroke: var(--signal); }
.diagram .log .line { transition: opacity .35s; }
[data-active="1"] .diagram .log .l1,
[data-active="2"] .diagram .log .l1, [data-active="2"] .diagram .log .l2,
[data-active="3"] .diagram .log .l1, [data-active="3"] .diagram .log .l2, [data-active="3"] .diagram .log .l3, [data-active="3"] .diagram .log .l4,
[data-active="4"] .diagram .log .l1, [data-active="4"] .diagram .log .l2, [data-active="4"] .diagram .log .l3, [data-active="4"] .diagram .log .l4, [data-active="4"] .diagram .log .l5, [data-active="4"] .diagram .log .l6,
[data-active="5"] .diagram .log .line, .no-js .diagram .log .line { opacity: 1; }
.flowing .diagram .flow { animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-family: var(--f-mono); font-size: 13px; color: var(--fg-3); }
.diagram-legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 8px; }
@media (max-width: 900px) {
  .story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .story-visual { order: -1; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 2; background: var(--bg); padding-block: 10px 12px; }
  .story-visual::after { content: ""; position: absolute; left: 0; right: 0; bottom: -28px; height: 28px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
  .story-steps { position: relative; z-index: 1; }
  .story-step, .story-step:first-child { min-height: 27vh; justify-content: flex-start; padding-block: 16px 0; }
  .story-step:last-child { min-height: 0; justify-content: flex-start; padding-block: 16px 28px; margin-bottom: -170px; }
  .story { margin-bottom: 170px; }
  .story-step h3 { font-size: 26px; }
  .story-step p { font-size: 16px; }
  .story-visual .diagram-compact { max-height: 36vh; }
  .story-visual .diagram-legend { font-size: 13px; gap: 4px 12px; margin-top: 8px; }
  .story-step > .card-shell { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-m); padding: 16px; display: grid; gap: 8px; }
  .story-step { opacity: 1; }
  .story-step .card-shell > * { transition: opacity .4s; }
  .story-step:not(.is-active) .card-shell > * { opacity: .45; }
  .no-js .story-step .card-shell > *, [data-motion="reduce"] .story-step .card-shell > * { opacity: 1; }
}

/* ---------- linha de montagem / ciclo ---------- */
.track { --p: 0; position: relative; margin-top: 8px; }
.track-line { position: absolute; left: 0; right: 0; top: 27px; height: 2px; background: var(--line); }
.track-line::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: var(--accent); }
.track-stops { position: relative; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 16px; list-style: none; }
.track-stop { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-right: 8px; }
.track-stop .pin { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--fg-3); transition: border-color .35s, color .35s, background-color .35s, box-shadow .35s; position: relative; z-index: 1; }
.track-stop .pin svg { width: 24px; height: 24px; }
.track-stop.is-done .pin { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.track-stop .k { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.track-stop h3 { font-size: 19px; font-weight: 650; line-height: 1.25; }
.track-stop p { font-size: 15px; color: var(--fg-2); line-height: 1.5; }
.track-token { position: absolute; top: 8px; left: calc(var(--p) * (100% - 40px)); width: 40px; height: 40px; z-index: 2; pointer-events: none; }
.track-token svg { width: 40px; height: 40px; filter: drop-shadow(0 6px 14px rgba(7, 19, 32, .35)); }
.loop-note { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 13px; color: var(--fg-2); padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r-s); }
.loop-note svg { width: 18px; height: 18px; color: var(--alert-ink); }
@media (max-width: 900px) {
  .track { padding-left: 72px; }
  .track-line { left: 27px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .track-line::after { width: 100%; height: calc(var(--p) * 100%); }
  .track-stops { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .track-stop { position: relative; padding-right: 0; }
  .track-stop .pin { position: absolute; left: -72px; top: 0; }
  .track-token { left: 8px; top: calc(var(--p) * (100% - 40px)); }
}

/* ---------- mapa de comportamentos ---------- */
.behaviors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.family { background: var(--surface); padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.family-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.family-head h3 { font-size: 17px; font-weight: 650; }
.family-head b { font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.family ul { list-style: none; display: grid; gap: 6px; }
.family li { font-size: 14.5px; color: var(--fg-2); line-height: 1.4; padding-left: 16px; position: relative; }
.family li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1px; background: var(--fg-3); }
.bar-meter { height: 4px; background: var(--chip-bg); border-radius: 4px; overflow: hidden; }
.bar-meter i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 4px; }
.origin-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.origin { border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; display: grid; gap: 12px; align-content: start; background: var(--surface); }
.origin .id { font-family: var(--f-mono); font-size: 13px; color: var(--fg-3); letter-spacing: .06em; }
.origin h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.origin p { font-size: 15px; color: var(--fg-2); }
.origin .src { font-size: 14.5px; color: var(--fg-2); padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 880px) { .origin-cards { grid-template-columns: minmax(0, 1fr); } }

/* portões */
.gates { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: none; }
.gate { display: grid; grid-template-columns: 76px minmax(0, 240px) minmax(0, 1fr); gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.gate .gn { font-family: var(--f-display); font-size: 44px; line-height: .9; color: var(--accent); }
.gate h3 { font-size: 19px; font-weight: 650; }
.gate p { color: var(--fg-2); }
@media (max-width: 720px) { .gate { grid-template-columns: 56px minmax(0, 1fr); } .gate p { grid-column: 2; } }

/* ---------- obrigações (carimbo) ---------- */
.duties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(222px, 100%), 1fr)); gap: 14px; }
.duty { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 20px 22px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--fg); overflow: hidden; min-width: 0; }
.duty:hover { border-color: var(--accent); color: var(--fg); }
.duty .law { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.duty h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.duty p { color: var(--fg-2); font-size: 15.5px; }
.duty .go { order: 6; font-weight: 600; color: var(--accent); }
.stamp {
  order: 5; align-self: flex-end; margin-top: auto; transform: rotate(-7deg);
  font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-align: center; line-height: 1.25;
  color: var(--alert-ink); border: 1.5px solid currentColor; border-radius: 6px; padding: 5px 7px; max-width: 108px; background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.status-note { margin-top: 22px; font-size: 14.5px; color: var(--fg-3); }

/* ---------- degraus ---------- */
.stairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; height: 440px; }
.stair { position: relative; height: var(--h); border: 1px solid var(--line); border-radius: var(--r-m) var(--r-m) 4px 4px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 8px; transform-origin: bottom; min-width: 0; }
.stair b { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: .9; color: var(--accent); }
.stair p { font-size: 14.5px; line-height: 1.4; color: var(--fg-2); }
.stair.top { background: #1770B7; border-color: #1770B7; }
.stair.top b, .stair.top p, .stair.top strong { color: #FFFFFF; }
@media (max-width: 760px) { .stairs { grid-template-columns: minmax(0, 1fr); height: auto; } .stair { height: auto !important; } .stair:nth-child(2) { margin-left: 6%; } .stair:nth-child(3) { margin-left: 12%; } .stair:nth-child(4) { margin-left: 18%; } }

/* ---------- prova ---------- */
.proof { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; }
.proof-main { border-radius: var(--r-badge); background: var(--night); color: var(--night-ink); padding: clamp(24px, 3vw, 40px); display: grid; gap: 22px; position: relative; overflow: hidden; }
.proof-main .eyebrow { color: var(--signal); }
.proof-main h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.08; }
.proof-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.proof-nums div { display: grid; gap: 6px; border-top: 1px solid var(--night-line); padding-top: 14px; }
.proof-nums b { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 4vw, 60px); line-height: .9; font-variant-numeric: tabular-nums; }
.proof-nums span { font-size: 14.5px; color: var(--night-ink-2); }
.proof-side { display: grid; gap: 16px; }
.proof-item { border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; display: grid; gap: 8px; background: var(--surface); }
.proof-item .mono { color: var(--fg-3); }
@media (max-width: 880px) { .proof { grid-template-columns: minmax(0, 1fr); } .proof-nums { grid-template-columns: minmax(0, 1fr); } }

/* ---------- produtos ---------- */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product { display: flex; flex-direction: column; gap: 12px; padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); min-width: 0; }
.product .k { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.product h3 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.08; }
.product p { color: var(--fg-2); font-size: 15.5px; }
.product .link-arrow { margin-top: auto; }
@media (max-width: 1080px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .products { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; border-top: 1.5px solid var(--fg); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; min-width: 680px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
tbody th { font-weight: 650; color: var(--fg); width: 17%; }
td { color: var(--fg-2); }
td.hl, th.hl { background: var(--chip-bg); padding-left: 14px; color: var(--fg); }
@media (max-width: 640px) {
  .table-wrap.stackable { overflow-x: visible; }
  .table-wrap.stackable table { min-width: 0; }
  .table-wrap.stackable thead { position: absolute; left: -9999px; }
  .table-wrap.stackable tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table-wrap.stackable tbody th { display: block; width: auto; padding: 0 0 6px; border: 0; font-size: 17px; }
  .table-wrap.stackable td { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 12px; padding: 6px 0; border: 0; }
  .table-wrap.stackable td::before { content: attr(data-label); font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
  .table-wrap.stackable td.hl { padding: 8px 10px; border-radius: 8px; }
}

/* ---------- capacidades ---------- */
.capgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.capcell { background: var(--surface); padding: 20px 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.capcell svg { width: 28px; height: 28px; color: var(--accent); }
.capcell h3 { font-size: 17px; font-weight: 650; }
.capcell p { font-size: 14.5px; color: var(--fg-2); line-height: 1.45; }
.capcell .how { font-size: 13.5px; color: var(--fg-3); }
.capcell .blk { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
@media (max-width: 1080px) { .capgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .capgrid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- listas, passos, faq ---------- */
.steps-list { list-style: none; border-top: 1.5px solid var(--fg); }
.steps-list li { display: grid; grid-template-columns: 60px minmax(0, 240px) minmax(0, 1fr); gap: 8px 22px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps-list .n { font-family: var(--f-display); font-size: 34px; line-height: 1; color: var(--accent); }
.steps-list strong { font-size: 18px; }
.steps-list p { color: var(--fg-2); }
@media (max-width: 720px) { .steps-list li { grid-template-columns: 46px minmax(0, 1fr); } .steps-list li p { grid-column: 2; } }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--fg-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--ok-ink); border-bottom: 2px solid var(--ok-ink); transform: rotate(-45deg); }
.ticks.no li::before { width: 12px; height: 12px; border: 0; transform: none; top: .42em; background:
  linear-gradient(45deg, transparent 44%, var(--alert-ink) 44%, var(--alert-ink) 56%, transparent 56%),
  linear-gradient(-45deg, transparent 44%, var(--alert-ink) 44%, var(--alert-ink) 56%, transparent 56%); }
.faq { border-top: 1.5px solid var(--fg); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; padding: 20px 0; font-size: 19px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-display); font-size: 30px; line-height: .8; color: var(--accent); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--fg-2); max-width: 46em; }
.faq summary::after { transition: transform .22s var(--ease-out); }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduce"]) .faq details[open] p { animation: faq-in .24s var(--ease-out); }
}
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- formulário ---------- */
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .cta-band .wrap { grid-template-columns: minmax(0, 1fr); } }
.form {
  --bg: var(--card); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3); --line: var(--rule); --accent: var(--blue); --focus: var(--orange);
  background: var(--card); color: var(--ink); border-radius: var(--r-badge); padding: clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form { color-scheme: dark; } }
:root[data-theme="dark"] .form { color-scheme: dark; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-s);
  padding: 11px 12px; min-height: 46px; width: 100%;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 3px 0 0; accent-color: var(--blue); flex: none; }
.check > span { min-width: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; --b-bg: var(--btn); --b-ink: var(--btn-ink); --b-line: var(--btn); }
.form-status { font-size: 15px; line-height: 1.5; padding: 12px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--ink); }
.form-status.err { background: transparent; border: 1.5px solid var(--orange-ink); }
.contact-lines { display: grid; gap: 10px; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 16px; }
.contact-line .mono { color: var(--fg-3); min-width: 82px; }
.copy-btn { min-height: 34px; padding: 4px 10px; border-radius: var(--r-s); border: 1px solid var(--line); background: transparent; color: var(--fg-2); font-size: 13px; cursor: pointer; }
.copy-btn:hover { border-color: var(--accent); color: var(--fg); }

/* ---------- página interna ---------- */
.page-hero .wrap { padding-block: clamp(52px, 7vw, 104px) clamp(40px, 5vw, 72px); display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 1; }
.page-hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(46px, 6.4vw, 96px); line-height: .98; letter-spacing: -.02em; max-width: 15em; }
.page-hero h1 em { font-style: italic; color: var(--signal); }
.page-hero .lead { color: var(--night-ink-2); }
.crumbs { font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: var(--night-ink-3); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--night-ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--night-ink); }
.rule-card { display: grid; gap: 14px; padding: 26px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); position: relative; }
.rule-card .law { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.rule-card { padding-bottom: 66px; }
.rule-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.08; }
.rule-card p { color: var(--fg-2); }
.rule-card .src { font-size: 14px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.three > * { min-width: 0; }
@media (max-width: 900px) { .three { grid-template-columns: minmax(0, 1fr); } }
.box { border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.box h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.box p { color: var(--fg-2); font-size: 15.5px; }
.note-box { background: color-mix(in srgb, var(--alert-ink) 8%, transparent); border-radius: var(--r-s); padding: 12px 16px; color: var(--fg-2); }

/* artigos */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); align-items: start; }
.article .prose { max-width: 42em; display: grid; gap: 18px; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; margin-top: 18px; }
.prose p, .prose li { color: var(--fg-2); font-size: 18px; line-height: 1.65; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.answer { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px 24px; }
.aside-box { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; padding: 22px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
.aside-box h3 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.sources { list-style: none; display: grid; gap: 8px; padding: 0 !important; }
.sources a { word-break: break-word; }
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.article-card { display: grid; gap: 12px; padding: 24px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--fg); align-content: start; }
.article-card:hover { border-color: var(--accent); color: var(--fg); }
.article-card h2 { font-family: var(--f-display); font-weight: 400; font-size: 27px; line-height: 1.12; }
.article-card p { color: var(--fg-2); font-size: 15.5px; }
@media (max-width: 960px) { .article { grid-template-columns: minmax(0, 1fr); } .aside-box { position: static; } }

/* calculadora */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 880px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc .form { grid-template-columns: minmax(0, 1fr); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; min-height: 0; padding: 0; accent-color: var(--blue); background: transparent; border: 0; }
.range-row output { font-family: var(--f-mono); font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; }
.result { border-radius: var(--r-badge); background: var(--night); color: var(--night-ink); padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; }
.result .row { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--night-line); padding-bottom: 12px; align-items: baseline; color: var(--night-ink-2); }
.result .row span:last-child { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--night-ink); text-align: right; }
.result .row.minus span:last-child { color: var(--alert); }
.result .total { font-family: var(--f-display); font-size: clamp(48px, 6vw, 76px); line-height: .95; color: var(--night-ink); font-variant-numeric: tabular-nums; }
.result .total-label { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }

/* ---------- rodapé ---------- */
.site-footer { background: var(--night); color: var(--night-ink-2); border-top: 1px solid var(--night-line); }
.site-footer .wrap { padding-block: 64px calc(40px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer h2 { font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--night-ink-3); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--night-ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--night-ink); }
.site-footer .f-brand { display: grid; gap: 16px; align-content: start; }
.site-footer .f-brand img { height: 32px; width: auto; }
.site-footer .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--night-line); font-size: 13.5px; color: var(--night-ink-3); }
.motion-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--night-line); background: transparent; color: var(--night-ink-2); font-size: 14px; cursor: pointer; }
.motion-toggle[aria-pressed="true"] { border-color: var(--signal); color: var(--night-ink); }
.motion-toggle .sw { width: 28px; height: 16px; border-radius: 999px; background: var(--night-line); position: relative; transition: background-color .2s; }
.motion-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--night-ink-2); transition: transform .2s; }
.motion-toggle[aria-pressed="true"] .sw { background: var(--signal); }
.motion-toggle[aria-pressed="true"] .sw::after { transform: translateX(12px); background: var(--night); }
.ph { background: rgba(255, 138, 87, .16); color: inherit; border-radius: 4px; padding: 0 5px; }
.band-paper .ph { background: color-mix(in srgb, var(--orange) 16%, transparent); }
@media (max-width: 900px) { .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .f-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } }


/* ---------- acréscimos ---------- */
.mural-wrap { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 22px; }
.mural { columns: 3 260px; column-gap: 36px; }
.mural-group { break-inside: avoid; margin-bottom: 28px; display: grid; gap: 8px; }
.mural-group h3 { font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mural-group ul { list-style: none; display: grid; gap: 2px; }
.mural-group a { display: inline-flex; gap: 8px; align-items: baseline; font-family: var(--f-display); font-size: 23px; line-height: 1.3; color: var(--fg); text-decoration: none; transition: color .2s, transform .25s var(--ease-out); }
.mural-group a::after { content: "→"; font-family: var(--f-body); font-size: 15px; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .25s var(--ease-out); color: var(--accent); }
.mural-group a:hover { color: var(--accent); }
.mural-group a:hover::after { opacity: 1; transform: none; }
.diagram-compact { display: none; }
@media (max-width: 900px) { .diagram-wide { display: none; } .diagram-compact { display: block; max-width: 460px; margin-inline: auto; } }
.card-shell { display: grid; gap: 14px; }
.page-hero.is-article h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.04; max-width: 20em; }
.stage-still { pointer-events: none; }
.no-js .stage-ctrl, [data-motion="reduce"] .stage-ctrl { display: none; }
.cards.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1020px) { .cards.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards.featured { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .is-home .cards.featured > :nth-child(n+4) { display: none; }
  .is-home .family li:nth-child(n+3) { display: none; }
}

/* ---------- movimento ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease-out both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root:not([data-motion="reduce"]) .sd-up { animation: sd-up linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@keyframes sd-up { from { opacity: .25; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .flowing .diagram .flow { animation: none; }
  html { scroll-behavior: auto; }
}
[data-motion="reduce"] .flowing .diagram .flow { animation: none; }
[data-motion="reduce"]::view-transition-old(root), [data-motion="reduce"]::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="reduce"]) { scroll-behavior: smooth; } }

/* ---------- toque: resposta ao clique e hover só onde existe mouse ---------- */
.chip, .copy-btn, .cd-close, .nav-toggle, .stage-ctrl, .motion-toggle, .faq summary { transition-property: background-color, color, border-color, transform; transition-duration: .16s; transition-timing-function: var(--ease-out); }
.chip:active, .copy-btn:active, .cd-close:active, .nav-toggle:active, .stage-ctrl:active, .motion-toggle:active { transform: scale(.97); }
@media (hover: none), (pointer: coarse) {
  .cracha:hover { transform: none; box-shadow: none; }
  .btn:hover .arr, .link-arrow:hover .arr, .cracha summary:hover::after { transform: none; }
  .btn:hover { filter: none; }
}
dialog.cracha-dialog.is-closing { opacity: 0; transform: translateY(8px) scale(.98); filter: blur(4px); transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), filter .16s var(--ease-out); }
dialog.cracha-dialog[open]::backdrop { transition: opacity .2s ease; }
@starting-style { dialog.cracha-dialog[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-transparency: reduce) { dialog.cracha-dialog::backdrop { background: rgba(5, 13, 23, .85); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { dialog.cracha-dialog.is-closing { transform: none; filter: none; } }
dialog.cracha-dialog.is-closing::backdrop { opacity: 0; transition: opacity .16s var(--ease-out); }

.portrait { display: block; width: min(100%, 320px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-m); outline: 1px solid var(--rule); outline-offset: -1px; }

/* faixa de alcance (seção prova) */
.reach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 10px; }
.reach div { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.reach b { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 4vw, 60px); line-height: .9; font-variant-numeric: tabular-nums; color: var(--blue); }
.reach span { font-size: 14.5px; color: var(--ink-2); }
.reach-note { color: var(--ink-3); margin-bottom: clamp(24px, 3vw, 36px); }
@media (max-width: 880px) { .reach { grid-template-columns: minmax(0, 1fr); } }
