/* ═══════════════════════════════════════════════════════════════
   LUDOWORK HQ

   Since 2026-10-27 in the constellation look board's direction, the
   same one the app and ludowork.co follow: one flat near-black ground,
   tiles a step lighter, hairline edges, amber as the only accent, small
   uppercase mono labels and big mono figures, rounded corners, and no
   glow, glass, blur, shadows or decorative gradients.

   The layout is still the old command screen (today and signal on the
   left, the emblem in the middle, objectives on the right, the rail of
   phases underneath); only its look changed. It used to be a Destiny 2
   character screen: chamfered corners, a purple aura, diamond bullets.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* the app's tokens (docs/Ludowork_Design_Tokens.md) */
  --void: #0B0F14;     /* the ground */
  --deep: #0D141B;     /* sunken: wells, inputs, tracks */
  --panel: #111820;    /* tiles and cards */
  --raised: #16202A;   /* hover, selected */

  --line: rgba(237, 240, 243, 0.08);
  --line-bright: rgba(237, 240, 243, 0.16);

  --ink: #EDF0F3;      /* 16.8:1 on the ground */
  --dim: #9AA4B0;      /* 7.6:1 */
  --faint: #7D8895;    /* 5.3:1, 4.9:1 on a tile: the floor for small labels */

  --gold: #E4B85F;     /* amber: the one accent. Selection, now, primary */
  --xp: #E4B85F;       /* XP is amber too, as in the app */
  --good: #8FC271;
  --attn: #E08A6A;     /* coral: overdue, stale, needs a look */
  --bad: #E5675E;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Anybody", "Arial Narrow", var(--sans);

  --chamfer: 10px;     /* now a corner radius; the name stays so markup needs no change */

  --on-gold: #0B0F14;  /* dark ink on amber, 10.4:1 */
  --on-good: #0B0F14;
  --tag-strong: #C8CEDB;
  --scrim: rgba(11, 15, 20, 0.66);
  --inspect-bg: var(--panel);
  --glyph-empty: rgba(237, 240, 243, 0.07);
  --track: rgba(237, 240, 243, 0.08);
  --xp-ink: var(--xp);
  --good-ink: var(--good);

  --gold-soft: rgba(228, 184, 95, 0.35);
  --gold-softer: rgba(228, 184, 95, 0.13);
  --good-soft: rgba(143, 194, 113, 0.35);
  --attn-soft: rgba(224, 138, 106, 0.32);
  --xp-soft: rgba(228, 184, 95, 0.3);
  --pools: none;       /* the aura is gone; a palette saved with one is ignored */
  color-scheme: dark;
}

/* ── LIGHT MODE ───────────────────────────────────────────────────
   Opt in from the top bar; the choice is remembered. Flat paper with
   white tiles, and the accent re-picked darker so it still passes
   contrast on white. Dark is the identity. */
:root[data-theme="light"] {
  --void: #F4F2EE;
  --deep: #ECE9E3;
  --panel: #FFFFFF;
  --raised: #F8F6F2;

  --line: rgba(20, 22, 28, 0.10);
  --line-bright: rgba(20, 22, 28, 0.20);

  --ink: #14161C;
  --dim: #3B3F47;      /* 9.9:1 on the paper */
  --faint: #5A606B;    /* 5.9:1 on the paper, 6.4:1 on white */

  --gold: #8A5A0F;     /* amber, darkened: 6.0:1 on white */
  --xp: #8A5A0F;
  --good: #2E7D32;
  --attn: #A8462A;
  --bad: #B3261E;

  --on-gold: #FFFFFF;
  --on-good: #FFFFFF;
  --tag-strong: #3A4150;
  --scrim: rgba(244, 242, 238, 0.8);
  --inspect-bg: var(--panel);
  --glyph-empty: rgba(20, 22, 28, 0.08);
  --track: rgba(20, 22, 28, 0.09);
  --xp-ink: var(--xp);
  --good-ink: var(--good);

  --gold-soft: rgba(138, 90, 15, 0.4);
  --gold-softer: rgba(138, 90, 15, 0.12);
  --good-soft: rgba(46, 125, 50, 0.4);
  --attn-soft: rgba(168, 70, 42, 0.35);
  --xp-soft: rgba(138, 90, 15, 0.3);
  --pools: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}


.wrap { position: relative; z-index: 1; }

/* What used to be chamfered corners: now the look board's rounded tile. */
.chamfer { border-radius: var(--chamfer); }

/* ── type ─────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-stretch: 125%; font-weight: 750; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* section heading: a small amber dot, the label, and a hairline running off it */
.head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* the tally drops to its own line rather than
                               colliding with a long label on a narrow screen */
  gap: 6px 10px;
  margin: 0 0 10px;
}
.head::before {
  content: "";
  width: 6px; height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
}
.head .label { flex: 0 1 auto; min-width: 0; }
.head::after {
  content: "";
  flex: 1 1 24px;
  min-width: 16px;
  height: 1px;
  background: var(--line);
}
.head .tally { font-family: var(--mono); font-size: 11px; color: var(--dim); flex: none; }

/* ── top bar ──────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--void);
  position: sticky;
  top: 0;
  z-index: 30;
}

.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-stretch: 130%; font-weight: 750; font-size: 16px;
  letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none; color: var(--ink);
}
.wordmark b { color: var(--gold); font-weight: 700; }

.pulse {
  width: 7px; height: 7px;
  background: var(--good);
  border-radius: 50%;
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.topbar .spacer { margin-left: auto; }

.streak-chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--faint);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 6px 11px;
}
.streak-chip .num { color: var(--gold); font-size: 12px; }
.clock { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.1em; }
.who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.who img { width: 22px; height: 22px; border-radius: 50%; }

.btn {
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.btn:hover { color: var(--ink); border-color: var(--faint); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn.primary { background: var(--gold); border-color: var(--gold); border-radius: 8px; color: var(--on-gold); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--gold) 86%, white); border-color: transparent; color: var(--on-gold); }

/* ── stage: flank · core · flank ──────────────────────────────── */
.stage {
  max-width: 1560px;
  margin: 0 auto;
  padding: 26px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.flank { display: grid; gap: 26px; }

/* ── slots (the equipment cards) ──────────────────────────────── */
.slot {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 7px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--chamfer);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.slot:last-child { margin-bottom: 0; }
.slot:hover { border-color: var(--line-bright); background: var(--raised); }
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.slot.is-on { border-color: var(--gold); background: var(--raised); }

/* the little square icon well, like an item's icon */
.slot .well {
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--deep);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--dim);
}
.slot.state-done .well { color: var(--good-ink); border-color: var(--good-soft); }
.slot.state-current .well { color: var(--gold); border-color: var(--gold-soft); }
.slot.state-ongoing .well { color: var(--attn); border-color: var(--attn-soft); }

