﻿/* SOP Framework — Blueprint × Linear aesthetic
   Warm-cool neutrals, ember accent (oklch), Inter + JetBrains Mono.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Neutrals — warm-cool greys */
  --bg:        #f6f4ef;
  --bg-tint:   #efece4;
  --paper:    #fbfaf6;
  --line:     #ddd7c8;
  --line-soft:#e7e2d4;
  --ink:       #1f1d18;
  --ink-2:     #4a463c;
  --ink-3:     #7a7468;
  --ink-4:     #a8a294;

  /* Accents */
  --accent:        oklch(0.62 0.14 38);   /* ember */
  --accent-soft:   oklch(0.62 0.14 38 / 0.12);
  --accent-line:   oklch(0.62 0.14 38 / 0.35);
  --warn:          oklch(0.66 0.14 70);   /* amber */
  --warn-soft:     oklch(0.66 0.14 70 / 0.14);
  --decision:      oklch(0.55 0.18 25);   /* deep red-orange */
  --decision-soft: oklch(0.55 0.18 25 / 0.10);

  /* Phase colors */
  --phase-dev:      #8c7a52;
  --phase-intake:   #5e6f7d;
  --phase-estimate: #6b7f5f;
  --phase-approval: #7d6e5f;
  --phase-ops:      #5f6e7f;
  --phase-field:    #8c5f4a;
  --phase-billing:  #6e5f7f;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 0 rgba(31, 29, 24, 0.04), 0 1px 2px rgba(31, 29, 24, 0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

#root { min-height: 100vh; }
.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ================== HEADER ================== */
.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  gap: 24px;
  position: sticky; top: 0; z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink-2);
}
.brand-line1 { font-weight: 600; letter-spacing: -0.01em; }
.brand-line2 { font-size: 11px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; }

.view-switcher {
  display: flex;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.view-btn {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.view-btn:hover { color: var(--ink); }
.view-btn.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

.header-actions { display: flex; justify-content: flex-end; }
.action-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--decision);
  background: var(--decision-soft);
  color: var(--decision);
  font-family: inherit;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  text-transform: uppercase;
}
.action-btn:hover { background: oklch(0.55 0.18 25 / 0.18); }
.action-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--decision);
  box-shadow: 0 0 0 3px oklch(0.55 0.18 25 / 0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.55 0.18 25 / 0.4); }
  50%      { box-shadow: 0 0 0 4px oklch(0.55 0.18 25 / 0); }
}

/* ================== FILTER BAR ================== */
.filter-bar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.filter-group select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.seg button {
  border: 0; background: transparent;
  padding: 5px 10px; font-family: inherit; font-size: 12px;
  color: var(--ink-2); cursor: pointer;
  text-transform: capitalize;
}
.seg button.on { background: var(--ink); color: var(--paper); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on + button, .seg button + button.on { border-left-color: var(--ink); }

.inline-toggles { gap: 14px; margin-left: auto; }
.inline-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.inline-toggle input { accent-color: var(--accent); }

/* ================== MAIN ================== */
.app-main { flex: 1; padding: 32px 28px 96px; }

/* ================== TIMELINE ================== */
.timeline-wrap { max-width: 1100px; margin: 0 auto; }

/* Phase = section break, not sidebar.
   Top:64 / bottom:32 establishes the macro rhythm against the 8px card gap. */
.phase-section {
  display: block;
  margin: 0 0 32px;
  padding-top: 64px;
  scroll-margin-top: 120px;
}
.phase-section:first-of-type { padding-top: 8px; }

.phase-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 0 4px 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.phase-header::before {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 64px; height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.phase-meta { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
.phase-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: currentColor;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}
.phase-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase-count {
  font-size: 11px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.phase-battery-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.phase-battery-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.phase-dev      { color: var(--phase-dev); }
.phase-intake   { color: var(--phase-intake); }
.phase-estimate { color: var(--phase-estimate); }
.phase-approval { color: var(--phase-approval); }
.phase-ops      { color: var(--phase-ops); }
.phase-field    { color: var(--phase-field); }
.phase-billing  { color: var(--phase-billing); }

/* Phase 1 — Estimate Development & Readiness: intro block */
.p1-intro {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--phase-dev);
  border-radius: var(--radius);
  color: var(--ink);
}
.p1-intro-text {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}
.p1-principle {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.p1-principle-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phase-dev);
  white-space: nowrap;
  flex-shrink: 0;
}
.p1-owner-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--phase-dev);
  text-transform: uppercase;
}
.p1-next {
  font-weight: 500;
  color: var(--phase-dev);
}
.p1-blockers-list { color: var(--decision); }

/* ================== SOP COMMAND CENTER ================== */
.command-center { margin-bottom: 8px; }

.cc-header {
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.cc-title-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cc-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cc-subline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cc-explain {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 72ch;
  line-height: 1.55;
}

.cc-section { margin-bottom: 28px; }
.cc-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}

/* Control gates */
.cc-gates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cc-gate {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--phase-estimate);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-gate-q { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; }
.cc-gate-cond-label,
.cc-gate-proposed-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cc-gate-conds { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.cc-gate-conds li { padding: 1px 0; }
.cc-gate.needs-policy { border-top-color: var(--decision); }
.cc-gate-status { font-size: 12px; font-weight: 600; color: var(--decision); }
.cc-gate-proposed {
  background: var(--decision-soft);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.cc-gate-proposed p { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* Readiness table */
.cc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.cc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cc-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-tint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  vertical-align: top;
  line-height: 1.45;
}
.cc-table tr:last-child td { border-bottom: 0; }
.cc-table tbody tr:hover td { background: var(--bg-tint); }
.cc-td-stage { font-weight: 600; }
.cc-stage-seq {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--phase-dev);
  margin-right: 8px;
  font-weight: 600;
}
.cc-td-owner { color: var(--ink-2); white-space: nowrap; }
.cc-td-status { color: var(--ink-3); font-size: 12px; }

/* Common blockers */
.cc-blockers { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-blocker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--warn-soft);
  border: 1px solid oklch(0.66 0.14 70 / 0.32);
  color: oklch(0.45 0.1 60);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}
.cc-blocker-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

/* Full SOP Reference */
.sop-reference { border-top: 2px solid var(--line); padding-top: 28px; margin-top: 12px; }
.reference-heading { margin-bottom: 16px; }
.reference-heading h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.reference-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.reference-switcher { display: inline-flex; margin-bottom: 16px; }

/* Slim app header (view switcher moved into reference) */
.app-header.slim { grid-template-columns: 1fr auto; }

/* Quieted connection status — dot only, no dominating label */
.conn-status--dot { background: transparent; padding: 4px; }
.conn-status--dot .conn-label { display: none; }

