/* Apresentação do assessment Raavi — sistema de design derivado do site (ver _planejamento/identidade-visual.md). Fontes em css/fontes.css. */


:root {
  /* Marca (variáveis --aud-* do site) */
  --brand: #4f4444;
  --brand-ink: #3a3232;
  --ink: #1c1917;
  --text: #292524;
  --muted: #6b6560;          /* ajustado: stone-500 do site (#78716c) não passa 4.5:1 sobre stone-100 */
  --bg: #fafaf9;
  --surface: #ffffff;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --line: #e7e5e4;
  --sage: #5f7f5c;           /* só gráficos/ornamentos */
  --sage-soft: #e3ebe1;
  --sand: #efe7dc;
  --rose: #a8434d;           /* ajustado de #c85962 para uso em texto */

  /* Estados (sempre com ícone + texto) */
  --crit: #9b3a35;  --crit-bg: #f8ebe9;
  --warn: #86560c;  --warn-bg: #f8f0df;
  --ok: #3d6b4c;    --ok-bg: #e9f1eb;
  --hyp: #5d5577;   --hyp-bg: #eeecf3;

  /* Tipografia */
  --font: "Funnel Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  --fs-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(3.5rem, 2rem + 7vw, 7.5rem);

  /* Espaço, forma, sombra */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --r-sm: 4px; --r-md: 8px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(28, 25, 23, .05);
  --shadow-2: 0 4px 16px rgba(28, 25, 23, .10);
  --wrap: 1200px;
  --nav-h: 64px;
  --side-w: 248px;
  --views-h: 76px;
  --new: #a8434d;  --new-bg: #f9ecee;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--views-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.6; color: var(--text); background: var(--bg); font-weight: 400; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.15; margin: 0 0 var(--s4); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -.02em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s4); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; background: var(--stone-100); padding: .1em .35em; border-radius: var(--r-sm); word-break: break-word; }
strong { font-weight: 650; color: var(--ink); }
small, .small { font-size: var(--fs-xs); }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Tela de senha (bloqueia a página até a senha correta) ---------- */
html:not(.liberado) body > :not(.gate) { display: none !important; }
html:not(.liberado) body { padding-left: 0; }
html.liberado .gate { display: none; }
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--s5) 16px; background: radial-gradient(900px 500px at 80% 0%, var(--sand), transparent 60%), var(--bg); }
.gate__box { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--s7) var(--s6); }
.gate__logo { width: 120px; margin-bottom: var(--s6); }
.gate__title { font-size: var(--fs-xl, 1.5rem); font-weight: 500; margin-bottom: var(--s2); }
.gate__text { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--s5); }
.gate__label { display: block; font-size: var(--fs-xs); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s2); }
.gate__input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--stone-300); border-radius: var(--r-sm); font: inherit; color: var(--ink); background: var(--surface); }
.gate__input:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.gate__input[aria-invalid="true"] { border-color: var(--crit); }
.gate__erro { min-height: 1.6em; margin: var(--s2) 0 var(--s3); font-size: var(--fs-sm); color: var(--crit); }
.gate__btn { width: 100%; min-height: 48px; border: 0; border-radius: var(--r-pill); background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.gate__btn:hover { background: var(--ink); }

/* ---------- Navegação: barra no topo até 1279 px, menu lateral fixo a partir de 1280 px ---------- */
.sidebar { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; background: rgba(250, 250, 249, .94); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line); }
.sidebar__head { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: 0 clamp(16px, 4vw, 40px); }
.sidebar__logo { flex: none; display: flex; align-items: center; min-height: 44px; }
.sidebar__logo img { width: 74px; height: auto; }
.nav { display: none; position: absolute; top: 100%; left: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); width: min(320px, 86vw); background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--shadow-2); overflow-y: auto; }
.nav.is-open { display: block; }
.nav { counter-reset: secao; }
.nav ul { list-style: none; margin: 0; padding: 0 var(--s3) var(--s4); display: flex; flex-direction: column; gap: 2px; }
.nav__group { display: flex; align-items: center; gap: 8px; margin: var(--s4) 0 var(--s2); padding: 0 var(--s5); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav__group::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nav__group--ok::before { background: var(--ok); }
.nav__group--dc::before { border: 1.5px dashed var(--warn); background: var(--warn-bg); }
.nav li { counter-increment: secao; }
.nav a { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 12px; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; border-radius: var(--r-md); line-height: 1.25; }
.nav a::before { content: counter(secao, decimal-leading-zero); flex: none; width: 1.6em; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--muted); opacity: .8; }
.nav a:hover { color: var(--ink); background: var(--stone-100); }
.nav a[aria-current="true"] { color: var(--ink); background: var(--stone-200); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nav a[aria-current="true"]::before { color: var(--brand); opacity: 1; }
.nav__toggle { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--stone-300); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; background: transparent; pointer-events: none; }
.progress span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--brand); }

