/* Marketing keeps the Gyasi tokens. Document & workspace tokens match the live n8n Obsidian & Emerald PI Suite. */
.pi-page {
  --doc-navy: #0f172a;
  --doc-slate: #1e293b;
  --doc-ink: #0f172a;
  --doc-muted: #475569;
  --doc-rule: #cbd5e1;
  --doc-soft: #f8fafc;
  --doc-emerald: #059669;
  --doc-emerald-bg: #ecfdf5;
  --doc-teal: #0d9488;
  --doc-amber: #92400e;
  --doc-amber-bg: #fffbeb;
  --doc-rose: #be123c;
  --doc-rose-bg: #fff1f2;
}

.pi-intro { padding-block: 44px 58px; }
.pi-intro-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pi-solution-index { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.pi-intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: end; margin-top: 38px; }
.pi-intro h1 { font-size: clamp(46px, 5.3vw, 82px); font-weight: 500; letter-spacing: -.06em; line-height: 1.03; }
.pi-intro h1 span {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-light) 70%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pi-intro-copy { padding-bottom: 6px; max-width: 550px; }
.pi-product-label { color: var(--accent-light); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 0; }
.pi-intro .lede { font-size: 17px; margin: 14px 0 26px; max-width: 480px; }
.pi-intro .hero-actions { gap: 24px; }
.pi-explore { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; min-height: 48px; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.pi-explore:hover { color: var(--accent); border-color: var(--accent); }
.pi-intro h1, .pi-intro-copy { animation: rise .65s both; }
.pi-intro-copy { animation-delay: .12s; }

.pi-showcase { padding-bottom: 84px; scroll-margin-top: 24px; }
.pi-showcase-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-block: 24px; border-top: 1px solid var(--line); }
.pi-showcase-heading h2 { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.035em; font-weight: 500; }
.showcase-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 680px; }
.pi-showcase-heading > span { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-light); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(0, 217, 221, 0.3); background: rgba(0, 217, 221, 0.07); white-space: nowrap; }
.pi-showcase-heading i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }

.sample-workspace {
  color-scheme: light;
  color: var(--doc-ink);
  background: #f1f5f9;
  border: 1px solid rgba(0, 217, 221, 0.3);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.sample-workspace :focus-visible { outline-color: var(--doc-emerald); }

/* Executive Obsidian Masthead */
.workspace-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 18px 28px;
  background: var(--doc-navy);
  color: #fff;
  font-size: 12px;
}
.masthead-brand { display: flex; align-items: center; gap: 14px; }
.workspace-monogram {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0, 217, 221, 0.12);
  border: 1px solid rgba(0, 217, 221, 0.28);
}
.masthead-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: #34d399;
  text-transform: uppercase;
}
.masthead-kicker i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.masthead-brand strong { display: block; font-size: 16px; font-weight: 600; color: #f8fafc; margin-top: 2px; }
.masthead-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
}
.meta-chip strong { color: #fff; font-weight: 600; }
.masthead-demand-box {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  text-align: right;
}
.masthead-demand-box span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #a7f3d0; }
.masthead-demand-box strong { font-family: var(--font-mono); font-size: 16px; color: #ecfdf5; font-weight: 700; }

/* White-Label Customizer Bar */
.whitelabel-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 28px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
}
.wl-field { display: flex; align-items: center; gap: 8px; }
.wl-field label { font-size: 11px; color: #94a3b8; font-weight: 600; white-space: nowrap; }
.wl-field input {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  width: 185px;
}
.wl-field input:focus { border-color: #10b981; outline: none; }
.wl-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.wl-presets > span { font-size: 11px; color: #94a3b8; margin-right: 2px; }
.wl-preset-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 11px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.wl-preset-btn:hover { background: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #fff; }

/* Unified Dark App-Dock Bar (Option A) */
.sample-workspace.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: 0;
  display: flex;
  flex-direction: column;
}
.sample-workspace.is-fullscreen .workspace-body-exact,
.sample-workspace.is-fullscreen .stage-panel,
.sample-workspace.is-fullscreen .prod-viewport-shell,
.sample-workspace.is-fullscreen .package-panels,
.sample-workspace.is-fullscreen .package-panels .file-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sample-workspace.is-fullscreen .stage-panel[hidden],
.sample-workspace.is-fullscreen .package-panels .file-panel[hidden] {
  display: none;
}
.sample-workspace.is-fullscreen .prod-iframe-tall {
  flex: 1;
  height: auto;
}

.workspace-dock {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.stage-controls {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.stage-controls > a {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 9px;
  padding: 12px 14px;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 3px solid transparent;
  background: transparent;
  text-decoration: none;
  transition: background .18s, border-color .18s;
  min-width: 0;
}
.stage-controls > a:hover {
  background: rgba(255, 255, 255, 0.04);
}
.stage-controls > a[aria-selected='true'] {
  border-bottom-color: #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.04) 100%);
}
.stage-number {
  color: #94a3b8;
  font: 600 11px var(--font-mono);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stage-controls > a[aria-selected='true'] .stage-number {
  background: #10b981;
  border-color: #10b981;
  color: #042f2e;
  font-weight: 700;
}
.stage-controls > a > span:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}
.stage-controls strong {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-controls small {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-controls > a[aria-selected='true'] small {
  color: #cbd5e1;
}
.stage-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.stage-badge-emerald {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
.stage-arrow { margin-left: auto; font-size: 14px; color: #64748b; }

.dock-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.6);
}

.workspace-body { padding: 28px; }
.workspace-body-exact { padding: 0; background: #0f172a; }

/* Exact Production Viewport Frame */
.prod-viewport-shell {
  display: flex;
  flex-direction: column;
  background: #0f172a;
}
.prod-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.prod-bar-btn[hidden] {
  display: none;
}
.prod-bar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.prod-bar-btn-primary {
  background: rgba(0, 217, 221, 0.12);
  border-color: rgba(0, 217, 221, 0.4);
  color: #a5f3fc;
}
.prod-bar-btn-primary:hover {
  background: rgba(0, 217, 221, 0.24);
  border-color: #00d9dd;
  color: #fff;
}
.prod-bar-btn-emerald {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}
.prod-bar-btn-emerald:hover {
  background: #059669;
  border-color: #10b981;
  color: #fff;
}

.prod-iframe {
  width: 100%;
  border: 0;
  display: block;
  background: #f8fafc;
}
.prod-iframe-tall {
  height: 920px;
}

/* Stage 03 Package Sub-tabs (Dark Slate Bar) */
.package-subtabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #162032;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.package-subtabs > a {
  display: block;
  padding: 12px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: background .18s, border-color .18s;
}
.package-subtabs > a:last-child { border-right: 0; }
.package-subtabs > a:hover { background: rgba(255, 255, 255, 0.04); }
.package-subtabs > a[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.07);
  border-bottom-color: #00d9dd;
}
.package-subtabs strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc;
}
.package-subtabs small {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
}
.package-panels .file-panel {
  max-width: none;
  margin: 0;
}
.sample-js-note { font-size: 12px; line-height: 1.7; padding: 16px 28px; margin: 0; background: #fffbeb; color: var(--doc-amber); }
.workspace-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--doc-emerald); margin: 0 0 8px; }
.stage-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.stage-heading h3 { color: var(--doc-navy); font-size: clamp(20px, 2.1vw, 28px); font-weight: 600; letter-spacing: -.035em; line-height: 1.18; }
.stage-heading > p { max-width: 320px; margin: 0 0 2px; font-size: 12px; line-height: 1.6; color: var(--doc-muted); }

.stage-panel, .file-panel, .sheet-panel { min-width: 0; scroll-margin-top: 24px; }
.sample-workspace.is-enhanced .stage-panel,
.sample-workspace.is-enhanced .file-panel,
.sample-workspace.is-enhanced .sheet-panel { animation: workspace-in .22s ease-out; }
@keyframes workspace-in { from { opacity: .45; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   STAGE 01: CHRONOLOGY WORKBENCH
   ========================================================= */
.chronology-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; align-items: start; }
.case-overview {
  padding: 22px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.rail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.case-overview h4, .surface-heading h4 { margin: 0; color: var(--doc-navy); font-size: 15px; font-weight: 700; }
.rail-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--doc-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}
.case-facts { margin: 16px 0 0; }
.case-facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding-block: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}
.case-facts dt { color: var(--doc-muted); }
.case-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.medical-figure { padding-block: 18px; border-bottom: 1px solid #e2e8f0; }
.medical-figure > span { font-size: 11px; font-weight: 600; color: var(--doc-muted); }
.medical-figure > strong {
  display: block;
  color: var(--doc-navy);
  font: 700 clamp(28px, 2.6vw, 38px) var(--font-display);
  letter-spacing: -.04em;
  margin-block: 4px;
}
.medical-figure strong span { font-size: .58em; color: var(--doc-muted); }
.medical-figure small { font-size: 11px; color: var(--doc-muted); }

.live-valuation-box {
  margin-block: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  display: grid;
  gap: 10px;
}
.live-valuation-box span { display: block; font-size: 10px; color: #94a3b8; }
.live-valuation-box strong { font-family: var(--font-mono); font-size: 15px; color: #fff; }
.live-valuation-total { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.live-valuation-total span { color: #6ee7b7; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.live-valuation-total strong { font-size: 20px; color: #34d399; }

.review-callout {
  background: var(--doc-amber-bg);
  color: var(--doc-amber);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  margin-bottom: 10px;
}
.note-marker {
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d97706;
  color: var(--doc-amber);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.review-callout strong, .reconciled-callout strong { font-size: 12px; display: block; }
.review-callout p, .reconciled-callout p { font-size: 11px; line-height: 1.55; margin: 4px 0 0; }

.reconciled-callout {
  background: var(--doc-emerald-bg);
  color: #065f46;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  border-left: 3px solid var(--doc-emerald);
}
.check-marker {
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  background: var(--doc-emerald);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}
.sample-footnote { color: var(--doc-muted); font-size: 10px; line-height: 1.6; margin: 14px 0 0; }

.timeline-column { display: grid; gap: 20px; min-width: 0; }
.timeline-surface {
  background: #fff;
  padding: 24px 26px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.surface-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}
.surface-heading span { display: block; font-size: 11px; color: var(--doc-muted); margin-top: 2px; }
.text-action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--doc-navy);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.text-action-btn:hover { border-color: var(--doc-emerald); color: var(--doc-emerald); }

.specialty-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--doc-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.filter-pill span {
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--doc-navy);
  font-size: 10px;
}
.filter-pill.is-active, .filter-pill:hover {
  background: var(--doc-navy);
  border-color: var(--doc-navy);
  color: #fff;
}
.filter-pill.is-active span, .filter-pill:hover span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.treatment-timeline { list-style: none; padding: 0; margin: 22px 0 0; }
.treatment-timeline > li { display: grid; grid-template-columns: 72px minmax(0, 1fr); position: relative; }
.timeline-date { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding-top: 3px; color: var(--doc-navy); }
.timeline-date > span { display: block; font-size: 10px; color: var(--doc-muted); font-weight: 400; margin-top: 2px; }
.timeline-entry { padding: 0 0 24px 22px; border-left: 2px solid #e2e8f0; position: relative; min-width: 0; }
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--doc-emerald);
  border-radius: 50%;
  outline: 4px solid #fff;
}
.treatment-timeline > li:last-child .timeline-entry { padding-bottom: 0; }

.entry-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 6px; }
.entry-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--doc-navy);
}
.badge-er { background: #fee2e2; color: #991b1b; }
.badge-imaging { background: #e0f2fe; color: #075985; }
.badge-rehab { background: #ecfdf5; color: #065f46; }
.badge-ortho { background: #ede9fe; color: #5b21b6; }
.entry-provider { font-size: 12px; font-weight: 600; color: var(--doc-muted); }
.entry-charge { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--doc-navy); }

.timeline-entry h4 { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 4px 0 6px; color: var(--doc-navy); }
.timeline-entry > p { font-size: 12.5px; line-height: 1.65; color: var(--doc-muted); margin: 0; }
summary { cursor: pointer; }
.source-reference { margin-top: 10px; font-size: 11px; color: var(--doc-navy); }
.source-reference summary { padding-block: 6px; width: fit-content; font-weight: 600; }
.source-reference summary:hover { color: var(--doc-emerald); }
.source-reference summary span { color: var(--doc-muted); margin-left: 8px; font-size: 10px; font-weight: 400; }
.source-reference > div {
  background: #f8fafc;
  padding: 14px 16px;
  border-left: 3px solid var(--doc-emerald);
  border-radius: 0 6px 6px 0;
  margin-top: 6px;
  line-height: 1.65;
}
.source-reference p { margin: 4px 0 10px; color: var(--doc-muted); font-family: var(--font-serif); font-size: 13px; }
.source-reference p:last-child { margin-bottom: 0; }

.timeline-gap > p {
  border-left: 2px dashed #f59e0b;
  color: var(--doc-amber);
  font-size: 11.5px;
  line-height: 1.6;
  margin: -4px 0 22px;
  padding: 12px 16px 12px 22px;
  background: #fffbeb;
  border-radius: 0 6px 6px 0;
}
.timeline-gap strong { display: block; font-weight: 700; margin-bottom: 2px; }
.timeline-gap em { font-style: normal; font-weight: 600; text-decoration: underline; }

/* Strategy Decision Card (Gate 1 Controls) */
.strategy-card {
  background: #fff;
  border: 2px solid var(--doc-navy);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.strategy-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 18px;
}
.strategy-header h4 { margin: 0; font-size: 17px; color: var(--doc-navy); }
.strategy-sync-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--doc-emerald-bg);
  color: #065f46;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.strategy-grid { display: grid; gap: 18px; }
.strategy-label { display: block; font-size: 12px; font-weight: 700; color: var(--doc-navy); margin-bottom: 8px; }
.strategy-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #94a3b8;
  background: #f8fafc;
  color: var(--doc-navy);
  font-size: 12.5px;
  font-weight: 600;
}
.strategy-hint { display: block; font-size: 11px; color: var(--doc-muted); margin-top: 6px; }
.multiplier-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mult-pill {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  transition: all .15s ease;
}
.mult-pill strong { display: block; font-size: 12px; color: var(--doc-navy); }
.mult-pill span { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--doc-muted); margin-top: 3px; }
.mult-pill.is-selected, .mult-pill:hover {
  border-color: var(--doc-emerald);
  background: var(--doc-emerald-bg);
}
.mult-pill.is-selected strong { color: #065f46; }

/* =========================================================
   STAGE 02: DEMAND REVIEW WORKSPACE
   ========================================================= */
.demand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.letter-paper {
  background: #fff;
  padding: clamp(26px, 3.5vw, 52px);
  color: var(--doc-ink);
  font: 15.5px/1.72 var(--font-serif);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}
.document-legend {
  text-align: center;
  border-block: 1px solid var(--doc-rule);
  color: var(--doc-muted);
  font: 700 9px/1.5 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 0;
  margin-bottom: 22px;
}
.letterhead {
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--doc-navy);
  font-family: var(--font-sans);
}
.letterhead > strong { color: var(--doc-navy); display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.letterhead > span { display: block; color: var(--doc-muted); font-size: 11.5px; margin-top: 4px; }
.letterhead em { font-style: normal; font-weight: 600; color: var(--doc-navy); }
.letter-date { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--font-sans); font-size: 12px; }
.letter-date span { color: var(--doc-muted); font-family: var(--font-mono); }
.letter-subject {
  background: var(--doc-soft);
  border-left: 3px solid var(--doc-navy);
  padding: 14px 18px;
  font: 12px/1.6 var(--font-sans);
  margin-block: 18px;
}
.letter-subject > strong, .letter-subject > h4 {
  display: block;
  text-transform: uppercase;
  color: var(--doc-navy);
  font-size: 11.5px;
  letter-spacing: .05em;
  margin: 0 0 8px;
  border: 0;
  padding: 0;
}
.letter-subject dl { margin: 0; }
.letter-subject dl > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.letter-subject dt { font-size: 10px; text-transform: uppercase; color: var(--doc-muted); }
.letter-subject dd { margin: 0; font-weight: 600; }

.letter-ask {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--doc-navy);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-sans);
  margin: 20px 0 0;
}
.letter-ask-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.letter-ask > div { padding: 10px 12px; border-right: 1px solid var(--doc-rule); background: #f8fafc; }
.letter-ask > div:first-child { background: var(--doc-navy); color: #fff; }
.letter-ask > div:last-child { border: 0; }
.letter-ask span { display: block; font-size: 8.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--doc-muted); line-height: 1.4; }
.letter-ask > div:first-child span { color: #94a3b8; }
.letter-ask strong { font-family: var(--font-mono); font-size: clamp(15px, 1.5vw, 20px); font-weight: 700; color: var(--doc-navy); }
.letter-ask > div:first-child strong { color: #34d399; }

.letter-paper p { margin-block: 16px; overflow-wrap: anywhere; }
.letter-paper h4 {
  font: 700 11.5px/1.6 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--doc-navy);
  border-bottom: 1px solid var(--doc-navy);
  padding-bottom: 6px;
  margin: 26px 0 14px;
}
.letter-paper h4 > span { margin-right: 8px; color: var(--doc-emerald); font-family: var(--font-mono); }
.letter-paper .locked-label { font: 10.5px/1.6 var(--font-sans); color: var(--doc-muted); margin: 8px 0 20px; }

.paragraph-editor {
  padding: 14px;
  margin-inline: -14px;
  border: 1px solid #10b981;
  border-radius: 6px;
  background: #f0fdf4;
}
.paragraph-editor > label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font: 700 10.5px/1.5 var(--font-sans);
  color: #065f46;
  margin-bottom: 8px;
}
.paragraph-editor label span { font-weight: 500; color: #047857; }
.paragraph-editor textarea {
  width: 100%;
  min-height: 180px;
  max-height: 500px;
  resize: vertical;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  background: #fff;
  color: var(--doc-ink);
  font: inherit;
  line-height: 1.7;
  padding: 10px;
  display: block;
}
.paragraph-editor textarea:focus { outline: 2px solid var(--doc-emerald); outline-offset: 2px; }
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 8px;
  font: 10.5px/1.6 var(--font-sans);
  color: #065f46;
}
.editor-footer button {
  color: #065f46;
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
}
.editor-footer button:hover { text-decoration: underline; }
.letter-paper .editor-help { font: 10.5px/1.6 var(--font-sans); color: var(--doc-muted); margin-top: 8px; }
.letter-signature { margin-top: 28px; font-family: var(--font-sans); font-size: 13px; }
.letter-signature p { margin: 0 0 18px; }
.letter-signature strong { display: block; color: var(--doc-navy); font-size: 14px; }
.letter-signature span { display: block; color: var(--doc-muted); font-size: 12px; }
.letter-paper .letter-endnote, .letter-endnote {
  border-top: 1px solid var(--doc-rule);
  padding-top: 14px;
  margin-top: 28px;
  color: var(--doc-muted);
  font: 10.5px/1.6 var(--font-sans);
}

/* Right Accuracy & Review Rail */
.review-rail { background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.rail-heading { padding: 20px; background: #0f172a; color: #f8fafc; }
.rail-heading .workspace-eyebrow { color: #34d399; }
.rail-heading h4 { font-size: 18px; color: #fff; font-weight: 600; margin: 4px 0 8px; }
.rail-heading p { font-size: 12px; line-height: 1.6; color: #cbd5e1; margin: 0 0 14px; }
.qa-score-strip { display: grid; gap: 6px; }
.qa-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #e2e8f0;
}
.qa-check span { color: #34d399; font-weight: 700; }
.qa-check em { font-style: normal; color: #6ee7b7; }

.review-detail { border-top: 1px solid #e2e8f0; }
.review-detail summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--doc-navy);
  list-style: none;
}
.review-detail summary::-webkit-details-marker { display: none; }
.review-detail summary:hover { background: var(--doc-soft); }
.detail-sign { margin-left: auto; font-size: 18px; font-weight: 400; transition: transform .2s; }
.review-detail[open] .detail-sign { transform: rotate(45deg); }
.review-detail > div { padding: 0 20px 18px; font-size: 12px; line-height: 1.65; }
.review-detail p { margin: 0 0 8px; color: var(--doc-muted); }
.review-detail small { font-size: 10.5px; color: var(--doc-muted); }

.damages-list { margin: 0; }
.damages-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  font-size: 11.5px;
}
.damages-list dt { color: var(--doc-muted); }
.damages-list dd { margin: 0; white-space: nowrap; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; }
.damages-list .damages-total {
  border-bottom: 0;
  color: var(--doc-navy);
  font-size: 13px;
  font-weight: 700;
  padding-top: 12px;
}
.damages-total dt { color: inherit; }
.review-detail .rail-caption { margin: 10px 0 0; font-size: 10.5px; }
.approval-explainer { background: #f0fdf4; }
.rail-approve-btn {
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border-radius: 6px;
  border: 0;
  background: var(--doc-emerald);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.rail-approve-btn:hover { background: #047857; }

/* =========================================================
   STAGE 03: DELIVERABLES PACKAGE HUB
   ========================================================= */
.deliverables-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 26px; align-items: start; }
.deliverable-controls { background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.deliverable-controls > a {
  display: block;
  position: relative;
  padding: 16px 20px 16px 16px;
  border-bottom: 1px solid #e2e8f0;
  border-left: 4px solid transparent;
  transition: background .2s, border-color .2s;
}
.deliverable-controls > a[aria-selected='true'] {
  border-left-color: var(--doc-emerald);
  background: #f0fdf4;
}
.deliverable-controls > a:hover { background: #f8fafc; }
.file-format {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.badge-external { background: #e0f2fe; color: #0369a1; }
.badge-internal { background: #ffe4e6; color: #be123c; }
.badge-dispatch { background: #ecfdf5; color: #047857; }
.deliverable-controls strong { display: block; font-size: 14px; color: var(--doc-navy); font-weight: 600; }
.deliverable-controls small { display: block; font-size: 11px; color: var(--doc-muted); margin-top: 3px; }
.file-arrow { position: absolute; top: 18px; right: 12px; font-size: 14px; color: #64748b; }
.deliverable-controls > p { font-size: 11px; line-height: 1.65; color: var(--doc-muted); padding: 12px 16px; margin: 0; background: #f8fafc; }

.deliverable-preview { min-width: 0; }
.file-panel { max-width: 860px; margin-inline: auto; }
.document-table { width: 100%; border-collapse: collapse; font: 12px/1.65 var(--font-sans); }
.document-table caption, .billing-table caption { font-size: 10.5px; color: var(--doc-muted); text-align: left; padding: 0 0 8px; }
.document-table th { font-weight: 500; text-align: left; }
.document-table td { text-align: right; white-space: nowrap; font-family: var(--font-mono); font-weight: 600; }
.document-table th, .document-table td { padding: 9px 10px; border-bottom: 1px solid var(--doc-rule); }
.document-table .table-total > * { background: var(--doc-navy); color: #fff; font-weight: 700; }

.hotsheet-paper, .workbook-paper, .email-preview-paper {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 28px;
  font-size: 12.5px;
  line-height: 1.68;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}
.internal-band {
  margin: -28px -28px 22px;
  background: #9f1239;
  color: #fff;
  padding: 9px 18px;
  border-radius: 7px 7px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.hotsheet-paper > h4 { font-size: 26px; letter-spacing: -.04em; color: var(--doc-navy); margin: 0; font-weight: 700; }
.hotsheet-subtitle { margin-top: 4px; color: var(--doc-muted); font-size: 12px; }
.hotsheet-strip {
  border: 1px solid var(--doc-navy);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0;
}
.hotsheet-strip > div { padding: 12px 14px; background: #f8fafc; }
.hotsheet-strip > div:first-child { background: var(--doc-navy); color: #fff; }
.hotsheet-strip > div + div { border-left: 1px solid var(--doc-rule); }
.hotsheet-strip span { font-size: 10px; color: var(--doc-muted); display: block; text-transform: uppercase; }
.hotsheet-strip > div:first-child span { color: #94a3b8; }
.hotsheet-strip strong { font-family: var(--font-mono); font-size: 18px; color: var(--doc-navy); }
.hotsheet-strip > div:first-child strong { color: #34d399; }

.hotsheet-paper h5, .sheet-panel h5, .email-body-inner h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--doc-navy);
  border-bottom: 1px solid var(--doc-navy);
  padding-bottom: 6px;
  margin: 22px 0 12px;
}
.hotsheet-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.badge-resolved {
  align-self: start;
  background: var(--doc-emerald-bg);
  color: #065f46;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.hotsheet-item p { margin: 3px 0; }
.hotsheet-item small { color: var(--doc-muted); font-size: 10.5px; }

.workbook-heading h4 { font-size: 24px; line-height: 1.15; color: var(--doc-navy); letter-spacing: -.035em; margin: 0 0 8px; }
.workbook-heading > p:last-child { font-size: 11.5px; color: var(--doc-muted); margin: 0; }
.sheet-controls { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--doc-rule); margin-top: 20px; }
.sheet-controls a {
  font-size: 11.5px;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  color: var(--doc-muted);
}
.sheet-controls a[aria-selected='true'] {
  background: #f0fdf4;
  border-bottom-color: var(--doc-emerald);
  color: var(--doc-navy);
  font-weight: 700;
}
.sheet-controls a:hover { background: var(--doc-soft); }

.workbook-summary { margin: 0; }
.workbook-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}
.workbook-summary > div:nth-child(odd) { background: #f8fafc; }
.workbook-summary dt { color: var(--doc-muted); }
.workbook-summary dd { margin: 0; font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.workbook-summary > div:last-child { background: var(--doc-navy); color: #fff; font-weight: 700; }
.workbook-summary > div:last-child dt { color: #fff; }
.workbook-summary > div:last-child dd { color: #34d399; }

.table-hint { font-size: 11px; color: var(--doc-muted); margin-bottom: 8px; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.billing-table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 11px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.billing-table th, .billing-table td { padding: 10px 10px; border: 1px solid #e2e8f0; text-align: right; white-space: nowrap; }
.billing-table thead th { background: var(--doc-navy); color: #fff; }
.billing-table th:first-child, .billing-table td:last-child { text-align: left; white-space: normal; }
.billing-table tbody th { font-weight: 600; }
.billing-table tbody tr:nth-child(even) { background: var(--doc-soft); }
.billing-table tfoot { background: #f0fdf4; font-weight: 700; }

.reconciliation-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}
.reconciliation-row strong { font-size: 12.5px; font-weight: 600; color: var(--doc-navy); }
.reconciliation-row small { display: block; font-size: 11px; color: var(--doc-muted); margin-top: 3px; }
.reconciliation-row > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #065f46;
  background: var(--doc-emerald-bg);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.reconciliation-row > span.amount-tag { background: #f1f5f9; color: var(--doc-navy); }
.workbook-footnote { font-size: 10.5px; color: var(--doc-muted); padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--doc-rule); }

/* Deliverable 04: PI-07 Delivery Email Preview */
.email-preview-paper { padding: 0; overflow: hidden; }
.email-chrome { padding: 14px 22px; background: #f8fafc; border-bottom: 1px solid #cbd5e1; font-size: 11.5px; }
.email-chrome-row { padding: 2px 0; color: var(--doc-muted); }
.email-chrome-row span { display: inline-block; width: 58px; font-weight: 600; }
.email-chrome-row strong { color: var(--doc-navy); }
.email-obsidian-header { padding: 24px 26px; background: var(--doc-navy); color: #fff; }
.email-badge-emerald {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.email-obsidian-header h4 { font-size: 24px; margin: 10px 0 4px; color: #fff; }
.email-obsidian-header p { margin: 0; font-size: 12px; color: #cbd5e1; }
.email-body-inner { padding: 24px 26px; }
.email-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.email-kpi-strip > div {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.email-kpi-strip span { display: block; font-size: 10px; color: var(--doc-muted); text-transform: uppercase; }
.email-kpi-strip strong { display: block; font-family: var(--font-mono); font-size: 14px; color: var(--doc-navy); margin-top: 2px; }
.email-asset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.asset-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.role-external { background: #e0f2fe; color: #0369a1; }
.role-internal { background: #ffe4e6; color: #be123c; }
.email-asset-card strong { display: block; font-size: 13px; color: var(--doc-navy); }
.email-asset-card small { display: block; font-size: 11px; color: var(--doc-muted); margin-top: 2px; }
.email-jump-btn {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--doc-navy);
  background: var(--doc-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.email-jump-btn:hover { background: var(--doc-emerald); border-color: var(--doc-emerald); }

/* =========================================================
   STAGE 04: FIRM CASE PORTFOLIO DASHBOARD (PI-06)
   ========================================================= */
.portfolio-shell { display: grid; gap: 18px; }
.portfolio-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.port-kpi {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--doc-navy);
  border-radius: 8px;
  padding: 16px 18px;
}
.port-kpi.kpi-blue { border-top-color: #2563eb; }
.port-kpi.kpi-amber { border-top-color: #d97706; }
.port-kpi.kpi-emerald { border-top-color: #059669; }
.port-kpi.kpi-rose { border-top-color: #e11d48; }
.port-kpi span { display: block; font-size: 11px; font-weight: 600; color: var(--doc-muted); }
.port-kpi strong { display: block; font-family: var(--font-display); font-size: 28px; color: var(--doc-navy); margin: 4px 0 2px; }
.port-kpi small { font-size: 11px; color: var(--doc-muted); }

.portfolio-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.portfolio-toolbar input {
  flex: 1 1 240px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  background: #f8fafc;
  color: var(--doc-navy);
}
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.port-filter {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--doc-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.port-filter.is-active, .port-filter:hover {
  background: var(--doc-navy);
  border-color: var(--doc-navy);
  color: #fff;
}

.portfolio-list { display: grid; gap: 10px; }
.port-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.port-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.port-status {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.status-emerald { background: var(--doc-emerald-bg); color: #065f46; }
.status-amber { background: var(--doc-amber-bg); color: var(--doc-amber); }
.status-blue { background: #dbeafe; color: #1e40af; }
.port-matter { font-family: var(--font-mono); font-size: 11px; color: var(--doc-muted); }
.port-main h4 { margin: 0 0 4px; font-size: 16px; color: var(--doc-navy); }
.port-main p { margin: 0; font-size: 12px; color: var(--doc-muted); }
.port-actions { display: flex; align-items: center; gap: 8px; }
.port-btn {
  padding: 8px 13px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--doc-navy);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.port-btn-primary { background: var(--doc-emerald); border-color: var(--doc-emerald); color: #fff; }
.port-btn:hover { border-color: var(--doc-navy); }
.port-btn-primary:hover { background: #047857; border-color: #047857; }
.port-tag {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--doc-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.portfolio-empty { text-align: center; padding: 24px; background: #fff; border-radius: 8px; color: var(--doc-muted); font-size: 13px; }

/* Workspace Bottom Navigation */
.workspace-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  padding: 18px 28px;
  border-top: 1px solid var(--doc-rule);
}
.workspace-navigation button {
  border: 1px solid #cbd5e1;
  color: var(--doc-navy);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: background .2s;
}
.workspace-navigation button:last-child { color: #fff; background: var(--doc-navy); border-color: var(--doc-navy); }
.workspace-navigation button:hover { background: #f1f5f9; }
.workspace-navigation button:last-child:hover { background: var(--doc-emerald); border-color: var(--doc-emerald); }
.workspace-navigation button:disabled { cursor: default; opacity: .4; }
.workspace-navigation > span { font-family: var(--font-mono); font-size: 11px; color: var(--doc-muted); text-align: center; }

.demo-caption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.demo-caption > span { color: #d3ded9; font-weight: 500; }

/* Architecture & Portal Cards */
.pi-workflow { padding-block: 80px 100px; border-top: 1px solid var(--line); }
.workflow-intro h2 { font-size: clamp(30px, 3.4vw, 49px); font-weight: 500; letter-spacing: -.05em; line-height: 1.12; margin-top: 20px; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 50px; }
.workflow-steps > div { padding-top: 20px; border-top: 1px solid var(--line); }
.workflow-steps > div > span { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.workflow-steps h3 { font-size: 22px; font-weight: 500; letter-spacing: -.03em; margin-top: 22px; }
.workflow-steps p { color: var(--muted); font-size: 14px; line-height: 1.75; margin: 12px 0 0; max-width: 360px; }

.portal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.portal-card {
  padding: 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .25s ease, transform .25s ease;
}
.portal-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.portal-card h3 { display: flex; justify-content: space-between; align-items: center; font-size: 22px; font-weight: 500; margin: 12px 0 8px; }
.portal-card h3 span { color: var(--accent); }
.portal-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.pi-contact {
  background: linear-gradient(135deg, #16221f 0%, #111917 100%);
  border-top: 1px solid var(--line);
  padding-block: 80px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
}
.pi-contact h2 { font-size: clamp(42px, 5.4vw, 76px); line-height: 1.02; letter-spacing: -.06em; font-weight: 500; margin: 20px 0; }
.pi-contact p { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.pi-contact .button { flex-shrink: 0; }

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .pi-intro-grid { gap: 36px; }
  .workspace-dock { flex-direction: column; }
  .dock-actions { border-top: 1px solid rgba(255, 255, 255, 0.08); justify-content: flex-end; }
  .stage-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-controls > a { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .package-subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-subtabs > a { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .chronology-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 18px; }
  .multiplier-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demand-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
  .deliverables-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .portfolio-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .pi-intro-grid { grid-template-columns: 1fr; }
  .pi-showcase-heading { flex-direction: column; align-items: flex-start; }
  .whitelabel-bar { padding: 12px 18px; }
  .wl-presets { margin-left: 0; width: 100%; }
  .prod-node-tag { display: none; }
  .prod-iframe-tall { height: 780px; }
  .chronology-layout, .demand-layout, .deliverables-layout { grid-template-columns: 1fr; }
  .deliverable-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliverable-controls > p { grid-column: 1 / -1; }
  .email-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-steps, .portal-cards { grid-template-columns: 1fr; gap: 28px; }
  .pi-contact { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .pi-showcase { padding-inline: 14px; }
  .workspace-masthead { padding: 16px; }
  .masthead-demand-box { width: 100%; text-align: left; }
  .wl-field { width: 100%; justify-content: space-between; }
  .wl-field input { width: 58%; }
  .stage-controls { grid-template-columns: 1fr 1fr; }
  .stage-controls > a { padding: 12px 10px; gap: 8px; }
  .stage-badge, .stage-arrow { display: none; }
  .package-subtabs { grid-template-columns: 1fr; }
  .prod-viewport-bar { padding: 10px 14px; }
  .prod-iframe-tall { height: 680px; }
  .workspace-body { padding: 18px 14px; }
  .workspace-body-exact { padding: 0; }
  .timeline-surface, .strategy-card, .case-overview, .letter-paper, .hotsheet-paper, .workbook-paper { padding: 18px 14px; }
  .internal-band { margin: -18px -14px 18px; }
  .treatment-timeline > li { grid-template-columns: 54px minmax(0, 1fr); }
  .timeline-entry { padding-left: 14px; }
  .entry-charge { margin-left: 0; width: 100%; }
  .multiplier-pills { grid-template-columns: 1fr; }
  .letter-ask-four, .hotsheet-strip, .deliverable-controls, .portfolio-kpis { grid-template-columns: 1fr; }
  .letter-ask > div { border-right: 0; border-bottom: 1px solid var(--doc-rule); }
  .email-asset-card { flex-direction: column; align-items: flex-start; }
  .workspace-navigation { flex-wrap: wrap; padding: 14px; }
  .workspace-navigation > span { order: -1; flex-basis: 100%; }
}

/* Nov 2026: client data section note */
.pi-privacy-more { margin: 40px 0 0; color: var(--muted); font-size: 14.5px; }
.pi-privacy-more a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   2026-11-07: Sample case leads the page. Steps 01 and 02
   sit in a bar above the window.
   ========================================================= */
.pi-showcase { padding-top: 36px; }
.pi-showcase .pi-showcase-heading { border-top: 0; padding-block: 0 28px; align-items: flex-end; gap: 48px; }
.showcase-title-block { max-width: 720px; }
.showcase-title-block h1 { font-size: clamp(32px, 3.6vw, 52px); font-weight: 500; letter-spacing: -.045em; line-height: 1.06; margin: 12px 0 12px; }
.showcase-title-block .showcase-sub { font-size: 15px; max-width: 640px; }
.showcase-cta { flex: 0 1 400px; min-width: 300px; }
.showcase-cta-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.trial-note { margin: 14px 0 6px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.price-note { margin: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-light); letter-spacing: .02em; }

.showcase-layout { display: flex; flex-direction: column; gap: 14px; }
/* Let the sample window use more of a wide screen so the embedded screens keep their full desktop layout. */
@media (min-width: 1081px) {
  .showcase-layout { margin-inline: calc(24px - clamp(22px, 5vw, 84px)); }
}
/* Two-step bar above the window: 01 -> 02 on the left, window actions on the right. */
.step-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.step-bar .stage-controls { display: flex; align-items: center; gap: 0; flex: 1 1 520px; max-width: 720px; background: transparent; border: 0; }
.step-bar .stage-controls > a {
  flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(11, 17, 32, 0.85);
}
.step-bar .stage-controls > a:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(15, 23, 42, 0.95); }
.step-bar .stage-controls > a[aria-selected='true'] {
  border-color: #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(11, 17, 32, 0.9) 100%);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.step-bar .stage-controls strong, .step-bar .stage-controls small { white-space: normal; }
.step-bar .stage-controls strong { font-size: 13.5px; line-height: 1.3; }
.step-link { flex: 0 0 34px; height: 1px; background: rgba(255, 255, 255, 0.22); position: relative; }
.step-link::after { content: ''; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 5px solid rgba(255, 255, 255, 0.4); border-right: 0; }
.step-bar .dock-actions { padding: 0; background: transparent; border: 0; flex-wrap: wrap; justify-content: flex-end; }

.pi-contact-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; flex-shrink: 0; }

@media (max-width: 1080px) {
  .pi-showcase .pi-showcase-heading { flex-direction: column; align-items: flex-start; gap: 24px; }
  .showcase-cta { flex: none; min-width: 0; max-width: 560px; }
  .showcase-layout { gap: 12px; }
  .step-bar .stage-controls { flex-basis: 100%; max-width: none; }
  .step-bar .dock-actions { width: 100%; }
}
@media (max-width: 640px) {
  .pi-showcase { padding-top: 24px; }
  .showcase-cta-actions { gap: 14px; }
  .step-bar .stage-controls > a { padding: 10px 12px; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; }
  .step-bar .stage-controls small { display: none; }
  .step-link { flex-basis: 16px; }
}