.slot .nm { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.slot.state-locked .nm { color: var(--dim); }
.slot .sub {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-top: 3px;
}
.slot .pct { font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* progress hairline along the bottom edge of a slot. Scaled, not
   resized: a width transition relayouts the card on every frame. */
.slot .edge {
  position: absolute;
  left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slot.state-done .edge { background: var(--good); }

/* ── core: the centrepiece ────────────────────────────────────── */
.core {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 18px;
  padding: 10px 0 0;
}

.core-level { text-align: center; }
.core-level .k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.core-level .v {
  font-family: var(--mono); font-weight: 700;
  font-size: 76px; line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-top: 4px;
}


/* the emblem */
.emblem { position: relative; width: 300px; align-self: center; }
.emblem svg { display: block; width: 100%; height: auto; overflow: visible; }

.emblem .frame { fill: none; stroke: var(--line-bright); stroke-width: 1.2; }
.emblem .frame.inner { stroke: var(--line); }
.emblem .glyph-empty { fill: var(--glyph-empty); }
.emblem .glyph-full { fill: var(--gold); }
/* The clip rect stays a fixed size and slides. Animating its y/height
   would re-resolve the clip geometry each frame; a transform does not. */
.emblem .fill-clip rect { transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1); }

/* the waterline where the fill meets the empty part */
.emblem .waterline {
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.85;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.emblem-cap { text-align: center; margin-top: 4px; }
.emblem-cap .pc {
  font-family: var(--mono); font-weight: 700; font-size: 30px; letter-spacing: -0.03em;
  color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums;
}
.emblem-cap .of {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); margin-top: 7px;
}

.core-xp { width: 100%; max-width: 430px; text-align: center; }
.xp-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.xp-bar i {
  display: block; width: 100%; height: 100%;
  background: var(--xp);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.core-xp .line {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  margin-top: 9px;
}
.core-xp .line b { color: var(--xp-ink); font-weight: 500; }

/* ── core inspector: replaces the emblem when a slot is selected ── */
.inspect {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--inspect-bg);
  border: 1px solid var(--line-bright);
  padding: 22px 24px 18px;
  z-index: 5;
}

.inspect-top { display: flex; align-items: flex-start; gap: 14px; }
.inspect-top h2 { font-size: 25px; letter-spacing: -0.02em; flex: 1; }
.inspect .win {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-soft);
  padding: 5px 9px;
}
.inspect .why { color: var(--dim); font-size: 13px; margin: 9px 0 0; max-width: 62ch; }

.inspect-meter { display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; }
.inspect-meter .bar { flex: 1; height: 2px; background: var(--track); overflow: hidden; }
.inspect-meter .bar i {
  display: block; width: 100%; height: 100%; background: var(--gold);
  transform-origin: left center;
}
.inspect-meter .n { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.inspect-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0 6px 0 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
}

.task-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: 0; }

/* diamond marker: filled when done, hollow when not */
.task-row .mk {
  width: 9px; height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  border: 1px solid var(--line-bright);
}
.task-row.is-done .mk { background: var(--good); border-color: var(--good); }

.task-row .t { font-size: 13.5px; font-weight: 600; }
.task-row.is-todo .t { color: var(--dim); }
.task-row .d { font-size: 12px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.task-row .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; align-items: center; }

.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2.5px 7px;
  border: 1px solid var(--line);
  color: var(--faint);
}
.tag.xp { color: var(--xp-ink); border-color: var(--xp-soft); }
.tag.by-sany { color: var(--attn); border-color: var(--attn-soft); }
.tag.by-claude { color: var(--gold); border-color: var(--gold-soft); }
.tag.by-both { color: var(--good); border-color: var(--good-soft); }
.tag.t4, .tag.t5 { color: var(--tag-strong); border-color: var(--line-bright); }
.tag.t6 { color: var(--on-gold); background: var(--gold); border-color: var(--gold); font-weight: 700; }

.task-row .when { font-family: var(--mono); font-size: 10px; color: var(--faint); white-space: nowrap; }

.pin {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px dashed var(--line-bright);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pin:hover { color: var(--gold); border-color: var(--gold); }
.pin:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pin.on { border-style: solid; color: var(--good); border-color: var(--good-soft); cursor: default; }

.inspect-close {
  align-self: flex-start;
  margin-top: 14px;
}

/* ── today ────────────────────────────────────────────────────── */
.task {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.task.overdue { border-color: var(--attn-soft); }

.task input[type="checkbox"] {
  appearance: none;
  width: 15px; height: 15px; flex: none; margin: 2px 0 0;
  border: 1px solid var(--line-bright);
  background: transparent;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task input[type="checkbox"]:checked { background: var(--good); border-color: var(--good); }
.task input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.task label { flex: 1; font-size: 12.5px; cursor: pointer; line-height: 1.4; }
.task input:checked + label { color: var(--faint); text-decoration: line-through; }
.task .xp { font-family: var(--mono); font-size: 10px; color: var(--xp-ink); white-space: nowrap; margin-top: 3px; }

.rolled {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--attn);
  border: 1px solid var(--attn-soft);
  padding: 1px 5px; margin-left: 6px;
}

.add-task { display: flex; gap: 7px; margin-top: 9px; }
.add-task input[type="text"] {
  flex: 1; min-width: 0;
  background: var(--deep);
  border: 1px solid var(--line);
  padding: 9px 11px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
}
.add-task input::placeholder { color: var(--faint); }
.add-task input:focus { outline: none; border-color: var(--gold); }

/* ── signal ───────────────────────────────────────────────────── */
.req {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 6px;
  text-align: left;
  font: inherit; color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.16s ease;
}
.req:hover { border-color: var(--line-bright); }
.req:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.req .dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--faint); }
.req[data-state="new"] .dot { background: var(--attn); }
.req[data-state="replied"] .dot { background: var(--gold); }
.req[data-state="onboarded"] .dot { background: var(--good); }

.req .from { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.req .from .at { color: var(--dim); font-weight: 400; }
.req .meta { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 4px; overflow-wrap: anywhere; }
.req .msg {
  display: -webkit-box;
  font-size: 11.5px; color: var(--dim); margin-top: 6px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.req .when { font-family: var(--mono); font-size: 10px; color: var(--faint); white-space: nowrap; }

.empty {
  padding: 22px 12px; text-align: center;
  color: var(--faint); font-size: 12px;
  border: 1px dashed var(--line);
}

/* ── decisions ────────────────────────────────────────────────── */
.decision { padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; }
.d-q { font-size: 12.5px; font-weight: 600; color: var(--attn); line-height: 1.35; }
.d-why { font-size: 11.5px; color: var(--faint); margin-top: 5px; line-height: 1.45; }

/* ── director rail ────────────────────────────────────────────── */
.director {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 26px 40px;
}

.rail {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  scrollbar-color: var(--line-bright) transparent;
}

/* the line the nodes sit on */
.rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 25px;
  height: 1px;
  background: var(--line);
}

.stop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 178px;
  padding: 22px 16px 4px 0;
  text-align: left;
  background: none; border: 0; color: inherit; font: inherit;
  cursor: pointer;
}
.stop:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.stop .pip {
  position: absolute;
  left: 0; top: -6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--void);
  border: 1px solid var(--line-bright);
  transition: background 0.2s ease, border-color 0.2s ease, outline-color 0.2s ease;
}
.stop.state-done .pip { background: var(--good); border-color: var(--good); }
.stop.state-ongoing .pip { border-color: var(--attn); }
.stop.state-current .pip {
  background: var(--gold);
  border-color: var(--gold);
  outline: 4px solid var(--gold-softer);
}

.stop .yr {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}
.stop .nm2 { display: block; font-size: 12.5px; font-weight: 600; margin-top: 4px; line-height: 1.25; }
.stop.state-locked .nm2 { color: var(--dim); }
.stop .fr { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 4px; }
.stop:hover .nm2 { color: var(--gold); }
.stop.is-on .nm2 { color: var(--gold); }

.here-tag {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

/* ── gate ─────────────────────────────────────────────────────── */
.gate { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px; }
.gate h1 { font-size: 30px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.gate p { color: var(--dim); font-size: 13px; max-width: 320px; margin: 0 auto 24px; }
.gate .err { color: var(--bad); font-size: 12px; margin-top: 18px; font-family: var(--mono); }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .stage { grid-template-columns: 300px minmax(0, 1fr); }
  .flank.right { grid-column: 1 / -1; }
  .core { min-height: 560px; }
}

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; padding: 18px; gap: 22px; }
  .flank.right { grid-column: auto; }
  .core { min-height: 520px; order: -1; }
  .core-level .v { font-size: 58px; }
  .emblem { width: 230px; }
  .director { padding: 0 18px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .xp-bar i, .slot .edge, .emblem .fill-clip rect, .emblem .waterline { transition: none; }
}

/* ═══ DIRECTORY PAGE ═════════════════════════════════════════════
   Every link worth keeping on standby. Left column is Ludowork
   itself, right column is everything you go into to change
   something. The domain watch sits above both because it is the
   only time-sensitive thing on the page. */

