/* =============================================================================
   TenderIQ — Design Tokens
   Light theme: cream paper + gold accent.
   Inspired by institutional construction software (HCSS, Sage 300 CRE, Procore)
   but warmer and more brand-distinctive via the gold mark.
   ============================================================================= */

:root {
  /* ---------- Surfaces -------------------------------------------------- */
  /* Off-white with a whisper of warmth — institutional, prints clean,
     gold mark still feels intentional rather than garish on pure white. */
  --paper:        #f8f7f3;  /* main canvas — off-white */
  --paper-2:      #efede6;  /* alt zones (subtle stripe) */
  --paper-3:      #e6e3d9;  /* deepest paper accent */
  --surface:      #ffffff;  /* card surface — true white */
  --surface-warm: #fbfaf6;  /* slightly warm card alt */
  --surface-hover:#f3f1ea;  /* row hover */

  /* ---------- Ink (text) ------------------------------------------------ */
  --ink:    #1a1614;  /* primary — warm near-black */
  --ink-2:  #5a544e;  /* secondary */
  --ink-3:  #8a857e;  /* tertiary / placeholder */
  --ink-4:  #b5ad9f;  /* disabled / faint label */

  /* ---------- Lines ----------------------------------------------------- */
  --line:   #e6e3d9;  /* subtle divider */
  --line-2: #d2cec1;  /* deeper divider */
  --line-3: #b8b3a0;  /* heaviest divider (rare) */

  /* ---------- Gold (the brand mark) ------------------------------------ */
  --gold:        #b8923a;  /* primary gold for CTAs, brand mark, links */
  --gold-2:      #9a7a2c;  /* hover / pressed */
  --gold-3:      #7c6020;  /* deepest gold (rare, e.g. focus ring inner) */
  --gold-soft:   #ecdfb1;  /* gold tint background */
  --gold-softer: #f5edd2;  /* lightest gold tint */

  /* ---------- Status ---------------------------------------------------- */
  --go:           #2f7a4a;
  --go-soft:      #d8eedc;
  --go-edge:      #b6dac0;

  --caution:      #b8771f;
  --caution-soft: #f5e3c0;
  --caution-edge: #ebd093;

  --danger:       #a83232;
  --danger-soft:  #f0d4cf;
  --danger-edge:  #e0afa6;

  --info:         #2c6a93;
  --info-soft:    #d4e6f0;

  /* ---------- Shadow / elevation --------------------------------------- */
  --shadow-1: 0 1px 2px rgba(40,30,10,.05), 0 0 0 1px rgba(40,30,10,.04);
  --shadow-2: 0 4px 14px rgba(40,30,10,.07), 0 0 0 1px rgba(40,30,10,.04);
  --shadow-3: 0 12px 32px rgba(40,30,10,.10), 0 0 0 1px rgba(40,30,10,.05);
  --shadow-gold: 0 0 0 1px var(--gold), 0 4px 14px rgba(184,146,58,.18);

  /* ---------- Type ------------------------------------------------------ */
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- Radius ---------------------------------------------------- */
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---------- Spacing scale (4px base) --------------------------------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 28px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* ---------- Motion ---------------------------------------------------- */
  --ease:    cubic-bezier(.2,.8,.2,1);
  --ease-in: cubic-bezier(.4,0,.6,1);
  --t-fast:  120ms;
  --t-base:  200ms;
  --t-slow:  320ms;

  /* ---------- Layout ---------------------------------------------------- */
  --content-max: 1180px;
  --content-narrow: 880px;
  --header-h: 64px;
}

/* =============================================================================
   Base
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 { font-size: 38px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

a { color: var(--gold-2); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--gold-3); }

::selection { background: var(--gold-soft); color: var(--ink); }

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

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 1px 2px rgba(184,146,58,.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-2);
  border-color: var(--gold-2);
  box-shadow: 0 2px 8px rgba(184,146,58,.30);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-warm);
  border-color: var(--line-3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--paper-2);
  color: var(--ink);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger-edge);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* =============================================================================
   Cards & surfaces
   ============================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card-pad   { padding: var(--s-6); }
.card-pad-l { padding: var(--s-8); }

.zone-divider {
  height: 1px;
  background: var(--line);
  margin: var(--s-8) 0;
}

/* =============================================================================
   Pills, chips, badges
   ============================================================================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.chip-gold    { background: var(--gold-softer); border-color: var(--gold-soft); color: var(--gold-3); }
.chip-go      { background: var(--go-soft);     border-color: var(--go-edge);   color: var(--go); }
.chip-caution { background: var(--caution-soft);border-color: var(--caution-edge);color: var(--caution); }
.chip-danger  { background: var(--danger-soft); border-color: var(--danger-edge);color: var(--danger); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--paper-3);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}

/* =============================================================================
   Stat strip — reusable horizontal metrics row
   ============================================================================= */
.stat-strip {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.stat-strip-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-strip-value {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--ink);
  line-height: 1;
}
.stat-strip-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-strip-sep {
  width: 1px;
  height: 28px;
  background: var(--line-2);
}

/* =============================================================================
   Step hero — page-top hero pattern
   ============================================================================= */
/* step-hero — v2 treatment: tighter, mono eyebrow, smaller title,
   bottom border so it reads as a page-head ledger ruling.
   All existing callers (Library, Settings, New pursuit, etc.) get
   the upgrade for free without touching markup. */
.step-hero {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: 0 0 var(--s-5);
  margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--line-2);
}
.step-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.step-hero-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.step-hero-sub {
  color: var(--ink-2);
  max-width: 60ch;
  font-size: 14px;
}
.step-hero-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

/* =============================================================================
   Empty state
   ============================================================================= */
.empty-state {
  text-align: center;
  padding: var(--s-12) var(--s-6);
  color: var(--ink-2);
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--s-4);
  opacity: 0.5;
}
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.empty-state-desc {
  max-width: 44ch;
  margin: 0 auto var(--s-5);
}

/* =============================================================================
   Form fields
   ============================================================================= */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field textarea { min-height: 88px; resize: vertical; }
.field-hint  { font-size: 12px; color: var(--ink-3); }
.field-error { font-size: 12px; color: var(--danger); }
.field.invalid input, .field.invalid textarea, .field.invalid select {
  border-color: var(--danger-edge);
  background: var(--danger-soft);
}
.field.invalid input:focus, .field.invalid textarea:focus, .field.invalid select:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.field-label .req { color: var(--danger); margin-left: 2px; }

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* =============================================================================
   Tables (basic)
   ============================================================================= */
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.t th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-2);
}
table.t td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
table.t tr:hover td { background: var(--surface-warm); }

/* =============================================================================
   Verdict screen — extra components ported from existing TenderIQ
   ============================================================================= */

/* Strategic justification — the AI's narrative reasoning. Gold-bordered */
.justification-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  margin-top: var(--s-6);
}
.justification-card h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: var(--s-2);
  font-family: var(--font-sans);
}
.justification-card p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0;
}

/* Two-column analysis grid: contract flags + opportunities */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin-top: var(--s-6);
}
@media (max-width: 760px) { .analysis-grid { grid-template-columns: 1fr; } }
.analysis-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.analysis-card h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: var(--s-3);
  font-family: var(--font-sans);
}
.analysis-card ul { list-style: none; padding: 0; margin: 0; }
.analysis-card ul li {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.55;
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.analysis-card ul li:last-child { border-bottom: none; }
.analysis-card ul li .dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.analysis-card ul li .dot.red    { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.analysis-card ul li .dot.amber  { background: var(--caution); box-shadow: 0 0 0 2px var(--caution-soft); }
.analysis-card ul li .dot.green  { background: var(--go); box-shadow: 0 0 0 2px var(--go-soft); }

/* Scope tags — risk / note / opportunity chips */
.scope-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-top: var(--s-4);
}
.scope-card h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: var(--s-3);
  font-family: var(--font-sans);
}
.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scope-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  background: var(--paper-2);
  font-weight: 500;
}
.scope-tag.risk        { background: var(--danger-soft);  border-color: var(--danger-edge);  color: var(--danger); }
.scope-tag.note        { background: var(--caution-soft); border-color: var(--caution-edge); color: var(--caution); }
.scope-tag.opportunity { background: var(--go-soft);      border-color: var(--go-edge);      color: var(--go); }

/* Historical context — gold-accent italicized card with the AI's reference to past bids */
.history-context-card {
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-top: var(--s-5);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.history-context-card .icon {
  width: 28px; height: 28px;
  background: var(--surface);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold-2);
  flex-shrink: 0;
  border: 1px solid var(--gold-soft);
}
.history-context-card .body { flex: 1; }
.history-context-card h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-3);
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.history-context-card p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

/* Win-probability metric (5th cell in cost band when bid history exists) */
.cost-cell .cost-value.win-conf-high   { color: var(--go); }
.cost-cell .cost-value.win-conf-medium { color: var(--gold-2); }
.cost-cell .cost-value.win-conf-low    { color: var(--ink-3); }

/* =============================================================================
   Heatmap — pipeline view (5×5 grid: value × risk)
   ============================================================================= */
.heatmap-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  margin-bottom: var(--s-6);
}
.heatmap-section h3 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: var(--s-4);
  font-family: var(--font-sans);
}
.heatmap-wrap { display: flex; gap: var(--s-3); align-items: flex-start; }
.heatmap-y { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.hm-y-label {
  font-size: 10px;
  color: var(--ink-3);
  height: 48px;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px;
  width: 64px;
  text-align: right;
  font-weight: 600;
}
.heatmap-inner { flex: 1; }
.hm-row { display: grid; gap: 4px; margin-bottom: 4px; }
.hm-cell {
  height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-2);
  display: flex;
  align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 3px;
  padding: 4px;
}
.hm-x-row { display: grid; gap: 4px; margin-top: 6px; }
.hm-x-label {
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
  font-weight: 600;
}
.hm-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
  color: white;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease);
  border: 1.5px solid white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.hm-dot:hover { transform: scale(1.2); z-index: 2; }