/* Job entry point — estimate context for the conversation */
.cc-jobentry {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.cc-jobentry-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.cc-jobentry-bar {
  display: flex;
  align-items: stretch;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.cc-jobentry-prefix {
  display: inline-flex; align-items: center;
  padding: 0 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--bg-tint);
  border-right: 1px solid var(--line);
}
.cc-jobentry-input {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent;
  padding: 9px 12px;
  font-size: 14px; color: var(--ink);
  font-family: inherit;
}
.cc-jobentry-submit {
  border: 0; cursor: pointer;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
}
.cc-jobentry-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.cc-job-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  padding: 5px 6px 5px 12px;
}
.cc-job-chip-est {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--accent);
}
.cc-job-chip-num { font-size: 14px; font-weight: 600; color: var(--ink); }
.cc-job-chip-clear {
  border: 0; background: transparent; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%;
  color: var(--ink-3); font-size: 12px;
  display: grid; place-items: center;
}
.cc-job-chip-clear:hover { background: var(--bg-tint); color: var(--ink); }
.cc-jobentry-note {
  margin: 8px 0 0;
  font-size: 11.5px; color: var(--ink-3);
  font-style: italic;
}
.cc-jobentry-note--alert { color: var(--decision); font-style: normal; }
.cc-jobentry-note--muted { color: var(--ink-4); }
.cc-jobentry-note--good  { color: var(--accent); font-style: normal; }

