/* ============================================================
   Launch Runway — tokens
   ============================================================ */

:root {
  --bg: #eceef1;
  --surface: #ffffff;
  --surface-2: #f5f6f9;
  --surface-3: #e8ebf0;
  --ink: #171a21;
  --ink-soft: #3b4250;
  --muted: #6b7382;
  --line: #dcdfe7;
  --line-strong: #c2c7d2;

  --accent: #2f4a8f;
  --accent-ink: #ffffff;
  --accent-wash: #e5eaf7;

  --ok: #2c6b4f;
  --ok-wash: #e2f0e9;
  --warn: #8a5a12;
  --warn-wash: #f7eeda;
  --danger: #9b2f3f;
  --danger-wash: #f8e6e8;

  --p1: #5f7398;
  --p2: #2f6f6b;
  --p3: #a9601f;
  --p4: #9b2f3f;
  --p1-wash: #e8ecf4;
  --p2-wash: #e2efee;
  --p3-wash: #f6ebdd;
  --p4-wash: #f7e7ea;

  --font-ui: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-read: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --shadow-1: 0 1px 2px rgba(23, 26, 33, .06);
  --shadow-2: 0 1px 2px rgba(23, 26, 33, .06), 0 12px 32px -20px rgba(23, 26, 33, .45);
  --shadow-3: 0 2px 6px rgba(23, 26, 33, .08), 0 28px 60px -30px rgba(23, 26, 33, .55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1116;
    --surface: #171a21;
    --surface-2: #1d2129;
    --surface-3: #242935;
    --ink: #e8eaf0;
    --ink-soft: #c2c8d6;
    --muted: #8d95a6;
    --line: #272c36;
    --line-strong: #3a414f;

    --accent: #8ba5e8;
    --accent-ink: #10131a;
    --accent-wash: #1c2435;

    --ok: #6fc49b;
    --ok-wash: #16271f;
    --warn: #d3a458;
    --warn-wash: #2a2114;
    --danger: #e0838f;
    --danger-wash: #2d181c;

    --p1: #93a7cd;
    --p2: #4fa39c;
    --p3: #d1954a;
    --p4: #d4707f;
    --p1-wash: #1a2030;
    --p2-wash: #12292a;
    --p3-wash: #2a2115;
    --p4-wash: #2c1a1f;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -22px rgba(0, 0, 0, .95);
    --shadow-3: 0 2px 8px rgba(0, 0, 0, .6), 0 30px 64px -32px rgba(0, 0, 0, 1);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1116;
  --surface: #171a21;
  --surface-2: #1d2129;
  --surface-3: #242935;
  --ink: #e8eaf0;
  --ink-soft: #c2c8d6;
  --muted: #8d95a6;
  --line: #272c36;
  --line-strong: #3a414f;

  --accent: #8ba5e8;
  --accent-ink: #10131a;
  --accent-wash: #1c2435;

  --ok: #6fc49b;
  --ok-wash: #16271f;
  --warn: #d3a458;
  --warn-wash: #2a2114;
  --danger: #e0838f;
  --danger-wash: #2d181c;

  --p1: #93a7cd;
  --p2: #4fa39c;
  --p3: #d1954a;
  --p4: #d4707f;
  --p1-wash: #1a2030;
  --p2-wash: #12292a;
  --p3-wash: #2a2115;
  --p4-wash: #2c1a1f;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -22px rgba(0, 0, 0, .95);
  --shadow-3: 0 2px 8px rgba(0, 0, 0, .6), 0 30px 64px -32px rgba(0, 0, 0, 1);
}

/* ============================================================
   base
   ============================================================ */

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }

button { font-family: inherit; }

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

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell { max-width: 1320px; margin: 0 auto; padding: 0 22px 64px; }

/* ============================================================
   masthead + stage rail
   ============================================================ */

.top {
  display: flex;
  align-items: center;
  gap: 18px 26px;
  flex-wrap: wrap;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 11px; }

.mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.brandtext { display: flex; flex-direction: column; line-height: 1.25; }
.brandtext .name { font-size: 16.5px; font-weight: 700; letter-spacing: -.02em; }
.brandtext .sub { font-size: 11.5px; color: var(--muted); }

.stagenav {
  display: flex;
  gap: 6px;
  flex: 1 1 420px;
  min-width: 0;
}