.hm-dot.go      { background: var(--go); }
.hm-dot.caution { background: var(--caution); }
.hm-dot.nogo    { background: var(--danger); }
.hm-dot.pending { background: var(--ink-3); }
.hm-legend {
  display: flex; gap: var(--s-4); flex-wrap: wrap;
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.hm-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.hm-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* =============================================================================
   BID STAGE — SOQ pricing tables, totals bar, contract sections
   ============================================================================= */

.bid-totals-bar {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-2));
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-5);
  box-shadow: var(--shadow-1);
}
.totals-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 0;
}
@media (max-width: 720px) { .totals-row { grid-template-columns: 1fr 1fr; } }
.totals-cell {
  padding: var(--s-4) var(--s-5);
  border-right: 1px solid var(--line);
}
.totals-cell:last-child { border-right: none; }
.totals-cell.highlighted { background: var(--gold-softer); }
.totals-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--s-1);
}
.totals-label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.totals-value {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.2;
}
.totals-value-big { font-size: 30px; }
.totals-progress {
  height: 4px;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: var(--s-2);
}
.totals-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width var(--t-base) var(--ease);
}

/* Contract block */
.bid-contract {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-5);
  overflow: hidden;
}
.bid-contract-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.bid-contract-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
}
.bid-contract-title-input {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: var(--radius);
  flex: 1;
  min-width: 200px;
}
.bid-contract-title-input:focus, .bid-contract-title-input:hover {
  border-color: var(--line-2);
  background: var(--surface);
  outline: none;
}
.bid-contract-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.bid-contract-subtotal {
  display: flex; align-items: center; gap: var(--s-3);
}
.bid-contract-subtotal-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.bid-contract-subtotal-value {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
}

/* SOQ table */
.soq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.soq-table th[title] { cursor: help; }
.soq-table th[title]:hover { color: var(--ink); background: var(--surface-warm); }
.soq-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.soq-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.soq-table tr:hover td { background: var(--surface-warm); }
.soq-table tr:last-child td { border-bottom: none; }
.soq-table tbody tr:nth-child(even) td { background: var(--paper-2); }
.soq-table tbody tr:nth-child(even):hover td { background: var(--surface-warm); }
.soq-table tbody tr.unpriced td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.soq-table tbody tr.unpriced .soq-price-input {
  background: var(--danger-soft);
  border-color: var(--danger-edge);
}

/* Items added or modified by an addendum — gold edge stripe + chip in description.
   Coexists with .unpriced (red stripe wins for first-cell because it's later in
   markup specificity-wise — that's intentional; missing price is more urgent.) */
.soq-table tbody tr.from-addendum td:first-child { box-shadow: inset 3px 0 0 var(--gold-2); }
.soq-table tbody tr.from-addendum.unpriced td:first-child {
  /* When an addendum row is also unpriced, show both stripes side-by-side */
  box-shadow: inset 3px 0 0 var(--danger), inset 6px 0 0 var(--gold-2);
}
.soq-desc-cell { position: relative; }
.addendum-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-2);
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-pill);
  vertical-align: middle;
  cursor: help;
}

.soq-input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  border-radius: var(--radius);
  text-align: right;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.soq-input:hover { border-color: var(--line); }
.soq-input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--gold-softer);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.soq-input-desc { text-align: left; }
.soq-input-cost-code {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.soq-input-cost-code:focus { color: var(--ink); }
.soq-price-input {
  font-weight: 600;
  background: var(--gold-softer);
  border-color: var(--gold-soft);
}
.soq-price-input:hover { border-color: var(--gold); }

.soq-amount {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 12px;
}
.soq-amount.empty { color: var(--ink-3); font-weight: 400; }

/* Price-library hint + outlier flag — shown under the unit-price input */
.soq-price-cell { padding-bottom: 6px; }
.soq-price-extras {
  display: flex; align-items: center; gap: 8px;
  margin-top: 3px; padding: 0 4px;
  font-size: 10px; line-height: 1.2;
}
.soq-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.soq-hint-label { font-weight: 500; }
.soq-hint-apply {
  appearance: none; background: var(--surface-warm); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 1px 5px; cursor: pointer;
}
.soq-hint-apply:hover { background: var(--gold-softer); color: var(--ink); border-color: var(--gold-soft); }
.soq-hint-apply:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.soq-hint-label.soq-hint-won { color: var(--go); font-weight: 600; }
button.soq-hint-count {
  appearance: none; background: transparent; border: 0; padding: 0 2px;
  color: var(--ink-3); font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px;
}
button.soq-hint-count:hover { color: var(--ink); text-decoration-color: var(--gold); }
.soq-hint-count { color: var(--ink-3); font-weight: 500; }
.soq-outlier {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--danger); font-weight: 600;
  background: var(--danger-soft);
  border: 1px solid var(--danger-edge);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.soq-outlier:hover { filter: brightness(1.05); border-color: var(--danger); }
.soq-outlier:focus-visible { outline: 2px solid var(--danger); outline-offset: 1px; }
.soq-price-input.has-outlier {
  border-color: var(--danger);
  background: color-mix(in oklab, var(--danger-soft) 60%, var(--gold-softer));
}
.soq-table tbody tr.price-outlier td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

/* Bid evolution panel — sparkline + start/current/Δ stats */
.bid-evolution {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: var(--s-3) 0 var(--s-5);
  display: flex; flex-direction: column; gap: 8px;
}
.bid-evolution-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.bid-evolution-secondary { padding-top: 6px; border-top: 1px dashed var(--line); }
.bid-evolution-cell { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 240px; }
.bid-evolution-label {
  font-size: 11px; font-weight: 500; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.bid-sparkline { display: block; }
.bid-evolution-meta { display: flex; gap: 18px; }
.bid-evolution-stat { display: flex; flex-direction: column; gap: 2px; }
.bid-evolution-stat-label {
  font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em;
}
.bid-evolution-stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.bid-evolution-delta.up { color: var(--go); }
.bid-evolution-delta.down { color: var(--danger); }
.bid-evolution-delta.flat { color: var(--ink-3); }

/* Addendum AI summary strip */
.addendum-ai-strip {
  display: flex; align-items: center; gap: 12px;
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.addendum-ai-strip-text { flex: 1; font-size: 13px; color: var(--ink-2); min-width: 200px; }
.addendum-ai-strip-text strong { color: var(--ink); font-weight: 600; }
.addendum-ai-ok { color: var(--go) !important; }
.addendum-ai-err { color: var(--danger) !important; }
.key-changes-list {
  margin: 0; padding: 8px 12px;
  list-style: disc inside;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.key-changes-list li { margin: 2px 0; }

/* Excel import — unmatched-rows resolution panel */
.import-unmatched-panel {
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: var(--s-4);
}
.import-unmatched-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.import-unmatched-head strong { color: var(--ink); }
.import-unmatched-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px;
}
.import-unmatched-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--paper-2);
  font-size: 13px;
  flex-wrap: wrap;
}
.import-unmatched-row:last-child { border-bottom: none; }
.import-unmatched-meta { flex: 1; min-width: 200px; }
.import-unmatched-meta strong { color: var(--ink); }
.import-unmatched-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 10px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); flex-wrap: wrap;
}
.import-unmatched-checkall {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.iur-conf { font-weight: 600; padding: 1px 6px; border-radius: var(--radius-sm); }
.iur-conf-good { color: var(--go); background: var(--go-soft); }
.iur-conf-mid  { color: var(--caution); background: var(--caution-soft); }
.iur-conf-low  { color: var(--danger); background: var(--danger-soft); }
.iur-conf-none { color: var(--ink-3); background: var(--paper-2); }

/* =============================================================================
   Bid step nav — explicit Back / Next buttons at the bottom of every bid tab
   ============================================================================= */
.bid-step-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.bid-step-nav > div { min-width: 0; }
.bid-step-nav > div:nth-child(2) { text-align: center; flex: 1; }

.icon-btn-danger {
  width: 24px; height: 24px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-edge); }

/* =============================================================================
   Excel import — column picker + dry-run preview modals
   ============================================================================= */
.import-preview-table-wrap {
  margin-top: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow: auto;
  background: var(--surface);
}
.import-preview-table { font-size: 11px; }
.import-preview-table td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.import-preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.import-preview-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-3);
  background: var(--paper-2);
  text-align: center;
}
.import-preview-stat.ok { background: var(--go-soft); border-color: var(--go-edge); }
.import-preview-stat.warn { background: var(--caution-soft); border-color: var(--caution-edge); }
.import-preview-stat.caution { background: var(--info-soft); border-color: var(--info-edge); }
.import-preview-num { font-family: var(--font-serif); font-size: 28px; line-height: 1; color: var(--ink); }
.import-preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; margin-top: 6px; }

.import-preview-list {
  margin-top: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-height: 220px; overflow-y: auto;
  background: var(--surface);
}
.import-preview-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 8px; font-size: 12px;
  border-bottom: 1px solid var(--paper-2);
}
.import-preview-row:last-child { border-bottom: none; }
.import-preview-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =============================================================================
   Re-extract diff panel — shown above the SOQ once the new extraction lands
   ============================================================================= */
.extract-diff-panel {
  background: var(--info-soft, var(--paper-2));
  border: 1px solid var(--info-edge, var(--line));
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: var(--s-4);
}
.extract-diff-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.extract-diff-head strong { color: var(--ink); }
.extract-diff-section {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.extract-diff-section-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; margin-bottom: 6px;
}
.extract-diff-section.added .extract-diff-section-head    { color: var(--go); }
.extract-diff-section.removed .extract-diff-section-head  { color: var(--danger); }
.extract-diff-section.changed .extract-diff-section-head  { color: var(--caution); }
.extract-diff-list { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.extract-diff-list li { padding: 3px 0; }

/* =============================================================================
   Dashboard action queue — "needs attention" rows above the recents list
   ============================================================================= */
.action-queue {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: var(--s-4);
}
.action-queue-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-4); padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.action-queue-row:last-child { border-bottom: none; }
.action-queue-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ink-4);
}
.action-queue-row.warn::before   { background: var(--caution); }
.action-queue-row.urgent::before { background: var(--danger); }
.action-queue-meta { flex: 1; min-width: 0; }
.action-queue-name { font-weight: 600; color: var(--ink); }
.action-queue-detail { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* =============================================================================
   Pursuits list — filter chips
   ============================================================================= */
.pursuit-filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: var(--s-4) 0 var(--s-3);
}
.pursuit-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-pill); color: var(--ink-2);
  cursor: pointer; font-family: inherit;
}
.pursuit-filter-chip:hover { background: var(--paper-2); color: var(--ink); }
.pursuit-filter-chip.active {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.pursuit-filter-chip-count {
  font-size: 11px; padding: 1px 6px; border-radius: var(--radius-pill);
  background: var(--paper-2); color: var(--ink-3); font-weight: 600;
}
.pursuit-filter-chip.active .pursuit-filter-chip-count {
  background: rgba(255,255,255,0.15); color: var(--paper);
}
.pursuit-filter-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.req { color: var(--danger); }

/* =============================================================================
   Save indicator — shown next to bid stage header to confirm autosave state
   ============================================================================= */
.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: opacity var(--t-base) var(--ease);
}
.save-indicator .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
}
.save-indicator.saving { color: var(--caution); background: var(--caution-soft); border-color: var(--caution-edge); }
.save-indicator.saving .dot { background: var(--caution); animation: pulse 1.2s ease-in-out infinite; }
.save-indicator.saved  { color: var(--go); background: var(--go-soft); border-color: var(--go-edge); }
.save-indicator.saved  .dot { background: var(--go); }
.save-indicator.error  { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-edge); }
.save-indicator.error  .dot { background: var(--danger); }