@media (min-width: 1280px) {
  :root { --nav-h: 0px; }
  body { padding-left: var(--side-w); }
  .sidebar { inset: 0 auto 0 0; width: var(--side-w); height: auto; display: flex; flex-direction: column; background: var(--surface); backdrop-filter: none; border-bottom: 0; border-right: 1px solid var(--line); }
  .sidebar__head { height: auto; padding: var(--s6) var(--s5) var(--s4); }
  .sidebar__logo img { width: 112px; }
  .nav__toggle { display: none; }
  .nav { display: block; position: static; width: auto; height: auto; flex: 1; min-height: 0; background: none; border: 0; box-shadow: none; }
  .nav ul { padding: 0 var(--s3) var(--s3); }
  .nav__group { margin-top: var(--s3); }
  .progress { left: auto; right: -1px; top: 0; bottom: 0; width: 3px; height: 100%; }
  .progress span { width: 100%; height: calc(var(--p, 0) * 100%); }
}

/* ---------- Seções ---------- */
main { padding-top: var(--nav-h); }
.section { padding: var(--s9) 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--surface); }
.section--sand { background: var(--sand); }
.eyebrow { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: var(--s4); }
.eyebrow b { color: var(--brand); font-weight: 700; }
.lead { font-size: var(--fs-lg); line-height: 1.5; color: var(--text); max-width: 62ch; margin-bottom: var(--s7); }
.lead strong { color: var(--ink); }
.subhead { margin-top: var(--s8); margin-bottom: var(--s5); font-size: var(--fs-lg); }
.source { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s3); }
.source code { font-size: .95em; }

/* ---------- Capa ---------- */
.cover { padding: clamp(48px, 9vw, 120px) 0 var(--s8); background: radial-gradient(1200px 600px at 85% 10%, var(--sand), transparent 60%), var(--bg); }
.cover__grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: var(--s8); align-items: end; }
.cover__logo { width: 168px; margin-bottom: var(--s7); }
.cover h1 { font-size: clamp(2.25rem, 1.2rem + 4vw, 4.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.02; margin-bottom: var(--s5); }
.cover h1 em { font-style: italic; font-weight: 300; color: var(--brand); }
.cover__meta { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); margin: var(--s6) 0 0; padding: 0; }
.cover__meta dd { white-space: nowrap; }
.cover__meta div { margin: 0; }
.cover__meta dt { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cover__meta dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.hero-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s6); box-shadow: var(--shadow-2); }
.hero-stat__num { font-size: var(--fs-hero); font-weight: 300; line-height: .9; letter-spacing: -.05em; color: var(--brand); }
.hero-stat__num small { font-size: .4em; letter-spacing: 0; }
.hero-stat__label { font-size: var(--fs-lg); color: var(--ink); font-weight: 500; margin: var(--s3) 0 var(--s4); }