.stagebtn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink-soft);
}

.stagebtn:hover { border-color: var(--line-strong); background: var(--surface-2); }

.stagebtn[aria-current="true"] {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  color: var(--ink);
}

.stagebtn .n {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.stagebtn[aria-current="true"] .n { color: var(--accent); }
.stagebtn .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stagebtn .m { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stagebtn[disabled] { opacity: .45; cursor: not-allowed; }

.topmeta { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.savedot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

.savedot[data-tone="saving"] { color: var(--accent); }
.savedot[data-tone="error"] { color: var(--danger); }

/* ============================================================
   buttons
   ============================================================ */

.btn, .ghost, .mini {
  font-family: var(--font-ui);
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 17px;
}

.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }

.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 13px;
}

.ghost:hover { border-color: var(--accent); color: var(--accent); }
.ghost[disabled] { opacity: .45; cursor: not-allowed; }

.mini {
  background: var(--surface-2);
  color: var(--ink-soft);
  border-color: var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 9px;
}

.mini:hover { border-color: var(--accent); color: var(--accent); }
.mini[data-done="1"] { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.mini[disabled] { opacity: .45; cursor: not-allowed; }
.mini-danger:hover { border-color: var(--danger); color: var(--danger); }

.btnrow { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

/* ============================================================
   chips, labels
   ============================================================ */

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 2px 9px;
  color: var(--muted);
  white-space: nowrap;
}

.chip-sample { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.chip-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.chip-accent { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.bankid {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-wash);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: .04em;
}

.samplebar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 11px 15px;
  background: var(--warn-wash);
  border: 1px solid var(--warn);
  border-radius: var(--r-md);
}

.samplebar p { font-size: 13px; color: var(--ink-soft); flex: 1 1 320px; }

/* ============================================================
   view scaffolding
   ============================================================ */

.view { padding-top: 26px; }

.viewhead { margin-bottom: 22px; display: flex; flex-direction: column; gap: 7px; }
.viewhead h2 { font-size: 24px; font-weight: 700; }
.viewhead .lede { font-size: 14.5px; color: var(--muted); max-width: 72ch; }

.foot {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.foot p { font-size: 12.5px; color: var(--muted); max-width: 80ch; }
.foot em { font-style: normal; color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   STAGE 1 — two column work surface
   ============================================================ */

.s1 {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

@media (max-width: 940px) {
  .s1 { grid-template-columns: minmax(0, 1fr); }
  .seclist { position: static !important; }
}

.seclist {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px;
  box-shadow: var(--shadow-1);
}

.secbtn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.secbtn:hover { background: var(--surface-2); }
.secbtn[aria-current="true"] { background: var(--accent-wash); color: var(--accent); font-weight: 600; }

.secbtn .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.secbtn[aria-current="true"] .num { color: var(--accent); }
.secbtn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tick {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: 9px;
  color: transparent;
}

.tick[data-state="saved"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick[data-state="draft"] { border-color: var(--warn); border-style: dashed; }

.seclist .banktotal {
  margin-top: 6px;
  padding: 10px 9px 4px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- section work panel ---- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.panelhead {
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panelhead h3 { font-size: 19px; font-weight: 700; }
.panelhead .ask { font-family: var(--font-read); font-size: 15.5px; color: var(--ink-soft); max-width: 66ch; }

.qlist { display: flex; flex-direction: column; }

.q {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  gap: 18px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.q:nth-child(even) { background: var(--surface-2); }

@media (max-width: 720px) {
  .q { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}

.q label { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; padding-top: 7px; }

textarea, input[type="text"] {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  width: 100%;
  resize: vertical;
}

.q:nth-child(even) textarea { background: var(--surface); }

textarea::placeholder { color: var(--muted); opacity: .8; }

.panelfoot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface-2);
}

.panelfoot .note { font-size: 12.5px; color: var(--muted); flex: 1 1 200px; }

/* ---- AI status line ---- */

.aistate {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-wash);
  display: flex;
  gap: 10px;
  align-items: center;
}

.aistate[data-tone="error"] { background: var(--danger-wash); color: var(--danger); }
.aistate[hidden] { display: none; }

.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
  flex: none;
}

@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---- missing info callout ---- */

.missing {
  margin: 0;
  padding: 14px 24px;
  background: var(--warn-wash);
  border-bottom: 1px solid var(--line);
}

.missing h4 { font-size: 13px; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.missing ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); }
.missing li { margin-bottom: 3px; }

/* ---- bank output ---- */

.bankwrap { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; }

.bankhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bankhead h4 { font-size: 15px; font-weight: 700; }

.bankitems { display: flex; flex-direction: column; gap: 9px; }

.bankitem {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bankitem > header {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.bfield { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 12px; align-items: start; }

@media (max-width: 720px) {
  .bfield { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

.bfield > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
}

@media (max-width: 720px) { .bfield > span { padding-top: 0; } }

.bfield textarea { background: var(--surface); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface-3);
  border-radius: 3px;
  padding: 2px 6px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

/* ============================================================
   Message bank summary
   ============================================================ */

.mbgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
}

.mbcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mbcard h4 { font-size: 12px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.mbcard .big { font-family: var(--font-read); font-size: 16px; line-height: 1.45; color: var(--ink); }
.mbcard ol { margin: 0; padding-left: 17px; font-size: 13.5px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 5px; }
.mbcard .count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============================================================
   STAGE 2 — 28 day board
   ============================================================ */

.phase { margin-bottom: 30px; }

.phasehead {
  display: flex;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 0 0 9px 12px;
  border-left: 3px solid var(--ph);
  margin-bottom: 12px;
}

.phasehead h3 { font-size: 16.5px; font-weight: 700; color: var(--ph); }
.phasehead .days { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.phasehead .thought { font-family: var(--font-read); font-style: italic; font-size: 14px; color: var(--ink-soft); flex: 1 1 260px; }

.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.day {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ph);
  border-radius: var(--r-md);
  padding: 11px 13px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 132px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.day:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.day[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.day .dnum {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ph);
}

.day .dtheme { font-size: 13.5px; font-weight: 600; line-height: 1.32; }
.day .dmsg { font-size: 12px; color: var(--muted); line-height: 1.4; }

.day .dfoot { margin-top: auto; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

.angletag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ph);
  background: var(--ph-wash);
  border-radius: 3px;
  padding: 2px 6px;
}

.donedot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  flex: none;
}

.day.placeholder {
  cursor: default;
  border-top-color: var(--line-strong);
  background: var(--surface-2);
  box-shadow: none;
}

.day.placeholder .dtheme { color: var(--muted); font-weight: 500; }

.planbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-1);
}

.planbar .grow { flex: 1 1 260px; }
.planbar .grow p { font-size: 13px; color: var(--muted); }
.planbar .grow strong { color: var(--ink); font-weight: 600; }

.progress {
  flex: 1 1 160px;
  height: 5px;
  background: var(--surface-3);
  border-radius: 100px;
  overflow: hidden;
  min-width: 120px;
}

.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }

/* ============================================================
   drawer
   ============================================================ */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 22, .42);
  z-index: 50;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 60;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer[hidden], .scrim[hidden] { display: none; }

.drawerhead {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--ph);
  padding: 15px 20px 13px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 1;
}

.drawerhead .who { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.drawerhead .dnum { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; color: var(--ph); }
.drawerhead h3 { font-size: 17px; font-weight: 700; }

.drawerbody { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 15px; }

.dfield { display: flex; flex-direction: column; gap: 4px; }
.dfield > span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.dfield > p { font-size: 14px; line-height: 1.5; color: var(--ink); }
.dfield.read > p { font-family: var(--font-read); font-size: 15px; line-height: 1.55; }

.beliefpair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 13px;
}

.beliefpair .row { display: flex; gap: 9px; align-items: baseline; }
.beliefpair .row > span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
  width: 46px;
  padding-top: 2px;
}
.beliefpair .row > p { font-size: 13.5px; line-height: 1.45; }
.beliefpair .row.after > p { color: var(--ok); font-weight: 500; }

.uses { display: flex; flex-wrap: wrap; gap: 6px; }

.useref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  max-width: 100%;
}

