/* ============================================================================
   Process Mapper — "process blueprint / control panel" visual system.
   Single, deliberate light theme (enterprise BPM tools are light & print-first).
   ============================================================================ */

:root {
  /* ground & surfaces — cool off-white, faint slate bias (chosen, not default) */
  --ground: #eef1f6;
  --ground-2: #e6eaf1;
  --surface: #ffffff;
  --navy: #0c1c2c;          /* command bar / dark surfaces */
  --navy-2: #12293c;

  /* ink */
  --ink: #0f1e2e;
  --ink-2: #45566a;
  --muted: #71829a;
  --line: #dde3ec;
  --line-2: #eaeef4;

  /* brand — deep teal, analytical/engineered */
  --brand: #0f766e;
  --brand-deep: #0b4f4a;
  --brand-bright: #14958b;
  --brand-tint: #e6f2f1;
  --brand-tint-2: #d3e9e7;

  /* semantic — separate from accent, muted/sophisticated */
  --crit: #b4302a;   --crit-bg: #fbecea;
  --warn: #b0791c;   --warn-bg: #fbf3e3;
  --good: #2f7a55;   --good-bg: #e9f4ee;
  --info: #2b6b93;   --info-bg: #e8f1f7;

  --shadow-sm: 0 1px 2px rgba(15, 30, 46, .06), 0 1px 3px rgba(15, 30, 46, .05);
  --shadow: 0 2px 6px rgba(15, 30, 46, .07), 0 12px 28px rgba(15, 30, 46, .06);
  --radius: 10px;
  --radius-lg: 14px;

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 480px at 80% -8%, #eaf1f5 0%, transparent 60%),
    var(--ground);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand-tint-2); }