/* the look board's tabs: one rounded tray, the current page filled with ink */
.topnav {
  display: flex; gap: 2px; margin-left: 14px; padding: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.topnav a {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none;
  color: var(--faint);
  padding: 8px 13px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.topnav a:hover { color: var(--ink); }
.topnav a.is-on { color: var(--void); background: var(--ink); }
.topnav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

a.wordmark { text-decoration: none; color: inherit; }

.dir { max-width: 1560px; margin: 0 auto; padding: 26px 26px 60px; }

/* ── domain watch ─────────────────────────────────────────────── */
.watch {
  background: var(--panel);
  border: 1px solid var(--line-bright);
  padding: 20px 22px 22px;
  margin-bottom: 30px;
}

.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; }

.watch-main h2 { font-size: 30px; letter-spacing: -0.02em; }
.w-state { color: var(--dim); font-size: 13px; margin: 7px 0 0; }
.w-state strong { color: var(--ink); font-weight: 600; }

.countdown { display: flex; gap: 34px; margin: 20px 0 16px; }
.cd { display: flex; flex-direction: column; }
.cd-n { font-family: var(--display); font-weight: 700; font-size: 42px; line-height: 1; color: var(--gold); }
.cd-k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); margin-top: 8px;
}

.w-note { font-size: 12.5px; color: var(--faint); line-height: 1.6; max-width: 66ch; margin: 0; }
.w-note strong { color: var(--dim); font-weight: 600; }

.w-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.w-acts .btn { text-decoration: none; }

.watch-side { border-left: 1px solid var(--line); padding-left: 26px; }

.dom {
  display: block;
  padding: 10px 12px;
  margin-bottom: 7px;
  background: var(--deep);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.dom .d-n { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.dom .d-s { display: block; font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.dom.free { border-color: var(--good-soft); }
.dom.free .d-n { color: var(--good); }
.dom.free:hover { border-color: var(--good); }
.dom.owned .d-n { color: var(--gold); }
.dom.taken .d-n { color: var(--dim); }
.dom:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── the two link columns ─────────────────────────────────────── */
.dir-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }

.lnk {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.lnk:hover { border-color: var(--gold); background: var(--raised); }
.lnk:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.lnk .l-n { display: block; font-size: 13.5px; font-weight: 600; }
.lnk .l-u {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--gold); margin-top: 4px; overflow-wrap: anywhere;
}
.lnk .l-d { display: block; font-size: 11.5px; color: var(--faint); margin-top: 6px; line-height: 1.5; }

/* things that have already bitten us get an amber edge */
.lnk.warn .l-u { color: var(--attn); }

/* ── commands ─────────────────────────────────────────────────── */
.cmds { margin-top: 34px; }
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 8px; }

.cmd { padding: 11px 13px; background: var(--panel); border: 1px solid var(--line); }
.cmd .c-k {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px;
}
.cmd code, .cmd-note code {
  font-family: var(--mono); font-size: 10.5px; color: var(--good);
  overflow-wrap: anywhere;
}
.cmd-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; line-height: 1.6; }
.cmd-note code { color: var(--dim); }

@media (max-width: 1100px) {
  .watch-grid { grid-template-columns: 1fr; gap: 24px; }
  .watch-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .dir-cols { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 700px) {
  .dir { padding: 18px 18px 44px; }
  .countdown { gap: 22px; }
  .cd-n { font-size: 34px; }
  .topnav { margin-left: 6px; }
}

/* ── today: explicit completion ────────────────────────────────── */
.task {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.task.overdue { border-color: var(--attn-soft); }
.task.is-done { background: transparent; border-color: var(--line); }

.t-body { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.t-title { font-size: 12.5px; line-height: 1.4; }
.task.is-done .t-title { color: var(--faint); text-decoration: line-through; }

.mk-done {
  width: 9px; height: 9px; flex: none;
  border-radius: 50%;
  background: var(--good);
}

.done-btn, .undo-btn {
  flex: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line-bright);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.done-btn:hover { color: var(--on-good); background: var(--good); border-color: var(--good); }
.undo-btn { border-color: var(--line); color: var(--faint); }
.undo-btn:hover { color: var(--dim); border-color: var(--line-bright); }
.done-btn:focus-visible, .undo-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.done-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0 8px;
}
.done-head .tally { font-family: var(--mono); font-size: 10px; color: var(--xp-ink); }

/* A row that has not reached the database says so, rather than looking saved. */
.sync {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.14em;
  padding: 2px 5px; border: 1px solid currentColor;
}
.sync.saving { color: var(--faint); }
.sync.error { color: var(--bad); }

/* ═══ INBOX ARCHIVE ══════════════════════════════════════════════
   Every request ever received, searchable, with the address one
   click from the clipboard so replying is paste-and-go. */

.inbox-top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 18px;
}

.filters { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.seg-btn {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
  padding: 6px 11px;
  transition: color 0.15s ease, background 0.15s ease;
}
.seg-btn:hover { color: var(--dim); }
.seg-btn.is-on { background: var(--raised); color: var(--gold); }
.seg-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

#q {
  flex: 1; min-width: 220px;
  background: var(--deep);
  border: 1px solid var(--line);
  padding: 9px 12px;
  color: var(--ink);
  font-family: var(--sans); font-size: 12.5px;
}
#q::placeholder { color: var(--faint); }
#q:focus { outline: none; border-color: var(--gold); }

.mail {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.m-head { display: flex; align-items: center; gap: 11px; }
.m-head .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--faint); }
.mail[data-state="new"] .dot { background: var(--attn); }
.mail[data-state="replied"] .dot { background: var(--gold); }
.mail[data-state="onboarded"] .dot { background: var(--good); }

.m-who { flex: 1; min-width: 0; }
.m-name { display: block; font-size: 14px; font-weight: 600; }
.m-name .at { color: var(--dim); font-weight: 400; }
.m-when { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 3px; }

