/* ============================================================
   Prelude Hub — app shell + the 4 arc views (Slice ②)
   Imports tokens.css (the Flow State design system) first.
   Layout model: a persistent header + one swappable view region.
   Each view = a former standalone screen, scoped to .view--<name>.
   ============================================================ */

/* ---- shell ---- */
body.app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ph-canvas);
}

.app__header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(12, 13, 20, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(var(--ph-white-rgb), .07);
  flex-wrap: wrap;
}
.app__brand { margin-right: auto; }

/* arc stepper — doubles as nav + "where am I in the day" */
.stepper { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; background: none;
  padding: 7px 12px; border-radius: 999px;
  font-family: var(--ph-font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ph-faint);
  transition: color .15s ease, background .15s ease;
}
.step__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(var(--ph-white-rgb), .22);
  transition: background .2s ease, box-shadow .2s ease;
}
.step.is-done { color: var(--ph-muted); }
.step.is-done .step__dot { background: var(--ph-lime-2); }
.step.is-current { color: var(--ph-white); background: rgba(var(--ph-lime-rgb), .1); }
.step.is-current .step__dot { background: var(--ph-lime); box-shadow: 0 0 10px var(--ph-lime); }
.step__sep { color: var(--ph-faint); opacity: .5; font-size: 11px; }
@media (hover: hover) and (pointer: fine) {
  .step:hover { color: var(--ph-ink); }
}
@media (pointer: coarse) { .step { min-height: 44px; } }

/* ---- view region + router ---- */
.app__main { flex: 1 1 auto; display: flex; flex-direction: column; }

.view {
  flex: 1 1 auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 4vw, 56px);
  position: relative;
  overflow: hidden;            /* clips orbs; safe — flex grows with content */
}
.view.is-active { display: flex; }
/* every flexed child can shrink below its content (no overflow) */
.view :where(.ph-stage) * { min-width: 0; }

/* default root cross-fade between views (View Transitions API).
   prefers-reduced-motion already kills animations globally (tokens.css). */
@media (max-width: 1px) { /* placeholder so the block below reads cleanly */ }

/* ============================================================
   VIEW 1 · LOBBY — the WHY
   ============================================================ */
