

:root {
  /* ---- The AI Audit theme, sampled from ocora.ltd ----------------------
     Dark navy canvas, white type, cyan accent, and the three signal colours
     the site uses on its numbered cards. */

  --ink:     #ffffff;   /* primary text */
  --ink-2:   #cbd5e1;
  --muted:   #94a3b8;
  --faint:   #7c8aa5;

  --paper:   #070c20;   /* the canvas */
  --panel:   #121a38;   /* a raised surface */
  --panel-2: #0d1430;   /* an inset field */
  --sunk:    #0f1730;   /* a recessed band */

  --rule:        rgba(148, 163, 184, 0.16);
  --rule-strong: rgba(148, 163, 184, 0.30);
  --rule-heavy:  rgba(148, 163, 184, 0.52);

  --brass:      #46d7ff;   /* the AI Audit accent (cyan) */
  --brass-soft: rgba(70, 215, 255, 0.14);
  --ocora-blue: #0008ff;   /* brand blue — primary actions */
  --ocora-navy: #0b2245;
  --ocora-cyan: #46d7ff;
  --signal-violet: #7c5cff;
  --signal-amber:  #ffad24;

  --ms:      #5aa8fc;   /* Microsoft blue, lifted for dark */
  --ms-soft: rgba(90, 168, 252, 0.14);

  --green:      #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --amber:      #ffad24;
  --amber-soft: rgba(255, 173, 36, 0.14);
  --red:        #fb7185;
  --red-soft:   rgba(251, 113, 133, 0.14);

  /* legacy aliases */
  --azure: #5aa8fc;
  --blue:  #070c20;
  --teal:  #34d399;
  --line:  rgba(148, 163, 184, 0.16);
  --line-2: rgba(148, 163, 184, 0.30);
  --navy:  #070c20;
  --navy-2: #121a38;
  --navy-line: rgba(255, 255, 255, 0.12);

  --serif: Manrope, Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --r-sm: 3px;
  --r:    6px;
  --r-lg: 8px;

  --shadow-xs: none;
  --shadow:    none;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);

  --measure: none;
}


/* ---------------------------------------------------------------------------
   Light mode. The dark AI Audit theme is the default; this re-declares the same
   tokens so no component needs to know which mode it is in. */
:root[data-theme="light"] {
  --ink:     #0b2245;
  --ink-2:   #33415c;
  /* Both clear 4.5:1 on --paper, --sunk and --panel. `--faint` used to be #8394ad,
     which reads fine on dark but only manages 2.85:1 on a light background — and it
     carries every eyebrow and metric label in the app. */
  --muted:   #4a5768;
  --faint:   #5f6d85;

  --paper:   #f4f6fa;
  --panel:   #ffffff;
  --panel-2: #ffffff;
  --sunk:    #eef2f8;

  --rule:        rgba(11, 34, 69, 0.13);
  --rule-strong: rgba(11, 34, 69, 0.26);
  --rule-heavy:  rgba(11, 34, 69, 0.55);

  --brass:      #0f6cbd;
  --brass-soft: #e4eefb;

  --ms:      #14588f;
  --ms-soft: #e6eef6;

  --green:      #1c6b46;
  --green-soft: #e2efe8;
  --amber:      #8a6519;
  --amber-soft: #f6edda;
  --red:        #8c3227;
  --red-soft:   #f6e5e2;

  --azure: #14588f;
  --blue:  #0b2245;
  --teal:  #1c6b46;
  --line:  rgba(11, 34, 69, 0.13);
  --line-2: rgba(11, 34, 69, 0.26);
  --navy:  #0b2245;
  --navy-2: #16305c;

  --shadow-lg: 0 30px 70px rgba(11, 34, 69, 0.18);
}

/* Surfaces that are translucent-white on dark need to invert their hover wash. */
:root[data-theme="light"] .dash-row:hover,
:root[data-theme="light"] .opportunity-list-row:hover,
:root[data-theme="light"] .attention-row:hover,
:root[data-theme="light"] .decision-row:hover,
:root[data-theme="light"] .value-card:hover,
:root[data-theme="light"] .value-row:hover,
:root[data-theme="light"] tbody tr:hover,
:root[data-theme="light"] .metric:hover { background: rgba(11, 34, 69, 0.04); }

:root[data-theme="light"] .ghost:hover,
:root[data-theme="light"] .secondary:hover { background: rgba(11, 34, 69, 0.06); }

:root[data-theme="light"] .dash-dept-bar { background: rgba(11, 34, 69, 0.09); }

:root[data-theme="light"] .brand-block img,
:root[data-theme="light"] .briefing-cover-logo:not([data-dark]) { filter: none; }

:root[data-theme="light"] .stage-captured { background: rgba(11, 34, 69, 0.05); }

:root[data-theme="light"] .kanban-column > header span { background: rgba(11, 34, 69, 0.07); }