/* Estimate context card (v1 — read-only Supabase fields) */
.cc-jobentry-loaded {
  display: flex; flex-direction: column; gap: 10px;
  align-items: stretch;
}
.cc-est-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.cc-est-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.cc-est-card-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.cc-est-card-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--ink-4);
}
.cc-est-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 18px;
}
.cc-est-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-est-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-est-value {
  font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35;
  overflow-wrap: anywhere;
}
.cc-est-card-next {
  display: flex; flex-direction: column; gap: 3px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.cc-est-next-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-est-next-value { font-size: 12.5px; color: var(--ink-4); font-style: italic; }
/* ── Operations readiness section ───────────────────────────────────────── */
.cc-or {
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.cc-or-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-or-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-or-pill {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; letter-spacing: 0.01em;
}
.cc-or-pill--ready        { background: oklch(0.94 0.06 145 / 0.8); color: oklch(0.32 0.10 145); }
.cc-or-pill--needs_review { background: var(--warn-soft);            color: oklch(0.40 0.12 55);  }
.cc-or-pill--not_ready    { background: var(--decision-soft);        color: var(--decision);      }
.cc-or-pill--unknown      { background: var(--bg-tint);              color: var(--ink-3);          }
.cc-or-summary { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.cc-or-checks  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cc-or-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 4px 6px;
  font-size: 12.5px;
}
.cc-or-icon {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  text-align: center; padding-top: 1px;
}
.cc-or-check--pass    .cc-or-icon { color: oklch(0.42 0.10 145); }
.cc-or-check--fail    .cc-or-icon { color: var(--decision); }
.cc-or-check--unknown .cc-or-icon { color: var(--decision); }
.cc-or-check-label  { color: var(--ink-2); font-weight: 500; }
.cc-or-check-detail {
  grid-column: 2;
  font-size: 11.5px; color: var(--ink-3);
  line-height: 1.4;
}
.cc-or-next {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  margin: 0; padding-top: 8px; border-top: 1px solid var(--line-soft);
}

/* ── Billing stage section ──────────────────────────────────────────────── */
.cc-bs {
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.cc-bs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-bs-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-bs-pill {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; letter-spacing: 0.01em;
}
.cc-bs-pill--deposit_paid_partial_open { background: var(--warn-soft);            color: oklch(0.40 0.12 55);  }
.cc-bs-pill--deposit_ready             { background: oklch(0.94 0.06 145 / 0.8);  color: oklch(0.32 0.10 145); }
.cc-bs-pill--not_started               { background: var(--bg-tint);              color: var(--ink-3);         }
.cc-bs-pill--needs_review              { background: var(--warn-soft);            color: oklch(0.40 0.12 55);  }
.cc-bs-pill--unknown                   { background: var(--bg-tint);              color: var(--ink-3);         }
.cc-bs-summary { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.cc-bs-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cc-bs-stage {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}
.cc-bs-stage-label { font-weight: 600; color: var(--ink-2); }
.cc-bs-stage-status { color: var(--ink-2); }
.cc-bs-stage--paid .cc-bs-stage-status { color: oklch(0.42 0.10 145); font-weight: 500; }
.cc-bs-stage--open .cc-bs-stage-status { color: oklch(0.40 0.12 55);  font-weight: 600; }
.cc-bs-stage--none .cc-bs-stage-status { color: var(--ink-4); }
.cc-bs-next {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  margin: 0; padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.cc-bs-refresh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-bs-refresh-btn {
  font: 600 12px var(--font-ui);
  color: #fff; background: var(--accent);
  border: none; border-radius: var(--radius);
  padding: 6px 12px; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.cc-bs-refresh-btn:hover:not(:disabled) { background: var(--accent-deep); }
.cc-bs-refresh-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cc-bs-refresh-note { font-size: 12px; color: var(--ink-3); }

/* ── Deposit readiness section ──────────────────────────────────────────── */
.cc-dr {
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.cc-dr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-dr-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-dr-pill {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; letter-spacing: 0.01em;
}
.cc-dr-pill--ready        { background: oklch(0.94 0.06 145 / 0.8); color: oklch(0.32 0.10 145); }
.cc-dr-pill--needs_review { background: var(--warn-soft);            color: oklch(0.40 0.12 55);  }
.cc-dr-pill--not_ready    { background: var(--decision-soft);        color: var(--decision);      }
.cc-dr-pill--unknown      { background: var(--bg-tint);              color: var(--ink-3);          }
.cc-dr-summary { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.cc-dr-checks  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cc-dr-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 4px 6px;
  font-size: 12.5px;
}
.cc-dr-icon {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  text-align: center; padding-top: 1px;
}
.cc-dr-check--pass    .cc-dr-icon { color: oklch(0.42 0.10 145); }
.cc-dr-check--fail    .cc-dr-icon { color: var(--decision); }
.cc-dr-check--unknown .cc-dr-icon { color: var(--decision); }
.cc-dr-check-label  { color: var(--ink-2); font-weight: 500; }
.cc-dr-check-detail {
  grid-column: 2;
  font-size: 11.5px; color: var(--ink-3);
  line-height: 1.4;
}
.cc-dr-next {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  margin: 0; padding-top: 8px; border-top: 1px solid var(--line-soft);
}

/* Deposit + approval readiness (Job Approval / Intake gate) */
.cc-ar {
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.cc-ar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-ar-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-ar-pill {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; letter-spacing: 0.01em;
}
.cc-ar-pill--ready        { background: oklch(0.94 0.06 145 / 0.8); color: oklch(0.32 0.10 145); }
.cc-ar-pill--needs_review { background: var(--warn-soft);            color: oklch(0.40 0.12 55);  }
.cc-ar-pill--not_ready    { background: var(--decision-soft);        color: var(--decision);      }
.cc-ar-pill--unknown      { background: var(--bg-tint);              color: var(--ink-3);          }
.cc-ar-summary { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.6; }
.cc-ar-checks  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.cc-ar-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 4px 6px;
  font-size: 12.5px;
}
.cc-ar-icon {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  text-align: center; padding-top: 1px;
}
.cc-ar-check--pass    .cc-ar-icon { color: oklch(0.42 0.10 145); }
.cc-ar-check--fail    .cc-ar-icon { color: var(--decision); }
.cc-ar-check--unknown .cc-ar-icon { color: var(--decision); }
.cc-ar-check-label  { color: var(--ink-2); font-weight: 500; }
.cc-ar-check-detail {
  grid-column: 2;
  font-size: 11.5px; color: var(--ink-3);
  line-height: 1.4;
}
.cc-ar-next {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  margin: 0; padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.cc-ar-guidance {
  margin-top: 2px;
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 9px 11px;
  display: flex; flex-direction: column; gap: 5px;
}
.cc-ar-guidance-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-4);
}
.cc-ar-guidance-list {
  list-style: disc; margin: 0; padding-left: 16px;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.45;
}

.cc-est-card-actions { display: flex; justify-content: flex-end; }
.cc-est-link {
  font-size: 12px; font-weight: 600; color: var(--accent);
  text-decoration: none; padding: 4px 0;
}
.cc-est-link:hover { text-decoration: underline; }
@media (max-width: 900px) { .cc-est-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cc-est-card-grid { grid-template-columns: 1fr; } }

/* Gate policy disclosure (commission) */
.cc-gate-policy { margin-top: 2px; }
.cc-gate-policy summary {
  cursor: pointer;
  font-size: 11px; font-weight: 600;
  color: var(--decision);
  list-style: none;
}
.cc-gate-policy summary::-webkit-details-marker { display: none; }
.cc-gate-policy summary::before { content: "\25B8 "; font-size: 9px; }
.cc-gate-policy[open] summary::before { content: "\25BE "; }
.cc-gate-policy p {
  margin: 8px 0 0;
  font-size: 12px; color: var(--ink-2); line-height: 1.5;
  background: var(--decision-soft);
  border-radius: var(--radius);
  padding: 8px 10px;
}

/* Readiness table caption */
.cc-table-note {
  margin: 8px 0 0;
  font-size: 11.5px; color: var(--ink-3); font-style: italic;
}

/* Demoted connection banner inside the reference section */
.sop-reference .connection-banner,
.sop-reference .connection-banner.error,
.sop-reference .connection-banner.loading {
  display: block;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-size: 12px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

/* ===== Workshop layout pass — lighter, conversation-guide feel ===== */

/* Hero header — bigger hierarchy, more air */
.cc-header { padding: 8px 0 24px; margin-bottom: 28px; }
.cc-title { font-size: 30px; }
.cc-subline { font-size: 13px; }
.cc-explain { font-size: 15px; margin-top: 12px; max-width: 64ch; }

/* Job entry sits as a clean card (existing .cc-jobentry styles apply) */

/* Current Drill-Down — prominent guided panel */
.cc-drilldown {
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-tint));
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 30px;
}
.cc-drilldown-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px;
}
.cc-drilldown-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.cc-drill-block { display: flex; flex-direction: column; gap: 6px; }
.cc-drill-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-drill-value { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cc-drill-block.is-question .cc-drill-value { color: var(--accent); }
@media (max-width: 760px) { .cc-drilldown-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .cc-drilldown-grid { grid-template-columns: 1fr; } }

/* Three decision cards — big and airy */
.cc-decisions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.cc-decision {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--phase-estimate);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.cc-decision-q { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.cc-decision-req-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.cc-decision-reqs { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.cc-decision-reqs li { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 760px) { .cc-decisions-grid { grid-template-columns: 1fr; } }

/* Commission policy — demoted note under the decision cards */
.cc-policy-note {
  margin-top: 14px;
  background: var(--bg-tint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.cc-policy-badge {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--decision); white-space: nowrap;
}
.cc-policy-note p { margin: 0; flex: 1; min-width: 240px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* Estimate Readiness Path — compact step pills */
.cc-path {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.cc-path-step {
  flex: 1 1 160px;
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}
.cc-path-seq {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--phase-dev); color: #fff;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
}
.cc-path-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-path-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.cc-path-owner {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--phase-dev);
}
.cc-path-req { font-size: 12px; color: var(--ink-3); line-height: 1.35; }

/* Blockers — feel pointable in a meeting */
.cc-blocker-chip { cursor: default; transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.cc-blocker-chip:hover { background: var(--warn); border-color: var(--warn); color: #fff; }
.cc-blocker-chip:hover::before { background: #fff; }

/* Collaboration Pulse — read-only live summary from Notion overlays */
.cc-pulse {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 30px;
}
.cc-pulse-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cc-pulse-head .cc-section-title { margin: 0; }
.cc-pulse-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 9px;
}
.cc-pulse-note {
  margin: 8px 0 0;
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
  max-width: 70ch;
}
.cc-pulse-grid {
  margin-top: 14px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.cc-pulse-stat {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.cc-pulse-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -0.01em; }
.cc-pulse-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3);
}
.cc-pulse-stat.tone-attention { border-color: var(--warn); }
.cc-pulse-stat.tone-attention .cc-pulse-value { color: oklch(0.5 0.12 60); }
.cc-pulse-stat.tone-progress { border-color: var(--accent-line); }
.cc-pulse-stat.tone-progress .cc-pulse-value { color: var(--accent); }
@media (max-width: 760px) { .cc-pulse-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cc-pulse-grid { grid-template-columns: 1fr; } }

/* Actionable pulse stats (rendered as buttons) */
.cc-pulse-stat {
  font-family: inherit;
  text-align: left;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
button.cc-pulse-stat { cursor: default; }
button.cc-pulse-stat.is-actionable {
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}
button.cc-pulse-stat.is-actionable:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(31, 29, 24, 0.08);
}
button.cc-pulse-stat.is-actionable:active { transform: translateY(1px); }
button.cc-pulse-stat.is-actionable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.cc-pulse-stat:disabled { opacity: 0.6; cursor: default; }

.cc-pulse-howto {
  margin: 12px 0 0;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
  max-width: 72ch;
}

@media (max-width: 900px) {
  .cc-gates-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cc-gates-grid { grid-template-columns: 1fr; }
}

.phase-section .step-card { color: var(--ink); }

/* Card list-item rhythm: 8px between siblings. */
.phase-steps { display: flex; flex-direction: column; gap: 8px; }

/* ================== STEP CARD ================== */
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 120ms, box-shadow 120ms;
  scroll-margin-top: 130px;
  position: relative;
}
.step-card:hover { border-color: var(--ink-4); }
.step-card.expanded { border-color: var(--ink-4); box-shadow: var(--shadow-sm); }

/* Decision tick: replaces both 3px left-border AND the NEEDS DECISION pill. */
.step-card.has-decision::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: var(--decision);
  border-radius: 0 1px 1px 0;
}

.step-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  align-items: center;
  user-select: none;
  min-height: 44px;
}
.step-card.compact .step-head { padding: 9px 14px; min-height: 40px; }

/* Step number: small mono label, not a tile. */
.step-num {
  width: auto; height: auto;
  display: inline-flex; align-items: baseline; justify-content: flex-start;
  background: transparent;
  border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  padding: 0;
}
.step-num::after {
  content: "·";
  margin-left: 2px;
  color: var(--ink-4);
}
.step-num.decision { background: transparent; border: 0; color: var(--decision); }
.step-card.compact .step-num { font-size: 11px; }

.step-title-block { min-width: 0; }
.step-title-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  min-width: 0;
}
.step-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-card.expanded .step-title { white-space: normal; }
.step-card.compact .step-title { font-size: 13.5px; }

/* Phase tag suppressed in card head—implied by phase section grouping. */
.step-head .phase-tag { display: none; }
/* NEEDS DECISION pill suppressed—replaced by left-edge tick. */
.step-head .decision-flag { display: none; }

.step-meta-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
  font-size: 12px; color: var(--ink-3);
  min-width: 0;
}
.meta-sep { color: var(--ink-4); }
.step-sla {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.expand-btn {
  border: 0; background: transparent;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink-4);
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 120ms, color 120ms, background 120ms;
}
.step-card:hover .expand-btn,
.step-card.expanded .expand-btn,
.step-card:focus-within .expand-btn { opacity: 1; }
.expand-btn:hover { background: var(--bg-tint); color: var(--ink); }
@media (hover: none) {
  .expand-btn { opacity: 1; width: 44px; height: 44px; }
}
.caret { font-size: 14px; }

.decision-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  background: var(--decision);
  color: var(--paper);
  padding: 3px 6px;
  border-radius: 2px;
}

/* phase tags */
.phase-tag {
  display: inline-block;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: currentColor;
}

/* role chip */
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.role-dot {
  width: 8px; height: 8px;
  background: var(--role-color, var(--ink));
  border-radius: 2px;
  display: inline-block;
}
.role-label { font-weight: 500; color: var(--ink); }
.role-person { color: var(--ink-3); }
.role-backup {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 4px;
}

/* step body */
.step-body {
  border-top: 1px dashed var(--line);
  padding: 20px 20px 16px 76px;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--paper) 60px);
}
.step-card.compact .step-body { padding: 14px 16px 12px 56px; }

.step-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .step-cols { grid-template-columns: 1fr; gap: 16px; }
}