/* Heatmap dots — keyboard a11y */
.hm-dot { all: unset; }
.hm-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
  color: white;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease);
  border: 1.5px solid white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.hm-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  transform: scale(1.2);
}

/* Addenda list — replaces inline grid-template-columns. Selector specificity
   bumped (.list-row.addenda-row) so it wins over the .list-row default
   defined in app.html's inline <style>. */
.list-row.addenda-row {
  grid-template-columns: 80px 110px 1fr 110px 120px 60px;
}

/* Verification "ready" empty state on review page */
.verification-ok {
  background: var(--go-soft);
  border: 1px solid var(--go-edge);
  color: var(--go);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Checklist row — used on bid review */
.checklist-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 0;
}
.checklist-mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.checklist-mark.ok { background: var(--go-soft); color: var(--go); }
.checklist-mark.no { background: var(--paper-2); color: var(--ink-3); }
.checklist-fix-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--gold-2);
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
}
.checklist-fix-link:hover { color: var(--gold-3); text-decoration: underline; }

/* =============================================================================
   APP SHELL — top bar + left rail + content
   The rail is the estimating hub's primary nav surface. Brand stays in the
   top bar for continuity; closing-day alarm sits in the top bar so it is
   visible from every page. The rail's lower half is a permanent "closing
   this week" panel — closing-day organization is the user's primary lens.
   ============================================================================= */
:root {
  --topbar-h: 48px;
  --rail-w:   240px;
  --rail-w-collapsed: 64px;
}

.app-shell-grid {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-columns: var(--rail-w) 1fr;
  grid-template-areas:
    "topbar topbar"
    "rail   content";
}
@media (max-width: 760px) {
  .app-shell-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "content";
  }
  .app-rail { display: none; }   /* mobile rail: nav collapses into topbar links — TODO future */
}

/* ---------- Top bar (slim, brand + global state) ---------- */
.topbar {
  grid-area: topbar;
  height: var(--topbar-h);
  background: rgba(248, 247, 243, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 var(--s-5);
  gap: var(--s-4);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-brand {
  display: flex; align-items: baseline; gap: var(--s-3);
  color: var(--ink); text-decoration: none;
}
.topbar-brand-cella {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.topbar-brand-sep {
  width: 1px; height: 16px;
  background: var(--line-2);
  display: inline-block;
}
.topbar-brand-product {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 0.02em;
}
.topbar-spacer { flex: 1; }

/* Closing-today alarm chip — the unmissable surface. Pulsing dot when count > 0. */
.topbar-alarm {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
}
.topbar-alarm:hover { border-color: var(--ink-3); color: var(--ink); }
.topbar-alarm-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}
.topbar-alarm.urgent {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(168, 50, 50, 0.12);
  animation: alarm-pulse 2.4s ease-in-out infinite;
}
.topbar-alarm.urgent .topbar-alarm-dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
}
.topbar-alarm.warn {
  background: var(--caution-soft);
  color: var(--caution);
  border-color: var(--caution-edge);
}
.topbar-alarm.warn .topbar-alarm-dot { background: var(--caution); }
@keyframes alarm-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(168, 50, 50, 0.12); }
  50%      { box-shadow: 0 0 0 8px rgba(168, 50, 50, 0.18); }
}

.topbar-account {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 4px 4px 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2);
  cursor: pointer;
  position: relative;
}
.topbar-account-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #fff; display: grid; place-items: center;
  font-size: 10px; font-weight: 600;
}
.topbar-account-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  min-width: 200px; padding: 6px; display: none;
  z-index: 100;
}
.topbar-account-menu.open { display: block; }
.topbar-account-menu a, .topbar-account-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; background: transparent; border: 0;
  border-radius: var(--radius); font: inherit; color: var(--ink);
  font-size: 14px; cursor: pointer;
}
.topbar-account-menu a:hover, .topbar-account-menu button:hover { background: var(--paper-2); }

/* ---------- Left rail (primary nav + ops panel) ---------- */
.app-rail {
  grid-area: rail;
  background: var(--surface-warm);
  border-right: 1px solid var(--line);
  padding: var(--s-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.rail-cta {
  margin: 0 var(--s-3) var(--s-2);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.rail-cta:hover { background: var(--gold-3); }
.rail-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.rail-nav {
  display: flex; flex-direction: column;
  padding: 0 var(--s-2);
  gap: 2px;
}
.rail-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
  width: 100%;
}
.rail-link:hover { background: var(--paper-2); color: var(--ink); }
.rail-link.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-weight: 600;
}
.rail-link-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--ink-3);
}
.rail-link.active .rail-link-icon { color: var(--gold-2); }
.rail-link-label { flex: 1; }
.rail-link-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-3);
  font-weight: 600;
}
.rail-link.active .rail-link-badge { background: var(--gold-softer); color: var(--gold-3); }
.rail-link-badge.urgent { background: var(--danger); color: #fff; }

.rail-divider {
  height: 1px;
  background: var(--line);
  margin: var(--s-2) var(--s-4);
}

.rail-section-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  padding: 0 var(--s-5);
  margin-bottom: var(--s-2);
  display: flex; align-items: center; justify-content: space-between;
}
.rail-section-label-count {
  font-weight: 600;
  color: var(--ink-4);
  letter-spacing: 0;
}