:root[data-theme="light"] .role-option.active,
:root[data-theme="light"] .view-option.active { background: var(--ink); color: #fff; }

:root[data-theme="light"] .stage-live { background: var(--green); color: #fff; border-color: var(--green); }
:root[data-theme="light"] .stage-live::before { background: #fff; }

/* These three pills carry colours picked for the dark canvas; on a light background
   the text sits on its own tint and drops under 4.5:1. */
:root[data-theme="light"] .stage-indesign { color: #4c3a9e; }
:root[data-theme="light"] .stage-blocked  { color: #7a2a20; }
:root[data-theme="light"] .stage-deprio   { color: var(--muted); }

/* The capture step numerals carry the site's signal colours, which are tuned for the
   dark canvas. Violet and amber both fall under 3:1 on paper, so the light theme uses
   the darkened tokens instead. Specificity has to match the :nth-of-type rules. */
:root[data-theme="light"] .workflow-step-section:nth-of-type(2) .step-num { color: #4c3a9e; }
:root[data-theme="light"] .workflow-step-section:nth-of-type(3) .step-num { color: var(--amber); }
:root[data-theme="light"] .workflow-step-section:nth-of-type(5) .step-num { color: var(--azure); }

/* The green fill flips dark in the light theme, so the tick has to flip with it. */
:root[data-theme="light"] .pack-step.done .pack-step-dot { color: #fff; }

/* The proposal card sits on a tinted wash, which lifts the floor under it —
   `--faint` only manages 3.74:1 there, so the label steps up to `--muted`. */
.proposal-card .eyebrow { color: var(--muted); }
/* The cover stays dark in both modes — it is the deck's title page. */
:root[data-theme="light"] .briefing-cover-logo { filter: brightness(0) invert(1); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .numeral {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -0.022em;
  color: var(--ink);
}

/* Figures align in columns, as they must in anything financial. */
table td,
.metric strong,
.opportunity-score,
.value-band {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

h1 { font-size: 50px; margin: 0; line-height: 1.08; }
h2 { font-size: 34px; margin: 0; line-height: 1.18; }
h3 { font-size: 24px; margin: 0; }

/* Letterspaced small caps carry every label in the report. */
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}

.muted { color: var(--muted); }

button, input, select, textarea { font: inherit; font-family: var(--sans); }
button { cursor: pointer; }

a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--brass); }

::selection { background: var(--brass-soft); }

:focus-visible {
  outline: 1.5px solid var(--brass);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Shell: the whole page is paper. No dark chrome. ---- */
.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  max-width: none;
  background: var(--paper);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 26px 24px 34px;
  background: transparent;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 30px;
  color: var(--ink);
}

.brand-block { display: grid; gap: 8px; padding: 0; }

.brand-block img {
  width: 108px;
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-block span {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  letter-spacing: 0.01em;
}

nav { display: flex; flex-direction: column; gap: 0; flex: 1; }

.nav-link {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 0;
  border: none;
  border-radius: 0;
  font-size: 17.5px;
  transition: color 120ms ease;
}

.nav-link:hover { color: var(--ink); }

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}

/* A brass rule in the margin marks the section you are reading. */
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 1px;
  background: var(--brass);
}

.nav-section {
  margin: 20px 0 5px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.settings-nav { margin-top: auto; }

.tenant-card {
  margin-top: 18px;
  padding: 14px 0 0;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  display: grid;
  gap: 2px;
  background: transparent;
}

.tenant-card .eyebrow { color: var(--faint); }
.tenant-card strong { font-family: var(--serif); font-size: 16px; color: var(--ink); font-weight: 600; }
.tenant-card small { font-size: 12.5px; color: var(--muted); }

main {
  min-width: 0;
  padding: 30px 46px 76px;
  display: grid;
  /* Without minmax(0, …) the single column sizes to its widest child's max-content
     and pushes the whole page sideways — the metric grid and briefing rows both do it. */
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-content: start;
  max-width: var(--measure);
}

/* ---- Masthead ---- */
.topbar,
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  /* The page title and the action cluster both have hard minimum widths, so between
     the tablet breakpoint and a comfortable desktop they have to be allowed to wrap
     onto two lines rather than push the page sideways. */
  flex-wrap: wrap;
}

.topbar > *, .section-head > * { min-width: 0; }

.topbar {
  padding: 0 0 16px;
  border-bottom: 1.5px solid var(--rule-heavy);
  margin-bottom: 2px;
}

.topbar .eyebrow { margin-bottom: 5px; }

.section-head {
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.settings-subhead {
  margin-top: 38px;
  padding-top: 0;
  border-top: none;
}

p { margin: 0; }

.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Segmented controls read as a printed toggle, not a pill. */
.role-switch,
.view-switch {
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  overflow: hidden;
}

.role-option,
.view-option {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 19px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 120ms ease, background 120ms ease;
}

.role-option + .role-option,
.view-option + .view-option { border-left: 1px solid var(--rule-strong); }

.role-option:hover, .view-option:hover { color: var(--ink); }
.role-option.active, .view-option.active { background: var(--brass); color: #05202b; }

.role-switch-label {
  font-size: 9.5px;
  color: var(--faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-right: 4px;
}

/* ---- Buttons: set in type, bounded by a rule ---- */
.primary, .secondary, .ghost {
  min-height: 44px;
  border-radius: 2px;
  padding: 0 21px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.primary { background: var(--ocora-blue); border-color: var(--ocora-blue); color: #fff; }
.primary:hover { background: #1b22ff; border-color: #1b22ff; }

.secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--ink); }

.ghost {
  border-color: transparent;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
}
.ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }

.danger { color: var(--red); }
.danger:hover { background: var(--red-soft); color: var(--red); }

/* minmax(0, 1fr) so a wide child — a table, a metric grid — scrolls inside itself
   instead of stretching the page. Same reason as the note on `main`. */
.panel { background: transparent; border: none; border-radius: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-content: start; }

.page:not(.active-page) { display: none; }
.page.active-page { display: grid; animation: page-in 240ms cubic-bezier(0.2, 0.7, 0.3, 1); }

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .page.active-page { animation: none; }
  html { scroll-behavior: auto; }
}

.page-band { display: contents; }

/* ---- Key figures: a banded table of numbers, ruled not boxed ---- */
.dashboard-grid,
.programme-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  gap: 0 28px;
  background: transparent;
  border: none;
  border-top: 1.5px solid var(--rule-heavy);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.metric {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 17px 24px 19px 0;
  border: none;
  background: transparent;
  min-width: 0;
  cursor: pointer;
  transition: color 130ms ease;
}

.metric:hover strong { color: var(--brass); }
.metric::before, .metric::after { display: none; }

.metric span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  min-height: 34px;          /* holds the figures on one baseline when a label wraps */
  display: block;
}

.metric strong {
  font-family: var(--serif);
  /* A money figure must never break across lines — size it down instead. */
  font-size: clamp(30px, 2.35vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: var(--ink);
}

.metric--hero strong { color: var(--green); }

.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 34px;
  align-items: start;
}

/* ---- Panels become ruled sections ---- */
.dash-panel {
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.dash-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--rule-strong);
  background: transparent;
  margin-bottom: 2px;
}

.dash-panel-head strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.dash-panel-head a,
.dash-panel-head span {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-panel-head a:hover { color: var(--brass); }
.dash-panel-head span.muted { color: var(--faint); }

.dash-full-width { grid-column: 1 / -1; }

.dash-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background 120ms ease;
  position: relative;
}

.dash-row:first-child { border-top: none; }
.dash-row:hover { background: rgba(255, 255, 255, 0.04); }

.dash-row-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dash-row-action { font-size: 11.5px; color: var(--ink-2); text-align: right; max-width: 140px; line-height: 1.4; }

.dash-empty {
  padding: 20px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.programme-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin-bottom: 4px;
}

.seller-grid,
.design-request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.seller-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(10,23,51,0.06);
}
.seller-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brass);
}

.seller-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seller-card strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.adoption-grid,
.adoption-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.adoption-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adoption-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: var(--panel);
}

.adoption-card h3 {
  margin: 0;
  font-size: 19px;
}

.top-down {
  border-top: 4px solid var(--brass);
}

.bottom-up {
  border-top: 4px solid var(--teal);
}

.methodology-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: var(--panel);
}

.method-card h3 {
  margin: 0;
  font-size: 18px;
}

.method-card span {
  color: var(--ink-2);
  line-height: 1.4;
}
.workband {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.usecase-form,
.project-form,
.workflow-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-add-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunk);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.quick-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quick-add-head h3 {
  margin: 0;
  font-size: 17px;
}

.quick-add-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 14px;
}

fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  margin: 0;
}

legend {
  padding: 0 6px;
  color: var(--azure);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wide-field {
  grid-column: span 2;
}

.scoring-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-add-panel .form-grid {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 7px 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea { min-height: 62px; resize: vertical; line-height: 1.5; }

input:hover,
select:hover,
textarea:hover { border-color: var(--ink-2); }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169, 128, 63, 0.14);
}

input::placeholder,
textarea::placeholder { color: var(--faint); }
select option { background: var(--panel); color: var(--ink); }

input[type="range"] {
  padding: 0;
}

.department-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.department-card {
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: 16px 0;
  display: grid;
  gap: 9px;
  background: transparent;
  box-shadow: none;
}

.department-card strong {
  font-family: var(--serif);
  font-size: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border-radius: 2px;
  padding: 0 7px;
  background: var(--ms-soft);
  color: var(--azure);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1px solid rgba(29,95,214,0.2);
}

.tag.teal {
  color: var(--teal);
  background: var(--green-soft);
}

.tag.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.inline-actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button,
.row-actions select {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.row-actions select {
  border: 1px solid var(--line);
  background: var(--panel);
}

.table-wrap {
  min-width: 0;
  overflow: auto;
  border: none;
  border-top: 1.5px solid var(--rule-heavy);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.opportunity-filters {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.opportunity-filters select {
  width: auto;
  min-width: 148px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.opportunity-filters select:focus {
  outline: 2px solid var(--azure);
  border-color: var(--azure);
}

.filter-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 380px;
}

.filter-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.filter-search input:focus {
  outline: 2px solid var(--azure);
  border-color: var(--azure);
}

.filter-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.data-actions {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.data-actions p {
  margin: 0;
  font-size: 13px;
  max-width: 70ch;
}

.list-empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 46px 24px;
  background: var(--panel);
}

.list-empty strong {
  font-size: 14.5px;
  color: var(--ink);
}

.list-empty span {
  font-size: 13px;
  color: var(--muted);
  max-width: 46ch;
}

.filter-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.opportunity-list {
  border: none;
  border-top: 1.5px solid var(--rule-heavy);
  border-radius: 0;
  overflow: auto;
  background: transparent;
  box-shadow: none;
}

.opportunity-list-head,
.opportunity-list-row {
  display: grid;
  grid-template-columns: 62px minmax(220px, 2.4fr) 74px minmax(96px, 0.8fr) minmax(150px, 1fr) minmax(140px, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
  padding: 15px 4px;
}

.opportunity-list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--rule-strong);
  padding-top: 10px;
  padding-bottom: 10px;
}

.opportunity-list-row {
  border-top: 1px solid var(--rule);
  background: transparent;
  font-size: 16.5px;
  cursor: pointer;
  transition: background 120ms ease;
  position: relative;
}

.opportunity-list-row:first-of-type { border-top: none; }

/* A brass hairline marks the row you are on — the only accent fill in the table. */
.opportunity-list-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--brass);
  opacity: 0;
  transition: opacity 120ms ease;
}

.opportunity-list-row:hover::before { opacity: 1; }
.opportunity-list-row:hover { background: rgba(255, 255, 255, 0.04); }

.opportunity-list-row strong,
.opportunity-list-row small {
  display: block;
}

.opportunity-list-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.3;
}