.useref .bankid { flex: none; }
.useref span.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.drawerfoot {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* ============================================================
   STAGE 3 — studio
   ============================================================ */

.studio {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

@media (max-width: 940px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .context { position: static !important; }
}

.context {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ph, var(--accent));
  border-radius: var(--r-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow-1);
}

.context h3 { font-size: 15px; font-weight: 700; }
.context .cfield { display: flex; flex-direction: column; gap: 3px; }
.context .cfield > span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.context .cfield > p { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }

.steps { display: flex; flex-direction: column; gap: 16px; }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.step[data-state="locked"] { opacity: .5; }
.step[data-state="done"] { border-color: var(--line); }

.stephead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.step[data-state="locked"] .stephead { border-bottom: none; }

.stepnum {
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--muted);
}

.step[data-state="active"] .stepnum { background: var(--accent); color: var(--accent-ink); }
.step[data-state="done"] .stepnum { background: var(--ok); color: #fff; }

.stephead h3 { font-size: 15px; font-weight: 700; flex: 1 1 auto; }
.stephead .pick { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44%; }

.stepbody { padding: 17px 20px 20px; display: flex; flex-direction: column; gap: 13px; }

.formats { display: flex; flex-wrap: wrap; gap: 8px; }

.fmt {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
}

.fmt:hover { border-color: var(--accent); color: var(--accent); }
.fmt[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.optgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }

.opt {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
}

.opt:hover { border-color: var(--line-strong); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }

.opt .oname { font-size: 13.5px; font-weight: 700; }
.opt .osum { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.opt .owhy { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.hooklist { display: flex; flex-direction: column; gap: 8px; }

.hookrow {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
}

.hookrow:hover { border-color: var(--line-strong); }
.hookrow[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }

@media (max-width: 620px) {
  .hookrow { grid-template-columns: minmax(0, 1fr); }
}

.hookrow .hlabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.hookrow .htext { font-family: var(--font-read); font-size: 15.5px; line-height: 1.4; }
.hookrow .hlen { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.parts { display: flex; flex-direction: column; gap: 10px; }

.part {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 13px 14px;
}

@media (max-width: 620px) {
  .part { grid-template-columns: minmax(0, 1fr) auto; }
  .part .plabel { grid-column: 1 / -1; }
}

.part .plabel { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.part .plabel b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.part .plabel i { font-style: normal; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.part .ptext {
  font-family: var(--font-read);
  font-size: 15.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  text-wrap: pretty;
}

.part .pnote { font-size: 12px; color: var(--muted); margin-top: 5px; font-family: var(--font-ui); }

.refine {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 13px;
}

/* ============================================================
   skeleton / motion
   ============================================================ */

.skel {
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%);
  background-size: 220% 100%;
  animation: sweep 1.5s linear infinite;
  border-radius: var(--r-sm);
  display: block;
  height: 14px;
}

@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

@media (prefers-reduced-motion: reduce) {
  .skel, .pulse { animation: none; }
  .progress span, .day, .opt { transition: none; }
}

/* ============================================================
   STAGE 3 — studio additions
   ============================================================ */

.daypicker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-1);
}

.daytrack {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.daygroup { display: flex; flex-direction: column; gap: 5px; }

.daygroup .glabel {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ph);
}

.daygroup .grow2 { display: flex; gap: 4px; }

.daypill {
  position: relative;
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ph);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-soft);
}

.daypill:hover { border-color: var(--line-strong); border-top-color: var(--ph); }

.daypill[aria-pressed="true"] {
  background: var(--ph-wash);
  border-color: var(--ph);
  color: var(--ph);
  box-shadow: inset 0 0 0 1px var(--ph);
}

.daypill .pn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.daypill .pdot {
  position: absolute;
  top: 3px; right: 3px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---- step text ---- */

.qline { font-family: var(--font-read); font-size: 16.5px; line-height: 1.4; color: var(--ink); }
.hintline { font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 72ch; }
.lockline { font-size: 13px; color: var(--muted); }

.step[data-state="locked"] .stepbody { padding-top: 0; padding-bottom: 16px; }

/* ---- disclosure blocks ---- */

.own { border-top: 1px solid var(--line); padding-top: 11px; }

.own > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
}

.own > summary::-webkit-details-marker { display: none; }
.own > summary::before { content: "+ "; font-family: var(--font-mono); }
.own[open] > summary::before { content: "– "; }
.own > summary:hover { color: var(--accent); }

.ownbody { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding-top: 10px; }
.ownbody > input, .ownbody > textarea { flex: 1 1 260px; }

.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 7px; flex: 1 1 100%; }

