/* The Half Call — public site.

   Layout and components only. Every colour, face, radius and shadow comes from
   tokens.css; no component below hard-codes one, by rule (halfcall-design). The only
   literal colours in this file are inside the print block at the foot, which RESETS the
   themed tokens to paper — that is the rule, not an exception to it: the dark house
   never reaches paper, so a call sheet printed at one in the morning is the same sheet
   as one printed at noon.

   One deliberate departure from the app's type scale: the app's body size is 14px
   because it is a dense working tool. This is marketing prose, read rather than
   scanned, by a readership that skews sixty. Body here is 1rem and the reading
   measure is capped at 68ch. The faces, the colours and the metaphors are the app's. */

/* ── reset and base ───────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--wash);           /* the dark house's lamp; `none` in working light */
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;                       /* the body never scrolls sideways */
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
p, ul, ol, dl, figure, table { margin: 0; }
img, svg { max-width: 100%; height: auto; }

a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dsp  { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; }
.num  { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 12px 18px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  box-shadow: var(--shadow);
}
.skip:focus { left: 12px; top: 12px; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── layout ───────────────────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }

.sect { padding: 60px 0; }
.sect-tight { padding: 40px 0; }
.sect > .wrap > h2, .band > .wrap > h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.125rem);
  letter-spacing: -.02em; line-height: 1.15;
}
.sub { color: var(--ink-2); font-size: 1.0625rem; margin-top: 12px; max-width: 62ch; }
.meta { color: var(--ink-3); font-size: var(--t-base-sm); }

.band {
  background: var(--surface);
  background-image: var(--surface-lift);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 56px 0;
}

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* wide things scroll inside themselves, never the page */
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── header ───────────────────────────────────────────────────────────────── */

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark {
  font-family: var(--font-display); font-size: var(--t-3xl); font-weight: 700;
  letter-spacing: -.02em; line-height: 1;
}
.brand .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); align-self: center;
  box-shadow: 0 0 var(--bloom) var(--accent);
}

.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topnav a.tl {
  padding: 9px 12px; border-radius: var(--r-sm);
  font-size: var(--t-base-lg); color: var(--ink-2); text-decoration: none;
}
.topnav a.tl:hover { background: var(--surface-2); color: var(--ink); }
.topnav a.tl[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.navsep { width: 1px; height: 22px; background: var(--rule); margin: 0 6px; }

@media (max-width: 760px) {
  .topbar { gap: 10px; }
  .topnav { margin-left: 0; width: 100%; gap: 2px; }
  .navsep { display: none; }
}

/* ── buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 10px 16px;
  border: 1px solid var(--rule);
  background: var(--surface); background-image: var(--surface-lift);
  border-radius: var(--r-sm);
  font-size: var(--t-body); font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover { color: var(--ink); text-decoration: none; }
.btn.primary {
  background: var(--accent); background-image: none;
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--glow);
}
.btn.primary:hover { filter: brightness(1.06); color: var(--on-accent); }
.btn.big { padding: 14px 26px; font-size: 1.0625rem; border-radius: var(--r); }
.btn.wide { width: 100%; }
.btn.quiet { box-shadow: none; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.cta-fine { font-size: var(--t-base-sm); color: var(--ink-3); margin-top: 14px; }

/* ── cards, notes, chips ──────────────────────────────────────────────────── */

.card {
  background: var(--surface); background-image: var(--surface-lift);
  border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h3 { font-size: 1.0625rem; }
.card p { color: var(--ink-2); font-size: var(--t-body); margin-top: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

.note {
  background: var(--accent-wash); background-image: var(--accent-lift);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 18px;
  font-size: var(--t-body); color: var(--ink-2);
  max-width: 68ch;
}
.note b, .note strong { color: var(--accent-2); }
.note p + p { margin-top: .8em; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--t-sm);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--rule); background: var(--surface-2);
  color: var(--ink-3);
}
/* The state washes are too close to their own state colour for 11px text under the
   working light (good on good-wash is 4.35:1, warn on warn-wash 4.10:1 — both under AA).
   So a state chip keeps the card's ground and carries its state in the rule and the dot,
   which is the house rule anyway: state has form, not just colour. */
.chip.now { border-color: var(--good); background: var(--surface); color: var(--good); }
.chip.soon { border-color: var(--warn); background: var(--surface); color: var(--warn); }
.chip i {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 var(--bloom) currentColor; flex: none;
}

/* the ornamental capital used to head a feature — Bodoni, amber, restrained */
.glyph {
  font-family: var(--font-display); font-size: 1.75rem; line-height: 1;
  color: var(--accent); text-shadow: var(--glow-text);
}

/* ── the callboard: anything that is paperwork looks like paperwork ───────── */

.paper {
  background: var(--surface); background-image: var(--surface-lift);
  border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.paper .pin {
  height: 30px; background: var(--surface-2);
  border-bottom: 1px solid var(--rule-2);
  display: flex; align-items: center; justify-content: center;
}
.paper .pin i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--crit); display: block; box-shadow: 0 0 var(--bloom) var(--crit);
}
.paper pre {
  margin: 0; padding: 20px 22px;
  font-family: var(--font-mono); font-size: var(--t-sm);
  line-height: 1.75; white-space: pre-wrap;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
  overflow-x: auto;
}
.paper pre b { color: var(--ink); font-weight: 600; }