.ops-panel {
  display: flex; flex-direction: column;
  padding: 0 var(--s-3);
  gap: 4px;
}
.ops-panel-empty {
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 var(--s-2) var(--s-2);
  font-style: italic;
}
.ops-row {
  display: flex; align-items: stretch; gap: 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ops-row:hover { border-color: var(--line-3); transform: translateX(2px); }
.ops-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ink-4);
}
.ops-row.urgent::before { background: var(--danger); }
.ops-row.warn::before   { background: var(--caution); }
.ops-row-body { flex: 1; min-width: 0; }
.ops-row-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-row-meta {
  font-size: 11px; color: var(--ink-3);
  margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.ops-row-countdown {
  font-family: var(--font-mono);
  font-weight: 600;
}
.ops-row.urgent .ops-row-countdown { color: var(--danger); }
.ops-row.warn   .ops-row-countdown { color: var(--caution); }

/* ---------- Page container in new shell ---------- */
.app-main {
  grid-area: content;
  padding: var(--s-8) var(--s-6) var(--s-16);
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

/* =============================================================================
   TODAY ROUTE — Focus card + tiered action queue
   ============================================================================= */
.today-greeting {
  display: flex; align-items: baseline; gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.today-greeting-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.1;
  color: var(--ink);
}
.today-greeting-date {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

/* The single highest-urgency item — hero card, gold edge, big number */
.today-focus {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
  padding: var(--s-6) var(--s-7);
  margin-bottom: var(--s-8);
  position: relative;
  overflow: hidden;
}
.today-focus::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}
.today-focus.urgent::before {
  background: linear-gradient(180deg, var(--danger), #872929);
}
.today-focus.warn::before {
  background: linear-gradient(180deg, var(--caution), #8e5916);
}
.today-focus-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.today-focus.urgent .today-focus-eyebrow { color: var(--danger); }
.today-focus.warn   .today-focus-eyebrow { color: var(--caution); }
.today-focus-title {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: var(--s-3);
  max-width: 30ch;
}
.today-focus-meta {
  display: flex; flex-wrap: wrap;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.today-focus-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.today-focus-stat-value {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.today-focus-stat-value.danger { color: var(--danger); }
.today-focus-stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.today-focus-actions {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
}

/* Action queue urgency tiers — bigger, scaled treatment */
.action-queue-row.tiered {
  padding: var(--s-5);
}
.action-queue-row.tiered.urgent {
  background: var(--danger-soft);
  border-color: var(--danger-edge);
}
.action-queue-row.tiered.urgent .action-queue-name { color: var(--danger); }
.action-queue-row.tiered.warn {
  background: var(--caution-soft);
  border-color: var(--caution-edge);
}
.action-queue-row.tiered.warn .action-queue-name { color: var(--caution); }
.action-queue-row.tiered .action-queue-detail { font-size: 13px; }
.action-queue-row-tier-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink-3);
}
.action-queue-row.tiered.urgent .action-queue-row-tier-label { color: var(--danger); }
.action-queue-row.tiered.warn   .action-queue-row-tier-label { color: var(--caution); }

/* =============================================================================
   CLOSING-DAY MODE — sticky bid-stage banner + big checklist hero
   ============================================================================= */
.closing-strip {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 12px var(--s-5);
  background: linear-gradient(90deg, var(--danger), #872929);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-5);
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 20;
  box-shadow: 0 6px 16px rgba(168, 50, 50, 0.20);
  flex-wrap: wrap;
}
.closing-strip-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  flex-shrink: 0;
}
.closing-strip-text { flex: 1; min-width: 200px; }
.closing-strip-title {
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
}
.closing-strip-meta {
  font-size: 12px; opacity: 0.88;
  margin-top: 2px;
}
.closing-strip-countdown {
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(255,255,255,0.18);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.closing-strip-actions { display: flex; gap: 8px; }
.closing-strip-btn {
  background: #fff;
  color: var(--danger);
  border: 0;
  border-radius: var(--radius);
  padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.closing-strip-btn:hover { background: var(--paper); }
.closing-strip.warn {
  background: linear-gradient(90deg, var(--caution), #8e5916);
}
.closing-strip.warn .closing-strip-btn { color: var(--caution); }

/* Bid stage right-column total block — replaces a wad of inline styles in app-views.js */
.bid-total-block {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.bid-total-block-label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.bid-total-block-value {
  font-family: var(--font-serif);
  font-size: 32px; line-height: 1;
  color: var(--ink);
}
.bid-total-block-sub {
  font-size: 12px; color: var(--ink-3);
}
.bid-total-block-save { margin-top: 6px; }

/* Big pre-submission checklist hero on Review tab */
.checklist-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--s-6) var(--s-7);
  margin-bottom: var(--s-5);
  display: flex;
  gap: var(--s-7);
  align-items: center;
  flex-wrap: wrap;
}
.checklist-hero.complete {
  border-color: var(--go-edge);
  background: linear-gradient(135deg, var(--surface) 60%, var(--go-soft));
}
.checklist-hero.blocked {
  border-color: var(--caution-edge);
  background: linear-gradient(135deg, var(--surface) 60%, var(--caution-soft));
}
.checklist-ring {
  width: 96px; height: 96px;
  flex-shrink: 0;
  position: relative;
  display: grid; place-items: center;
}
.checklist-ring svg { transform: rotate(-90deg); }
.checklist-ring-bg { stroke: var(--paper-2); }
.checklist-ring-fill {
  fill: none; stroke-linecap: round;
  transition: stroke-dasharray var(--t-slow) var(--ease);
}
.checklist-hero.complete .checklist-ring-fill { stroke: var(--go); }
.checklist-hero.blocked  .checklist-ring-fill { stroke: var(--caution); }
.checklist-ring-num {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--ink);
}
.checklist-ring-num small {
  font-size: 14px; color: var(--ink-3);
}
.checklist-hero-body { flex: 1; min-width: 220px; }
.checklist-hero-eyebrow {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.checklist-hero.complete .checklist-hero-eyebrow { color: var(--go); }
.checklist-hero.blocked  .checklist-hero-eyebrow { color: var(--caution); }
.checklist-hero-title {
  font-family: var(--font-serif);
  font-size: 28px; line-height: 1.15;
  margin-bottom: var(--s-2);
}
.checklist-hero-sub {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.checklist-hero-list {
  margin-top: var(--s-4);
  display: flex; flex-direction: column; gap: 2px;
}

/* =============================================================================
   VERDICT SCREEN — section eyebrow rhythm
   ============================================================================= */
.verdict-section-eyebrow {
  display: flex; align-items: baseline; gap: var(--s-3);
  margin-top: var(--s-12);
  margin-bottom: var(--s-3);
}
.verdict-section-eyebrow-num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold-2);
  line-height: 1;
}
.verdict-section-eyebrow-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.verdict-section-eyebrow-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Outcome dropdown — collapses 4 buttons (won/lost/no_bid/withdrawn) into one menu */
.outcome-dropdown {
  position: relative;
  display: inline-block;
}
.outcome-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  min-width: 180px; padding: 6px; display: none;
  z-index: 30;
}
.outcome-menu.open { display: block; }
.outcome-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 8px 12px; background: transparent; border: 0;
  border-radius: var(--radius); font: inherit; color: var(--ink);
  font-size: 14px; cursor: pointer;
}
.outcome-menu-item:hover { background: var(--paper-2); }
.outcome-menu-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.outcome-menu-dot.won { background: var(--go); }
.outcome-menu-dot.lost { background: var(--danger); }
.outcome-menu-dot.no_bid { background: var(--ink-3); }
.outcome-menu-dot.withdrawn { background: var(--caution); }

/* Overflow trigger — small icon-only button for "⋯" menus */
.btn.btn-icon {
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
  min-width: 0;
}

/* Destructive menu item inside an .outcome-menu */
.outcome-menu-item.menu-item-danger { color: var(--danger); }
.outcome-menu-item.menu-item-danger:hover { background: var(--danger-soft); }

/* Pricing-request composer — sub picker + scope panel */
.modal.modal-lg { max-width: 720px; }
.pr-section-h {
  font-family: var(--font-serif);
  font-size: 16px;
  margin: 0 0 var(--s-2) 0;
  color: var(--ink);
}
.pr-sub-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: var(--s-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.pr-sub-row:last-child { border-bottom: 0; }
.pr-sub-row:hover { background: var(--paper-2); }
.pr-sub-row input[type="checkbox"] { margin: 0; }
.pr-sub-name { font-weight: 500; color: var(--ink); }
.pr-sub-meta { font-size: 12px; color: var(--ink-3); text-align: right; }

/* =============================================================================
   Sub Quotes (Slice C v2) — sub-organized hub: requests sent, quotes received
   ============================================================================= */

/* Coverage card — who hasn't replied. Reuses caution colors when there are
   gaps; flips to "go" colors when fully covered. */
.coverage-gap-card {
  background: var(--caution-soft);
  border: 1px solid var(--caution-edge);
  border-left: 3px solid var(--caution);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
}
.coverage-gap-card-go {
  background: var(--go-soft);
  border-color: var(--go-edge);
  border-left-color: var(--go);
}
.coverage-gap-head { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.coverage-gap-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  font-size: 13px;
}
.coverage-gap-list li::before { content: "•"; color: var(--caution); margin-right: 6px; }
.coverage-gap-card-go .coverage-gap-list li::before { color: var(--go); }

.rollup-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  border: 1px solid;
}
.rollup-badge-selected { color: var(--gold-3); background: var(--gold-softer); border-color: var(--gold-soft); }

/* Sent-requests panel — collapsible, shows what's been emailed out */
.sent-requests-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s-4);
}
.sent-requests-summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  border-radius: var(--radius-lg);
  user-select: none;
}
.sent-requests-summary::-webkit-details-marker { display: none; }
.sent-requests-summary:hover { background: var(--surface-hover); }
.sent-requests-title { font-weight: 600; color: var(--ink); }
.sent-requests-list {
  border-top: 1px solid var(--line);
  padding: var(--s-2) var(--s-4) var(--s-3);
}
.sent-request-row {
  padding: var(--s-3) 0;
  border-bottom: 1px dashed var(--line);
}
.sent-request-row:last-child { border-bottom: 0; }
.sent-request-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
  font-size: 12px; margin-bottom: 4px;
}
.sent-request-scope { font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.sent-request-recipients { font-size: 12px; color: var(--ink-2); }
.sent-request-recipient-chips {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.sent-recipient-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
}
.sent-recipient-chip-replied {
  background: var(--go-soft);
  border-color: var(--go-edge);
  color: var(--go);
  font-weight: 600;
}
.sent-recipient-chip-failed {
  background: var(--danger-soft);
  border-color: var(--danger-edge);
  color: var(--danger);
}

/* Quote inbox — sub-grouped cards */
.quote-inbox {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.quote-sub-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.quote-sub-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-warm);
  border-bottom: 1px solid var(--line);
}
.quote-sub-name {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
}
.quote-sub-meta { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: var(--s-2); }

.quote-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-3);
  padding: var(--s-3);
}
.quote-card {
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-3);
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.quote-card:hover {
  border-color: var(--gold-soft);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.quote-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.quote-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-2);
}
.quote-card-scope {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  flex: 1;
}
.quote-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 12px;
  flex-wrap: wrap;
}
.quote-card-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.quote-card-attach {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-3);
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-pill);
  padding: 0 8px;
}
.quote-card-source {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-pill);
  padding: 0 8px;
  letter-spacing: 0.02em;
}
.quote-card-notes {
  font-size: 12px;
  color: var(--ink-2);
  font-style: italic;
  border-top: 1px dashed var(--line);
  padding-top: var(--s-2);
}

/* =============================================================================
   Utilities
   ============================================================================= */
.muted { color: var(--ink-2); }
.fade  { color: var(--ink-3); }
.serif { font-family: var(--font-serif); }
.mono  { font-family: var(--font-mono); }
.center{ text-align: center; }
.row   { display: flex; align-items: center; gap: var(--s-3); }
.col   { display: flex; flex-direction: column; }
.grow  { flex: 1; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }

/* =============================================================================
   v2 DESIGN SYSTEM (Pass 7) — bid-day instrument, not SaaS dashboard
   - New siren palette for closing-today alarm (distinct from --danger)
   - --grid-line for hairline rules in dense ledger tables
   - Mono+tabular numbers via .tabular utility
   - Ledger / queue / list-table / focus-card / section-band patterns
   - Reusable across Today, Pursuits, Verdict, Form of Tender, and beyond
   ============================================================================= */

:root {
  /* New layout constants (additive — existing --header-h kept) */
  --rail-width:    236px;
  --topbar-height: 52px;

  /* Hairline grid line for dense tables (between --line and transparent) */
  --grid-line: #ede4cb;

  /* Siren — closing-today alarm. Brighter and more urgent than --danger.
     Use ONLY on closing-day surfaces (alarm strips, today's countdown,
     "blocking" checklist rows). Don't use it for ordinary errors. */
  --siren:      #c93a2c;
  --siren-edge: #e88c7d;
  --siren-soft: #f6dbd2;
  --siren-deep: #8a2316;
  --shadow-siren: 0 0 0 1px var(--siren), 0 0 0 4px var(--siren-soft);

  /* Info edge — paired with existing --info / --info-soft for chip borders */
  --info-edge: #b8c5d3;
}

/* Tabular figures — apply to any cell that's a numeric ledger column. */
.tabular { font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums; }

/* =============================================================================
   v2 — Topbar alarm pulse + brand
   ============================================================================= */
.topbar-alarm.urgent {
  background: var(--siren-soft);
  border-color: var(--siren-edge);
  color: var(--siren-deep);
  animation: alarm-pulse 1.6s ease-in-out infinite;
}
@keyframes alarm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--siren-soft); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

