/* Liftoff. The board is a strip bay: an aluminium rail with coloured paper strips in holders,
   the way air traffic control tracks flights. Each launch, task and contact is a strip.
   Type is B612, the typeface Airbus drew for cockpit screens. */

:root {
  color-scheme: light;
  --board: #d6dde0;
  --board-2: #c4cdd1;
  --rail: #1f2d33;
  --rail-2: #2c3c43;
  --on-rail: #e8eef0;
  --on-rail-2: #9fb0b7;
  --on-board: #17252c;
  --on-board-2: #46565d;
  --ink: #17252c;
  --ink-2: #44545b;
  --ink-3: #64747b;
  --rule: rgba(23, 37, 44, 0.16);
  --white: #fbfbf8;
  --buff: #f3e3a6;
  --blue: #cadeef;
  --pink: #f4cfca;
  --green: #d0e7c9;
  --lilac: #ded7ef;
  --grey: #e3e6e6;
  --band-buff: #c7a23a;
  --band-blue: #4f86b8;
  --band-pink: #c4584f;
  --band-green: #3f8f48;
  --band-lilac: #7a68b5;
  --band-white: #aab5b9;
  --focus: #1c5fd6;
  --primary: #17252c;
  --on-primary: #fbfbf8;
  --danger: #a8281f;
  --good: #1d6f2f;
  --bad: #a8281f;
  --series: #2a78d6;
  --chart-grid: rgba(23, 37, 44, 0.12);
  --shadow: 0 1px 0 rgba(10, 20, 25, 0.22), 0 0 0 1px rgba(10, 20, 25, 0.06);
  --font: 'B612', system-ui, sans-serif;
  --mono: 'B612 Mono', ui-monospace, monospace;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --board: #182126;
    --board-2: #24313730;
    --rail: #0f171b;
    --rail-2: #1b262b;
    --on-board: #e3eaec;
    --on-board-2: #a3b3b9;
    --white: #e9ebe6;
    --buff: #e2d293;
    --blue: #b7cde0;
    --pink: #e3bcb6;
    --green: #bfd8b8;
    --lilac: #cdc5e2;
    --grey: #cfd3d3;
    --focus: #7fb0ff;
    --primary: #e3eaec;
    --on-primary: #11191d;
    --series: #2a6fc4;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --board: #182126; --rail: #0f171b; --rail-2: #1b262b; --on-board: #e3eaec; --on-board-2: #a3b3b9;
  --white: #e9ebe6; --buff: #e2d293; --blue: #b7cde0; --pink: #e3bcb6; --green: #bfd8b8; --lilac: #cdc5e2; --grey: #cfd3d3;
  --focus: #7fb0ff; --primary: #e3eaec; --on-primary: #11191d; --series: #2a6fc4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--board);
  color: var(--on-board);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--white); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
.muted { color: var(--on-board-2); }
.late { color: var(--bad); font-weight: 700; }
.fine { font-size: 13px; color: var(--on-board-2); }
.pre { white-space: pre-wrap; }