figure.illus { margin: 0; }
figure.illus figcaption {
  font-family: var(--font-mono); font-size: var(--t-sm);
  color: var(--ink-3); margin-top: 10px; text-align: center;
}

/* ── hero ─────────────────────────────────────────────────────────────────── */

.hero {
  padding: 56px 0 48px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 52px; align-items: center;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem);
  line-height: 1.05; letter-spacing: -.025em;
  margin-top: 14px;
}
.hero .lede { font-size: 1.125rem; color: var(--ink-2); margin-top: 22px; max-width: 46ch; }
@media (max-width: 940px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 32px 0 36px; } }

.pagehead { padding: 46px 0 10px; }
.pagehead h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);
  line-height: 1.1; letter-spacing: -.025em; margin-top: 10px;
}

/* ── the honest status block ──────────────────────────────────────────────── */

.status { border-left: 3px solid var(--warn); }
.status .list { list-style: none; padding: 0; margin-top: 14px; }
.status .list li { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; }
.status .list li + li { border-top: 1px solid var(--rule-2); }
.status .list .chip { flex: none; min-width: 108px; justify-content: center; }

/* ── plans ────────────────────────────────────────────────────────────────── */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; align-items: start; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.lead { border-color: var(--accent); box-shadow: var(--shadow-lift), var(--glow); }
.plan .tag {
  position: absolute; top: -11px; left: 22px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-mono); font-size: var(--t-tag);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.plan .price {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--t-5xl); line-height: 1;
  font-variant-numeric: tabular-nums; margin-top: 14px;
  color: var(--ink);
}
.plan .price small {
  font-family: var(--font-mono); font-size: var(--t-base-sm);
  color: var(--ink-3); letter-spacing: .02em;
}
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; font-size: var(--t-body); color: var(--ink-2); }
.plan ul li { display: flex; gap: 10px; padding: 6px 0; align-items: baseline; }
.plan ul li::before { content: "·"; color: var(--accent); font-weight: 700; flex: none; }
.plan .foot { margin-top: auto; padding-top: 20px; }

/* ── tables ───────────────────────────────────────────────────────────────── */

table.t { border-collapse: collapse; width: 100%; min-width: 460px; font-size: var(--t-body); }
table.t th, table.t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.t th {
  font-family: var(--font-mono); font-size: var(--t-micro);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  border-bottom-color: var(--rule);
}
table.t td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr:last-child td { border-bottom: none; }

/* ── the workflow map ─────────────────────────────────────────────────────── */

.lanes { min-width: 900px; display: grid; grid-template-columns: 140px repeat(5, minmax(0, 1fr)); }
.lane-h {
  font-family: var(--font-mono); font-size: var(--t-tag);
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 8px 10px 10px;
}
.lane-lbl {
  display: flex; align-items: center;
  padding: 16px 14px 16px 0;
  font-size: var(--t-base-sm); font-weight: 600;
  border-right: 2px solid var(--rule); border-bottom: 1px solid var(--rule-2);
}
.lane-lbl .who { display: block; }
.lane-lbl .cnt { display: block; font-size: var(--t-xs); color: var(--ink-3); font-weight: 400; margin-top: 3px; }
.cell { padding: 14px 10px; border-bottom: 1px solid var(--rule-2); min-height: 84px; }
.lanes .last { border-bottom: none; }
.nd {
  background: var(--surface); background-image: var(--surface-lift);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: var(--t-base-sm); box-shadow: var(--shadow);
}
.nd + .nd { margin-top: 8px; }
.nd .t { font-weight: 600; line-height: 1.35; color: var(--ink); }
.nd .s { font-size: var(--t-xs); color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.nd.acc { border-color: var(--accent); background-image: var(--accent-lift); }
.nd.acc .t { color: var(--accent-2); }
.nd.gd { border-color: var(--good); background: var(--good-wash); background-image: none; }
/* Ink rather than green on the green wash: --good on --good-wash is 4.35:1 in working
   light, and this is 12.5px. The wash and the rule carry the state. */
.nd.gd .t { color: var(--ink); }
.nd.mut { background: var(--surface-2); background-image: none; border-style: dashed; box-shadow: none; }

.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; font-size: var(--t-base-sm); color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 12px; border-radius: 4px; display: block; border: 1px solid var(--rule); flex: none; }
.legend i.a { background: var(--accent-wash); border-color: var(--accent); }
.legend i.g { background: var(--good-wash); border-color: var(--good); }
.legend i.m { background: var(--surface-2); border-style: dashed; }

