/* IA Hipócrates — client portal (B-LE15). Navy/gold, deliberately distinct from the reviewer
   surface (terracotta/teal). Schema-driven intake: dashboard, institutional accordion, per-AI card. */
:root{
  --bg:            #2B3660;
  --surface:       #3B4A80;
  --surface-raised:#4C5C95;
  --surface-sunk:  #33406F;
  --border:        #5E6EA8;
  --border-soft:   #4A5990;

  --text:          #EDEFF7;
  --text-2:        #AFB6D4;
  --text-muted:    #8189AD;

  --accent:        #E8B84B;
  --accent-hover:  #F2C866;
  --accent-on:     #2E2408;

  --st-novo-bg:      #28405A;  --st-novo-fg:      #A8CFEE;
  --st-analise-bg:   #4A3D1A;  --st-analise-fg:   #F5DA7B;
  --st-bloqueado-bg: #4A211C;  --st-bloqueado-fg: #F0A79B;
  --st-done-bg:      #26402F;  --st-done-fg:      #8BD3A3;

  --st-rascunho-bg:  rgba(0,0,0,.16);
  --st-rascunho-fg:  #8189AD;

  --radius: 8px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

*{ box-sizing:border-box; }

body{
  margin:0; padding:2rem 1rem;
  background:var(--bg); color:var(--text);
  font-family:system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size:16px; line-height:1.5;
}
.wrap{ max-width:900px; margin:0 auto; }
a{ color:var(--text-2); }

.masthead{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
  padding-bottom:14px; margin-bottom:24px;
  border-bottom:1px solid var(--border-soft);
}
.wordmark{ margin:0; font-size:15px; font-weight:600; white-space:nowrap; }
.wordmark .ia{ color:var(--accent); }
.who{ margin:0; font-size:13px; color:var(--text-muted); }
.who a{ color:var(--text-2); }

h1{ margin:0 0 4px; font-size:24px; font-weight:600; }
.lede{ margin:0 0 24px; font-size:14px; color:var(--text-2); }

/* --- pre-auth landing + error hero (index.html / error.html) --- */
.hero{ max-width:520px; padding:8px 0 24px; }
.hero .eyebrow{
  margin:0 0 10px; font-size:12px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--accent); font-family:var(--mono);
}
.hero h1{ font-size:32px; line-height:1.2; margin:0 0 14px; }
.hero .lede{ font-size:16px; color:var(--text-2); margin:0 0 8px; }
.hero .sub{ font-size:14px; color:var(--text-muted); margin:0 0 28px; }
.hero .btn{ padding:11px 26px; font-size:15px; }
.steps{
  display:flex; gap:22px; flex-wrap:wrap;
  margin-top:32px; padding-top:22px; border-top:1px solid var(--border-soft);
}
.step{ flex:1; min-width:130px; }
.step .n{ display:block; font-size:12px; color:var(--accent); font-family:var(--mono); margin-bottom:3px; }
.step p{ margin:0; font-size:13px; color:var(--text-2); }

/* --- dashboard "como funciona" (first-time client only) — reuses .steps/.step --- */
.howto{ margin-bottom:12px; }
.howto-title{ margin:0; font-size:13px; color:var(--text-muted); }
.howto .steps{ margin-top:10px; padding-top:0; border-top:none; }

/* --- Sistemas de IA surface: institutional-summary-with-gear + per-system accordions --- */
.org{
  display:flex; align-items:center; gap:14px; padding:14px 16px; margin-bottom:16px;
  background:var(--surface-sunk); border-radius:var(--radius); border:1px solid var(--border-soft);
}
.org-main{ flex:1; min-width:0; }
.org-name{ margin:0; font-size:15px; }
.org-meta{ margin:1px 0 0; font-size:12px; color:var(--text-muted); font-family:var(--mono); }
.gear{
  width:34px; height:34px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  background:none; border:1px solid var(--border-soft); border-radius:var(--radius);
  cursor:pointer; color:var(--text-2); text-decoration:none; transition:all .12s;
}
.gear:hover{ background:var(--surface-raised); color:var(--text); border-color:var(--border); }
.gear svg{ width:17px; height:17px; }

