/* ==========================================================================
   FyRef — shared UI styles (index.html employer app, login/signup,
   applicant.html, respond.html). MONOCHROME palette (owner directive
   2026-06-10): black/white/neutral grays only. State is conveyed by
   lightness, weight, and inversion — never hue. The legacy token names
   (brand/amber/green/red/blue) are kept so no component rules change;
   they now resolve to gray steps. System fonts, no CDNs.
   ========================================================================== */

:root {
  /* "brand" = near-black primary */
  --brand-900: #000000;
  --brand-800: #111111;
  --brand-700: #1a1a1a;
  --brand-600: #1f1f1f;
  --brand-500: #4d4d4d;
  --brand-200: #d8d8d8;
  --brand-100: #ececec;
  --brand-50:  #f6f6f6;

  /* ink: pure neutral grays */
  --ink:      #111111;
  --ink-2:    #3c3c3c;
  --muted:    #6e6e6e;
  --faint:    #9b9b9b;
  --line:     #e4e4e4;
  --bg:       #f4f4f4;
  --bg-soft:  #fafafa;
  --card:     #ffffff;

  /* "accents" — gray steps: pending = soft, ok = firm, alert = darkest */
  --amber-700: #525252;
  --amber-500: #8a8a8a;
  --amber-100: #f0f0f0;
  --green-700: #1c1c1c;
  --green-600: #2f2f2f;
  --green-100: #e6e6e6;
  --red-700:   #0d0d0d;
  --red-600:   #262626;
  --red-100:   #dadada;
  --blue-700:  #333333;
  --blue-100:  #ebebeb;
  --slate-100: #f0f0f0;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px -8px rgba(0, 0, 0, .10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-700); }

/* --------------------------------------------------------------------------
   Top navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -.5px;
  flex: none;
}

.brand-name { font-weight: 750; font-size: 16px; letter-spacing: -.2px; white-space: nowrap; }
.brand-sub  { font-size: 12px; color: var(--muted); white-space: nowrap; }

.nav-spacer { flex: 1; }

.nav-tabs { display: flex; gap: 4px; margin-left: 8px; }
.nav-tab {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.nav-tab:hover { background: var(--bg-soft); color: var(--ink-2); }
.nav-tab.active { background: var(--brand-100); color: var(--brand-800); }

.user-box { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-meta { text-align: right; line-height: 1.3; min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* health + generic chips ---------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--slate-100);
  color: var(--ink-2);
  border: 1px solid transparent;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }

.chip-ok      { background: var(--green-100); color: var(--green-700); }
.chip-ok .dot { background: var(--green-600); }
.chip-bad     { background: var(--red-100); color: var(--red-700); }
.chip-bad .dot{ background: var(--red-600); }

.chip-green  { background: var(--green-100); color: var(--green-700); }
.chip-amber  { background: var(--amber-100); color: var(--amber-700); }
.chip-red    { background: var(--red-100);   color: var(--red-700); }
.chip-blue   { background: var(--blue-100);  color: var(--blue-700); }
.chip-brand  { background: var(--brand-100); color: var(--brand-800); }
.chip-slate  { background: var(--slate-100); color: var(--ink-2); border-color: var(--line); }

.chip-flag {
  background: var(--red-100);
  color: var(--red-700);
  border: 1px solid #bdbdbd;
  cursor: help;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; } }

.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 22px; font-weight: 750; letter-spacing: -.5px; }
.stat .l { font-size: 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Cards & panels
   -------------------------------------------------------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.panel-head .count { font-size: 12px; color: var(--muted); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 14px 16px; }
.panel-body.tight { padding: 0; }

.empty { padding: 22px 16px; color: var(--faint); font-size: 13.5px; text-align: center; }

/* --------------------------------------------------------------------------
   Review queue cards
   -------------------------------------------------------------------------- */
.queue-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 12px 14px;
  background: var(--bg-soft);
  overflow: hidden;
}
.queue-card.flagged { border-color: #bdbdbd; }

.qc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.qc-title { font-weight: 700; font-size: 14px; }
.qc-sub   { font-size: 12.5px; color: var(--muted); }

.badge-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--brand-800);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1px;
  white-space: nowrap;
}
.badge-ai::before { content: "✦"; font-size: 11px; }

.qc-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }

.summary-box {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* dimensional scorecard ------------------------------------------------------ */
.scorecard { display: flex; flex-direction: column; gap: 7px; }

.dim-row {
  display: grid;
  grid-template-columns: 168px 110px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}
@media (max-width: 640px) { .dim-row { grid-template-columns: 1fr; gap: 2px; } }

.dim-label { color: var(--ink-2); font-weight: 600; text-transform: capitalize; }

.scorebar { display: inline-flex; gap: 3px; align-items: center; }
.scorebar .seg {
  width: 16px;
  height: 8px;
  border-radius: 3px;
  background: var(--line);
}
.scorebar .seg.on-good { background: var(--green-600); }
.scorebar .seg.on-mid  { background: #525252; }
.scorebar .seg.on-low  { background: var(--red-600); }
.scorebar .val { font-size: 11.5px; color: var(--muted); margin-left: 5px; font-weight: 650; }

.dim-basis { color: var(--muted); font-size: 12.5px; font-style: italic; overflow-wrap: anywhere; }
.dim-basis.not-rated { font-style: normal; color: var(--faint); }

/* evidence drawer in card ---------------------------------------------------- */
details.evidence { border-top: 1px dashed var(--line); padding-top: 8px; }
details.evidence summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--brand-700);
  user-select: none;
}
.evi-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.evi-item { font-size: 12.5px; }
.evi-q { color: var(--muted); font-weight: 600; }
.evi-a { color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.evi-meta {
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.qc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.qc-actions input[type="text"] {
  flex: 1;
  min-width: 160px;
}

/* --------------------------------------------------------------------------
   Buttons & inputs
   -------------------------------------------------------------------------- */
.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); border-color: var(--faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }

.btn-approve {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}
.btn-approve:hover { background: var(--green-700); border-color: var(--green-700); }

.btn-ghost-red { color: var(--red-700); border-color: #bdbdbd; background: #fff; }
.btn-ghost-red:hover { background: var(--red-100); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 10px 14px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="url"], textarea, select.input {
  font: inherit;
  font-size: 13.5px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus, select.input:focus {
  outline: 2px solid var(--brand-200);
  border-color: var(--brand-500);
}
textarea { resize: vertical; min-height: 74px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--faint); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-msg { font-size: 12.5px; margin-top: 8px; }
.form-msg.ok  { color: var(--green-700); }
.form-msg.err { color: var(--red-700); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--faint);
  font-weight: 700;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td .sub { font-size: 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Outbox (local comms driver send log)
   -------------------------------------------------------------------------- */
.outbox-note {
  font-size: 12px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  margin: 12px 14px 0;
}
.outbox-list { display: flex; flex-direction: column; }
.outbox-item { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.outbox-item:last-child { border-bottom: none; }
.ob-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.ob-to { font-weight: 650; font-size: 13px; }
.ob-time { font-size: 11.5px; color: var(--faint); margin-left: auto; white-space: nowrap; }
.ob-subject { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ob-body {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ob-open { margin-top: 7px; }

/* --------------------------------------------------------------------------
   Audit drawer
   -------------------------------------------------------------------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 94vw);
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px -16px rgba(0, 0, 0, .25);
  z-index: 95;
  transform: translateX(102%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
}
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 15px; }
.drawer-head .sub { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px 24px; }

.audit-line {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  align-items: flex-start;
}
.audit-line .when { color: var(--faint); font-family: var(--mono); font-size: 11px; white-space: nowrap; padding-top: 2px; }
.audit-line .what { min-width: 0; }
.audit-line .what .name { font-weight: 650; color: var(--ink-2); margin-left: 6px; }
.audit-detail {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Auth pages (login.html / signup.html)
   -------------------------------------------------------------------------- */
.auth-wrap { max-width: 430px; margin: 0 auto; padding: 8vh 20px 48px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .logo { margin: 0 auto 12px; width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }
.auth-head h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.3px; }
.auth-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.auth-alt { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

/* --------------------------------------------------------------------------
   Settings (tabs, team, keys, webhooks, integrations, billing)
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tabs .tab {
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  padding: 9px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tabs .tab:hover { color: var(--ink-2); }
.tabs .tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

.secret-box {
  background: var(--amber-100);
  border: 1px solid var(--amber-500);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 14px;
  font-size: 12.5px;
  color: var(--amber-700);
}
.secret-box code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 6px;
  overflow-wrap: anywhere;
  user-select: all;
}

.int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.int-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.int-card h3 { margin: 0; font-size: 14px; letter-spacing: -.1px; }
.int-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.int-card .env { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.int-card .int-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.meter .fill { height: 100%; background: var(--brand-600); border-radius: 999px; transition: width .3s ease; }
.meter .fill.over { background: var(--amber-500); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

/* --------------------------------------------------------------------------
   Consent / portal pages (applicant.html, respond.html)
   -------------------------------------------------------------------------- */
.portal-head { text-align: center; margin-bottom: 20px; }
.portal-head .logo { margin: 0 auto 10px; width: 44px; height: 44px; font-size: 19px; border-radius: 12px; }
.portal-head h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.3px; }
.portal-head p { margin: 0; color: var(--muted); font-size: 14px; }

.consent-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.consent-card h2 { margin: 0 0 10px; font-size: 16.5px; letter-spacing: -.2px; }

.legal-text {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.ai-disclosure {
  display: flex;
  gap: 9px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--brand-900);
  margin-bottom: 14px;
}
.ai-disclosure::before { content: "✦"; color: var(--brand-600); font-size: 14px; line-height: 1.4; }

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: #fff;
  font-size: 13.5px;
  color: var(--ink-2);
}
.check-row input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--brand-600); }
.check-row .optional-tag { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* OTP step-up (enforced before any token session is served) ------------------ */
.otp-input {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
}

/* welcome-back reuse panel ---------------------------------------------------- */
.reuse-panel {
  background: linear-gradient(180deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.reuse-panel h3 { margin: 0 0 4px; font-size: 15px; color: var(--brand-900); }
.reuse-panel .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.reuse-fact {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  border-top: 1px dashed var(--brand-200);
  font-size: 13px;
}
.reuse-fact .k { color: var(--muted); font-size: 12px; font-weight: 650; }
.reuse-fact .v { color: var(--ink-2); }
.reuse-fact .prov { font-size: 11.5px; color: var(--faint); }

/* question blocks -------------------------------------------------------------- */
.q-block { margin-bottom: 16px; }
.q-block .q-label { font-size: 13.5px; font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.q-block .q-dim { font-size: 11px; color: var(--brand-700); background: var(--brand-50); border-radius: 999px; padding: 1px 8px; display: inline-block; margin-bottom: 6px; font-weight: 650; }
.q-dim { font-size: 11px; color: var(--brand-700); background: var(--brand-50); border-radius: 999px; padding: 1px 8px; display: inline-block; margin-bottom: 6px; font-weight: 650; }

/* progress tracker -------------------------------------------------------------- */
.tracker { display: flex; gap: 0; margin-bottom: 18px; }
.tracker .step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--faint); padding-top: 26px; }
.tracker .step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  z-index: 2;
}
.tracker .step::after {
  content: "";
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 1;
}
.tracker .step:first-child::after { display: none; }
.tracker .step.done { color: var(--green-700); font-weight: 650; }
.tracker .step.done::before { background: var(--green-600); border-color: var(--green-600); }
.tracker .step.active { color: var(--brand-800); font-weight: 700; }
.tracker .step.active::before { border-color: var(--brand-600); background: var(--brand-100); }

.ref-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.ref-row:last-child { border-bottom: none; }
.ref-row .who { font-weight: 650; }
.ref-row .meta { color: var(--muted); font-size: 12.5px; }
.ref-row .chip { margin-left: auto; }

.progress-line { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.progress-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.progress-bar .fill { height: 100%; background: var(--brand-600); border-radius: 999px; transition: width .3s ease; }

/* thank-you / error states -------------------------------------------------------- */
.big-state { text-align: center; padding: 36px 20px; }
.big-state .mark {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px;
}
.big-state .mark.ok { background: var(--green-100); color: var(--green-700); }
.big-state .mark.err { background: var(--red-100); color: var(--red-700); }
.big-state h2 { margin: 0 0 6px; font-size: 19px; }
.big-state p { margin: 0 auto; max-width: 480px; color: var(--muted); font-size: 13.5px; }

.foot-note { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 26px; }
.foot-note a { color: var(--faint); }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---- respond wizard (one question at a time) ---- */
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-50); }
.wizard-card { animation: wzin .18s ease; }
@keyframes wzin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wizard-q { margin: 6px 0 4px; font-size: 18px; line-height: 1.35; }
.wizard-card textarea { width: 100%; min-height: 120px; font-size: 14.5px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; }
.wizard-right { display: flex; align-items: center; gap: 14px; }
.skip-link { font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.skip-link:hover { color: var(--ink-2); }
.review-row { padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.review-row:last-of-type { border-bottom: none; }
.review-row .review-q { font-weight: 650; font-size: 13px; padding-right: 56px; }
.review-row .review-a { font-size: 13px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }
.review-row.skipped .review-q { color: var(--muted); }
.review-row .edit-link { position: absolute; right: 0; top: 10px; font-size: 12px; color: var(--brand-700); }
.faint { color: var(--faint); }

/* ---- monochrome state language: urgency = inversion, not hue ---- */
.chip-bad, .chip-red, .chip-flag { background: #111; color: #fff; border-color: #111; }
.chip-bad .dot, .chip-red .dot { background: #fff; }
.chip-amber { border: 1px dashed #9b9b9b; }           /* pending: dashed = in motion */
.chip-ok, .chip-green { border: 1px solid #c9c9c9; }  /* settled: solid outline */
.form-msg.err { color: #111; font-weight: 700; }
.big-state .mark.err { background: #111; color: #fff; }
.big-state .mark.ok { background: #e6e6e6; color: #111; }