/* =============================================================================
   v2 — Page head (eyebrow + serif title + actions row)
   Used at the top of Pursuits, Library, Settings, etc.
   ============================================================================= */
.page-head-v2 {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line-2);
  margin-bottom: var(--s-6);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.page-head-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.page-head-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
  margin: 0;
}
.page-head-actions { display: flex; gap: var(--s-2); }

/* =============================================================================
   v2 — Section band (eyebrow with leader rule + serif title)
   "01 · Cost intelligence" pattern. For sectioning long pages.
   ============================================================================= */
.section-band-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.section-band-eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink-4);
}
.section-band-title {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 var(--s-4);
}

/* =============================================================================
   v2 — Stat strip / ledger cells (4-5 numeric tiles in one bordered row)
   Used in Pursuits stat strip and Today pipeline ledger.
   ============================================================================= */
.ledger-strip {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-feature-settings: 'tnum' 1;
  margin-bottom: var(--s-5);
}
.ledger-cell {
  padding: var(--s-4) var(--s-5);
  border-right: 1px solid var(--line);
}
.ledger-cell:last-child { border-right: 0; }
.ledger-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.ledger-num-lg { font-size: 26px; }
.ledger-num.go     { color: var(--go); }
.ledger-num.urgent { color: var(--siren); }
.ledger-num.danger { color: var(--danger); }
.ledger-num.muted  { color: var(--ink-3); }
.ledger-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 6px;
}
.ledger-sub {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}
.ledger-cell.highlighted { background: var(--gold-softer); }
.ledger-cell.highlighted .ledger-label { color: var(--gold-3); }
.ledger-cell.highlighted .ledger-num   { color: var(--gold-3); font-weight: 600; }

/* =============================================================================
   v2 — Filter chips (pill nav with counts)
   ============================================================================= */
.filter-row {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  padding: 10px 0;
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--grid-line);
}
.filter-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t-fast) var(--ease);
}
.filter-chip:hover { background: var(--paper-2); }
.filter-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 600;
}
.filter-chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.filter-chip.active .filter-chip-count { color: rgba(255, 255, 255, 0.65); }
.filter-spacer { flex: 1; }
.filter-toggle {
  background: transparent;
  border: 1px solid var(--line-2);
  padding: 5px 11px;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.filter-toggle.active { background: var(--paper-2); }

.pursuit-search {
  appearance: none;
  height: 32px;
  min-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.pursuit-search:hover { background: var(--paper-2); }
.pursuit-search:focus { outline: none; border-color: var(--gold); background: var(--surface); box-shadow: 0 0 0 3px var(--gold-softer); }
.pursuit-search::placeholder { color: var(--ink-3); }

/* =============================================================================
   v2 — Ledger table (the "list-table" pattern from pursuits.html)
   Used for Pursuits list, Today queue, Sub Quotes received list.
   ============================================================================= */
.list-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-table {
  width: 100%;
  border-collapse: collapse;
  font-feature-settings: 'tnum' 1;
}
/* Pursuits ledger — auto layout with min-widths on data cells.
   Plain default table-layout: cells size to fit content but never shrink below
   the per-column min-width. Pursuit-name column expands to fill remaining
   space; long names truncate via cell-name's max-width + ellipsis. */
/* CSS-Grid pursuits list — every row (header + body) shares the same
   grid-template-columns via .pursuits-row, so columns physically cannot
   drift between header and body. Replaces the table-based layout that kept
   producing alignment drift between thead/tbody. */
.pursuits-grid { display: block; }
.pursuits-row {
  display: grid;
  /* rail | name | closes | value | risk | verdict | stage | outcome */
  grid-template-columns: 4px minmax(220px, 1fr) 132px 120px 120px 110px 160px 120px;
  align-items: center;
  border-bottom: 1px solid var(--grid-line);
}
.pursuits-row:last-child { border-bottom: 0; }
.pursuits-cell {
  padding: 12px 16px;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pursuits-cell:first-child { padding: 0; }

/* Header row */
.pursuits-row-head {
  background: var(--paper-2);
  border-bottom: 2px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pursuits-row-head .pursuits-cell { padding: 14px 16px; }
.pursuits-row-head .pursuits-cell:first-child { padding: 0; }

/* Body rows */
.pursuits-row-body {
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.pursuits-row-body:hover { background: var(--paper-2); }
.pursuits-row-body:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Tier stripe — paints the first cell of each body row */
.pursuits-row-body .pursuits-cell-rail { background: var(--ink-4); align-self: stretch; }
.pursuits-row-body.tier-urgent .pursuits-cell-rail { background: var(--siren); }
.pursuits-row-body.tier-warn   .pursuits-cell-rail { background: var(--caution); }
.pursuits-row-body.tier-ok     .pursuits-cell-rail { background: var(--go); }
.pursuits-row-body.tier-nogo   .pursuits-cell-rail { background: var(--danger); }
.pursuits-row-body.tier-muted  .pursuits-cell-rail { background: transparent; }

/* Pursuit-name cell */
.pursuits-cell-name { overflow: hidden; }
.pursuits-cell-name .cell-name {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pursuits-cell-name .cell-name-sub {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}

/* Risk cell */
.pursuits-row .cell-risk { display: flex; align-items: center; gap: 6px; }
.pursuits-row .cell-risk .risk-bar { margin-right: 0; flex-shrink: 0; }

.lib-file-preview { margin-top: 6px; min-height: 1em; }
.lib-file-preview-ok { display: inline-block; font-size: 12px; color: var(--go); padding: 4px 8px; background: var(--go-soft); border-radius: var(--radius-sm); }
.list-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px var(--s-4);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-2);
  user-select: none;
}
.list-table th.sortable { cursor: pointer; }
.list-table th.sortable:hover { color: var(--ink); }
.list-table th.sorted { color: var(--ink); }
.list-table th .sort-arrow { font-size: 9px; margin-left: 3px; color: var(--gold-2); }
.list-table td {
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--grid-line);
  font-size: 14px;
  vertical-align: middle;
}
.list-table tr.row { cursor: pointer; transition: background var(--t-fast) var(--ease); }
.list-table tr.row:hover td:not(:first-child) { background: var(--paper-2); }
.list-table tr.row:last-child td { border-bottom: 0; }
.list-table tr.row td:first-child { padding-left: 0; padding-right: 0; width: 4px; }

/* Tier rail — left-edge colored bar communicates urgency without chips */
.tier-rail {
  display: block;
  width: 4px;
  height: 38px;
  background: var(--ink-4);
}
.tier-rail.urgent { background: var(--siren); }
.tier-rail.warn   { background: var(--caution); }
.tier-rail.ok     { background: var(--go); }
.tier-rail.nogo   { background: var(--danger); }
.tier-rail.muted  { background: transparent; }

/* Cell helpers */
.cell-name { font-weight: 600; color: var(--ink); }
.cell-name-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.cell-mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }
.cell-mono.urgent { color: var(--siren); font-weight: 600; }
.cell-mono.warn   { color: var(--caution); font-weight: 600; }
.cell-mono.muted  { color: var(--ink-3); }

/* Verdict text (vs chip) — for in-table verdict columns */
.verdict-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.verdict-text.go      { color: var(--go); }
.verdict-text.caution { color: var(--caution); }
.verdict-text.nogo    { color: var(--danger); }
.verdict-text.pending { color: var(--ink-3); font-weight: 500; }

/* Risk bar — inline mini-bar in list rows */
.risk-bar {
  width: 56px;
  height: 5px;
  background: var(--paper-3);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.risk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--go), var(--caution) 60%, var(--danger));
}

/* Outcome cell */
.outcome-cell {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.outcome-cell.won  { color: var(--go); }
.outcome-cell.lost { color: var(--danger); }
.outcome-cell.no-bid, .outcome-cell.withdrawn { color: var(--ink-3); }

/* =============================================================================
   v2 — Closing-day ticker (full-bleed alarm strip on Today)
   ============================================================================= */
.closing-ticker {
  background: var(--siren-deep);
  color: white;
  padding: 12px var(--s-8);
  display: flex;
  align-items: center;
  gap: var(--s-6);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--s-7);
  border-radius: var(--radius);
}
.closing-ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg,
    transparent 0 12px,
    rgba(255, 255, 255, 0.04) 12px 14px);
  pointer-events: none;
}
.closing-ticker-label {
  background: white;
  color: var(--siren-deep);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  flex-shrink: 0;
  z-index: 1;
}
.closing-ticker-items { display: flex; gap: var(--s-6); flex-wrap: wrap; flex: 1; z-index: 1; }
.closing-ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
}
.closing-ticker-item:hover .closing-ticker-name { text-decoration: underline; }
.closing-ticker-time { font-weight: 700; color: white; }
.closing-ticker-name {
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}
.closing-ticker-meta { color: rgba(255, 255, 255, 0.65); font-size: 11px; }

/* =============================================================================
   v2 — Today greeting ledger (date + 4 stats, all in one row)
   ============================================================================= */