.action-link {
  color: var(--azure);
  text-decoration: none;
  font-weight: 600;
}
.action-link:hover { text-decoration: underline; }

/* Overview page — hero metrics */
.overview-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.overview-metric-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.overview-metric-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brass);
}
.overview-metric-card--highlight::before {
  background: var(--green);
}
.overview-metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.overview-metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.overview-metric-sub {
  font-size: 12px;
  color: var(--muted);
}
.overview-progress-track {
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.overview-progress-fill {
  height: 100%;
  background: var(--brass);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Overview — audit journey */
.overview-journey {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 20px;
}
.overview-journey-track {
  display: flex;
  align-items: center;
  gap: 0;
}
.overview-journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  opacity: 0.35;
}
.overview-journey-step.active { opacity: 1; }
.overview-journey-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--panel);
}
.overview-journey-step.active .overview-journey-dot {
  border-color: var(--azure);
  background: var(--azure);
}
.overview-journey-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  white-space: nowrap;
}
.overview-journey-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--azure);
  background: var(--ms-soft);
  border-radius: 10px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
}
.overview-journey-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin-bottom: 22px;
  max-width: 40px;
}

/* Overview — lower section */
.overview-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}

@media (max-width: 680px) {
  .overview-lower { grid-template-columns: minmax(0, 1fr); }
  .overview-dept-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-dept-head { flex-wrap: wrap; }
  .overview-dept-badge { white-space: normal; }
}
.overview-dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.overview-dept-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.overview-dept-card:hover { border-color: var(--azure); box-shadow: 0 2px 8px rgba(0,120,212,0.10); }
.overview-dept-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.overview-dept-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--azure);
  background: var(--ms-soft);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.overview-dept-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.overview-stage-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.overview-method {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.overview-method-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.overview-method-fill { height: 100%; background: var(--brass); border-radius: 4px; }
.overview-method-labels { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }

/* Funding callout in drawer */
.funding-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--green-soft);
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 14px 16px;
}
/* Dashboard dept bar */
@keyframes barGrow { from { width: 0 } }
.dash-dept-row { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(219,227,239,0.6); font-size: 12.5px; }
.dash-dept-row:last-child { border-bottom: none; }
.dash-dept-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.dash-dept-fill { height: 100%; background: var(--brass); border-radius: 99px; animation: barGrow 0.5s cubic-bezier(0.2,0.7,0.3,1); }
.dash-dept-row span:first-child { font-weight: 600; color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-dept-row span:last-child { text-align: right; font-weight: 700; font-size: 12px; color: var(--ink); }
.dash-full-width { grid-column: 1 / -1; }

.section-head-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.drawer-readonly-grid { display: flex; flex-direction: column; gap: 0; }
.drawer-readonly-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}
.drawer-readonly-row:last-child { border-bottom: none; }
.drawer-readonly-row span { color: var(--muted); flex-shrink: 0; }
.drawer-readonly-row strong { text-align: right; }