.state-btn {
  flex: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line-bright);
  background: transparent; color: var(--dim);
  cursor: pointer;
}
.state-btn:hover { color: var(--gold); border-color: var(--gold); }
.state-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.m-addr { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.m-addr code {
  font-family: var(--mono); font-size: 11px; color: var(--gold);
  background: var(--deep);
  border: 1px solid var(--line);
  padding: 6px 9px;
  overflow-wrap: anywhere;
}

.copy {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line-bright);
  background: transparent; color: var(--dim);
  cursor: pointer; text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.copy:hover { color: var(--gold); border-color: var(--gold); }
.copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.copy.ok { color: var(--on-good); background: var(--good); border-color: var(--good); }

.m-msg { font-size: 12.5px; color: var(--dim); line-height: 1.55; margin: 12px 0 0; }
.m-msg.none { color: var(--faint); font-style: italic; }

/* ── tickable objectives ───────────────────────────────────────── */
button.mk {
  padding: 0;
  cursor: pointer;
  background: transparent;
  transition: background 0.14s ease, border-color 0.14s ease;
}
button.mk:hover { border-color: var(--good); }
button.mk:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.task-row.is-done button.mk { background: var(--good); border-color: var(--good); }

.tick-err { color: var(--bad); font-family: var(--mono); font-size: 10px; margin: 8px 0 0; }

/* ── phones ────────────────────────────────────────────────────────
   The top bar is a single non-wrapping flex row, which on a 390px
   screen pushed the page to 815px and made the whole thing scroll
   sideways. Below 700px it wraps, the decorative readouts drop, and
   every control grows to a thumb-sized target. */
@media (max-width: 700px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 9px 14px;
  }

  /* nav gets its own line, and scrolls if it ever outgrows it */
  .topnav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .topnav a { padding: 8px 12px; white-space: nowrap; }

  /* atmosphere, not information: the clock and streak go */
  .clock, .streak-chip { display: none; }

  .who { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* thumb-sized controls */
  .btn { padding: 11px 14px; }
  .seg-btn { padding: 10px 12px; }
  .copy, .done-btn, .undo-btn, .state-btn, .pin { padding: 9px 11px; }
  button.mk { width: 15px; height: 15px; }

  .stage { padding: 14px; gap: 18px; }
  .dir { padding: 14px 14px 40px; }
  .inbox-top { gap: 9px; }
  #q { min-width: 0; width: 100%; }

  .core { min-height: 440px; }
  .core-level .v { font-size: 52px; }
  .emblem { width: min(210px, 62vw); }

  /* the inspector covers the whole core on a small screen rather than
     being squeezed into a column that cannot hold it */
  .inspect { padding: 16px 14px 14px; }
  .inspect-top h2 { font-size: 20px; }

  /* Toolbar was four controls fighting for one row: the heading was
     crushed against its count and the search box became a stub. */
  .inbox-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .inbox-top .head { width: 100%; margin: 0; }
  .inbox-top .head .label { letter-spacing: 0.14em; }
  .filters { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filters .seg-btn { white-space: nowrap; }
  #q, #copy-all { width: 100%; }

  .m-addr code { width: 100%; }

  .w-acts .btn { flex: 1 1 auto; text-align: center; }
  .cmd-grid { grid-template-columns: 1fr; }

  /* The objective tick is a 13px diamond, far too small for a thumb.
     Grow the hit area to 34px and keep the diamond itself small by
     drawing it as a centred pseudo-element. */
  .task-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  button.mk {
    position: relative;
    width: 34px; height: 34px;
    margin: -6px 0 0 -8px;
    border: 0;
    background: transparent;
    transform: none;
  }
  button.mk::before {
    content: "";
    position: absolute; left: 50%; top: 50%;
    width: 12px; height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    border: 1px solid var(--line-bright);
    transition: background 0.14s ease, border-color 0.14s ease;
  }
  .task-row.is-done button.mk { background: transparent; }
  .task-row.is-done button.mk::before { background: var(--good); border-color: var(--good); }

  .done-btn, .undo-btn, .state-btn, .pin, .copy { padding: 11px 12px; }
}

/* ── aura tuner (only present with ?tune) ──────────────────────── */
#tuner {
  position: fixed;
  right: 14px; bottom: 14px;
  z-index: 999;
  width: 268px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
}
#tuner.shut { max-height: 38px; overflow: hidden; }

#tuner .t-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#tuner .t-head b { letter-spacing: 0.2em; color: var(--gold); }
#tuner .t-head span { color: var(--faint); flex: 1; text-transform: uppercase; }

#tuner button {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 9px;
  border: 1px solid var(--line-bright);
  background: transparent; color: var(--dim);
  cursor: pointer;
}
#tuner button:hover { color: var(--gold); border-color: var(--gold); }

#tuner .t-layer { border: 1px solid var(--line); margin: 0 0 8px; padding: 7px 8px; }
#tuner legend { color: var(--faint); letter-spacing: 0.14em; padding: 0 4px; }
#tuner label { display: grid; grid-template-columns: 46px 1fr 34px; gap: 6px; align-items: center; margin: 4px 0; color: var(--dim); }
#tuner input[type="range"] { width: 100%; accent-color: var(--gold); }
#tuner input[type="color"] { width: 100%; height: 20px; border: 0; background: none; padding: 0; }
#tuner output { text-align: right; color: var(--faint); }

#tuner .t-foot { display: flex; gap: 6px; }
#tuner pre {
  margin: 8px 0 0; padding: 7px; font-size: 10px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-all;
  background: var(--deep); color: var(--dim);
  border: 1px solid var(--line);
}

/* ── task editing and deletion ─────────────────────────────────── */
button.t-title {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 12.5px; color: inherit;
  text-align: left; cursor: text;
  border-bottom: 1px dashed transparent;
}
button.t-title:hover { border-bottom-color: var(--line-bright); }
button.t-title:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.t-title.as-text { cursor: default; }

.t-edit {
  flex: 1; min-width: 0;
  font: inherit; font-size: 12.5px;
  background: var(--deep);
  border: 1px solid var(--gold);
  color: var(--ink);
  padding: 3px 6px;
}
.t-edit:focus { outline: none; }

.del-btn {
  flex: none;
  font-family: var(--mono); font-size: 11px;
  line-height: 1;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.del-btn:hover { color: var(--bad); border-color: var(--bad); }
.del-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.task.armed .del-btn { color: var(--bad); border-color: var(--bad); font-size: 10px; letter-spacing: 0.1em; }
.task.armed { border-color: var(--bad); }

/* ── reply, inside a request card ──────────────────────────────── */
.req { position: relative; }
.req-act { grid-column: 2 / -1; margin-top: 9px; }
.reply-btn {
  display: inline-block;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 11px;
  border: 1px solid var(--line-bright);
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.reply-btn:hover { color: var(--gold); border-color: var(--gold); }
.reply-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── failure banner ────────────────────────────────────────────── */
#hq-banner {
  padding: 11px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--bad);
  color: var(--bad);
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.04em;
}

/* ── stale and parked tasks ────────────────────────────────────── */
.task.stale { border-color: var(--attn); }
.task.is-parked { opacity: 0.62; }

.park-btn {
  flex: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 9px;
  border: 1px solid var(--attn-soft);
  background: transparent; color: var(--attn);
  cursor: pointer;
}
.park-btn:hover { border-color: var(--attn); }
.park-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

details.parked { margin: 10px 0 0; }
details.parked > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
details.parked > summary::-webkit-details-marker { display: none; }
details.parked > summary::before {
  content: ""; width: 5px; height: 5px;
  background: var(--faint); border-radius: 50%;
}
details.parked[open] > summary::before { background: var(--attn); }

/* ── decisions you can answer ──────────────────────────────────── */
.decision.is-answered { border-color: var(--good-soft); }
.d-answer { font-size: 12.5px; color: var(--ink); margin-top: 6px; line-height: 1.5; }
.d-meta { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 7px; }

.d-link {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none; border: 0; padding: 0; margin-top: 8px;
  color: var(--gold); cursor: pointer;
  border-bottom: 1px solid transparent;
}
.d-link:hover { border-bottom-color: var(--gold); }
.d-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.d-meta .d-link { margin-top: 0; }

.d-input {
  width: 100%; margin-top: 8px;
  background: var(--deep);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-family: var(--sans); font-size: 12.5px;
  padding: 7px 9px;
  resize: vertical;
}
.d-input:focus { outline: none; }
.d-acts { display: flex; gap: 6px; margin-top: 8px; }

/* ── request card: two sibling controls, not nested buttons ────── */
.req { display: block; padding: 0; overflow: hidden; }
.req-main {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 11px 12px 9px;
  text-align: left;
  font: inherit; color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.req-main:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.req-body { min-width: 0; }
.reply-btn {
  display: block;
  margin: 0 12px 11px 32px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 11px;
  border: 1px solid var(--line-bright);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.reply-btn:hover { color: var(--gold); border-color: var(--gold); }
.reply-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── settings page ─────────────────────────────────────────────── */
.set-head { margin-bottom: 20px; }
.set-note { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; max-width: 70ch; line-height: 1.55; }
.set-note strong { color: var(--gold); text-transform: uppercase; font-family: var(--mono); font-size: 10px; }
.set-hint { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; line-height: 1.5; }

.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }

.set-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.set-status { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-left: 6px; }
.set-status.on { color: var(--attn); }
.set-status.bad { color: var(--bad); }

#out {
  margin: 10px 0 0; padding: 10px 12px;
  font-family: var(--mono); font-size: 10px; line-height: 1.6;
  white-space: pre-wrap;
  background: var(--deep);
  border: 1px solid var(--line);
  color: var(--dim);
}
#out.ok { border-color: var(--good-soft); }
#out.bad { border-color: var(--bad); color: var(--bad); }

@media (max-width: 900px) { .set-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ── account switcher ──────────────────────────────────────────── */
.accounts { position: relative; }

.acc-btn {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line-bright);
  background: transparent; color: var(--ink);
  cursor: pointer;
}
.acc-btn:hover { border-color: var(--gold); }
.acc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.acc-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--good); }
.acc-dot.paused { background: var(--faint); }
.acc-caret {
  width: 5px; height: 5px;
  border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint);
  transform: rotate(45deg) translate(-1px, -1px);
}