.field-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.field-row:last-child { border-bottom: 0; }
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.field-value { font-size: 13px; color: var(--ink); line-height: 1.55; }
.field-value.mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

.proof-list, .sub-list { margin: 0; padding-left: 18px; }
.proof-list li, .sub-list li { padding: 2px 0; }
.sub-list li { display: flex; flex-direction: column; padding: 4px 0; }
.sub-label { font-weight: 500; }
.sub-done { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-3); }

.guardrail-text { color: var(--decision); font-weight: 500; }
.notes-text { color: var(--ink-2); font-style: italic; }

/* code badges */
.badge-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.code-badge {
  display: inline-block;
  padding: 3px 7px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.code-badge.striven { border-color: oklch(0.55 0.06 240 / 0.35); background: oklch(0.55 0.06 240 / 0.06); color: oklch(0.45 0.08 240); }
.code-badge.mcp     { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.code-badge.kb      { border-color: oklch(0.55 0.08 130 / 0.35); background: oklch(0.55 0.08 130 / 0.07); color: oklch(0.40 0.08 130); }

/* handoff card */
.handoff-card {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  background: var(--bg-tint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
}
.handoff-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 4px; }
.handoff-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.handoff-artifact { font-size: 12px; color: var(--ink); font-weight: 500; }
.handoff-arrow svg { color: var(--ink-3); }
.handoff-from, .handoff-to { display: flex; flex-direction: column; }

/* ================== SWIM-LANE ================== */
.swim-view { max-width: 100%; }
.swim-scroll { overflow-x: auto; padding-bottom: 12px; }
.swim-grid {
  display: grid;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.swim-corner, .swim-row-head, .swim-col-head, .swim-cell {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px;
}
.swim-corner {
  background: var(--bg-tint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  position: sticky; left: 0; z-index: 2;
}
.swim-col-head {
  background: var(--bg-tint);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.swim-col-num { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.swim-row-head {
  background: var(--bg);
  position: sticky; left: 0; z-index: 1;
}
.swim-cell { position: relative; min-height: 50px; }
.swim-cell.active { background: oklch(0.62 0.14 38 / 0.04); }

.swim-dot {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 0;
  background: var(--paper);
  border: 2px solid var(--role-color);
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--role-color);
  cursor: pointer;
  margin: 0 auto;
  transition: transform 120ms;
}
.swim-dot:hover { transform: scale(1.1); background: var(--role-color); color: var(--paper); }

.swim-handoff {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(to right, var(--accent) 50%, transparent 50%);
  background-size: 6px 1px;
}

.swim-legend {
  display: flex; gap: 24px;
  padding: 12px 4px;
  font-size: 12px;
  color: var(--ink-3);
}
.swim-dot-eg {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.swim-handoff-eg {
  display: inline-block; width: 24px; height: 1px;
  background: linear-gradient(to right, var(--accent) 50%, transparent 50%);
  background-size: 6px 1px;
  vertical-align: middle;
  margin-right: 6px;
}

/* ================== KANBAN ================== */
.kanban-view {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 100%;
}
@media (max-width: 1200px) { .kanban-view { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kanban-view { grid-template-columns: 1fr; } }

.kanban-col {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-top: 3px solid currentColor;
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 200px;
}
.kanban-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; color: currentColor; }
.kanban-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.kanban-count { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-3); }

.kanban-list { display: flex; flex-direction: column; gap: 6px; }
.kanban-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  position: relative;
}
.kanban-card:hover { border-color: var(--ink-4); }
.kanban-card.has-decision { border-left: 3px solid var(--decision); padding-left: 9px; }
.kanban-num { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; }
.kanban-title { font-size: 13px; font-weight: 500; margin: 4px 0 8px; line-height: 1.3; }
.kanban-meta { font-size: 11px; }
.kanban-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--decision);
  margin-top: 6px;
}

/* ================== DOC ================== */
.doc-view { max-width: 800px; margin: 0 auto; }
.doc-page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
}
.doc-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.doc-page h1 {
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.doc-lede { font-size: 16px; color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.doc-phase { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-phase h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  display: flex; align-items: baseline; gap: 12px;
}
.doc-phase-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 3px;
}
.doc-step { margin-bottom: 24px; }
.doc-step h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.doc-grid { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.doc-grid strong { color: var(--ink); font-weight: 600; }
.doc-decision {
  margin-top: 8px; padding: 8px 12px;
  background: var(--decision-soft);
  border-left: 2px solid var(--decision);
  color: var(--decision);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}

/* ================== DECISIONS PANEL (slide-over) ================== */
.decisions-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 29, 24, 0.4);
  z-index: 100;
  display: flex; justify-content: flex-end;
  animation: fade 160ms ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.decisions-panel {
  background: var(--paper);
  border-left: 1px solid var(--line);
  width: 480px;
  max-width: 100%;
  height: 100vh;
  padding: 0;
  overflow-y: auto;
  box-shadow: -16px 0 48px rgba(31, 29, 24, 0.18);
  animation: slideIn 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
}
.decisions-panel header {
  position: sticky; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  margin: 0;
  padding: 18px 24px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.decisions-panel header::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: -1px;
  height: 2px; width: 64px; background: var(--accent); border-radius: 1px;
}
.decisions-panel h2 {
  margin: 0; font-size: 18px; letter-spacing: -0.01em; font-weight: 600;
  display: flex; align-items: baseline; gap: 10px;
}
.decisions-panel h2 .count-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.06em;
}
.close-btn {
  border: 0; background: transparent;
  width: 32px; height: 32px; display: grid; place-items: center;
  cursor: pointer; color: var(--ink-3);
  border-radius: var(--radius);
}
.close-btn:hover { background: var(--bg-tint); color: var(--ink); }
.decisions-lede {
  color: var(--ink-2); font-size: 13px; line-height: 1.55;
  margin: 0; padding: 16px 24px 8px;
}
.decisions-notice { color: var(--decision); font-weight: 500; }
.decisions-list {
  list-style: none; padding: 8px 24px 32px; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.decisions-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  background: var(--paper);
}
.decision-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--accent);
  letter-spacing: 0.14em; font-weight: 600;
  margin-bottom: 6px;
}
.decision-body h4 {
  margin: 0 0 6px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  line-height: 1.35;
}
.decision-body p {
  margin: 0 0 14px; font-size: 13px;
  color: var(--ink-2); line-height: 1.55;
}
.decision-fieldgroup {
  display: grid; grid-template-columns: 80px 1fr; gap: 10px 12px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}
