/* Aligned Profit — Swiss Grid + Client Color
   Restyled to the design handoff (overview-mockup.html). Restrained
   black / white / red base; per-client colors used everywhere a client
   appears so the operator can tell them apart at a glance. */

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

:root {
  /* Base surfaces — pure white instead of the old newsprint cream */
  --paper:     #ffffff;
  --paper-2:   #fafafa;
  --paper-3:   #f5f5f5;

  /* Rules — 2px ink for structural dividers, 1px hair (#dcdcdc) for cells */
  --rule:      #0a0a0a;
  --rule-soft: rgba(10,10,10,0.16);
  --hairline:  #dcdcdc;

  /* Text */
  --ink:       #0a0a0a;
  --ink-2:     #3a3a3a;
  --ink-3:     #757575;
  --ink-4:     #a8a8a8;

  /* Signal red — alerts, "today", active nav underline */
  --signal:    #e0432a;
  --signal-2:  #b22912;
  --signal-soft: rgba(224,67,42,0.10);

  /* Per-client palette — one color per client. Used everywhere that
     client appears (table swatch, percentage meter, charts, etc.).
     Plus "soft" backgrounds for KPI tints / soft fills. */
  --c-emerald:   #0d9f6e;   --c-emerald-s: #e3f6ee;
  --c-violet:    #6d5ef0;   --c-violet-s:  #ecebfe;
  --c-teal:      #0ea5b5;   --c-teal-s:    #e0f4f6;
  --c-amber:     #c5870f;   --c-amber-s:   #fbf2dc;
  --c-red:       #e0432a;   --c-red-s:     #fcebe7;
  --c-blue:      #2f6fed;   --c-blue-s:    #e4eefd;
  --c-magenta:   #c026a8;   --c-magenta-s: #fbe5f4;
  --c-lime:      #5a9e1e;   --c-lime-s:    #ebf5dd;
  --c-slate:     #5b6b7a;   --c-slate-s:   #e8ecf0;
  --c-rose:      #d04060;   --c-rose-s:    #fbe6ec;

  --display: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sans:    "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
.num, .tbl tbody td.num { font-variant-numeric: tabular-nums; }

button { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Masthead ─────────────────────────────────────────────── */
.mast {
  border-bottom: 2px solid var(--rule);
  padding: 18px 36px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  background: var(--paper);
}
.mast-l { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.mast-l .vol { font-family: var(--mono); }
.mast-c { text-align: center; }
.mast-c .nameplate {
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mast-c .nameplate em { font-style: normal; color: var(--signal); font-weight: 500; }
.mast-c .tag {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
  font-weight: 500;
}
.mast-r {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; font-weight: 500;
}
.mast-r .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--signal);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.mast-r .live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Slim ambient ticker — sits directly under the top-nav band, glanceable
   on every page. Hidden in print mode. */
.ticker {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper-2);
  padding: 6px 24px;
  display: flex; gap: 18px; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
  color: var(--ink-3);
}
.ticker .lbl {
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  margin-right: 6px;
}
.ticker .v { color: var(--ink); }
.ticker .delta-up { color: var(--c-emerald); margin-left: 6px; }
.ticker .delta-dn { color: var(--signal); margin-left: 6px; }
.ticker .sep { color: var(--hairline); }
body.print-mode .ticker { display: none; }

/* Sub-tab strip — secondary nav under top-nav for sections that have
   internal views (Clients · Campaigns · Accounts). Matches the top-nav
   chapter typography (Archivo uppercase, 0.08em tracking, signal-red
   active underline) at a slightly smaller scale so the hierarchy reads
   as "secondary." */
.sub-nav {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.sub-tab {
  padding: 0 18px;
  display: flex;
  align-items: center;
  height: 38px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  border-right: 1px solid var(--hairline);
  transition: color 0.12s;
}
.sub-tab:first-child { border-left: 1px solid var(--hairline); }
.sub-tab:hover { color: var(--ink); }
.sub-tab.on {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--signal);
}
body.print-mode .sub-nav { display: none; }

/* ── Section nav (chapter strip) ──────────────────────────── */
.chapter-nav {
  border-bottom: 1px solid var(--rule);
  padding: 0 36px;
  display: flex;
  gap: 0;
  background: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.chap {
  appearance: none; border: 0; background: transparent;
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: default;
  font-weight: 500;
  border-right: 1px solid var(--hairline);
  position: relative;
  font-family: var(--sans);
}
.chap:first-child { border-left: 1px solid var(--hairline); }
.chap:hover { color: var(--ink); }
.chap.active {
  color: var(--ink);
  font-weight: 600;
  background: var(--paper-2);
}
.chap.active::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--signal);
}
.chap .num { font-family: var(--mono); font-size: 10px; color: var(--ink-4); margin-right: 8px; font-weight: 400; letter-spacing: 0; }
.chap-spacer { flex: 1; }
.chap-side { display: flex; align-items: center; gap: 12px; padding: 0 4px; font-size: 11.5px; color: var(--ink-3); }

/* ── Page container ───────────────────────────────────────── */
.page {
  padding: 28px 36px 80px;
  max-width: 1440px;
  margin: 0 auto;
}
.page-h {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  font-weight: 500;
  margin-bottom: 10px;
}
.headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
  max-width: 26ch;
}
.headline em { font-style: normal; color: var(--ink); font-weight: 700; }
.dek {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-3);
  max-width: 64ch;
  margin-top: 12px;
}
.byline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-weight: 400;
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.7;
}
.byline .by-name { color: var(--ink); font-family: var(--mono); letter-spacing: 0.02em; text-transform: none; font-size: 11px; }