/* ---------- boot and login ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 14px; justify-items: center; color: var(--on-board-2); }
.boot-mark { width: 120px; height: 26px; border-radius: 3px; background: linear-gradient(90deg, var(--band-buff) 0 14px, var(--buff) 14px); box-shadow: var(--shadow); animation: slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@media (prefers-reduced-motion: reduce) { .boot-mark { animation: none; } }
main.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; margin-left: 0; }
.login-strip { display: grid; grid-template-columns: 12px 1fr; width: min(420px, 100%); background: var(--buff); color: var(--ink); border-radius: 4px; box-shadow: var(--shadow); }
.login-strip .strip-band { border-radius: 4px 0 0 4px; }
.login-body { padding: 26px 22px 22px; display: grid; gap: 14px; }
.login-body h1 { font-size: 34px; }
.login-body .fine, .login-body .field-hint { color: var(--ink-2); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--rail); color: var(--on-rail); padding-bottom: var(--safe-b); }
.nav .brand { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.nav li a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; text-decoration: none; color: var(--on-rail-2); font-size: 12px; }
.nav li a.on { color: var(--on-rail); }
.nav li a.on .icon { color: var(--buff); }
main { padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 88px); outline: none; }
.fab { position: fixed; z-index: 21; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--buff); color: var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.12); display: grid; place-items: center; cursor: pointer; }
.fab:active { transform: translateY(1px); }

@media (min-width: 960px) {
  .nav { top: 0; right: auto; width: 220px; padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; }
  .nav .brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; text-decoration: none; padding: 4px 8px; }
  .nav ul { display: flex; flex-direction: column; height: auto; gap: 2px; }
  .nav li a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 4px; font-size: 15px; }
  .nav li a:hover { background: var(--rail-2); color: var(--on-rail); }
  .nav li a.on { background: var(--rail-2); }
  main { margin-left: 220px; padding: 0 32px 64px; }
  .fab { bottom: 28px; right: 28px; }
}

.page { max-width: 1120px; margin: 0 auto; padding-top: 20px; }
.page-narrow { max-width: 720px; margin: 0 auto; }
.page .page-narrow { margin: 0; }
.page-head { padding: 6px 0 14px; display: grid; gap: 6px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lede { color: var(--on-board-2); max-width: 62ch; }
.back { font-size: 14px; color: var(--on-board-2); text-decoration: none; }
.back::before { content: '‹ '; }
.block { margin-top: 26px; }
.block > h2 { margin-bottom: 10px; }
.block-note { color: var(--on-board-2); font-size: 14px; margin: -4px 0 10px; max-width: 70ch; }
.h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: grid; gap: 6px; }
.stack-loose { gap: 12px; }
.two-col { display: grid; gap: 0 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- strips ---------- */
.strip {
  --paper: var(--white);
  --band: var(--band-white);
  display: grid;
  grid-template-columns: 7px 1fr;
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: left;
  border: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}
