/* SOTU — the flow-first look (M5 task 22, `docs/ui-redesign.md`).
 *
 * The tokens, type and spacing here are the ones in that brief's Tokens section, applied to
 * the structure the pages were rebuilt into. The rules it states about colour are the reason
 * this file is worth reading rather than skimming:
 *
 *   - **Orange is only "a person is waiting on you".** A session asking, a decision, an
 *     offline machine, a context gauge past 75%. Nothing else, ever.
 *   - **Blue is the only other accent**: actions and links.
 *   - **Green appears only** as the running dot and the done tick.
 *   - **Violet marks SOTU's own suggestions.**
 *   - Secondary data — plan id, machine, model, context — is grey, aligned, never coloured.
 *   - Badges exist only in the stage column of the Plans list; everywhere else status is a
 *     sentence.
 *
 * Fonts are named with real fallbacks and not fetched: this service runs on a LAN and should
 * not reach out to a font CDN to render a page. DM Sans and JetBrains Mono are used where
 * they are installed, and the system stack where they are not.
 */
:root{
  --navy:#101636;
  --body:#f7f6f2;
  --paper:#ffffff;
  --line:#e6e3da;
  --line-2:#efede6;
  --ink:#1a1f2e;
  --muted:#646b78;
  --faint:#9198a4;
  --blue:#2451f5;
  --blue-soft:#eaeefe;
  --orange:#e8551f;
  --orange-soft:#fdf1ea;
  --orange-line:#f4d9c8;
  --green:#1c9a55;
  --green-soft:#e6f6ec;
  --violet:#6a3fd0;
  --sans:'DM Sans',Inter,ui-sans-serif,system-ui,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--body);
  font-synthesis:none;
}
*{box-sizing:border-box}
/* `hidden` means hidden, whatever a class says about display: the Ask page hides its answer
   furniture until there is an answer, and `.field-label{display:block}` was winning. */
[hidden]{display:none!important}
body{margin:0;background:var(--body)}

/* ── Chrome ─────────────────────────────────────────────────────────────────────────────── */
/* Navigation down the left, in the palette of the new look. It was briefly a 56px top bar;
   sixteen destinations across a bar is a wall, and Roi asked for the column back
   (2026-09-14). A column has room for them, grouped by what they are for. */