/* ── numbered steps ───────────────────────────────────────────────────────── */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps > li {
  counter-increment: s;
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.steps > li::before {
  content: counter(s);
  font-family: var(--font-display); font-size: var(--t-4xl); line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums;
  text-shadow: var(--glow-text);
}
.steps h3 { font-size: 1.125rem; }
.steps p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
@media (max-width: 560px) { .steps > li { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; } }

/* ── the phone, for the actor page ────────────────────────────────────────── */

.phone {
  width: 100%; max-width: 300px; margin: 0 auto;
  border: 1px solid var(--rule); border-radius: 26px;
  background: var(--surface-2); background-image: none;
  box-shadow: var(--shadow-lift);
  padding: 12px;
}
/* The screen is --surface, not --paper: the speaker names are character colours at
   10.5px, and --c2 on --paper is only 4.24:1 in working light. On --surface it is 5.09. */
.phone .screen {
  border: 1px solid var(--rule-2); border-radius: 16px;
  background: var(--surface); padding: 16px 14px;
}
.phone .bar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: var(--t-tag);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 10px; border-bottom: 1px solid var(--rule-2);
}
.phone .line { display: flex; gap: 12px; padding: 9px 0; font-size: var(--t-base-sm); }
.phone .line .spk {
  font-family: var(--font-mono); font-size: var(--t-mono-sm);
  text-transform: uppercase; text-align: right; width: 74px; flex: none;
  padding-top: 2px; letter-spacing: .04em;
}
.phone .line .txt { color: var(--ink-2); }
.phone .line.mine .txt { color: var(--ink); font-weight: 500; }
.phone .line.mine { background: var(--accent-wash); border-radius: var(--r-sm); padding: 9px 8px; margin: 0 -8px; }

/* ── footer ───────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--surface); background-image: var(--surface-lift);
  padding: 44px 0 34px;
  margin-top: 20px;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.foot-grid h2 { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.foot-grid ul { list-style: none; padding: 0; margin: 12px 0 0; }
.foot-grid li { padding: 4px 0; }
.foot-grid a { color: var(--ink-2); text-decoration: none; font-size: var(--t-body); }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule-2);
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  font-size: var(--t-base-sm); color: var(--ink-3);
}

/* the theme control — named after the two states of a real theatre */
.themepick { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.themepick .lbl { font-family: var(--font-mono); font-size: var(--t-tag); letter-spacing: .14em; text-transform: uppercase; }
.themepick .grp { display: inline-flex; border: 1px solid var(--rule); border-radius: 20px; overflow: hidden; background: var(--surface-2); }
.themepick button {
  padding: 7px 13px; font-size: var(--t-base-sm); color: var(--ink-2);
  min-height: 34px;
}
.themepick button + button { border-left: 1px solid var(--rule); }
.themepick button:hover { color: var(--ink); }
.themepick button[aria-pressed="true"] {
  background: var(--accent-wash); color: var(--accent-2); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ── print. The dark house never reaches paper. ───────────────────────────── */

@media print {
  :root, [data-theme], [data-theme="dark"], [data-theme="light"] {
    --paper: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #fff;
    --ink: #000; --ink-2: #222; --ink-3: #444;
    --rule: #999; --rule-2: #ccc;
    --accent: #000; --accent-2: #000; --accent-wash: #fff;
    --good: #000; --warn: #000; --crit: #000;
    --good-wash: #fff; --warn-wash: #fff; --crit-wash: #fff;
    --on-accent: #fff;
    --surface-lift: none; --accent-lift: none; --wash: none;
    --shadow: none; --shadow-lift: none; --shadow-inset: none;
    --glow: none; --glow-text: none; --bloom: 0px;
  }
  body { background: #fff !important; font-size: 11pt; }
  * { box-shadow: none !important; text-shadow: none !important; }
  .topnav, .site-foot, .themepick, .noprint, .skip { display: none !important; }
  .printonly { display: block !important; }
  a { color: #000; text-decoration: none; }
  .card, .note, .paper { break-inside: avoid; }
  .sect { padding: 12pt 0; }
  h1, h2, h3 { break-after: avoid; }
}
.printonly { display: none; }