.today-ledger {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: var(--s-7);
  align-items: end;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line-2);
  margin-bottom: var(--s-7);
}
.today-ledger-date {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.today-ledger-day {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}
.today-ledger-stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.today-ledger-num {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.today-ledger-num.urgent { color: var(--siren); }
.today-ledger-num.go     { color: var(--go); }
.today-ledger-num.muted  { color: var(--ink-3); }
.today-ledger-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =============================================================================
   v2 — Focus checklist (Today's hero card)
   ============================================================================= */
.focus-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--s-10);
}
.focus-card.urgent { border-color: var(--siren); box-shadow: 0 0 0 3px var(--siren-soft); }
.focus-card-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 6px var(--s-6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.focus-card.urgent .focus-card-strip { background: var(--siren-deep); }
.focus-card-body { padding: var(--s-6) var(--s-8) var(--s-8); }
.focus-card-name {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.05;
  max-width: 28ch;
  margin: 0 0 4px;
}
.focus-card-sub { color: var(--ink-3); font-size: 13px; margin-bottom: var(--s-5); }
.focus-card-sub strong { color: var(--ink); font-weight: 600; }
.focus-card-checklist {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: var(--s-2) 0 var(--s-5);
}
.fc-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: var(--s-4);
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--grid-line);
  font-size: 14px;
}
.fc-row:last-child { border-bottom: 0; }
.fc-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  color: white;
}
.fc-row.done .fc-check { background: var(--go); border-color: var(--go); }
.fc-row.done .fc-label {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.fc-row.blocking .fc-check { border-color: var(--siren); }
.fc-row.warn .fc-check     { border-color: var(--caution); }
.fc-label { font-weight: 500; }
.fc-detail {
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--font-mono);
}
.fc-detail.urgent { color: var(--siren); font-weight: 600; }
.fc-jump {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.fc-jump:hover { background: var(--paper-2); }
.focus-card-actions { display: flex; gap: var(--s-2); align-items: center; }
.focus-card-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.focus-card.urgent .focus-card-resume { background: var(--siren); }
.focus-card-resume:hover { background: var(--gold-3); }
.focus-card.urgent .focus-card-resume:hover { background: var(--siren-deep); }

/* =============================================================================
   v2 — Queue table (Today's "Also on your list")
   Variant of list-table with progress bar inline
   ============================================================================= */
.queue-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-3);
}
.queue-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}
.queue-title { font-family: var(--font-serif); font-size: 22px; margin: 0; }
.queue-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  border-collapse: collapse;
  overflow: hidden;
  margin-bottom: var(--s-10);
}
.queue-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--line-2);
  background: var(--paper-2);
}
.queue-table td {
  padding: 12px var(--s-4);
  border-bottom: 1px solid var(--grid-line);
  font-size: 14px;
  vertical-align: middle;
}
.queue-table tr:last-child td { border-bottom: 0; }
.queue-table tbody tr { cursor: pointer; }
.queue-table tbody tr:hover td { background: var(--paper-2); }
.qt-name { font-weight: 600; color: var(--ink); }
.qt-name-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.qt-tier {
  display: inline-block;
  width: 4px;
  height: 32px;
  border-radius: 2px;
  vertical-align: middle;
  background: var(--ink-4);
}
.qt-tier.urgent { background: var(--siren); }
.qt-tier.warn   { background: var(--caution); }
.qt-tier.ok     { background: var(--go); }
.qt-num { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }
.qt-num.urgent { color: var(--siren); font-weight: 600; }
.qt-num.warn   { color: var(--caution); font-weight: 600; }
.qt-num.muted  { color: var(--ink-3); }
.qt-progress { display: inline-flex; align-items: center; gap: 8px; }
.qt-progress-bar {
  width: 80px;
  height: 6px;
  border-radius: 3px;
  background: var(--paper-3);
  overflow: hidden;
}
.qt-progress-fill { height: 100%; background: var(--gold); }
.qt-progress-fill.full { background: var(--go); }
.qt-cta { color: var(--gold-3); font-weight: 600; font-size: 12px; }

/* =============================================================================
   v2 — Pipeline ledger (Today's bottom band) - reuses .ledger-strip
   With sparkline support
   ============================================================================= */
.pl-spark {
  display: flex;
  gap: 2px;
  align-items: end;
  height: 24px;
  margin-top: 8px;
}
.pl-spark-bar { width: 4px; background: var(--gold-soft); border-radius: 1px; }
.pl-spark-bar.win  { background: var(--go); }
.pl-spark-bar.loss { background: var(--danger-soft); }

/* =============================================================================
   v2 — Verdict screen patterns
   ============================================================================= */
.crumbs-v2 {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: var(--s-4);
  font-family: var(--font-mono);
}
.crumbs-v2 button, .crumbs-v2 a {
  background: none;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.crumbs-v2 button:hover, .crumbs-v2 a:hover { color: var(--ink); }
.crumbs-v2-sep { color: var(--ink-4); }

.proj-head-v2 { padding-bottom: var(--s-5); border-bottom: 1px solid var(--line-2); margin-bottom: var(--s-6); }
.proj-eyebrow-v2 {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.proj-eyebrow-v2 strong { color: var(--gold-3); }
.proj-title-v2 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.05;
  max-width: 26ch;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
}
.proj-meta-v2 {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}
.proj-meta-v2-item { display: flex; gap: 6px; }
.proj-meta-v2-label {
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.proj-deadline-v2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--caution-soft);
  color: var(--caution);
  border: 1px solid var(--caution-edge);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}
.proj-deadline-v2.urgent {
  background: var(--siren-soft);
  color: var(--siren-deep);
  border-color: var(--siren-edge);
}

/* AI banner — ledger-style row showing AI's effort */
.ai-banner-v2 {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: 10px var(--s-5);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  margin-bottom: var(--s-6);
  font-size: 13px;
  flex-wrap: wrap;
}
.ai-banner-v2-text { flex: 1; color: var(--ink-2); min-width: 300px; }
.ai-banner-v2-text strong { color: var(--ink); }
.ai-banner-v2-stats { display: flex; gap: var(--s-5); font-family: var(--font-mono); }
.ai-banner-v2-stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.ai-banner-v2-num { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1; }
.ai-banner-v2-lab { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* Verdict row — three big numbers, no boxes */
.verdict-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-10);
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: var(--s-7);
}
.vr-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.vr-verdict {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.vr-verdict.go      { color: var(--go); }
.vr-verdict.caution { color: var(--caution); }
.vr-verdict.nogo    { color: var(--danger); }
.vr-verdict-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in oklab, currentColor 18%, transparent);
}
.vr-summary {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 44ch;
  line-height: 1.55;
  margin-top: var(--s-4);
}
.vr-num-row { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.vr-num {
  font-family: var(--font-serif);
  font-size: 56px;
  letter-spacing: -0.02em;
}
.vr-denom { font-family: var(--font-serif); font-size: 22px; color: var(--ink-3); }
.vr-bar {
  width: 100%;
  height: 6px;
  background: var(--paper-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--s-4);
  position: relative;
}
.vr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--go), var(--caution) 60%, var(--danger));
}
.vr-bar-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: var(--ink);
  border-radius: 1px;
  transform: translateX(-50%);
}
.vr-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.vr-flagcount {
  font-size: 13px;
  margin-top: var(--s-3);
  color: var(--ink-2);
  font-family: var(--font-mono);
}
.vr-flagcount strong { color: var(--ink); }
.vr-trend {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0 var(--s-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.vr-trend.down { color: var(--caution); }
.vr-trend.up   { color: var(--go); }
.vr-note { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.vr-note strong { color: var(--ink); }

/* Cost ledger uses .ledger-strip; no extra rules needed beyond the
   .ledger-cell.highlighted state for "Suggested bid". */

/* Risk flag table — extends list-table with row content for clauses */
.flag-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  border-collapse: collapse;
  overflow: hidden;
  margin-bottom: var(--s-10);
}
.flag-table th {
  text-align: left;
  background: var(--paper-2);
  padding: 10px var(--s-4);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
}
.flag-table td {
  padding: var(--s-4);
  border-bottom: 1px solid var(--grid-line);
  font-size: 14px;
  vertical-align: top;
}
.flag-table tr:last-child td { border-bottom: 0; }
.flag-sev-cell { width: 90px; }
.flag-sev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.flag-sev .dot { width: 8px; height: 8px; border-radius: 50%; }
.flag-sev.high { color: var(--danger); }
.flag-sev.high .dot { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.flag-sev.med  { color: var(--caution); }
.flag-sev.med .dot { background: var(--caution); box-shadow: 0 0 0 2px var(--caution-soft); }
.flag-sev.low  { color: var(--info); }
.flag-sev.low .dot { background: var(--info); box-shadow: 0 0 0 2px var(--info-soft); }
.flag-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.flag-desc { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.flag-cost { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.flag-cost.high { color: var(--danger); }
.flag-cost.med  { color: var(--caution); }
.flag-ref-cell { width: 110px; }
.flag-ref {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

/* Recommendations strip (numbered, gold-soft background) */
.reco-strip {
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-10);
}
.reco-strip-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-3);
  margin: 0 0 var(--s-3);
}
.reco-list-v2 {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: r;
}
.reco-list-v2 li {
  counter-increment: r;
  position: relative;
  padding: 8px 0 8px var(--s-8);
  font-size: 14px;
  border-bottom: 1px dashed var(--gold-soft);
  color: var(--ink);
  line-height: 1.5;
}
.reco-list-v2 li:last-child { border-bottom: 0; }
.reco-list-v2 li::before {
  content: counter(r, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-2);
}

/* Sticky action bar (pageful action drawer at the bottom) */
.action-bar-v2 {
  position: sticky;
  bottom: var(--s-3);
  display: flex;
  gap: var(--s-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  flex-wrap: wrap;
  margin-top: var(--s-7);
  z-index: 5;
}
.action-bar-v2-left { font-size: 13px; color: var(--ink-3); }
.action-bar-v2-right { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* =============================================================================
   v2 — Form of Tender (paper-style two-pane)
   ============================================================================= */
.fot-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--s-7);
  align-items: start;
}
@media (max-width: 980px) {
  .fot-shell { grid-template-columns: 1fr; }
}

.fot-contents {
  position: sticky;
  top: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fot-contents-head { padding: var(--s-5); border-bottom: 1px solid var(--line); }
.fot-contents-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}
.fot-contents-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
  margin: 4px 0 0;
}
.fot-contents-progress {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
  margin-top: var(--s-3);
}
.fot-contents-progress-num { font-size: 22px; font-weight: 600; }
.fot-contents-progress-num.warn  { color: var(--caution); }
.fot-contents-progress-num.go    { color: var(--go); }
.fot-contents-progress-denom { color: var(--ink-3); font-size: 14px; }
.fot-contents-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--paper-3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.fot-contents-progress-fill { height: 100%; background: var(--caution); }
.fot-contents-progress-fill.go { background: var(--go); }

.fot-contents-list { padding: 6px 0; }
.fot-contents-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px var(--s-5);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  background: none;
  border-top: 0; border-right: 0; border-bottom: 0;
  width: 100%;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
}
.fot-contents-row:hover { background: var(--paper-2); }
.fot-contents-row.active { border-left-color: var(--ink); background: var(--paper-2); }
.fot-contents-row-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.fot-contents-row-name { font-weight: 500; color: var(--ink); }
.fot-contents-row.done .fot-contents-row-name { color: var(--ink-3); }
.fot-contents-row-status {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.fot-contents-row-status.done  { background: var(--go); color: white; }
.fot-contents-row-status.warn  { background: var(--caution-soft); border: 1.5px solid var(--caution); color: var(--caution); }
.fot-contents-row-status.error { background: var(--siren-soft); border: 1.5px solid var(--siren); color: var(--siren-deep); }
.fot-contents-row-status.todo  { background: var(--surface); border: 1.5px solid var(--line-2); }

.fot-contents-foot {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fot-contents-foot-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
}
.fot-contents-foot-row .lab { color: var(--ink-3); letter-spacing: 0.04em; }
.fot-contents-foot-row .val { color: var(--ink); font-weight: 600; }
.fot-contents-foot-row .val.urgent { color: var(--siren); }

/* Right pane — paper form */
.fot-paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-10) var(--s-10) var(--s-7);
  position: relative;
}
.fot-paper::before {
  /* Faint left margin rule, like a ledger page */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  width: 1px;
  background: color-mix(in oklab, var(--siren) 20%, transparent);
  opacity: 0.35;
  pointer-events: none;
}
.fot-paper-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.fot-paper-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}
.fot-paper-subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 var(--s-7);
  max-width: 60ch;
  line-height: 1.55;
}
.fot-paper-rule { border: 0; border-top: 1px solid var(--line-2); margin: var(--s-7) 0; }
.fot-paper-rule.thick { border-top: 2px solid var(--ink); }