.acc-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  z-index: 40; min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  padding: 4px;
}
.acc-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  text-align: left; font: inherit; color: inherit;
  background: transparent; border: 0; cursor: pointer;
}
.acc-item:hover { background: var(--raised); }
.acc-item.is-on { background: var(--raised); }
.acc-item.is-on .acc-name { color: var(--gold); }
.acc-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.acc-name { display: block; font-size: 13px; font-weight: 600; }
.acc-note { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.acc-tag {
  margin-left: auto; flex: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
  border: 1px solid var(--line); padding: 2px 6px;
}

/* ── objectives editor ─────────────────────────────────────────── */
.row-edit {
  display: block; margin-top: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none; border: 0; padding: 0;
  color: var(--faint); cursor: pointer;
}
.row-edit:hover { color: var(--gold); }
.row-edit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.task-row.is-editing { background: var(--raised); }
.entry-form { display: grid; gap: 7px; }
.entry-form input, .entry-form textarea, .entry-form select {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line-bright);
  color: var(--ink);
  font-family: var(--sans); font-size: 12.5px;
  padding: 7px 9px;
}
.entry-form input:focus, .entry-form textarea:focus, .entry-form select:focus {
  outline: none; border-color: var(--gold);
}
.ef-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ef-row select { width: auto; min-width: 104px; font-family: var(--mono); font-size: 10px; }
.btn.danger { border-color: var(--bad); color: var(--bad); margin-left: auto; }
.btn.danger:hover { background: var(--bad); color: var(--void); }

.add-obj { width: 100%; margin-top: 10px; }

/* ── leads ─────────────────────────────────────────────────────── */
.acc-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-soft); border-radius: 999px; padding: 6px 11px;
}

.quarter { background: var(--panel); border: 1px solid var(--line-bright); padding: 18px 20px; margin-bottom: 20px; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.q-target { min-width: 0; }
.q-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.q-v { font-family: var(--mono); font-weight: 700; font-size: 30px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 6px 0 9px; }
.q-of { font-family: var(--mono); font-size: 12px; color: var(--faint); font-weight: 400; }
.q-target .bar { height: 3px; background: var(--track); overflow: hidden; }
.q-target .bar i { display: block; width: 100%; height: 100%; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.q-note { grid-column: 1 / -1; font-size: 12px; color: var(--faint); line-height: 1.5; }
.q-note.ok { color: var(--good-ink); }

.lead-add { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 20px; }
.la-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.lead-add input {
  width: 100%; background: var(--deep); border: 1px solid var(--line);
  padding: 9px 11px; color: var(--ink); font-family: var(--sans); font-size: 12.5px;
}
.lead-add input:focus { outline: none; border-color: var(--gold); }
.lead-add input::placeholder { color: var(--faint); }
#l-note { margin-top: 8px; }

.lead { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 8px; }
.lead.stale { border-color: var(--attn-soft); }
.l-head { display: flex; align-items: flex-start; gap: 11px; }
.l-head .dot { width: 8px; height: 8px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--faint); }
.lead[data-status="new"] .dot { background: var(--attn); }
.lead[data-status="meeting"] .dot,
.lead[data-status="proposal"] .dot { background: var(--gold); }
.lead[data-status="won"] .dot { background: var(--good); }
.lead[data-status="lost"] .dot { background: var(--bad); }
.l-who { flex: 1; min-width: 0; }
.l-name { display: block; font-size: 14px; font-weight: 600; }
.l-name .at { color: var(--dim); font-weight: 400; }
.l-meta { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 4px; }
.l-contact { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 0 19px; }
.l-note { font-size: 12.5px; color: var(--dim); margin: 10px 0 0 19px; line-height: 1.5; }
.l-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0 19px; }

.act {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 10px; border: 1px solid var(--line); background: transparent; color: var(--dim);
  cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease;
}
.act:hover { color: var(--ink); border-color: var(--line-bright); }
.act:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.act.gold:hover { color: var(--gold); border-color: var(--gold); }
.act.good:hover { color: var(--good-ink); border-color: var(--good-soft); }
.act.bad:hover { color: var(--bad); border-color: var(--bad); }

@media (max-width: 760px) {
  .q-grid { grid-template-columns: 1fr; gap: 16px; }
  .l-contact, .l-note, .l-acts { margin-left: 0; }
}

/* ── directory, now editable ───────────────────────────────────── */
.dir-group { margin-bottom: 26px; }
.dir-group .head .row-edit { margin-left: auto; }

.lnk { position: relative; display: flex; align-items: flex-start; gap: 10px; }
.lnk.warn { border-color: var(--attn-soft); }
.l-open { flex: 1; min-width: 0; display: block; text-decoration: none; color: inherit; }
.lnk .row-edit { flex: none; margin-top: 2px; }

.lnk.editing { display: grid; gap: 7px; background: var(--raised); }
.df {
  width: 100%; background: var(--deep); border: 1px solid var(--line-bright);
  color: var(--ink); font-family: var(--sans); font-size: 12.5px; padding: 7px 9px;
}
.df:focus { outline: none; border-color: var(--gold); }
.df-warn { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--faint); }
.df-row { display: flex; gap: 6px; align-items: center; }
.g-rename { max-width: 240px; }

/* ── custom emblem field ───────────────────────────────────────── */
.set-emblem { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
#glyph-svg {
  width: 100%; background: var(--deep); border: 1px solid var(--line-bright);
  color: var(--ink); font-family: var(--mono); font-size: 10.5px; line-height: 1.5;
  padding: 10px 12px; resize: vertical;
}
#glyph-svg:focus { outline: none; border-color: var(--gold); }
.set-hint code { font-family: var(--mono); font-size: 10px; color: var(--gold); }

/* ── the bank ─────────────────────────────────────────────────────
   Two figures held apart on purpose. Generated is the company's
   revenue, Earned is Sany's. Conflating them would flatter the
   number that does not reach his account. */
.bank { background: var(--panel); border: 1px solid var(--line-bright); padding: 18px 20px; margin-bottom: 20px; }

.bank-top { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 14px; }
.bank-fig { min-width: 0; }
.bf-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
        text-transform: uppercase; color: var(--faint); }
.bf-v { font-family: var(--mono); font-weight: 700; font-size: 34px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
        margin: 6px 0 4px; line-height: 1.05; word-break: break-word; }
.bank-fig.is-earn .bf-v { color: var(--good-ink); }
.bf-s { font-size: 11px; color: var(--faint); }

.bank-why { font-size: 11.5px; color: var(--faint); line-height: 1.55;
            border-top: 1px solid var(--line); padding-top: 12px; margin: 0; }

/* one row per quarter that has closed business */
.bq { border-top: 1px solid var(--line); padding: 11px 0 9px; }
.bq:first-of-type { border-top: 1px solid var(--line-bright); margin-top: 4px; }
.bq-head { display: flex; align-items: baseline; gap: 10px; }
.bq-key { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
          text-transform: uppercase; color: var(--dim); flex: 1;
          display: flex; align-items: center; gap: 7px; }
.bq-val { font-family: var(--mono); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--dim); }
.bq-pay { font-family: var(--display); font-weight: 700; font-size: 15px;
          color: var(--faint); min-width: 84px; text-align: right; }
.bq.ok .bq-pay { color: var(--good-ink); }
.bq.ok .bq-key { color: var(--ink); }
.bq-note { font-size: 11px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.bq.miss .bq-note { color: var(--bad); }
.bq.muted .bq-note { color: var(--faint); font-style: italic; }
.bq.is-current { background: var(--raised);
                 margin-inline: -20px; padding-inline: 20px; }

/* the two instalments, indented under the quarter that earned them */
.inst { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; padding-left: 14px;
        border-left: 2px solid var(--line); }
.inst.passed { border-left-color: var(--good); }
.i-amt { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--dim); min-width: 76px; }
.inst.passed .i-amt { color: var(--good-ink); }
.i-when { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
          text-transform: uppercase; color: var(--faint); min-width: 68px; }
.i-note { font-size: 10.5px; color: var(--faint); }

