/* The strip: the identity motif. Every project, idea, bot and server is one strip
   that reads left to right like a flight progress strip. */

.strip-board { display: grid; gap: var(--space-xs); }
.strip-head, .strip {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) 11rem;
  gap: 0;
}
.strip-head { padding: 0 0 var(--space-xs); position: sticky; top: 57px; background: var(--paper); z-index: 2; }
.strip-head .track { border: 0; background: none; }
.strip-head .cell { font: 600 14px/1 var(--font-strip); color: var(--ink-2); background: none; border: 0; min-height: 0; padding: var(--space-xs) var(--space-sm); }

.strip {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong);
  border-radius: var(--radius-cell);
  padding: 0;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.strip:hover { border-color: var(--rule-strong); background: var(--paper); }
.strip:active { background: var(--sunk); }
.strip--waits { border-left-color: var(--amber); }
.strip--fault { border-left-color: var(--fault); }
.strip--done { border-left-color: var(--ok); }

.strip__id { padding: var(--space-sm) var(--space-md); border-right: 1px solid var(--rule); min-width: 0; }
.strip__id strong { display: block; font: 600 17px/1.15 var(--font-strip); }
.strip__id small { color: var(--ink-3); font-size: 12px; }
.strip__meta { padding: var(--space-sm) var(--space-md); border-left: 1px solid var(--rule); font-size: 12px; color: var(--ink-2); min-width: 0; }
.strip__meta .next { display: block; color: var(--ink); font-size: 13px; }
.strip__meta .now-line { display: none; }

.track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.cell {
  position: relative; min-height: 58px; min-width: 0;
  padding: var(--space-sm);
  border-right: 1px solid var(--rule);
  font: 500 14px/1.15 var(--font-strip);
  color: var(--ink-3);
}
.cell:last-child { border-right: 0; }
.cell .lbl { display: block; }
.cell .sub { display: block; margin-top: 3px; font: 400 12px/1.25 var(--font-text); color: inherit; }
.cell--done { color: var(--ink-2); }
.cell--done .lbl::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: var(--ink-2); vertical-align: 1px; }
/* "Now" is a raised ink cell. Amber is reserved for "waits on you", so it only
   lights the now-cell of a strip that is blocked on Hendra. */
.cell--now { background: var(--sunk); color: var(--ink); font-weight: 600; box-shadow: inset 0 3px 0 var(--ink); }
.cell--now .sub { color: var(--ink-2); }
.strip--waits .cell--now { background: var(--amber); color: var(--on-amber); box-shadow: none; }
.strip--waits .cell--now .sub { color: var(--on-amber); }
.cell--skip { color: var(--ink-3); text-decoration: line-through; }
.cell--verdict-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.cell--verdict-no { background: var(--fault-soft); color: var(--fault); font-weight: 600; }
.cell--verdict-park { background: var(--sunk); color: var(--ink-2); font-weight: 600; }

/* Coding segments: one block per plan task / release. Counted, never smoothed. */
.segs { display: flex; gap: 2px; margin-top: 5px; }
.segs i { flex: 1 1 0; height: 7px; max-width: 14px; border: 1px solid currentColor; border-radius: 1px; }
.segs i.on { background: currentColor; }

/* Board controls */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-lg); }
.seg-control { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); overflow: hidden; }
.seg-control button {
  min-height: 44px; padding: 0 var(--space-lg); border: 0; background: var(--surface); cursor: pointer;
  font: 500 16px/1 var(--font-strip); color: var(--ink-2);
}
.seg-control button + button { border-left: 1px solid var(--rule-strong); }
.seg-control button:hover { background: var(--sunk); color: var(--ink); }
.seg-control button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg-control .count { font: 400 12px/1 var(--font-num); margin-left: 6px; opacity: 0.8; }

.search {
  min-height: 44px; min-width: 0; flex: 1 1 200px; max-width: 320px; padding: 0 var(--space-md);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--surface);
}
.search:hover { border-color: var(--ink-3); }

.empty {
  padding: var(--space-xl); border: 1px dashed var(--rule-strong); border-radius: var(--radius-panel);
  color: var(--ink-2); background: var(--surface);
}
.empty strong { color: var(--ink); display: block; margin-bottom: var(--space-xs); }