.fot-section-v2 { margin-bottom: var(--s-10); position: relative; }
.fot-section-head-v2 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-4);
  align-items: baseline;
  margin-bottom: var(--s-5);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-2);
}
.fot-section-num-v2 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.fot-section-name-v2 { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; }
.fot-section-status-v2 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.fot-section-status-v2.done  { color: var(--go); }
.fot-section-status-v2.warn  { color: var(--caution); }
.fot-section-status-v2.error { color: var(--siren); }
.fot-section-status-v2.todo  { color: var(--ink-3); }

/* Field row with marginalia gutter */
.fot-field-v2 {
  display: grid;
  grid-template-columns: 32px 1fr 220px;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-3) 0;
}
@media (max-width: 980px) {
  .fot-field-v2 { grid-template-columns: 32px 1fr; }
  .fot-field-v2 .fot-margin { grid-column: 2; }
}
.fot-field-num-v2 {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  font-weight: 600;
  padding-top: 16px;
  letter-spacing: 0.04em;
}
.fot-field-label-v2 {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.fot-field-label-v2 .req { color: var(--siren); font-weight: 700; }

/* Underline-only inputs */
.fot-input-v2 {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink-3);
  padding: 6px 0;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  outline: none;
}
.fot-input-v2:focus { border-bottom-color: var(--gold); }
.fot-input-v2.mono {
  font-family: var(--font-mono);
  font-size: 18px;
  font-feature-settings: 'tnum' 1;
}
.fot-input-v2::placeholder { color: var(--ink-4); font-style: italic; }
.fot-input-v2-group { display: flex; align-items: baseline; gap: 6px; }
.fot-input-v2-prefix {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink-3);
}

.fot-checkbox-row { display: flex; gap: var(--s-3); align-items: center; padding: 6px 0; }
.fot-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-3);
  border-radius: 3px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}
.fot-checkbox.checked { background: var(--ink); border-color: var(--ink); color: white; }
.fot-checkbox.error { border-color: var(--siren); }
.fot-checkbox-label { font-size: 14px; color: var(--ink); }

/* Marginalia in the right gutter */
.fot-margin {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  padding-top: 18px;
  color: var(--ink-3);
}
.fot-margin-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 6px;
}
.fot-margin-tag.ai    { background: var(--gold-softer); color: var(--gold-3); }
.fot-margin-tag.warn  { background: var(--caution-soft); color: var(--caution); }
.fot-margin-tag.error { background: var(--siren-soft); color: var(--siren-deep); }
.fot-margin-tag.ref   { background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--line); }
.fot-margin-text strong { color: var(--ink); }
.fot-margin-link {
  color: var(--gold-3);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.fot-ack-row {
  display: grid;
  grid-template-columns: 32px 1fr 220px;
  gap: var(--s-4);
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--grid-line);
}
.fot-ack-row:last-child { border-bottom: 0; }
.fot-ack-num { font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); font-weight: 600; }
.fot-ack-text { font-size: 14px; }
.fot-ack-text strong { font-family: var(--font-serif); font-weight: 400; font-size: 16px; }
.fot-ack-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fot-ack-status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.fot-ack-status-text.error { color: var(--siren); font-weight: 600; }

/* Signature block */
.sig-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  margin-top: var(--s-4);
}
.sig {
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 4px;
  height: 60px;
  display: flex;
  align-items: end;
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--ink-3);
  font-style: italic;
}
.sig.signed { color: var(--ink); }
.sig-cap {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}

/* =============================================================================
   v2 — Heatmap strip (compact, demoted from old hero treatment)
   Reuses existing .hm-dot color rules.
   ============================================================================= */
.heatmap-strip-v2 {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: center;
}
.hm-strip-title-v2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hm-canvas-v2 {
  display: grid;
  grid-template-columns: 76px repeat(5, 1fr);
  gap: 1px;
  background: var(--grid-line);
  border: 1px solid var(--grid-line);
  border-radius: var(--radius-sm);
}
.hm-corner-v2 { background: var(--surface); }

/* =============================================================================
   Sub performance scorecard — chips that surface response/selection rates
   ============================================================================= */
.score-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.score-chip-go     { background: var(--go-soft);     color: var(--go);      border-color: var(--go-edge); }
.score-chip-warn   { background: var(--caution-soft); color: var(--caution); border-color: var(--caution-edge); }
.score-chip-danger { background: var(--danger-soft); color: var(--danger);  border-color: var(--danger-edge); }

/* =============================================================================
   Loss-debrief modal + panel — captured when marking outcome=Lost
   ============================================================================= */
.loss-reason-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2);
  margin-top: var(--s-2);
}
@media (max-width: 560px) { .loss-reason-grid { grid-template-columns: 1fr; } }
.loss-reason-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s-2);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.loss-reason-option:hover { background: var(--paper-2); border-color: var(--line-2); }
.loss-reason-option:has(input:checked) { background: var(--gold-softer); border-color: var(--gold-soft); }
.loss-reason-option input { margin: 2px 0 0; }
.loss-reason-label { font-weight: 600; color: var(--ink); font-size: 14px; }
.loss-reason-hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.loss-debrief-panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.loss-debrief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-5);
}
.loss-debrief-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.loss-debrief-value {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
}
.loss-debrief-value.tabular { font-family: var(--font-mono); }
.loss-debrief-hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.loss-debrief-note {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--line-2);
  font-size: 14px;
  color: var(--ink-2);
  font-style: italic;
  line-height: 1.5;
}

/* =============================================================================
   Bid-day takeover — full-bleed countdown console when something closes <2h
   ============================================================================= */