.drawer-workflow-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.drawer-workflow-step:last-of-type { border-bottom: none; }
.drawer-workflow-step .step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  margin-top: 4px;
}
.drawer-workflow-step small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.workflow-submitted-notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--green-soft);
  border: 1px solid #b3dfc6;
  border-radius: 8px;
  font-size: 13px;
}
.workflow-submitted-notice strong { color: #1a7f4b; }
.workflow-submitted-notice a { color: var(--azure); font-weight: 600; text-decoration: none; }
.workflow-submitted-notice a:hover { text-decoration: underline; }

.btn-request-design {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--azure);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.btn-request-design:hover { background: #0062cc; }

.empty-table-cell {
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipeline-stage {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunk);
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.pipeline-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-stage-head h3 {
  margin: 0;
  font-size: 14px;
}

.pipeline-stage-head span,
.score-chip {
  min-width: 28px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ms-soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.pipeline-cards {
  display: grid;
  gap: 10px;
}

.opportunity-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(10, 23, 51, 0.05);
}

.opportunity-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.opportunity-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.opportunity-card p {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}

.opportunity-meta,
.opportunity-commercial {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.opportunity-commercial {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.evidence-strip {
  border: 1px solid #d9eadf;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 8px;
  display: grid;
  gap: 3px;
  color: var(--green);
  font-size: 12px;
}

.evidence-strip strong {
  color: var(--ink);
  font-size: 13px;
}

.next-action {
  border: 1px solid #cfe5ff;
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  display: grid;
  gap: 3px;
}

.next-action span {
  color: var(--azure);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.next-action strong {
  font-size: 13px;
  line-height: 1.25;
}

.opportunity-commercial strong {
  color: var(--ink);
  font-size: 15px;
}

.compact-label {
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.empty-stage {
  min-height: 82px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

/* Give the record its room; the rest size to content. */
table th:first-child, table td:first-child { width: 30%; min-width: 220px; }
table td:first-child strong { display: block; margin-bottom: 2px; }
table th:not(:first-child), table td:not(:first-child) { white-space: nowrap; }

th,
td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 16px;
}

th {
  background: transparent;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
}

tbody tr { transition: background 120ms ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

tr:last-child td {
  border-bottom: 0;
}

.priority-p1 {
  color: var(--brass);
  background: var(--brass-soft);
  border-color: rgba(70, 215, 255, 0.34);
  font-weight: 700;
}

.priority-p2 {
  color: var(--muted);
  background: transparent;
  border-color: var(--rule);
}

.priority-p3 {
  color: var(--faint);
  background: transparent;
  border-color: var(--line);
}

/* Funding split — the "what does this cost me" answer */
.split-card {
  display: grid;
  gap: 13px;
  padding: 17px 0;
  border: none;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  margin-bottom: 6px;
}
/* Proposal card */
.proposal-card {
  display: grid;
  gap: 13px;
  padding: 16px 0 17px 16px;
  border: none;
  border-left: 2px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  margin-bottom: 6px;
}

.proposal-good { border-left-color: var(--green); background: var(--green-soft); }
.proposal-warn { border-left-color: var(--amber); background: var(--amber-soft); }
.proposal-bad  { border-left-color: var(--red); background: var(--red-soft); }
.proposal-info { border-left-color: var(--ms); background: var(--ms-soft); }

.proposal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.proposal-card-head strong { font-size: 15px; }
.proposal-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.proposal-figures span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.proposal-figures strong { font-size: 17px; }

.proposal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.proposal-empty, .proposal-notes {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

.proposal-decision {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #c7d9f9;
  border-radius: 12px;
  background: var(--panel);
}

.proposal-decision strong { font-size: 14px; }

.proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.drawer-check input { width: auto; }

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.role-switch-label {
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seller-card--accent { border-color: rgba(52,211,153,0.35); background: var(--green-soft); }

/* Decisions panel — the customer's first screen */
.dash-panel--decision {
  border: none;
  border-top: 2px solid var(--brass);
  background: transparent;
  padding-top: 4px;
  margin-bottom: 6px;
}

.decision-rows { display: grid; gap: 8px; }

.decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.decision-row:hover { background: rgba(255, 255, 255, 0.04); }
.decision-row strong { display: block; font-size: 14px; }
.decision-row small { font-size: 12px; color: var(--muted); }

.decision-figures { display: flex; gap: 20px; }
.decision-figures span { display: grid; gap: 2px; text-align: right; }
.decision-figures small { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.decision-figures strong { font-size: 15px; }

.decision-cta {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brass);
  white-space: nowrap;
}

@media (max-width: 680px) {
  .decision-row { grid-template-columns: minmax(0, 1fr); }
  .decision-figures { justify-content: space-between; }
  .decision-figures span { text-align: left; }
}

.pack-progress {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.pack-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.pack-step strong { display: block; font-size: 13px; color: var(--muted); }
.pack-step small { font-size: 12px; color: var(--muted); }
.pack-step.done strong { color: var(--ink); }

.pack-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

/* A dark tick on the green fill — white managed only 1.9:1 against it. */
.pack-step.done .pack-step-dot { background: var(--green); border-color: var(--green); color: #06251a; }

.owner-chip {
  display: block;
  margin-top: 5px;
  padding: 0;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none !important;
}

.owner-customer { color: var(--brass); }
.owner-ocora { color: var(--faint); }

.metric--hero strong { color: var(--green); }
.metric[hidden] { display: none !important; }
.commercials-breakdown { margin: 16px 0; }
.dash-dept-fill--muted { background: var(--rule-strong); }

/* Capture: value step */
.capture-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 22px;
  align-items: start;
}

.capture-value-preview {
  display: grid;
  gap: 4px;
  justify-items: start;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(169, 128, 63, 0.28);
  border-radius: var(--r);
  background: var(--brass-soft);
}

.capture-value-preview .eyebrow { color: var(--brass); }

.capture-value-preview strong {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.capture-value-preview > span { font-size: 12px; color: var(--ink-2); }
.capture-value-preview p { font-size: 11.5px; line-height: 1.45; margin-top: 6px; }

@media (max-width: 900px) {
  .capture-value { grid-template-columns: minmax(0, 1fr); }
}

/* Value funnel — each stage a harder number than the last */
.value-funnel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 0;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

/* Echoes the site's 01/02/03 cards: each stage carries its own signal colour. */
.value-funnel-step {
  display: grid;
  gap: 4px;
  padding: 16px 20px 17px;
  border-right: 1px solid var(--rule);
  border-top: 2px solid var(--rule-strong);
}
.capture-mode[hidden] { display: none !important; }
/* `hidden` loses to a component's own display, and .section-head is a flex container —
   so hiding the page intro for guided capture needs the explicit override. Fourth time
   this rule has bitten in this codebase. */
.section-head[hidden] { display: none !important; }

.capture-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border: 1px solid rgba(169, 128, 63, 0.32);
  border-left: 2px solid var(--brass);
  border-radius: var(--r-sm);
  background: var(--brass-soft);
  font-size: 12.5px;
  color: var(--brass);
  font-weight: 600;
}

.capture-mode .ghost { color: var(--brass); }
.capture-mode .ghost:hover { background: rgba(169, 128, 63, 0.12); }

/* Capture: prioritise step */
.capture-priority {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 22px;
  align-items: start;
}

.capture-score-preview {
  display: grid;
  gap: 5px;
  justify-items: start;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--sunk);
}

.capture-score-preview strong {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.capture-score-preview > span { font-size: 11.5px; color: var(--muted); }
.capture-score-preview .status-pill { margin-top: 6px; }
.capture-score-preview p { font-size: 11.5px; line-height: 1.45; margin-top: 4px; }

.range-val {
  justify-self: end;
  margin-top: -18px;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .capture-priority { grid-template-columns: minmax(0, 1fr); }
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Commercials before technical design: one honest line, not three tabs of blanks. */
.costproposal-empty {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--sunk);
}

.costproposal-empty strong { font-family: var(--serif); font-size: 17px; }
.costproposal-empty p { margin: 0; max-width: 46em; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.costproposal-empty-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }

.drawer-actions-spacer { flex: 1 1 auto; }

.estimate-clear {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-strong);
  font-size: 12.5px;
}

/* Sections stacked inside one tab need a rule between them. */
.drawer-section--rule { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule-strong); }

.powered-by {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.powered-by strong { color: var(--muted); font-weight: 700; }

/* Benefits / Costs tabs on the dashboard */
.dash-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 4px;
}
/* The C-suite brief: prose and figures, no form. */
.brief { display: grid; gap: 20px; }

.brief-lede {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.brief-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px 18px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.brief-facts span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}

.brief-facts strong { font-size: 14.5px; }

.brief-block { display: grid; gap: 5px; }
.brief-block p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.brief-block--risk p { color: var(--amber); }

/* The other intake path, offered inside the new-opportunity drawer rather than as a
   second button on the pipeline competing with the one you just pressed. */
.drawer-offer {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 13px 15px;
  border-left: 2px solid var(--brass);
  background: rgba(70, 215, 255, 0.06);
}

.drawer-offer span {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

:root[data-theme="light"] .drawer-offer { background: rgba(15, 108, 189, 0.06); }

/* A prompt inside the brief, for the one thing this opportunity is missing. Ruled
   rather than boxed, and cyan rather than amber — it is a next step, not a problem. */
.brief-block--prompt {
  padding: 13px 15px;
  border-left: 2px solid var(--brass);
  background: rgba(70, 215, 255, 0.06);
}

.brief-block--prompt p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

:root[data-theme="light"] .brief-block--prompt { background: rgba(15, 108, 189, 0.06); }

/* A page-level statement of what a surface produces, under the section heading.
   Capture needed one: it opened straight into step 1, so nothing said that a pass
   through it creates BOTH an opportunity and the workflow behind it. */
.page-lede {
  max-width: 78ch;
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

.page-lede strong { color: var(--ink); font-weight: 700; }

/* The caption beside a numbered step label, saying what that step is for. */
.step-note {
  font-weight: 400;
  font-size: 13px;
  color: var(--faint);
}
.brief-note, .brief-empty, .brief-status {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.brief-status { padding-top: 14px; border-top: 1px solid var(--rule); }
.measure-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.measure-key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.measure-key-good { background: var(--green); }
.measure-key-warn { background: var(--amber); }
.value-card-money {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.value-card-money small { font-family: var(--sans); font-size: 11.5px; font-weight: 400; color: var(--faint); }

.value-summary-main strong small {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

/* Derivation, readings and provenance */
.benefit-derivation {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--sunk);
  border: 1px solid var(--line);
}
.value-caveat {
  margin: 0;
  padding: 11px 14px;
  border-left: 2px solid var(--amber);
  background: var(--amber-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12.5px;
  color: var(--amber);
}

.value-card-working {
  margin: 0;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.45;
}
/* ---- Value page ---- */
.value-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  padding: 4px 0 24px;
  border: none;
  border-bottom: 1.5px solid var(--rule-heavy);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.value-summary-main { display: grid; gap: 4px; }

.value-summary-main strong {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.028em;
  color: var(--green);
}

.value-summary-main small { font-size: 12.5px; color: var(--muted); }

.value-summary-stats {
  display: flex;
  gap: 34px;
}

.value-summary-stats div { display: grid; gap: 3px; }

.value-summary-stats span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.value-summary-stats strong { font-family: var(--serif); font-size: 21px; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0 40px;
}

.value-card {
  display: grid;
  gap: 11px;
  padding: 18px 0;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background 130ms ease;
}

.value-card:hover { background: rgba(255, 255, 255, 0.04); }

.value-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.value-card header strong { display: block; font-size: 14px; line-height: 1.3; }
.value-card header small { font-size: 11.5px; color: var(--muted); }

.value-card-metric {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0;
}

.value-journey {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.value-journey span { display: grid; gap: 2px; }

.value-journey small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.value-journey b {
  font-family: var(--serif);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.value-now { color: var(--green); }

/* Decorative (aria-hidden), but it is the only thing separating three figures, so
   it earns more than a hairline's worth of contrast. */
.value-journey-arrow {
  color: var(--faint);
  font-size: 13px;
  padding-bottom: 2px;
}

.value-card footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.value-card footer strong {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.value-card footer strong small { font-size: 11.5px; color: var(--faint); font-family: var(--sans); }

/* Value realisation */
.benefit-summary {
  display: grid;
  gap: 13px;
  padding: 0 0 18px;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  margin-bottom: 6px;
}
@media (prefers-reduced-motion: reduce) {}
/* Needs attention */
.attention-rows { display: grid; gap: 8px; }

.attention-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
}

.attention-row:hover { background: rgba(255, 255, 255, 0.04); }
.attention-row strong { display: block; font-size: 13.5px; }
.attention-row small { font-size: 12px; color: var(--muted); }

.attention-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  align-self: start;
  margin-top: 5px;
}

.attention-bad  { background: var(--red); }
.attention-warn { background: var(--amber); }
.attention-info { background: var(--azure); }

/* Dashboard value panel */
.value-rows { display: grid; gap: 10px; }

.value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.value-row:hover { background: rgba(255,255,255,0.04); }

.value-row-head { display: grid; gap: 3px; min-width: 0; }
.value-row-head strong { font-size: 13.5px; }
.value-row-head small { font-size: 11.5px; color: var(--muted); }
.value-row-metric { grid-column: 1 / -1; }
.value-row-figure { text-align: right; display: grid; gap: 2px; }
.value-row-figure strong { font-size: 14px; color: var(--green); }
.value-row-figure small { font-size: 11px; color: var(--muted); }

.value-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: baseline;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--sunk);
  border: 1px solid #dce7f5;
}

.value-headline div { display: grid; gap: 2px; }
.value-headline span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.value-headline strong { font-size: 20px; }
.value-headline .value-headline-main strong { color: var(--green); }

/* Toasts */
.toast-host {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-in 160ms ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}
.toast-success { background: var(--green); }
.toast-danger  { background: var(--red); }
.toast-message { max-width: 46ch; }
.toast-action {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
}
.toast-action:hover { background: rgba(255, 255, 255, 0.26); }
.toast-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  padding: 2px 4px;
  line-height: 1;
}
.toast-dismiss:hover { color: #fff; }

/* Stage pills */
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stage-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stage-captured    { background: rgba(255,255,255,0.06); color: var(--ink-2); border: 1px solid var(--rule); }
.stage-captured::before { background: var(--muted); }
.stage-prioritised { background: var(--brass-soft); color: var(--brass); border: 1px solid rgba(70,215,255,0.32); }
.stage-prioritised::before { background: var(--brass); }
.stage-indesign    { background: rgba(124,92,255,0.16); color: #b6a8ff; border: 1px solid rgba(124,92,255,0.4); }
.stage-indesign::before { background: var(--signal-violet); }
.stage-proposal    { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255,173,36,0.38); }
.stage-proposal::before { background: var(--signal-amber); }
.stage-delivery    { background: var(--ms-soft); color: var(--ms); border: 1px solid rgba(90,168,252,0.38); }
.stage-delivery::before { background: var(--ms); }
.stage-live        { background: var(--green); color: #06251a; border: 1px solid var(--green); }
.stage-live::before { background: #06251a; }
.stage-blocked     { background: var(--red-soft); color: var(--red); border: 1px solid rgba(251,113,133,0.36); }
.stage-blocked::before { background: var(--red); }
.stage-deprio      { background: transparent; color: var(--faint); border: 1px solid var(--rule); }
.stage-deprio::before { background: var(--rule-strong); }

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.question {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink-2);
  font-weight: 800;
}

.question.active {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--green-soft);
}

.agent-output {
  margin-top: 14px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.subhead {
  margin-top: 18px;
}
.workflow-studio {
  display: grid;
  gap: 16px;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}

.workflow-list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunk);
  padding: 12px;
  display: grid;
  gap: 8px;
  position: sticky;
  top: 24px;
}

.workflow-editor {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 16px;
}

.workflow-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  cursor: pointer;
  display: grid;
  gap: 5px;
  transition: border-color 0.12s;
}

.workflow-list-item:hover { border-color: var(--azure); }

.workflow-list-item.active {
  border-color: var(--brass);
  background: var(--ms-soft);
}

.workflow-list-item strong { font-size: 14px; line-height: 1.2; display: block; }
.workflow-list-item small { color: var(--muted); font-size: 12px; display: block; }

.workflow-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.workflow-list-meta .ghost { min-height: 22px; padding: 0 7px; font-size: 11px; }

.workflow-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.workflow-builder > div:first-child {
  width: 100%;
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.workflow-steps {
  display: grid;
  gap: 10px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
}

.workflow-step-fields {
  display: grid;
  gap: 6px;
}

.step-index {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.workflow-step input {
  min-height: 38px;
}

.remove-step {
  min-height: 34px;
  padding: 0 10px;
}

.scope-card {
  border: none;
  border-top: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 16px 0 0;
  background: transparent;
  display: grid;
  gap: 13px;
  align-content: start;
}

.scope-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

/* Two-up summary rather than one tall list. */
.scope-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scope-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scope-card dt {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scope-card dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
}

.design-return {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.design-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}

.design-day strong {
  color: var(--brass);
}

.design-day span {
  color: var(--ink-2);
  line-height: 1.4;
}

/* Workflow step sections */
.workflow-step-section {
  border: none;
  border-top: 2px solid var(--rule-strong);
  border-radius: 0;
  padding: 26px 0 8px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  box-shadow: none;
}

/* Each step takes one of the site's signal colours, in order. */
.workflow-step-section:nth-of-type(1) { border-top-color: var(--brass); }
.workflow-step-section:nth-of-type(2) { border-top-color: var(--signal-violet); }
.workflow-step-section:nth-of-type(3) { border-top-color: var(--signal-amber); }
.workflow-step-section:nth-of-type(4) { border-top-color: var(--green); }
.workflow-step-section:nth-of-type(5) { border-top-color: var(--ms); }

/* Selects and inputs otherwise refuse to shrink below their longest option, which
   sizes the whole grid column and pushes the page wider than the viewport. */
.form-grid > *,
.workflow-form > * {
  min-width: 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  max-width: 100%;
}
.workflow-step-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.workflow-step-label > span.muted {
  flex-basis: 100%;
  font-family: var(--sans);
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
  color: var(--muted);
}
.step-num {
  display: block;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: none;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Renders as 01, 02 … like the numbered cards on ocora.ltd. */
.step-num::before { content: "0"; }

.workflow-step-section:nth-of-type(2) .step-num { color: var(--signal-violet); }
.workflow-step-section:nth-of-type(3) .step-num { color: var(--signal-amber); }
.workflow-step-section:nth-of-type(4) .step-num { color: var(--green); }
.workflow-step-section:nth-of-type(5) .step-num { color: var(--ms); }
.workflow-submit-row {
  display: grid;
  /* Bounded second column: an `auto` track lets its content set the width and
     collapses the scope card to nothing. */
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 24px;
  align-items: start;
}

@media (max-width: 680px) {
  .workflow-submit-row { grid-template-columns: minmax(0, 1fr); }
  .workflow-submit-actions { min-width: 0; }
}
.workflow-submit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.workflow-submit-actions .primary { width: 100%; }

/* Filter active pill */
.filter-active-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--ms-soft);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--azure);
}

.generated-pack {
  display: grid;
  gap: 10px;
}

.pack-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}

.pack-row strong {
  color: var(--ink);
}

.report-panel {
  margin-bottom: 24px;
}

#reportPreview {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.report-section {
  border-left: 4px solid var(--brass);
  background: var(--panel);
  padding: 14px;
  border-radius: 0 8px 8px 0;
}

.report-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.report-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(11, 22, 34, 0.55);
  backdrop-filter: blur(3px);
}

.login-modal.hidden {
  display: none;
}

.login-card {
  width: min(400px, 92vw);
  display: grid;
  gap: 15px;
  padding: 34px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.login-card img {
  width: 146px;
}

.login-card small {
  color: var(--muted);
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(11, 22, 34, 0.34);
  backdrop-filter: blur(2px);
}

.edit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100vh;
  z-index: 21;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 22px 26px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  animation: drawer-in 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes drawer-in {
  from { transform: translateX(18px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .edit-drawer { animation: none; }
}

.drawer-head,
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 19px; }

.drawer-actions { padding-top: 14px; border-top: 1px solid var(--line); }

.drawer-form {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 13px;
  padding-right: 6px;
  margin-right: -6px;
}

/* Underlined tabs rather than buttons — quieter, and they read as one control. */
.drawer-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.drawer-tab {
  flex: 1;
  min-height: 34px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 4px;
  margin-bottom: -1px;
  transition: color 120ms ease, border-color 120ms ease;
}

.drawer-tab:hover { color: var(--ink); }

.drawer-tab.active {
  background: transparent;
  border-bottom-color: var(--brass);
  color: var(--ink);
}

.drawer-pane {
  display: none;
  align-content: start;
  gap: 13px;
}

.drawer-pane.active { display: grid; }

.drawer-form label { font-size: 11.5px; }

.drawer-score-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--sunk);
}

.drawer-score-main {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}

.drawer-score-num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.drawer-score-denom {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--faint);
}

.drawer-score-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.drawer-section {
  border: none;
  border-left: 2px solid var(--line-2);
  border-radius: 0;
  padding: 2px 0 2px 14px;
  background: transparent;
  display: grid;
  gap: 4px;
}

.drawer-section strong { font-size: 13.5px; }

.drawer-section span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}


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

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 280px);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x proximity;
}

.kanban-column {
  min-height: 520px;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 3px solid #8390a8;
  border-radius: 7px;
  background: var(--sunk);
  scroll-snap-align: start;
  transition: border-color .15s, background .15s;
}

.kanban-column.drag-over { border-color: var(--brass); background: var(--brass-soft); }
.kanban-column > header { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.kanban-column > header span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; background: rgba(255,255,255,0.08); font-size: 12px; font-weight: 800; }
.kanban-cards { display: grid; align-content: start; gap: 8px; min-height: 455px; }

.kanban-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7ddea;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  cursor: pointer;
}

.kanban-card:hover { border-color: #9eb1f5; box-shadow: 0 3px 10px rgba(15, 23, 42, .08); }
.kanban-card.dragging { opacity: .45; }
.kanban-card-head { display: flex; align-items: center; justify-content: space-between; }
.kanban-card > span, .kanban-card-head small { color: var(--muted); font-size: 11px; }
.kanban-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 0; }
.kanban-card dl div { display: grid; gap: 2px; }
.kanban-card dt { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 800; }
.kanban-card dd { margin: 0; font-size: 11px; color: var(--ink-2); }
.kanban-status { width: 100%; min-width: 0; font-size: 11px; padding: 7px; }
.kanban-empty { display: grid; place-items: center; min-height: 80px; border: 1px dashed #c5ccda; border-radius: 6px; color: var(--muted); font-size: 11px; }
.kanban-held { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--rule-strong); background: var(--sunk); font-size: 12px; color: var(--muted); }
.kanban-held strong { color: var(--ink); }

.programme-settings { max-width: 720px; }

.cycle-strip {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 32px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  border-radius: 0;
  cursor: pointer;
}

.cycle-strip > div { display: grid; gap: 3px; }
.cycle-strip strong { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.cycle-strip > span { font-size: 12.5px; color: var(--muted); }
.cycle-strip > span:last-child { text-align: right; color: var(--ink); font-weight: 600; white-space: nowrap; }

.cycle-strip div { display: grid; gap: 3px; }
.cycle-strip strong { font-size: 17px; color: var(--ink); }
.cycle-strip > span:last-child { text-align: right; }

.cycle-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--brass);
  border-radius: 2px;
  color: var(--brass);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cycle-strip:hover .cycle-cta { background: var(--brass-soft); }

.design-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--brass-soft);
}

.design-handoff > div { display: grid; gap: 4px; }
.design-handoff span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.briefing-toolbar { align-items: flex-end; }
.briefing-actions { display: flex; align-items: flex-end; gap: 10px; }
.briefing-actions label { min-width: 190px; }
/* minmax(0, 1fr) stops the 18-month roadmap track (which scrolls internally) from
   sizing this column to max-content and stretching every other slide with it. */
.briefing-deck { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

.briefing-cover {
  --ink: #ffffff;
  --muted: #c3d0e8;
  --faint: #93a7d4;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 36px;
  padding: 34px 36px 30px;
  align-items: start;
  background: var(--navy);
  color: white;
  border-radius: 6px;
}

.briefing-cover-logo { position: static; grid-column: 1; grid-row: 1; width: 124px; filter: brightness(0) invert(1); }
.briefing-cover-confidential {
  position: static;
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #93a7d4;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.briefing-slide-title { margin-bottom: 18px; }
.briefing-slide-title h3 { margin: 4px 0 0; font-size: 26px; }
.briefing-slide-footer { display: none; }
.briefing-decision-block { margin-top: 24px; padding-top: 16px; border-top: 2px solid #a9b4c8; }
.briefing-decision-block > h3 { margin: 3px 0 8px; font-size: 18px; }

.briefing-cover > div:not(.briefing-cover-mark) { grid-column: 1; grid-row: 2; display: grid; gap: 10px; }
.briefing-cover h3 { margin: 0; font-size: 34px; color: white; letter-spacing: 0; }
.briefing-cover p { max-width: 62ch; color: #c3d0e8; line-height: 1.6; font-size: 15.5px; }
.briefing-cover .eyebrow { color: var(--ocora-cyan); }
.briefing-cover-mark {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ocora-cyan);
}
.briefing-cover-mark small {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.briefing-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.briefing-kpis article { display: grid; gap: 5px; padding: 16px 14px; border-right: 1px solid var(--line); background: var(--panel); }
.briefing-kpis article:last-child { border-right: 0; }
.briefing-kpis span, .briefing-kpis small { color: var(--muted); font-size: 12px; }
.briefing-kpis strong { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }

.briefing-section { border-top: 3px solid var(--ink); padding-top: 14px; }
.briefing-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.briefing-section-head h3 { margin: 3px 0 0; font-size: 20px; }
.briefing-section-head > strong { font-size: 28px; }
.briefing-row { display: grid; grid-template-columns: minmax(0, 1.1fr) 140px minmax(0, 1fr); align-items: center; gap: 18px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.briefing-row > div { display: grid; gap: 3px; }
/* `:not()` because a stage pill is also a span, and this rule was flattening every
   pill in the deck to grey — the whole point of the pill is that it is colour-coded. */
.briefing-row span:not(.stage-pill):not(.status-pill) { font-size: 12px; color: var(--muted); line-height: 1.4; }
.briefing-empty { padding: 20px 0; color: var(--muted); }
.roadmap-track { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.roadmap-month { min-height: 150px; display: flex; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid var(--line); border-top: 4px solid #98a2b3; border-radius: 6px; background: var(--panel); }
.roadmap-month.current { border-top-color: var(--brass); background: var(--brass-soft); }
.roadmap-month > span, .roadmap-month small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.roadmap-month small { padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-2); }

/* Slider value badge */
.range-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 20px;
  border-radius: 6px;
  background: var(--ocora-blue);
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 0 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Clickable metric tiles */
.metric[data-navigate] {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.metric[data-navigate]:hover {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(7, 39, 232, 0.08);
}

/* Quick-add collapse */
.quick-add-grid.quick-add-collapsed {
  display: none;
}

/* Step reorder controls */
.step-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.step-move {
  min-height: 30px;
  padding: 0 8px;
  font-size: 13px;
}

.step-move:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 20px;
  }

  .brand-block { padding: 0; }
  .brand-block span { display: none; }
  .brand-block img { width: 92px; }

  nav {
    display: flex;
    flex-flow: row wrap;
    gap: 2px;
    flex: 1 1 420px;
  }

  .nav-section { display: none; }
  .nav-link.active::before { left: 0; right: 0; top: auto; bottom: -3px; width: auto; height: 2px; transform: none; }
  .tenant-card { border: none; background: none; padding: 0; text-align: right; }

  .settings-nav {
    margin-top: 0;
  }

  .tenant-card {
    margin-top: 0;
  }

  .department-list,
  .methodology-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-layout {
    grid-template-columns: 200px 1fr;
  }

  .workflow-list-panel {
    position: static;
  }

  .form-grid,
  .usecase-form,
  .project-form,
  .workflow-form,
  .workflow-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-return {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-add-grid {
    grid-template-columns: 1fr;
  }

  .cycle-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .briefing-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  main { padding: 18px 16px 40px; }
  /* The largest money figures do not fit two-up at 375px in Manrope 800. */
  .dashboard-grid, .programme-metrics-grid { grid-template-columns: minmax(0, 1fr); }
  /* Long stage names ("Design requested") push the dash row past the viewport. */
  .dash-row { grid-template-columns: 52px minmax(0, 1fr); }
  .dash-row-action { grid-column: 2; justify-self: start; }
  .stage-pill { white-space: normal; }
  .metric strong { font-size: 30px; }
  .metric span { min-height: 0; }
  .sidebar { padding: 12px 16px; }
  .value-summary { flex-direction: column; align-items: flex-start; gap: 20px; }
  .value-summary-stats { gap: 22px; flex-wrap: wrap; }
  .value-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { border-bottom: 1px solid var(--line); }
  .edit-drawer { padding: 18px; }


  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 26px;
  }

  nav,
  .department-list,
  .methodology-panel,
  .form-grid,
  .workflow-form {
    grid-template-columns: 1fr;
  }

  .quick-add-head {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    width: 100%;
  }

  .view-option {
    flex: 1;
  }

  .drawer-tabs {
    overflow-x: auto;
  }

  .wide-field {
    grid-column: auto;
  }

  .workflow-step {
    grid-template-columns: 38px 1fr auto;
  }

  .cycle-strip, .briefing-kpis, .briefing-row { grid-template-columns: 1fr; }
  .briefing-actions, .design-handoff { align-items: stretch; flex-direction: column; width: 100%; }
  .briefing-cover { align-items: flex-start; flex-direction: column; padding: 24px; }
  .briefing-cover h3 { font-size: 27px; }
}

/* ---------------------------------------------------------------------------
   Executive summary, strategic themes, maturity and resourcing.
   The written half of the audit — everything else on the dashboard is derived.
   --------------------------------------------------------------------------- */

.exec-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  padding: 24px 26px 22px;
  border-left: 3px solid var(--brass);
  background: var(--sunk);
}

.row-label { display: grid; gap: 3px; min-width: 0; }
.row-label strong { font-size: 15px; color: var(--ink); }
.row-label span { font-size: 13px; line-height: 1.45; }

/* Resourcing: one bar per role, segmented by where the people come from. */
.role-row { grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 48px; }
.role-track { width: 100%; min-width: 0; }
.role-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.role-legend-item { display: flex; gap: 7px; align-items: center; }
.role-legend-item i { width: 13px; height: 11px; border-radius: 3px; }

.dash-dept-fill.is-over { background: var(--amber); }.gap-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.gap-raised {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px dashed var(--rule-strong);
  font-size: 14px;
}

.ghost-button, .link-button {
  padding: 8px 15px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 120ms ease, color 120ms ease;
}

.ghost-button:hover, .link-button:hover { border-color: var(--brass); color: var(--ink); }
.link-button { align-self: end; padding: 8px 12px; border-color: transparent; color: var(--muted); }
.link-button:hover { color: var(--red); }

/* Settings editors — the squad grid. */
.exec-editor { margin-bottom: 30px; }
/* Role counts in the estimate tab. Blank means "not needed". */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 16px;
  margin-top: 4px;
}

.role-grid-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.role-grid-item input { text-align: right; }

@media (max-width: 900px) {  .role-figure { text-align: left; }}

@page { size: A4 landscape; margin: 0; }


/* ---------- Value bands ----------
   One click sizes an opportunity. The band is a range, so it reads as a range —
   never a single fabricated figure. Colour steps with size rather than judging it:
   an unsized opportunity is muted, not red, because "not yet sized" is a real and
   perfectly acceptable answer. */

.value-band {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border-radius: 2px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
  border: 1px solid transparent;
}

.value-band-unknown {
  color: var(--faint);
  background: transparent;
  border-color: var(--rule-strong);
}

.value-band-small {
  color: var(--brass);
  background: rgba(70, 215, 255, 0.10);
  border-color: rgba(70, 215, 255, 0.24);
}

.value-band-medium {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(255, 173, 36, 0.26);
}

.value-band-large {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.26);
}

/* The score gets its own column now — prioritisation is what the tool is for, and it
   was previously buried in a <small> under the stage pill. */
.opportunity-score {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.opportunity-score small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The capture band picker. Radios styled as a segmented control, so sizing an
   opportunity is one click and cannot be typed in wrongly. */
.value-band-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  overflow: hidden;
}

.value-band-option {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.value-band-option + .value-band-option { border-left: 1px solid var(--rule-strong); }

/* The radio itself is the hit target but not the visual — the whole cell lights up. */
.value-band-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.value-band-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease;
}

.value-band-option:hover span { color: var(--ink-2); background: rgba(255, 255, 255, 0.04); }
.value-band-option.active span { color: var(--paper); background: var(--brass); }

/* Keyboard focus has to be visible when the input itself is hidden. */
.value-band-option input:focus-visible + span {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}

:root[data-theme="light"] .value-band-option:hover span { background: rgba(0, 0, 0, 0.04); }
:root[data-theme="light"] .value-band-option.active span { color: #fff; }

/* The briefing's stage counts. Printed, so it keeps the deck's light ground. */
.briefing-stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
}

.briefing-stage-strip > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.briefing-stage-strip strong {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Bulk import preview ----------
   A per-row verdict before anything is written. Ruled, not boxed, and colour-coded on the
   verdict column only so the table stays readable at forty rows. */

.import-preview {
  margin: 6px 0 26px;
  padding: 18px 0 20px;
  border-top: 2px solid var(--brass);
  border-bottom: 1px solid var(--rule);
}

.import-preview[hidden] { display: none !important; }

.import-head { display: grid; gap: 5px; margin-bottom: 14px; }
.import-head .eyebrow { color: var(--brass); margin: 0; }
.import-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 25px);
  font-weight: 800;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums lining-nums;
}

.import-note { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

.import-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.import-table th {
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.import-table td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: top;
}

.import-line { color: var(--faint); font-variant-numeric: tabular-nums lining-nums; width: 52px; }
.import-verdict { font-weight: 600; white-space: nowrap; }
.import-detail { color: var(--muted); font-size: 12.5px; }

.import-row--create .import-verdict { color: var(--green); }
.import-row--update .import-verdict { color: var(--brass); }
.import-row--skip .import-verdict { color: var(--faint); }
.import-row--skip td { color: var(--faint); }

.import-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ---------- Guided capture ----------
   One question at a time, given the whole surface. The house style is rules not boxes,
   so the progress indicator is a hairline that fills and each answer is a ruled row that
   draws a cyan edge as you reach it — no cards, no shadows. */

.guided {
  --guided-measure: 62ch;
  padding: 6px 0 34px;
}

.guided-rail {
  position: relative;
  height: 2px;
  background: var(--rule);
  overflow: hidden;
}

.guided-rail-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brass) 45%, transparent), var(--brass));
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.guided-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0 0;
}