/* ── Editorial grid ───────────────────────────────────────── */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.rule { border-top: 1px solid var(--rule); margin: 36px 0 24px; }
.rule-hair { border-top: 1px solid var(--hairline); margin: 18px 0; }
.rule-soft { border-top: 1px solid var(--rule-soft); margin: 18px 0; }

/* ── Big stats strip (KPI lede with colored cap bars) ─────── */
.lede {
  border-bottom: 2px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.lede-cell {
  position: relative;
  padding: 18px 24px 20px;
  border-right: 1px solid var(--hairline);
}
.lede-cell:last-child { border-right: 0; }
.lede-cell::before {
  /* 4px colored cap bar on top — colored per client/category */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--ink-4);
}
.lede-cell.cap-emerald::before { background: var(--c-emerald); }
.lede-cell.cap-violet::before  { background: var(--c-violet); }
.lede-cell.cap-teal::before    { background: var(--c-teal); }
.lede-cell.cap-amber::before   { background: var(--c-amber); }
.lede-cell.cap-red::before     { background: var(--c-red); }
.lede-cell.cap-blue::before    { background: var(--c-blue); }
.lede-cell.cap-magenta::before { background: var(--c-magenta); }
.lede-cell.cap-lime::before    { background: var(--c-lime); }
.lede-cell.cap-slate::before   { background: var(--c-slate); }
.lede-cell.cap-rose::before    { background: var(--c-rose); }
.lede-cell.cap-signal::before  { background: var(--signal); }
.lede-cell.cap-ink::before     { background: var(--ink); }