.decision-fieldgroup .field-label-mini {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-3); text-transform: uppercase;
  padding-top: 7px;
}
.decision-fieldgroup .field-with-dot {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.decision-fieldgroup .field-with-dot > :first-child { flex: 1; min-width: 0; }
.decision-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--bg-tint); border: 1px solid var(--line);
  cursor: pointer; user-select: none;
  transition: background 120ms;
}
.decision-status-pill:hover { background: var(--paper); border-color: var(--ink-4); }
.decision-status-pill .status-dot-inline {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-4);
}
.decision-status-pill[data-status="Draft"] .status-dot-inline { background: var(--ink-3); }
.decision-status-pill[data-status="Review"] .status-dot-inline { background: var(--accent); }
.decision-status-pill[data-status="Ratified"] .status-dot-inline { background: var(--phase-billing); }
.decision-status-pill[data-status="Deprecated"] .status-dot-inline { background: var(--decision); }
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
  animation: fade 150ms;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.decisions-panel {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 32px;
  box-shadow: 0 12px 48px rgba(31, 29, 24, 0.2);
}
.decisions-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.decisions-panel h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.close-btn {
  border: 0; background: transparent;
  font-size: 16px; color: var(--ink-3);
  cursor: pointer; padding: 4px 8px;
  border-radius: 3px;
}
.close-btn:hover { background: var(--bg-tint); color: var(--ink); }
.decisions-lede { color: var(--ink-2); margin-bottom: 24px; font-size: 14px; }
.decisions-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.decisions-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--decision);
  border-radius: var(--radius);
  background: var(--bg);
}
.decision-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--decision); letter-spacing: 0.08em; padding-top: 2px; }
.decision-body h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.decision-body p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ================== RESPONSIVE ================== */
@media (max-width: 900px) {
  .app-header { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .filter-bar { padding: 10px 16px; gap: 12px; }
  .inline-toggles { margin-left: 0; }
  .app-main { padding: 16px; }
  .phase-section { padding-top: 40px; margin-bottom: 24px; }
  .phase-header { gap: 10px; padding-bottom: 10px; margin-bottom: 12px; flex-wrap: wrap; }
  .phase-title { font-size: 17px; }
  .phase-battery-wrap { margin-left: auto; }
  .step-body { padding-left: 20px; }
  .doc-page { padding: 32px 24px; }
}

/* ================== CONNECTION STATUS DOT (header) ================== */
.connection-banner { display: none; }
.connection-banner.error { display: block; }

.conn-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--ink-3);
  padding: 4px 8px; border-radius: 999px;
  background: var(--bg-tint);
  cursor: default;
}
.conn-status .conn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-4);
  flex-shrink: 0;
}
.conn-status[data-state="loaded"] .conn-dot {
  background: var(--phase-billing);
  box-shadow: 0 0 0 0 oklch(0.6 0.12 145 / 0.5);
  animation: connPulseLive 3s infinite;
}
@keyframes connPulseLive {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.6 0.12 145 / 0); }
  50%      { box-shadow: 0 0 0 4px oklch(0.6 0.12 145 / 0.15); }
}
.conn-status[data-state="loading"] .conn-dot {
  background: var(--accent);
  animation: connPulseLoad 1.2s infinite ease-in-out;
}
@keyframes connPulseLoad {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
.conn-status[data-state="error"] .conn-dot { background: var(--decision); }
.conn-status[data-state="disabled"] .conn-dot { background: var(--ink-4); }
.conn-status .conn-label {
  white-space: nowrap;
  text-transform: lowercase;
}
@media (max-width: 640px) {
  .conn-status .conn-label { display: none; }
}

/* ================== ESTIMATE LOOKUP — LIVE STATE DIM ================== */
/* When liveStepN is set, dim non-live swim-lane dots and disable timeline non-live cards. */
.swim-grid.has-live .swim-cell:not(.live-cell) .swim-dot {
  opacity: 0.32;
  filter: saturate(0.5);
  transition: opacity 200ms;
}
.swim-grid.has-live .swim-cell:not(.live-cell) .swim-dot:hover { opacity: 0.6; }
.swim-grid.has-live .swim-row-head { opacity: 0.6; }

.swim-cell.live-cell .swim-dot {
  cursor: pointer;
  transform: scale(1.05);
}
.swim-cell.live-cell::after {
  content: "";
  position: absolute; inset: 0;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  pointer-events: none;
  animation: liveCellPulse 1.6s ease-out infinite;
}
@keyframes liveCellPulse {
  0%   { opacity: 0.9; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.04); }
}