.guided-count {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--faint);
}

.guided-exit {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.guided-exit:hover { color: var(--ink); }

/* The stage animates on every question change. Keyed off [data-step] so the same
   element re-runs the animation rather than needing to be replaced. */
.guided-stage {
  max-width: var(--guided-measure);
  padding-top: 42px;
  animation: guided-in 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes guided-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.guided-eyebrow { margin: 0 0 14px; color: var(--brass); }

.guided-question {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.guided-help {
  max-width: 54ch;
  margin: 15px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---- answers ---- */

.guided-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--rule);
}

.guided-choice {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 14px 17px 4px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, padding-left 220ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: guided-row-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(90ms + var(--i) * 55ms);
}

@keyframes guided-row-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

/* The cyan edge that arrives on hover — the accent as a line, per the design system. */
.guided-choice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--brass);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.guided-choice:hover,
.guided-choice:focus-visible {
  background: rgba(70, 215, 255, 0.05);
  padding-left: 12px;
  outline: none;
}

.guided-choice:hover::before,
.guided-choice:focus-visible::before,
.guided-choice.is-chosen::before { transform: scaleY(1); }

.guided-choice.is-picked {
  background: rgba(70, 215, 255, 0.12);
  transition: background 90ms ease;
}

.guided-choice-key {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--faint);
  transition: color 160ms ease, border-color 160ms ease;
}

