@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/archivo.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/plexmono-600.woff2') format('woff2');
}

:root {
  --bg: #EFF0ED;
  --bg-deep: #E6E8E3;
  --surface: #FCFCFB;
  --raised: #FFFFFF;
  --ink: #20242B;
  --muted: #5C6470;
  --faint: #8B929C;
  --line: #E0E2DF;
  --line-strong: #C9CCC7;
  --accent: #8A5E0A;
  --accent-ink: #6E4A05;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(138, 94, 10, 0.10);
  --fresh: #1B6339;
  --fresh-soft: rgba(27, 99, 57, 0.10);
  --stale: #B43C49;
  --stale-soft: rgba(180, 60, 73, 0.10);
  --test: #3D63C9;
  --test-soft: rgba(61, 99, 201, 0.10);
  --spark: #A88A4C;
  --spark-dim: rgba(138, 94, 10, 0.26);
  --hatch: rgba(32, 36, 43, 0.030);
  --band: #1E242C;
  --band-ink: #F3F1EC;
  --band-muted: #9AA3AF;
  --scrim: rgba(24, 28, 34, 0.42);
  --shadow: 0 1px 2px rgba(24, 28, 34, 0.05), 0 6px 18px rgba(24, 28, 34, 0.06);
  --shadow-lift: 0 2px 4px rgba(24, 28, 34, 0.06), 0 16px 38px rgba(24, 28, 34, 0.11);
  --shadow-modal: 0 24px 70px rgba(24, 28, 34, 0.26);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1317;
    --bg-deep: #0A0D10;
    --surface: #171C22;
    --raised: #1D242C;
    --ink: #E7EAEE;
    --muted: #98A2AE;
    --faint: #6C7684;
    --line: #262E38;
    --line-strong: #37414E;
    --accent: #E8A13D;
    --accent-ink: #F0B45E;
    --on-accent: #1E242C;
    --accent-soft: rgba(232, 161, 61, 0.12);
    --fresh: #4CAD79;
    --fresh-soft: rgba(76, 173, 121, 0.13);
    --stale: #E06579;
    --stale-soft: rgba(224, 101, 121, 0.13);
    --test: #7C9AE6;
    --test-soft: rgba(124, 154, 230, 0.13);
    --spark: #C08A3E;
    --spark-dim: rgba(232, 161, 61, 0.24);
    --hatch: rgba(231, 234, 238, 0.022);
    --band: #131920;
    --band-ink: #E7EAEE;
    --band-muted: #8B95A2;
    --scrim: rgba(4, 6, 9, 0.66);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 38px rgba(0, 0, 0, 0.42);
    --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 7px),
    var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.locked { overflow: hidden; }
.mono { font-family: 'Plex Mono', ui-monospace, monospace; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
[hidden] { display: none !important; }

/* ── masthead ───────────────────────────── */
.masthead { background: var(--band); color: var(--band-ink); position: relative; overflow: hidden; }
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 26px, transparent 26px 34px);
  opacity: 0.5;
}
.masthead .rails { position: absolute; inset: 0; opacity: 0.10; pointer-events: none; }
.masthead .wrap {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 22px;
}
.wordmark { display: flex; flex-direction: column; gap: 3px; }
.wordmark .eyebrow {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.wordmark h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.wordmark .tag { font-size: 13px; color: var(--band-muted); }
.masthead-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mode-chip {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 3px; padding: 3px 9px; white-space: nowrap;
}
.clock {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--band-muted); font-variant-numeric: tabular-nums;
}
.linkbtn {
  font-family: inherit; font-size: 12px; color: var(--band-muted);
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 8px; cursor: pointer;
}
.linkbtn:hover { color: var(--band-ink); border-color: var(--band-muted); }