#app{display:flex;min-height:100vh}
aside{
  width:216px;flex-shrink:0;padding:22px 16px 28px;background:var(--navy);color:#eef0f7;
  /* Full height, so the column is a column and not a floating block of navy. */
  position:sticky;top:0;height:100vh;overflow-y:auto;
}
aside .logo{display:block;width:100%;max-width:132px;margin:0 0 18px}
aside>.muted{display:none}
aside .nav{
  display:block;width:100%;text-align:left;margin:1px 0;padding:8px 10px;
  background:transparent;border:0;border-radius:8px;
  color:#c7cce0;font:inherit;font-size:13.5px;
}
aside .nav:hover{background:#1d2450;color:#fff;border-color:transparent}
aside .nav-section{
  margin:18px 0 4px;padding-top:14px;border-top:1px solid #262d57;
  font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#7f87ad;
}
aside .nav-section:empty{border-top:1px solid #262d57;margin:14px 0 0;padding:0}
aside select.nav{
  width:100%;background:#1a2048;color:#dfe3f2;border:1px solid #2b3260;border-radius:8px;
  padding:8px 10px;margin:0 0 14px;font-size:13px;
}
main{padding:28px 40px 56px;min-width:0;width:100%}

/* ── Type ───────────────────────────────────────────────────────────────────────────────── */
h1{font-size:28px;font-weight:600;letter-spacing:-.02em;margin:4px 0 6px}
h2{font-size:17px;font-weight:600;letter-spacing:-.01em;margin:0 0 10px}
h3{font-size:15px;font-weight:600;margin:0}
p{margin:6px 0}
.muted{color:var(--muted);font-size:13px;line-height:1.6}
.faint{color:var(--faint)}
.eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
.field-label{font-size:13px;font-weight:600;color:var(--ink);margin:16px 0 2px;display:block}
.field-hint{display:block;font-size:12px;color:var(--muted);margin-top:5px}
/* Ids, models, paths and diffs are fixed-width, so columns of them line up and a hash is
   readable as a hash. */
pre,code,.token,.session-row .eyebrow,.machine-heading .muted{font-family:var(--mono)}
a{color:var(--blue)}

/* ── Controls ───────────────────────────────────────────────────────────────────────────── */
button{
  border:1px solid var(--line);background:var(--paper);color:var(--ink);
  border-radius:8px;padding:8px 13px;cursor:pointer;font:inherit;font-size:13.5px;
}
button:hover{border-color:var(--blue);color:var(--blue)}
button:disabled{opacity:.55;cursor:wait}
.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:500}
.primary:hover{background:#1c42d8;border-color:#1c42d8;color:#fff}
input,textarea,select{
  font:inherit;font-size:14px;color:var(--ink);background:var(--paper);
  border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:6px 8px 10px 0;
}
input:focus,textarea:focus,select:focus{outline:2px solid var(--blue-soft);border-color:var(--blue)}
input{width:320px;max-width:100%}
textarea{display:block;width:100%;min-height:96px;resize:vertical}
/* The ask box is the primary action of two screens, and says so. */
.main-column>textarea:first-of-type,.login textarea{
  border:1.5px solid var(--blue);border-radius:12px;box-shadow:0 2px 6px rgba(36,81,245,.10);
  min-height:88px;font-size:15px;
}
.check{display:flex;align-items:center;gap:9px;margin:10px 0;font-size:13px;color:var(--muted)}
.check input{width:auto;margin:0}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 18px}
.chip{border-radius:999px;font-size:13px;padding:7px 14px;background:var(--blue-soft);
  border-color:transparent;color:#1b3bb8}
.chip:hover{background:#dde4fd;color:#16309a;border-color:transparent}

/* ── Cards and rows ─────────────────────────────────────────────────────────────────────── */
.card{
  background:var(--paper);border:1px solid var(--line);border-radius:12px;
  padding:18px 20px;margin:0 0 18px;box-shadow:0 1px 2px rgba(26,31,46,.04);
}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:18px;margin-top:18px}
.row{
  display:flex;align-items:center;gap:16px;padding:13px 0;
  border-bottom:1px solid var(--line-2);flex-wrap:wrap;
}
.card .row:last-child{border-bottom:0}
/* The first cell grows, unless it is one of the fixed marks (a state dot, a queue label). */
.row>span:first-child:not(.run-dot):not(.idle-dot):not(.eyebrow),
.row .session-purpose{flex:1;min-width:0}
/* Constant row heights: a title or a status line that runs long is cut, not wrapped. */
.row .need-title,.row .session-purpose,.need-text p{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.need-title{font-size:15px;font-weight:600;margin:0}
.need .need-text{flex:1;min-width:0}
.need .need-text p{margin:2px 0}
.row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.row .muted{color:var(--muted);font-size:13px;white-space:nowrap}

/* The label says which source a queued row came from: orange when a session is asking,
   violet when it is SOTU's own suggestion, blue for the proposals queue. */
.label-session{color:var(--orange)}
.label-decision{color:var(--violet)}
.label-proposals{color:var(--blue)}

/* Orange, and only here: something is waiting on a person. */
.card.needs{background:var(--orange-soft);border-color:var(--orange-line)}
.card.needs .row{border-bottom-color:#f6e3d6}
.waiting{color:var(--orange);font-weight:600;font-size:13px}


/* ── Pages ──────────────────────────────────────────────────────────────────────────────── */
.with-side{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:44px;align-items:start}
.main-column,.side-column{min-width:0}
/* The page's own side column is not the navigation: it keeps the page's background. */
aside.side-column{width:auto;background:transparent;color:inherit;padding:0;position:static;
  max-height:none;overflow:visible}
.side-column .card{padding:14px 16px;margin-bottom:16px}
.side-column .card h2{font-size:13px;font-weight:600;text-transform:uppercase;
  letter-spacing:.1em;color:var(--muted);margin-bottom:8px}
.side-column .row{padding:9px 0}
.side-column button{padding:6px 10px;font-size:13px}
.ask-question{font-size:22px;font-weight:600;letter-spacing:-.01em;margin:6px 0 10px}
.ask-footer{display:flex;gap:18px;flex-wrap:wrap;margin:2px 0 18px}
.ask-footer p{margin:0}
.count-strip{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 18px}
.count-strip button{
  text-align:left;min-width:158px;padding:12px 14px;border-radius:12px;font-size:13px;
  color:var(--muted);background:var(--paper);
}
.count-strip button:hover{color:var(--blue)}
.count-strip .on{border-color:var(--blue);color:var(--ink);font-weight:600;background:var(--blue-soft)}
.detail-pane{display:grid;grid-template-columns:minmax(0,460px) minmax(0,1fr);gap:28px;align-items:start}
.queue-list{background:var(--paper);border:1px solid var(--line);border-radius:12px;
  padding:6px 16px;box-shadow:0 1px 2px rgba(26,31,46,.04)}
.queue-list .row{cursor:pointer}
.queue-list .row.selected{
  border-left:3px solid var(--blue);padding-left:13px;margin-left:-16px;
  background:var(--blue-soft);border-radius:0 8px 8px 0;
}
.queue-list .card{margin:10px 0;box-shadow:none;background:var(--green-soft);border-color:#c7e8d4}
/* A plan's title is the whole of what a proposal row says, and one clipped line of "22 —
   Review hand-off: items owned by the live-…" names nothing. Constant row heights still
   hold — two lines, then the clamp (Roi, 2026-09-15: "the title goes over the card size …
   should resume on the 2nd line").

   The proposals queue only. `queue-list` is also the findings queue, whose title is a claim
   sitting above a disclosure the row expands, and a second line there covers the summary and
   swallows the click that opens it. */
.proposal-queue .need-title{
  white-space:normal;overflow:hidden;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
}
.session-list{margin:2px 0 10px}
.active-work{margin:2px 0 18px}
.session-row{padding:12px 0;gap:14px}
.session-row .session-purpose{font-weight:600;font-size:14px}
/* Two lines before it is cut, not one letter: a session's name is the thing somebody reads
   the row for. */
.session-row .session-purpose{white-space:normal;overflow:hidden;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
.session-row .cell-state{
  font-size:11px;text-transform:uppercase;letter-spacing:.08em;padding:3px 9px;
  border-radius:999px;background:#eef0f4;color:var(--muted);white-space:nowrap;
}
.session-row button{padding:6px 11px;font-size:13px}
/* The stage column of the Plans list is the one place a badge belongs. */
.queue-list .row>span.muted:nth-of-type(1){min-width:104px}
.machine-heading{
  display:flex;align-items:baseline;gap:10px;margin:16px 0 2px;font-size:14px;font-weight:600;
  padding-left:11px;border-left:3px solid hsl(var(--machine-hue,155) 42% 52%);
}
.machine-heading .muted{font-size:12px;font-weight:400}
.inject{flex-basis:100%;background:var(--blue-soft);border-left:3px solid var(--blue);
  padding:12px 14px;margin:8px 0;border-radius:0 8px 8px 0}
.inject textarea{min-height:76px;margin:6px 0}
.picker{flex-basis:100%;gap:8px;border-bottom:0;padding-top:4px}
#jump{position:sticky;top:8px;z-index:10;border-color:var(--blue)}
/* A failure is shown where somebody is looking. Orange is a person being waited on, and a
   request that failed is waiting on one (Roi, 2026-09-14). */
.toast{
  position:fixed;right:16px;bottom:16px;z-index:60;max-width:420px;
  background:#fff;border:1px solid var(--orange);border-left:4px solid var(--orange);
  border-radius:10px;padding:12px 14px;font-size:14px;line-height:1.45;
  box-shadow:0 6px 20px rgba(26,31,46,.16);
}
.toast button{margin:8px 0 0}
#jump input{width:100%}
#jump button{display:block;width:100%;text-align:left;margin:4px 0}

/* ── Documents ──────────────────────────────────────────────────────────────────────────── */
.plan-body,.answer{background:var(--paper);border:1px solid var(--line);border-radius:12px;
  padding:22px 26px;margin:10px 0 18px;box-shadow:0 1px 2px rgba(26,31,46,.04)}
.answer{font-size:15px}
.plan-body h2{font-size:21px;margin:26px 0 10px;letter-spacing:-.01em}
.plan-body h3{font-size:17px;margin:22px 0 8px}
.plan-body h4,.plan-body h5,.plan-body h6{font-size:15px;margin:18px 0 6px;color:#3b4254}
.plan-body p{line-height:1.7;margin:12px 0;font-size:14.5px}
.plan-body ul,.plan-body ol{line-height:1.7;padding-left:26px;margin:12px 0}
.plan-body li{margin:5px 0}
.plan-body code{background:#f2f1ec;border-radius:4px;padding:2px 5px;font-size:13px;overflow-wrap:anywhere}
.plan-body pre.code-block{background:var(--navy);color:#e8ebf7;padding:16px 18px;border-radius:10px;
  overflow-x:auto;white-space:pre;font-size:13px;line-height:1.65}
.plan-body blockquote{margin:14px 0;padding:2px 18px;border-left:3px solid var(--line);color:var(--muted)}
.plan-body hr{border:0;border-top:1px solid var(--line-2);margin:26px 0}
.plan-body table{font-size:13px}
.idea-text{background:transparent;border:0;box-shadow:none;padding:0;margin:0}
.idea-text p{margin:4px 0}
/* Approved guidance: text somebody decided could cross an audience boundary, shown as itself. */
.guidance{background:var(--green-soft);border:1px solid #c7e8d4;border-left:3px solid var(--green);
  padding:14px 18px;margin:10px 0;border-radius:0 10px 10px 0}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7}
.evidence{margin:6px 0 14px;padding-left:20px;font-size:13px;line-height:1.7;color:var(--muted)}
.evidence li{font-family:var(--mono);font-size:12.5px}

/* ── Tables, notices, sign-in ───────────────────────────────────────────────────────────── */
table{width:100%;border-collapse:collapse;margin:14px 0 22px;font-size:13px}
td,th{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line-2);overflow-wrap:anywhere}
th{text-transform:capitalize;color:var(--muted);font-weight:600;font-size:12px;letter-spacing:.04em}
td{font-family:var(--mono);font-size:12.5px;color:var(--ink)}
.notice{color:var(--orange);min-height:20px;font-size:13.5px;font-weight:500}
/* The subscription banner is a standing statement of fact, so it is not orange: orange means
   a person is waiting on you (`docs/ui-redesign.md`). */
main>.notice:not(#notice){color:var(--muted);font-weight:400;background:var(--paper);
  border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:0 0 14px}
.login{width:440px;max-width:94vw;margin:12vh auto;background:var(--paper);
  border:1px solid var(--line);border-radius:14px;padding:36px;
  box-shadow:0 2px 10px rgba(26,31,46,.06)}
.login .logo{display:block;max-width:240px;margin:0 auto 18px}
.login h1{font-size:24px}
.login input{display:block;width:100%}
.login button{margin:8px 0;width:100%}
.token:empty{display:none}
.token{padding:14px;background:#fff8e4;border:1px solid #f0e2b8;border-radius:10px;font-size:13px}
.install-link{display:inline-block;margin:6px 0 16px;color:var(--blue);font-weight:600}
.field{display:block;margin:16px 0}
.field input,.field select{display:block;width:100%;max-width:460px;margin:6px 0 0}
.field[hidden]{display:none}
.logo{display:block;width:100%;max-width:190px;height:auto}

@media(max-width:900px){
  #app{display:block}
  .with-side,.detail-pane{grid-template-columns:1fr}
  main{padding:20px}
  aside{width:100%;position:static;max-height:none;padding:14px}
  aside .nav{display:inline-block;width:auto}
  .grid{grid-template-columns:1fr}
  table{display:block;overflow:auto}
}

/* ── Aligned columns ────────────────────────────────────────────────────────────────────── */
/* Secondary data in fixed columns so a list reads down as well as across: a stage, an owner
   and a date that move with the title length are three things nobody can scan. */
.plan-row>.need-text{flex:1}
.plan-row>span:nth-of-type(1){width:104px;flex:none}          /* stage */
.plan-row>span:nth-of-type(2){width:120px;flex:none;color:var(--muted)}  /* owner */
.plan-row>span:nth-of-type(3){width:96px;flex:none;text-align:right}     /* updated */
.plan-row>button:last-child{width:92px;flex:none}
.need>.eyebrow:first-child{width:120px;flex:none;font-size:10.5px;line-height:1.35}
.need>span.muted{width:88px;flex:none;text-align:right}
.need>.row-actions{width:176px;flex:none;justify-content:flex-end}
/* One row, two pages (Roi, 2026-09-14), so the columns are named rather than counted: the
   sessions page adds a state, a project and a tool cell, and `nth-of-type` widths would land
   on the wrong ones the moment it does.

   The purpose gets a floor. Eight fixed cells and a button add up to about 860px before the
   gaps, so on a narrower window the one column that grows was the one that shrank — to a
   single letter and an ellipsis (Roi, 2026-09-14). It keeps 220px and the row wraps instead,
   which is what `flex-wrap` on `.row` is there for. */
.running-row>.session-purpose{flex:1 1 220px;min-width:220px}
.running-row>.plan-cell{width:104px;flex:none}                /* plan, or "unassigned" */
.running-row>.plan-cell button{padding:4px 8px;font-size:12.5px;max-width:100%}
.running-row>.cell-state{width:104px;flex:none;text-align:center}
.running-row>.cell-project{width:150px;flex:none}
.running-row>.cell-machine{width:112px;flex:none}
.running-row>.cell-tool{width:84px;flex:none}
.running-row>.cell-model{width:96px;flex:none;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.running-row>.cell-age{width:82px;flex:none;text-align:right}
.running-row>.cell-project,.running-row>.cell-machine,.running-row>.cell-tool,
.running-row>.cell-age{overflow:hidden;text-overflow:ellipsis}
/* Named, not counted — the row grew a Focus button and an answer beside it, and positional
   widths would have landed on the wrong cells again (Roi, 2026-09-14). */
.running-row>.cell-do{width:110px;flex:none}
.running-row>.cell-focus{width:82px;flex:none}
.running-row>.cell-do~span.muted{flex:0 1 auto;white-space:normal;text-align:left}
.run-dot{color:var(--green);font-size:11px;width:12px;flex:none}
.idle-dot{color:var(--faint);font-size:11px;width:12px;flex:none}
/* Orange is only ever a person being waited on — which is what this state is. */
.wait-dot{color:var(--orange);font-size:11px;width:12px;flex:none}
/* The context gauge: 6×16, filling from the bottom, grey until three quarters and orange
   after — the point at which "resume" becomes "start fresh". */
.gauge{display:inline-block;position:relative;width:6px;height:16px;flex:none;
  background:#e8e6df;border-radius:3px;overflow:hidden;vertical-align:middle}
.gauge-fill{position:absolute;left:0;bottom:0;width:100%;background:var(--faint)}
.gauge-full .gauge-fill{background:var(--orange)}
.gauge-unknown{background:repeating-linear-gradient(45deg,#e8e6df,#e8e6df 2px,#f5f4ef 2px,#f5f4ef 4px)}
.meta-line{margin:2px 0 14px;font-size:13px}
.meta-line span{font-size:13px}
.tick{width:16px;flex:none;color:var(--faint);font-size:13px}
.tick.done{color:var(--green)}
.scope-row>span:last-child{width:150px;flex:none;text-align:right}
/* An answer is one card, not a card inside a card: the markdown block it is built from keeps
   its typography and loses its chrome here. */
.answer .plan-body,.side-column .plan-body,details .plan-body{
  background:transparent;border:0;box-shadow:none;padding:0;margin:0;
}
.answer>.row{border-bottom:0;padding-top:16px}
/* A finding is the one row that is a paragraph rather than a line: the claim wraps in full,
   the plans it is about are named by id and title, and the original wording opens in place
   (Roi, 2026-09-14). */
.finding-row{align-items:flex-start}
.finding-row>.need-text{flex:1}
.finding-row .claim,.finding-row details p{
  white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45;max-width:74ch;
}
.finding-row .claim{font-weight:600}
.row-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.row-chips .chip{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.claim-original{margin:8px 0 0}
.claim-original summary{cursor:pointer;font-size:13px;color:var(--blue)}
.claim-original p{margin:6px 0 0;word-break:break-word}
.finding-row>.row-actions{width:250px;flex:none;justify-content:flex-end}