.libitem {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
}

.libitem:hover { border-color: var(--accent); }
.libitem b { font-size: 12.5px; font-weight: 600; }
.libitem span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* ---- hooks ---- */

ol.hooklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }

.hookrow {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.hookrow .hnum {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.hookrow[aria-pressed="true"] .hnum { color: var(--accent); }

@media (max-width: 720px) {
  .hookrow { grid-template-columns: 26px minmax(0, 1fr); }
  .hookrow .hlabel { grid-column: 2; }
  .hookrow .htext { grid-column: 2; }
  .hookrow .hlen { grid-column: 2; }
}

.chosenbox {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  padding: 13px 14px;
}

.chosenbox textarea { background: var(--surface); }

/* ---- body ---- */

textarea.bodybox {
  font-family: var(--font-read);
  font-size: 15.5px;
  line-height: 1.6;
  background: var(--surface-2);
  min-height: 190px;
}

.helpqs {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 14px 15px;
}

.helpqs .bfield { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.helpqs .bfield > span {
  font-family: var(--font-ui);
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  padding-top: 0;
}
.helpqs textarea { background: var(--surface); }

/* ---- feelings ---- */

.feelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 7px; }

.feel {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
}

.feel:hover { border-color: var(--line-strong); }
.feel[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }
.feel b { font-size: 13px; font-weight: 700; }
.feel[aria-pressed="true"] b { color: var(--accent); }
.feel span { font-family: var(--font-read); font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---- CTA ---- */

.ctagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 7px; }

.ctaopt {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink);
}

.ctaopt:hover { border-color: var(--line-strong); }
.ctaopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }
.ctaopt .ctatext { font-size: 13.5px; font-weight: 500; line-height: 1.35; }