.lede-lbl {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.lede-val {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 4px;
}
.lede-val.red { color: var(--signal); }
.lede-val .unit { font-size: 22px; color: var(--ink-3); font-weight: 400; font-family: var(--mono); letter-spacing: 0; margin-left: 2px; }
.lede-foot {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.lede-foot.up { color: var(--c-emerald); }
.lede-foot.dn { color: var(--signal); }
.lede-delta { color: var(--c-emerald); font-weight: 500; }
.lede-delta.dn { color: var(--signal); }

/* ── Section headers ──────────────────────────────────────── */
.sect-h {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.sect-h .l { display: flex; align-items: baseline; gap: 14px; }
.sect-h .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--signal);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.sect-h h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.sect-h h2 em { font-style: normal; color: var(--signal); font-weight: 500; }
.sect-h .meta {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Articles / cards (no rounded corners — broadsheet) ──── */
.article {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}
.article + .article { margin-top: 18px; }

/* Drop cap for editorial blocks */
.drop::first-letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3em;
  line-height: 0.9;
  float: left;
  padding: 6px 8px 0 0;
  color: var(--signal);
}

/* ── Tables ───────────────────────────────────────────────── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.tbl thead th:first-child { text-align: left; padding-left: 0; }
.tbl thead th.num { text-align: right; }
.tbl tbody td {
  text-align: right;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.tbl tbody td:first-child {
  text-align: left;
  padding-left: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.tbl tbody td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.tbl tbody tr { cursor: default; }
.tbl tbody tr:hover { background: rgba(10,10,10,0.025); }
.tbl tbody tr.selected { background: var(--signal-soft); }
.tbl .co {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.tbl .co.anon { font-style: normal; font-weight: 400; color: var(--ink-2); }
.tbl .meta-line { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; font-family: var(--mono); }
.tbl .id { font-family: var(--mono); font-size: 11px; color: var(--ink-4); letter-spacing: 0.02em; }

/* Client cell with colored swatch + name + mono sub-line.
   <div class="cli"><span class="sw bg-emerald"></span><div>Jay Grover<small>99 mailboxes</small></div></div> */
.cli { display: flex; align-items: center; gap: 11px; }
.cli .sw { width: 12px; height: 12px; flex: none; display: inline-block; }
.cli small {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 1px;
}

/* Colored percentage meter — used in pace columns.
   <span class="meter"><i class="bg-emerald" style="width:95%"></i></span><span class="pct">95%</span> */
.meter {
  display: inline-block;
  width: 96px;
  height: 8px;
  background: var(--hairline);
  vertical-align: middle;
  margin-right: 8px;
}
.meter > i { display: block; height: 100%; }
.pct { font-weight: 500; color: var(--ink); }

/* Color utility classes — text + background for the client palette */
.x-emerald { color: var(--c-emerald); } .bg-emerald { background: var(--c-emerald); }
.x-violet  { color: var(--c-violet); }  .bg-violet  { background: var(--c-violet); }
.x-teal    { color: var(--c-teal); }    .bg-teal    { background: var(--c-teal); }
.x-amber   { color: var(--c-amber); }   .bg-amber   { background: var(--c-amber); }
.x-red     { color: var(--c-red); }     .bg-red     { background: var(--c-red); }
.x-blue    { color: var(--c-blue); }    .bg-blue    { background: var(--c-blue); }
.x-magenta { color: var(--c-magenta); } .bg-magenta { background: var(--c-magenta); }
.x-lime    { color: var(--c-lime); }    .bg-lime    { background: var(--c-lime); }
.x-slate   { color: var(--c-slate); }   .bg-slate   { background: var(--c-slate); }
.x-rose    { color: var(--c-rose); }    .bg-rose    { background: var(--c-rose); }

/* ── Pills (tags, statuses) ──────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 7px;
  border: 0.5px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
}
.tag-signal { color: var(--signal); border-color: var(--signal); }
.tag-anon { color: var(--ink-3); border-style: dashed; border-color: var(--ink-4); }
.tag-mono { font-family: var(--mono); letter-spacing: 0.02em; }

/* Inline status pip (small dot) */
.pip { width: 8px; height: 8px; flex: none; display: inline-block; }
.pip-positive  { background: var(--signal); }
.pip-curious   { background: var(--ink-2); }
.pip-lukewarm  { background: var(--ink-4); }
.pip-delivered { background: var(--signal); }
.pip-qualified { background: var(--ink); }
.pip-nurture   { background: var(--ink-3); }
.pip-replied   { background: var(--ink-2); }

/* ── Charts ───────────────────────────────────────────────── */
.chart-axis text { font-family: var(--mono); font-size: 10px; fill: var(--ink-4); letter-spacing: 0.02em; }
.chart-grid line { stroke: var(--hairline); stroke-width: 0.5; }
.chart-line { fill: none; stroke: var(--ink); stroke-width: 1; }
.chart-line-2 { fill: none; stroke: var(--signal); stroke-width: 1.25; }
.chart-bar { fill: var(--ink); }
.chart-bar.signal { fill: var(--signal); }
.chart-area { fill: var(--ink); opacity: 0.04; }

/* ── Funnel (broadsheet step diagram) ─────────────────────── */
.funnel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.funnel-row {
  display: grid;
  grid-template-columns: 32px 1fr 110px 70px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.funnel-row .step {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}
.funnel-row .lbl {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.funnel-row .lbl .sub { font-family: var(--sans); font-size: 11px; color: var(--ink-3); margin-left: 8px; letter-spacing: 0.04em; text-transform: uppercase; }
.funnel-row .bar {
  position: relative;
  height: 8px;
  background: var(--paper-3);
}
.funnel-row .bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
}
.funnel-row.signal .bar > span { background: var(--signal); }
.funnel-row .v { font-family: var(--mono); font-size: 14px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.funnel-row .pct { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-align: right; }

/* ── Inbox / thread ──────────────────────────────────────── */
.inbox-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  height: calc(100vh - 240px);
  min-height: 540px;
}
.inbox-list {
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  background: var(--paper);
}
.inbox-item {
  padding: 16px 18px 16px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: default;
  display: flex; flex-direction: column; gap: 6px;
}
.inbox-item:hover { background: rgba(217,56,28,0.04); }
.inbox-item.active { background: var(--signal-soft); border-left: 3px solid var(--signal); padding-left: 16px; }
.inbox-item .row1 { display: flex; align-items: baseline; gap: 10px; }
.inbox-item .co {
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: -0.005em; color: var(--ink);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-item .ts { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); flex: none; }
.inbox-item .preview {
  font-size: 12.5px; color: var(--ink-3); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.thread-pane { display: flex; flex-direction: column; overflow: hidden; }
.thread-h { padding: 22px 28px 18px; border-bottom: 1px solid var(--rule); }
.thread-h .subj {
  font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.012em;
  color: var(--ink); margin: 0 0 6px;
}
.thread-h .meta-row { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.thread-body { flex: 1; overflow-y: auto; padding: 24px 28px; }
.msg + .msg { margin-top: 22px; }
.msg .from {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; display: flex; gap: 12px; align-items: baseline;
  border-bottom: 1px solid var(--hairline); padding-bottom: 6px; margin-bottom: 10px;
}
.msg .from .who { color: var(--ink); }
.msg .from .ts { font-family: var(--mono); margin-left: auto; letter-spacing: 0.02em; text-transform: none; color: var(--ink-4); font-weight: 400; }
.msg .body { font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--ink); max-width: 64ch; letter-spacing: 0; }
.msg.us .body { color: var(--ink-2); }
.thread-actions { padding: 16px 28px; border-top: 1px solid var(--rule); display: flex; gap: 10px; background: var(--paper-2); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  appearance: none; border: 1px solid var(--rule); background: transparent;
  color: var(--ink);
  padding: 7px 13px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: default;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-signal { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn-signal:hover { background: var(--signal-2); border-color: var(--signal-2); }
.btn-ghost { border-color: transparent; color: var(--ink-3); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { background: transparent; color: var(--ink); text-decoration: underline; }

/* ── Detail drawer ────────────────────────────────────────── */
.dossier-overlay {
  position: fixed; inset: 0; background: rgba(20,17,13,0.45); z-index: 50;
  display: flex; justify-content: flex-end;
}
.dossier {
  width: 580px; height: 100vh; background: var(--paper);
  border-left: 2px solid var(--rule);
  display: flex; flex-direction: column; overflow: hidden;
}
.dossier-h { padding: 22px 28px 16px; border-bottom: 1px solid var(--rule); }
.dossier-h .kicker { margin-bottom: 4px; }
.dossier-h .name { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.dossier-h .name em { font-style: normal; color: var(--signal); font-weight: 500; }
.dossier-h .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; letter-spacing: 0.02em; }
.dossier-body { flex: 1; overflow-y: auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 24px; }
.fact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.fact {
  padding: 14px 0;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-right: 14px;
}
.fact:nth-child(2n) { border-right: 0; padding-left: 14px; padding-right: 0; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact .l { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.fact .v { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.dossier-actions { padding: 16px 28px; border-top: 1px solid var(--rule); background: var(--paper-2); display: flex; gap: 10px; }

/* ── Scrollbars ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,26,26,0.18); border: 2px solid transparent; background-clip: content-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(26,26,26,0.32); border: 2px solid transparent; background-clip: content-box; }

/* ── Sidebar context strip (right rail) ──────────────────── */
.rail {
  border-left: 1px solid var(--hairline);
  padding-left: 24px;
}
.rail-h {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.rail-item { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.rail-item:last-child { border-bottom: 0; }
.rail-item .co { font-family: var(--sans); font-weight: 600; font-size: 13.5px; letter-spacing: -0.003em; color: var(--ink); }
.rail-item .meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.02em; }
.rail-item .ts { font-family: var(--mono); font-size: 10px; color: var(--ink-4); float: right; }

/* ── Sequence step block ─────────────────────────────────── */
.seq-step {
  display: grid;
  grid-template-columns: 64px 1fr 240px;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.seq-step:first-child { border-top: 1px solid var(--rule); }
.seq-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--signal);
}
.seq-num .day { display: block; font-family: var(--mono); font-style: normal; font-size: 10px; color: var(--ink-4); letter-spacing: 0.04em; margin-top: 4px; }
.seq-body .lbl { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -0.005em; color: var(--ink); margin-bottom: 4px; }
.seq-body .copy { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; max-width: 56ch; }
.seq-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--hairline);
  padding-left: 16px;
}
.seq-stats .s { padding: 0 8px; }
.seq-stats .s .l { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.seq-stats .s .v { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--ink); margin-top: 4px; letter-spacing: -0.015em; }

/* ── Targeting plate ─────────────────────────────────────── */
.plate {
  border: 1px solid var(--rule);
  padding: 18px 20px;
}
.plate .l { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); }
.plate .vals { display: flex; flex-wrap: wrap; gap: 6px; }
.plate .vals span {
  font-size: 11.5px; padding: 2px 8px;
  border: 0.5px solid var(--rule-soft);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono); letter-spacing: 0;
}
