:root {
  color-scheme: light;
  --ink: oklch(19% 0.018 105);
  --ink-soft: oklch(36% 0.016 100);
  --paper: oklch(95% 0.018 92);
  --paper-deep: oklch(90% 0.024 88);
  --line: oklch(77% 0.025 88);
  --moss: oklch(43% 0.085 132);
  --moss-light: oklch(86% 0.075 126);
  --oxblood: oklch(39% 0.12 23);
  --yellow: oklch(86% 0.13 92);
  --green: oklch(72% 0.12 143);
  --teal: oklch(72% 0.08 187);
  --red: oklch(70% 0.13 24);
  --orange: oklch(78% 0.13 63);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Century Gothic", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 12px 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); transition: transform 160ms var(--ease); }
.skip-link:focus { transform: translateY(0); }
.shell { min-height: 100vh; }
.rail { background: var(--ink); color: var(--paper); padding: max(24px, env(safe-area-inset-top)) 20px 20px; display: grid; gap: 28px; }
.wordmark { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: .68rem; font-weight: 700; line-height: 1.2; letter-spacing: .15em; }
.stone { width: 33px; aspect-ratio: 1; display: block; background: var(--paper); clip-path: polygon(50% 0, 88% 19%, 100% 58%, 72% 100%, 24% 92%, 0 55%, 14% 14%); transform: rotate(13deg); }
.rail-nav { display: flex; overflow-x: auto; gap: 20px; scrollbar-width: none; }
.rail-nav a { color: oklch(78% 0.018 95); min-height: 44px; display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.rail-nav a span { color: oklch(58% 0.02 95); font-size: .62rem; }
.rail-nav a.active, .rail-nav a:hover { color: var(--paper); }
.rail-foot { display: none; }

main { padding: 28px clamp(20px, 5vw, 68px) 32px; overflow: hidden; }
.masthead { display: grid; gap: 28px; border-bottom: 1px solid var(--ink); padding-bottom: 36px; }
.eyebrow { margin: 0 0 8px; color: var(--moss); font-size: .69rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; }
h1 { margin: 0; max-width: 14ch; font-size: clamp(2.65rem, 8vw, 6.6rem); line-height: .88; }
h1 em { color: var(--moss); font-weight: 400; }
h2 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1; }
.masthead-actions { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.masthead-actions p { max-width: 22ch; margin: 0; color: var(--ink-soft); font-size: .76rem; }
.kill-switch { min-height: 48px; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 10px 14px; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; transition: background 180ms var(--ease), color 180ms var(--ease), transform 100ms var(--ease); }
.kill-switch:hover { background: var(--ink); color: var(--paper); }
.kill-switch:active { transform: translateY(1px); }
.kill-switch[aria-pressed="true"] { background: var(--oxblood); border-color: var(--oxblood); color: var(--paper); }
.kill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 4px color-mix(in oklch, var(--moss) 20%, transparent); }
.kill-switch[aria-pressed="true"] .kill-dot { background: var(--paper); }

.numbers { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--line); }
.number { min-height: 150px; padding: 22px 12px 22px 0; display: grid; align-content: space-between; border-right: 1px solid var(--line); }
.number:nth-child(2n) { border-right: 0; padding-left: 16px; }
.number span, .number small { color: var(--ink-soft); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.number strong { font-family: var(--serif); font-size: clamp(2.7rem, 8vw, 5.2rem); line-height: .8; font-weight: 400; font-variant-numeric: tabular-nums; }
.number.accent strong { color: var(--moss); }

.attention, .pipeline-section, .lower-grid { padding-top: clamp(52px, 9vw, 104px); }
.section-heading { display: grid; gap: 18px; margin-bottom: 28px; }
.section-heading > p { margin: 0; max-width: 54ch; color: var(--ink-soft); }
.attention-grid { border-top: 1px solid var(--ink); }
.handoff { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); animation: enter 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.handoff .reply { font-family: var(--serif); font-size: 1.22rem; line-height: 1.25; max-width: 48ch; }
.handoff-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.classification { color: var(--moss); font-weight: 700; }
.owner { justify-self: start; background: var(--ink); color: var(--paper); padding: 8px 10px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

.pipeline-heading { align-items: end; }
.pipeline-tools { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; }
.search-label { grid-column: 1 / -1; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
input[type="search"] { min-height: 48px; width: 100%; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); padding: 8px 4px; }
input[type="search"]::placeholder { color: oklch(47% 0.018 100); }
.text-action { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-size: .73rem; font-weight: 700; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.stage-legend { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: thin; }
.filter { min-height: 40px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 11px; white-space: nowrap; cursor: pointer; font-size: .67rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.filter.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.filter.yellow:not(.active)::before, .filter.green:not(.active)::before, .filter.teal:not(.active)::before, .filter.red:not(.active)::before, .filter.orange:not(.active)::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--stage-color); }
.filter.yellow { --stage-color: var(--yellow); } .filter.green { --stage-color: var(--green); } .filter.teal { --stage-color: var(--teal); } .filter.red { --stage-color: var(--red); } .filter.orange { --stage-color: var(--orange); }
.ledger-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.ledger { width: 100%; border-collapse: collapse; min-width: 900px; font-size: .82rem; }
.ledger th { padding: 12px 14px 12px 0; color: var(--ink-soft); font-size: .63rem; letter-spacing: .1em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 16px 14px 16px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.ledger tr { transition: background 160ms var(--ease); }
.ledger tbody tr:hover { background: var(--paper-deep); }
.brand-name { font-family: var(--serif); font-size: 1.08rem; }
.brand-handle, .cell-sub { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .69rem; }
.step-code { display: inline-block; min-width: 58px; padding: 5px 7px; background: var(--paper-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.stage-marker { width: 4px; padding: 0 !important; background: transparent; }
tr.stage-times_sent .stage-marker { background: var(--yellow); } tr.stage-call_booked .stage-marker { background: var(--green); }
tr.stage-ghosted_direct .stage-marker { background: var(--teal); } tr.stage-ghosted_generic .stage-marker, tr.stage-no_thanks .stage-marker { background: var(--red); }
tr.stage-come_back_later .stage-marker { background: var(--orange); }
.empty-row { padding: 34px 0 !important; color: var(--ink-soft); text-align: center; }

.lower-grid { display: grid; gap: 64px; }
.section-heading.compact { margin-bottom: 18px; }
.fleet-list, .activity-list { border-top: 1px solid var(--ink); }
.fleet-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.fleet-state { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.fleet-row[data-state="paused"] .fleet-state { background: var(--orange); }
.fleet-row[data-state="quarantined"] .fleet-state { background: var(--red); }
.fleet-row strong { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.fleet-row small { display: block; color: var(--ink-soft); }
.fleet-row > span:last-child { font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list li { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.activity-list time { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.activity-list strong { display: block; margin-bottom: 2px; font-weight: 700; text-transform: capitalize; }
.loading-row { padding: 26px 0; color: var(--ink-soft); }
footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 96px; padding-top: 18px; border-top: 1px solid var(--ink); color: var(--ink-soft); font-size: .67rem; letter-spacing: .05em; text-transform: uppercase; }
footer p { max-width: 58ch; margin: 0; }
.toast { position: fixed; z-index: 50; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); max-width: 340px; background: var(--ink); color: var(--paper); padding: 14px 18px; transform: translateY(140%); opacity: 0; transition: transform 300ms var(--ease), opacity 200ms var(--ease); font-size: .8rem; }
.toast.show { transform: translateY(0); opacity: 1; }

@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 720px) {
  .numbers { grid-template-columns: repeat(4, 1fr); }
  .number, .number:nth-child(2n) { padding: 26px 18px 26px 0; border-right: 1px solid var(--line); }
  .number + .number { padding-left: 20px; }
  .number:last-child { border-right: 0; }
  .section-heading { grid-template-columns: 1fr minmax(280px, .72fr); align-items: end; }
  .section-heading.compact { grid-template-columns: 1fr; }
  .handoff { grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.5fr) auto; align-items: center; }
  .owner { justify-self: end; }
  .lower-grid { grid-template-columns: 1fr 1.2fr; }
}

@media (min-width: 1060px) {
  .shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .rail { position: sticky; top: 0; height: 100vh; padding: 30px 26px; align-content: space-between; gap: 0; }
  .wordmark { align-self: start; }
  .rail-nav { display: grid; overflow: visible; gap: 4px; }
  .rail-nav a { justify-content: space-between; border-bottom: 1px solid oklch(35% 0.015 100); }
  .rail-foot { display: block; color: oklch(70% 0.018 95); font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
  .environment { display: inline-block; margin-bottom: 10px; padding: 5px 7px; border: 1px solid oklch(48% 0.02 100); color: var(--moss-light); }
  .masthead { grid-template-columns: 1fr auto; align-items: end; }
  .masthead-actions { display: grid; justify-items: end; }
  main { padding-top: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