/* ── command bar ─────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; height: 58px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #eaf2f4;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 6px 20px rgba(6, 15, 24, .28);
}
.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand svg { display: block; }
.brand .wordmark { font-weight: 650; font-size: 16.5px; letter-spacing: -.01em; }
.brand .wordmark b { color: #6fd6cb; font-weight: 650; }
.brand .tagline {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: #7f97a8; margin-left: 2px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }

.coach-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #9fb2c1;
  padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px; background: rgba(255, 255, 255, .03);
}
.coach-status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6fd6cb;
  box-shadow: 0 0 0 3px rgba(111, 214, 203, .18);
}

/* dictation language selector in the command bar */
.mic-lang {
  display: inline-flex; align-items: center; gap: 6px; color: #9fb2c1;
  padding: 5px 8px 5px 10px; border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px; background: rgba(255, 255, 255, .03); cursor: pointer;
}
.mic-lang svg { flex-shrink: 0; }
.mic-lang select {
  appearance: none; -webkit-appearance: none; background: transparent; border: none;
  color: #d6e2e9; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  padding: 0 2px; cursor: pointer; width: auto;
}
.mic-lang select:focus { outline: none; }
.mic-lang select option { color: #0f1e2e; }
@media (max-width: 560px) { .mic-lang { display: none; } }
.coach-status.rules .dot { background: #8aa0b2; box-shadow: 0 0 0 3px rgba(138, 160, 178, .16); }

/* ── layout shell ────────────────────────────────────────────────────────── */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 34px 22px 72px; }
.foot {
  text-align: center; color: var(--muted); font-size: 12px; padding: 20px;
  font-family: var(--mono); letter-spacing: .04em;
}

h1 { font-size: 27px; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h2 {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
h2::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px;
  background: var(--brand); display: inline-block;
}
.sub { color: var(--ink-2); font-size: 15px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brand); font-weight: 600;
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 30px;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */
button { font: inherit; cursor: pointer; border: none; }
.btn-primary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 8px; padding: 11px 20px; font-weight: 600; font-size: 14.5px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(11, 79, 74, .4), 0 6px 16px rgba(15, 118, 110, .22);
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand-tint-2); }
.btn-danger { background: transparent; color: var(--crit); border: 1px solid var(--line); }
.btn-danger:hover { background: var(--crit-bg); border-color: #ecc6c3; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
button:disabled { opacity: .55; cursor: default; transform: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── form controls ───────────────────────────────────────────────────────── */
input[type=text], textarea, select {
  font: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 9px; background: #fbfcfe; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
label.fl {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin: 18px 0 7px;
}
label.fl b { color: var(--ink-2); }

/* ══════════════════════ HOME ══════════════════════ */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 40px 40px; margin-bottom: 30px; overflow: hidden; position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 260px at 100% 0%, var(--brand-tint) 0%, transparent 65%);
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero-copy h1 { margin: 12px 0 12px; font-size: 31px; }
.hero-copy .lead { color: var(--ink-2); font-size: 16px; max-width: 46ch; margin-bottom: 24px; }
.hero-schematic { position: relative; }
.hero-schematic svg { width: 100%; height: auto; display: block; }
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 22px; margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--line-2); flex-wrap: wrap;
}
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta .n { font-family: var(--mono); font-weight: 600; color: var(--brand); font-size: 15px; }
.hero-meta .l { font-size: 12px; color: var(--muted); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 6px 4px 14px;
}
.register { display: flex; flex-direction: column; gap: 10px; }
.reg-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 18px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .14s ease, transform .08s ease, box-shadow .14s ease;
}
.reg-item:hover { border-color: var(--brand-tint-2); transform: translateX(2px); box-shadow: var(--shadow); }
.reg-item .glyph {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.reg-item .grow { flex: 1; min-width: 0; }
.reg-item .name { font-weight: 600; }
.reg-item .meta { color: var(--muted); font-size: 12px; font-family: var(--mono); letter-spacing: .03em; }
.empty {
  color: var(--muted); text-align: center; padding: 40px 20px;
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fafcfe;
}

/* ══════════════════════ WIZARD ══════════════════════ */
.wizard { max-width: 760px; margin: 0 auto; }
.stepper { display: flex; align-items: center; margin: 4px 0 26px; }
.stepper .st { display: flex; align-items: center; gap: 9px; }
.stepper .node {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--muted);
}
.stepper .st.done .node { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .st.cur .node { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.stepper .st .lbl { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.stepper .st.cur .lbl { color: var(--ink); font-weight: 600; }
.stepper .st.done .lbl { color: var(--ink-2); }
.stepper .bar { flex: 1; height: 2px; background: var(--line); margin: 0 10px; border-radius: 2px; }
.stepper .bar.done { background: var(--brand); }
@media (max-width: 720px) {
  .stepper .st .lbl { display: none; }
  .stepper .st.cur .lbl { display: inline; }
}

.q-title { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 7px; text-wrap: balance; }
.q-help { color: var(--ink-2); font-size: 14.5px; margin-bottom: 20px; }
.q-help b { color: var(--ink); }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 10px; }
.wiz-nav .right { display: flex; gap: 10px; }

.choice-row { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; gap: 13px; align-items: flex-start; padding: 15px 17px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: #fbfcfe;
  transition: border-color .14s ease, background .14s ease;
}
.choice:hover { border-color: var(--brand-tint-2); background: #fff; }
.choice.sel { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 3px rgba(15, 118, 110, .08); }
.choice .t { font-weight: 600; }
.choice .d { font-size: 13px; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; background: var(--brand-tint);
  color: var(--brand-deep); padding: 6px 8px 6px 13px; border-radius: 8px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--brand-tint-2);
}
.tag button { background: none; color: var(--brand); padding: 0 2px; font-size: 16px; line-height: 1; }
.tag-input-row { display: flex; gap: 8px; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .check-grid { grid-template-columns: 1fr; } }
.checkbox {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-size: 14px;
  background: #fbfcfe; transition: border-color .14s ease, background .14s ease;
}
.checkbox:hover { border-color: #e6ccb0; }
.checkbox.sel { border-color: var(--warn); background: var(--warn-bg); }
.checkbox input { margin-top: 3px; accent-color: var(--warn); }
.checkbox .d { color: var(--muted); font-size: 12px; }

/* ── coach ── */
.coach-box {
  margin-top: 22px; border: 1px solid var(--brand-tint-2); background: linear-gradient(180deg, #f2fbfa, #ebf6f5);
  border-radius: var(--radius); padding: 18px 20px; position: relative;
}
.coach-box::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 3px; background: var(--brand);
}
.coach-box.ok { border-color: #bfe3cd; background: linear-gradient(180deg, #f0f9f3, #e9f4ee); }
.coach-box.ok::before { background: var(--good); }
.coach-head {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px;
  font-family: var(--mono); letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 9px;
}
.coach-box.ok .coach-head { color: var(--good); }
.coach-msg { font-size: 14.5px; margin-bottom: 4px; color: var(--ink); }
.coach-fu { margin: 9px 0 0 2px; font-size: 14px; list-style: none; }
.coach-fu li { margin-bottom: 7px; padding-left: 20px; position: relative; color: var(--ink-2); }
.coach-fu li::before { content: "→"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.coach-actions { display: flex; gap: 10px; margin-top: 15px; }
.coach-thinking {
  display: flex; gap: 10px; align-items: center; color: var(--brand);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; margin-top: 22px;
}
.dots::after { content: "…"; animation: blink 1.2s steps(3, end) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ── step list ── */
.step-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.step-row {
  display: flex; align-items: center; gap: 14px; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 15px; background: var(--surface); font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.step-row .num {
  width: 27px; height: 27px; border-radius: 7px; background: var(--brand-tint);
  color: var(--brand-deep); font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-row .num.dec {
  background: var(--warn-bg); color: var(--warn); border-radius: 50%;
  border: 1.5px solid #e6ccb0;
}
.step-row .who { color: var(--muted); font-size: 12px; font-family: var(--mono); letter-spacing: .02em; }
.step-row .grow { flex: 1; min-width: 0; }
.step-row .gapdots {
  color: var(--crit); font-size: 11px; font-weight: 700; font-family: var(--mono);
  letter-spacing: .04em; background: var(--crit-bg); padding: 3px 9px; border-radius: 999px;
}

table.review { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
table.review td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.review tr:last-child td { border-bottom: none; }
table.review td:first-child {
  color: var(--muted); width: 150px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; padding-top: 11px;
}

/* ══════════════════════ RESULT ══════════════════════ */
.result-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 22px;
}
.result-head h1 { font-size: 25px; }
.result-head .sub { margin-top: 4px; max-width: 60ch; }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* summary-first "at a glance" layer */
.summary {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-bottom: 22px;
}
@media (max-width: 860px) { .summary { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.gauge-panel { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge-panel .cap {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.gauge-panel .band { font-weight: 600; font-size: 14px; margin-top: 2px; }
.gauge-panel svg { display: block; }

.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 640px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px;
}
.kpi .ico { color: var(--brand); opacity: .85; }
.kpi .v { font-family: var(--mono); font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.kpi .k { font-size: 11px; color: var(--muted); font-family: var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.kpi.alert .v { color: var(--crit); }

.sevbar-wrap { grid-column: 1 / -1; }
.sevbar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sevbar-head .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sevbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line-2); }
.sevbar span { display: block; height: 100%; }
.sevbar .s-high { background: var(--crit); }
.sevbar .s-medium { background: var(--warn); }
.sevbar .s-low { background: #9fb0c0; }
.sevlegend { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.sevlegend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.sevlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sevlegend .n { font-family: var(--mono); font-weight: 600; color: var(--ink); }

#canvas {
  height: 58vh; min-height: 440px; background:
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); margin-bottom: 26px;
}

.result-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 980px) { .result-grid { grid-template-columns: 1fr; } }

.finding {
  background: var(--surface); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 0 11px 11px 0; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.finding.high { border-left-color: var(--crit); }
.finding.medium { border-left-color: var(--warn); }
.finding.low { border-left-color: #9fb0c0; }
.finding .f-head { display: flex; gap: 9px; align-items: center; }
.finding .f-head b { font-size: 15px; }
.sev {
  font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; flex-shrink: 0;
}
.sev.high { background: var(--crit-bg); color: var(--crit); }
.sev.medium { background: var(--warn-bg); color: var(--warn); }
.sev.low { background: #eef2f6; color: var(--muted); }
.finding .f-step {
  color: var(--muted); font-size: 12px; margin-top: 5px;
  font-family: var(--mono); letter-spacing: .02em;
}
.finding p { font-size: 14px; margin-top: 8px; color: var(--ink-2); }
.finding .rec { margin-top: 8px; color: var(--ink); }
.finding .rec b { color: var(--good); }

table.sipoc { width: 100%; border-collapse: collapse; font-size: 13.5px; border-radius: 10px; overflow: hidden; }
table.sipoc th {
  background: var(--navy); color: #cfe0e4; padding: 10px 9px; font-family: var(--mono);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600;
}
table.sipoc td { border: 1px solid var(--line); padding: 10px; vertical-align: top; width: 20%; background: var(--surface); }
table.sipoc td ul { margin-left: 16px; }
table.sipoc td li { margin-bottom: 5px; color: var(--ink-2); }

/* ── print: clean one-page-ish report ── */
@media print {
  .topbar, .foot, .result-actions, .wiz-nav, .stepper { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .panel, .kpi, .finding, .card, #canvas, .hero { box-shadow: none; }
  #canvas { height: auto; min-height: 320px; border: 1px solid #ccc; background: #fff; }
  .summary { break-inside: avoid; }
  .finding { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── responsive hero ── */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 30px 26px; }
  .hero-schematic { order: -1; max-width: 420px; }
}

/* ── model recommendation badge ── */
.rec-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--good); background: var(--good-bg);
  padding: 2px 7px; border-radius: 5px; margin-left: 6px; vertical-align: middle;
}
.linklike {
  background: none; border: none; color: var(--brand); font: inherit; font-size: 12px;
  cursor: pointer; text-decoration: underline; padding: 0; margin-left: 6px;
}

/* ── coach suggestions & answerable follow-ups ── */
.coach-sub {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 8px;
}
.sug-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sug {
  background: var(--surface); border: 1px solid var(--brand-tint-2); color: var(--brand-deep);
  border-radius: 8px; padding: 8px 12px; font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.sug:hover { background: var(--brand-tint); border-color: var(--brand); }
.sug.used { opacity: .5; }
.fu-list { display: flex; flex-direction: column; gap: 13px; }
.fu label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 6px; }

/* ── result: staged sections ── */
.stage { margin-bottom: 32px; }
.stage h2 { margin-bottom: 6px; }
.stage-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 6px;
}
.stage-hint { color: var(--ink-2); font-size: 13.5px; margin: 0 0 16px; max-width: 70ch; }
.sipoc-scroll { overflow-x: auto; border-radius: 10px; }
.findings-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 860px) { .findings-list { grid-template-columns: 1fr; } }
.findings-list .finding { margin-bottom: 0; }

/* ── microphone dictation ── */
.mic-wrap { position: relative; flex: 1; min-width: 0; }
.mic-wrap input, .mic-wrap textarea { padding-right: 46px; }
.mic-btn {
  position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  background: var(--brand-tint); color: var(--brand); border: 1px solid var(--brand-tint-2);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.mic-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.mic-btn.rec { background: var(--crit); color: #fff; border-color: var(--crit); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 48, 42, .5); }
  50% { box-shadow: 0 0 0 6px rgba(180, 48, 42, 0); }
}
