/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
/* Any author `display` beats the UA rule for [hidden], so state it once
   and loudly: every `hidden` attribute in this app means hidden. */
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
button { font: inherit; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; color: var(--fg); text-decoration: none; }
.brand__mark { display: block; }   /* kill the inline-image baseline gap */
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px; background: var(--card2); color: var(--muted);
}
.avatar:hover { color: var(--fg); }
.segmented { display: flex; gap: 2px; padding: 3px; background: var(--bg); border-radius: var(--radius-sm); }
.segmented__item { padding: 5px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; text-decoration: none; }
.segmented__item.is-active { color: var(--fg); background: var(--card2); }

/* ── Layout ───────────────────────────────────────────────────────────── */
.page { max-width: 1120px; margin: 0 auto; padding: 24px; }
.page--wide { max-width: none; padding: 20px 24px 32px; }
.page--narrow { max-width: 620px; }
.page--centre { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 56px); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* ── Flashes ──────────────────────────────────────────────────────────── */
.flashes { position: fixed; top: 68px; right: 24px; z-index: 20; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px;
  background: var(--card2); border: 1px solid var(--line2); color: var(--fg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); animation: flash-in 0.25s ease-out;
}
.flash--success { border-color: var(--full); }
.flash--error { border-color: var(--danger); }
.flash--info { border-color: var(--link); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Buttons, forms ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer;
  background: var(--card2); color: var(--fg);
}
.btn:hover { filter: brightness(1.1); }
.btn--sm { padding: 6px 12px; }
.btn--block { width: 100%; height: 44px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { background: transparent; border-color: var(--line2); color: var(--fg2); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.link-quiet { color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.link-quiet:hover { color: var(--fg); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; text-decoration: none; font-size: 16px; line-height: 1;
}
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.inline-form { display: inline-flex; gap: 2px; margin-top: 16px; }
.col__tools .inline-form { margin: 0; }

.card { padding: 28px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-row { display: flex; gap: 14px; }
.field__label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.input {
  height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line2); color: var(--fg); font: inherit;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); }
select.input { appearance: none; }
.check { display: flex; align-items: center; gap: 8px; color: var(--fg2); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.fieldset legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.form__actions { display: flex; gap: 10px; margin-top: 4px; }

.hue-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.hue-pick { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line2); cursor: pointer; }
.hue-pick input { position: absolute; opacity: 0; }
.hue-pick__swatch { width: 18px; height: 18px; border-radius: 5px; background: var(--hue); }
.hue-pick--green { --hue: #3fcf63; } .hue-pick--blue { --hue: #5b8def; } .hue-pick--red { --hue: #f0684e; }
.hue-pick--amber { --hue: #e0a53a; } .hue-pick--violet { --hue: #9b7cf0; } .hue-pick--teal { --hue: #3cc5b8; }
.hue-pick:has(input:checked) { border-color: var(--hue); background: var(--card2); }

.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick__tile {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius-sm); border: 1px solid var(--line2); color: var(--fg2); cursor: pointer;
}
.icon-pick:has(input:checked) .icon-pick__tile { border-color: var(--accent); color: var(--accent); background: var(--card2); }

/* ── Auth ─────────────────────────────────────────────────────────────── */
.auth-card { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 22px; padding: 32px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.auth-card h1 { font-size: 24px; }
.auth-card__head { display: flex; flex-direction: column; gap: 4px; }
.auth-alt { margin: 0; color: var(--muted); font-size: 13px; }

/* ── Projects list ────────────────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.project-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--line); color: var(--fg); text-decoration: none;
}
.project-card:hover { border-color: var(--line2); }
.project-card__top { display: flex; justify-content: space-between; gap: 10px; }
.project-card__name { font-weight: 800; font-size: 16px; }
.project-card__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.hue-strip { display: flex; gap: 3px; height: 4px; }
.hue-strip__seg { flex: 1; border-radius: 2px; background: var(--hue, var(--line2)); }
.hue-strip__seg--green { --hue: #3fcf63; } .hue-strip__seg--blue { --hue: #5b8def; } .hue-strip__seg--red { --hue: #f0684e; }
.hue-strip__seg--amber { --hue: #e0a53a; } .hue-strip__seg--violet { --hue: #9b7cf0; } .hue-strip__seg--teal { --hue: #3cc5b8; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.bar--wide { width: 160px; }
.bar__fill { display: block; height: 100%; background: var(--full); transition: width 0.3s ease; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; color: var(--muted); }

/* ── Tree page ────────────────────────────────────────────────────────── */
.tree-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.tree-head__title { display: flex; align-items: baseline; gap: 12px; }
.tree-head__stats { display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--muted); }
.legend { display: flex; align-items: center; gap: 8px; }
.legend__swatch { display: inline-block; width: 26px; height: 14px; border-radius: 4px; }
.legend__swatch--full { background: var(--full); }
.legend__swatch--part { background: var(--part); }
.legend__swatch--empty { border: 1.5px solid var(--line2); }
.legend__n { color: var(--fg2); font-weight: 700; }
.points { display: flex; align-items: center; gap: 10px; margin-left: 12px; color: var(--fg); }
.hint { margin: 14px 0 0; font-size: 12px; }

.tree { display: flex; gap: 24px; align-items: stretch; overflow-x: auto; padding-bottom: 8px; }

.col {
  position: relative; flex: 0 0 400px; min-height: 420px;
  display: flex; flex-direction: column;
  background: var(--tint-bg, var(--card)); border: 1px solid var(--tint-edge, var(--line));
  border-radius: var(--radius-lg); overflow: hidden;
}
.col__wm { position: absolute; right: -40px; bottom: 30px; color: var(--tint-wm, var(--muted)); opacity: 0.07; pointer-events: none; }
.col__body { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 8px; }
.col__foot {
  position: relative; display: flex; align-items: center; gap: 10px; margin-top: auto;
  padding: 12px 18px 14px; border-top: 1px solid var(--tint-edge, var(--line));
}
.col__name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: var(--tint-fg, var(--fg)); }
.col__pts { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--tint-fg, var(--fg)); }
.col__tools { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.col:hover .col__tools, .col:focus-within .col__tools { opacity: 1; }
.col--locked .col__body { opacity: 0.55; }
.col--locked .col__body .tier-note:first-child { opacity: 1; }

.col--add {
  flex: 0 0 240px; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center;
  border: 1px dashed var(--line2); background: transparent; color: var(--muted); text-decoration: none; font-weight: 700;
}
.col--add:hover { color: var(--fg); border-color: var(--muted); }
.col--add__plus { font-size: 28px; line-height: 1; }
.col--add__hint { font-weight: 500; font-size: 12px; }

.tier { display: flex; flex-direction: column; gap: 8px; }
.tier--closed { padding-top: 8px; border-top: 1px dashed var(--line2); }
.tier--closed .tier__row { opacity: 0.45; }
.tier-note { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tier__row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tier-add { align-self: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tier-add:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }

/* Tiles */
.tile { position: relative; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; }
.tile__box {
  position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--card2); border: 2px solid var(--empty); color: var(--muted);
  cursor: pointer; padding: 0; transition: transform 0.08s ease, border-color 0.15s ease;
}
.tile__box:disabled { cursor: default; }
.tile--live .tile__box:hover { transform: translateY(-1px); }
.tile--live .tile__box:active { transform: scale(0.97); }
.tile--part .tile__box { border-color: var(--part); color: var(--fg); }
.tile--full .tile__box { border-color: var(--full); color: var(--fg); }
.tile__plate {
  width: 80px; padding: 2px 0; border-radius: 6px; text-align: center; font-size: 12px; font-weight: 800;
  background: var(--card); border: 1.5px solid var(--line2); color: var(--muted);
}
.tile--part .tile__plate { background: var(--part); border-color: var(--part); color: var(--on-accent); }
.tile--full .tile__plate { background: var(--full); border-color: var(--full); color: var(--on-accent); }
.tile__label {
  height: 28px; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile--part .tile__label, .tile--full .tile__label { color: var(--fg2); }
.tile__label:hover { text-decoration: underline; color: var(--fg); }
/* The add-task affordance is a slim bar at the end of the row so it never
   costs a whole tile of width (three tiles plus it must fit one row). */
.tile--add { width: 28px; opacity: 0; transition: opacity 0.15s; }
.tier__row:hover .tile--add, .tile--add:focus { opacity: 1; }
.tile__box--add { width: 28px; height: 80px; border-style: dashed; border-width: 1.5px; font-size: 20px; color: var(--muted); }
.tile--add .tile__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tile--add:hover .tile__box--add { color: var(--fg); border-color: var(--muted); }
.tile.is-busy .tile__box { opacity: 0.6; }
.tile.is-flash .tile__box { animation: pop 0.25s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ── List view ────────────────────────────────────────────────────────── */
.list-branch { margin-bottom: 24px; }
.list-branch__name { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--hue, var(--fg)); }
.list-branch__name--green { --hue: #7ee39a; } .list-branch__name--blue { --hue: #8fb8ff; } .list-branch__name--red { --hue: #ff9a86; }
.list-branch__name--amber { --hue: #f3c46b; } .list-branch__name--violet { --hue: #c3a8ff; } .list-branch__name--teal { --hue: #7fe0d8; }
.pill { padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); font-size: 11px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table tr.is-dim td { opacity: 0.5; }
.table__icon { display: inline-flex; vertical-align: middle; margin-right: 8px; color: var(--fg2); }
.table__actions { text-align: right; }
.state { font-weight: 700; font-size: 12px; }
.state--full { color: var(--full); } .state--part { color: var(--part); } .state--empty { color: var(--muted); }

@media (max-width: 720px) {
  .topbar { padding: 0 14px; }
  .tree-head__stats { display: none; }
  .col { flex-basis: 320px; }
  .field-row { flex-direction: column; }
}

/* ── Global nav ───────────────────────────────────────────────────────── */
.gnav { display: flex; gap: 4px; }
.gnav__item { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; text-decoration: none; }
.gnav__item:hover { color: var(--fg); }
.gnav__item.is-active { color: var(--fg); background: var(--card2); }

/* ── Shared bits ──────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 5px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); font-size: 12px; font-weight: 700; }
.chip--warn { color: var(--part); background: rgba(240, 147, 43, 0.12); }
.phase { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; background: var(--card2); color: var(--fg2); white-space: nowrap; }
.phase--idea { color: #c3a8ff; background: rgba(155, 124, 240, 0.14); }
.phase--exploring { color: #8fb8ff; background: rgba(91, 141, 239, 0.14); }
.phase--building { color: #7ee39a; background: rgba(63, 207, 99, 0.14); }
.phase--maintaining { color: #7fe0d8; background: rgba(60, 197, 184, 0.14); }
.phase--done { color: var(--muted); background: var(--card2); }
.phase--parked { color: #f3c46b; background: rgba(224, 165, 58, 0.14); }
.phase--dropped { color: var(--danger); background: rgba(240, 104, 78, 0.12); }
.phase--branch { color: var(--hue, var(--fg2)); background: var(--card2); }
.is-due { color: var(--part); font-weight: 700; }
.input--sm { height: 36px; font-size: 13px; }
.input--xs { height: 30px; padding: 0 8px; font-size: 12px; }
.action-form { display: flex; align-items: center; gap: 8px; }
.action-form .input { flex: 1; }
.section { margin-bottom: 28px; }
.section__title { margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.strip { display: inline-flex; gap: 2px; }
.strip__cell { width: 10px; height: 14px; border-radius: 2px; background: var(--line2); }
.strip__cell--1 { background: rgba(63, 207, 99, 0.35); }
.strip__cell--2 { background: rgba(63, 207, 99, 0.65); }
.strip__cell--3 { background: var(--full); }

/* ── Today ────────────────────────────────────────────────────────────── */
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.due-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.due-row--quiet { background: transparent; }
.due-row__main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.due-row__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.due-row__name { font-weight: 800; color: var(--fg); text-decoration: none; }
.due-row__name:hover { text-decoration: underline; }
.due-row__age { font-size: 12px; color: var(--part); font-weight: 600; }
.due-row--quiet .due-row__age { color: var(--muted); font-weight: 500; }
.due-row__actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.due-row__actions .inline-form { margin: 0; }
.inbox-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.inbox-add textarea { height: auto; }
.inbox-item { padding: 10px 12px; margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.inbox-item--back { border-color: var(--part); }
.inbox-item__text { white-space: pre-line; margin-bottom: 8px; color: var(--fg2); }
.inbox-item__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inbox-item__actions .inline-form { margin: 0; gap: 4px; }
.parked-list { margin-top: 10px; }
.review-link { display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--card2); color: var(--fg); font-weight: 700; text-decoration: none; text-align: center; }
.review-link:hover { filter: brightness(1.1); }

/* ── Board ────────────────────────────────────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.bcol { border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.bcol__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bcol__name { font-weight: 800; }
.bcol--idea .bcol__name { color: #c3a8ff; } .bcol--exploring .bcol__name { color: #8fb8ff; }
.bcol--building .bcol__name { color: #7ee39a; } .bcol--maintaining .bcol__name { color: #7fe0d8; }
.bcol__count { font-size: 12px; font-weight: 700; color: var(--muted); }
.bcol__count.is-full { color: var(--part); }
.bcol__body { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 120px; }
.bcol__empty { padding: 20px 0; text-align: center; }
.pcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--card2); border: 1px solid var(--line2); }
.pcard--due { border-color: var(--part); }
.pcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pcard__name { font-weight: 800; color: var(--fg); text-decoration: none; }
.pcard__name:hover { text-decoration: underline; }
.pcard__age { font-size: 12px; font-weight: 700; color: var(--muted); }
.pcard__age.is-due { color: var(--part); }
.pcard__action { font-size: 12px; color: var(--fg2); }
.pcard__action.is-missing { color: var(--part); font-style: italic; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; }
.pcard__moves { display: flex; gap: 2px; }
.pcard__moves .inline-form { margin: 0; }
.shelves { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.shelf__head { cursor: pointer; padding: 8px 4px; display: flex; gap: 8px; align-items: center; }
.shelf__body { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.shelf-row { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.shelf-row .inline-form { margin: 0 0 0 auto; }

/* ── Review ───────────────────────────────────────────────────────────── */
.review-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 12px; }
.review-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.review-card__name { font-size: 22px; font-weight: 800; color: var(--fg); text-decoration: none; letter-spacing: -0.02em; }
.review-card__meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; }
.review-card__progress { display: flex; flex-direction: column; gap: 6px; }
.review-card__branches { display: flex; flex-wrap: wrap; gap: 6px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-actions .btn--danger { margin-left: auto; }

/* ── Project form extras, tree header ─────────────────────────────────── */
.starter-picker { display: flex; flex-direction: column; gap: 6px; }
.starter { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); cursor: pointer; }
.starter input { margin-top: 3px; }
.starter__body { display: flex; flex-direction: column; gap: 2px; }
.starter__name { font-weight: 700; }
.starter:has(input:checked) { border-color: var(--accent); background: var(--card2); }
.next-action-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.next-action-bar .action-form { flex: 1; }
.next-action-bar .inline-form { margin: 0; }
code { font-family: Consolas, monospace; font-size: 12px; color: var(--fg2); }

@media (max-width: 900px) {
  .today-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gnav { display: none; }
}

/* ── Review: all projects on one scrolling page ───────────────────────── */
.review-banner {
  padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius);
  background: rgba(63, 207, 99, 0.12); border: 1px solid var(--full);
  color: var(--full); font-weight: 700; font-size: 13px;
}
/* A decided project stays on the page — the point of the page is the whole
   scope at once — but recedes so the undecided ones stand out. */
.review-card.is-decided { opacity: 0.55; border-color: var(--full); }
.review-card.is-decided:hover, .review-card.is-decided:focus-within { opacity: 1; }
.decided-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: rgba(63, 207, 99, 0.14); color: var(--full); font-size: 11px; font-weight: 700;
}
.decided-tag::before { content: "✓"; }
.review-card { scroll-margin-top: 72px; }

/* ── Project ideas, and dragging them into the tree ───────────────────── */
.ideas { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.ideas__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ideas__head .section__title { margin: 0; }
.ideas__add { display: flex; gap: 8px; max-width: 640px; margin-bottom: 14px; }
.ideas__add .input { flex: 1; }
.ideas__list { display: flex; flex-wrap: wrap; gap: 8px; }
.ideas__empty { max-width: 640px; }

.idea {
  position: relative; display: flex; align-items: center; gap: 8px;
  max-width: 420px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line2); cursor: grab;
}
.idea:hover { border-color: var(--muted); }
.idea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.idea.is-dragging { opacity: 0.4; cursor: grabbing; }
.idea__grip { color: var(--muted); flex-shrink: 0; display: flex; }
.idea__text { flex: 1; min-width: 0; color: var(--fg2); font-size: 13px; }
.idea__actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.idea:hover .idea__actions, .idea:focus-within .idea__actions { opacity: 1; }
.idea__actions .inline-form { margin: 0; }
.idea__place {
  position: absolute; top: 100%; left: 0; z-index: 5; display: flex; gap: 6px;
  margin-top: 4px; padding: 8px; border-radius: var(--radius-sm);
  background: var(--card2); border: 1px solid var(--line2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* While an idea is in flight, show where it can land. */
body.is-dragging-idea .tier__row,
body.is-dragging-idea .tier-add {
  outline: 1px dashed var(--line2); outline-offset: 4px; border-radius: var(--radius-sm);
}
body.is-dragging-idea .tier__row.is-drop,
body.is-dragging-idea .tier-add.is-drop {
  outline: 2px dashed var(--accent); outline-offset: 4px;
  background: rgba(63, 207, 99, 0.08);
}
body.is-dragging-idea .tile--add { opacity: 0; }   /* stop it fighting the drop zone */

/* ── Today: focus vs backburner ───────────────────────────────────────── */
.lanes { display: flex; flex-direction: column; gap: 18px; }
.lane { border-radius: var(--radius-lg); padding: 14px 16px 16px; }
.lane__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lane__head .section__title { margin: 0; }
.lane__count {
  padding: 1px 8px; border-radius: 999px; background: var(--card2);
  font-size: 12px; font-weight: 800; color: var(--fg2);
}
.lane__empty { padding: 14px 2px; }

/* The hierarchy is the point: focus is lit and solid, the backburner recedes. */
.lane--focus { background: var(--card); border: 1px solid var(--line2); }
.lane--focus .lane__count { background: var(--accent); color: var(--on-accent); }
.lane--back { background: transparent; border: 1px dashed var(--line); }
.lane--back .lane__head .section__title { color: var(--muted); }
.lane--back .prow { opacity: 0.72; }
.lane--back .prow:hover, .lane--back .prow:focus-within { opacity: 1; }

.prow {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius);
  background: var(--card2); border: 1px solid var(--line2); cursor: grab;
}
.prow:last-child { margin-bottom: 0; }
.prow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prow.is-dragging { opacity: 0.4; cursor: grabbing; }
.prow--due { border-color: var(--part); }
.prow--quiet { background: var(--card); padding: 9px 14px; }
.prow__grip { color: var(--muted); flex-shrink: 0; display: flex; }
.prow__main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.prow__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prow__name { font-weight: 800; color: var(--fg); text-decoration: none; }
.prow__name:hover { text-decoration: underline; }
.prow__age { font-size: 12px; color: var(--muted); }
.prow__objective { font-style: italic; }
.prow__side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.prow__actions { display: flex; align-items: center; gap: 2px; }
.prow__actions .inline-form { margin: 0; }
.prow--quiet .prow__actions { opacity: 0; transition: opacity 0.15s; }
.prow--quiet:hover .prow__actions, .prow--quiet:focus-within .prow__actions { opacity: 1; }
/* An empty next action is a problem, so make the empty box look like one. */
.input--wanting { border-color: var(--part); border-style: dashed; }

body.is-dragging-project .lane { outline: 1px dashed var(--line2); outline-offset: 3px; }
body.is-dragging-project .lane.is-drop {
  outline: 2px dashed var(--accent); outline-offset: 3px;
  background: rgba(63, 207, 99, 0.06);
}

@media (max-width: 720px) {
  .prow { flex-wrap: wrap; }
  .prow__side { width: 100%; justify-content: space-between; }
}
.focus-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 999px; background: var(--accent); vertical-align: middle;
}

/* ── Custom project templates ─────────────────────────────────────────── */
.settings-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 18px; }
.tmpl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.tmpl-row--quiet { background: transparent; border-style: dashed; }
.tmpl-row__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tmpl-row__name { font-weight: 800; color: var(--fg); text-decoration: none; }
.tmpl-row__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tmpl-row__actions .inline-form { margin: 0; }
.tag {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle;
}
.tbranch {
  display: grid; gap: 8px; margin-bottom: 10px; padding: 10px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line);
}
.tbranch__waits { grid-column: 1 / -1; font-size: 12px; }
.tbranch__tasks { grid-column: 1 / -1; height: auto; font-size: 12px; }