/* Bots + servers rows reuse the strip */
.strip--row { grid-template-columns: 13rem minmax(0, 1fr) 11rem; cursor: default; }
.strip--row:hover { background: var(--surface); border-color: var(--rule); }
.kv { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.kv > div { padding: var(--space-sm); border-right: 1px solid var(--rule); min-width: 0; }
.kv > div:last-child { border-right: 0; }
.kv dt { font: 500 13px/1 var(--font-strip); color: var(--ink-3); margin-bottom: 4px; }
.kv dd { margin: 0; font-size: 14px; }
.week { display: flex; gap: 2px; align-items: end; height: 26px; }
.week i { flex: 1 1 0; max-width: 12px; border-radius: 1px; }
.week i.up { background: var(--ok); }
.week i.down { background: var(--fault); }
.week i.flat { background: var(--rule-strong); height: 2px !important; }
.row-error { grid-column: 2 / -1; padding: var(--space-sm) var(--space-md); color: var(--fault); font-size: 14px; border-top: 1px solid var(--rule); }

/* Claude board */
.cols-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-2xl); align-items: start; }
.bars li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 5rem; gap: var(--space-sm); align-items: center; padding: 5px 0; }
.bars .bar { height: 14px; background: var(--ink-2); border-radius: 1px; }
.bars li:first-child .bar { background: var(--amber); }
.bars .num { text-align: right; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-panel); background: var(--surface); margin-bottom: var(--space-xl); }
.facts > div { padding: var(--space-md) var(--space-lg); border-right: 1px solid var(--rule); }
.facts > div:last-child { border-right: 0; }
.facts b { display: block; font: 500 26px/1.1 var(--font-num); }
.facts span { font-size: 13px; color: var(--ink-2); }
.notes-list li { display: flex; justify-content: space-between; gap: var(--space-sm); padding: 7px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.notes-list code { font: 400 13px/1.3 var(--font-num); overflow-wrap: anywhere; }

/* Brief */
.brief { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-2xl); align-items: start; }
.message { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ink); border-radius: var(--radius-cell); padding: var(--space-lg) var(--space-xl); font-size: 15px; line-height: 1.6; }
.message h3 { font: 600 16px/1.2 var(--font-strip); margin: var(--space-md) 0 var(--space-2xs); }
.message h3:first-child { margin-top: 0; }
.message p { margin: 0; }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius-panel); padding: var(--space-md) var(--space-lg); margin: 0 0 var(--space-lg); background: var(--surface); }
legend { font: 600 16px/1 var(--font-strip); padding: 0 var(--space-xs); }
.opt { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; font-size: 14px; }
.opt input { width: 18px; height: 18px; accent-color: var(--ink); }
select.input { min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper); }