.strip-tap { cursor: pointer; }
.strip-tap:hover { filter: brightness(0.985); }
.strip-band { background: var(--band); border-radius: 3px 0 0 3px; }
.strip-body { display: flex; min-width: 0; }
.t-white { --paper: var(--white); --band: var(--band-white); }
.t-buff { --paper: var(--buff); --band: var(--band-buff); }
.t-blue { --paper: var(--blue); --band: var(--band-blue); }
.t-pink { --paper: var(--pink); --band: var(--band-pink); }
.t-green { --paper: var(--green); --band: var(--band-green); }
.t-lilac { --paper: var(--lilac); --band: var(--band-lilac); }
.t-grey { --paper: var(--grey); --band: var(--band-white); }
.b-buff { background: var(--band-buff); }
.b-blue { background: var(--band-blue); }
.b-pink { background: var(--band-pink); }
.b-green { background: var(--band-green); }
.b-lilac { background: var(--band-lilac); }
.cell { padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.cell + .cell { border-left: 1px solid var(--rule); }
.cell-main { flex: 1; }
.cell-link { background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.cell-check { padding: 8px 4px 8px 10px; justify-content: center; }
.cell-check + .cell { border-left: 0; }
.cell-act { padding: 8px 10px; flex-direction: row; align-items: center; }
.cell-meta { align-items: flex-end; text-align: right; flex: none; min-width: 64px; }
.cell-spark { flex: none; width: 76px; padding: 8px; }
.cell-code { flex: none; width: 92px; gap: 4px; }
.cell-side { flex: none; width: 200px; gap: 5px; font-size: 13px; }
.cell-small { font-size: 12px; color: var(--ink-2); }
.row-title { font-weight: 700; display: flex; gap: 8px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.row-title.big { font-size: 19px; }
.row-sub { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.row-sub a { color: inherit; }
.stage-label { font-size: 12px; font-weight: 700; }
.score { font-size: 12px; color: var(--ink-2); }
.linked-mark { color: var(--band-green); display: inline-flex; }
.who { font-weight: 700; color: var(--band-lilac); }
.task.is-done .row-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-3); }
.contact.is-selected { outline: 2px solid var(--focus); }
.check { width: 26px; height: 26px; border-radius: 4px; border: 2px solid var(--ink-2); background: rgba(255, 255, 255, 0.5); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--white); }
.check.on { background: var(--ink); border-color: var(--ink); }
.coach .cell-act .btn { white-space: nowrap; }
@media (max-width: 520px) {
  .coach .strip-body { flex-wrap: wrap; }
  .coach .cell-main { flex: 1 1 100%; padding-bottom: 4px; }
  .coach .cell-act { border-left: 0; padding: 0 12px 10px; }
}

.code { font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 2px; background: var(--paper); color: var(--ink); box-shadow: inset 4px 0 0 var(--band); padding-left: 9px; flex: none; }
.code-sm { font-size: 11px; }
.bigcode { font-family: var(--mono); font-weight: 700; font-size: 22px; letter-spacing: 0.04em; }

/* site strips on the portfolio */
.site-strip .strip-body { flex-wrap: wrap; }
.site-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin-top: 10px; }
.side-row { display: flex; align-items: center; gap: 8px; }
.side-row b { font-size: 15px; }
@media (max-width: 700px) {
  .site-strip .cell-code { width: 100%; flex-direction: row; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--rule); }
  .site-strip .cell-main { border-left: 0; width: 100%; }
  .site-strip .cell-side { width: 100%; border-left: 0; border-top: 1px solid var(--rule); flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; }
}
@media (min-width: 700px) { .site-kpis { grid-template-columns: repeat(4, 1fr); } }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpis .kpi { background: var(--white); color: var(--ink); border-radius: 3px; box-shadow: var(--shadow); padding: 10px 12px; }
.kpi { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'label label' 'value delta' 'spark spark'; gap: 2px 8px; align-items: baseline; min-width: 0; }
.kpi-label { grid-area: label; font-size: 12px; color: var(--ink-2); }
.kpi-value { grid-area: value; font-size: 22px; font-weight: 700; line-height: 1.1; }
.kpi-delta { grid-area: delta; font-size: 12px; white-space: nowrap; }
.kpi-delta.up { color: var(--good); }
.kpi-delta.down { color: var(--bad); }
.kpi-sub { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); }
.kpi .spark { grid-area: spark; }
.site-kpis .kpi { grid-template-columns: 1fr; grid-template-areas: 'label' 'value' 'delta' 'spark'; }
.site-kpis .kpi-value { font-size: 17px; }
.spark { width: 100%; height: 22px; display: block; }
.spark polyline { stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-empty { height: 22px; display: block; }
.metric-value { font-weight: 700; font-size: 17px; }

/* ---------- charts ---------- */
.charts { display: grid; gap: 12px; }
@media (min-width: 900px) { .charts { grid-template-columns: 1fr 1fr; } }
.chart { margin: 0; background: var(--white); color: var(--ink); border-radius: 3px; box-shadow: var(--shadow); padding: 12px 12px 8px; min-width: 0; }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.chart-plot { position: relative; }
.chart svg { display: block; max-width: 100%; touch-action: pan-y; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .target { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .axis { fill: var(--ink-3); font: 11px var(--font); }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series); stroke: var(--white); stroke-width: 2; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart-empty { color: var(--ink-2); font-size: 14px; padding: 18px 0; }
.tip { position: absolute; top: 0; width: 120px; pointer-events: none; background: var(--rail); color: var(--on-rail); border-radius: 3px; padding: 5px 8px; font-size: 12px; display: grid; text-align: center; }
.tip b { font-size: 14px; }
.chart-table { margin-top: 6px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--ink-2); }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.chart-table td, .chart-table th { padding: 3px 4px; border-bottom: 1px solid var(--rule); text-align: left; }
.stagebars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stagebar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; width: 100%; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--on-board); text-align: left; }
.stagebar-label { font-size: 13px; }
.stagebar-track { height: 14px; background: var(--board-2); border-radius: 2px; overflow: hidden; }
.stagebar-fill { display: block; height: 100%; background: var(--band); border-radius: 0 4px 4px 0; min-width: 3px; }
.stagebar-n { font-weight: 700; text-align: right; }
.meter { display: inline-block; width: 90px; height: 8px; background: var(--rule); border-radius: 2px; overflow: hidden; vertical-align: middle; flex: none; }
.meter span { display: block; height: 100%; background: var(--band-green); }
.meter-n { font-size: 12px; }
.with-meter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.with-meter .meter { background: var(--board-2); }
.phase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.phase-list a { display: grid; grid-template-columns: 1fr 100px 44px; gap: 10px; align-items: center; padding: 6px 0; text-decoration: none; font-size: 14px; }
.phase-list .meter { width: 100%; background: var(--board-2); }
.ticks { list-style: none; display: flex; gap: 3px; padding: 0; margin: 10px 0 0; flex-wrap: wrap; }
.ticks li { width: 8px; height: 18px; border-radius: 2px; background: var(--band-green); }
.ticks li.bad { background: var(--band-pink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 3px; border: 1px solid rgba(23, 37, 44, 0.35); background: var(--white); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 700; font-size: 14px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15); }
.btn:hover { filter: brightness(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-danger { color: var(--danger); border-color: currentColor; }
.btn-small { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.btn-on { background: var(--buff); }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 3px; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--rule); }
.icon { flex: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 17px; border: 1px solid rgba(23, 37, 44, 0.25); background: transparent; color: var(--on-board); cursor: pointer; font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--rail); color: var(--on-rail); border-color: var(--rail); }
.chip[class*='t-'] { background: var(--paper); color: var(--ink); }
.chip[class*='t-'].on { box-shadow: inset 0 0 0 2px var(--ink); background: var(--paper); color: var(--ink); font-weight: 700; }
.chip-n { font-size: 12px; opacity: 0.8; }
.chip-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--band); }
.filters { display: grid; gap: 2px; margin-bottom: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 10px; }
.toolbar select, .toolbar input:not([type=checkbox]) { min-height: 34px; }
.search { flex: 1 1 200px; min-width: 0; }
.count { font-size: 13px; color: var(--on-board-2); margin: 0 0 6px; }
.viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--buff); color: var(--ink); border-radius: 3px; padding: 10px 12px; margin: 8px 0; box-shadow: var(--shadow); }
.viewbar p { flex: 1 1 260px; font-size: 14px; }
.bulkbar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 10px; background: var(--rail); color: var(--on-rail); border-radius: 4px; }
.bulkbar select { min-height: 34px; }
@media (min-width: 960px) { .bulkbar { bottom: 16px; } }
.batch-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