.view--lobby { background: radial-gradient(120% 90% at 82% -5%, #1e2440 0%, #14151f 52%, #0f1018 100%); }
.lobby__orb { width: 460px; height: 460px; right: -90px; top: -140px;
  background: radial-gradient(circle, rgba(var(--ph-lime-rgb), .12), transparent 65%); }

.lobby__top { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }

.lobby__main { display: flex; gap: 40px; }
.lobby__left { flex: 1.55; display: flex; flex-direction: column; }
.lobby__right { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }

.lobby__kicker { font-family: var(--ph-font-mono); font-size: 11px; letter-spacing: .3em; color: var(--ph-cyan); margin-bottom: 14px; }
.lobby__h1 { font-family: var(--ph-font-display); font-size: clamp(46px, 6vw, 78px); line-height: .94; color: var(--ph-white); letter-spacing: -.01em; }
.lobby__sub { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: var(--ph-muted); max-width: 520px; margin-top: 18px; }

/* bridge ladder */
.bridge { margin-top: 44px; padding-top: 30px; }
.bridge__cap { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.bridge__track { position: relative; height: 92px; }
.bridge__rail { position: absolute; left: 14px; right: 14px; top: 13px; height: 3px; border-radius: 2px; background: rgba(var(--ph-white-rgb), .1); }
.bridge__fill { position: absolute; left: 14px; width: 26%; top: 13px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ph-cyan), var(--ph-lime)); box-shadow: 0 0 14px rgba(var(--ph-lime-rgb), .55); }
.bridge__rungs { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.rung { flex: 1 1 0; min-width: 0; text-align: center; padding: 0 2px; }
.rung__node { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto; }
.rung__name { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ph-ink); }
.rung__meta { font-family: var(--ph-font-mono); font-size: 10.5px; color: var(--ph-faint); margin-top: 2px; }
.rung--done .rung__node { background: var(--ph-lime); color: #13131c; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; box-shadow: 0 0 16px rgba(var(--ph-lime-rgb), .5); }
.rung--now .rung__node { width: 34px; height: 34px; margin: -2px auto 0; background: var(--ph-panel-2); border: 3px solid var(--ph-lime); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 22px rgba(var(--ph-lime-rgb), .5); }
.rung--now .rung__node i { width: 11px; height: 11px; border-radius: 50%; background: var(--ph-lime); animation: phPulse 2.2s ease-in-out infinite; }
.rung--now .rung__name { font-size: 13.5px; font-weight: 800; color: var(--ph-white); margin-top: 10px; }
.rung--now .rung__meta { color: var(--ph-cyan); }
.rung--far { opacity: .6; }
.rung--far.is-dimmer { opacity: .4; }
.rung--far.is-dimmest { opacity: .32; }
.rung--far .rung__node { background: rgba(var(--ph-white-rgb), .05); border: 2px solid rgba(var(--ph-white-rgb), .18); }
.rung--far.is-dimmest .rung__node { background: transparent; border: 2px dashed rgba(var(--ph-white-rgb), .25); }
.rung--far .rung__name { font-weight: 600; color: var(--ph-muted); }

/* right column */
.math { padding: 24px 24px 22px; }
.math__rows { display: flex; flex-direction: column; gap: 13px; font-family: var(--ph-font-mono); font-size: 13px; }
.math__row { display: flex; justify-content: space-between; }
.math__row span:first-child { color: var(--ph-muted); }
.math__row span:last-child { color: var(--ph-white); font-weight: 700; }
.math__row--key span:last-child { color: var(--ph-lime); }
.math__rule { height: 1px; background: rgba(var(--ph-white-rgb), .1); margin: 18px 0 14px; }
.math__punch { font-family: var(--ph-font-display); font-style: italic; font-size: 22px; line-height: 1.25; color: var(--ph-white); }

.pays { padding: 18px 20px; }
.pays__grid { display: flex; gap: 10px; }
.pays__col { flex: 1; }
.pays__n { font-family: var(--ph-font-display); font-size: 24px; color: var(--ph-lime); }
.pays__t { font-size: 13px; font-weight: 700; color: var(--ph-ink); margin-top: 2px; }
.pays__d { font-size: 11px; color: var(--ph-faint); }

/* footer */
.lobby__foot { display: flex; align-items: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.start { padding: 20px 42px; font-size: 19px; }
.start__ic { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: rgba(19,19,28,.18); align-items: center; justify-content: center; font-size: 12px; }
.lobby__today { flex: 1; min-width: 220px; }
.lobby__today b { display: block; font-size: 14px; color: var(--ph-ink); font-weight: 600; }
.lobby__today span { font-size: 12.5px; color: var(--ph-faint); }
.laws { text-align: right; font-family: var(--ph-font-mono); font-size: 10.5px; color: var(--ph-faint); line-height: 1.6; letter-spacing: .03em; }

@media (max-width: 920px) { .lobby__main { flex-direction: column; gap: 28px; } }
@media (max-width: 520px) {
  .lobby__h1 { letter-spacing: 0; }
  .bridge__track { height: 76px; }
  .rung__meta { display: none; }
  .rung__name { font-size: 11px; }
  .lobby__foot { gap: 14px; }
  .start { width: 100%; justify-content: center; }
  .laws { text-align: left; width: 100%; }
}

/* ============================================================
   VIEW 2 · IGNITION — beat the cold open
   ============================================================ */
.view--ignition { background: radial-gradient(120% 90% at 18% -5%, #1e2440 0%, #14151f 52%, #0f1018 100%); }
.ign__orb { width: 460px; height: 460px; left: -120px; top: -160px;
  background: radial-gradient(circle, rgba(var(--ph-cyan-rgb), .12), transparent 65%); }

.ign__main { display: flex; gap: 44px; align-items: center; }
.ign__left { flex: 1.15; }
.ign__right { flex: 1; }

.ign__kicker { font-family: var(--ph-font-mono); font-size: 11px; letter-spacing: .3em; color: var(--ph-cyan); margin-bottom: 16px; }
.ign__h1 { font-family: var(--ph-font-display); font-size: clamp(44px, 5.6vw, 74px); line-height: .96; color: var(--ph-white); }
.ign__sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.5; color: var(--ph-muted); max-width: 440px; margin-top: 18px; }

.ign__cta { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ign__light { padding: 24px 46px; font-size: 22px; }
.frog { display: flex; gap: 8px; }
.frog__cell { width: 46px; height: 46px; border-radius: 12px; border: 2px solid rgba(var(--ph-white-rgb), .16);
  display: flex; align-items: center; justify-content: center; font-family: var(--ph-font-mono); font-weight: 700; color: var(--ph-faint); background: rgba(var(--ph-white-rgb), .03);
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease; }
.frog__cell.is-lit { border-color: var(--ph-lime); background: rgba(var(--ph-lime-rgb), .18); color: var(--ph-lime); box-shadow: 0 0 18px rgba(var(--ph-lime-rgb), .4); transform: translateY(-2px); }
.ign__fine { margin-top: 18px; font-family: var(--ph-font-mono); font-size: 12px; color: var(--ph-faint); }

.ladder { padding: 24px 24px 18px; }
.ladder__cap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ladder__note { font-size: 13px; color: var(--ph-muted); margin-bottom: 18px; line-height: 1.4; }
.ladder__list { display: flex; flex-direction: column; gap: 10px; }
.lead { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--ph-radius-sm);
  background: rgba(var(--ph-white-rgb), .03); border: 1px solid rgba(var(--ph-white-rgb), .08); }
.lead--easy { background: rgba(var(--ph-lime-rgb), .08); border-color: rgba(var(--ph-lime-rgb), .22); }
.lead__n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--ph-font-mono); font-size: 12px; font-weight: 700; background: rgba(var(--ph-white-rgb), .1); color: var(--ph-muted); }
.lead--easy .lead__n { background: var(--ph-lime); color: #13131c; }
.lead__body { flex: 1; }
.lead__name { font-size: 15px; font-weight: 700; color: var(--ph-white); }
.lead__meta { font-size: 12px; color: var(--ph-muted); }
.lead__tag { font-family: var(--ph-font-mono); font-size: 11px; padding: 4px 9px; border-radius: 6px; background: rgba(var(--ph-white-rgb), .06); color: var(--ph-faint); }
.lead--easy .lead__tag { color: var(--ph-lime); background: rgba(var(--ph-lime-rgb), .12); }
.ladder__more { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(var(--ph-white-rgb), .08); font-family: var(--ph-font-mono); font-size: 11px; color: var(--ph-faint); }

@media (max-width: 920px) { .ign__main { flex-direction: column; align-items: stretch; gap: 30px; } }
@media (max-width: 520px) {
  .ign__cta { gap: 14px; }
  .ign__light { width: 100%; justify-content: center; }
  .frog { width: 100%; justify-content: space-between; }
  .frog__cell { flex: 1 1 0; }
}

/* ============================================================
   VIEW 3 · FLOW — go-for-no
   ============================================================ */
.view--flow { background: radial-gradient(120% 90% at 50% -10%, #1e2440 0%, #14151f 52%, #0f1018 100%); }
.flow__orb { width: 520px; height: 420px; left: 50%; transform: translateX(-50%); top: -180px;
  background: radial-gradient(circle, rgba(var(--ph-lime-rgb), .1), transparent 65%); }

.strip { display: flex; gap: 16px; margin-bottom: 22px; }
.stat { flex: 1; border-radius: 14px; padding: 16px 18px; }
.stat__cap { display: flex; justify-content: space-between; align-items: baseline; }
.stat__cap b { font-family: var(--ph-font-mono); font-size: 11px; letter-spacing: .1em; font-weight: 400; color: var(--ph-faint); }
.stat__cap span { font-family: var(--ph-font-mono); font-size: 13px; color: var(--ph-muted); }
.stat__big { font-family: var(--ph-font-display); font-size: 40px; color: var(--ph-white); line-height: 1; margin: 4px 0 10px; }
.bar { height: 7px; border-radius: 4px; background: rgba(var(--ph-white-rgb), .08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--ph-cyan); transition: width .3s ease; }

.stat--no { flex: 1.5; }
.stat--no .stat__cap b { color: var(--ph-lime); }
.stat--no .stat__nowrap { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; }
.stat--no .stat__big { margin: 0; }
.stat--no .stat__den { font-family: var(--ph-font-mono); font-size: 16px; color: var(--ph-muted); }
.stat--no .bar { height: 9px; }
.stat--no .bar > i { background: linear-gradient(90deg, var(--ph-cyan), var(--ph-lime)); box-shadow: 0 0 16px rgba(var(--ph-lime-rgb), .5); }

.stat--mo { display: flex; flex-direction: column; justify-content: center; }
.mo { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mo i { width: 10px; height: 24px; border-radius: 3px; background: rgba(var(--ph-white-rgb), .12); transition: background .2s ease, box-shadow .2s ease; }
.mo i.on  { background: var(--ph-lime); box-shadow: 0 0 10px rgba(var(--ph-lime-rgb), .5); }
.mo i.on2 { background: var(--ph-lime-2); }
.mo__note { font-size: 12px; color: var(--ph-muted); margin-top: 8px; }

.deck { display: flex; gap: 22px; }
.card { flex: 1.5; border-radius: 18px; padding: 30px 32px; display: flex; flex-direction: column; min-height: 320px; }
.card__top { display: flex; align-items: center; gap: 10px; margin-bottom: auto; flex-wrap: wrap; }
.card__name { font-family: var(--ph-font-display); font-size: clamp(38px, 4.4vw, 52px); line-height: 1; color: var(--ph-white); margin: 18px 0 6px; }
.card__tel { font-family: var(--ph-font-mono); font-size: 22px; color: var(--ph-muted); letter-spacing: .04em; text-decoration: none; }
.card__tel:hover { color: var(--ph-cyan); }
.card__chips { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.chip { font-family: var(--ph-font-mono); font-size: 11px; padding: 5px 11px; border-radius: 7px; }
.chip--lime { color: var(--ph-lime); background: rgba(var(--ph-lime-rgb), .1); }
.chip--cyan { color: var(--ph-cyan); background: rgba(var(--ph-cyan-rgb), .1); }
.chip--mute { color: var(--ph-muted); background: rgba(var(--ph-white-rgb), .05); }
.card__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(var(--ph-white-rgb), .08); display: flex; align-items: center; gap: 10px; }
.card__foot i { width: 8px; height: 8px; border-radius: 50%; background: var(--ph-cyan); flex: none; }
.card__foot span { font-size: 13px; color: var(--ph-muted); font-style: italic; }

/* the dialer SEAM placeholder — Slice ④ drops the real call surface here */
.card__seam { margin-top: 14px; font-family: var(--ph-font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--ph-faint); border: 1px dashed rgba(var(--ph-white-rgb), .16); border-radius: 8px; padding: 8px 12px; }
.card__seam b { color: var(--ph-cyan); font-weight: 400; }

.out { flex: 1; display: flex; flex-direction: column; }
.out__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; flex: 1; }
.obtn { border: 2px solid rgba(var(--ph-white-rgb), .14); background: rgba(var(--ph-white-rgb), .03); color: var(--ph-ink);
  border-radius: 14px; font-size: 17px; font-weight: 700; padding: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .15s ease, background .15s ease, transform .1s ease; }
.obtn:active { transform: scale(.97); }
.obtn small { font-family: var(--ph-font-mono); font-size: 11px; font-weight: 500; color: var(--ph-faint); }
.obtn:hover { border-color: var(--ph-cyan); }
.obtn--no { border-color: var(--ph-lime); background: rgba(var(--ph-lime-rgb), .12); color: var(--ph-white); font-size: 18px; }
.obtn--no small { color: var(--ph-lime); }
.obtn--no:hover { background: rgba(var(--ph-lime-rgb), .2); border-color: var(--ph-lime); }
.obtn--win { grid-column: 1 / -1; border-color: var(--ph-cyan); background: rgba(var(--ph-cyan-rgb), .12); color: var(--ph-white);
  flex-direction: row; font-size: 18px; }
.obtn--win small { color: var(--ph-cyan); }
.obtn--win:hover { background: rgba(var(--ph-cyan-rgb), .2); }
.out__note { margin-top: 12px; font-family: var(--ph-font-mono); font-size: 11px; color: var(--ph-faint); text-align: center; }

@media (max-width: 980px) { .deck { flex-direction: column; } }
@media (max-width: 700px) {
  .strip { flex-wrap: wrap; }
  .strip > .stat { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .out__grid { grid-template-columns: 1fr; }
  .card { min-height: 220px; padding: 24px 22px; }
  .card__tel { font-size: 19px; }
}

/* ============================================================
   VIEW 4 · RECOVERY — don't break the chain
   ============================================================ */
.view--recovery { background: radial-gradient(120% 90% at 80% 110%, #1e2a40 0%, #14151f 52%, #0f1018 100%); }
.rec__orb { width: 560px; height: 460px; right: -120px; bottom: -200px;
  background: radial-gradient(circle, rgba(var(--ph-lime-rgb), .14), transparent 65%); }

.rec__kicker { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.rec__main { display: flex; gap: 40px; align-items: flex-start; }
.rec__left { flex: 1.1; }
.rec__right { flex: 1; }

.rec__h1 { font-family: var(--ph-font-display); font-size: clamp(48px, 6vw, 80px); line-height: .95; color: var(--ph-white); }
.rec__sub { font-size: clamp(15px, 1.4vw, 18px); color: var(--ph-muted); max-width: 380px; margin-top: 16px; line-height: 1.5; }

.tally { display: flex; gap: 14px; margin-top: 30px; }
.tcard { flex: 1; border-radius: 14px; padding: 18px; }
.tcard__n { font-family: var(--ph-font-display); font-size: 46px; line-height: 1; color: var(--ph-white); }
.tcard__l { font-family: var(--ph-font-mono); font-size: 11px; color: var(--ph-faint); letter-spacing: .06em; margin-top: 4px; }
.tcard--no { background: rgba(var(--ph-lime-rgb), .1); border: 1px solid rgba(var(--ph-lime-rgb), .3); }
.tcard--no .tcard__n { color: var(--ph-lime); }
.tcard--no .tcard__l { color: var(--ph-lime); }
.tcard--cb .tcard__n { color: var(--ph-cyan); }

.drop { margin-top: 18px; border-radius: 14px; background: rgba(var(--ph-white-rgb), .04); border: 1px dashed rgba(var(--ph-lime-rgb), .4);
  padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.drop__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--ph-lime); display: flex; align-items: center; justify-content: center;
  color: #13131c; font-size: 20px; box-shadow: 0 0 20px rgba(var(--ph-lime-rgb), .5); flex: none; }
.drop__t { font-size: 15px; font-weight: 700; color: var(--ph-white); }
.drop__d { font-size: 12.5px; color: var(--ph-muted); }

.chain__cap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chain__days { display: flex; gap: 7px; flex-wrap: wrap; }
.day { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-family: var(--ph-font-mono); font-size: 12px; background: var(--ph-lime); color: #13131c; }
.day--freeze { background: rgba(var(--ph-cyan-rgb), .18); color: var(--ph-cyan); font-size: 14px; }
.day--today { font-size: 13px; font-weight: 700; box-shadow: 0 0 16px rgba(var(--ph-lime-rgb), .55); }
.chain__note { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.chain__note i { width: 18px; height: 18px; border-radius: 5px; background: rgba(var(--ph-cyan-rgb), .18); color: var(--ph-cyan); display: flex; align-items: center; justify-content: center; font-size: 9px; flex: none; }
.chain__note span { font-size: 12.5px; color: var(--ph-muted); }
.chain__note b { color: var(--ph-ink); }

.moved { margin-top: 16px; padding: 22px; }
.moved__row { display: flex; align-items: baseline; gap: 10px; }
.moved__row b { font-family: var(--ph-font-display); font-size: 34px; color: var(--ph-white); font-weight: 400; }
.moved__row span { font-family: var(--ph-font-mono); font-size: 13px; color: var(--ph-muted); }
.moved__bar { height: 8px; border-radius: 5px; background: rgba(var(--ph-white-rgb), .1); overflow: hidden; margin: 14px 0 8px; }
.moved__bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ph-cyan), var(--ph-lime)); box-shadow: 0 0 14px rgba(var(--ph-lime-rgb), .5); }
.moved__delta { display: flex; justify-content: space-between; font-family: var(--ph-font-mono); font-size: 12px; color: var(--ph-muted); }
.moved__delta b { color: var(--ph-lime); font-weight: 700; }

.tee { margin-top: 16px; border-radius: 14px; background: rgba(var(--ph-cyan-rgb), .08); border: 1px solid rgba(var(--ph-cyan-rgb), .25);
  padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.tee__btn { border: none; background: none; text-align: left; flex: 1; }
.tee i { width: 8px; height: 8px; border-radius: 50%; background: var(--ph-cyan); flex: none; }
.tee span { font-size: 14px; color: var(--ph-cyan-2); }
.tee b { color: var(--ph-white); }
@media (hover: hover) and (pointer: fine) { .tee__btn:hover b { color: var(--ph-cyan); } }

@media (max-width: 920px) { .rec__main { flex-direction: column; gap: 28px; } }
@media (max-width: 520px) {
  .rec__kicker { gap: 10px; }
  .tally { flex-wrap: wrap; }
  .tcard { flex: 1 1 calc(50% - 7px); }
  .day { width: 30px; height: 30px; }
}

/* ===== cockpit login gate ============================================== */
.ck-login {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #14151f 0%, var(--ph-canvas) 70%);
}
.ck-login[hidden] { display: none; }
.ck-login__box {
  width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px;
  background: var(--ph-panel, #13131c); border: 1px solid var(--ph-edge, #3a3d52);
  border-radius: 18px; padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 40px rgba(var(--ph-lime-rgb, 198,242,78), .06);
}
.ck-login__brand { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: .12em; color: var(--ph-muted); }
.ck-login__brand b { color: var(--ph-ink); }
.ck-login__brand span { margin-left: 6px; color: var(--ph-lime); }
.ck-login__h1 { font-family: 'Instrument Serif', serif; font-size: 30px; line-height: 1.05; color: var(--ph-ink); margin: 2px 0 0; }
.ck-login__sub { font-size: 13px; line-height: 1.5; color: var(--ph-muted); margin: 0; }
.ck-login__input {
  width: 100%; box-sizing: border-box; margin-top: 4px;
  background: #0c0d14; border: 1px solid var(--ph-edge, #3a3d52); border-radius: 11px;
  color: var(--ph-ink); font-size: 16px; font-family: 'JetBrains Mono', monospace;
  padding: 13px 14px; letter-spacing: .04em;
}
.ck-login__input:focus-visible { outline: 2px solid var(--ph-lime); outline-offset: 1px; border-color: transparent; }
.ck-login__btn {
  width: 100%; cursor: pointer; border: 0; border-radius: 11px; padding: 13px;
  background: var(--ph-lime); color: #11140a; font-weight: 700; font-size: 15px; letter-spacing: .02em;
}
@media (hover: hover) and (pointer: fine) { .ck-login__btn:hover { filter: brightness(1.06); } }
.ck-login__btn:focus-visible { outline: 2px solid var(--ph-cyan); outline-offset: 2px; }
.ck-login__err { min-height: 16px; font-size: 12.5px; color: #ff8a8a; }

/* ===== toast =========================================================== */
.ck-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  z-index: 120; max-width: min(560px, 92vw);
  background: #1a1c28; border: 1px solid var(--ph-edge, #3a3d52); border-radius: 12px;
  color: var(--ph-ink); font-size: 13px; line-height: 1.4; padding: 11px 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.ck-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ===== VA activity panel (cockpit oversight) =========================== */
.va { margin-top: 16px; }
.va__cap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.va__trust {
  margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  color: var(--ph-cyan); letter-spacing: .03em;
}
.va__refresh {
  cursor: pointer; border: 1px solid var(--ph-edge, #3a3d52); background: transparent;
  color: var(--ph-muted); border-radius: 8px; width: 26px; height: 26px; font-size: 14px; line-height: 1;
}
@media (hover: hover) and (pointer: fine) { .va__refresh:hover { color: var(--ph-ink); border-color: var(--ph-cyan); } }
.va__empty { font-size: 12.5px; color: var(--ph-muted); line-height: 1.45; }
.va__list { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow-y: auto; }
.va__list:empty { display: none; }
.va-row {
  display: flex; align-items: center; gap: 10px;
  background: #0e0f17; border: 1px solid var(--ph-line, #23242f); border-left-width: 3px;
  border-radius: 9px; padding: 9px 11px;
}
.va-row--approve { border-left-color: var(--ph-lime); }
.va-row--fix { border-left-color: #f2c14e; }
.va-row--flag { border-left-color: #f2728a; }
.va-row.is-undone { opacity: .5; }
.va-row__main { min-width: 0; flex: 1; }
.va-row__name { font-size: 13px; color: var(--ph-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.va-row__detail { font-size: 11.5px; color: var(--ph-muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.va-row__side { flex: 0 0 auto; }
.va-row__side--undone { font-size: 11px; color: var(--ph-faint, #6a6f88); font-family: 'JetBrains Mono', monospace; }
.va-undo {
  cursor: pointer; border: 1px solid var(--ph-edge, #3a3d52); background: transparent;
  color: var(--ph-muted); border-radius: 8px; padding: 5px 11px; font-size: 12px; min-height: 32px;
}
@media (hover: hover) and (pointer: fine) { .va-undo:hover { color: var(--ph-ink); border-color: var(--ph-cyan); } }
.va-undo:focus-visible { outline: 2px solid var(--ph-cyan); outline-offset: 1px; }