/* Detail drawer */
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(640px, 100vw);
  border: 0; border-left: 1px solid var(--rule-strong); padding: 0;
  background: var(--paper); color: var(--ink);
}
dialog.drawer[open] { animation: slide var(--dur-mid) var(--ease-out); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.drawer::backdrop { background: oklch(0.2 0.01 60 / 0.35); }
.drawer__head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--rule); padding: var(--space-lg) var(--space-xl); display: flex; justify-content: space-between; gap: var(--space-md); align-items: start; }
.drawer__head h2 { font: 600 26px/1.1 var(--font-strip); }
.drawer__body { padding: var(--space-xl); display: grid; gap: var(--space-2xl); }
.drawer__body h3 { font: 600 17px/1.2 var(--font-strip); margin-bottom: var(--space-sm); }
.timeline li { display: grid; grid-template-columns: 6.5rem 6rem minmax(0, 1fr); gap: var(--space-sm); padding: 7px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.timeline.notes-tl li { grid-template-columns: 4.5rem minmax(0, 1fr); }
.timeline .stage { font: 600 15px/1.2 var(--font-strip); }
.timeline .is-now { color: var(--amber-ink); }
.tasks li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: var(--space-sm); padding: 6px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.tasks .box { width: 14px; height: 14px; border: 1.5px solid var(--ink-2); border-radius: 2px; margin-top: 3px; }
.tasks .box.on { background: var(--ink-2); }
.sources code { font: 400 13px/1.5 var(--font-num); display: block; overflow-wrap: anywhere; }

/* Toast */
.toast-region { position: fixed; bottom: var(--space-xl); left: 50%; transform: translateX(-50%); z-index: 20; display: grid; gap: var(--space-xs); width: min(460px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); padding: var(--space-md) var(--space-lg); border-radius: var(--radius-control); font-size: 14px; animation: arrive var(--dur-mid) var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .today, .cols-2, .brief { grid-template-columns: minmax(0, 1fr); }
  .today__side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .strip-head, .strip, .strip--row { grid-template-columns: 10rem minmax(0, 1fr) 9rem; }
}
@media (max-width: 760px) {
  main { padding: var(--space-lg); }
  .console { grid-template-columns: 1fr auto; padding: var(--space-sm) var(--space-lg); gap: var(--space-sm); }
  .boards { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board-tab { justify-content: center; padding: 0 var(--space-xs); font-size: 16px; min-height: 44px; }
  .board-tab kbd { display: none; }
  .collector__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .collector[data-stale="true"] .collector__short { display: inline; font-size: 11px; line-height: 1.2; margin-left: 2px; }
  .strip-head { display: none; }
  .seg-control { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); width: 100%; }
  .seg-control button { min-height: 44px; box-shadow: inset 0 0 0 0.5px var(--rule-strong); }
  .seg-control button + button { border-left: 0; }
  .search { max-width: none; }
  .strip, .strip--row { grid-template-columns: minmax(0, 1fr); }
  .strip__id { border-right: 0; border-bottom: 1px solid var(--rule); }
  .strip__meta { border-left: 0; border-top: 1px solid var(--rule); }
  .cell { min-height: 48px; padding: 6px 4px; font-size: 12px; }
  .cell .sub { display: none; }
  .strip__meta .now-line { display: block; font-weight: 600; color: var(--ink); font-size: 13px; }
  .cell .lbl-long { display: none; }
  .kv { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv > div { border-bottom: 1px solid var(--rule); }
  .need { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .moved li { grid-template-columns: 4rem minmax(0, 1fr); }
  .moved .tag { grid-column: 2; grid-row: 1; }
  .moved .what { grid-column: 1 / -1; }
  .moved .ref { grid-column: 1 / -1; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .bars li { grid-template-columns: 7rem minmax(0, 1fr) 4rem; }
  .timeline li { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .timeline li > :last-child { grid-column: 1 / -1; }
  .row-error { grid-column: 1; }
}
@media (min-width: 761px) { .cell .lbl-short { display: none; } }
@media (max-width: 760px) { .cell .lbl-short { display: inline; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 120ms !important; transition-duration: 0ms !important; }
  dialog.drawer[open] { animation-name: arrive; }
  .btn:active { transform: none; }
}

/* ---------- Hendra's own changes: provenance, status form, comments ---------- */
.prov { display: inline-block; margin-left: 6px; font: 400 12px/1.4 var(--font-text); color: var(--ink-3); }
.prov--you { color: var(--amber-ink); font-weight: 600; }
.strip__meta .prov { margin-left: 0; display: block; }
.status-form, .details-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); align-items: end; }
.field { display: grid; gap: 4px; font: 500 14px/1.2 var(--font-strip); color: var(--ink-2); min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field select, .field input, .comment-form textarea {
  min-height: 44px; padding: 0 var(--space-md); min-width: 0;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-control);
  background: var(--surface); font: 400 15px/1.4 var(--font-text); color: var(--ink);
}
.comment-form textarea { width: 100%; padding: var(--space-sm) var(--space-md); resize: vertical; }
.field select:hover, .field input:hover, .comment-form textarea:hover { border-color: var(--ink-3); }
.field select:disabled { opacity: 0.5; cursor: not-allowed; }
.comment-form textarea[aria-invalid="true"] { border-color: var(--fault); }
.status-form .btn, .details-form .btn, .comment-form .btn { justify-self: start; }
.comment-form { display: grid; gap: var(--space-sm); margin-top: var(--space-sm); }
.comments li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-sm); padding: 7px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.comments small { display: block; color: var(--ink-3); font-size: 12px; }
.hint, .empty-inline { font-size: 13px; color: var(--ink-2); margin-top: var(--space-xs); }
.need__act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-xs); }
.need__btns { display: inline-flex; flex-wrap: wrap; gap: 2px; }
#needs .empty { list-style: none; }
@media (max-width: 760px) {
  .need__act { justify-content: flex-start; }
  .status-form, .details-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Today, Ideas, Projects and the drawer (T12) ---------- */
.banner {
  margin-bottom: var(--space-xl); padding: var(--space-md) var(--space-lg);
  background: var(--fault-soft); color: var(--ink);
  border: 1px solid var(--rule); border-left: 5px solid var(--fault); border-radius: var(--radius-cell);
}
.banner strong { color: var(--fault); }

.toolbar .btn, .seg-control button, .need .btn, .idea-actions .btn, .panel .btn, .drawer .btn { min-height: 44px; }
.panel h2 .linkish { min-height: 44px; display: inline-flex; align-items: center; }
.btn--toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--toggle[aria-pressed="true"]:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--toggle .count { font: 400 12px/1 var(--font-num); margin-left: 6px; opacity: 0.8; }
html .btn.btn--danger { background: var(--fault); color: var(--paper); border-color: var(--fault); }
html .btn.btn--danger:hover { background: var(--fault); color: var(--paper); filter: brightness(0.92); border-color: var(--fault); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* An idea with its "Still want this?" row hangs under the strip, on the same amber edge. */
.idea-row { display: grid; }
.idea-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md); background: var(--surface);
  border: 1px solid var(--rule); border-top: 0; border-left: 4px solid var(--amber);
}
.idea-actions__ask { font: 600 14px/1.2 var(--font-strip); color: var(--amber-ink); }
.strip-board .idea-row .strip { cursor: default; }
.strip-wrap--hidden .strip { opacity: 0.7; }
.strip-wrap__note { font-size: 12px; color: var(--ink-3); padding: 0 0 var(--space-2xs); }