.guided-choice:hover .guided-choice-key,
.guided-choice:focus-visible .guided-choice-key,
.guided-choice.is-chosen .guided-choice-key {
  color: var(--brass);
  border-color: color-mix(in srgb, var(--brass) 55%, transparent);
}

.guided-choice-body { display: grid; gap: 3px; }

.guided-choice-body strong {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.guided-choice-body small { font-size: 13px; color: var(--muted); }

/* "Not sure" is a real answer, but it should not compete with the ones that carry a
   judgement — it records no number. */
.guided-choice--quiet .guided-choice-body strong {
  font-weight: 400;
  color: var(--muted);
}

/* ---- text and step inputs ---- */

.guided-text-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 30px;
}

.guided-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 13px 2px;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--rule);
  border-radius: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 700;
  color: var(--ink);
  transition: border-color 200ms ease;
}

.guided-input::placeholder { color: var(--faint); font-weight: 400; }
.guided-input:focus { outline: none; border-bottom-color: var(--brass); }

.guided-error {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--amber);
}

.guided-steps {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guided-step;
  border-top: 1px solid var(--rule);
}

.guided-steps li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  counter-increment: guided-step;
  animation: guided-row-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.guided-steps li > span::before {
  content: counter(guided-step, decimal-leading-zero);
  margin-right: 13px;
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--brass);
}