/* Swim drilldown popover (mock) */
.swim-drill {
  position: absolute;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--ink-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 14px 16px 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  font-size: 13px;
}
.swim-drill-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--accent); font-weight: 600;
  margin-bottom: 4px;
}
.swim-drill h4 {
  margin: 0 0 10px; font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em; line-height: 1.35;
}
.swim-drill .drill-section { margin: 10px 0; }
.swim-drill .drill-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 4px;
}
.swim-drill .drill-owner {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink);
}
.swim-drill .drill-checklist { margin: 0; padding: 0; list-style: none; }
.swim-drill .drill-checklist li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 4px 0; font-size: 12.5px; color: var(--ink-2);
  line-height: 1.45;
}
.swim-drill .drill-check {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid var(--ink-4);
  flex-shrink: 0; margin-top: 2px;
  display: grid; place-items: center;
  font-size: 10px; color: var(--paper);
}
.swim-drill .drill-check.checked { background: var(--phase-billing); border-color: var(--phase-billing); }
.swim-drill .drill-handoff {
  font-size: 12.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.swim-drill .drill-handoff strong { color: var(--ink); font-weight: 500; }
.swim-drill-close {
  position: absolute; top: 8px; right: 8px;
  border: 0; background: transparent;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  cursor: pointer; color: var(--ink-3);
  border-radius: var(--radius);
}
.swim-drill-close:hover { background: var(--bg-tint); color: var(--ink); }

/* Mobile slide-over becomes full bleed */
@media (max-width: 640px) {
  .decisions-panel { width: 100%; border-left: 0; }
  .decisions-overlay { background: var(--paper); }
}
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 9px 28px;
  text-align: center;
}
.decisions-notice {
  display: block;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--warn);
}

/* ================== NOTION EDITABLE FIELDS ================== */
.notion-fields {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.notion-fields-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.notion-fields-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.notion-fields-hint {
  font-size: 11px;
  color: var(--ink-4);
  font-style: italic;
}
.notion-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 10px;
}
@media (max-width: 700px) {
  .notion-fields-grid { grid-template-columns: 1fr; }
}
.notion-fields-wide {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notion-field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notion-field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.decision-answer-field {
  border-top: 1px dashed var(--decision);
  padding-top: 10px;
  margin-top: 4px;
}
.decision-answer-label { color: var(--decision) !important; }

/* editable controls */
.editable-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.editable-input,
.editable-select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  transition: border-color 120ms, background 120ms;
}
.editable-input:focus,
.editable-select:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.editable-select { cursor: pointer; }
.editable-textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  resize: vertical;
  line-height: 1.5;
  transition: border-color 120ms, background 120ms;
}
.editable-textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* save badge */
.save-badge {
  flex-shrink: 0;
  align-self: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms;
}
.save-badge.saving {
  visibility: visible;
  opacity: 1;
  background: var(--bg-tint);
  border-color: var(--line);
  color: var(--ink-3);
  animation: saving-pulse 1s infinite;
}
.save-badge.saved {
  visibility: visible;
  opacity: 1;
  background: oklch(0.55 0.12 145 / 0.10);
  border-color: oklch(0.55 0.12 145 / 0.35);
  color: oklch(0.45 0.10 145);
}
.save-badge.error {
  visibility: visible;
  opacity: 1;
  background: var(--decision-soft);
  border-color: oklch(0.55 0.18 25 / 0.3);
  color: var(--decision);
}
@keyframes saving-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* connection banner variants */
.connection-banner.loading {
  background: oklch(0.55 0.06 240 / 0.08);
  border-bottom-color: oklch(0.55 0.06 240 / 0.3);
  color: var(--ink-3);
}
.connection-banner.error {
  background: var(--decision-soft);
  border-bottom-color: oklch(0.55 0.18 25 / 0.4);
  color: var(--decision);
}

/* ================================================================
   PASS A — Foundation refresh (Nov 2025)
   - Battery atom (radial + linear)
   - Estimate lookup bar
   - .live-step state across views
   - Notion overlay tier reorganization (header/discussion/grid)
   - Suggestion thread bubbles
   - Field-anchored save dots (replaces text badges)
   - Mobile [Details | Edit] tab inside expanded card
   ================================================================ */

/* ---- shared scale tweaks for touch ---- */
:root {
  --tap: 44px;            /* min touch target */
  --ok:  oklch(0.55 0.12 145);  /* saved/success green */
  --ok-soft: oklch(0.55 0.12 145 / 0.10);
  --live: var(--accent);
  --live-soft: var(--accent-soft);
  --live-line: var(--accent-line);
}

/* ---- battery atom (radial) ---- */
.battery-radial {
  --pct: 0;
  --size: 28px;
  --track: oklch(0.62 0.14 38 / 0.12);
  --fill: var(--accent);
  position: relative;
  width: var(--size); height: var(--size);
  display: inline-grid; place-items: center;
  flex-shrink: 0;
}
.battery-radial.full   { --fill: var(--ok); }
.battery-radial.empty  { --fill: var(--ink-4); }
.battery-radial svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.battery-radial circle.track { stroke: var(--track); fill: none; }
.battery-radial circle.fill  {
  stroke: var(--fill); fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 400ms ease;
}
.battery-radial .pct {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: calc(var(--size) * 0.32);
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.02em;
}
.battery-radial.sm  { --size: 22px; }
.battery-radial.md  { --size: 28px; }
.battery-radial.lg  { --size: 40px; }
.battery-radial.lg .pct { font-size: 12px; }

/* ---- battery atom (linear, capacitor-style) ---- */
.battery-linear {
  --pct: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.battery-linear .cell {
  position: relative;
  width: 28px; height: 12px;
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  padding: 1.5px;
  background: var(--paper);
}
.battery-linear .cell::after {
  content: "";
  position: absolute;
  right: -3px; top: 3px;
  width: 2px; height: 4px;
  background: var(--ink-3);
  border-radius: 0 1px 1px 0;
}
.battery-linear .cell .charge {
  display: block; height: 100%;
  width: calc(var(--pct) * 1%);
  background: var(--accent);
  border-radius: 1px;
  transition: width 400ms ease;
}
.battery-linear.full .cell .charge { background: var(--ok); }
.battery-linear .pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ================== ESTIMATE LOOKUP BAR ================== */
.lookup-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px 0;
  background: var(--bg);
}
.lookup-bar {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  flex: 0 1 420px;
  min-width: 0;
  transition: border-color 120ms, box-shadow 120ms;
}
.lookup-bar:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lookup-scan {
  border: 0; background: transparent;
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink-3);
  border-radius: var(--radius) 0 0 var(--radius);
  flex-shrink: 0;
}
.lookup-scan:hover { color: var(--accent); background: var(--accent-soft); }
.lookup-input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.lookup-input::placeholder { color: var(--ink-4); }
.lookup-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  padding-left: 4px;
  flex-shrink: 0;
}
.lookup-submit {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 16px;
  height: var(--tap);
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  flex-shrink: 0;
}
.lookup-submit:hover { background: var(--ink-2); }
.lookup-submit:disabled { opacity: 0.4; cursor: default; }

