/*
 * AIMS Charter . In-Platform Design System . v2.1
 * Palette: HID navy + slate + amber accent, aligned to dashboard-v2 mockup.
 * Type:    Inter (Google Fonts) with -apple-system fallback.
 * Approach: minimal, direct, no wasted motion.
 * Used by:  every /aimscharter/ page except the two v2 mockups (which own their own palette).
 *
 * v2   (2026-07-25): Palette moved from navy-black (#0A0F1A) to neutral near-black
 *                    (#0A0A0B).
 * v2.1 (2026-07-26): Two darkest surfaces re-tinted to HID's main-site palette
 *                    (--primary-dark #111827 + --secondary-dark #1F2937) for brand
 *                    tie-in with highintentdigital.com. Text greys pulled toward
 *                    HID's own text-gray tones (#D1D5DB / #9CA3AF) so contrast
 *                    reads as intentional against the blue-tinted bg. All amber +
 *                    status accents preserved.
 *                    Customer-supplied branding (Company Profile → logo + 2
 *                    colors) overrides these defaults at runtime via
 *                    dashboard-v2-shell.js.
 */

:root {
  /* Surfaces . HID brand tie-in (matches css/style.css --primary-dark + --secondary-dark). */
  --bg: #111827;             /* HID primary-dark */
  --bg-elev: #1F2937;        /* HID secondary-dark */
  --bg-elev-2: #263449;      /* subtle lift above --bg-elev, still slate */
  --bg-hover: #2F3E55;       /* interactive hover */

  /* Borders . Rob 2026-08-25: bumped one step brighter for readability.
     #374151 read as invisible on the #1F2937 card ground; #475569 is
     the same border tone visible against both #111827 body and
     #1F2937 card. --border-soft matched. */
  --border: #475569;         /* was #374151 */
  --border-soft: #334155;    /* was #2A3548 */

  /* Text . Rob 2026-08-25: bumped each tier one step brighter so
     card metadata + filter chip pills + captions read on the dark
     ground. Applies globally to every logged-in surface loading
     setup-preview.css (dashboards, doc-repo, account, acknowledge,
     branding). */
  --text: #E5E7EB;           /* was #D1D5DB */
  --text-strong: #F9FAFB;    /* unchanged — already max-contrast */
  --text-muted: #CBD5E1;     /* was #9CA3AF */
  --text-dim: #94A3B8;       /* was #6B7280 */

  /* Accent — bright amber (Rob 2026-08-27, swapped from burnt orange
     #D2760D to push clearly away from red so incident-register status
     dots are unmistakable. Dark mode uses the bright value; light mode
     overrides to --accent-deep further down so text-on-cream stays
     legible — bright amber on cream is ~1.9:1 contrast, unreadable). */
  --accent: #EEAF11;
  --accent-hover: #F5C13A;
  /* Rob 2026-09-24/25: this :root is the DARK base (--bg-elev #1F2937),
     so the amber TEXT token has to be light here. The sitewide sweep set
     it to #7a5a00, which is the value for a white ground, and that broke
     partners, acknowledge and plus-quote, the pages that take this base
     without overriding it. #F5C13A measures 8.6:1 to 10.6:1 on these
     surfaces. The light override is directly below. */
  --accent-deep: #F5C13A;
  --accent-dim: #B08000;
  --accent-glow: rgba(238, 175, 17, 0.14);

  /* Status. Solid + dim variant for chips + backgrounds. */
  --success: #22C55E;
  --success-dim: rgba(34, 197, 94, 0.15);
  --ok: #22C55E;
  --ok-dim: rgba(34, 197, 94, 0.15);
  --warn: #F59E0B;
  --warn-dim: rgba(245, 158, 11, 0.15);
  --error: #EF4444;
  --danger: #EF4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --info: #3B82F6;
  --info-dim: rgba(59, 130, 246, 0.15);
  --new: #10B981;
  --new-dim: rgba(16, 185, 129, 0.18);

  /* Rob 2026-08-25: extra semantic tokens for pages that previously
     defined them only inside :root[data-theme="light"]. Now every page
     that loads setup-preview.css inherits dark-mode fallbacks, so
     Active badges, error states, critical banners, and amber-quiet
     accents read correctly on the dark ground when a page hasn't
     shipped its own dark palette. */
  --amber-quiet-bg: rgba(238, 175, 17, 0.14);
  --amber-quiet-border: rgba(238, 175, 17, 0.35);
  --amber-quiet-hover: rgba(238, 175, 17, 0.22);
  --success-quiet: rgba(52, 211, 153, 0.14);
  --success-border: rgba(52, 211, 153, 0.35);
  --success-text: #34D399;
  --critical: #F87171;
  --critical-quiet: rgba(248, 113, 113, 0.14);
  --critical-border: rgba(248, 113, 113, 0.35);
  --critical-text: #F87171;
  --error-bg: rgba(248, 113, 113, 0.14);
  --error-border: rgba(248, 113, 113, 0.35);
}
* { box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
::selection { background: rgba(238, 175, 17, 0.35); color: var(--text-strong); }
a { color: var(--accent-deep, #7a5a00); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ===================================================================
 * TOP BAR (minimal , logo, breadcrumb, avatar)
 * =================================================================== */
.topbar {
  height: 56px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  /* Right padding reserves room for the two fixed circular icons that
     mount from dashboard-v2-shell.js (search @ right:64px, notifications
     bell @ right:20px). Without this, the "Company" dropdown in
     .topbar-right slides under the icons. Rob 2026-08-19. */
  padding: 0 108px 0 32px;
  position: sticky; top: 0;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 10;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-strong);
  text-decoration: none;
}
.topbar-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: none;
  flex-shrink: 0;
}
.topbar-mark img { width: 100%; height: 100%; display: block; }
.topbar-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.topbar-brand-name {
  color: var(--text-strong);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.topbar-brand-tagline {
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.topbar-crumb {
  margin-left: 24px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.topbar-crumb .sep { color: var(--text-dim); }
.topbar-crumb .current { color: var(--text); }
.topbar-crumb a { color: var(--text-muted); }
.topbar-crumb a:hover { color: var(--text); }
.topbar-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
}
.topbar-preview {
  padding: 4px 10px;
  background: rgba(238, 175, 17, 0.10);
  border: 1px solid rgba(238, 175, 17, 0.3);
  color: var(--accent-deep, #7a5a00);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 4px;
}
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1F2A3D;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}

/* ===================================================================
 * PROGRESS INDICATOR
 * =================================================================== */
.progress-wrap { padding: 32px 32px 0; max-width: 640px; margin: 0 auto; }
.progress-header {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-muted); font-size: 12px;
  letter-spacing: 0.02em; margin-bottom: 12px;
}
.progress-header .score { display: flex; align-items: center; gap: 8px; color: var(--text); }
.progress-header .score-num { color: var(--text-strong); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.progress-header .score-arrow { color: var(--accent-deep, #7a5a00); font-size: 11px; }
.progress-bar { height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; background: var(--accent);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===================================================================
 * MAIN CONTENT
 * =================================================================== */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}
main.wide { max-width: 960px; }
h1 {
  color: var(--text-strong);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.lede {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 40px;
  max-width: 520px;
}

/* Sections */
.section { margin-bottom: 40px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.section-head h2 {
  color: var(--text-strong);
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
}
.section-head .count, .section-head .meta {
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
/* ===================================================================
 * FORM FIELDS
 * =================================================================== */
.field { margin-bottom: 28px; }
.field:last-of-type { margin-bottom: 0; }
.field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.field-label label {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.input, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-strong);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  transition: border-color 0.15s ease, background 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.input:hover, .select:hover { border-color: #d2b783; }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(238, 175, 17, 0.15);
}
.select {
  /* Amber chevron matching the brand accent (was neutral gray for the
     legacy dark theme). */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%23EEAF11' d='M6 7L0 0h12L6 7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
/* Native <option> styling. Chrome/Safari/Edge respect background-color
   on <option> in the expanded dropdown list (limited but works); Firefox
   respects both background + color. Warm cream highlight instead of the
   OS accent (which reads as system blue or system dark). */
.select option {
  background: #ffffff;
  color: #111827;
  padding: 8px 12px;
}
.select option:hover,
.select option:focus,
.select option:checked {
  background: #fbf3e5;
  color: #7a5a00;
}

/* ============================================================
 * GLOBAL <select> + <option> DARK-MODE FIX (Rob 2026-08-25)
 * Native <select> dropdowns render as a browser-owned popover.
 * Without color-scheme + explicit option styling, the popover
 * inherits OS defaults — on macOS/Windows in dark mode it shows
 * white text on a light-grey background (or vice versa) that only
 * reads legibly under hover. Fixes this globally for every
 * <select> on every page that loads setup-preview.css, not just
 * .select-classed ones. Light theme untouched — the browser
 * already renders light popovers correctly on cream ground.
 * ============================================================ */
/* Scope color-scheme to the explicit data-theme stamp only, so pages
   that haven't been stamped yet (during the pre-FOUC paint) fall back
   to the browser default and don't flash dark form controls on
   light-themed pages. */
/* Accent palette is single-tone in both modes — bright amber #EEAF11
   base + saturated dark amber #B08000 deep. No light-mode override
   here: the values in :root apply everywhere. Rob 2026-08-27 replaced
   an earlier dark #8A6300 "burnt-brown" deep with the more saturated
   #B08000 gold because #8A6300 looked visually like the burnt orange
   we swapped away from. */
:root[data-theme="light"] { color-scheme: light; }
/* Stepper pages force data-theme="light" and render on white, where the
   amber text token has to go the other way. #7a5a00 is 5.8:1 to 6.4:1 on
   the light surfaces. Same token, opposite value, because its job is
   "amber text that is readable on THIS ground". */
:root[data-theme="light"] { --accent-deep: #7a5a00; }
:root[data-theme="dark"]  { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

:root:not([data-theme="light"]) select {
  background-color: var(--bg-elev);
  color: var(--text-strong);
  border-color: var(--border);
}
:root:not([data-theme="light"]) select option {
  background-color: var(--bg-elev);
  color: var(--text-strong);
  padding: 8px 12px;
}
:root:not([data-theme="light"]) select option:hover,
:root:not([data-theme="light"]) select option:focus,
:root:not([data-theme="light"]) select option:checked {
  background-color: var(--bg-hover);
  color: var(--accent-hover);
}
/* Dark-mode override for the .select-scoped hardcodes above so the
   two families stay consistent — dark uses tokens; the light-mode
   .select option cream/amber rule at the top of this section still
   wins in light theme via :root[data-theme="light"] specificity. */
:root:not([data-theme="light"]) .select option {
  background: var(--bg-elev);
  color: var(--text-strong);
}
:root:not([data-theme="light"]) .select option:hover,
:root:not([data-theme="light"]) .select option:focus,
:root:not([data-theme="light"]) .select option:checked {
  background: var(--bg-hover);
  color: var(--accent-hover);
}
/* .input / .select focus flipped to hardcoded #ffffff — reads as
   bright white flash on dark ground. Keep the amber ring, but keep
   the dark surface. */
:root:not([data-theme="light"]) .input:focus,
:root:not([data-theme="light"]) .select:focus {
  background: var(--bg-elev-2);
}
.input::placeholder { color: var(--text-dim); }

/* Chips (multi-select) */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 10px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
}
.chip:hover { border-color: #2A3244; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.checked {
  background: rgba(238, 175, 17, 0.10);
  border-color: var(--accent);
  color: var(--text-strong);
}
.chip.checked::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 4l3 3 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.chip.custom { background: transparent; border-style: dashed; color: var(--text-muted); }

/* Add-inline (text input + button) */
.add-row { display: flex; gap: 8px; margin-top: 4px; }
.add-row .input-inline {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-strong);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.add-row .input-inline:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(238, 175, 17, 0.15);
}
.add-row .input-inline::placeholder { color: var(--text-dim); }
.add-row button {
  padding: 12px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.add-row button:hover {
  border-color: #d2b783;
  background: #fbf3e5;
  color: #7a5a00;
}

/* Decision rows (Step 3: RACI) */
.decision-list { display: flex; flex-direction: column; gap: 12px; }
.decision-row {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.decision-row:hover { border-color: #2A3244; }
.decision-label {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .decision-row { grid-template-columns: 1fr; }
}

/* Vendor scorecard rows (Step 4) */
.vendor-card {
  padding: 20px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.vendor-name {
  color: var(--text-strong);
  font-size: 16px; font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
/* The vendor name is an editable input (Rob 2026-10-04) but should still
   read as a heading until someone interacts with it. Renaming a vendor used
   to mean deleting it and re-scoring all five questions. */
input.vendor-name {
  font-family: inherit;
  width: 100%;
  max-width: 420px;
  padding: 2px 6px;
  margin-left: -6px;              /* keep the text optically aligned */
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
input.vendor-name:hover {
  border-color: var(--border);
  background: var(--bg-elev, rgba(0, 0, 0, 0.02));
}
input.vendor-name:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--bg, #fff);
}
.vendor-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 16px;
}
.vendor-questions {
  display: flex; flex-direction: column; gap: 12px;
}
.vendor-q {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}
.vendor-q:first-child { border-top: none; padding-top: 0; }
.vendor-q-text {
  color: var(--text);
  font-size: 13.5px;
}
/* Per-question 'Where do I find this?' info affordance + expandable
   hint panel. Rob 2026-08-12: users skip questions when they don't
   know where the answer lives on the vendor's site. */
.vendor-q-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}
.vendor-q-info:hover { background: #fbf3e5; border-color: #EEAF11; color: #7a5a00; }
.vendor-q-info.open { background: #EEAF11; border-color: #EEAF11; color: #111827; }
.vendor-q-hint {
  margin-top: -4px;
  padding: 10px 14px;
  background: #fbf3e5;
  border: 1px solid #f0e3c9;
  border-left: 3px solid #EEAF11;
  border-radius: 6px;
  color: #7c4a03;
  font-size: 12.5px;
  line-height: 1.6;
}
.vendor-q-hint strong { color: #7a5a00; font-weight: 700; }
.vendor-q-radio-group {
  display: flex; gap: 4px;
}
.vendor-radio {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.vendor-radio:hover { border-color: #2A3244; color: var(--text); }
.vendor-radio.selected {
  background: rgba(238, 175, 17, 0.12);
  border-color: var(--accent);
  color: var(--text-strong);
}
.vendor-radio.selected.no {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--error);
}
@media (max-width: 640px) {
  .vendor-q { grid-template-columns: 1fr; gap: 8px; }
}

/* Gap cards (Step 5) */
.gap-card {
  padding: 20px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  margin-bottom: 16px;
}
.gap-title {
  color: var(--text-strong);
  font-size: 16px; font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.gap-body {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.gap-body strong { color: var(--text); font-weight: 500; }
.gap-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .gap-fields { grid-template-columns: 1fr; }
}

/* Doc upload rows (Step 6) */
.doc-upload-list { display: flex; flex-direction: column; gap: 12px; }
.doc-upload {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}
.doc-upload:hover { border-color: #2A3244; }
.doc-upload.done {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}
.doc-upload-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
}
.doc-upload.done .doc-upload-icon {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}
.doc-upload-body { flex: 1; }
.doc-upload-label { color: var(--text-strong); font-size: 14px; font-weight: 500; }
.doc-upload-hint { color: var(--text-muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.doc-upload-action {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.doc-upload-action:hover { border-color: var(--accent); color: var(--accent-deep, #7a5a00); }
.doc-upload.done .doc-upload-action {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.4);
}

/* Framework footnote */
.framework-note {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
  padding: 20px 0 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 24px;
}
.framework-note strong { color: var(--text-muted); font-weight: 500; }

/* ===================================================================
 * ACTION BAR
 * =================================================================== */
.action-bar {
  position: sticky; bottom: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 40%);
  padding: 24px 0 0;
  margin-top: 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.action-left { display: flex; align-items: center; gap: 8px; }
.action-left .sep { color: var(--text-dim); font-size: 12px; }
.action-secondary {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: none; border: none;
  padding: 8px 4px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.action-secondary:hover { color: var(--text); }
.action-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #111827;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease;
}
.action-primary:hover { background: var(--accent-hover); }
.action-primary:active { transform: scale(0.98); }
.action-primary .arrow { font-size: 15px; margin-left: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  /* Same right-side reservation as desktop so the fixed icons don't
     overlap; left padding shrinks to 20px on narrow screens. */
  .topbar { padding: 0 108px 0 20px; }
  .progress-wrap, main { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 32px; }
  .topbar-crumb { display: none; }
}

/* ===================================================================
 * EXPANDABLE (progressive disclosure , condensed by default, click to expand)
 * =================================================================== */
.expand {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.expand:hover { border-color: #2A3244; }
.expand[open] { border-color: rgba(238, 175, 17, 0.3); }

.expand > summary {
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.15s ease;
}
.expand > summary:hover { background: rgba(255, 255, 255, 0.02); }
.expand > summary::-webkit-details-marker { display: none; }
.expand > summary .expand-hint {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  display: flex; align-items: center; gap: 6px;
}
.expand > summary .expand-chevron {
  color: var(--accent-deep, #7a5a00);
  font-size: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
}
.expand[open] > summary .expand-chevron { transform: rotate(90deg); }

.expand-body {
  padding: 4px 18px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  margin-top: 6px;
  padding-top: 16px;
}
.expand-body p:first-child { margin-top: 0; }
.expand-body p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
}

/* Phase 2: pulse animation for a row jumped to via ?focus=<rowKey>.
   Amber ring + soft fill fades over ~2.2s so the user's eye locks
   onto the exact field the dashboard sent them to fix. */
@keyframes focusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(238, 175, 17, 0.55); background-color: rgba(238, 175, 17, 0.10); }
  60%  { box-shadow: 0 0 0 8px rgba(238, 175, 17, 0.00); background-color: rgba(238, 175, 17, 0.06); }
  100% { box-shadow: 0 0 0 0 rgba(238, 175, 17, 0.00); background-color: transparent; }
}
.focus-pulse {
  animation: focusPulse 2.2s ease-out;
  border-radius: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .focus-pulse { animation: none; outline: 2px solid #EEAF11; outline-offset: 4px; }
}