.systems{ margin-bottom:12px; }
.sys{ background:var(--surface); border-radius:12px; margin-bottom:8px; overflow:hidden; }
/* Tier color-state: the form container CARRIES its commercial state. Free = neutral frame with a
   green edge; engaged = the whole frame goes GOLD (payment changes the form's color). */
.sys.tier-free{ border:1px solid var(--border-soft); border-left:3px solid #5bb98a; }
.sys.tier-engaged{ border:1px solid rgba(232,184,75,.55); border-left:3px solid var(--accent); }
.sys.tier-engaged .sys-head{ background:rgba(232,184,75,.06); }
.card.tier-free{ border-left:3px solid #5bb98a; }
.card.tier-engaged{ border:1px solid rgba(232,184,75,.55); border-left:3px solid var(--accent); }
.badge.b-free{ color:#fff; background:#2f9e6e; border:1px solid #2a8d62; letter-spacing:.03em; }
.badge.b-eng{ color:#3a2c05; background:var(--accent); border:1px solid rgba(0,0,0,.18); letter-spacing:.03em; }
/* Full-width strip at the top of the form body — the form STATES what it is before question one. */
.tier-strip{
  margin:0 0 16px; padding:9px 14px; border-radius:8px; font-size:12.5px; font-weight:600;
  letter-spacing:.02em;
}
.tier-strip.free{ color:#fff; background:#2f9e6e; border:1px solid #2a8d62; }
.tier-strip.eng{ color:#3a2c05; background:var(--accent); border:1px solid rgba(0,0,0,.18); }
.sys-head{
  display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px;
  background:none; border:none; cursor:pointer; color:var(--text); font:inherit; text-align:left;
  transition:background .1s;
}
.sys-head:hover{ background:var(--surface-raised); }
.sys-head[aria-expanded="true"] .chev{ transform:rotate(45deg); }
.sys-main{ flex:1; min-width:0; }
.sys-name{ font-size:15px; }
.sys-code{ display:block; margin-top:2px; font-size:12px; color:var(--text-muted); font-family:var(--mono); }
.sys-body{ padding:0 16px 18px; border-top:1px solid var(--border-soft); background:var(--surface-sunk); }
.sys-body[hidden]{ display:none; }
.sys-body .field:first-of-type{ margin-top:18px; }

/* read-only record of a submitted system */
.dl{ margin:18px 0 0; display:grid; gap:14px; }
.dl-row{ display:grid; grid-template-columns:200px 1fr; gap:16px; align-items:baseline; }
@media (max-width:620px){ .dl-row{ grid-template-columns:1fr; gap:2px; } }
.dl dt{ font-size:13px; color:var(--text-muted); }
.dl dd{ margin:0; font-size:14px; }
.dl dd.chips{ display:flex; flex-wrap:wrap; gap:5px; }
.chip{ font-size:12px; padding:2px 9px; background:var(--surface-raised); border-radius:var(--radius); color:var(--text-2); }
.sent{ margin-top:18px; padding-top:14px; border-top:1px solid var(--border-soft); font-size:12px; color:var(--text-muted); }

.sys-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  margin-top:20px; padding-top:16px; border-top:1px solid var(--border-soft);
}
.foot-left{ display:flex; align-items:center; gap:12px; }
/* Progressive flow: the caption is a full-width line above the (single visible) action button. */
.foot-btns{ flex-wrap:wrap; justify-content:flex-end; }
.step-caption{
  flex-basis:100%; text-align:right; font-size:12px; color:var(--text-muted); margin:0 0 2px;
}
.step-caption[hidden]{ display:none; }

/* "Próximos passos" — the chapter break + two-card mode transition (free tools vs the service). */
.next-steps{
  margin:22px 0 0; padding:18px 16px 16px;
  background:var(--surface-sunk, rgba(0,0,0,.10));
  border:2px solid var(--accent);
  border-radius:var(--radius);
}
.ns-title{
  margin:0 0 14px; font-size:14px; font-weight:800; letter-spacing:.03em; color:var(--text);
  text-transform:uppercase;
}
.ns-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ns-grid.single{ grid-template-columns:1fr; }
@media (max-width:720px){ .ns-grid{ grid-template-columns:1fr; } }
.ns-card{
  padding:14px 16px; border-radius:var(--radius); border:1px solid var(--border-soft);
  background:var(--surface-raised, rgba(255,255,255,.03));
}
.ns-head{
  margin:0 0 12px; font-size:12.5px; font-weight:700; letter-spacing:.02em; color:var(--text-2);
  text-transform:uppercase;
}
.free-tag{
  font-size:11px; font-weight:600; text-transform:none; letter-spacing:0; vertical-align:middle;
  color:#4aa578; border:1px solid #5bb98a; border-radius:10px; padding:1px 8px; margin-left:6px;
}
.eng-tag{
  font-size:11px; font-weight:600; text-transform:none; letter-spacing:0; vertical-align:middle;
  color:var(--accent); border:1px solid var(--accent); border-radius:10px; padding:1px 8px; margin-left:6px;
}
/* Free card: one row per tool — name/desc/status left, action right. */
.tool{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; }
.tool + .tool{ border-top:1px solid var(--border-soft); }
.tool-info{ min-width:0; }
.tool-name{ margin:0; font-size:13.5px; font-weight:600; color:var(--text); }
.tool-desc{ margin:2px 0 0; font-size:12px; color:var(--text-muted); }
.tool-status{ margin:4px 0 0; font-size:12px; color:var(--text-2); }
.tool .btn{ flex-shrink:0; }
.tool .btn.ghost{ opacity:.85; }
/* Pro card: the service — solid border always (dashed reads as "disabled"), lit when ready.
   Text: white, normal weight, sentence case (per Leo). */
.ns-card.pro{ border-color:var(--border); }
.ns-card.pro .ns-head{ color:#fff; font-weight:400; text-transform:none; font-size:15px; }
.ns-card.pro .pro-lead{ color:#fff; }
.ns-card.pro .pro-list li{ color:#fff; font-weight:400; }
.ns-card.pro .pro-note{ color:#fff; }
.ns-card.pro.ready{ border-color:var(--accent); background:rgba(232,184,75,.06); }
.pro-lead{ margin:0 0 10px; font-size:13px; color:var(--text-2); }
.ns-card.pro.ready .pro-lead{ color:#4aa578; font-weight:600; }
.pro-list{ list-style:none; margin:0 0 12px; padding:0; }
.pro-list li{ margin:4px 0; font-size:13px; color:var(--text-2); padding-left:18px; position:relative; }
.pro-list li::before{ content:"✓"; position:absolute; left:0; color:#5bb98a; }
.pro-list .ou{ font-weight:800; color:var(--text); letter-spacing:.03em; }
.pro-note{ margin:8px 0 0; font-size:12px; color:var(--text-muted); }
.pro-note[hidden]{ display:none; }
/* The dominant CTA — full-width, bigger than anything in the free card. */
.btn.cta{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%; text-align:center;
  padding:12px 18px; font-size:15px; font-weight:700; box-sizing:border-box;
}
.btn.cta svg{ width:18px; height:18px; flex-shrink:0; }

/* Mockup polish: card sub-lead, tool icons, free-tools reassurance, lock note. */
.ns-sub{ margin:-4px 0 10px; font-size:12.5px; color:var(--text-muted); }
.tool-ico{
  flex-shrink:0; width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border-radius:10px; background:rgba(127,119,221,.14); color:#A78BFA;
}
.tool-ico svg{ width:20px; height:20px; }
.free-foot{
  display:flex; align-items:center; gap:8px; margin:10px 0 0; padding-top:10px;
  border-top:1px solid var(--border-soft); font-size:12px; color:var(--text-muted);
}
.free-foot svg{ width:16px; height:16px; flex-shrink:0; }
.pro-note{ display:flex; align-items:center; justify-content:center; gap:6px; }
.pro-note svg{ width:14px; height:14px; flex-shrink:0; }

/* Answered-form collapse (complete drafts only): expander between the preview and the panels. */
.more-toggle{
  display:block; width:100%; margin:8px 0 4px; padding:9px 12px; border-radius:8px;
  border:1px solid var(--border-soft); background:transparent; color:var(--text-2);
  font-size:13px; cursor:pointer; text-align:center;
}
.more-toggle:hover{ background:rgba(255,255,255,.04); }

/* Compact two-column verdict summary (labels only; guidance in the tooltip). */
.alpha-flags.compact{ columns:2; column-gap:24px; }
.alpha-flags.compact li{ break-inside:avoid; }
.alpha-flags.compact a{ padding:3px 6px; }
.alpha-flags.compact .q{ font-weight:500; font-size:12.5px; }
@media (max-width:720px){ .alpha-flags.compact{ columns:1; } }

.card{ background:var(--surface); border-radius:12px; padding:18px 20px; margin-bottom:12px; }
.card.locked{ background:var(--surface-sunk); }
.card-head{ display:flex; align-items:center; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.card-head h2{ margin:0; font-size:17px; font-weight:600; flex:1; min-width:0; }
.card > p{ margin:0 0 14px; font-size:14px; color:var(--text-2); }
.card > p:last-child{ margin-bottom:0; }

.badge{ font-size:12px; padding:3px 10px; border-radius:var(--radius); white-space:nowrap; flex-shrink:0; }
.b-novo{      background:var(--st-novo-bg);      color:var(--st-novo-fg); }
.b-analise{   background:var(--st-analise-bg);   color:var(--st-analise-fg); }
.b-bloqueado{ background:var(--st-bloqueado-bg); color:var(--st-bloqueado-fg); }
.b-done{      background:var(--st-done-bg);      color:var(--st-done-fg); }
.b-rascunho{  background:var(--st-rascunho-bg); color:var(--st-rascunho-fg); border:1px solid rgba(255,255,255,.08); }

.btn{
  display:inline-block; font:inherit; font-size:14px; font-weight:500;
  padding:9px 18px; border:none; border-radius:var(--radius);
  background:var(--accent); color:var(--accent-on);
  cursor:pointer; text-decoration:none; transition:background .12s;
}
.btn:hover{ background:var(--accent-hover); }
.btn.ghost{ background:transparent; color:var(--text-2); border:1px solid var(--border); }
.btn.ghost:hover{ background:var(--surface-raised); color:var(--text); }
/* Avaliar (Alpha) — deliberately off-system purple, apart from the gold primary actions. */
.btn.alpha{ background:#A78BFA; color:#241A3E; }
.btn.alpha:hover{ background:#b9a2fb; }
.btn:disabled{ background:var(--surface-raised); color:var(--text-muted); cursor:not-allowed; }
form{ margin:0; }

.progress{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.bar{ flex:1; height:5px; border-radius:3px; background:rgba(0,0,0,.22); overflow:hidden; }
.bar > span{ display:block; height:100%; background:var(--accent); border-radius:3px; transition:width .25s; }
.pct{ font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; min-width:88px; text-align:right; }

.sys-list{ margin:0; padding:0; list-style:none; }
.sys-row{ display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--border-soft); }
.sys-row:last-child{ border-bottom:none; }
.sys-main{ flex:1; min-width:0; }
.sys-name{ margin:0; font-size:15px; }
.sys-meta{ margin:2px 0 0; font-size:12px; color:var(--text-muted); font-family:var(--mono); }
.add-row{
  margin-top:22px; padding-top:18px; border-top:1px solid var(--border-soft);
  display:flex; justify-content:center;
}
/* Contextual help: the "?" buttons (trees) + popover, and the tutorial page (forest). */
.help{
  display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px;
  margin-left:6px; padding:0; border-radius:50%; border:1px solid currentColor; background:transparent;
  color:inherit; font-size:11px; font-weight:700; line-height:1; cursor:pointer; opacity:.75;
  vertical-align:middle;
}
.help:hover{ opacity:1; }
.help-pop{
  position:absolute; z-index:60; max-width:300px; padding:12px 14px; border-radius:10px;
  background:var(--surface-raised, #2a3155); border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,.35); font-size:13px;
}
.hp-t{ margin:0 0 6px; font-weight:700; color:var(--text); }
.hp-b{ margin:0 0 8px; color:var(--text-2); line-height:1.5; }
.hp-a{ color:var(--accent); text-decoration:none; font-weight:600; font-size:12.5px; }
.hp-a:hover{ text-decoration:underline; }
.tut-link{ display:block; margin-top:6px; color:var(--accent); text-decoration:none; font-weight:600; }
.tut-link:hover{ text-decoration:underline; }
.tut h2{ margin:0 0 12px; font-size:17px; }
.tut .card{ margin-bottom:14px; }
.tut ul, .tut ol{ margin:8px 0; padding-left:22px; }
.tut li{ margin:6px 0; line-height:1.55; }
.tut-toc{ margin:0; padding-left:22px; }
.tut-toc a{ color:var(--text); text-decoration:none; }
.tut-toc a:hover{ color:var(--accent); text-decoration:underline; }
.tut .card[id]{ scroll-margin-top:20px; }

/* "Cadastrar novo sistema de IA" — sky blue, white font (per Leo). */
.btn.sky{ background:#3BA7E0; border-color:#2E93C9; color:#fff; }
.btn.sky:hover{ background:#4FB3E8; }
.btn.sky:disabled{ background:#3BA7E0; opacity:.5; color:#fff; }

.empty{ text-align:center; padding:28px 20px; color:var(--text-2); font-size:14px; }
.empty p{ margin:0 0 14px; }

.summary{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:12px 16px; margin-bottom:20px;
  background:var(--surface-sunk); border-radius:var(--radius); border:1px solid var(--border-soft);
}
.summary .org{ flex:1; min-width:0; }
.summary .org-name{ margin:0; font-size:14px; }
.summary .org-meta{ margin:1px 0 0; font-size:12px; color:var(--text-muted); font-family:var(--mono); }
.summary .link{
  font:inherit; font-size:13px; padding:0; background:none; border:none; cursor:pointer;
  color:var(--text-2); text-decoration:underline; text-underline-offset:2px;
}
.summary .link:hover{ color:var(--text); }

.blocks{ margin-bottom:12px; }
.block{ background:var(--surface); border-radius:12px; margin-bottom:8px; overflow:hidden; }
.block-head{
  display:flex; align-items:center; gap:12px; width:100%; padding:14px 18px;
  background:none; border:none; cursor:pointer; color:var(--text); font:inherit; text-align:left;
  transition:background .1s;
}
.block-head:hover{ background:var(--surface-raised); }
.chev{
  width:8px; height:8px; flex-shrink:0;
  border-right:2px solid var(--text-2); border-bottom:2px solid var(--text-2);
  transform:rotate(-45deg); transition:transform .15s; margin-left:3px; margin-right:4px;
}
.block-head[aria-expanded="true"] .chev{ transform:rotate(45deg); }
.block-title{ flex:1; min-width:0; font-size:15px; font-weight:500; }
.block-sub{ margin:1px 0 0; font-size:12px; color:var(--text-muted); font-weight:400; display:block; }
.block-count{ font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; white-space:nowrap; }
.block-count.full{ color:var(--st-done-fg); }
.minibar{ width:52px; height:4px; border-radius:2px; flex-shrink:0; background:rgba(0,0,0,.24); overflow:hidden; }
.minibar > span{ display:block; height:100%; border-radius:2px; background:var(--accent); transition:width .25s; }
.minibar > span.full{ background:var(--st-done-fg); }

.block-body{ padding:4px 18px 18px; border-top:1px solid var(--border-soft); background:var(--surface-sunk); }
.block-body[hidden]{ display:none; }
.block-body .field:first-child{ margin-top:16px; }

.block.gated .block-head{ cursor:not-allowed; }
.block.gated .block-title, .block.gated .block-count{ color:var(--text-muted); }

label{ display:block; font-size:13px; color:var(--text-2); margin-bottom:5px; }
label .req{ color:var(--accent); }
.field{ margin-bottom:16px; }

input[type=text], input[type=email], input[type=number], input[type=date], select, textarea{
  width:100%; font:inherit; font-size:14px; padding:9px 11px; border-radius:var(--radius);
  background:var(--surface-sunk); color:var(--text); border:1px solid var(--border-soft);
  transition:border-color .12s;
}
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--accent); }
input::placeholder{ color:var(--text-muted); }
/* System-assigned identifier (SYS-NNN) — read-only, rendered as a label, not an input. */
input.assigned-id{ width:auto; padding:2px 0; border:none; background:transparent;
  font-size:18px; font-weight:700; font-style:italic; color:var(--text); cursor:default; }
input.assigned-id:focus{ outline:none; border:none; }
/* Draft "Remover" — subtle danger affordance on a ghost button (portal's "blocked" red tone). */
.btn.ghost.del{ color:var(--st-bloqueado-fg); margin-right:auto; }
.btn.ghost.del:hover{ background:var(--st-bloqueado-bg); color:var(--st-bloqueado-fg); }

.radios{ display:flex; gap:8px; flex-wrap:wrap; }
.radio{
  font-size:13px; padding:7px 14px; border-radius:var(--radius);
  background:var(--surface-sunk); color:var(--text-2);
  border:1px solid var(--border-soft); cursor:pointer; transition:all .1s;
}
.radio:hover{ border-color:var(--border); color:var(--text); }
.radio.on{ background:var(--accent); color:var(--accent-on); border-color:var(--accent); font-weight:500; }

.ev{ display:flex; align-items:center; gap:8px; margin-top:7px; font-size:12px; color:var(--text-muted); }
.ev .ev-input{ flex:1; min-width:0; max-width:340px; font-size:12px; padding:6px 9px; }
.ev span{ flex:1; }

.warn{
  margin-top:7px; padding:8px 11px; border-left:3px solid var(--accent);
  background:rgba(232,184,75,.09); font-size:12px; color:var(--text-2);
}

/* Alpha per-field marks (✓ ok / ⚠ flag) sit left of each question label; grey when stale. */
.mark{ display:inline-block; width:1.15em; margin-right:.35em; font-weight:700; text-align:center; line-height:1; }
.mark.ok{ color:#5bb98a; }
.mark.flag{ color:var(--accent); cursor:help; }
.mark.stale{ opacity:.3; }
.alpha-note{
  margin:12px 0; padding:9px 12px; border-left:3px solid var(--accent);
  background:rgba(232,184,75,.09); font-size:12.5px; color:var(--text-2); border-radius:0 6px 6px 0;
}

/* Verdict summary — colour follows the verdict; clickable list of flagged items. */
.alpha-summary{ margin:12px 0; padding:10px 12px; border-radius:8px; border-left:3px solid; font-size:13px; }
.alpha-summary.warn{ border-color:var(--accent); background:rgba(232,184,75,.09); }
.alpha-summary.ok{ border-color:#5bb98a; background:rgba(91,185,138,.10); }
.alpha-head{ margin:0; font-weight:600; }
.alpha-summary.warn .alpha-head{ color:#c69a2e; }
.alpha-summary.ok .alpha-head{ color:#4aa578; }
.alpha-flags{ list-style:none; margin:8px 0 0; padding:0; }
.alpha-flags li{ margin:4px 0; }
.alpha-flags a{ display:block; text-decoration:none; color:inherit; padding:6px 8px; border-radius:6px; }
.alpha-flags a:hover{ background:rgba(232,184,75,.12); }
.alpha-flags .q{ display:block; font-weight:600; color:var(--text); }
.alpha-flags .m{ display:block; color:var(--text-2); margin-top:2px; }
.alpha-flags li.grouped summary{ cursor:pointer; padding:6px 8px; border-radius:6px; font-weight:600; color:var(--text-2); }
.alpha-flags li.grouped summary:hover{ background:rgba(232,184,75,.12); }
.alpha-sub{ list-style:none; margin:2px 0 0 14px; padding:0; }
.alpha-sub .q{ font-weight:500; color:var(--text-2); }
.field.flash{ animation:alphaflash 1.2s ease-out; }
@keyframes alphaflash{ from{ background:rgba(232,184,75,.22); } to{ background:transparent; } }
.warn[hidden]{ display:none; }

.signal{
  padding:12px 16px; margin-bottom:16px; border-radius:var(--radius);
  border-left:3px solid var(--st-done-fg); background:var(--st-done-bg); color:var(--st-done-fg);
  font-size:14px;
}
.signal[hidden]{ display:none; }
.signal.tier0{ border-color:var(--accent); background:rgba(232,184,75,.09); color:var(--text-2); }

/* Bravo readiness panel (Flow v2) — count + coarse areas only, never the matrix. */
.readiness{ margin:12px 0; padding:10px 12px; border-radius:8px; border-left:3px solid; font-size:13px; }
.readiness[hidden]{ display:none; }
.readiness:has(.ready-head.ok){ border-color:#5bb98a; background:rgba(91,185,138,.10); }
.readiness:has(.ready-head.warn){ border-color:var(--accent); background:rgba(232,184,75,.09); }
.ready-head{ margin:0; font-weight:600; }
.ready-head.ok{ color:#4aa578; }
.ready-head.warn{ color:#c69a2e; }
.ready-stale{ margin:6px 0 0; color:var(--text-2); font-weight:600; }
.ready-cta{ margin:6px 0 0; color:var(--text); }
.ready-runs{ margin:6px 0 0; color:var(--text-muted); font-size:12px; }
.ready-disclaimer{ margin:6px 0 0; color:var(--text-muted); font-size:11.5px; }

/* Pedido de esclarecimento (Flow v2 §6) — the client reply card. */
.clarify-card{
  margin:0 0 16px; padding:12px 14px; border-radius:8px;
  border-left:3px solid var(--st-bloqueado-fg, #c25d4a); background:rgba(194,93,74,.07);
}
.clarify-title{ margin:0; font-weight:700; color:var(--st-bloqueado-fg, #c25d4a); font-size:13px; }
.clarify-q{ margin:6px 0; font-size:14px; color:var(--text); }
.clarify-hint{ margin:0 0 10px; font-size:12.5px; color:var(--text-2); }

.wizard-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  margin-top:22px; padding-top:16px; border-top:1px solid var(--border-soft);
}
.saved{ font-size:12px; color:var(--text-muted); }
.saved.on{ color:var(--st-done-fg); }
.foot-btns{ display:flex; gap:8px; }

.foot{
  margin-top:40px; padding-top:16px; border-top:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size:12px; color:var(--text-muted);
}
.foot p{ margin:0; }
.foot nav{ display:flex; gap:16px; }
.foot a{ color:var(--text-muted); text-decoration:none; }
.foot a:hover{ color:var(--text-2); text-decoration:underline; }