/* ---------- Etiquetas: fato / hipótese / recomendação / estados ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); border: 1px solid currentColor; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.tag svg { width: 14px; height: 14px; flex: none; }
.tag--fato { color: var(--brand); background: var(--stone-100); border-color: var(--stone-300); }
.tag--hip { color: var(--hyp); background: var(--hyp-bg); border-style: dashed; }
.tag--rec { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.tag--deck { color: var(--warn); background: var(--warn-bg); border-style: dashed; }
.tag--val { color: #fff; background: var(--ok); border-color: var(--ok); }
.tag--new { color: var(--new); background: var(--new-bg); border-color: #e3bcc1; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; padding: 4px 10px; border-radius: var(--r-pill); line-height: 1.3; }
.st svg { width: 16px; height: 16px; flex: none; }
.st--crit { color: var(--crit); background: var(--crit-bg); }
.st--warn { color: var(--warn); background: var(--warn-bg); }
.st--ok { color: var(--ok); background: var(--ok-bg); }
.st--hyp { color: var(--hyp); background: var(--hyp-bg); outline: 1px dashed var(--hyp); outline-offset: -1px; }
.st--na { color: var(--muted); background: var(--stone-100); outline: 1px dashed var(--stone-300); outline-offset: -1px; }

/* ---------- Cartões e grades ---------- */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); box-shadow: var(--shadow-1); min-width: 0; }
.card h3 { font-size: var(--fs-md); line-height: 1.35; margin-bottom: var(--s3); }
.card p:last-child { margin-bottom: 0; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.card__num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.card--crit { border-color: #e8c9c5; background: linear-gradient(var(--crit-bg), var(--surface) 70%); }
.card--hyp { border: 1.5px dashed #b9b3c9; background: #fbfafd; box-shadow: none; }
.card--deck { border: 1.5px dashed #dcc59d; background: #fffcf6; box-shadow: none; }
.card--new { border-color: #e3bcc1; box-shadow: inset 0 3px 0 var(--new), var(--shadow-1); }
.owner { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.owner svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 3px; }
.owner b { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.alert { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: start; border-radius: var(--r-md); padding: var(--s5) var(--s6); border: 1px solid #e8c9c5; background: var(--crit-bg); color: var(--ink); margin-bottom: var(--s6); }
.alert > svg { width: 32px; height: 32px; color: var(--crit); }
.alert h3 { color: var(--crit); margin-bottom: var(--s2); }
.alert p { margin-bottom: var(--s2); }
.ratio { display: inline-flex; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s3); }
.ratio div { background: var(--surface); border: 1px solid #e8c9c5; border-radius: var(--r-md); padding: var(--s3) var(--s4); min-width: 150px; }
.ratio strong { font-size: 2rem; font-weight: 400; display: block; line-height: 1.1; color: var(--crit); }
.ratio .ok strong { color: var(--ok); }

.note { border-left: 3px solid var(--warn); background: var(--warn-bg); padding: var(--s3) var(--s4); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: var(--fs-sm); color: var(--ink); margin: var(--s4) 0; }
.note--hyp { border-left-color: var(--hyp); background: var(--hyp-bg); }
.note--na { border-left-color: var(--stone-300); background: var(--stone-100); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s4); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); }
.kpi__v { font-size: 2.25rem; font-weight: 300; letter-spacing: -.03em; color: var(--ink); line-height: 1.1; }
.kpi__v small { font-size: .45em; color: var(--muted); letter-spacing: 0; }
.kpi__l { font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; }
.kpi--ok { border-color: #c4d8ca; background: var(--ok-bg); }
.kpi--ok .kpi__v { color: var(--ok); }
.kpi--new { border-color: #e3bcc1; background: var(--new-bg); }
.kpi--new .kpi__v { color: var(--new); }

/* ---------- Abas principais (Validado 100% / Precisa de double check) ---------- */
.views { position: sticky; top: var(--nav-h); z-index: 40; background: rgba(250, 250, 249, .96); backdrop-filter: saturate(140%) blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.views__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); padding: 10px 0; }
.views__list button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: var(--s3); min-height: 54px; padding: 8px 16px; border-radius: var(--r-md); border: 1px solid var(--stone-300); background: var(--surface); color: var(--text); }
.views__list button svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.views__list button span { display: grid; line-height: 1.25; }
.views__list button b { font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.views__list button small { font-size: var(--fs-xs); color: var(--muted); }
.views__list button:hover { border-color: var(--brand); }
.views__list button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
#vt-validado[aria-selected="true"] { background: var(--ok); border-color: var(--ok); }
#vt-dados { border-style: dashed; }
#vt-dados[aria-selected="true"] { background: var(--warn); border-color: var(--warn); border-style: solid; }
.views__list button[aria-selected="true"] b, .views__list button[aria-selected="true"] small, .views__list button[aria-selected="true"] svg { color: #fff; }
.view-intro { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4) var(--s5); border-radius: var(--r-md); margin-bottom: var(--s7); font-size: var(--fs-sm); color: var(--ink); }
.view-intro svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.view-intro p { margin: 0; }
.view-intro--ok { background: var(--ok-bg); border: 1px solid #c4d8ca; }
.view-intro--ok svg { color: var(--ok); }
.view-intro--dc { background: var(--warn-bg); border: 1.5px dashed #dcc59d; }
.view-intro--dc svg { color: var(--warn); }

/* ---------- Ranking dos pontos do carrinho ---------- */
.rank { list-style: none; margin: 0 0 var(--s8); padding: 0; display: grid; gap: var(--s2); }
.rank__item { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s4); align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); }
.rank__item--crit { border-left: 4px solid var(--crit); }
.rank__item--warn { border-left: 4px solid var(--warn); }
.rank__n { font-size: 1.5rem; font-weight: 300; color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.rank__t { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rank__t strong { font-size: var(--fs-md); }
.rank__item .small { margin: 0; color: var(--text); }
.rank__ref { margin: 0; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); white-space: nowrap; padding-top: 4px; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
caption { text-align: left; padding: var(--s4) var(--s4) 0; font-size: var(--fs-xs); color: var(--muted); caption-side: top; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--bg); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.hl td { background: #fdf6f5; }
tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--crit); }

/* ---------- Funil ---------- */
.funnel { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s7); align-items: start; }
.funnel svg text { font-family: var(--font); }
.funnel__legend { display: grid; gap: var(--s4); }

/* ---------- Jornada ---------- */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); position: relative; }
.journey::before { content: ""; position: absolute; top: 27px; left: 8%; right: 8%; height: 2px; background: var(--stone-300); }
.step { position: relative; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.step__dot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); font-weight: 700; position: relative; z-index: 1; }
.step__dot--crit { border-color: var(--crit); color: var(--crit); background: var(--crit-bg); }
.step__dot--na { border-style: dashed; border-color: var(--stone-300); color: var(--muted); }
.step h3 { text-align: center; font-size: var(--fs-md); margin: 0; }
.step__time { text-align: center; font-size: var(--fs-xs); color: var(--muted); min-height: 2.6em; }
.step ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.step li { font-size: .84rem; line-height: 1.4; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px 8px 30px; position: relative; }
.step li svg { position: absolute; left: 8px; top: 10px; width: 15px; height: 15px; }
.step li.crit { border-color: #e8c9c5; } .step li.crit svg { color: var(--crit); }
.step li.warn svg { color: var(--warn); }
.step li.exit svg { color: var(--brand); }
.step li.hyp { border-style: dashed; border-color: #b9b3c9; } .step li.hyp svg { color: var(--hyp); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s4); margin: var(--s5) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.legend li { display: inline-flex; gap: 6px; align-items: center; }
.legend svg { width: 16px; height: 16px; }

/* ---------- Anatomia (screenshot + hotspots) ---------- */
.anatomy { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
.shot { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--stone-300); background: var(--surface); box-shadow: var(--shadow-2); }
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: var(--s3) var(--s4); font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.shot__canvas { position: relative; }
.fold { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--crit); pointer-events: none; }
.fold span { position: absolute; left: 50px; top: 6px; background: var(--crit); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); letter-spacing: .04em; white-space: nowrap; }
.zone { position: absolute; border: 2px solid var(--crit); background: rgba(155, 58, 53, .08); border-radius: 4px; pointer-events: none; }
.zone--warn { border-color: var(--warn); background: rgba(134, 86, 12, .08); }
.zone--muted { border: 2px dashed var(--stone-300); background: rgba(214, 211, 209, .18); }
.hs { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.hs span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--crit); color: #fff; font: 700 .9rem/1 var(--font); box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .3); transition: transform .2s; }
.hs--warn span { background: var(--warn); }
.hs--info span { background: var(--brand); }
.hs:hover span, .hs[aria-expanded="true"] span { transform: scale(1.15); }
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); counter-reset: none; }
.hs-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.hs-item button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 30px 1fr; gap: var(--s3); align-items: center; width: 100%; min-height: 48px; padding: 10px 12px; font-weight: 600; color: var(--ink); font-size: var(--fs-sm); line-height: 1.3; }
.hs-item button .st { grid-column: 2; justify-self: start; white-space: nowrap; margin-top: -4px; font-size: .7rem; padding: 2px 8px; }
.hs-item button .st svg { width: 13px; height: 13px; }
.hs-item button:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: var(--r-md); }
.hs-item .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--crit); font-size: .82rem; font-weight: 700; }
.hs-item.warn .n { background: var(--warn); }
.hs-item.info .n { background: var(--brand); }
.hs-item .hs-body { padding: 0 12px 12px 54px; font-size: var(--fs-sm); color: var(--text); }
.hs-item .hs-body p { margin-bottom: 6px; }
.hs-item.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.tabs { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.tabs button { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--stone-300); background: var(--surface); color: var(--text); font: 600 var(--fs-sm) var(--font); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mobile-shot { max-width: 390px; margin: 0 auto; }

/* ---------- Comparação com/sem Giftback ---------- */
.compare { position: relative; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--stone-300); box-shadow: var(--shadow-2); background: #fff; }
.compare img { width: 100%; height: auto; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: var(--ink); transform: translateX(-1.5px); pointer-events: none; }
.compare__handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 18px; }
.compare__labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); font-weight: 650; margin-top: var(--s3); gap: var(--s4); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- Gráficos ---------- */
.chart { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); margin: 0; }
.chart h3 { margin-bottom: var(--s2); }
.chart svg text { font-family: var(--font); fill: var(--text); }
.chart .axis { stroke: var(--stone-300); }
.bars { display: grid; gap: 10px; margin: var(--s4) 0 0; }
.bar { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; gap: var(--s3); align-items: center; font-size: var(--fs-sm); }
.bar__track { height: 14px; background: var(--stone-100); border-radius: var(--r-pill); overflow: hidden; position: relative; }
.bar__fill { height: 100%; width: var(--w); background: var(--brand); border-radius: var(--r-pill); transform-origin: left; }
.bar__fill--crit { background: var(--crit); }
.bar__fill--warn { background: var(--warn); }
.bar__fill--sage { background: var(--sage); }
.bar__fill--muted { background: var(--stone-300); }
.bar__v { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); white-space: nowrap; }
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.gauge { text-align: center; }
.gauge > svg { margin: 0 auto; width: 100%; max-width: 200px; }
.gauge__v { font-size: 1.75rem; font-weight: 400; color: var(--ink); line-height: 1; margin-top: -8px; }
.gauge__l { font-weight: 650; margin-top: 6px; color: var(--ink); }
.gauge__s { font-size: var(--fs-xs); margin-top: 8px; }
.gauge path.arc { transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1); }
.scale { display: flex; justify-content: center; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s4); }
.scale span { display: inline-flex; gap: 6px; align-items: center; }
.scale i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* ---------- A11y: contraste, Tabs, alvos ---------- */
.swatch { display: grid; grid-template-columns: 112px 1fr; gap: var(--s4); align-items: center; }
.swatch__sample { height: 72px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 1rem; }
.swatch__ratio { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.swatch__ratio b { font-size: 1.75rem; font-weight: 400; color: var(--crit); }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--stone-100); position: relative; margin-top: 8px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--crit); }
.meter em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.tabs-count { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0; }
.tabs-count span { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--stone-300); background: var(--surface); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--muted); }
.tabs-count span.gb { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.tabs-count span.inv { border-style: dashed; border-color: var(--crit); color: var(--crit); }
.tabs-count span.end { background: var(--ink); color: #fff; border-color: var(--ink); width: auto; padding: 0 10px; }
.targets { display: flex; align-items: flex-end; gap: var(--s5); flex-wrap: wrap; padding: var(--s4) 0; }
.target { display: grid; justify-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.target i { display: block; border: 2px solid var(--crit); background: var(--crit-bg); border-radius: 3px; }
.target i.ref { border: 2px dashed var(--stone-300); background: transparent; }
.target i.okb { border-color: var(--ok); background: var(--ok-bg); }

/* ---------- Matriz impacto × esforço ---------- */
.matrix-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.matrix svg text { font-family: var(--font); }
.chip-r { cursor: default; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: end; margin-bottom: var(--s4); }
.filters label { display: grid; gap: 4px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.filters select { min-height: 44px; min-width: 190px; padding: 0 36px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--stone-300); background: var(--surface); color: var(--ink); font: 500 var(--fs-sm) var(--font); }
.filters .count { font-size: var(--fs-sm); color: var(--muted); margin-left: auto; align-self: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); background: var(--ink); color: #fff; border: 0; font: 600 var(--fs-sm) var(--font); cursor: pointer; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--stone-300); }
.backlog td:first-child { font-weight: 700; color: var(--brand); }
.backlog { font-size: .8125rem; table-layout: fixed; }
.backlog th, .backlog td { padding: 10px 8px; }
.backlog thead th { font-size: .68rem; letter-spacing: .04em; }
.backlog col.c-id { width: 6.5%; } .backlog col.c-rec { width: 19%; } .backlog col.c-prob { width: 11.5%; } .backlog col.c-etapa { width: 10%; } .backlog col.c-disp { width: 7%; }
.backlog col.c-lvl { width: 6.5%; } .backlog col.c-conf { width: 8%; } .backlog col.c-resp { width: 13%; } .backlog col.c-eb { width: 12%; }
.backlog code { font-size: .8em; }
.lvl { display: inline-block; min-width: 2.2em; text-align: center; font-weight: 700; font-size: .78rem; padding: 2px 6px; border-radius: var(--r-sm); background: var(--stone-100); color: var(--ink); }
.lvl--A { background: var(--crit-bg); color: var(--crit); }
.lvl--M { background: var(--warn-bg); color: var(--warn); }
.lvl--B { background: var(--ok-bg); color: var(--ok); }

/* ---------- Roteiro ---------- */
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.road__col { border-top: 4px solid var(--brand); background: var(--surface); border-radius: 0 0 var(--r-md) var(--r-md); padding: var(--s5); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.road__col--now { border-top-color: var(--crit); }
.road__col--next { border-top-color: var(--warn); }
.road__col--struct { border-top-color: var(--sage); }
.road__col ul { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s3); }
.road__col li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); font-size: var(--fs-sm); align-items: start; }
.road__col li b { font-size: .85rem; color: var(--brand); background: var(--stone-100); border-radius: var(--r-sm); text-align: center; padding: 2px 0; }
.risk { margin-top: var(--s5); }

/* ---------- Lightbox ---------- */
.zoom { all: unset; display: block; cursor: zoom-in; position: relative; }
.zoom:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: var(--r-md); }
.zoom__hint { position: absolute; right: 10px; bottom: 10px; background: rgba(28, 25, 23, .85); color: #fff; font-size: .72rem; font-weight: 650; padding: 4px 10px; border-radius: var(--r-pill); }
dialog.lightbox { border: 0; padding: 0; max-width: min(96vw, 1500px); max-height: 94vh; background: transparent; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(28, 25, 23, .86); }
.lightbox__inner { background: var(--surface); border-radius: var(--r-md); overflow: auto; max-height: 94vh; }
.lightbox img { width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.lightbox__bar p { margin: 0; font-size: var(--fs-sm); }
.lightbox__close { min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--stone-300); background: var(--surface); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }

/* ---------- Diversos ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.list-clean li { padding-left: 22px; position: relative; }
.list-clean li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.index-list { columns: 2; column-gap: var(--s7); font-size: var(--fs-sm); padding-left: 1.2em; }
.index-list li { margin-bottom: 6px; break-inside: avoid; }
footer.site-footer { background: var(--ink); color: #e7e5e4; padding: var(--s8) 0 var(--s7); }
footer.site-footer a { color: #fff; }
footer.site-footer .logo-inv { width: 120px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: var(--s5); }
footer.site-footer p { color: #d6d3d1; max-width: 70ch; }

/* ---------- Animação ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.bar__fill { transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal:not(.is-in) .bar__fill { transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal:not(.is-in) .bar__fill, .bar__fill, .gauge path.arc, .hs span { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1279px) {
  .anatomy { grid-template-columns: 1fr; }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s6); }
  .journey::before { display: none; }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 1279px) {
  .backlog { table-layout: auto; }
  .backlog thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .backlog thead th { position: static; }
  .backlog, .backlog tbody, .backlog tr, .backlog td { display: block; width: 100%; }
  .backlog tr { border-bottom: 1px solid var(--line); padding: var(--s3) 0; }
  .backlog tr[hidden] { display: none; }
  .backlog td { border: 0; padding: 5px 14px 5px 33%; display: flow-root; }
  .backlog td::before { content: attr(data-label); float: left; margin-left: -49.2537%; width: 46%; padding-left: 14px; box-sizing: border-box; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
  .backlog colgroup { display: none; }
}
@media (max-width: 900px) {
  .cover__grid, .funnel, .two-col { grid-template-columns: 1fr; gap: var(--s6); }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road { grid-template-columns: 1fr; }
  .section { padding: var(--s8) 0; }
}
@media (max-width: 640px) {
  :root { --views-h: 66px; }
  .views__list { gap: var(--s2); padding: 8px 0; }
  .views__list button { min-height: 48px; padding: 6px 10px; gap: 8px; }
  .views__list button small { display: none; }
  .views__list button b { font-size: var(--fs-sm); }
  .views__list button svg { width: 18px; height: 18px; }
  .rank__item { grid-template-columns: 28px 1fr; padding: var(--s3) var(--s4); gap: var(--s3); }
  .rank__ref { grid-column: 2; padding-top: 0; white-space: normal; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .step__dot { margin: 0; }
  .step h3, .step__time { text-align: left; }
  .cover__meta { gap: var(--s4) var(--s5); }
  .cover__meta dd { white-space: normal; }
  .gauges { grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .bar { grid-template-columns: 1fr auto; }
  .bar__track { grid-column: 1 / -1; grid-row: 2; }
  .swatch { grid-template-columns: 1fr; }
  .index-list { columns: 1; }
  .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 100%; }
  .filters .count { margin-left: 0; }
  /* tabelas largas viram cartões */
  table.stack thead th { position: static; }
  table.stack thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: var(--s3) 0; }
  table.stack td { border: 0; padding: 5px 14px 5px 40%; display: flow-root; }
  table.stack td::before { content: attr(data-label); float: left; margin-left: -66.6667%; width: 62%; padding-left: 14px; box-sizing: border-box; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
  table.stack caption { display: block; padding: var(--s4) 14px 0; }
  table.stack td.num { text-align: left; white-space: normal; }
  .table-wrap { overflow-x: visible; }
  .hs { width: 44px; height: 44px; }
  .hs span { width: 26px; height: 26px; font-size: .75rem; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .3); }
}