/* active lookup chip */
.lookup-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.lookup-chip .est-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.7;
  margin-right: 2px;
}
.lookup-chip-clear {
  border: 0; background: transparent;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--accent);
  border-radius: 3px;
}
.lookup-chip-clear:hover { background: oklch(0.62 0.14 38 / 0.20); }

.lookup-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  flex-shrink: 0;
}

/* ================== .LIVE-STEP STATE (all views) ================== */

/* Timeline card variant */
.step-card.live-step {
  border-color: var(--accent-line);
  border-left: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  position: relative;
}
.step-card.live-step .step-head { background: linear-gradient(to right, var(--accent-soft) 0%, transparent 60%); }
.step-card.live-step .step-num { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.live-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.live-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 oklch(0.62 0.14 38 / 0.45);
  animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.62 0.14 38 / 0.45); }
  50%      { box-shadow: 0 0 0 6px oklch(0.62 0.14 38 / 0); }
}

/* Swim-lane dot variant */
.swim-dot.live {
  --pulse-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  animation: swim-live-pulse 1.6s infinite;
  position: relative;
  z-index: 2;
}
@keyframes swim-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.62 0.14 38 / 0.55); }
  50%      { box-shadow: 0 0 0 8px oklch(0.62 0.14 38 / 0); }
}
.swim-cell.live-cell {
  background: var(--accent-soft) !important;
}
.swim-cell .live-est-chip {
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  pointer-events: none;
}

/* Kanban variant */
.kanban-card.live-step {
  border-color: var(--accent-line);
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.kanban-card.live-step .kanban-num { color: var(--accent); }

/* ================== LIVE STATUS DRILL-DOWN ================== */
.live-status {
  margin: 16px 0 4px;
  padding: 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
}
.live-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.live-status-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.live-status-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: live-pulse 1.6s infinite;
}
.live-status-est {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.live-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.live-status-block { display: flex; flex-direction: column; gap: 4px; }
.live-status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.live-status-value { font-size: 13px; color: var(--ink); }
.live-status-value strong { font-weight: 600; }

.live-checklist {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--accent-line);
}
.live-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 13px;
}
.live-check-item.done {
  border-color: oklch(0.55 0.12 145 / 0.30);
  background: var(--ok-soft);
  color: var(--ink-2);
}
.live-check-box {
  flex-shrink: 0;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ink-4);
  border-radius: 3px;
  display: grid; place-items: center;
  margin-top: 1px;
}
.live-check-item.done .live-check-box {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--paper);
}
.live-check-item.done .live-check-text { text-decoration: line-through; opacity: 0.7; }

.live-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--accent-line);
}
.live-btn {
  border: 1px solid var(--accent-line);
  background: var(--paper);
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 36px;
}
.live-btn:hover { background: var(--accent-soft); }
.live-btn.primary {
  background: var(--accent); color: var(--paper);
  border-color: var(--accent);
}
.live-btn.primary:hover { background: oklch(0.55 0.14 38); }

/* ================== MOBILE [DETAILS | EDIT] TAB ================== */
.mobile-tabs {
  display: none;  /* desktop hides */
  gap: 0;
  margin: -4px -4px 16px;
  padding: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 0;
  z-index: 4;
}
.mobile-tab {
  flex: 1;
  border: 0; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink-3);
  padding: 10px;
  cursor: pointer;
  border-radius: 3px;
  min-height: 40px;
}
.mobile-tab.on {
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.mobile-tab .tab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  margin-left: 4px;
  color: var(--ink-4);
}
.mobile-tab.on .tab-count { color: var(--ink-3); }

/* ================== NOTION OVERLAY — TIERED REDESIGN ================== */
/* Override the previous .notion-fields layout */
.notion-fields {
  margin-top: 18px;
  padding: 0;
  border-top: 0;
  background: var(--bg-tint);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Header strip — status pill + attribution */
.notion-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.notion-strip-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: auto;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
}
.status-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
}
.status-pill[data-status="Draft"]      .dot { background: var(--ink-4); }
.status-pill[data-status="Review"]     .dot { background: var(--warn); }
.status-pill[data-status="Ratified"]   .dot { background: var(--ok); }
.status-pill[data-status="Deprecated"] .dot { background: var(--decision); }
.status-pill[data-status="Ratified"]   { background: var(--ok-soft); border-color: oklch(0.55 0.12 145 / 0.30); color: oklch(0.40 0.10 145); }
.status-pill[data-status="Review"]     { background: var(--warn-soft); border-color: oklch(0.66 0.14 70 / 0.35); color: oklch(0.50 0.12 70); }

.notion-strip-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.notion-strip-meta .editor-input {
  border: 0; background: transparent;
  font-family: inherit; font-size: inherit; color: var(--ink-2);
  padding: 0 4px;
  border-bottom: 1px dashed var(--line);
  width: 110px;
  min-height: 24px;
}
.notion-strip-meta .editor-input:focus {
  outline: 0;
  border-bottom-color: var(--accent-line);
  color: var(--ink);
}

/* Discussion column — the "living" fields */
.notion-discussion {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.discussion-block { display: flex; flex-direction: column; gap: 8px; }
.discussion-head {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.discussion-head.decision-head { color: var(--decision); }
.discussion-head .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-4);
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Override grid — the "attribute" fields */
.notion-grid {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 0;
  background: var(--line-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.notion-grid > * {
  background: var(--paper);
  padding: 10px 12px;
}
.notion-grid > *:nth-child(odd) { padding-right: 16px; }
.grid-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: center;
}
.grid-row .grid-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.grid-row.full { grid-column: 1 / -1; grid-template-columns: 130px 1fr; align-items: start; }

/* ================== SUGGESTION THREAD (rebuilt) ================== */
.thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 14px;
}
.thread::before {
  content: "";
  position: absolute;
  left: 4px; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--accent-line);
  opacity: 0.5;
}
.thread-empty {
  font-style: italic;
  font-size: 12px;
  color: var(--ink-4);
  padding: 4px 0;
}
.thread-bubble {
  position: relative;
  padding: 7px 0 9px 4px;
}
.thread-bubble + .thread-bubble { border-top: 1px dashed var(--line-soft); }
.thread-bubble::before {
  content: "";
  position: absolute;
  left: -14px; top: 14px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent-line);
}
.thread-author {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2px;
}
.thread-author.no-author { color: var(--ink-3); }
.thread-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