/* ── editable deal value, in place on the lead ────────────────────
   Always visible even at zero, because a deal with no amount is
   invisible to both targets and that should be obvious, not hidden. */
.l-val { display: flex; align-items: center; gap: 5px; flex: none; margin-left: auto; }
.l-val .cur { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--faint); }
.l-val input {
  width: 92px; text-align: right;
  background: transparent; border: 1px solid transparent; border-radius: 5px;
  color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 15px;
  padding: 3px 7px; transition: border-color 0.12s ease, background 0.12s ease;
}
.l-val input:hover { border-color: var(--line-bright); }
.l-val input:focus { outline: none; border-color: var(--gold); background: var(--raised); }
.l-val input::-webkit-outer-spin-button,
.l-val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.l-val input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.rolled.warn { color: var(--attn); border-color: var(--attn); }

@media (max-width: 720px) {
  .bank-top { grid-template-columns: 1fr; gap: 14px; }
  .bf-v { font-size: 28px; }
  .bq-head { flex-wrap: wrap; }
  .bq-pay { min-width: 0; text-align: left; }
  .l-val { margin-left: 0; }
  .l-val input { width: 78px; font-size: 14px; }
  .i-note { flex-basis: 100%; padding-left: 0; }
  .inst { flex-wrap: wrap; }
}

/* ── import ───────────────────────────────────────────────────────
   The preview is the point. It exists so a wrong column mapping is
   caught at eight rows rather than at two hundred. */
.import { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 20px; }

.drop { border: 1px dashed var(--line-bright); border-radius: var(--chamfer);
        padding: 20px 18px; text-align: center; transition: border-color .14s ease, background .14s ease; }
.drop.is-over { border-color: var(--gold); background: var(--raised); }
.drop-main { font-size: 13px; color: var(--dim); margin: 0 0 8px; }
.drop-hint { font-size: 11px; color: var(--faint); line-height: 1.55; margin: 0; max-width: 60ch;
             margin-inline: auto; }

.linkish { background: none; border: none; padding: 0; cursor: pointer;
           font: inherit; color: var(--gold); text-decoration: underline;
           text-underline-offset: 2px; }
.linkish:hover { color: var(--ink); }