.guided-step-remove {
  flex: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--faint);
  cursor: pointer;
}

.guided-step-remove:hover { color: var(--amber); }

/* ---- actions ---- */

.guided-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-top: 28px;
}

.guided-actions--final { margin-top: 32px; }

.guided-hint { font-size: 13px; color: var(--faint); }

.guided-back {
  margin-top: 30px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.guided-back:hover { color: var(--ink); transform: translateX(-3px); }
.guided-actions .guided-back { margin-top: 0; }

/* ---- the review, where the answers resolve into a priority ---- */

.guided-verdict {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  margin-top: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.guided-verdict strong {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brass);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  animation: guided-figure 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 140ms;
}

@keyframes guided-figure {
  from { opacity: 0; transform: translateY(9px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.guided-verdict > div { display: grid; gap: 7px; justify-items: start; }
.guided-verdict small { font-size: 13px; color: var(--muted); max-width: 44ch; line-height: 1.5; }
.guided-verdict--unscored strong { color: var(--faint); }

.guided-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
}

.guided-summary > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.guided-summary dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.guided-summary dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

.guided-change {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--brass);
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease;
}

.guided-summary > div:hover .guided-change,
.guided-change:focus-visible { opacity: 1; }

/* An unscored opportunity must not borrow P3's colour, which would read as a real rank. */
.status-pill.priority-unscored {
  background: rgba(148, 163, 184, 0.13);
  color: var(--muted);
  border-color: var(--rule);
}

.opportunity-score--none { color: var(--faint); }

@media (max-width: 620px) {
  .guided-stage { padding-top: 30px; }
  .guided-summary > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Someone who has asked for less motion gets the layout without the theatre. */
@media (prefers-reduced-motion: reduce) {
  .guided-stage,
  .guided-choice,
  .guided-steps li,
  .guided-verdict strong { animation: none; }
  .guided-rail-fill,
  .guided-choice,
  .guided-back { transition: none; }
}

@media print {
  .sidebar, .topbar, .briefing-toolbar, body > .login-modal, .edit-drawer, .drawer-backdrop { display: none !important; }
  html, body { width: 297mm; min-height: 210mm; margin: 0; background: var(--panel); }
  .app-shell, main { display: block; width: 100%; padding: 0; margin: 0; }
  .page { display: none !important; }
  #briefing { display: block !important; padding: 0; margin: 0; border: 0; box-shadow: none; }
  .briefing-deck { display: block; }
  .briefing-slide {
    position: relative;
    box-sizing: border-box;
    width: 297mm;
    height: 210mm;
    min-height: 210mm;
    padding: 18mm 18mm 16mm;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    break-after: page;
    page-break-after: always;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .briefing-slide:last-child { break-after: auto; page-break-after: auto; }
  .briefing-cover { padding: 28mm 24mm; background: #0b1622 !important; }
  .briefing-cover-logo { top: 18mm; left: 24mm; width: 34mm; }
  .briefing-cover h3 { max-width: 190mm; font-size: 34pt; }
  .briefing-cover p { max-width: 175mm; font-size: 14pt; }
  .briefing-cover-confidential { left: 24mm; bottom: 17mm; }
  .briefing-summary-slide { display: flex; flex-direction: column; justify-content: center; }
  .briefing-kpis { grid-template-columns: repeat(3, 1fr); }
  .briefing-kpis article { min-height: 30mm; padding: 6mm; justify-content: center; }
  .briefing-kpis strong { font-size: 22pt; }
  .briefing-section { padding-top: 18mm; border-top: 0; }
  .briefing-section-head { padding-bottom: 4mm; border-bottom: 1.5mm solid #0b1622; }
  .briefing-section-head h3, .briefing-slide-title h3 { font-size: 22pt; }
  .briefing-row { grid-template-columns: 1.05fr 36mm 1fr; min-height: 12mm; padding: 3mm 1mm; gap: 5mm; }
  .briefing-row strong { font-size: 10pt; }
  .briefing-row span { font-size: 8pt; }
  .briefing-slide-footer { position: absolute; left: 18mm; right: 18mm; bottom: 7mm; display: grid; grid-template-columns: 26mm 1fr 10mm; align-items: center; gap: 5mm; padding-top: 2mm; border-top: .3mm solid #cbd2df; color: #68738a; font-size: 7pt; text-transform: uppercase; }
  .briefing-slide-footer img { width: 22mm; }
  .briefing-slide-footer b { text-align: right; color: #0b1622; }
  .briefing-decision-block { margin-top: 6mm; padding-top: 4mm; }
  .briefing-decision-block .briefing-row { min-height: 9mm; padding: 2mm 1mm; }
  .roadmap-track { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); gap: 3mm; overflow: visible; }
  .roadmap-month { min-height: 34mm; padding: 3mm; }
  .roadmap-month strong { font-size: 8pt; }
  .roadmap-month small { font-size: 6.5pt; }
}

/* ---------------------------------------------------------------------------
   Entry screen and demo banner.
   Two ways in, and the demo has to keep saying so — seeded Contoso figures
   passed off as a customer's own is the failure this guards against.
   --------------------------------------------------------------------------- */

.entry-card { max-width: 460px; text-align: left; }

.entry-lede {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.entry-choice { display: grid; gap: 12px; }

.entry-choice button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 0;
  padding: 15px 18px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

.entry-choice button span { font-size: 15px; font-weight: 700; }
.entry-choice button small { font-size: 12.5px; font-weight: 400; opacity: 0.82; }

.entry-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.mode-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
  padding: 9px 26px;
  background: var(--amber-soft);
  border-bottom: 1px solid var(--amber);
  font-size: 13px;
  color: var(--ink);
}

.mode-banner strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.mode-banner span { color: var(--ink-2); }

.mode-banner-action {
  min-height: 0;
  margin-left: auto;
  padding: 3px 12px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.mode-banner-action:hover { background: var(--amber); color: var(--paper); }

@media (max-width: 720px) {
  .mode-banner { padding: 9px 16px; }
  .mode-banner-action { margin-left: 0; }
}

/* First run: what to do when the workspace is genuinely empty. */
.first-run {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
  padding: 26px 28px 24px;
  border-left: 3px solid var(--brass);
  background: var(--sunk);
}

.first-run-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.first-run-lede { margin: 0; max-width: 56em; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

.first-run-steps { display: grid; gap: 2px; margin: 10px 0 0; padding: 0; list-style: none; }

.first-run-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.first-run-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brass-soft);
  color: var(--brass);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 800;
}

.first-run-step-text { display: grid; gap: 4px; min-width: 0; }
.first-run-step-text strong { font-size: 15.5px; color: var(--ink); }
.first-run-step-text p { margin: 0; max-width: 60em; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

.first-run-foot {
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 720px) {
  .first-run { padding: 20px 18px; }
  .first-run-step { grid-template-columns: 26px minmax(0, 1fr); }
  .first-run-step .ghost-button { grid-column: 2; justify-self: start; }
}

/* Where the workspace actually lives, said plainly in the topbar. "Saved in this
   browser only" is the one people need to see — it is the difference between a
   prototype and something they can trust their data to. */
.sync-status {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sync-good  { color: var(--green); }
.sync-warn  { color: var(--amber); }
.sync-bad   { color: var(--red); }
.sync-muted { color: var(--muted); }

/* An authenticated stranger. Full-screen, because a partial workspace behind it
   would read as "nearly in" when they are not in at all. */
.access-denied {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}

/* `display: grid` above beats the `hidden` attribute, so without this the denial
   screen renders full-screen on every page. Same trap as .capture-mode and .metric. */
.access-denied[hidden] { display: none !important; }

.denied-card {
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 36px 38px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  background: var(--panel);
}

.denied-card img { width: 108px; margin-bottom: 4px; }
.denied-card h2 { font-size: 26px; }
.denied-lede { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.denied-note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.denied-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.denied-contact { display: inline-grid; place-items: center; min-height: 42px; padding: 0 20px; text-decoration: none; border-radius: 3px; }

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 104px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.member-role {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}

@media (max-width: 720px) {
  .member-row { grid-template-columns: minmax(0, 1fr) auto; }
  .denied-card { padding: 26px 22px; }
}

/* The workspace reference on the refusal screen — the one thing that turns
   "I can't get in" into something Ocora can act on. */
.denied-id {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--sunk);
}

.denied-id code {
  font-size: 13px;
  word-break: break-all;
  color: var(--ink);
}

/* Ocora access administration. */
.admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px 0 4px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 48px auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.admin-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.admin-on  { background: var(--green-soft); color: var(--green); }
.admin-off { background: var(--amber-soft); color: var(--amber); }

@media (max-width: 900px) {
  .admin-form, .admin-row { grid-template-columns: minmax(0, 1fr); }
}