/* tabs */
.tabs { display: flex; gap: 2px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px; border-bottom: 1px solid var(--board-2); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 12px; text-decoration: none; color: var(--on-board-2); border-bottom: 3px solid transparent; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.tab.on { color: var(--on-board); border-bottom-color: var(--band-buff); font-weight: 700; }
.tab-n { font-size: 11px; background: var(--band-pink); color: #fff; border-radius: 8px; padding: 0 6px; }
@media (min-width: 960px) { .tabs { margin: 14px 0 0; padding: 0; } }
.site-head { display: grid; gap: 8px; }
.site-title { display: flex; gap: 14px; align-items: center; }
.site-title .bigcode { background: var(--paper); color: var(--ink); padding: 8px 12px 8px 16px; border-radius: 3px; box-shadow: var(--shadow), inset 6px 0 0 var(--band); }
.site-title .row-sub { color: var(--on-board-2); margin-top: 4px; }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field-label { font-size: 13px; font-weight: 700; color: var(--on-board-2); }
.field-label.small { font-weight: 400; }
.field-hint { font-size: 12px; color: var(--on-board-2); }
.field-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 11px; border-radius: 3px; border: 1px solid rgba(23, 37, 44, 0.3); background: var(--white); color: var(--ink); font-size: 16px;
}
textarea { resize: vertical; line-height: 1.45; }
.toolbar select, .toolbar input:not([type=checkbox]) { width: auto; font-size: 14px; min-height: 34px; padding: 5px 10px; }
.toolbar .search { width: auto; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.form-error { color: var(--danger); font-weight: 700; font-size: 14px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.check-row.inline { align-items: center; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 40px; height: 32px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow), inset 6px 0 0 var(--band); cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch:has(input:focus-visible) { outline: 3px solid var(--focus); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* empty states */
.empty { background: transparent; border: 1px dashed var(--board-2); border-color: rgba(23, 37, 44, 0.25); border-radius: 4px; padding: 18px; display: grid; gap: 8px; justify-items: start; }
.empty-title { font-weight: 700; }
.empty-text { color: var(--on-board-2); font-size: 14px; max-width: 60ch; }

/* sheets */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92vh; border-radius: 10px 10px 0 0; background: var(--board); color: var(--on-board); box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3); }
.sheet::backdrop { background: rgba(10, 18, 22, 0.55); }
.sheet[open] { animation: up 0.18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
@media (min-width: 760px) {
  .sheet { margin: auto; width: 560px; border-radius: 6px; max-height: 88vh; }
  .sheet-wide { width: 760px; }
}
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 10px 18px; border-bottom: 1px solid var(--board-2); }
.sheet-head h2 { font-size: 19px; }
.sheet-body { padding: 16px 18px 20px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--board-2); }
.sheet-block { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--board-2); }
.contact-head { display: grid; gap: 10px; }
.stage-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.action-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 3px; background: var(--white); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; border: 0; cursor: pointer; box-shadow: var(--shadow); }
.note-form { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 560px) { .note-form { grid-template-columns: auto 1fr auto; } }
.note-form select, .note-form input { min-height: 40px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.details dt { color: var(--on-board-2); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.quick-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.quick-item { display: grid; gap: 4px; text-align: left; padding: 14px; background: var(--white); color: var(--ink); border: 0; border-radius: 3px; box-shadow: var(--shadow), inset 5px 0 0 var(--band-buff); cursor: pointer; text-decoration: none; }
.quick-item .row-sub { font-size: 12px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px; border: 2px dashed rgba(23, 37, 44, 0.3); border-radius: 4px; cursor: pointer; font-weight: 700; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.found { background: var(--green); color: var(--ink); border-radius: 3px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.readings { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.readings li { display: grid; grid-template-columns: 1fr auto auto 38px; gap: 10px; align-items: center; border-bottom: 1px solid var(--rule); }
.metric-row { display: grid; gap: 6px; }
.metric-detail { display: grid; gap: 6px; margin-bottom: 8px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl { position: relative; padding-left: 18px; display: flex; align-items: flex-start; }
.tl::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--board-2); }
.tl::after { content: ''; position: absolute; left: 0; top: 12px; width: 10px; height: 10px; border-radius: 2px; background: var(--band-white); }
.tl-milestone::after, .tl-link::after { background: var(--band-green); }
.tl-deploy::after { background: var(--band-blue); }
.tl-decision::after, .tl-reply::after { background: var(--band-lilac); }
.tl-check::after, .tl-email::after { background: var(--band-buff); }
.tl-bounce::after { background: var(--band-pink); }
.tl-btn { flex: 1; display: grid; grid-template-columns: 64px 1fr; gap: 2px 10px; text-align: left; background: none; border: 0; padding: 7px 0; color: inherit; cursor: pointer; font: inherit; }
.tl-date { font-size: 12px; color: var(--on-board-2); padding-top: 2px; }
.tl-title { font-size: 14px; }
.tl-body { grid-column: 2; font-size: 13px; color: var(--on-board-2); white-space: pre-wrap; }
.tl-del { width: 32px; height: 32px; opacity: 0.6; }
.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.linklist a { display: inline-flex; gap: 8px; align-items: center; }
.checklist { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; }
.checklist li { display: grid; grid-template-columns: 1fr; gap: 0 12px; padding: 6px 0 6px 12px; border-bottom: 1px solid var(--board-2); position: relative; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 1px; background: var(--band-white); }
.checklist li.ok::before { background: var(--band-green); }
@media (min-width: 700px) { .checklist li { grid-template-columns: 180px 1fr 90px; } }
.table-wrap { overflow-x: auto; background: var(--white); color: var(--ink); border-radius: 3px; box-shadow: var(--shadow); }
.qtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.qtable th, .qtable td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: left; }
.qtable th { font-size: 12px; color: var(--ink-2); }
.qtable .num { text-align: right; }
.qtable .muted { color: var(--ink-3); }
.playbook { background: var(--white); color: var(--ink); border-radius: 3px; box-shadow: var(--shadow); padding: 10px 12px; margin-bottom: 6px; }
.playbook summary { cursor: pointer; font-weight: 700; }
.playbook .muted { color: var(--ink-3); font-weight: 400; }
.playbook ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.playbook p { color: var(--ink-2); font-size: 13px; }
.danger { border-top: 1px solid var(--board-2); padding-top: 16px; }
.danger h2 { color: var(--danger); }

/* toast */
.toast { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 84px); max-width: calc(100% - 32px); background: var(--rail); color: var(--on-rail); padding: 10px 16px; border-radius: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); font-size: 14px; }
.toast-error { background: var(--danger); color: #fff; }
@media (min-width: 960px) { .toast { bottom: 28px; margin-left: 110px; } }