/* Drawer */
.hint--now { display: none; }
.drawer__body h4 { font: 600 15px/1.2 var(--font-strip); color: var(--ink-2); margin: var(--space-lg) 0 var(--space-xs); }
.drawer__body section { min-width: 0; }
.drawer-track .cell { min-height: 52px; padding: 6px 4px; font-size: 13px; }
.drawer-track .cell .lbl-long { display: none; }
.drawer-track .cell .lbl-short { display: inline; }
.drawer-track .cell .sub { display: block; font-size: 11px; overflow-wrap: anywhere; }
.drawer-track .track { border: 1px solid var(--rule); border-radius: var(--radius-cell); background: var(--surface); }
.drawer .row-error { grid-column: auto; padding: 0; border: 0; }
.kind-guess { font: 600 15px/1.3 var(--font-strip); margin-bottom: var(--space-sm); }
.setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) 0; border-top: 1px solid var(--rule); font-size: 14px; }
.setting p { flex: 1 1 14rem; color: var(--ink-2); }
.retire-confirm { margin-top: var(--space-sm); padding: var(--space-md) var(--space-lg); border: 1px solid var(--fault); border-left-width: 4px; border-radius: var(--radius-cell); background: var(--fault-soft); display: grid; gap: var(--space-sm); }
.status-form .field-error, .details-form .field-error { margin-top: 0; }
.status-form .field-error.field--wide, .details-form .field-error.field--wide { grid-column: 1 / -1; }
.tasks .prov { display: block; margin-left: 0; }
.sources p.hint { margin-top: var(--space-sm); }
@media (max-width: 760px) {
  .toolbar .btn--toggle { flex: 1 1 8rem; }
  .idea-actions { flex-direction: column; align-items: flex-start; }
  dialog.drawer { width: 100vw; max-width: 100vw; }
  .drawer-track .cell .sub { display: none; }
  .hint--now { display: block; }
  .drawer__head { padding: var(--space-md) var(--space-lg); }
  .drawer__body { padding: var(--space-lg); }
}

/* The line under a glance panel title that says when its numbers are from. */
.glance-when { font-size: 12px; line-height: 1.4; color: var(--ink-2); margin: calc(var(--space-xs) * -1) 0 var(--space-sm); }
