/* Pilot — "mission control" theme. Dark by default; [data-theme="light"] switches. */
:root {
  --bg: #060a17; --bg-glow-1: rgba(76, 110, 255, .22); --bg-glow-2: rgba(150, 90, 255, .16); --bg-glow-3: rgba(40, 200, 255, .10);
  --panel: rgba(18, 26, 52, .72); --panel-solid: #111a35; --panel-2: rgba(255, 255, 255, .035);
  --ink: #e8edf8; --muted: #8e99b5; --line: rgba(150, 168, 220, .16); --line-strong: rgba(150, 168, 220, .32);
  --accent: #5cc8ff; --accent-2: #9a86ff; --accent-soft: rgba(92, 200, 255, .13); --on-accent: #04101f;
  --warn: #ffb547; --bad: #ff6b7d; --good: #3ddca3; --info: #b79bff;
  --input: rgba(255, 255, 255, .05); --mark: rgba(255, 196, 70, .35);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); --radius: 10px;
  --stars: radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.55), transparent 60%),
           radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.35), transparent 60%),
           radial-gradient(1.5px 1.5px at 200px 160px, rgba(180,210,255,.5), transparent 60%),
           radial-gradient(1px 1px at 60px 210px, rgba(255,255,255,.3), transparent 60%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #edf2fa; --bg-glow-1: rgba(90, 150, 255, .22); --bg-glow-2: rgba(160, 130, 255, .14); --bg-glow-3: rgba(80, 200, 255, .12);
  --panel: rgba(255, 255, 255, .86); --panel-solid: #ffffff; --panel-2: rgba(20, 40, 90, .035);
  --ink: #142038; --muted: #5d6882; --line: #dde3ee; --line-strong: #c4cddd;
  --accent: #1f6fd8; --accent-2: #6a55f0; --accent-soft: #e6effc; --on-accent: #ffffff;
  --warn: #b55d00; --bad: #c72c40; --good: #0d8a5d; --info: #6a3fc0;
  --input: #ffffff; --mark: #ffe58a; --shadow: 0 8px 24px rgba(20, 40, 90, .10);
  --stars: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); background-color: var(--bg);
  font: 14px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background-image: radial-gradient(1200px 700px at 85% -10%, var(--bg-glow-1), transparent 60%),
                    radial-gradient(900px 600px at -10% 110%, var(--bg-glow-2), transparent 60%),
                    radial-gradient(700px 400px at 50% 50%, var(--bg-glow-3), transparent 70%), var(--stars);
  background-size: auto, auto, auto, 260px 260px; background-attachment: fixed;
}
a { color: var(--accent); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: var(--ink); border: 1px solid var(--line-strong); background: var(--panel-2); border-radius: 8px;
         padding: 5px 12px; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
button:hover { border-color: var(--accent); }
button:active { transform: translateY(1px); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); border: none; font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.link { border: none; background: none; color: var(--accent); padding: 0 4px; }
button.icon { border: none; background: none; padding: 2px 8px; font-size: 16px; color: var(--muted); }
button.icon:hover { color: var(--ink); }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 9px;
                          background: var(--input); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
select option { background: var(--panel-solid); color: var(--ink); }
.muted { color: var(--muted); }
.pad { padding: 24px; }
.spacer { flex: 1; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
code, pre { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }

/* header */
header { display: flex; align-items: center; gap: 18px; padding: 8px 18px; position: sticky; top: 0; z-index: 4; flex-wrap: wrap;
         background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; font-size: 16px; }
.brand svg { width: 26px; height: 26px; }
.brand .sub { font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--muted); border: 1px solid var(--line-strong);
              border-radius: 999px; padding: 1px 7px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { border: none; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab.active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.count { background: var(--bad); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.who { margin-left: auto; color: var(--muted); display: flex; align-items: center; gap: 8px; }

main { display: flex; height: calc(100vh - 52px); }
.view { flex: 1; overflow: auto; padding: 18px; min-width: 0; }

/* side panels (document and task) */
.docpanel, .taskpanel { position: fixed; top: 52px; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 3; overflow: auto;
  background: var(--panel-solid); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0, 0, 0, .25); padding: 14px 18px;
  animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: -14px; background: var(--panel-solid);
              padding: 6px 0; margin-top: -6px; z-index: 1; }
.docpanel pre { white-space: pre-wrap; font-size: 12.5px; line-height: 1.55; }
.esc-hint { font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }

/* login */
.login { max-width: 380px; margin: 14vh auto; background: var(--panel); backdrop-filter: blur(14px); padding: 30px; border-radius: 16px;
         border: 1px solid var(--line); box-shadow: var(--shadow); }
.login form { display: flex; flex-direction: column; gap: 10px; }
.login h1 { margin: 6px 0 2px; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.login h1 svg { width: 34px; height: 34px; }

/* chat */
.chat { display: flex; height: 100%; gap: 14px; }
.convs { width: 230px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.conv { padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.conv:hover { background: var(--panel-2); color: var(--ink); }
.conv.active { background: var(--accent-soft); color: var(--ink); }
.thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.messages { flex: 1; overflow: auto; padding: 0 4px 8px; }
.msg { display: flex; flex-direction: column; margin: 10px 0; }
.msg.user { align-items: flex-end; }
.bubble { max-width: 860px; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); position: relative; }
.msg.user .bubble { background: linear-gradient(135deg, rgba(92, 200, 255, .18), rgba(154, 134, 255, .18)); border-color: transparent; white-space: pre-wrap; }
:root[data-theme="light"] .msg.user .bubble { background: var(--accent-soft); }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 6px 0; } .md ul, .md ol { margin: 6px 0; padding-left: 22px; } .md h1, .md h2, .md h3, .md h4 { margin: 12px 0 6px; font-size: 15px; }
.md table { border-collapse: collapse; margin: 8px 0; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line-strong); padding: 4px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--panel-2); }
.md code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.md pre { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; }
.md pre code { border: none; padding: 0; background: none; }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.cite { color: var(--accent); cursor: pointer; font-weight: 600; font-size: 11px; }
.msg-actions { display: flex; gap: 6px; margin-top: 4px; }
.msg-actions button { font-size: 12px; padding: 1px 8px; }
.sources { font-size: 12px; margin: 6px 0 0; padding-left: 22px; max-width: 860px; color: var(--muted); }
.tools { margin-bottom: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.tool { font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; }
.composer { display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.composer textarea { flex: 1; resize: none; border: none; background: none; outline: none; }
.empty { max-width: 600px; margin: 9vh auto; text-align: center; }
.empty h3 { font-size: 22px; margin-bottom: 4px; }
.suggest { display: block; width: 100%; margin: 6px 0; text-align: left; background: var(--panel); }
.error { color: var(--bad); padding: 6px 0; }
.warn { background: rgba(255, 181, 71, .14); color: var(--warn); padding: 6px 10px; border-radius: 8px; margin-bottom: 6px; }
.pending { margin-bottom: 6px; }
.pending-row { display: flex; gap: 8px; align-items: center; background: rgba(255, 181, 71, .12); border: 1px solid rgba(255, 181, 71, .35);
               border-radius: 10px; padding: 7px 12px; margin-bottom: 4px; flex-wrap: wrap; }
.pinned-link { margin: 4px 0 12px; }
.badge { font-size: 11px; border-radius: 999px; padding: 1px 8px; }
.badge.pin { background: rgba(255, 181, 71, .16); color: var(--warn); font-weight: 600; }

/* filters, forms, tables */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .search { min-width: 220px; }
select.narrow { max-width: 220px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: none; color: var(--muted); padding: 5px 12px; }
.seg button.on { background: var(--accent-soft); color: var(--ink); }
.newtask { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.newtask input[placeholder="Description"], .newtask input[placeholder^="What"] { flex: 1; min-width: 200px; }
table.grid { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.grid th, .grid td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
tr.pinned td { background: rgba(255, 181, 71, .07); }
.inbox section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 14px; }
.notes { padding-left: 18px; }
.notes li.unread { font-weight: 600; }

/* kinds and status */
.kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.k-deliverable { color: var(--accent); } .k-open_question { color: var(--warn); } .k-info_request { color: var(--info); }
.k-action { color: var(--good); } .k-purchase { color: var(--muted); }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* board: organisation sections and urgency bands */
.org { margin-bottom: 22px; }
.org h3 { font-size: 15px; margin: 4px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.org h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2));
                  align-self: center; box-shadow: 0 0 10px var(--accent); }
.band { margin: 6px 0 14px; }
.band-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 4px 0 6px; color: var(--muted); }
.band-week .band-label { color: var(--warn); }
.band-week .due { color: var(--warn); font-weight: 600; }

/* list view */
.rows { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 140px 120px 110px; gap: 10px; align-items: center; padding: 7px 12px;
       border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--panel-2); }
.row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.st-done .row-title { text-decoration: line-through; color: var(--muted); }
.row select { padding: 2px 6px; font-size: 12px; }
.row .for { font-size: 12px; color: var(--muted); }

/* card view */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius);
        padding: 9px 11px; display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.card.st-doing { border-left-color: var(--accent); } .card.st-blocked { border-left-color: var(--bad); }
.card.st-done { border-left-color: var(--good); opacity: .65; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card-title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; margin-top: auto; }