/* ---------- Impressão (A4) ---------- */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root { --nav-h: 0px; }
  html { scroll-behavior: auto; }
  body { background: #fff; font-size: 10.5pt; }
  .sidebar, .skip, .nav__toggle, .zoom__hint, .filters, .tabs, .views, dialog, .compare input, .compare__handle { display: none !important; }
  [data-view][hidden] { display: block !important; }
  .view-intro, .rank__item { break-inside: avoid; }
  h2, h3, .subhead { break-after: avoid; page-break-after: avoid; }
  main { padding-top: 0; }
  body { padding-left: 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .bar__fill { transform: none !important; }
  .section { padding: 10mm 0; border-top: 0; break-before: page; }
  .cover { break-after: page; padding-top: 30mm; }
  .card, .chart, figure, .alert, .step, tr, .road__col, .swatch, .hs-item { break-inside: avoid; }
  .shadow, .card, .shot, .compare, .hero-stat { box-shadow: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
  .hs-item .hs-body { display: block !important; }
  [data-tabpanel][hidden] { display: grid !important; }
  .hs-body[hidden] { display: block !important; }
  .backlog tr[hidden] { display: table-row !important; }
  .compare__top { clip-path: none; position: static; margin-top: 6mm; }
  .table-wrap { overflow: visible; border: 0; }
  thead th { position: static; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .anatomy { grid-template-columns: 1fr; }
  .mobile-shot { max-width: 60mm; }
  .shot, .shot__canvas { break-inside: avoid; }
  footer.site-footer { background: #fff; color: #000; }
  footer.site-footer p { color: #333; }
  footer.site-footer .logo-inv { filter: none; }
}