.preview { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.imp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.imp-file { font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
            text-transform: uppercase; color: var(--dim); }
.imp-counts { font-size: 11.5px; color: var(--faint); margin-left: auto; }
.imp-counts b { color: var(--ink); font-weight: 700; }
.imp-cols { font-size: 11px; color: var(--faint); margin: 0 0 10px; }
.imp-cols code { font-family: var(--mono); font-size: 10px; color: var(--dim);
                 background: var(--raised); padding: 1px 5px; border-radius: 3px; }

.imp-table { width: 100%; border-collapse: collapse; font-size: 12px; display: block;
             overflow-x: auto; white-space: nowrap; }
.imp-table th { font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
                text-transform: uppercase; color: var(--faint); text-align: left;
                font-weight: 500; padding: 0 12px 6px 0; }
.imp-table td { padding: 5px 12px 5px 0; color: var(--dim); border-top: 1px solid var(--line); }
.imp-table .r { text-align: right; padding-right: 0; }
.imp-table .z { color: var(--faint); }

.imp-more, .imp-skip { font-size: 11px; color: var(--faint); margin: 8px 0 0; }
.imp-skip { color: var(--attn); }
.imp-err { font-size: 12px; color: var(--bad); line-height: 1.55; margin: 0; }
.imp-acts { display: flex; gap: 10px; margin-top: 14px; }

@media (max-width: 720px) {
  .imp-counts { margin-left: 0; flex-basis: 100%; }
  .imp-acts { flex-direction: column; }
  .imp-acts .btn { width: 100%; }
}
.imp-dupe { font-size: 11px; color: var(--faint); margin: 8px 0 0; }

/* ── phase creation ───────────────────────────────────────────────
   Phases could not be created in the UI at all before: the originals
   were seeded by a script, which left an emptied account unfillable. */
.add-era { width: 100%; margin-top: 10px; justify-content: center; }

.era-form { background: var(--raised); border: 1px solid var(--line-bright);
            padding: 12px; margin-top: 10px; display: grid; gap: 8px; }
.era-form input, .era-form select {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 12.5px; padding: 7px 9px; border-radius: 5px;
}
.era-form input:focus, .era-form select:focus { outline: none; border-color: var(--gold); }
.era-form input::placeholder { color: var(--faint); }
.era-form .ef-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.era-form .ef-row select { width: auto; flex: none; text-transform: capitalize; }
.era-form .ef-row .btn { flex: none; }

.inspect-top .row-edit { margin-left: auto; }

/* ── first run ────────────────────────────────────────────────────
   A new person signs in with no workspace, so every path built from an
   account id would be null. They name one here before anything loads. */
.firstrun form { display: flex; gap: 9px; justify-content: center;
                 flex-wrap: wrap; margin-top: 4px; }
.firstrun input {
  background: var(--panel); border: 1px solid var(--line-bright);
  color: var(--ink); font: inherit; font-size: 14px;
  padding: 10px 13px; border-radius: 6px; min-width: 240px;
}
.firstrun input:focus { outline: none; border-color: var(--gold); }
.firstrun input::placeholder { color: var(--faint); }
.firstrun-who { color: var(--faint); font-family: var(--mono);
                font-size: 10px; letter-spacing: .1em; margin-top: 22px; }
@media (max-width: 480px) {
  .firstrun form { flex-direction: column; }
  .firstrun input, .firstrun .btn { width: 100%; min-width: 0; }
}

/* ── leads: clean sheet ───────────────────────────────────────────
   Bank, then the list. Adding and uploading are folded away behind
   buttons so the page is a sheet of leads, not a wall of admin. */
.list-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-acts { display: flex; gap: 8px; }
.list-acts .btn.is-on { border-color: var(--gold); color: var(--gold); }
.list-top input[type="search"] { flex: 1; min-width: 180px; }
.lead-add[hidden], .import[hidden] { display: none !important; }
.lead-add { margin-bottom: 14px; }
.import { margin-bottom: 14px; }
#filters { margin-bottom: 12px; }

/* the name is the way in to the call notes */
.l-name {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  border-bottom: 1px solid transparent;
}
.l-name:hover { border-bottom-color: var(--line-bright); }
.l-name[aria-expanded="true"] { border-bottom-color: var(--gold); }
.l-name:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── call notes ───────────────────────────────────────────────────
   Newest first, because the last call is the one you need before the
   next one. */
.l-notes { margin: 12px 0 4px; padding: 12px 14px; background: var(--raised);
           border: 1px solid var(--line); border-radius: 6px; }
.note { border-left: 2px solid var(--line-bright); padding: 0 0 0 11px; margin-bottom: 11px; }
.note-head { display: flex; align-items: center; gap: 8px; }
.note-when { font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
             text-transform: uppercase; color: var(--faint); }
.note-del { margin-left: auto; background: none; border: none; cursor: pointer;
            color: var(--faint); font-size: 15px; line-height: 1; padding: 0 3px; }
.note-del:hover { color: var(--bad); }
.note-text { margin: 3px 0 0; font-size: 12.5px; color: var(--dim);
             line-height: 1.55; white-space: pre-wrap; }
.note-none { margin: 0 0 11px; font-size: 12px; color: var(--faint); }

.note-add { display: flex; flex-direction: column; gap: 8px; }
.note-add textarea {
  width: 100%; resize: vertical; min-height: 62px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  color: var(--ink); font: inherit; font-size: 12.5px; padding: 9px 11px; line-height: 1.5;
}
.note-add textarea:focus { outline: none; border-color: var(--gold); }
.note-add textarea::placeholder { color: var(--faint); }
.note-add .btn { align-self: flex-start; }

@media (max-width: 720px) {
  .list-top { gap: 9px; }
  .list-acts { width: 100%; }
  .list-acts .btn { flex: 1; }
  .list-top input[type="search"] { width: 100%; }
  .note-add .btn { width: 100%; }
}

/* ── look board shapes ─────────────────────────────────────────────
   One place that rounds what the Destiny screen kept square, so each
   component's own rule stays about layout and colour. Tiles 10px,
   fields 8px, small buttons 6px, tags and chips fully round. */
.task, .decision, .lead, .lead-add, .mail, .lnk, .dom, .cmd, .watch, .bank, .quarter,
.inspect, .acc-menu, #tuner, .drop { border-radius: var(--chamfer); }
#q, .add-task input[type="text"], .lead-add input, .entry-form input, .entry-form textarea,
.entry-form select, .d-input, .t-edit, .df, .set-emblem textarea { border-radius: 8px; }
.seg-btn, .act, .copy, .state-btn, .reply-btn, .park-btn, .del-btn, .done-btn, .undo-btn,
.acc-btn, .pin, .acc-item, .m-addr code { border-radius: 6px; }
.tag, .acc-tag, .rolled { border-radius: 999px; }


/* ── courses: the semester as a star chart, a timeline and a mark sheet ──
   Built 2026-10-27 for the university workspace. Same language as the app:
   tiles a step off the ground, pills, the look board's tab tray, figures in
   mono, and a centred window that rises in. */
/* The page is full width so the tree can run edge to edge; everything else
   keeps the usual measure. */
.cs { padding: 26px 0 0; display: grid; gap: 18px; }
.cs > :not(#view-map) { width: min(1320px, calc(100% - 52px)); margin-inline: auto; }
.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.eyebrow { margin: 0 0 6px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.cs-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.02; }
.cs-sub { margin: 8px 0 0; color: var(--dim); max-width: 72ch; }
.cs-sub b { color: var(--ink); font-weight: 600; }
.cs-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cs-tabs, .cw-status {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.cs-tabs button, .cw-status button {
  font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); background: transparent; border: 0; border-radius: 6px;
  padding: 10px 16px; cursor: pointer; transition: color 0.15s ease, background 0.15s ease;
}
.cs-tabs button:hover, .cw-status button:hover { color: var(--ink); }
.cs-tabs button[aria-selected="true"], .cw-status button[aria-pressed="true"] { background: var(--ink); color: var(--void); }
.cs-tabs button:focus-visible, .cw-status button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cs-demo { margin: 0; font: 400 12px/1.5 var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }

/* the map: no frame. It runs the full width of the page on the ground itself,
   and dissolves into the page above and below instead of stopping at an edge. */
.map-stage {
  --gutter: max(26px, calc((100% - 1320px) / 2));
  position: relative; height: clamp(520px, calc(100vh - 200px), 1100px);
  overflow: hidden;
}
#map {
  display: block; width: 100%; height: 100%; touch-action: none; cursor: grab;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px, #000 calc(100% - 72px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 56px, #000 calc(100% - 72px), transparent 100%);
}
.map-courses { position: absolute; top: 0; left: var(--gutter); right: var(--gutter); display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.chip {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--mono); color: var(--dim);
  background: var(--void); border: 1px solid var(--line-bright); border-radius: 999px;
  padding: 8px 12px; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip .num { color: var(--faint); }
.chip:hover { color: var(--ink); }
.chip.is-on { color: var(--ink); border-color: var(--gold); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.map-ctl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.map-ctl .btn { background: var(--void); min-height: 40px; }
.map-hint { position: absolute; bottom: 16px; left: var(--gutter); margin: 0; max-width: 34ch; font: 400 11px/1.5 var(--mono); color: var(--faint); pointer-events: none; }

/* deadlines */
.weeks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(70px, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.wk { display: grid; gap: 5px; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 74px; }
.wk-n { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.wk-d { font: 400 10.5px/1 var(--mono); color: var(--faint); }
.wk-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-dots i { width: 9px; height: 9px; border-radius: 50%; }
.wk-dots i.done { opacity: 0.35; }
.wk.brk { background: transparent; border-style: dashed; border-color: var(--line-bright); }
.wk.brk .wk-n { color: var(--faint); letter-spacing: 0.06em; text-transform: none; font-weight: 500; }
.wk.now { border-color: var(--gold); }
.wk.now .wk-n { color: var(--gold); }
.wk.past { opacity: 0.5; }
.due-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 14px; }
.due {
  display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: start;
  width: 100%; margin-bottom: 6px; padding: 12px 14px; text-align: left; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.due:hover { border-color: var(--line-bright); background: var(--raised); }
.due:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.due-when { font: 500 12.5px/1.3 var(--mono); color: var(--ink); }
.due-when small { display: block; margin-top: 4px; font-size: 11px; color: var(--faint); }
.due-what b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.due-what span { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12.5px; color: var(--dim); }
.due-what i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.due.soon { border-color: var(--attn-soft); }
.due.soon .due-when small, .due.late .due-when small { color: var(--attn); }
.due.late { border-color: var(--attn); }
.due.done { opacity: 0.7; }
.due-done summary { cursor: pointer; list-style: none; padding: 10px 0; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.due-done summary::-webkit-details-marker { display: none; }
.day { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.day-n { font: 500 11px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.day-n small { display: block; margin-top: 4px; letter-spacing: 0; text-transform: none; color: var(--faint); }
.day.today .day-n { color: var(--gold); }
.day.past { opacity: 0.5; }
.day-s { display: grid; gap: 6px; }
.cls { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.cls b { font: 500 12px/1 var(--mono); color: var(--dim); }
.cls i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cls.quiet { color: var(--faint); }

/* marks */
.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; gap: 8px; align-content: start; background: var(--panel); border-radius: 10px; padding: 18px; }
.tile span { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.tile b { font: 700 34px/1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile b small { font-size: 16px; color: var(--faint); letter-spacing: 0; }
.m-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.m-course { display: grid; gap: 12px; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.m-course header { display: flex; align-items: center; gap: 10px; }
.m-course header i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.m-course h3 { flex: 1; min-width: 0; font: 600 15px/1.3 var(--sans); font-stretch: normal; letter-spacing: 0; }
.m-avg { font: 700 22px/1 var(--mono); }
.m-band { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--gold); min-width: 3ch; }
.m-rows { display: grid; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 54px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.m-t { font-size: 13.5px; }
.m-t small { margin-left: 8px; font: 400 11px/1 var(--mono); color: var(--faint); }
.m-in, .cw-mark input {
  width: 100%; padding: 8px 10px; text-align: right;
  font: 500 13px/1 var(--mono); color: var(--ink);
  background: var(--deep); border: 1px solid var(--line-bright); border-radius: 6px;
}
.m-in:focus, .cw-mark input:focus { outline: none; border-color: var(--gold); }
.m-pts { font: 400 12px/1 var(--mono); color: var(--dim); text-align: right; }
.m-course footer { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.m-course footer b { color: var(--ink); }
.cs-note { margin: 0; font: 400 12px/1.6 var(--mono); color: var(--faint); max-width: 90ch; }
.cs-view { display: grid; gap: 14px; align-content: start; }
.cs-empty { padding: 80px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.cs-empty p { margin: 0; color: var(--dim); max-width: 52ch; }

/* the centred window: rises in over 460ms, leaves in 200 */
.cw-back {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 24px 16px;
  background: var(--scrim); opacity: 0;
  transition: opacity 200ms ease-in;
}
.cw-back.on { opacity: 1; transition: opacity 460ms cubic-bezier(0.23, 1, 0.32, 1); }
.cw {
  width: min(560px, 100%); max-height: 85vh;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--line-bright); border-radius: 12px;
  transform: translateY(14px) scale(0.965); opacity: 0;
  transition: transform 200ms ease-in, opacity 200ms ease-in;
}
.cw-back.on .cw {
  transform: none; opacity: 1;
  transition: transform 460ms cubic-bezier(0.23, 1, 0.32, 1), opacity 360ms cubic-bezier(0.23, 1, 0.32, 1);
}
.cw:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .cw, .cw-back.on .cw { transform: none; transition: opacity 120ms linear; }
}
.cw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 14px 0 24px; }
.cw-eyebrow { margin: 0 0 6px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.cw-title { font-size: 22px; line-height: 1.15; }
.cw-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-size: 24px; cursor: pointer; }
.cw-x:hover { color: var(--ink); background: var(--raised); }
.cw-x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cw-body { overflow-y: auto; padding: 16px 24px 24px; display: grid; gap: 18px; align-content: start; }
.cw-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font: 500 11.5px/1 var(--mono); color: var(--dim); border: 1px solid var(--line-bright); border-radius: 999px; padding: 7px 11px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill.warn { color: var(--attn); border-color: var(--attn-soft); }
.pill.quiet { color: var(--faint); border-style: dashed; }
.cw-status { justify-self: start; flex-wrap: wrap; }
.cw-status button { padding: 9px 12px; }
.cw-mark { display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.cw-mark input { width: 116px; }
.cw-mark span { color: var(--gold); letter-spacing: 0.08em; }
.cw-sec h3 { margin: 0 0 8px; font: 500 11px/1.4 var(--mono); font-stretch: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.cw-sec h3 .num { color: var(--dim); margin-left: 6px; }
.cw-sec p, .cw-sec li { margin: 0; font-size: 14px; line-height: 1.55; color: var(--dim); }
.cw-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.cw-fig { margin-top: 8px !important; font: 500 13px/1 var(--mono) !important; color: var(--ink) !important; }
.cw-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.cw-row b { font: 500 12.5px/1.4 var(--mono); color: var(--dim); }
.cw-parts { display: grid; }
.cw-part { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.cw-part input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.cw-part em { font: 400 11px/1 var(--mono); font-style: normal; color: var(--faint); margin-left: 6px; }
.cw-sec textarea {
  width: 100%; resize: vertical; padding: 10px 12px; font: 400 14px/1.5 var(--sans); color: var(--ink);
  background: var(--deep); border: 1px solid var(--line-bright); border-radius: 8px;
}
.cw-sec textarea:focus { outline: none; border-color: var(--gold); }
.cw-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cw-tiles div { display: grid; gap: 6px; background: var(--deep); border-radius: 8px; padding: 12px; }
.cw-tiles span { font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.cw-tiles b { font: 700 24px/1 var(--mono); letter-spacing: -0.02em; }
.cw-tiles b small { font-size: 13px; color: var(--faint); }
.cw-list { display: grid; gap: 6px; }
.cw-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; width: 100%;
  padding: 10px 12px; text-align: left; font: inherit; color: var(--ink);
  background: var(--deep); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.cw-item:hover { border-color: var(--line-bright); }
.cw-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cw-item-t { font-size: 14px; font-weight: 600; }
.cw-item-m { font: 400 12px/1.4 var(--mono); color: var(--dim); text-align: right; }
.cw-item-m.warn { color: var(--attn); }
.tagline { grid-column: 1 / -1; font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.cw-quiet { margin: 0; color: var(--dim); font-size: 14px; }
.cw-save { margin: 0; min-height: 1em; font: 400 11px/1 var(--mono); color: var(--faint); }
.cw-body > .btn { justify-self: start; text-decoration: none; }
.cw-pre { white-space: pre-line; }
.cw-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* homework you add by hand: a short form in the same window */
.hw-form { display: grid; gap: 14px; }
.hw-f { display: grid; gap: 6px; min-width: 0; }
.hw-f > span { font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.hw-f em { font-style: normal; letter-spacing: 0.04em; text-transform: none; margin-left: 4px; opacity: 0.8; }
.hw-f input, .hw-f select, .hw-f textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: 400 14px/1.4 var(--sans); color: var(--ink);
  background: var(--deep); border: 1px solid var(--line-bright); border-radius: 8px;
}
.hw-f textarea { resize: vertical; line-height: 1.5; }
.hw-f input:focus, .hw-f select:focus, .hw-f textarea:focus { outline: none; border-color: var(--gold); }
.hw-f input::placeholder, .hw-f textarea::placeholder { color: var(--faint); }
.hw-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hw-hint { margin: -6px 0 0; font: 400 12px/1.4 var(--mono); color: var(--faint); }
.hw-hint:empty, .hw-err:empty { display: none; }
.hw-err { margin: 0; font-size: 13px; color: var(--attn); }

@media (max-width: 760px) {
  .cs { padding: 16px 0 0; }
  .cs > :not(#view-map) { width: calc(100% - 32px); }
  .map-stage { --gutter: 16px; }
  .due-grid { grid-template-columns: minmax(0, 1fr); }
  .m-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-stage { height: 70vh; }
  .map-hint { display: none; }
  /* one row of course pills you can swipe, rather than three rows over the map */
  .map-courses { flex-wrap: nowrap; overflow-x: auto; pointer-events: auto; scrollbar-width: none; }
  .map-courses::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .due { grid-template-columns: 98px minmax(0, 1fr); }
  .cw-back { padding: 12px; }
  .cw { max-height: 88vh; }
  .cw-head { padding-left: 18px; }
  .cw-body { padding: 14px 18px 20px; }
}

/* a course's links in its window, and Join beside a class */
.cw-links { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-links .btn { text-decoration: none; }
.join {
  margin-left: auto; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; border: 1px solid var(--gold-soft); border-radius: 6px; padding: 6px 9px;
}
.join:hover { background: var(--gold-softer); }
.join:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── command: deadlines, for a university workspace ── */
.dl-group { margin-bottom: 14px; }
.dl-label { margin: 0 0 6px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.dl-group.late .dl-label { color: var(--attn); }
.dl {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; margin-bottom: 6px; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--chamfer);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dl { position: relative; }
.dl:hover { border-color: var(--line-bright); background: var(--raised); }
.dl:focus-within:has(.dl-t:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
/* the title is the link, stretched over the whole row; "+ today" sits above it */
.dl-t { color: inherit; text-decoration: none; }
.dl-t::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dl-t:focus-visible { outline: none; }
.dl-pin { position: relative; z-index: 1; justify-self: start; margin-top: 2px; border-radius: 6px; }
.dl-when { display: grid; gap: 3px; }
.dl-when b { font: 600 13px/1 var(--mono); }
.dl-when small { font: 400 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.dl-what { display: grid; gap: 4px; min-width: 0; }
.dl-t { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.dl-c { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.35; color: var(--dim); }
.dl-c i { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 4px; }
.dl-left { display: grid; gap: 4px; justify-items: end; font: 500 11px/1.2 var(--mono); color: var(--dim); text-align: right; max-width: 9ch; }
.dl-left small { font-size: 10.5px; color: var(--faint); }
.dl-add { font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); text-decoration: none; padding: 6px 0; flex: none; order: 1; }   /* after the rule */
.dl-add:hover { text-decoration: underline; }
.dl.soon { border-color: var(--attn-soft); }
.dl.soon .dl-left, .dl.late .dl-left { color: var(--attn); }
.dl.late { border-color: var(--attn); }

/* ── directory groups fold shut (2026-10-28) ───────────────────────
   The group name was a small grey label, hard to pick out once a course
   had a few links. Now it reads as a heading, and the whole name is the
   switch that folds its links away. */
.dir-head::before { display: none; }          /* the arrow takes the dot's place */
.g-toggle {
  display: flex; align-items: center; gap: 11px;
  flex: 0 1 auto; min-width: 0;
  background: none; border: 0; padding: 4px 0; margin: 0;
  color: var(--ink); text-align: left; cursor: pointer;
}
.g-name {
  font-family: var(--display); font-stretch: 112%; font-weight: 700;
  font-size: 17px; line-height: 1.25; letter-spacing: -0.005em;
}
.g-chev {
  flex: none; width: 8px; height: 8px; margin: 0 2px 2px 1px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);                   /* open: points down */
  transition: transform 0.16s ease;
}
.dir-group.folded .g-chev { transform: rotate(-45deg); margin-bottom: 0; }   /* folded: points right */
.g-toggle:hover .g-name { color: var(--gold); }
.g-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.dir-group.folded { margin-bottom: 10px; }
.dir-group.folded .dir-head { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .g-chev { transition: none; } }