/* ── presence ───────────────────────────── */
.presence-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .presence-bar {
    background: color-mix(in srgb, var(--bg-deep) 84%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
  }
}
.presence-bar.stuck { box-shadow: 0 6px 20px rgba(24, 28, 34, 0.10); }
@media (prefers-color-scheme: dark) { .presence-bar.stuck { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45); } }
.presence-bar .wrap { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 13px; padding-bottom: 13px; }
.person {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 15px 9px 11px;
  box-shadow: var(--shadow); flex: 1 1 340px; min-width: 0;
}
.person.is-active { border-color: var(--line-strong); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px; color: #fff;
  flex-shrink: 0; position: relative;
}
.avatar .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--faint);
}
.person.is-active .avatar .dot { background: var(--fresh); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--fresh-soft); }
  50% { box-shadow: 0 0 0 5px var(--fresh-soft); }
}
.person .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.person .name-row { display: flex; align-items: baseline; gap: 8px; }
.person .name { font-weight: 600; font-size: 14px; }
.person .you { font-size: 10.5px; color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 4px; padding: 1px 6px; font-weight: 600; }
.person .count {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.person .tracks { display: flex; gap: 6px; flex-wrap: wrap; }
.track-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 8px 2px 6px;
  color: var(--muted); background: var(--raised);
  max-width: 100%; min-width: 0;
}
.track-chip .p { color: var(--ink); font-weight: 600; }
.track-chip .b { color: var(--accent-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-chip .host { color: var(--faint); }
.track-chip .lamp { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.track-chip.primary { border-color: var(--fresh); background: var(--fresh-soft); }
.track-chip.primary .lamp { background: var(--fresh); }
.track-chip.paused { border-style: dashed; }
.person .idle-note { font-size: 12.5px; color: var(--faint); }

/* ── toolbar ────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 22px 0 18px; }
.toolbar .label {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--faint); margin-right: 4px;
}
.toolbar .spacer { flex: 1; }
.pill {
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill.on { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.pill-n {
  margin-left: 7px; font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--faint);
}
.pill.on .pill-n { color: var(--accent-ink); }
.pill.is-zero .pill-n { opacity: 0.45; }
.pill:focus-visible, .silo:focus-visible, .btn:focus-visible, .task:focus-visible,
.add-input:focus-visible, .note-done:focus-visible, .modal-close:focus-visible,
.linkbtn:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── cards ──────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px; align-items: stretch; padding-bottom: 56px;
}
.silo {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 15px 17px 15px 20px; cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: enter 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.silo::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--line-strong); transition: background 0.3s ease;
}
.silo[data-state="live"]::before { background: var(--fresh); }
.silo[data-state="alert"]::before { background: var(--stale); }
.silo:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--line-strong); }
.grid.settled .silo { animation: none; }
.grid:not(.settled) .silo:nth-child(2) { animation-delay: 0.06s; }
.grid:not(.settled) .silo:nth-child(3) { animation-delay: 0.12s; }
.grid:not(.settled) .silo:nth-child(4) { animation-delay: 0.18s; }
.grid:not(.settled) .silo:nth-child(5) { animation-delay: 0.24s; }
.grid:not(.settled) .silo:nth-child(6) { animation-delay: 0.30s; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.silo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.silo-head .proj { display: flex; align-items: center; gap: 8px; min-width: 0; }
.silo-head h2 {
  margin: 0; font-size: 17.5px; font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lock { color: var(--faint); flex-shrink: 0; }
.head-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.faces { display: flex; }
.faces .m {
  width: 23px; height: 23px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff;
  border: 2px solid var(--surface);
}
.faces .m + .m { margin-left: -7px; }
.faces .m.off { opacity: 0.32; }
.quick-claim {
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent); border-radius: 6px;
  padding: 3px 9px; cursor: pointer; white-space: nowrap;
  opacity: 0; transform: translateX(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}
.silo:hover .quick-claim, .quick-claim:focus-visible { opacity: 1; transform: none; }
.quick-claim:hover { filter: brightness(1.08); }
.quick-claim.on { color: var(--fresh); background: var(--fresh-soft); border-color: var(--fresh); }
/* someone already holding it should be visible without hovering */
.silo[data-state="live"] .quick-claim.on { opacity: 1; transform: none; }

.open-hint { color: var(--faint); flex-shrink: 0; transition: transform 0.22s ease, color 0.22s ease; }
.silo:hover .open-hint { color: var(--accent); transform: translateX(2px); }

.state { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); min-width: 0; }
.state strong { color: var(--ink); font-weight: 600; }
.state .t {
  margin-left: auto; flex-shrink: 0; color: var(--faint);
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.lamp.live { background: var(--fresh); animation: pulse 2.4s ease-in-out infinite; }
.lamp.warn { background: var(--stale); }

.branchline {
  display: flex; align-items: center; gap: 7px; margin-top: 5px; min-width: 0;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.branchline .bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branchline .base { font-weight: 400; font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.branchline .switch { color: var(--faint); flex-shrink: 0; }

/* pinned to the bottom so cards in a row line up however tall they are */
.signals { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 12px; }
.dots { display: flex; gap: 5px; }
.sig { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.sig.note { background: var(--accent); }
.sig.task { background: var(--test); }
.sig.warn { background: var(--stale); }
.signals .word { font-size: 12.5px; color: var(--muted); }
.meter { display: flex; align-items: center; gap: 7px; margin-left: auto; flex-shrink: 0; }
.meter .bar { width: 46px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter .fill {
  display: block; height: 100%; border-radius: 3px; background: var(--accent);
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.meter.done .fill { background: var(--fresh); }
.meter .num {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.silo .oops {
  margin-top: 10px; font-size: 12px; color: var(--stale);
  background: var(--stale-soft); border-radius: 6px; padding: 6px 9px;
}

.empty {
  border: 1px dashed var(--line-strong); border-radius: 12px;
  padding: 40px 24px; text-align: center; color: var(--muted);
  grid-column: 1 / -1;
}

/* ── modal ──────────────────────────────── */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: opacity 0.24s ease;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(760px, 100%); max-height: calc(100vh - 56px);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: var(--shadow-modal);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(14px) scale(0.985); opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.24s ease;
}
.scrim.show .modal { transform: none; opacity: 1; }
.modal-head {
  position: relative; padding: 20px 22px 16px 24px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.modal-head::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line-strong);
}
.modal[data-state="live"] .modal-head::before { background: var(--fresh); }
.modal[data-state="alert"] .modal-head::before { background: var(--stale); }
.modal-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.modal-title h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
.modal-title .repo {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; color: var(--faint);
}
.modal-close {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); cursor: pointer; flex-shrink: 0;
  width: 32px; height: 32px; display: grid; place-items: center;
}
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }
.modal-sub { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.modal-sub .plain { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

.modal-body { overflow-y: auto; padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 700px) {
  .modal-body {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 22px 30px; align-items: start;
  }
  .modal-body > .full { grid-column: 1 / -1; }
}
.block { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.block > h3 {
  margin: 0; font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--faint); font-weight: 600;
  display: flex; align-items: baseline; gap: 8px;
}
.block > h3 .n { color: var(--line-strong); letter-spacing: 0.06em; }

.warnbox {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13.5px; color: var(--stale); background: var(--stale-soft);
  border-radius: 8px; padding: 10px 12px; line-height: 1.45;
}
.warnbox svg { flex-shrink: 0; margin-top: 2px; }

.tasks { display: flex; flex-direction: column; gap: 1px; }
.task {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: inherit; font-size: 13.8px; text-align: left;
  background: none; border: none; color: var(--ink);
  padding: 6px 5px; border-radius: 7px; cursor: pointer; width: 100%;
  transition: background 0.16s ease;
}
.task:hover { background: var(--raised); }
.task .box {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.6px solid var(--line-strong);
  flex-shrink: 0; margin-top: 2px;
  display: grid; place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.task .box svg { opacity: 0; transform: scale(0.5); transition: all 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3); color: #fff; }
.task.done .box { background: var(--fresh); border-color: var(--fresh); }
.task.done .box svg { opacity: 1; transform: scale(1); }
.task .txt { flex: 1; min-width: 0; line-height: 1.4; }
.task.done .txt { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task .owner {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; color: #fff;
  flex-shrink: 0; margin-top: 1px;
}
.task .owner.none { background: transparent !important; border: 1.5px dashed var(--line-strong); color: var(--faint); font-weight: 400; }

/* a step and its remove control; the × stays out of the way until wanted */
.task-line { display: flex; align-items: flex-start; gap: 2px; }
.task-line .task { flex: 1; min-width: 0; }
.task-del {
  font-family: inherit; font-size: 15px; line-height: 1;
  color: var(--faint); background: none; border: none;
  padding: 6px 7px; margin-top: 2px; border-radius: 6px;
  cursor: pointer; opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.task-line:hover .task-del, .task-del:focus-visible { opacity: 1; }
.task-del:hover { color: var(--stale); background: var(--stale-soft); }

/* the branch a step or note refers to; highlighted when it differs from the
   branch the card is showing, which is the whole point of being able to set it */
.branch-tag {
  display: inline-block; margin-left: 7px;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; color: var(--muted);
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 5px; vertical-align: 1px;
}
.branch-tag.elsewhere { color: var(--test); border-color: var(--test); background: var(--test-soft); }
.branch-pick { max-width: 190px; }
.branch-head {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 5px 9px; max-width: 320px;
}
.base-note { font-size: 11.5px; color: var(--faint); margin-left: 9px; }

.add-row { display: flex; gap: 7px; margin-top: 2px; flex-wrap: wrap; }
.add-input {
  flex: 1; font-family: inherit; font-size: 13px;
  color: var(--ink); background: var(--raised);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; min-width: 120px;
  transition: border-color 0.18s ease;
}
.add-input::placeholder { color: var(--faint); }
.add-input:focus { outline: none; border-color: var(--accent); }
select.add-input { flex: 0 0 auto; min-width: 0; cursor: pointer; }
.btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  border-radius: 8px; padding: 8px 13px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised);
  transition: color 0.18s ease, border-color 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}
.btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn.primary {
  color: var(--on-accent); background: var(--accent); border-color: var(--accent);
  font-size: 13px; padding: 9px 16px; box-shadow: 0 1px 2px rgba(24, 28, 34, 0.13);
}
.btn.primary:hover { filter: brightness(1.1); transform: translateY(-1px); color: var(--on-accent); }
.btn.stop {
  color: var(--fresh); background: var(--fresh-soft); border-color: var(--fresh);
  font-size: 13px; padding: 9px 16px; box-shadow: none;
}

.note-card {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 7px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45;
}
.note-card.mine { background: var(--raised); border-left-color: var(--line-strong); }
.note-card .by {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px;
}
.note-card .body { flex: 1; min-width: 0; }
.note-card .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 1px; }
.note-card .meta .mono { font-size: 11px; }
.note-done {
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: none;
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 3px 9px; cursor: pointer; flex-shrink: 0;
}
.note-done:hover { color: var(--fresh); border-color: var(--fresh); }

.gitrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap;
}
.gitrow .mono { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.tagword { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.tagword::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tagword.fresh { color: var(--fresh); }
.tagword.quiet { color: var(--faint); }
.tagword.stale { color: var(--stale); }
.branches { display: flex; flex-direction: column; }
.branch {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; font-size: 13px; min-width: 0;
  border-bottom: 1px solid var(--line);
}
.branch:last-child { border-bottom: none; }
.branch .bname {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 12.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.branch .by {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.branch .by.unknown { background: var(--line-strong); color: var(--muted); }
/* a machine account, not a person — dashed so it never reads as a teammate */
.by.shared, .owner.shared {
  background: transparent !important;
  border: 1.5px dashed var(--line-strong);
  color: var(--muted);
  font-weight: 400;
}
.branch .diff {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--faint);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
.smallchip { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 7px; white-space: nowrap; flex-shrink: 0; }
.smallchip.test { color: var(--test); background: var(--test-soft); }
.smallchip.stale { color: var(--stale); background: var(--stale-soft); }
.smallchip.pr { color: var(--muted); border: 1px solid var(--line-strong); font-weight: 500; }

.prrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 7px 2px; border-bottom: 1px solid var(--line);
}
.prrow:last-child { border-bottom: none; }
.prrow .id {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--muted); flex-shrink: 0;
}
.prrow a.ttl { color: var(--ink); text-decoration: none; }
.prrow a.ttl:hover { color: var(--accent-ink); text-decoration: underline; }
.prrow .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--faint); }

.spark { display: flex; flex-direction: column; gap: 3px; }
.spark svg { display: block; }
.spark .cap {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
}

.modal-foot {
  border-top: 1px solid var(--line); padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; flex-shrink: 0; background: var(--surface);
}

/* ── login ──────────────────────────────── */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 28px; }
.login-card {
  width: min(400px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lift); padding: 30px 30px 26px;
}
.login-card .eyebrow {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-ink);
}
.login-card h1 { margin: 4px 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.login-card p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.login-card label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 5px; letter-spacing: 0.02em;
}
.login-card .field { margin-bottom: 15px; }
.login-card input, .login-card select {
  width: 100%; font-family: inherit; font-size: 14.5px;
  color: var(--ink); background: var(--raised);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
}
.login-card input:focus, .login-card select:focus { outline: none; border-color: var(--accent); }
.login-card button {
  width: 100%; font-family: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--on-accent); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 9px;
  padding: 11px; cursor: pointer; margin-top: 4px;
}
.login-card button:hover { filter: brightness(1.08); }
.login-error {
  font-size: 13.5px; color: var(--stale); background: var(--stale-soft);
  border-radius: 8px; padding: 9px 11px; margin-bottom: 14px;
}
.login-hint {
  font-size: 13px; color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 8px; padding: 9px 11px; margin-bottom: 14px;
}
.login-card .sub {
  display: block; margin-top: 5px;
  font-size: 12px; color: var(--faint); font-weight: 400;
}
.checkline {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--muted); margin: 4px 0 6px;
  cursor: pointer;
}
.checkline input { width: auto; margin: 0; accent-color: var(--accent); }

/* devices */
.device-list { display: flex; flex-direction: column; gap: 8px; }
.device {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: var(--raised);
}
.device .info { flex: 1; min-width: 0; }
.device .name { font-weight: 600; font-size: 14px; }
.device .name .badge {
  font-size: 10.5px; font-weight: 600; color: var(--fresh);
  background: var(--fresh-soft); border-radius: 4px;
  padding: 1px 6px; margin-left: 7px;
}
.device .meta { font-size: 12px; color: var(--faint); }
.device .meta .mono { font-size: 11.5px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--band); color: var(--band-ink);
  font-size: 13.5px; padding: 10px 16px; border-radius: 9px;
  box-shadow: var(--shadow-lift); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .silo { animation: none; }
  .lamp.live, .person.is-active .avatar .dot { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