/* Add-suggestion form */
.thread-add {
  margin-top: 10px;
  padding-left: 14px;
  display: flex;
  gap: 6px;
  position: relative;
}
.thread-add::before {
  content: "+";
  position: absolute;
  left: 0; top: 9px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px dashed var(--accent-line);
  color: var(--accent);
  font-size: 10px;
  line-height: 7px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}
.thread-add input {
  flex: 1; min-width: 0;
  border: 1px solid transparent;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  min-height: 36px;
  transition: border-color 120ms, background 120ms;
}
.thread-add input:focus {
  outline: 0;
  border-color: var(--accent-line);
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.thread-add button {
  flex-shrink: 0;
  border: 0;
  background: var(--accent);
  color: var(--paper);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 0 14px;
  min-height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.02em;
}
.thread-add button:hover:not(:disabled) { background: oklch(0.55 0.14 38); }
.thread-add button:disabled {
  background: var(--bg-tint);
  color: var(--ink-4);
  cursor: default;
}

/* ================== SAVE-STATE DOT (replaces text badges) ================== */
.savestate {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.savestate-host {
  position: relative;
  width: 100%;
  display: flex;
  align-items: stretch;
}
.savestate-dot {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  transition: background 200ms, transform 200ms;
}
.savestate-dot.idle  { background: transparent; }
.savestate-dot.saving {
  background: var(--accent);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 0.35; transform: translateY(-50%) scale(0.8); }
  50%      { opacity: 1;    transform: translateY(-50%) scale(1.15); }
}
.savestate-dot.saved {
  background: var(--ok);
  animation: dot-fade 1.6s ease-out forwards;
}
@keyframes dot-fade {
  0%   { opacity: 1; transform: translateY(-50%) scale(1.3); }
  50%  { opacity: 1; transform: translateY(-50%) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) scale(1); }
}
.savestate-dot.error {
  background: var(--decision);
  box-shadow: 0 0 0 2px oklch(0.55 0.18 25 / 0.20);
}

/* Inputs inside save-state hosts get extra right padding for the dot */
.savestate input,
.savestate textarea,
.savestate select {
  padding-right: 22px !important;
}

/* ================== NEW INPUT BASELINE (touch-safe) ================== */
.tx-input,
.tx-textarea,
.tx-select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
  min-height: 38px;
}
.tx-textarea { resize: vertical; line-height: 1.55; min-height: 64px; }
.tx-select { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%237a7468' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.tx-input:focus,
.tx-textarea:focus,
.tx-select:focus {
  outline: 0;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* On mobile, prevent iOS zoom-on-focus by upping font-size to 16px */
@media (max-width: 640px) {
  .tx-input, .tx-textarea, .tx-select,
  .lookup-input,
  .thread-add input,
  .editable-input, .editable-textarea, .editable-select,
  .suggestion-input {
    font-size: 16px !important;
  }
}

/* ================== RESPONSIVE OVERRIDES ================== */

/* Tablet portrait & smaller */
@media (max-width: 1024px) {
  .lookup-row { padding: 12px 16px 0; }
  .notion-grid { grid-template-columns: 1fr; }
  .notion-grid > *:nth-child(odd) { padding-right: 12px; }
  .live-status-grid { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  .lookup-row {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px 0;
    gap: 8px;
  }
  .lookup-bar { flex: 1; }
  .lookup-hint { display: none; }

  .notion-strip {
    padding: 10px 12px;
    gap: 8px;
  }
  .notion-strip-meta .editor-input { width: 100%; }

  .notion-discussion { padding: 12px; gap: 16px; }
  .grid-row { grid-template-columns: 1fr; gap: 4px; align-items: start; }
  .grid-row.full { grid-template-columns: 1fr; }

  /* Show mobile [Details | Edit] tab inside expanded card */
  .mobile-tabs { display: flex; }

  /* When tab=details, hide overlay; when tab=edit, hide step-cols + handoff */
  .step-body.tab-details .notion-fields { display: none; }
  .step-body.tab-edit .step-cols,
  .step-body.tab-edit .handoff-card,
  .step-body.tab-edit .live-status { display: none; }

  .step-body { padding: 14px 14px 14px 14px; background: var(--paper); }
  .live-actions .live-btn { flex: 1; }

  /* Filter bar collapses */
  .filter-bar { padding: 10px 14px; gap: 8px; }
  .filter-group { font-size: 11px; }

  /* Decisions panel in mobile is full-bleed (we'll refine in Pass C) */
  .decisions-panel { padding: 18px 18px 24px; max-height: 100vh; border-radius: 0; }
}

/* OPTIONAL: enlarge expand caret hit zone on touch */
@media (hover: none) {
  .expand-btn { width: var(--tap); height: var(--tap); }
}
.owner-suggestion-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;  /* span both columns in the 2-col grid */
}
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 28px;
  padding: 6px 0;
}
.suggestion-list-empty {
  font-style: italic;
  color: var(--ink-4);
  font-size: 11px;
  padding: 4px 8px;
}
.suggestion-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}
.suggestion-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.suggestion-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 6px 9px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  transition: border-color 120ms, background 120ms;
}
.suggestion-input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.suggestion-btn {
  flex-shrink: 0;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 120ms;
}
.suggestion-btn:hover:not(:disabled) {
  background: oklch(0.62 0.14 38 / 0.20);
}
.suggestion-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.decided-owner-field {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.decided-owner-label {
  color: var(--ink);
  font-weight: 600;
}

/* ================== HUB UNLOCK OVERLAY ================== */
/* Full-page modal; z-index above the sticky header (z=10) */
.hub-unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(31, 29, 24, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hub-unlock-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(31, 29, 24, 0.18), 0 2px 8px rgba(31, 29, 24, 0.10);
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hub-unlock-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.hub-unlock-brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.hub-unlock-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.25;
}

.hub-unlock-body {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0 0 28px;
}

.hub-unlock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-unlock-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
}
.hub-unlock-input:focus {
  border-color: var(--accent);
  background: var(--paper);
}
.hub-unlock-input.error {
  border-color: var(--decision);
  animation: hub-unlock-shake 0.3s ease;
}
@keyframes hub-unlock-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.hub-unlock-error {
  font-size: 12.5px;
  color: var(--decision);
  padding: 0 2px;
}

.hub-unlock-btn {
  width: 100%;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: -0.01em;
}
.hub-unlock-btn:hover:not(:disabled) { opacity: 0.88; }
.hub-unlock-btn:active:not(:disabled) { transform: translateY(1px); }
.hub-unlock-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---- estimate chip extensions (customer + status badges) ---- */
.cc-job-chip-customer {
  font-size: 11px;
  color: var(--ink-3);
  padding: 0 6px;
  border-left: 1px solid var(--line);
}
.cc-job-chip-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 1px 6px;
  background: var(--accent-soft);
  border-radius: 3px;
}

/* ---- job entry error line ---- */
.cc-jobentry-error {
  font-size: 12.5px;
  color: var(--decision);
  padding: 2px 4px;
  margin-top: -2px;
}