/* ---- final ---- */

.onemsg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--ok-wash);
  border: 1px solid var(--ok);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.onemsg .eyebrow { color: var(--ok); }
.onemsg b { font-family: var(--font-read); font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--ink); }

.refine { align-items: center; }
.refine .eyebrow { margin-right: 4px; }

/* ============================================================
   STAGE 2 — fixed brief vs. AI suggestions
   ============================================================ */

.phasehead .mini { margin-left: auto; }

.day .chosenline {
  font-family: var(--font-read);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}

.day.has-idea { border-color: var(--ok); }
.day.has-idea .dfoot .angletag { color: var(--ok); background: var(--ok-wash); }

/* ---- the fixed layer, visually distinct from anything generated ---- */

.fixedbrief {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ph, var(--accent));
  border-radius: var(--r-md);
  padding: 13px 15px;
}

.fixedbrief .focus {
  font-family: var(--font-read);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.fixedbrief .why {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.fixedbrief .eyebrow + .eyebrow { margin-top: 7px; }

.fixedtag {
  align-self: flex-start;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 100px;
  padding: 2px 8px;
}

/* ---- the generated layer ---- */

ol.idealist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.idea {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  cursor: pointer;
  color: var(--ink);
}

.idea:hover { border-color: var(--line-strong); }

.idea[aria-pressed="true"] {
  border-color: var(--ok);
  background: var(--ok-wash);
  box-shadow: inset 0 0 0 1px var(--ok);
}

.idea .inum {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.idea[aria-pressed="true"] .inum { color: var(--ok); }

.idea .itext {
  font-family: var(--font-read);
  font-size: 14.5px;
  line-height: 1.45;
}

.idea .iuses { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }

.idealist.story .idea .itext { font-family: var(--font-ui); font-size: 13.5px; }

/* ---- drawer footer with the selected idea ---- */

.drawerfoot { flex-direction: column; align-items: stretch; gap: 10px; }

.drawerfoot .selected {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--ok-wash);
  border: 1px solid var(--ok);
  border-radius: var(--r-md);
  padding: 10px 12px;
}

.drawerfoot .selected .eyebrow { color: var(--ok); }
.drawerfoot .selected p { font-family: var(--font-read); font-size: 14.5px; line-height: 1.45; }

/* ---- studio: the chosen idea leads the brief ---- */

.context .cfield.chosenidea {
  background: var(--ok-wash);
  border: 1px solid var(--ok);
  border-radius: var(--r-md);
  padding: 10px 11px;
}

.context .cfield.chosenidea > span { color: var(--ok); }
.context .cfield.chosenidea > p { font-family: var(--font-read); font-size: 14px; color: var(--ink); }

.daypill.ready { border-bottom: 2px solid var(--ok); }

/* the Claude connection is visible before you press anything */
#aidot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  background: currentColor;
}
#aidot[data-tone="saving"]::before { animation: pulse 1.1s ease-in-out infinite; }
#aidot:not([data-tone]) { color: var(--ok); }

/* ---- brand mark: the client's own logo ---- */

img.mark {
  width: auto;
  height: 46px;
  display: block;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  object-fit: contain;
  flex: none;
}

@media (max-width: 620px) { img.mark { height: 38px; } }

/* the failure explains itself */
.aistate { flex-wrap: wrap; }
.aistate .diag {
  flex: 1 1 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.aistate .diag code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}
.aistate .diag a.mini { text-decoration: none; display: inline-block; }

/* ============================================================
   Commercial version — header, notices, login, admin
   ============================================================ */

a.ghost { text-decoration: none; display: inline-block; }

.budget {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ok);
  background: var(--ok-wash);
  border: 1px solid var(--ok);
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.budget:empty { display: none; }
.budget[data-tone="warn"] { color: var(--warn); background: var(--warn-wash); border-color: var(--warn); }
.budget[data-tone="error"] { color: var(--danger); background: var(--danger-wash); border-color: var(--danger); }

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--danger-wash);
  border: 1px solid var(--danger);
  border-radius: var(--r-md);
}
.notice p { flex: 1 1 320px; font-size: 13.5px; color: var(--ink); }
.notice[hidden] { display: none; }