/* drafts */
.drafts { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px;
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.drafts-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drafts-body { max-height: 60vh; overflow: auto; margin-top: 8px; border-top: 1px solid var(--line); }
.draft-group { padding: 4px 0; }
.draft-org { display: flex; gap: 6px; align-items: center; font-weight: 600; padding: 6px 0 2px; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.draft-row { display: grid; grid-template-columns: 20px 112px minmax(0, 1fr) 90px 92px; gap: 8px; align-items: center; padding: 4px 6px;
             border-bottom: 1px solid var(--line); font-size: 13px; border-radius: 6px; }
.draft-row:hover { background: var(--panel-2); }
.draft-title { color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-title:hover { color: var(--accent); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .55; transition: opacity .12s; }
.draft-row:hover .row-actions { opacity: 1; }
.row-actions button { padding: 1px 8px; font-size: 12px; }
.row-actions .ok:hover { border-color: var(--good); color: var(--good); }
.row-actions .no:hover { border-color: var(--bad); color: var(--bad); }

/* task detail panel */
.taskpanel h3 { margin: 6px 0 12px; font-size: 17px; line-height: 1.35; }
.taskpanel h4 { margin: 16px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tp-facts { display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; margin: 0; align-items: center; }
.tp-facts dt { color: var(--muted); font-size: 12px; }
.tp-facts dd { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tp-excerpt { white-space: pre-wrap; font-size: 12px; line-height: 1.5; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
              padding: 10px; max-height: 40vh; overflow: auto; }
.tp-actions { display: flex; gap: 8px; margin: 12px 0 4px; }
blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--muted); }

@media (max-width: 760px) {
  .convs { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) 96px; }
  .row .kind, .row .for, .row .due-cell { display: none; }
  .draft-row { grid-template-columns: 20px minmax(0, 1fr) 92px; }
  .draft-row .kind, .draft-row .due { display: none; }
  .filters .search { min-width: 0; flex: 1 1 100%; }
  header { gap: 8px; }
}

.drive { white-space: nowrap; }
.src { font-size: 12px; color: var(--muted); margin-top: 4px; }
.draft-cards { padding: 6px 0 10px; }
.draft-cards .row-actions { justify-content: flex-start; opacity: 1; }

/* TBD (decisions) */
.tbd-item { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbd-item:last-child { border-bottom: none; }
.tbd-title { font-weight: 600; }
.tbd-text { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tbd-files { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; }
.file-link { background: var(--accent-soft); border-radius: 999px; padding: 1px 10px; }
.file-link.src-link { background: var(--panel-2); }
.file-picker { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 12px; font-size: 12px;
               max-height: 220px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.tbd-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tbd-inspection h3::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.tbd-made h3::before { background: var(--good); box-shadow: 0 0 10px var(--good); }
@media (max-width: 760px) { .tbd-item { grid-template-columns: 1fr; } .tbd-side { align-items: flex-start; flex-direction: row; } }
a.tab { display: inline-flex; align-items: center; text-decoration: none; }
.decider { font-size: 12px; }

/* milestone timeline */
.timeline-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 8px; }
.timeline-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.timeline-head h3 { margin: 0; font-size: 15px; }
.timeline-scroll { overflow-x: auto; overflow-y: visible; padding: 0 10px; }
.timeline { position: relative; min-width: 980px; height: 360px; }
.tl-axis { position: absolute; left: 0; right: 0; top: 180px; height: 2px; background: var(--line-strong); }
.tl-done { position: absolute; left: 0; top: 179px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent));
           box-shadow: 0 0 12px var(--accent); }
.tl-tick { position: absolute; top: 176px; width: 1px; height: 10px; background: var(--line-strong); }
.tl-tick span { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.tl-tick.year { height: 16px; top: 173px; background: var(--muted); }
.tl-tick.year span { font-weight: 700; color: var(--ink); font-size: 11px; top: 18px; }
.tl-today { position: absolute; top: 40px; bottom: 30px; width: 0; border-left: 1px dashed var(--warn); }
.tl-today span { position: absolute; bottom: -18px; left: 4px; font-size: 10px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .08em; }
.ms { position: absolute; top: 181px; width: 0; height: 0; z-index: 1; outline: none; }
.ms-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel-solid);
          border: 2px solid var(--accent); transition: transform .15s, box-shadow .15s; cursor: pointer; }
.ms.past .ms-dot { background: var(--accent); border-color: var(--accent); }
.ms.next .ms-dot { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(255, 181, 71, .2), 0 0 14px var(--warn); }
.ms-stem { position: absolute; left: 0; width: 1px; background: var(--line-strong); }
.ms.up .ms-stem { bottom: 7px; height: 40px; } .ms.down .ms-stem { top: 7px; height: 40px; }
.ms.up.long .ms-stem { height: 90px; } .ms.down.long .ms-stem { height: 90px; }
.ms-label { position: absolute; transform: translateX(-50%); white-space: nowrap; text-align: center; font-size: 12px; line-height: 1.3;
            padding: 3px 8px; border-radius: 8px; background: var(--panel-solid); border: 1px solid var(--line); cursor: pointer; }
.ms-label strong { display: block; font-size: 12px; } .ms-label span { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.ms.up .ms-label { bottom: 47px; } .ms.down .ms-label { top: 47px; }
.ms.up.long .ms-label { bottom: 97px; } .ms.down.long .ms-label { top: 97px; }
.ms.next .ms-label { border-color: var(--warn); }
.ms-tip { display: none; position: absolute; left: -20px; width: 380px; z-index: 5; background: var(--panel-solid); border: 1px solid var(--line-strong);
          border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 12.5px; }
.ms.flip .ms-tip { left: auto; right: -20px; }
.ms.up .ms-tip { top: 14px; } .ms.down .ms-tip { bottom: 14px; }
.ms:hover, .ms:focus-within, .ms:focus { z-index: 6; }
.ms:hover .ms-tip, .ms:focus .ms-tip, .ms:focus-within .ms-tip { display: block; }
.ms:hover .ms-dot { transform: scale(1.3); box-shadow: 0 0 14px var(--accent); }
.ms-tip-title { font-weight: 700; font-size: 13.5px; }
.ms-tip ul { margin: 8px 0; padding-left: 18px; } .ms-tip li { margin: 2px 0; }
.ms-tip li.ms-tip-sub { list-style: none; margin-left: -18px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ms-card { margin-top: 6px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; min-height: 64px; }
.ms-card ul { margin: 8px 0; padding-left: 18px; columns: 2 360px; column-gap: 28px; } .ms-card li { margin: 2px 0; break-inside: avoid; }
.ms-card li.ms-tip-sub { list-style: none; margin-left: -18px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; column-span: all; }
.ms.active .ms-dot { transform: scale(1.35); box-shadow: 0 0 14px var(--accent); }
.ms.active .ms-label { border-color: var(--accent); }
.timeline { height: 330px; }
.deciders { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; font-size: 12px; }
.chip { background: rgba(61, 220, 163, .14); color: var(--good); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.file-picker { display: block; }
.fp-folder { margin-bottom: 6px; }
.fp-name { font-weight: 600; font-size: 12px; margin: 4px 0 2px; color: var(--muted); }
.fp-folder label { display: block; padding: 1px 0 1px 18px; }

/* milestones: each phase with what it needs */
.more-line { margin: 10px 2px; font-size: 13px; }
.ms-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ms-sec { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--panel-2); scroll-margin-top: 12px; }
.ms-sec.next { border-color: var(--warn); }
.ms-sec.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ms-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ms-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ms-sec.next .ms-badge { background: rgba(255, 181, 71, .16); color: var(--warn); }
.ms-needs { margin: 8px 0 4px; padding-left: 18px; columns: 2 380px; column-gap: 28px; font-size: 13px; }
.ms-needs li { margin: 2px 0; break-inside: avoid; }
.ms-tasks { margin-top: 8px; }
.ms-tasks .row { grid-template-columns: 112px minmax(0, 1fr) 150px 90px; }
.ms-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ms-form-row { display: flex; gap: 8px; } .ms-form-row input:first-child { flex: 1; }
.ms-form textarea { width: 100%; font: 13px/1.5 "JetBrains Mono", ui-monospace, monospace; }

/* right-click menu and the Ask Pilot split panel */
.ctxmenu { position: fixed; z-index: 20; width: 250px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px;
           box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; animation: slidein .1s ease-out; }
.ctxmenu button { text-align: left; border: none; background: none; padding: 6px 10px; border-radius: 6px; }
.ctxmenu button:hover { background: var(--accent-soft); }
.ctx-what { font-size: 11.5px; color: var(--muted); padding: 4px 10px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-hint { font-size: 10.5px; color: var(--muted); padding: 4px 10px 2px; border-top: 1px solid var(--line); margin-top: 2px; }
.askpanel { position: relative; flex: none; min-width: 320px; display: flex; flex-direction: column; border-left: 1px solid var(--line);
            background: var(--panel); backdrop-filter: blur(14px); padding: 10px 14px 14px; animation: slidein .18s ease-out; }
.ask-grip { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; }
.ask-grip:hover { background: var(--accent-soft); }
.ask-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ask-head svg { width: 20px; height: 20px; }
.askpanel .chat { flex: 1; min-height: 0; }
body.resizing { cursor: col-resize; user-select: none; }
.who-filter { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.who-filter select { max-width: 180px; }

/* ===== polish (2026-10-28): light theme is the default; navy header echoes the ASCENT badge ===== */
:root[data-theme="light"] {
  --bg: #f4f6fb; --bg-glow-1: rgba(43, 79, 216, .07); --bg-glow-2: rgba(124, 77, 255, .05); --bg-glow-3: transparent;
  --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f6f8fc;
  --ink: #0f1729; --muted: #667085; --line: #e7eaf2; --line-strong: #d3d9e6;
  --accent: #2b4fd8; --accent-2: #6d4aff; --accent-soft: #eaf0ff; --on-accent: #ffffff;
  --warn: #b45309; --bad: #c8283d; --good: #0f7a55; --info: #6d3fd0;
  --input: #ffffff; --mark: #fff0a8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --header-bg: linear-gradient(100deg, #081232 0%, #0f2155 55%, #1b2f74 100%);
}
:root { --header-bg: rgba(10, 16, 36, .82); }
body { font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { letter-spacing: -.01em; }

/* header */
header { background: var(--header-bg); border-bottom: 1px solid rgba(255, 255, 255, .08); color: #eef2ff; padding: 8px 20px; min-height: 52px;
         box-shadow: 0 2px 14px rgba(8, 18, 50, .18); }
header .brand { gap: 10px; }
.logo-img { width: 26px; height: 26px; border-radius: 50%; display: block; flex: none; }
header .logo-img { width: 34px; height: 34px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 0 18px rgba(92, 150, 255, .45); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .01em; color: #fff; }
header .brand .sub { color: rgba(226, 233, 255, .75); border-color: rgba(226, 233, 255, .3); }
header .tab { color: rgba(226, 233, 255, .72); font-weight: 500; border-radius: 999px; padding: 6px 14px; }
header .tab:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
header .tab.active { color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
header .who { color: rgba(226, 233, 255, .78); }
header button.icon { color: rgba(226, 233, 255, .78); } header button.icon:hover { color: #fff; }
header button.link { color: #9fc0ff; }

/* surfaces */
.view { padding: 22px 26px; }
.rows, .timeline-wrap, .drafts, .ms-sec, .tbd-item, .bubble { box-shadow: var(--shadow); }
.rows { border-radius: 12px; }
.row { padding: 9px 14px; }
.ms-sec { background: var(--panel); padding: 14px 18px; border-radius: 12px; }
.ms-sec-head strong { font-size: 15px; }
.ms-sec .rows { box-shadow: none; }
.timeline-wrap { padding: 18px 22px 12px; border-radius: 16px; }
.timeline-head h3, .org h3 { font-size: 16px; font-weight: 700; }
.band-label { letter-spacing: .06em; }

/* kind chips: soft pills instead of shouting caps */
.kind { display: inline-block; text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
        background: color-mix(in srgb, currentColor 11%, transparent); justify-self: start; }

/* controls */
button { border-radius: 8px; }
:root[data-theme="light"] button.primary { background: var(--accent); box-shadow: 0 1px 2px rgba(43, 79, 216, .25), 0 4px 12px rgba(43, 79, 216, .18); }
:root[data-theme="light"] .seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
input, select, textarea { border-radius: 8px; }
.composer { box-shadow: var(--shadow); border-radius: 16px; }
:root[data-theme="light"] .msg.user .bubble { background: var(--accent); color: #fff; }
.login h1 .logo-img { width: 44px; height: 44px; }
.ask-head .logo-img { width: 22px; height: 22px; }
.until { font-size: 13px; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); } .until strong { color: var(--accent); }
.who-filter.on select { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ms-block { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
.ms-notes { margin: 6px 0 2px; font-size: 13px; color: var(--muted); } .ms-sec .newtask { margin: 10px 0; }
.ms-notes { margin: 6px 0 2px; font-size: 13px; color: var(--muted); } .ms-sec .newtask { margin: 10px 0; }

/* one Board list; task panel edits in place */
.tasklist .draft-row { grid-template-columns: 112px minmax(0, 1fr) 140px 104px; cursor: pointer; }
.tasklist .draft-row select { padding: 2px 6px; font-size: 12px; }
.tasklist .draft-row.st-done .draft-title { text-decoration: line-through; color: var(--muted); }
.tasklist .drafts-body { max-height: none; }
.taskpanel textarea.tp-title { width: 100%; font-size: 17px; font-weight: 700; line-height: 1.35; border-color: transparent; background: none; resize: vertical; margin: 6px 0 4px; }
.taskpanel textarea.tp-desc { width: 100%; resize: vertical; }
.taskpanel textarea.tp-title:hover, .taskpanel textarea.tp-desc:hover { border-color: var(--line-strong); }

/* ===== phones: one column, compact header, panels take the whole screen ===== */
@media (max-width: 760px) {
  .app { display: flex; flex-direction: column; height: 100dvh; }
  main { flex: 1; min-height: 0; height: auto; }
  .view { padding: 12px; }
  header { padding: 6px 10px; gap: 4px 8px; min-height: 0; }
  header .logo-img { width: 28px; height: 28px; }
  .brand .sub { display: none; }
  header .who { font-size: 13px; gap: 6px; }
  header nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px 2px; }
  header nav::-webkit-scrollbar { display: none; }
  header .tab { padding: 5px 11px; white-space: nowrap; flex: none; }
  .docpanel, .taskpanel { top: 0; width: 100vw; z-index: 10; border-left: none; padding: 10px 14px; }
  .askpanel { position: fixed; inset: 0; z-index: 10; width: 100% !important; min-width: 0; border-left: none; }
  .ask-grip { display: none; }
  .tasklist .draft-row { grid-template-columns: minmax(0, 1fr) 96px; gap: 4px 8px; padding: 8px 6px; }
  .tasklist .draft-row .draft-title { grid-column: 1 / -1; }
  .tasklist .draft-row .kind { display: none; }
  .tasklist .draft-row .due { display: block; font-size: 12px; white-space: nowrap; align-self: center; }
  .filters { gap: 8px; } .filters label { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
  .filters select, select.narrow { min-width: 0; max-width: 100%; flex: 1; }
  .tasklist .draft-title, .ms-tasks .row-title { white-space: normal; }
  .ms-tasks .row { grid-template-columns: minmax(0, 1fr) auto; }
  .ms-tasks .row .kind, .ms-tasks .row .for { display: none; }
  .ms-sec { padding: 10px; }
  .ms-needs, .ms-card ul { columns: 1; }
  .ms-tip { width: min(380px, 80vw); }
  .timeline-wrap { padding: 10px 8px 6px; }
  .who-filter select { max-width: 150px; }
  .tp-facts { grid-template-columns: 90px 1fr; }
  .ctxmenu { max-width: calc(100vw - 16px); }
  .tbd-side { flex-wrap: wrap; } .deciders { justify-content: flex-start; } .chip { white-space: nowrap; }
}

/* files attached to the next chat message */
.att-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 4px 3px 10px; border-radius: 999px;
            background: var(--accent-soft); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip button.link { padding: 0 6px; font-size: 15px; line-height: 1; }
.composer .clip { font-size: 17px; padding: 4px 6px; align-self: flex-end; }
.msg.user .bubble { white-space: pre-wrap; }

/* ===== overview (2026-10-29) ===== */
.view:not(.v-chat) > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.view.v-chat .thread { max-width: 980px; margin: 0 auto; }
/* chat landing: suggestions as a grid of cards */
.empty { max-width: 720px; }
.empty h3 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; }
.empty .suggest { display: inline-block; width: calc(50% - 8px); margin: 4px; vertical-align: top; min-height: 64px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13.5px; transition: border-color .15s, transform .15s; }
.empty .suggest:hover { border-color: var(--accent); transform: translateY(-1px); }

@media (max-width: 760px) {
  .empty .suggest { width: 100%; margin: 4px 0; }
}

/* ===== report theme (2026-10-29): warm paper, ink blue, one vermilion accent; serif headings =====
   Overrides the earlier palettes; dark mode keeps the same hues on ink paper. */
:root[data-theme="light"] {
  --bg: #faf8f4; --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f4f1ea;
  --ink: #1c2230; --muted: #6b7080; --line: #e7e2d9; --line-strong: #d6cfc3;
  --accent: #22355e; --accent-2: #3d5a96; --accent-soft: #e9edf5; --on-accent: #ffffff;
  --hot: #c8502d; --hot-soft: #fbece6;
  --warn: #a8611a; --bad: #c8502d; --good: #4f7d5e; --info: #5b4b8a;
  --todo: #d9d3c7; --input: #ffffff; --mark: #f6e3a1;
  --shadow: 0 1px 0 rgba(28, 34, 48, .04), 0 8px 24px -12px rgba(28, 34, 48, .10);
  --header-bg: rgba(250, 248, 244, .82); --stars: none;
}
:root, :root[data-theme="dark"] {
  --bg: #12151c; --panel: #1a1e27; --panel-solid: #1a1e27; --panel-2: #20252f;
  --ink: #ebe7df; --muted: #9a9caa; --line: #2a303b; --line-strong: #3a414e;
  --accent: #9db3e3; --accent-2: #b9c8ea; --accent-soft: rgba(157, 179, 227, .12); --on-accent: #12151c;
  --hot: #e98a63; --hot-soft: rgba(233, 138, 99, .14);
  --warn: #e0a560; --bad: #e98a63; --good: #8cbf9c; --info: #b8a6e6;
  --todo: #3a414e; --input: #20252f; --mark: rgba(246, 227, 161, .25);
  --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 10px 28px -14px rgba(0, 0, 0, .6);
  --header-bg: rgba(18, 21, 28, .8); --stars: none;
}
:root { --serif: "Newsreader", "Iowan Old Style", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace; --radius: 12px; }
body { background-image: none; background-color: var(--bg); font-feature-settings: "cv11", "ss01", "tnum" 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.num, .due { font-variant-numeric: tabular-nums; }

/* header: translucent paper bar, hairline, sliding underline on the active tab */
header { background: var(--header-bg); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: none;
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); padding: 0 24px; min-height: 56px; gap: 22px; }
.brand-name { color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
header .brand .sub { color: var(--muted); border-color: var(--line-strong); font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; }
header .logo-img { width: 30px; height: 30px; box-shadow: 0 0 0 1px var(--line-strong); }
header nav { gap: 4px; align-self: stretch; }
header .tab { position: relative; color: var(--muted); background: none; border-radius: 0; padding: 0 10px; height: 56px; font-weight: 500; font-size: 13.5px; }
header .tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
header .tab:hover { color: var(--ink); background: none; }
header .tab.active { color: var(--ink); background: none; box-shadow: none; font-weight: 600; }
header .tab.active::after { transform: scaleX(1); }
header a.tab { font-size: 12.5px; }
header .who { color: var(--muted); font-size: 13px; }
header button.icon { color: var(--muted); } header button.icon:hover { color: var(--ink); }
header button.link { color: var(--accent); }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 5px; background: var(--panel); }

/* controls */
button { border-color: var(--line-strong); background: var(--panel); border-radius: 8px; transition: border-color .15s, background .15s, box-shadow .15s, transform .08s; }
button:hover { border-color: var(--ink); }
button.primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-weight: 600; box-shadow: none; }
button.primary:hover { filter: none; background: var(--accent-2); border-color: var(--accent-2); }
input, select, textarea { border-color: var(--line-strong); border-radius: 8px; background: var(--input); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

/* surfaces: hairlines first, shadow barely there */
.rows, .timeline-wrap, .drafts, .ms-sec, .tbd-item, .bubble, .card { box-shadow: var(--shadow); border-color: var(--line); }
.kind { border-radius: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; }
.until { background: var(--hot-soft); color: var(--ink); } .until strong { color: var(--hot); }

/* skeleton loading */
.skel { border-radius: var(--radius); background: linear-gradient(90deg, var(--panel-2) 0%, var(--line) 50%, var(--panel-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== the overview report ===== */
.view.v-overview { padding-top: 34px; }
.report { display: flex; flex-direction: column; gap: 22px; padding-bottom: 40px; }
.rp-head h1 { font-size: 40px; line-height: 1.1; margin: 6px 0 0; font-weight: 500; letter-spacing: -.02em; }
.rp-kicker, .rp-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rp-label { color: var(--ink); font-weight: 500; }
.small { font-size: 12px; } .hot { color: var(--hot) !important; }
button.ghost { border-color: transparent; background: none; color: var(--muted); font-size: 12.5px; padding: 4px 9px; }
button.ghost:hover { border-color: var(--line-strong); color: var(--ink); background: var(--panel); }

.abstract { position: relative; padding: 22px 28px 24px 32px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.abstract::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--hot); }
.abs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.abs-text { font-family: var(--serif); font-size: 19.5px; line-height: 1.6; margin: 0; max-width: 72ch; color: var(--ink); text-wrap: pretty; }
.abs-text sup { line-height: 0; }
.ref { font-family: var(--mono); font-size: 10.5px; color: var(--accent); padding: 0 2px; border-radius: 3px; text-decoration: none; }
.ref:hover { background: var(--accent-soft); text-decoration: none; }
.abs-skel { display: flex; flex-direction: column; gap: 10px; } .abs-skel .skel { height: 18px; } .abs-skel .skel.short { width: 55%; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fig, .side-card { margin: 0; padding: 18px 22px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0; transition: border-color .2s; }
.fig:hover { border-color: var(--line-strong); }
.fig:first-child { grid-column: span 2; }
.fig.wide { grid-column: 1 / -1; }
.fig-skel { height: 220px; } .fig-skel.wide { grid-column: span 2; }
figcaption { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fig-n { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--hot); }
.fig-t { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.ask-fig { margin-left: auto; border: 1px solid transparent; background: none; color: var(--muted); font-size: 12px; padding: 2px 8px; opacity: .55;
  transition: opacity .15s, border-color .15s, color .15s; }
.fig:hover .ask-fig { opacity: 1; } .ask-fig:hover { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

.readiness { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; }
.countdown { display: flex; flex-direction: column; padding-right: 32px; border-right: 1px solid var(--line); }
.cd-n { font-family: var(--serif); font-size: 84px; line-height: .95; font-weight: 400; color: var(--hot); letter-spacing: -.03em; }
.cd-u { font-family: var(--serif); font-size: 18px; margin-top: 2px; }
.ready-pct { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.ready-pct .num { font-family: var(--serif); font-size: 30px; color: var(--ink); margin-right: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.legend.small { font-size: 11.5px; margin-top: 14px; }
.more { margin-top: 14px; padding: 0; font-weight: 600; }
.stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.stack.big { height: 14px; border-radius: 4px; } .stack.big .seg { border-radius: 2px; }
.seg { display: block; height: 100%; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.seg.done { background: var(--good); } .seg.doing { background: var(--accent); } .seg.todo { background: var(--todo); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.dot.done { background: var(--good); } .dot.doing { background: var(--accent); } .dot.todo { background: var(--todo); }

.risk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.risk-stats > div { display: flex; flex-direction: column; }
.rs-n { font-family: var(--serif); font-size: 34px; line-height: 1; } .rs-l { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.risk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.risk-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.risk-list a { color: var(--ink); } .risk-list a:hover { color: var(--accent); text-decoration: none; }

.org-row { margin-bottom: 14px; }
.org-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 6px; }

.lanes { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; min-height: 34px; border-bottom: 1px dashed var(--line); }
.lane:last-child { border-bottom: none; }
.lane-name { font-size: 12.5px; color: var(--muted); }
.lane-track { position: relative; height: 34px; }
.ms-lane .lane-track { height: 46px; }
.ms-dia { position: absolute; top: 24px; width: 11px; height: 11px; margin-left: -5.5px; padding: 0; border: 1.5px solid var(--accent); background: var(--panel);
  transform: rotate(45deg); border-radius: 2px; transition: transform .15s, background .15s; }
.ms-dia.past { background: var(--accent); }
.ms-tag { position: absolute; top: 4px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink); pointer-events: none; }
.ms-dia:hover { transform: rotate(45deg) scale(1.3); background: var(--accent-soft); }
.tick { position: absolute; top: 9px; width: 4px; height: 16px; margin-left: -2px; padding: 0; border: none; border-radius: 2px; background: var(--todo); transition: transform .15s; }
.tick.doing { background: var(--accent); } .tick.done { background: var(--good); }
.tick:hover { transform: scaleY(1.4); z-index: 1; }
.lane.axis { min-height: 24px; } .lane.axis .lane-track { height: 24px; }
.yr { position: absolute; top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding-left: 4px; border-left: 1px solid var(--line-strong); }
.today { position: absolute; top: -9999px; bottom: 0; border-left: 1.5px solid var(--hot); }
.today b { position: absolute; bottom: 4px; left: 5px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--hot); }

.side-card .rp-label { margin-bottom: 12px; display: block; }
.by-org { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.by-org-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 12.5px; }
.by-org-row .num { text-align: right; font-size: 12px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li:last-child { border-bottom: none; }
.links { display: flex; flex-direction: column; }
.links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.links a:last-child { border-bottom: none; }
.links strong { font-weight: 600; font-size: 13.5px; } .links span { grid-row: 2; font-size: 12px; color: var(--muted); }
.links i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--muted); transition: transform .15s, color .15s; }
.links a:hover strong { color: var(--accent); } .links a:hover i { transform: translateX(3px); color: var(--accent); }

/* the home page's question box */
.askbox { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px 10px 12px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s; }
.askbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.askbox form { display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 8px; }
.askbox-icon .logo-img { width: 30px; height: 30px; }
.askbox input { flex: 1; border: none; background: none; box-shadow: none !important; font-family: var(--serif); font-size: 20px; padding: 8px 0; min-width: 0; }
.askbox button.primary { border-radius: 10px; padding: 9px 18px; }
.askbox-sugg { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 10px 0 52px; }
.askbox-sugg button { border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--panel-2); border-color: var(--line); padding: 4px 12px; }
.askbox-sugg button:hover { color: var(--ink); border-color: var(--accent); background: var(--panel); }

@media (max-width: 1000px) {
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fig:first-child, .fig.wide { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .view.v-overview { padding-top: 18px; }
  .rp-head h1 { font-size: 28px; }
  .abstract { padding: 16px 16px 18px 20px; } .abs-text { font-size: 17px; }
  .bento { grid-template-columns: 1fr; } .fig, .side-card { grid-column: 1 / -1 !important; padding: 14px 16px; }
  .readiness { grid-template-columns: 1fr; gap: 16px; }
  .countdown { border-right: none; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .cd-n { font-size: 64px; }
  .lane { grid-template-columns: 80px minmax(0, 1fr); }
  .by-org-row { grid-template-columns: 90px minmax(0, 1fr) 40px; }
  .askbox input { font-size: 16px; } .askbox-sugg { padding-left: 8px; } .askbox-icon { display: none; }
  header .tab { height: 40px; }
}

/* the header is 56px tall now */
@media (min-width: 761px) { main { height: calc(100vh - 56px); } .docpanel, .taskpanel { top: 56px; } }
@media (max-width: 760px) { header { gap: 4px 10px; padding: 4px 12px 0; min-height: 0; } header .who { margin-left: auto; } header .who { font-size: 12px; gap: 6px; } }

/* ===== palette: indigo, periwinkle and sand (Color Hunt #111844 #4B5694 #7288AE #EAE0CF), with frosted glass =====
   Glass only on floating layers (header, Ask box, side panels, menus); content cards stay solid. */
:root[data-theme="light"] {
  --bg: #f4f1eb; --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f6f3ed;
  --ink: #111844; --muted: #5f6683; --line: #e6e0d4; --line-strong: #d4ccbc;
  --accent: #4b5694; --accent-2: #111844; --accent-soft: #e8eaf4; --on-accent: #ffffff;
  --hot: #4b5694; --hot-soft: #e8eaf4;
  --warn: #9a6a2f; --bad: #a8483f; --good: #4d7a62; --info: #4b5694;
  --st-done: #111844; --st-doing: #7288ae; --st-todo: #e6e0d4; --todo: #e6e0d4;
  --input: #ffffff; --mark: #efe2bf;
  --glass: rgba(255, 255, 255, .56); --glass-line: rgba(255, 255, 255, .75); --glass-edge: rgba(17, 24, 68, .08);
  --sky: radial-gradient(1100px 700px at 95% -10%, rgba(114, 136, 174, .55), transparent 62%),
         radial-gradient(700px 500px at 8% 4%, rgba(75, 86, 148, .16), transparent 65%),
         radial-gradient(900px 620px at -6% 108%, rgba(234, 224, 207, 1), transparent 65%);
  --shadow: 0 1px 0 rgba(17, 24, 68, .03), 0 10px 30px -16px rgba(17, 24, 68, .18);
  --header-bg: var(--glass);
}
:root, :root[data-theme="dark"] {
  --bg: #0d1130; --panel: #151a3d; --panel-solid: #151a3d; --panel-2: #1a2047;
  --ink: #ece6da; --muted: #9aa0bc; --line: #262c58; --line-strong: #353d72;
  --accent: #9aa6d6; --accent-2: #c3cbea; --accent-soft: rgba(154, 166, 214, .14); --on-accent: #0d1130;
  --hot: #b4bde6; --hot-soft: rgba(154, 166, 214, .14);
  --warn: #d8a865; --bad: #e08a80; --good: #8dbba2; --info: #9aa6d6;
  --st-done: #eae0cf; --st-doing: #7288ae; --st-todo: #2a3160; --todo: #2a3160;
  --input: #1a2047; --mark: rgba(234, 224, 207, .22);
  --glass: rgba(21, 26, 61, .55); --glass-line: rgba(255, 255, 255, .08); --glass-edge: rgba(0, 0, 0, .3);
  --sky: radial-gradient(900px 600px at 92% -8%, rgba(75, 86, 148, .45), transparent 65%),
         radial-gradient(800px 560px at -6% 108%, rgba(114, 136, 174, .18), transparent 65%);
  --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 12px 30px -16px rgba(0, 0, 0, .7);
  --header-bg: var(--glass);
}
:root { --radius: 14px; }
body { background: var(--sky), var(--bg); background-attachment: fixed; }

/* frosted glass */
header, .askbox, .askpanel, .taskpanel, .docpanel, .ctxmenu {
  background: var(--glass) !important; border-color: var(--glass-line);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
header { border-bottom: 1px solid var(--glass-edge); }
.askbox { border: 1px solid var(--glass-line); box-shadow: 0 0 0 1px var(--glass-edge), 0 14px 40px -18px rgba(17, 24, 68, .35); }
.askbox:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft), 0 14px 40px -18px rgba(17, 24, 68, .35); }
.askbox input { color: var(--ink); }
.askbox-sugg button { background: rgba(255, 255, 255, .5); border-color: var(--glass-line); }
.taskpanel, .docpanel { border-left: 1px solid var(--glass-line); box-shadow: -20px 0 50px -20px rgba(17, 24, 68, .35); }
.taskpanel .panel-head, .docpanel .panel-head { background: transparent; }
.askpanel { border-left: 1px solid var(--glass-line); }

/* solid content cards, a little rounder, lifting on hover */
.fig, .side-card, .abstract, .rows, .timeline-wrap, .ms-sec, .tbd-item, .bubble, .card, .drafts { border-radius: var(--radius); border-color: var(--line); }
.fig, .side-card { transition: border-color .2s, transform .2s, box-shadow .2s; }
.fig:hover, .side-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(17, 24, 68, .03), 0 18px 40px -20px rgba(17, 24, 68, .28); }
.abstract::before { background: linear-gradient(180deg, var(--st-done), var(--st-doing)); }
button.primary { background: var(--accent-2); border-color: var(--accent-2); }
button.primary:hover { background: var(--accent); border-color: var(--accent); }

/* status colours from the palette */
.seg.done, .dot.done, .tick.done { background: var(--st-done); }
.seg.doing, .dot.doing, .tick.doing { background: var(--st-doing); }
.seg.todo, .dot.todo, .tick, .tick.todo { background: var(--st-todo); }
.tick.doing { background: var(--st-doing); } .tick.done { background: var(--st-done); }
.ms-dia { border-color: var(--accent); } .ms-dia.past { background: var(--accent); }
.cd-n { color: var(--accent); }
.today { border-left-color: var(--accent); } .today b { color: var(--accent); }

/* page change: content fades up */
.view > * { animation: fadeup .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* one wordmark: ASCENT Pilot */
.brand-name { display: inline-flex; align-items: baseline; gap: 7px; }
.brand-ascent { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--muted); }
header button.brand { border: none; background: none; padding: 0; border-radius: 8px; }
header button.brand:hover .brand-name { opacity: .8; }

/* task panel: details; "Work on it" turns it into a side chat for the task */
.taskpanel.work { display: flex; flex-direction: column; }
.taskpanel.work .chat { flex: 1; min-height: 0; }
.work-title { display: flex; gap: 10px; align-items: center; padding: 6px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.work-title .logo-img { width: 28px; height: 28px; } .work-title strong { font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.3; }
.work-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 6px 0 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--accent-2); color: #fff; border: none; transition: transform .15s, background .15s; }
.work-btn:hover { background: var(--accent); transform: translateY(-1px); }
.work-btn .logo-img { width: 26px; height: 26px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.work-btn span { display: flex; flex-direction: column; } .work-btn strong { font-size: 14px; } .work-btn small { opacity: .75; font-size: 12px; }
.work-btn .arrow { margin-left: auto; font-size: 18px; }
.src-page { display: flex; flex-direction: column; gap: 8px; }
.src-page img { width: 100%; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.src-skel { height: 200px; display: flex; align-items: center; justify-content: center; } .src-skel span { font-size: 12px; color: var(--muted); }
.src-quote { margin: 0; font-family: var(--serif); font-size: 14px; color: var(--muted); }
.task-start { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.task-start .start { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.task-start .start:hover { border-color: var(--accent); transform: translateX(2px); }
.task-start .start strong { font-family: var(--serif); font-size: 15.5px; font-weight: 500; color: var(--ink); }
.task-start .start span { font-size: 12.5px; color: var(--muted); }
/* side panels sit over busy lists: mostly solid, a hint of glass */
:root[data-theme="light"] .taskpanel, :root[data-theme="light"] .docpanel, :root[data-theme="light"] .askpanel { background: rgba(250, 248, 243, .94) !important; }
:root[data-theme="dark"] .taskpanel, :root[data-theme="dark"] .docpanel, :root[data-theme="dark"] .askpanel { background: rgba(21, 26, 61, .95) !important; }

/* page pictures enlarge on click */
.src-page img.zoomable { cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
.src-page img.zoomable:hover { transform: scale(1.01); box-shadow: 0 16px 40px -18px rgba(17, 24, 68, .4); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 13, 34, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; cursor: zoom-out; animation: fadein .15s ease-out; }
.lightbox img { max-width: min(1500px, 96vw); max-height: 84vh; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); cursor: default; background: #fff; }
.lb-bar { display: flex; align-items: center; gap: 16px; color: rgba(255, 255, 255, .8); font-size: 13px; }
.lb-bar a { color: #c9d1f0; } .lb-bar button.icon { color: #fff; }

/* background art: altitude lines and the balloon's ascent */
.sky-art { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }  /* behind everything, above the page colour */
.alt-line { fill: none; stroke: var(--st-doing); stroke-width: 1; }
.flight { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .55; }
.km line { stroke: var(--st-doing); stroke-width: 1; opacity: .5; }
.km text { font-family: var(--mono); font-size: 11px; fill: var(--st-doing); text-anchor: end; opacity: .6; }
.balloon ellipse { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: .6; }
.balloon path, .balloon rect { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .55; }
@media (max-width: 760px) { .km { display: none; } }

/* ===== base colours: porcelain (light) and graphite (dark); sand stays in the data ===== */
:root[data-theme="light"] {
  --bg: #f6f7fb; --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f1f3f8;
  --ink: #111844; --muted: #646a88; --line: #e3e6ef; --line-strong: #cfd4e2;
  --st-todo: #e3e6ef; --todo: #e3e6ef;
  --sky: radial-gradient(1100px 700px at 95% -10%, rgba(114, 136, 174, .30), transparent 62%),
         radial-gradient(800px 560px at -6% 108%, rgba(75, 86, 148, .10), transparent 65%);
}
:root, :root[data-theme="dark"] {
  --bg: #15171e; --panel: #1d2029; --panel-solid: #1d2029; --panel-2: #22252f;
  --ink: #e9eaf0; --muted: #9496a3; --line: #2b2f3b; --line-strong: #3a3f4e;
  --accent: #9aa6d6; --accent-2: #c3cbea; --accent-soft: rgba(154, 166, 214, .14); --on-accent: #15171e;
  --hot: #b4bde6; --hot-soft: rgba(154, 166, 214, .14);
  --st-done: #eae0cf; --st-doing: #7288ae; --st-todo: #2f3442; --todo: #2f3442;
  --input: #22252f; --glass: rgba(29, 32, 41, .6); --glass-line: rgba(255, 255, 255, .07);
  --sky: radial-gradient(900px 600px at 92% -8%, rgba(75, 86, 148, .25), transparent 65%);
}
:root[data-theme="light"] .taskpanel, :root[data-theme="light"] .docpanel, :root[data-theme="light"] .askpanel { background: rgba(250, 251, 254, .95) !important; }
:root[data-theme="dark"] .taskpanel, :root[data-theme="dark"] .docpanel, :root[data-theme="dark"] .askpanel { background: rgba(29, 32, 41, .96) !important; }

/* ===== home page hero: night sky, the balloon comes down as you scroll ===== */
.view.v-overview { padding: 0; }
.view.v-overview > * { max-width: none; }
.view.v-overview .report { max-width: 1240px; margin: 0 auto; padding: 34px 26px 40px; }
.hero { position: relative; height: var(--view-h, calc(100vh - 56px)); }
.hero-stick { position: relative; height: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #d6dcf0 0%, #e8ebf6 45%, var(--bg) 85%); }
:root[data-theme="dark"] .hero-stick { background: linear-gradient(180deg, #1c2140 0%, var(--bg) 85%); }
html.on-overview .sky-art { display: none; }
.hero-night { position: absolute; inset: 0; background: radial-gradient(1000px 600px at 80% 10%, #2a3478 0%, transparent 60%),
  linear-gradient(180deg, #0b0f2e 0%, #141a4a 45%, #2b346f 80%, #4b5694 100%); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-lines path { fill: none; stroke: #9fb0d6; stroke-width: 1; opacity: .22; }
.hero-path { fill: none; stroke: #c9d1f0; stroke-width: 1.6; stroke-dasharray: 2 8; stroke-linecap: round; opacity: .8; }
.hero-ground { stroke: var(--st-doing); stroke-width: 1.5; }
.hero-balloon ellipse { fill: rgba(234, 224, 207, .16); stroke: currentColor; stroke-width: 1.6; }
.hero-balloon path, .hero-balloon rect { fill: none; stroke: currentColor; stroke-width: 1.4; }
.hero-balloon text { font-family: var(--mono); font-size: 14px; fill: currentColor; letter-spacing: .06em; }
.hero-copy { position: relative; width: min(760px, calc(100vw - 32px)); text-align: center; color: #eef0fa; }
.hero-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(226, 230, 248, .7); }
.hero-copy h1 { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.05; margin: 14px 0 10px; color: #fff; font-weight: 400; letter-spacing: -.02em; }
.hero-sub { margin: 0 0 26px; color: rgba(226, 230, 248, .75); font-size: 15px; }
.hero .askbox { text-align: left; background: rgba(255, 255, 255, .1) !important; border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 20px 60px -24px rgba(0, 0, 0, .6); }
.hero .askbox input { color: #fff; } .hero .askbox input::placeholder { color: rgba(226, 230, 248, .6); }
.hero .askbox button.primary { background: #eae0cf; border-color: #eae0cf; color: #111844; }
.hero .askbox-sugg button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: rgba(226, 230, 248, .85); }
.hero .askbox-sugg button:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .4); }
.hero-down { position: absolute; bottom: 26px; border: none; background: none; color: rgba(226, 230, 248, .8); font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-down span { font-size: 18px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
html.hero-dark header { background: #0b0f2e !important; border-bottom-color: rgba(255, 255, 255, .06); }
html.hero-dark header .brand-name, html.hero-dark header .tab.active, html.hero-dark header .tab:hover { color: #fff; }
html.hero-dark header .tab, html.hero-dark header .who, html.hero-dark header .brand-ascent, html.hero-dark header button.icon { color: rgba(226, 230, 248, .7); }
html.hero-dark header button.link { color: #c9d1f0; }
html.hero-dark header .tab::after { background: #eae0cf; }
header { transition: background .3s, border-color .3s; }
@media (max-width: 760px) {
  .view.v-overview .report { padding: 18px 12px 30px; }

}
.hero-dawn { position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 100%, rgba(234, 224, 207, .95) 0%, rgba(234, 224, 207, .35) 40%, transparent 70%); }

/* the question box that rides from the sky down to the workbench */
.ov-wrap { position: relative; }
.ask-slot { width: 100%; }
.hero-slot { margin-top: 0; }
.ask-float { position: absolute; z-index: 2; }
.ask-float .askbox { transition: background .5s, border-color .5s, box-shadow .5s; }
.ask-float:not(.day) .askbox { background: rgba(255, 255, 255, .1) !important; border-color: rgba(255, 255, 255, .22); box-shadow: 0 20px 60px -24px rgba(0, 0, 0, .6); }
.ask-float:not(.day) .askbox input { color: #fff; } .ask-float:not(.day) .askbox input::placeholder { color: rgba(226, 230, 248, .6); }
.ask-float:not(.day) .askbox button.primary { background: #eae0cf; border-color: #eae0cf; color: #111844; }
.ask-float:not(.day) .askbox-sugg button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: rgba(226, 230, 248, .85); }
.report .ask-slot { margin: 6px 0 2px; }
:root[data-theme="dark"] .askbox-sugg button { background: var(--panel-2); border-color: var(--line-strong); color: var(--muted); }
:root[data-theme="dark"] .askbox-sugg button:hover { color: var(--ink); border-color: var(--accent); }

/* hero layers: frames change opacity and transforms only */
.hero-stick .layer { position: absolute; inset: 0; will-change: opacity; }
.hero-stick .layer .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-path.night { stroke: #c9d1f0; } .hero-path.day { stroke: #7288ae; opacity: .9; }
.hero-balloon { position: absolute; left: 0; top: 0; margin: -24px 0 0 -24px; color: #eae0cf; will-change: transform; transition: color .4s; pointer-events: none; }
.hero-balloon.day { color: #4b5694; }
.hero-balloon svg { display: block; overflow: visible; }
.hero-balloon span { position: absolute; left: 50px; top: 18px; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; white-space: nowrap; }
.hero-balloon span.left { left: auto; right: 50px; }
.ask-float { left: 0; top: 0; will-change: transform; }
html.flying header, html.flying .askbox { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ===== header: one pill of tabs with a sliding highlight; Links and the avatar on the right ===== */
header { justify-content: space-between; }
.pills { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(17, 24, 68, .05);
  border: 1px solid var(--line); margin: 0 auto; align-self: center; }
.pill-bar { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--panel-solid);
  box-shadow: 0 1px 2px rgba(17, 24, 68, .08), 0 4px 12px -4px rgba(17, 24, 68, .18); transition: transform .35s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1); }
.pill { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; border: none; background: none; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .2s; }
.pill:hover { color: var(--ink); border: none; }
.pill.active { color: var(--ink); }
.ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.pill .count { margin-left: 2px; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.menu-wrap { position: relative; }
.hdr-btn { border: 1px solid transparent; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.hdr-btn:hover, .hdr-btn.on { color: var(--ink); border-color: var(--line-strong); background: var(--panel); }
.chev { font-size: 10px; margin-left: 2px; opacity: .7; }
.avatar { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: none; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line-strong); }
.avatar:hover, .avatar.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--accent); border: none; }
.dropdown { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; min-width: 270px; padding: 6px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -24px rgba(17, 24, 68, .4); animation: popin .16s cubic-bezier(.2, .7, .2, 1); }
.dropdown.right { left: auto; right: 0; }
.dropdown a, .dropdown button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; padding: 9px 12px;
  border: none; background: none; border-radius: 9px; color: var(--ink); font-size: 13.5px; text-decoration: none; }
.dropdown a:hover, .dropdown button:hover { background: var(--panel-2); text-decoration: none; }
.dropdown span { font-size: 12px; color: var(--muted); }
.dd-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.dd-who strong { font-family: var(--serif); font-size: 16px; font-weight: 500; } .dd-who span { font-size: 12px; color: var(--muted); }
.dd-sep { height: 1px; background: var(--line); margin: 4px 6px; }
html.hero-dark .pills { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
html.hero-dark .pill-bar { background: rgba(255, 255, 255, .14); box-shadow: none; }
html.hero-dark .pill { color: rgba(226, 230, 248, .7); } html.hero-dark .pill.active, html.hero-dark .pill:hover { color: #fff; }
html.hero-dark .hdr-btn { color: rgba(226, 230, 248, .75); } html.hero-dark .hdr-btn:hover, html.hero-dark .hdr-btn.on { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
html.hero-dark .avatar { box-shadow: 0 0 0 2px #0b0f2e, 0 0 0 3px rgba(255, 255, 255, .25); }
:root[data-theme="dark"] .pills { background: rgba(255, 255, 255, .04); }
:root[data-theme="dark"] .pill-bar { background: var(--panel-2); }

/* ===== sheets: settings, conversations, members, usage ===== */
.sheet-veil { position: fixed; inset: 0; z-index: 45; background: rgba(10, 13, 34, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; animation: fadein .15s ease-out; }
.sheet { width: min(620px, 100%); max-height: 82vh; display: flex; flex-direction: column; background: var(--panel-solid); border-radius: 18px;
  border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -30px rgba(10, 13, 34, .55); animation: popin .2s cubic-bezier(.2, .7, .2, 1); }
.sheet.wide { width: min(980px, 100%); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 12px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 500; } .sheet-head p { margin: 4px 0 0; font-size: 13px; }
.sheet-body { padding: 16px 24px 24px; overflow: auto; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row.column { flex-direction: column; align-items: stretch; border-bottom: none; }
.set-row p { margin: 4px 0 0; font-size: 13px; max-width: 46ch; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.seg button { border: none; background: none; border-radius: 7px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel-solid); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 24, 68, .15); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ghost-btn { align-self: flex-start; border-radius: 10px; }
.mail-preview { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail-subj { padding: 10px 14px; font-weight: 600; font-size: 13.5px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.mail-preview pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; max-height: 40vh; overflow: auto; }
.sheet-search { width: 100%; padding: 10px 14px; font-size: 14px; border-radius: 10px; margin-bottom: 12px; }
.conv-list { list-style: none; margin: 0; padding: 0; }
.conv-list li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.conv-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: none; background: none; text-align: left; padding: 8px 6px; border-radius: 8px; }
.conv-open:hover { background: var(--panel-2); border: none; }
.conv-open strong { font-weight: 500; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-open span { font-size: 12px; color: var(--muted); }
.conv-edit { flex: 1; display: flex; gap: 6px; padding: 6px 0; } .conv-edit input { flex: 1; }
button.ghost.danger:hover { color: var(--bad); border-color: var(--bad); }
.member-add { display: grid; grid-template-columns: 1.2fr 1.5fr .9fr .8fr auto; gap: 8px; margin-bottom: 14px; }
table.members { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.members th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
table.members td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.members tr.off td { opacity: .5; } table.members select { padding: 3px 6px; font-size: 13px; }
.use-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.use-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.use-kpis .ref { background: var(--accent-soft); border-color: transparent; }
.use-kpis .kpi-n { font-family: var(--serif); font-size: 30px; line-height: 1; } .use-kpis .kpi-l { font-size: 12px; color: var(--muted); }
.use-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 0 2px; border-bottom: 1px solid var(--line-strong); }
.use-col { flex: 1; height: 100%; display: flex; align-items: flex-end; } .use-col span { width: 100%; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--st-doing); }
.use-col:hover span { background: var(--accent); }
.use-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin: 4px 0 18px; }
.use-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .use-tables .rp-label { display: block; margin-bottom: 8px; }
.use-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
@media (max-width: 760px) {
  .pills { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 4px 0 6px; justify-content: flex-start; }
  .pill span { display: none; } .pill { padding: 7px 12px; } .pill.active span { display: inline; }
  .member-add, .use-kpis, .use-tables { grid-template-columns: 1fr 1fr; }
  table.members td:nth-child(2), table.members th:nth-child(2) { display: none; }
  .sheet-veil { padding-top: 4vh; } .sheet-head, .sheet-body { padding-left: 16px; padding-right: 16px; }
}
.dropdown { max-width: calc(100vw - 24px); }

/* footnote tooltips in the abstract */
.ref[data-tip] { position: relative; }
.ref[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5;
  width: max-content; max-width: 320px; white-space: normal; padding: 7px 10px; border-radius: 8px; background: var(--accent-2); color: #fff;
  font-family: var(--sans, "Inter", system-ui, sans-serif); font-size: 12px; line-height: 1.4; letter-spacing: 0; box-shadow: 0 10px 24px -10px rgba(17, 24, 68, .45); pointer-events: none; }
:root[data-theme="dark"] .ref[data-tip]:hover::after { background: #eae0cf; color: #15171e; }
.msg-actions button[disabled] { opacity: .6; }

/* ===== Inbox and TBD in the report style ===== */
.inbox2 { max-width: 1100px; margin: 0 auto; }
.inbox-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.empty-note { margin: 4px 0; color: var(--muted); font-family: var(--serif); font-size: 15px; }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.note-list li:last-child { border-bottom: none; }
.note-list li.unread .note-text { font-weight: 600; }
.note-kind { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.wk-ms { display: flex; gap: 12px; align-items: baseline; padding: 4px 0 10px; font-family: var(--serif); font-size: 16px; }
.wk-date { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); min-width: 48px; }
.wk-stat { font-size: 13px; color: var(--muted); padding: 8px 0; border-top: 1px solid var(--line); } .wk-stat .num { color: var(--ink); font-weight: 600; }
.wk-list { list-style: none; margin: 0; padding: 0; } .wk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.feed-day { padding-bottom: 6px; }
.feed-day-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 0 6px; }
.feed-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed-av { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--st-doing), var(--accent)); }
.tbd { max-width: 1100px; margin: 0 auto; }
.tbd .rp-head { margin-bottom: 18px; }
.tbd section.empty { margin-bottom: 4px; } .tbd section.empty h3 { opacity: .6; }
.tbd section h3 { font-size: 17px; }
@media (max-width: 760px) { .inbox-grid { grid-template-columns: 1fr; } }

/* ===== Board in the report style ===== */
.board { max-width: 1240px; margin: 0 auto; }
.board-head { margin-bottom: 16px; }
.h1-sub { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 16px; vertical-align: middle; font-weight: 400; }
.toolbar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow); gap: 10px; align-items: center; }
.toolbar .search { border-radius: 999px; padding-left: 14px; }
.toolbar label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.toolbar select { border-radius: 999px; padding: 4px 10px; }
.chip-toggle input { position: absolute; opacity: 0; width: 0; }
.chip-toggle span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); cursor: pointer; transition: all .15s; }
.chip-toggle input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tasklist { background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
.tasklist .drafts-head { margin: 4px 2px 12px; }
.tasklist .draft-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 8px 8px; margin-bottom: 14px; }
.draft-org { display: flex; align-items: baseline; gap: 10px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.org-name { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.org-count { font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.org-sum { margin-left: auto; font-size: 12px; color: var(--muted); }
.tasklist .draft-row { border-radius: 8px; padding: 6px 10px; transition: background .12s; }
.tasklist .draft-row:hover { background: var(--panel-2); }
.tasklist .draft-row + .draft-row { border-top: 1px solid var(--line); }
.tasklist .draft-row:hover + .draft-row, .tasklist .draft-row:hover { border-top-color: transparent; }
.due { color: var(--muted); }
select.st-sel { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; border-color: transparent; }
select.st-sel.st-todo { background: var(--panel-2); color: var(--muted); }
select.st-sel.st-doing { background: var(--accent-soft); color: var(--accent); }
select.st-sel.st-done { background: rgba(79, 125, 94, .12); color: var(--good); }
@media (max-width: 760px) { .h1-sub { display: block; margin: 6px 0 0; } .org-sum { display: none; } }

/* ===== Milestones page ===== */
.ms-page { max-width: 1240px; margin: 0 auto; }
.ms-page .rp-head { margin-bottom: 16px; }
.timeline-wrap { border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline-head h3 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--muted); }
.ms-label strong { font-family: var(--serif); font-weight: 500; font-size: 13px; }
.ms-prog { display: block; height: 3px; margin: 4px auto 1px; width: 100%; min-width: 40px; border-radius: 999px; background: var(--st-todo); overflow: hidden; }
.ms-prog b { display: block; height: 100%; background: var(--st-done); border-radius: 999px; }
.ms-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.ms-chip { display: inline-flex; align-items: baseline; gap: 8px; border-radius: 999px; padding: 5px 14px; background: var(--panel-2); border: 1px solid var(--line); }
.ms-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.ms-chip strong { font-family: var(--serif); font-weight: 500; } .ms-chip span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ===== Chat page ===== */
.app:has(.v-chat) .sky-art { opacity: .35; }
.convs { gap: 2px; padding-right: 4px; }
.new-chat { border-radius: 10px; margin-bottom: 8px; }
.conv-group-label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.conv { display: flex; align-items: center; gap: 6px; position: relative; }
.conv-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-task { font-size: 9px; color: var(--accent); flex: none; }
.conv-acts { display: none; flex: none; } .conv:hover .conv-acts, .conv.active .conv-acts { display: inline-flex; }
.conv-acts button.icon { padding: 0 4px; font-size: 12px; color: var(--muted); border: none; background: none; } .conv-acts button.icon:hover { color: var(--ink); }
.conv-renaming input { width: 100%; padding: 4px 8px; font-size: 13px; }
.view.v-chat .composer { border-radius: 16px; border-color: var(--line-strong); padding: 10px 10px 10px 14px; box-shadow: 0 14px 40px -18px rgba(17, 24, 68, .3); }
.view.v-chat .composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 14px 40px -18px rgba(17, 24, 68, .3); }
.view.v-chat .composer textarea { font-family: var(--serif); font-size: 17px; }
.view.v-chat .composer button.primary { border-radius: 10px; padding: 8px 18px; }
.empty h3 { font-family: var(--serif); font-weight: 400; }

/* TBD: open questions sit above the decision log; the question opens the task panel */
.tbd-questions h3::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tbd-q .tbd-main { cursor: pointer; } .tbd-q:hover .tbd-title { color: var(--accent); }
.tbd-q .tbd-side { justify-content: center; } .tbd-q .tbd-side button { white-space: nowrap; }

/* ===== toasts: bottom centre, frosted glass ===== */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; border-radius: 12px; font-size: 14px; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: 0 0 0 1px var(--glass-edge), 0 14px 40px -16px rgba(17, 24, 68, .4);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); animation: toastin .18s ease-out; }
.toast.error { border-color: var(--bad); color: var(--bad); }
.toast-act { border: none; background: none; color: var(--accent); font-weight: 600; padding: 2px 6px; cursor: pointer; }
.toast-x { border: none; background: none; color: var(--muted); padding: 0 4px; font-size: 16px; line-height: 1; cursor: pointer; }
.toast-x:hover, .toast-act:hover { color: var(--ink); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== TBD: inline answer and deciders forms ===== */
.tbd-answer { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.tbd-answer textarea { width: 100%; font: inherit; }
.deciders-edit { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; width: 100%; }
.deciders-edit input { width: 100%; font-size: 13px; }

/* ===== keyboard shortcuts sheet ===== */
.key-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.key-row:last-child { border-bottom: none; }
.key-row kbd { justify-self: start; font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--ink); white-space: nowrap; }

/* ===== task panel: previous / next ===== */
.tp-nav { display: inline-flex; align-items: center; gap: 2px; }
.tp-nav .icon { font-size: 18px; line-height: 1; padding: 2px 8px; }
.tp-nav .icon:disabled { opacity: .35; cursor: default; }
.tp-pos { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 44px; text-align: center; }

/* ===== task panel: history ===== */
.tp-hist { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.tp-hist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tp-hist li:last-child { border-bottom: none; }
.tp-hist-who { font-weight: 600; white-space: nowrap; }
.tp-hist-what { color: var(--ink); overflow-wrap: anywhere; }
.tp-hist-when { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ===== Board: inline add at the end of each organisation card ===== */
.quick-add { display: flex; gap: 6px; padding: 6px 4px 0; margin-top: 4px; border-top: 1px solid var(--line); }
.quick-add input { flex: 1; min-width: 0; border: 1px dashed transparent; background: transparent; font-size: 13px; padding: 5px 8px; border-radius: 8px; color: var(--ink); }
.quick-add input::placeholder { color: var(--muted); }
.quick-add input:hover { border-color: var(--line-strong); }
.quick-add input:focus { border-style: solid; border-color: var(--accent); background: var(--panel-solid); outline: none; }
.quick-add button { padding: 4px 12px; font-size: 13px; }

/* ===== Overview: since your last visit ===== */
.since { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: -8px; font-size: 14px; color: var(--ink); }

/* ===== Overview: print the workbench as a clean report ===== */
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.print-link { font-size: 13px; white-space: nowrap; }
@media print {
  @page { margin: 16mm 14mm; }
  html, body { height: auto; background: #fff !important; }
  body { background-image: none !important; }
  header, .tabbar, .sky-art, .hero, .ask-float, .ask-slot, .askbox, .welcome, .toasts, .taskpanel, .docpanel, .askpanel, .ctxmenu, .sheet-veil,
  .print-link, .ask-fig, .abs-head button, .link.more, .elsewhere { display: none !important; }
  main { display: block; height: auto; }
  .view { overflow: visible !important; padding: 0 !important; }
  .view.v-overview .report { max-width: none; padding: 0; }
  .report { gap: 14px; }
  .abstract, .fig, .side-card { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .bento { display: block; }
  .fig, .side-card { break-inside: avoid; margin-bottom: 14px; }
  .bento > .fig:not(:first-child) { break-before: page; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== Overview: organisations in the figures open the Board ===== */
.org-link { cursor: pointer; border-radius: 8px; margin-left: -6px; margin-right: -6px; padding-left: 6px; padding-right: 6px; transition: background .15s; }
.org-link:hover, .org-link:focus-visible { background: var(--panel-2); outline: none; }
.org-link:hover .org-head span:first-child, .org-link:hover > span:first-child { color: var(--accent); }

/* ===== Inbox: asked of your organisation ===== */
.asked-list { list-style: none; margin: 0; padding: 0; }
.asked-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 4px; border-top: 1px solid var(--line);
  font-size: 13.5px; cursor: pointer; border-radius: 6px; }
.asked-list li:first-child { border-top: none; }
.asked-list li:hover { background: var(--panel-2); }
.asked-list li:hover .asked-title { color: var(--accent); }
.asked-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .asked-list li { grid-template-columns: auto minmax(0, 1fr); } .asked-list li > .muted { grid-column: 2; } }

/* ===== glossary: acronyms with a dotted underline ===== */
abbr.gloss { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }
.gloss-row strong { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); }

/* ===== composer: grows with its text, hint underneath ===== */
.composer textarea { line-height: 1.45; overflow-y: auto; }
.composer-hint { font-size: 11px; color: var(--muted); opacity: .75; padding: 4px 14px 0; }
.chat.compact .composer-hint { padding-left: 8px; }

/* ===== chat: jump to the latest answer ===== */
.jump-wrap { position: sticky; bottom: 10px; height: 0; display: flex; justify-content: center; }
.jump { position: absolute; bottom: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 17px; line-height: 1;
  background: var(--panel-solid); border: 1px solid var(--line-strong); color: var(--ink); box-shadow: var(--shadow); }
.jump:hover { border-color: var(--accent); color: var(--accent); }

/* ===== decisions: search ===== */
.tbd-search { width: 100%; max-width: 360px; margin: 4px 0 12px; }

/* ===== open questions: milestone pill ===== */
.tbd-q .tbd-title .ms-badge { font-family: var(--mono); font-weight: 600; vertical-align: 2px; margin-right: 4px; }

/* ===== board: one-visit organisation filter ===== */
.visit-chip { padding: 4px 10px 4px 12px; border-radius: 999px; border: 1px solid transparent; background: var(--accent-soft); color: var(--accent); font-size: inherit; }
.visit-chip span { margin-left: 2px; opacity: .7; }
.visit-chip:hover { border-color: var(--accent); } .visit-chip:hover span { opacity: 1; }

/* ===== settings: rows wrap on phones ===== */
@media (max-width: 760px) { .set-row { flex-wrap: wrap; gap: 10px; } }

/* ===== a view whose first fetch failed ===== */
.load-fail { max-width: 420px; margin: 12vh auto; padding: 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.load-fail strong { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.load-fail .muted { font-size: 13px; } .load-fail button { margin-top: 6px; }

/* ===== newcomer welcome on the Overview ===== */
.welcome { margin: 0 0 22px; padding: 18px 22px; background: var(--panel-solid); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.welcome-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.welcome h2 { margin: 0; font-size: 22px; } .welcome > p { margin: 6px 0 10px; font-size: 14px; }
.welcome ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.welcome li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; }
.welcome li button.link { justify-self: start; font-weight: 600; padding: 0; }
.welcome-ask { font-size: 14px; } .welcome-ask strong { font-weight: 600; }
@media (max-width: 760px) { .welcome { padding: 14px 16px; } .welcome li { grid-template-columns: 84px minmax(0, 1fr); } }

/* ===== accessibility: clear focus rings; no motion when the system asks for less ===== */
button:focus-visible, a:focus-visible, .row:focus-visible, .card:focus-visible, .org-link:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.pill:focus-visible, .row:focus-visible, .seg button:focus-visible, .dropdown button:focus-visible, .dropdown a:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== phones: a tab bar along the bottom edge replaces the header pills ===== */
.tabbar { display: none; }
@media (max-width: 760px) {
  header .pills { display: none; } header { padding-top: max(4px, env(safe-area-inset-top)); }
  .tabbar { display: flex; flex: none; position: sticky; bottom: 0; z-index: 4; padding: 4px 4px env(safe-area-inset-bottom);
    background: var(--header-bg); border-top: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
  .tabbar button { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 5px;
    border: none; background: none; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 500; }
  .tabbar button:hover { border: none; color: var(--ink); }
  .tabbar button.active { color: var(--accent); }
  .tabbar .ico { width: 21px; height: 21px; }
  .tabbar span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px; }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ===== phones: the task panel, document panel and sheets fill the screen under a sticky header ===== */
@media (max-width: 760px) {
  .taskpanel, .docpanel { inset: 0; width: 100vw; height: 100dvh; z-index: 30; border-left: none; box-shadow: none; padding: 0 14px calc(14px + env(safe-area-inset-bottom)); }
  .taskpanel .panel-head, .docpanel .panel-head { position: sticky; top: 0; margin: 0 -14px 8px; padding: max(8px, env(safe-area-inset-top)) 14px 8px;
    background: var(--panel-solid); border-bottom: 1px solid var(--line); z-index: 2; }
  .panel-head .esc-hint { display: none; }
  .panel-head .icon[aria-label="Close"], .sheet-head .icon { font-size: 20px; padding: 6px 10px; }
  .sheet-veil { padding: 0; }
  .sheet, .sheet.wide { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .sheet-head { position: sticky; top: 0; padding-top: max(14px, env(safe-area-inset-top)); background: var(--panel-solid); }
  .sheet-body { flex: 1; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ===== graphite contrast: text stays at WCAG AA (4.5:1) or better ===== */
:root[data-theme="dark"] .count { color: var(--bg); }  /* white on --bad was 2.6:1; now 6.9:1 */
:root[data-theme="dark"] .ask-fig, :root[data-theme="dark"] .card.st-done, :root[data-theme="dark"] table.members tr.off td { opacity: .9; }  /* faded muted text was 2.4–3.2:1; now 4.8:1 */