.bid-day-takeover {
  background: var(--ink);
  color: #f4ecd8;
  border-radius: var(--radius-xl);
  padding: var(--s-9) var(--s-7);
  margin: 0 0 var(--s-6);
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-3);
}
.bid-day-takeover.has-blockers {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.02) 0 24px,
      rgba(255,255,255,0) 24px 48px
    ),
    var(--siren-deep);
  color: #fff;
  animation: alarm-pulse 1.6s ease-in-out infinite;
}
.bid-day-takeover.all-clear {
  background: linear-gradient(180deg, #1a3024 0%, #14241b 100%);
  color: #e3f5e7;
}
.bid-day-takeover-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: var(--s-2);
}
.bid-day-takeover-countdown {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
  font-size: 96px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-4);
}
.bid-day-takeover-countdown.expired { opacity: 0.6; }
@media (max-width: 720px) { .bid-day-takeover-countdown { font-size: 64px; } }
.bid-day-takeover-name {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: var(--s-2);
}
.bid-day-takeover-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.75;
  justify-content: center;
}
.bid-day-takeover-status { margin: var(--s-5) 0 var(--s-4); }
.bid-day-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.bid-day-pill.go   { background: rgba(80, 180, 110, 0.18); color: #c0eccd; border: 1px solid rgba(120, 200, 140, 0.45); }
.bid-day-pill.warn { background: rgba(255, 220, 150, 0.15); color: #ffe7b4; border: 1px solid rgba(255, 220, 150, 0.4); }
.bid-day-checklist {
  list-style: none;
  margin: 0 auto var(--s-6);
  padding: 0;
  max-width: 640px;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
}
.bid-day-checkrow {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bid-day-checkrow:last-child { border-bottom: 0; }
.bid-day-checkdot {
  font-family: var(--font-mono);
  font-size: 18px;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.bid-day-checkrow.done .bid-day-checkdot { background: rgba(120, 200, 140, 0.2); color: #c0eccd; }
.bid-day-checkrow.todo .bid-day-checkdot { background: rgba(255, 220, 150, 0.15); color: #ffe7b4; }
.bid-day-checklabel { font-weight: 600; }
.bid-day-checksub { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.bid-day-takeover-actions { display: inline-flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
.bid-day-takeover-other {
  margin-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
}

/* =============================================================================
   Review tab — export card (final submission ledger)
   ============================================================================= */
.export-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: stretch;
  background: var(--gold-softer);
  border: 1px solid var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-6);
}
@media (max-width: 720px) {
  .export-card { grid-template-columns: 1fr; }
}
.export-card-body { min-width: 240px; }
.export-card-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.export-card-total {
  text-align: right;
  border-left: 1px solid var(--gold-soft);
  padding-left: var(--s-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 720px) {
  .export-card-total { border-left: 0; border-top: 1px solid var(--gold-soft); padding-left: 0; padding-top: var(--s-4); text-align: left; }
}
.export-card-total-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-3);
  font-weight: 700;
  margin-bottom: 4px;
}
.export-card-total-value {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.export-card-total-sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 6px;
  font-family: var(--font-mono);
}
.hm-cell-label-v2 {
  background: var(--surface);
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  letter-spacing: 0.02em;
}
.hm-cell-label-v2.x-axis { justify-content: center; }
.hm-cell-v2 {
  background: var(--surface);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 2px;
}
.hm-axis-title-v2 {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}
.hm-legend-v2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
}
.hm-legend-row-v2 { display: flex; align-items: center; gap: 6px; }
.hm-legend-row-v2 .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ============================================================
   Pass 10 — Authority intelligence panel (verdict screen)
   ============================================================ */
.authority-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  margin-bottom: var(--s-10);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.authority-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.authority-stat-num {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 4px;
}
.authority-stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  text-transform: uppercase;
}
.authority-sublabel {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.authority-flag-list, .authority-sample-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.authority-flag-list li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  font-size: 13px;
  color: var(--ink);
}
.authority-flag-title { line-height: 1.4; }
.authority-flag-count {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.authority-sample-list li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 13px;
  flex-wrap: wrap;
}
.authority-sample-link {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  flex: 1;
  min-width: 180px;
}
.authority-sample-link:hover { color: var(--gold-3); text-decoration: underline; }
.authority-sample-risk { color: var(--ink-3); font-size: 12px; }
.authority-outcome {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.authority-outcome.won { background: var(--go-soft); color: var(--go); }
.authority-outcome.lost { background: var(--danger-soft); color: var(--danger); }
.authority-outcome.no_bid { background: var(--paper-3); color: var(--ink-3); }
.authority-outcome.withdrawn { background: var(--paper-3); color: var(--ink-3); }
.authority-outcome.muted { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-2); }

/* Pass 14 — per-owner price patterns inside the authority panel */
.authority-prices { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.authority-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: var(--s-2);
}
.authority-prices-table thead th {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.authority-prices-table th.num,
.authority-prices-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.authority-prices-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.authority-prices-table tbody tr:last-child td { border-bottom: 0; }
.authority-prices-desc {
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Pass 10 — Risk-margin advice (verdict screen)
   ============================================================ */
.risk-margin-advice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--ink-3);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: var(--s-8);
}
.risk-margin-advice.caution {
  border-left-color: var(--caution);
  background: var(--caution-soft);
}
.risk-margin-advice.go {
  border-left-color: var(--go);
  background: var(--go-soft);
}
.risk-margin-eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.risk-margin-advice.caution .risk-margin-eyebrow { color: var(--caution); }
.risk-margin-advice.go .risk-margin-eyebrow { color: var(--go); }
.risk-margin-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

/* ============================================================
   Pass 10 — Multi-tender SOQ compare modal
   ============================================================ */
.modal.modal-xl { max-width: min(1200px, 96vw); }
.compare-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
@media (max-width: 720px) { .compare-pickers { grid-template-columns: 1fr; } }
.compare-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--s-4);
}
.compare-stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.compare-stat-num {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
}
.compare-table-wrap {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table thead th {
  position: sticky;
  top: 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  white-space: nowrap;
}
.compare-table th.num, .compare-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table tbody tr.unmatched { background: var(--paper-3); }
.compare-table tbody tr.unmatched td { color: var(--ink-3); }
.compare-table .compare-desc { max-width: 320px; line-height: 1.4; }
.compare-delta.up { color: var(--danger); font-weight: 600; }
.compare-delta.down { color: var(--go); font-weight: 600; }

/* ============================================================
   Pass 10 — Command palette (⌘K)
   ============================================================ */
.cmdk-overlay { align-items: flex-start; padding-top: 12vh; }
.cmdk {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.cmdk-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
  outline: none;
}
.cmdk-input::placeholder { color: var(--ink-3); }
.cmdk-results {
  overflow: auto;
  flex: 1;
  padding: 4px 0;
  min-height: 200px;
}
.cmdk-section {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  padding: 12px 20px 6px;
}
.cmdk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--ink);
}
.cmdk-row.active { background: var(--gold-softer); }
.cmdk-row-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--paper-2);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
}
.cmdk-row.active .cmdk-row-icon { background: var(--gold-soft); color: var(--gold-3); }
.cmdk-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cmdk-row-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.cmdk-row-hint { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-empty { padding: 32px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.cmdk-foot {
  display: flex;
  gap: var(--s-4);
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 11px;
  color: var(--ink-3);
}
.cmdk-foot kbd {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}

/* ============================================================
   Pass 10 — Shortcut help table
   ============================================================ */
.shortcut-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shortcut-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.shortcut-table td:first-child { width: 130px; white-space: nowrap; }
.shortcut-table tr:last-child td { border-bottom: 0; }
.shortcut-table kbd {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}

/* ============================================================
   Pass 10 — Broker request panel (verdict screen, Won outcome)
   ============================================================ */
.broker-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-2);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-10);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.broker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
}
.broker-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.broker-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.broker-hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.broker-actions { display: flex; gap: var(--s-2); }

/* ============================================================
   Pass 10 — Per-owner submission checklist (Bid Review tab)
   ============================================================ */
.owner-checklist-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-10);
}
.owner-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.owner-checklist-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: 8px 10px;
  background: var(--paper);
  border-radius: var(--radius);
  font-size: 14px;
}
.owner-checklist-item:hover { background: var(--paper-2); }
.owner-checklist-item.done .owner-checklist-label span { text-decoration: line-through; color: var(--ink-3); }
.owner-checklist-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.owner-checklist-label input { cursor: pointer; flex-shrink: 0; }
.owner-checklist-empty { padding: 12px; font-style: italic; color: var(--ink-3); }
.owner-checklist-add {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.owner-checklist-add input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

/* ============================================================
   Pass 10 — Quote revision history (edit-quote modal)
   ============================================================ */
.quote-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.quote-history-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 100px 90px auto;
  align-items: center;
  gap: var(--s-3);
  padding: 6px 8px;
  background: var(--paper-2);
  border-radius: var(--radius);
}
.quote-history-date { color: var(--ink-3); font-size: 12px; }
.quote-history-scope { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-history-amount { text-align: right; font-weight: 500; color: var(--ink); }
.quote-history-status { font-size: 11px; color: var(--ink-3); text-align: right; }

/* ============================================================
   Pass 11 — Cost-codes library tab
   ============================================================ */
.cost-codes-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: auto;
  max-height: 70vh;
}
.cost-codes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cost-codes-table thead th {
  position: sticky;
  top: 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  white-space: nowrap;
}
.cost-codes-table th.num,
.cost-codes-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cost-codes-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cost-codes-table tbody tr:last-child td { border-bottom: 0; }
.cost-codes-table tbody tr:hover { background: var(--paper-2); }
.cost-code-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.cost-code-desc {
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Pass 12 — Team accounts
   ============================================================ */
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.team-table thead th {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  white-space: nowrap;
}
.team-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.team-table tbody tr:last-child td { border-bottom: 0; }
.team-table select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.team-role-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.team-role-owner { background: var(--gold-soft); color: var(--gold-3); }
.team-role-member { background: var(--paper-3); color: var(--ink-2); }

.team-invite-link { background: var(--gold-softer); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: var(--s-3); }
.team-invite-link-row { display: flex; gap: var(--s-2); align-items: stretch; }
.team-invite-link-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

.creator-badge {
  display: inline-block;
  padding: 1px 6px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ============================================================
   Pass 13 — Mobile site-visit capture
   Tap targets are 44px+ for phone use; gallery flexes from 4-up
   on desktop down to 2-up on phone.
   ============================================================ */
.site-visit-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-2);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-10);
}
.site-visit-actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  align-items: center;
}
.site-visit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.site-visit-btn:hover { background: var(--paper-2); border-color: var(--ink-3); }
.site-visit-btn.primary { background: var(--gold-softer); border-color: var(--gold-soft); color: var(--gold-3); font-weight: 600; }
.site-visit-btn.primary:hover { background: var(--gold-soft); border-color: var(--gold); }
.site-visit-tip { font-size: 12px; flex: 1; min-width: 200px; }
.site-visit-empty { padding: var(--s-5) 0; text-align: center; font-size: 13px; }

.site-visit-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.site-visit-entry {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-visit-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}
.site-visit-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.site-visit-voice-row { display: flex; align-items: center; gap: var(--s-2); }
.site-visit-voice-icon { font-size: 22px; }
.site-visit-voice-row audio { flex: 1; height: 36px; }
.site-visit-note-icon { font-size: 16px; color: var(--ink-3); }
.site-visit-note-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}
.site-visit-caption {
  width: 100%;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  background: transparent;
  padding: 4px 2px;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
}
.site-visit-caption:focus { outline: none; border-color: var(--gold); background: var(--gold-softer); border-radius: var(--radius-sm); }
.site-visit-caption::placeholder { color: var(--ink-3); }
.site-visit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-3);
}
.site-visit-author { font-weight: 500; }
.site-visit-gps { color: var(--info); text-decoration: none; }
.site-visit-gps:hover { text-decoration: underline; }
.site-visit-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  z-index: 1;
}
.site-visit-remove:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-edge); }

/* Compact panel — bid Pricing tab */
.site-visit-compact {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px var(--s-4);
  margin: var(--s-3) 0 var(--s-4);
}
.site-visit-compact-head { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.site-visit-compact-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.site-visit-compact-meta { font-size: 13px; color: var(--ink); display: flex; gap: var(--s-3); }
.site-visit-compact .site-visit-actions { margin-left: auto; }
.site-visit-compact .site-visit-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }

/* Lightbox */
.sv-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  cursor: zoom-out;
}
.sv-lightbox-img {
  max-width: 96vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
}
.sv-lightbox-caption {
  margin-top: var(--s-3);
  color: white;
  font-size: 14px;
  max-width: 80ch;
  text-align: center;
}
.sv-lightbox-close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sv-lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Phone tweaks */
@media (max-width: 640px) {
  .site-visit-gallery { grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
  .site-visit-actions { gap: var(--s-2); }
  .site-visit-btn { flex: 1; min-width: 0; padding: 12px 8px; }
  .site-visit-tip { display: none; }
}

/* Pass 14 — site-visit note modal */
.svn-photo-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 12px;
  background: var(--paper-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.svn-photo-row input[type="file"] { font-size: 13px; max-width: 240px; }
.svn-gps-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

/* Pass 14 — last-edited-by bar on bid stage */
.bid-last-edited-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s-2);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--info-soft);
  border: 1px solid var(--info-edge);
  border-radius: var(--radius-pill);
}
.bid-last-edited-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--info);
}