.loading { color: var(--muted); font-size: 14px; padding: 40px 0; }

.aistate[data-tone="warn"] { background: var(--warn-wash); color: var(--warn); }

/* ---------------- login / invite / reset ---------------- */

body.authpage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.authcard {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.authlogo {
  width: auto;
  height: 96px;
  align-self: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin-bottom: 4px;
}

.authcard h1 { font-size: 22px; font-weight: 700; text-align: center; }
.authlede { font-size: 14px; color: var(--ink-soft); text-align: center; line-height: 1.5; }

.authcard form { display: flex; flex-direction: column; gap: 13px; margin-top: 6px; }
.authcard form[hidden] { display: none; }
.authcard .btn { width: 100%; padding: 12px 17px; font-size: 15px; }

.afield { display: flex; flex-direction: column; gap: 5px; }
.afield[hidden] { display: none; }
.afield > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.afield input, .budgetinput {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  width: 100%;
}
.afield input:focus, .budgetinput:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.aerror {
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-wash);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.aerror[hidden] { display: none; }

.authfoot { font-size: 12.5px; color: var(--muted); text-align: center; }
.authfoot a { color: var(--accent); }

/* ---------------- admin ---------------- */

.view.admin { display: flex; flex-direction: column; gap: 22px; }

.adminrow {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 900px) { .adminrow { grid-template-columns: minmax(0, 1fr); } }

.inviteform { display: flex; flex-direction: column; gap: 12px; padding: 18px 24px 22px; }

.linkbox {
  margin: 0 24px 22px;
  padding: 14px;
  background: var(--ok-wash);
  border: 1px solid var(--ok);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.linkbox[hidden] { display: none; }
.linkbox .eyebrow { color: var(--ok); }
.linkbox code {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  user-select: all;
}

.tablewrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .mono, .who .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.emptycell { color: var(--muted); text-align: center; padding: 22px !important; }

.who { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.who b { font-weight: 600; }

.spend { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.spend .num { text-align: left; font-size: 12.5px; }
.spendbar { display: block; height: 5px; background: var(--surface-3); border-radius: 100px; overflow: hidden; }
.spendbar > span { display: block; height: 100%; background: var(--ok); }
.spendbar > span[data-tone="warn"] { background: var(--warn); }
.spendbar > span[data-tone="error"] { background: var(--danger); }

.budgetcell { display: flex; gap: 6px; align-items: center; }
.budgetinput { width: 76px; padding: 6px 8px; font-size: 13.5px; font-family: var(--font-mono); }

.chip.status-active { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.chip.status-invited { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.chip.status-disabled { color: var(--muted); }
