/* Forge console — D-831: the pages wear the Claude Design proposal (pulse-clmm
   forge-console-redesign/, 2026-11-13): one layout per page (header · Now banner · main + rail),
   colour carries meaning only (green done, blue running, amber attention, red failed, indigo you),
   details folded, never removed. Colours come from tokens.css (pulse-clmm's brand, vendored and
   pinned); the state shades below are the proposal's text-safe ones. Nothing scrolls sideways at
   any width — not the page, not a box inside it (operator, 2026-11-13); the e2e measures every
   element at 390, 768, 1180 and 1366 px. */

:root {
  --live: #2563eb; --live-soft: #eff6ff;
  --good: #15803d; --good-soft: var(--ds-success-soft);
  --warn: #b45309; --warn-soft: #fffbeb;
  --bad: #b91c1c; --bad-soft: var(--ds-destructive-soft);
  --ui: var(--ds-font-ui);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --live: #60a5fa; --live-soft: rgba(96, 165, 250, .12);
  --good: #4ade80; --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1); --bad: #fca5a5;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --live: #60a5fa; --live-soft: rgba(96, 165, 250, .12);
  --good: #4ade80; --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1); --bad: #fca5a5;
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--ds-bg); color: var(--ds-fg); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; padding-bottom: env(safe-area-inset-bottom, 0px); overflow-wrap: anywhere; }
a { color: var(--ds-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-family: var(--mono); font-size: .85em; background: var(--ds-bg-muted); border: 1px solid var(--ds-border); border-radius: 4px; padding: 0 4px; color: var(--ds-fg); overflow-wrap: anywhere; }
.muted { color: var(--ds-fg-muted); }
.faint { color: var(--ds-fg-subtle); }
h1, h2, h3, h4 { overflow-wrap: anywhere; }

/* ---- shell: top bar ------------------------------------------------------------------------ */
.top { background: var(--ds-bg-elevated); border-bottom: 1px solid var(--ds-border); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left, 0px)); min-height: 52px; display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.page-wide .top-in, .page-wide .page { max-width: 1440px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ds-fg); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--ds-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.nav a { font-size: 13px; color: var(--ds-fg-muted); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: var(--ds-bg-muted); color: var(--ds-fg); text-decoration: none; }
.nav a[aria-current] { color: var(--ds-fg); font-weight: 600; background: var(--ds-bg-muted); }
.nav .short { display: none; }
.sys { margin-left: auto; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ds-fg-muted); align-items: center; min-width: 0; }
.sys > span, .sys > a { display: inline-flex; align-items: center; gap: 6px; color: var(--ds-fg-muted); min-width: 0; }
.signout { display: flex; }
.signout .btn { color: var(--ds-fg-muted); }

.page { max-width: 1240px; margin: 0 auto; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 64px max(24px, env(safe-area-inset-left, 0px)); }

/* ---- atoms --------------------------------------------------------------------------------- */
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; flex-shrink: 0; background: var(--ds-border-strong); }
.dot.good, .dot.ok { background: var(--ds-success); } .dot.warn { background: var(--ds-warning); } .dot.bad { background: var(--ds-destructive); }
.dot.you { background: var(--ds-accent); }
.dot.live { background: var(--live); animation: fd-pulse 1.8s infinite; }
@keyframes fd-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 50%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.25; border: 1px solid var(--ds-border-strong); background: var(--ds-bg-elevated); color: var(--ds-fg); cursor: pointer; text-decoration: none; text-align: center; max-width: 100%; white-space: normal; }
.btn:hover { background: var(--ds-bg-muted); text-decoration: none; }
.btn.primary { background: var(--ds-accent); border-color: transparent; color: var(--ds-accent-fg); }
.btn.primary:hover { background: var(--ds-accent-hover); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ds-fg-muted); }
.btn.ghost:hover { color: var(--ds-fg); background: var(--ds-bg-muted); }
.btn .ico { width: 9px; height: 9px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }
@media (pointer: coarse) { .btn { min-height: 40px; } .btn.sm { min-height: 36px; } }

.tag { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.35; background: var(--ds-bg-muted); color: var(--ds-fg-muted); max-width: 100%; text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.tag.good, .tag.ok { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.live, .tag.info { background: var(--live-soft); color: var(--live); }
.tag.acc, .tag.you, .tag.accent { background: var(--ds-accent-soft); color: var(--ds-accent); }
.tag.muted { background: var(--ds-bg-muted); color: var(--ds-fg-muted); }

.card { background: var(--ds-bg-elevated); border: 1px solid var(--ds-border); border-radius: 12px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 14px 18px; border-bottom: 1px solid var(--ds-border); }
.card-h h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ds-fg); display: flex; align-items: center; gap: 8px; }
.card-h .aside { font-size: 12.5px; color: var(--ds-fg-muted); }
.card-b { padding: 16px 18px; }
.empty-line { padding: 14px 18px; font-size: 13px; color: var(--ds-fg-muted); }

.check { width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--ds-border-strong); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.check.done { background: var(--ds-success); border-color: var(--ds-success); }
.check.built { color: var(--ds-success); border-color: var(--ds-success); border-width: 2px; }
.check.next { border-color: var(--ds-accent); border-width: 2px; }
.check.live { border-color: var(--live); border-width: 2px; border-style: dashed; }
.check.bad { border-color: var(--ds-destructive); border-width: 2px; }

.id { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ds-accent); }
/* D-831: a demand id inside a line of text links to its page */
a.did { font-family: var(--mono); font-size: .92em; font-weight: 600; color: var(--ds-accent); }
/* the whole card / row opens its demand through the id's link (stretched over the box); the
   links and buttons inside it sit above, so an id in a title or a press still hits its own target */
.dc, .need, .bl-row { position: relative; }
.dc > .t1 > a.id::after, .need .t1 > a.id::after, .bl-row > a.id::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dc a:not(.id), .dc button, .dc .btn, .need a:not(.id), .need button, .need .btn, .bl-row a:not(.id), .bl-row button, .bl-row .btn, .dc .reason, .dc .chips { position: relative; z-index: 1; }
.dc:hover .ttl, .need:hover .ttl, .bl-row:hover .ttl { color: var(--ds-accent); }
span.id { color: var(--ds-fg); }
.pri { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ds-fg-muted); }
.oc { font-size: 12px; font-weight: 600; }
.oc.good, .oc.ok { color: var(--good); } .oc.warn { color: var(--warn); } .oc.bad { color: var(--bad); } .oc.live { color: var(--live); } .oc.muted { color: var(--ds-fg-muted); font-weight: 500; }
.chev { color: var(--ds-fg-muted); transition: transform .15s; flex: none; margin-top: 3px; }
details[open] > summary .chev { transform: rotate(90deg); }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* ---- page layout: header · Now banner · main + rail -------------------------------------- */
.hd { display: flex; justify-content: space-between; gap: 16px 24px; align-items: flex-end; flex-wrap: wrap; }
.hd-l { flex: 999 1 420px; min-width: 0; }
.hd h1 { margin: 0; font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; color: var(--ds-fg); }
.hd .lede { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ds-fg-muted); max-width: 780px; }
.hd .lede b { color: var(--ds-fg); }
.hd .lede p { margin: 0; }
.hd-r { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.crumb { font-size: 13px; color: var(--ds-fg-muted); }
.crumb a { color: var(--ds-fg-muted); }
.meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.meta .opened { font-size: 12.5px; color: var(--ds-fg-muted); margin-left: 4px; }
.hd .meta + h1 { margin-top: 10px; }

.now { margin-top: 22px; display: flex; align-items: center; gap: 10px 14px; padding: 14px 18px; border-radius: 12px; flex-wrap: wrap; background: var(--ds-bg-elevated); border: 1px solid var(--ds-border); min-width: 0; }
.now.live { background: var(--live-soft); border-color: color-mix(in srgb, var(--live) 25%, transparent); }
.now.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--ds-destructive) 25%, transparent); }
.now.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--ds-warning) 25%, transparent); }
.now-m { flex: 1 1 280px; min-width: 0; }
.now-t { font-size: 14px; font-weight: 600; color: var(--ds-fg); }
.now-d { font-size: 13px; color: var(--ds-fg-muted); margin-top: 2px; }
.now-r { margin-left: auto; display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; }
.stat .k { font-size: 11px; color: var(--ds-fg-muted); }
.stat .v { font-size: 14px; font-weight: 600; color: var(--ds-fg); }

.grid { margin-top: 20px; display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.rail { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.full { margin-top: 20px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; gap: 6px 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 18px; font-size: 13px; color: var(--ds-fg); min-width: 0; }
.rows > li + li { border-top: 1px solid var(--ds-border); }
.rows .r { margin-left: auto; font-size: 12px; color: var(--ds-fg-muted); text-align: right; }
a.r:hover { color: var(--ds-accent); text-decoration: none; }
.rows .s { font-size: 12px; color: var(--ds-fg-muted); margin-top: 2px; line-height: 1.45; }
.rows .grow { flex: 1 1 120px; min-width: 0; }
.sub-h { font-size: 13px; color: var(--ds-fg-muted); padding: 10px 18px 6px; border-top: 1px solid var(--ds-border); }
.card-b + .rows, .sub-h + .rows { border-top: 0; }

.kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv3 > div { padding: 12px 18px; min-width: 0; }
.kv3 > div + div { border-left: 1px solid var(--ds-border); }
/* D-837: the system facts as one horizontal strip at the foot of the home page; wraps on a phone */
/* D-837: the home page's system footer, one column per fact; the 1 px gap over the border
   colour draws the dividers at any column count */
.sysfoot { margin-top: 20px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--ds-border); border: 1px solid var(--ds-border); border-radius: 12px; overflow: hidden; min-width: 0; }
.sysfoot > div { background: var(--ds-bg-elevated); padding: 12px 16px; min-width: 0; }
.sysfoot .k { font-size: 11.5px; color: var(--ds-fg-muted); }
.sysfoot .v { font-size: 14px; font-weight: 600; color: var(--ds-fg); margin-top: 3px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.sysfoot .v.mono, .sysfoot .v .mono { font-size: 13px; }
.sysfoot .s { font-size: 12px; color: var(--ds-fg-muted); margin-top: 2px; overflow-wrap: anywhere; }
/* D-829 step 72: the press that brings prod's latest pool snapshots into dev */
.sysfoot .dd-form { margin-top: 6px; }
/* D-829 step 72: seven facts — four a row on a tablet, two on a phone, the seventh spans two so no cell is empty */
@media (max-width: 960px) { .sysfoot { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sysfoot > div:nth-child(7):last-child { grid-column: span 2; } }
@media (max-width: 520px) { .sysfoot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kv3 .k { font-size: 11.5px; color: var(--ds-fg-muted); }
.kv3 .v { font-size: 18px; font-weight: 700; color: var(--ds-fg); margin-top: 2px; }
/* in the rail a figure never breaks in two ($18.79 split on 2026-11-13's live data) */
.rail .kv3 > div { padding: 12px 14px; }
.rail .kv3 .v { font-size: 16px; white-space: nowrap; }

.seg { display: inline-flex; flex-wrap: wrap; background: var(--ds-bg-muted); border-radius: 8px; padding: 2px; gap: 2px; max-width: 100%; }
.seg a, .seg button { border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ds-fg-muted); padding: 5px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--ds-fg); }
.seg [aria-pressed="true"], .seg [aria-current] { background: var(--ds-bg-elevated); color: var(--ds-fg); box-shadow: var(--ds-shadow-sm); }

.banner { border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; border: 1px solid var(--ds-border); background: var(--ds-bg-muted); font-size: 13.5px; }
.banner.ok { background: var(--good-soft); color: var(--good); border-color: transparent; }
.banner.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---- Home -------------------------------------------------------------------------------- */
.need { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 18px; }
.need + .need { border-top: 1px solid var(--ds-border); }
.need.blocked { box-shadow: inset 3px 0 0 var(--ds-destructive); }
.need .body { flex: 1 1 300px; min-width: 0; }
.need .t1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.need .ttl { font-size: 14px; font-weight: 600; color: var(--ds-fg); margin-top: 4px; line-height: 1.4; display: block; }
.need a.ttl:hover { color: var(--ds-accent); text-decoration: none; }
.need .why { font-size: 13px; color: var(--ds-fg-muted); margin-top: 3px; line-height: 1.5; }
.need .act { flex: none; max-width: 100%; }
table.mx { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.mx th { text-align: right; font-size: 11.5px; font-weight: 600; color: var(--ds-fg-muted); padding: 10px 12px; border-bottom: 1px solid var(--ds-border); }
.mx th:first-child, .mx td:first-child { text-align: left; width: 30%; }
.mx td { padding: 10px 12px; border-bottom: 1px solid var(--ds-border); text-align: right; color: var(--ds-fg); font-family: var(--mono); font-size: 12.5px; }
.mx td:first-child { font-family: var(--ui); font-size: 13px; }
.mx td:first-child b { font-family: var(--mono); font-size: 12px; margin-right: 6px; }
.mx td a { color: var(--ds-fg); }
.mx td a:hover { color: var(--ds-accent); }
.mx .z { color: var(--ds-border-strong); }
.mx .open { font-weight: 700; }
.mx .div { border-left: 1px solid var(--ds-border); }
.mx tfoot td { border-bottom: 0; font-weight: 700; background: var(--ds-bg-muted); }
.mx tr.dim td { color: var(--ds-fg-muted); }
.bar { display: inline-block; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ds-accent) 35%, transparent); vertical-align: middle; margin-right: 8px; max-width: calc(100% - 34px); }
.lane .nm { font-family: var(--mono); font-size: 12.5px; }

/* ---- Board ------------------------------------------------------------------------------- */
.toolbar { margin-top: 20px; display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; }
.toolbar .note { font-size: 12.5px; color: var(--ds-fg-muted); margin-left: auto; }
/* the proposal's columns sat in a sideways-scrolling row; here they wrap into rows instead */
.board { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 12px; align-items: start; }
.board.single { grid-template-columns: 1fr; }
.board.single .col-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 10px; }
.col { background: var(--ds-bg-muted); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-cards { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.col-h h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ds-fg); }
.col-h .n { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); }
.col-h .dot { width: 8px; height: 8px; }
.col-h .dot.s-accepted, .col-h .dot.s-hand { background: var(--ds-accent); }
.col-h .dot.s-queued { background: var(--ds-warning); } .col-h .dot.s-running { background: var(--live); }
.col-h .dot.s-blocked { background: var(--ds-destructive); } .col-h .dot.s-pr { background: var(--live); }
.col-h .dot.s-ready, .col-h .dot.s-closed { background: var(--ds-success); } .col-h .dot.s-draft { background: var(--ds-fg-subtle); }
.col-note { font-size: 12.5px; color: var(--ds-fg-muted); line-height: 1.5; padding: 0 6px 4px; }
.col.folded { background: transparent; border: 1px dashed var(--ds-border-strong); }
.col.folded .col-h h2 { color: var(--ds-fg-muted); }
.fold-list { list-style: none; margin: 0; padding: 0 6px; }
.fold-list li { font-size: 13px; color: var(--ds-fg-muted); padding: 7px 0; }
.fold-list li + li { border-top: 1px solid var(--ds-border); }
.fold-list summary { display: flex; justify-content: space-between; gap: 8px; }
.fold-list p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.more { font-size: 12.5px; padding: 0 6px; }

.dc { background: var(--ds-bg-elevated); border: 1px solid var(--ds-border); border-radius: 10px; padding: 12px 14px; box-shadow: var(--ds-shadow-sm); min-width: 0; }
.dc:hover { border-color: var(--ds-border-strong); }
.dc .t1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dc .t1 .when { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ds-fg-muted); }
.dc .ttl { font-size: 13.5px; font-weight: 600; color: var(--ds-fg); margin-top: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc a.ttl:hover { text-decoration: none; color: var(--ds-accent); }
.dc .st { font-size: 12.5px; color: var(--ds-fg-muted); margin-top: 8px; line-height: 1.5; }
.dc .st.warn { color: var(--warn); } .dc .st.good, .dc .st.ok { color: var(--good); } .dc .st.bad { color: var(--bad); } .dc .st.live { color: var(--live); }
.dc .meta-l { font-size: 11.5px; color: var(--ds-fg-muted); margin-top: 8px; }
.dc .act { margin-top: 10px; }
.dc .act .btn { width: 100%; }
.prog { display: grid; gap: 3px; margin-top: 10px; }
.prog span { height: 4px; border-radius: 999px; background: var(--ds-border); }
.prog .d { background: var(--ds-success); }
.dc.blocked { box-shadow: inset 3px 0 0 var(--ds-destructive), var(--ds-shadow-sm); }
.reason { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ds-fg); background: var(--bad-soft); border-radius: 7px; padding: 8px 10px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.chips .tag { min-height: 20px; font-size: 11.5px; }
.dc.closed { padding: 10px 12px; box-shadow: none; }
.dc.closed .ttl { font-size: 13px; font-weight: 500; margin-top: 4px; }

/* ---- Backlog ----------------------------------------------------------------------------- */
.bl-tools { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--ds-border); }
.search { flex: 1 1 200px; max-width: 320px; min-width: 0; height: 32px; border: 1px solid var(--ds-border-strong); border-radius: 7px; padding: 0 10px; font-size: 13px; background: var(--ds-bg-elevated); color: var(--ds-fg); }
.search::placeholder { color: var(--ds-fg-muted); }
.bl-tools .count { margin-left: auto; font-size: 12.5px; color: var(--ds-fg-muted); }
.bl-h, .bl-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px 64px 52px 64px minmax(0, max-content); gap: 14px; align-items: center; padding: 11px 18px; }
.bl-h { font-size: 11.5px; color: var(--ds-fg-muted); border-bottom: 1px solid var(--ds-border); padding-top: 9px; padding-bottom: 8px; }
.bl-row + .bl-row, .grp-h + .bl-row { border-top: 1px solid var(--ds-border); }
.bl-row:hover { background: var(--ds-bg-muted); }
.bl-row .ttl { font-size: 13.5px; color: var(--ds-fg); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-row a.ttl:hover { color: var(--ds-accent); text-decoration: none; }
.bl-row .tags { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.bl-row .tags .tag { min-height: 19px; font-size: 11px; }
.bl-row .c { font-size: 12.5px; color: var(--ds-fg-muted); }
.bl-row .c.mono { font-size: 12px; }
.risk-high { color: var(--bad) !important; font-weight: 600; }
.risk-medium { color: var(--warn) !important; }
.bl-row .act { text-align: right; min-width: 0; }
.bl-row .act .btn { opacity: .55; }
.bl-row:hover .act .btn, .bl-row .act .btn:focus-visible { opacity: 1; }
.grp-h { display: flex; gap: 10px; align-items: baseline; padding: 9px 18px; font-size: 12px; font-weight: 600; color: var(--ds-fg); background: var(--ds-bg-muted); border-top: 1px solid var(--ds-border); }
.grp-h:first-child { border-top: 0; }
.grp-h span { font-weight: 500; color: var(--ds-fg-muted); }
.dist { list-style: none; margin: 0; padding: 8px 0; }
.dist li { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 5px 18px; font-size: 13px; color: var(--ds-fg); }
.dist .b { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ds-accent) 35%, transparent); }
.dist .n { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--ds-fg-muted); }

/* ---- Agents & Forge ---------------------------------------------------------------------- */
.sysbar { margin-top: 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sysbar > div { padding: 14px 18px; min-width: 0; }
.sysbar > div + div { border-left: 1px solid var(--ds-border); }
.sysbar .k { font-size: 11.5px; color: var(--ds-fg-muted); }
.sysbar .v { font-size: 16px; font-weight: 700; color: var(--ds-fg); margin-top: 3px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.sysbar .s { font-size: 12px; color: var(--ds-fg-muted); margin-top: 2px; }
.ag summary, .ag-h { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px 70px 14px; gap: 14px; align-items: center; padding: 12px 18px; }
.ag-h { font-size: 11.5px; color: var(--ds-fg-muted); padding-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ds-border); }
.ag details + details { border-top: 1px solid var(--ds-border); }
.ag summary:hover { background: var(--ds-bg-muted); }
.ag .nm { font-size: 14px; font-weight: 600; color: var(--ds-fg); }
.ag .tr { font-size: 12.5px; color: var(--ds-fg-muted); margin-top: 2px; }
.ag .last { font-size: 13px; color: var(--ds-fg); min-width: 0; }
.ag .num { font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); text-align: right; }
.ag .body { padding: 2px 18px 16px; font-size: 13px; line-height: 1.6; color: var(--ds-fg-muted); max-width: 760px; }
.ag .body b { color: var(--ds-fg); }
.grp { padding: 9px 18px; font-size: 11.5px; font-weight: 600; color: var(--ds-fg-muted); background: var(--ds-bg-muted); border-bottom: 1px solid var(--ds-border); }
.grp:not(:first-child) { border-top: 1px solid var(--ds-border); }
.rr-h, .rr { display: grid; grid-template-columns: 14px minmax(0, 1.4fr) minmax(0, 1fr) 100px 84px 92px; gap: 12px; align-items: center; padding: 10px 18px; font-size: 13px; }
.rr-h { font-size: 11.5px; color: var(--ds-fg-muted); border-bottom: 1px solid var(--ds-border); padding-bottom: 8px; }
.rr + .rr { border-top: 1px solid var(--ds-border); }
.rr .who { font-weight: 600; color: var(--ds-fg); }
.rr .ml { font-family: var(--mono); font-size: 11.5px; color: var(--ds-fg-muted); margin-top: 1px; }
.rr .num { font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); text-align: right; }
.rr .oc { text-align: right; }
.ar { text-align: right; }

/* ---- demand page ------------------------------------------------------------------------- */
.plan-bar { display: grid; gap: 4px; padding: 14px 18px 0; }
.plan-bar span { height: 5px; border-radius: 999px; background: var(--ds-border); }
.plan-bar .done { background: var(--ds-success); } .plan-bar .built { background: color-mix(in srgb, var(--ds-success) 40%, transparent); } .plan-bar .live { background: var(--live); } .plan-bar .bad { background: var(--ds-destructive); }
.steps { padding: 6px 0; }
.steps details + details { border-top: 1px solid var(--ds-border); }
.steps summary { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto 14px; gap: 10px; align-items: start; padding: 11px 18px; }
.steps summary:hover { background: var(--ds-bg-muted); }
.steps summary .check { margin-top: 2px; }
.steps .n { font-size: 12px; color: var(--ds-fg-muted); padding-top: 1px; }
.steps .nm { font-size: 14px; font-weight: 600; color: var(--ds-fg); }
.steps .wh { font-size: 13px; color: var(--ds-fg-muted); margin-top: 2px; line-height: 1.5; }
.steps .pending .nm { color: var(--ds-fg-muted); font-weight: 500; }
.steps .next > summary { background: color-mix(in srgb, var(--ds-accent) 4%, transparent); }
.steps .right { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.sbody { padding: 2px 18px 16px 78px; min-width: 0; }
.crit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.crit li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--ds-fg); padding: 8px 0; border-bottom: 1px solid var(--ds-border); line-height: 1.45; min-width: 0; }
.crit li > .t { flex: 1 1 auto; min-width: 0; }
.crit li.done > .t { color: var(--ds-fg-muted); }
.crit .box { width: 13px; height: 13px; border: 1.5px solid var(--ds-border-strong); border-radius: 3px; flex-shrink: 0; transform: translateY(2px); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.crit li.done .box { background: var(--ds-success); border-color: var(--ds-success); }
.crit input[type=checkbox] { margin: 0; transform: translateY(2px); flex: none; width: 15px; height: 15px; }
/* 2026-11-15: an open criterion's whole line is its label: a click on the text toggles the box */
.crit li > .crit-l { display: flex; gap: 10px; align-items: baseline; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.crit li > .crit-l > .t { flex: 1 1 auto; min-width: 0; }
.crit li.open:hover { background: var(--ds-bg-muted); }
.closer-note { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 12px 0 0; font-size: 12.5px; color: var(--ds-fg-muted); }
.crit .you { font-size: 11px; font-weight: 600; color: var(--ds-accent); padding-left: 8px; white-space: nowrap; }
.crit .proof { font-size: 11px; color: var(--ds-fg-muted); padding-left: 8px; white-space: nowrap; }
/* D-829 step 73: a You line opens its proof in one click, or says none is named */
.crit .ev { font-size: 11px; padding-left: 8px; white-space: nowrap; }
.crit .ev.none { color: var(--ds-fg-muted); font-style: italic; }
.accept-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; }
.accept-row .note { font-size: 12.5px; color: var(--ds-fg-muted); flex: 1 1 240px; }
.needs-card { border-left: 3px solid var(--ds-warning); }
.needs-card.bad { border-left-color: var(--ds-destructive); }
.needs-card .card-b { font-size: 13px; line-height: 1.55; color: var(--ds-fg-muted); }
.needs-card .card-b b { color: var(--ds-fg); }
.needs-card .item + .item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ds-border); }
.needs-card .item .go { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Agent progress (D-818's stepper, D-831's card) */
.ap .card-h .aside a { color: var(--ds-fg-muted); text-decoration: underline; }
.ap-phases { list-style: none; margin: 0; padding: 14px 18px 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-phases li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 8px; background: var(--ds-bg-muted); font-size: 12.5px; min-width: 0; }
.ap-phases li.current { background: var(--live-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 30%, transparent); }
.ap-phases li.failed { background: var(--bad-soft); }
.ap-phases .name { font-weight: 600; color: var(--ds-fg); }
.ap-phases .dur, .ap-phases .t { font-family: var(--mono); font-size: 11.5px; color: var(--ds-fg-muted); }
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); margin: 10px 18px 0; border: 1px solid var(--ds-border); border-radius: 10px; overflow: hidden; }
.ap-stats > div { padding: 10px 14px; min-width: 0; box-shadow: -1px 0 0 var(--ds-border), 0 -1px 0 var(--ds-border); }
.ap-stats .k { font-size: 11.5px; color: var(--ds-fg-muted); }
.ap-stats .v { font-size: 15px; font-weight: 700; color: var(--ds-fg); margin-top: 2px; font-family: var(--mono); }
.ap-stats .v small { font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--ds-fg-muted); }
.ap-stats .v.warn { color: var(--warn); }
.ap-bar { display: block; height: 5px; border-radius: 999px; background: var(--ds-border); overflow: hidden; margin-top: 6px; }
.ap-bar span { display: block; height: 100%; background: var(--ds-accent); }
.ap-now { margin: 12px 18px 0; padding: 10px 12px; border-radius: 8px; background: var(--live-soft); font-size: 12.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.ap-now .k { font-weight: 600; color: var(--live); }
.ap-now .a { font-family: var(--mono); font-size: 12px; color: var(--ds-fg); min-width: 0; overflow-wrap: anywhere; }
.ap-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 20px; padding: 12px 18px 16px; }
.ap-cols h3 { margin: 6px 0 6px; font-size: 12px; font-weight: 600; color: var(--ds-fg-muted); }
.ap-list { list-style: none; margin: 0; padding: 0; }
.ap-list li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--ds-border); font-size: 12px; min-width: 0; }
.ap-list li:first-child { border-top: 0; }
.ap-list .verb { flex: none; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 5px; background: var(--ds-bg-muted); color: var(--ds-fg-muted); min-width: 42px; text-align: center; }
.ap-list .verb.edit { background: var(--ds-accent-soft); color: var(--ds-accent); }
.ap-list .verb.bash { background: var(--warn-soft); color: var(--warn); }
.ap-list .what { font-family: var(--mono); font-size: 12px; color: var(--ds-fg); min-width: 0; overflow-wrap: anywhere; }
.ap-empty { padding: 12px 18px 16px; font-size: 13px; color: var(--ds-fg-muted); }
/* D-832: a run's log — the job's phases and every tool call, one line each; it wraps, never scrolls */
.runlog { list-style: none; margin: 4px 0 0; padding: 0; }
.runlog > li { display: grid; grid-template-columns: 62px auto minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--ds-border); font-size: 12px; min-width: 0; }
.runlog > li:first-child { border-top: 0; }
.runlog .t { color: var(--ds-fg-muted); font-size: 11.5px; }
.runlog .verb { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 5px; background: var(--ds-bg-muted); color: var(--ds-fg-muted); min-width: 42px; text-align: center; }
.runlog .verb.edit { background: var(--ds-accent-soft); color: var(--ds-accent); }
.runlog .verb.bash { background: var(--warn-soft); color: var(--warn); }
.runlog .what { font-family: var(--mono); font-size: 12px; color: var(--ds-fg); min-width: 0; overflow-wrap: anywhere; }
.runlog .d { font-size: 11px; color: var(--ds-fg-muted); white-space: nowrap; }
.runlog li.err .what { color: var(--bad); }
.runlog li.ph { grid-template-columns: 62px 10px minmax(0, 1fr); }
.runlog li.ph .ptext { font-weight: 600; color: var(--ds-fg); }
.runlog li.ph .dot { align-self: center; }
.runlog.earlier .t { text-align: center; }
.runlog-h { font-size: 12.5px; color: var(--ds-fg-muted); margin-top: 10px; }
.ap-more { margin-top: 6px; }
.ap-more > summary { font-size: 12.5px; color: var(--ds-accent); padding: 6px 0; }
@media (max-width: 420px) {
  /* the time stays on the line; the error tag and the duration go under the target */
  .runlog > li { grid-template-columns: 60px auto minmax(0, 1fr); gap: 6px; }
  .runlog > li .t { font-size: 11px; }
  .runlog > li > .tag, .runlog > li > .d { grid-column: 3; justify-self: start; }
  .runlog li.ph { grid-template-columns: 60px 10px minmax(0, 1fr); }
}

/* history & details tabs */
.hist { margin-top: 20px; scroll-margin-top: 70px; }
.htabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--ds-border); }
.htab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 10px; font-size: 13px; font-weight: 600; color: var(--ds-fg-muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.htab:hover { color: var(--ds-fg); }
.htab[aria-selected="true"] { color: var(--ds-fg); border-bottom-color: var(--ds-accent); }
.htab .ct { font-size: 11px; font-weight: 600; color: var(--ds-fg-muted); background: var(--ds-bg-muted); border-radius: 5px; padding: 0 6px; }

.runs-h, .runs summary { display: grid; grid-template-columns: 14px minmax(0, 1.6fr) 100px 74px 52px 64px 96px 14px; gap: 12px; align-items: center; padding: 10px 18px; font-size: 13px; }
.runs-h { font-size: 11.5px; color: var(--ds-fg-muted); border-bottom: 1px solid var(--ds-border); padding-bottom: 8px; }
.runs details + details { border-top: 1px solid var(--ds-border); }
.runs summary:hover { background: var(--ds-bg-muted); }
.runs .who { font-weight: 600; color: var(--ds-fg); }
.runs .sub { font-size: 12px; color: var(--ds-fg-muted); margin-top: 1px; }
.runs .num { font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); text-align: right; }
.runs .num.l { text-align: left; }
.runs .num, .rr .num { white-space: nowrap; }
.rr .num .w { display: block; font-size: 11px; color: var(--ds-fg-subtle); white-space: normal; }
.runs .oc { text-align: right; }
.rbody { padding: 4px 18px 16px 44px; font-size: 13px; color: var(--ds-fg); min-width: 0; }
.rbody > div + div { margin-top: 8px; }
.logline { font-family: var(--mono); font-size: 12px; background: var(--ds-bg-muted); border: 1px solid var(--ds-border); border-radius: 8px; padding: 10px 12px; color: var(--ds-fg); overflow-wrap: anywhere; }
.logline .k { color: var(--ds-fg-muted); }
.quote { font-size: 13px; line-height: 1.55; color: var(--ds-fg); border-left: 3px solid var(--ds-warning); padding: 2px 0 2px 12px; }
.rlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }

.tl { list-style: none; margin: 0; padding: 10px 0; }
.tl li { display: grid; grid-template-columns: 96px 14px minmax(0, 1fr) auto; gap: 10px; padding: 7px 18px; font-size: 13px; }
.tl .t { font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); }
.tl .m { padding-top: 6px; }
.tl .ti { color: var(--ds-fg); font-weight: 600; }
.tl .de { color: var(--ds-fg-muted); font-size: 12.5px; margin-top: 1px; line-height: 1.45; }
.tl .c { font-family: var(--mono); font-size: 12px; color: var(--ds-fg-muted); }
.tl .you .ti { color: var(--ds-accent); }

.qs .grp-q { padding: 9px 18px; font-size: 11.5px; font-weight: 600; color: var(--ds-fg-muted); background: var(--ds-bg-muted); border-bottom: 1px solid var(--ds-border); }
.qs .grp-q:not(:first-child) { border-top: 1px solid var(--ds-border); }
.qs details + details { border-top: 1px solid var(--ds-border); }
.qs summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; gap: 12px; padding: 11px 18px; align-items: start; }
.qs summary:hover { background: var(--ds-bg-muted); }
.qs .q { font-size: 13px; color: var(--ds-fg-muted); }
.qs .a { font-size: 13.5px; color: var(--ds-fg); font-weight: 600; margin-top: 2px; }
.qs .a.open { color: var(--warn); }
.qs .qr { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; color: var(--ds-fg-muted); }
.qbody { padding: 0 18px 14px; }
.opt { display: flex; gap: 8px; font-size: 13px; padding: 6px 10px; border-radius: 6px; color: var(--ds-fg-muted); align-items: baseline; flex-wrap: wrap; }
.opt.on { background: var(--ds-success-soft); color: var(--ds-fg); }
.opt .rec { margin-left: auto; font-size: 11.5px; color: var(--ds-accent); }
.qwhy { font-size: 12.5px; color: var(--ds-fg-muted); margin-top: 8px; line-height: 1.5; }

/* rendered markdown of the demand files (D-803) */
.prose { padding: 16px 18px 20px; font-size: 13.5px; line-height: 1.65; color: var(--ds-fg); min-width: 0; }
.prose.flush { padding: 0; }
.prose > :first-child { margin-top: 0; } .prose > :last-child { margin-bottom: 0; }
.prose h1 { font-size: 16px; margin: 18px 0 6px; } .prose h2 { font-size: 14px; font-weight: 700; margin: 20px 0 6px; }
.prose h3, .prose h4, .prose h5 { font-size: 13.5px; font-weight: 700; margin: 16px 0 6px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 8px; }
.prose ul, .prose ol { padding-left: 20px; } .prose li { margin: 2px 0; }
.prose ul.contains-task-list { list-style: none; padding-left: 4px; }
.prose .task-list-item-checkbox { margin: 0 6px 0 0; vertical-align: -1px; }
.prose pre { font: 12px/1.5 var(--mono); background: var(--ds-bg-muted); border: 1px solid var(--ds-border); padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre code { background: none; border: 0; padding: 0; }
/* a markdown table never widens its card: cells wrap, the table takes the width it is given */
.prose table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.prose th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ds-fg-muted); padding: 8px 10px; border-bottom: 1px solid var(--ds-border); vertical-align: bottom; }
.prose td { padding: 8px 10px; border-bottom: 1px solid var(--ds-border); vertical-align: top; line-height: 1.5; overflow-wrap: anywhere; }
.prose tr:last-child td { border-bottom: 0; }
.prose blockquote { border-left: 3px solid var(--ds-border-strong); padding-left: 10px; color: var(--ds-fg-muted); }
.prose a.dlink { font-family: var(--mono); font-size: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--ds-border); margin: 12px 0; }
.prose img { max-width: 100%; }
.note-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; color: var(--ds-fg); margin: 0 0 8px; }
.note-h .muted { font-weight: 500; font-size: 12px; }
.note-sep + .note-sep { border-top: 1px solid var(--ds-border); }

/* the questions form (D-817) — the operator's answers, kept as they work */
#questions form { padding: 4px 18px 16px; }
fieldset.q { border: 1px solid var(--ds-border); border-radius: 10px; padding: 10px 14px 12px; margin: 12px 0 0; min-width: 0; }
fieldset.q.blocking { border-color: color-mix(in srgb, var(--ds-destructive) 45%, var(--ds-border)); }
fieldset.q.answered { background: var(--ds-bg-muted); }
fieldset.q legend { font-weight: 600; font-size: 13.5px; line-height: 1.4; padding: 0 6px; max-width: 100%; }
fieldset.q legend .q-id { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--ds-fg-muted); margin-right: 8px; }
.q-opt { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; padding: 7px 0; border-top: 1px solid var(--ds-border); font-size: 13px; line-height: 1.45; }
.q-opt:first-of-type { border-top: none; }
.q-opt input[type=radio] { margin: 4px 0 0; }
.q-opt.rec .q-text { font-weight: 500; }
.q-opt .q-why { grid-column: 2; font-size: 12px; color: var(--ds-fg-muted); }
.q-opt input[type=text] { font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--ds-border-strong); border-radius: 6px; width: min(420px, 100%); margin-top: 4px; background: var(--ds-bg-elevated); }
.q-answer { font-size: 13px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 14px; }
.q-actions .why { font-size: 12.5px; color: var(--ds-fg-muted); flex: 1 1 240px; }

/* ---- the confirmation sheet ---------------------------------------------------------------- */
.sheet { position: fixed; inset: 0; background: rgba(10, 14, 20, .45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.sheet .box { background: var(--ds-bg-elevated); border: 1px solid var(--ds-border-strong); border-radius: 12px; padding: 18px 18px 16px; max-width: 460px; width: 100%; display: grid; gap: 12px; box-shadow: var(--ds-shadow); }
.sheet h3 { margin: 0; font-size: 15px; }
.sheet p { margin: 0; color: var(--ds-fg-muted); font-size: 13px; }
.sheet .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sheet .opt-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ds-fg); line-height: 1.4; }
.sheet .opt-row input { margin-top: 3px; flex: none; }
.sheet .opt-row .opt-t { flex: 1; min-width: 0; } /* one text flow: a link inside stays in the line (D-837) */
.sheet .field { display: grid; gap: 4px; font-size: 12.5px; color: var(--ds-fg-muted); margin: 8px 0; }
.sheet .field textarea, .sheet .field input[type="text"] { width: 100%; font-size: 13px; color: var(--ds-fg); background: var(--ds-bg-elevated); border: 1px solid var(--ds-border-strong); border-radius: 6px; padding: 6px 8px; }

/* ---- sign-in and error pages --------------------------------------------------------------- */
/* the login card keeps the card's side padding (its old `padding: 48px 0` came after .card-b and
   set the sides to zero: the text touched the border, seen on 2026-11-13) */
.login { max-width: 480px; margin: 40px auto 0; padding: 28px 28px 30px; display: grid; gap: 16px; }
.login h1 { margin: 0; font-size: 22px; }
.login p { color: var(--ds-fg-muted); margin: 0; line-height: 1.5; }

/* ---- responsive ------------------------------------------------------------------------------ */
@media (max-width: 960px) {
  .sysbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sysbar > div:nth-child(odd) { border-left: 0; }
  .sysbar > div:nth-child(n+3) { border-top: 1px solid var(--ds-border); }
  .ag-h, .rr-h { display: none; }
  .ag summary { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .ag .hide-md, .rr .hide-md { display: none; }
  .rr { grid-template-columns: 14px minmax(0, 1fr) auto; }
}
@media (max-width: 900px) {
  .rail { max-width: none; }
  .now-r { margin-left: 0; }
  .crit { grid-template-columns: 1fr; }
  .runs-h { display: none; }
  .runs summary { grid-template-columns: 14px minmax(0, 1fr) auto 14px; }
  .runs .hide-md { display: none; }
  .sbody, .rbody { padding-left: 18px; }
  .bl-h { display: none; }
  .bl-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, max-content); }
  .bl-row .hide-md { display: none; }
  .ap-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top-in { padding: 8px 16px 6px; gap: 6px 12px; }
  .nav { order: 5; width: calc(100% + 20px); margin: 0 -10px; }
  .nav .full { display: none; } .nav .short { display: inline; }
  .sys .hide-sm { display: none; }
  .page { padding: 18px 16px 48px; }
  .hd h1 { font-size: 22px; }
  .login { margin-top: 16px; padding: 22px 20px 24px; }
  .mx .hide-sm { display: none; }
  .mx th:first-child, .mx td:first-child { width: auto; }
  .tl li { grid-template-columns: 70px 12px minmax(0, 1fr); }
  .tl .c { grid-column: 3; }
  .kv3 > div { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .steps summary { grid-template-columns: 18px 22px minmax(0, 1fr) 14px; }
  .steps .right { grid-column: 3; justify-content: flex-start; }
  .sbody { padding-left: 18px; }
  .qs summary { grid-template-columns: minmax(0, 1fr) 14px; }
  .qs .qr { grid-column: 1; justify-content: flex-start; }
  .rbody { padding-left: 14px; padding-right: 14px; }
}

/* D-836: the Ask page */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ask-h1 { overflow-wrap: anywhere; }
.ask-form { padding: 14px 18px 16px; display: grid; gap: 10px; min-width: 0; }
.ask-form textarea { width: 100%; min-height: 96px; resize: vertical; font-size: 14px; line-height: 1.5; color: var(--ds-fg); background: var(--ds-bg-elevated); border: 1px solid var(--ds-border-strong); border-radius: 8px; padding: 10px 12px; }
.ask-form textarea:focus { outline: 2px solid var(--ds-accent-soft); border-color: var(--ds-accent); }
.ask-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ask-row .note { margin-right: auto; font-size: 12.5px; min-width: 0; }
.rows a.ask-link { color: var(--ds-fg); font-weight: 500; overflow-wrap: anywhere; }
/* D-846: the demand page's "Ask about D-NNN" */
.demand-ask-lede { margin: 0; padding: 12px 18px 0; font-size: 13px; line-height: 1.5; }
.demand-ask .ask-form textarea { min-height: 64px; }
/* D-846 step 02: the chat stays on the demand page — the thread inside the card, the earlier
   conversations below it, opened in place */
/* 2026-11-15 (operator: "fă o înălțime fixă pe istoricul chatului cu scroll vertical"): the thread
   scrolls inside its box, the page keeps its length; the box is the turns' offsetParent */
.demand-chat .ask-thread { position: relative; margin: 14px 18px 12px; padding: 12px; max-height: min(62vh, 680px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; border: 1px solid var(--ds-border); border-radius: 12px; }
.demand-chat .ask-a { box-shadow: none; }
.demand-chat-act { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 0 18px 14px; font-size: 12.5px; min-width: 0; }
.demand-hist { border-top: 1px solid var(--ds-border); padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.demand-hist-h { font-size: 12.5px; font-weight: 600; color: var(--ds-fg); }
details.demand-hist-c { border: 1px solid var(--ds-border); border-radius: 10px; background: var(--ds-bg-elevated); min-width: 0; }
details.demand-hist-c > summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 9px 12px; cursor: pointer; font-size: 13px; color: var(--ds-fg); list-style: none; min-width: 0; }
details.demand-hist-c > summary::-webkit-details-marker { display: none; }
details.demand-hist-c > summary .grow { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
details.demand-hist-c > summary .r { margin-left: auto; font-size: 12px; color: var(--ds-fg-muted); }
details.demand-hist-c[open] > summary { border-bottom: 1px solid var(--ds-border); }
.demand-hist-b { display: flex; flex-direction: column; gap: 14px; padding: 12px; min-width: 0; max-height: min(62vh, 680px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.demand-hist-b .demand-chat-act { padding: 0; }
.demand-hist-turn { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* D-829 step 79: a proposed note's card */
.ask-note .ask-text { white-space: pre-wrap; }
.ask-note-go { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-note-path { font-size: 12.5px; margin-top: 8px; }
.ask-thread { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ask-q { align-self: flex-end; max-width: min(640px, 92%); min-width: 0; background: var(--ds-accent-soft); border-radius: 12px 12px 4px 12px; padding: 10px 14px; }
.ask-who { font-size: 11.5px; color: var(--ds-fg-muted); margin-bottom: 2px; }
.ask-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; color: var(--ds-fg); }
.ask-a .prose code { overflow-wrap: anywhere; }
.ask-err { margin: 0; padding: 10px 18px; font-size: 13px; color: var(--bad); border-top: 1px solid var(--ds-border); overflow-wrap: anywhere; }
.ask-err.flush { padding: 10px 0 0; border-top: 0; }
.ask-tools { border-top: 1px solid var(--ds-border); padding: 8px 18px 10px; min-width: 0; }
.ask-tools > summary { cursor: pointer; font-size: 12.5px; color: var(--ds-fg-muted); }
.ask-prop .card-b h3 { margin: 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ask-prop .card-b h4 { margin: 14px 0 4px; font-size: 12px; font-weight: 600; color: var(--ds-fg-muted); }
.ask-prop .card-b p, .ask-prop .card-b ul { margin: 0; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ask-prop .card-b ul { padding-left: 18px; }
.ask-prop-m { margin-top: 2px !important; font-size: 12px !important; }
.ask-prop-go { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px 14px; border-top: 1px solid var(--ds-border); }
.ask-prop .opt-row { display: flex; gap: 8px; align-items: flex-start; margin-right: auto; font-size: 12.5px; line-height: 1.4; color: var(--ds-fg); min-width: 0; }
.ask-prop .opt-row input { margin-top: 3px; }
/* D-838: the Prod reads card */
.ask-prod { display: grid; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--ds-fg); min-width: 0; }
.ask-prod p { margin: 0; overflow-wrap: anywhere; }
.ask-prod p.muted { font-size: 12.5px; }
.ask-prod form { margin-top: 2px; }
/* D-836: the Enter hint beside Ask */
.ask-keys { font-size: 11.5px; white-space: nowrap; }
@media (pointer: coarse) { .ask-keys { display: none; } }
/* 2026-11-14: the demand header — title and buttons on one row, a one-sentence lede, the
   rest of the Problem folded */
.hd-demand .hd-l { flex: 1 1 100%; }
.hd-demand .hd-row { display: flex; gap: 10px 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; min-width: 0; }
.hd-demand .hd-row h1 { flex: 999 1 420px; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.hd-demand .hd-row .hd-r { flex: 0 1 auto; justify-content: flex-end; }
.lede-more { margin-top: 6px; max-width: 780px; min-width: 0; }
.lede-more > summary { cursor: pointer; font-size: 13px; color: var(--ds-accent); width: max-content; max-width: 100%; }
.lede-more[open] > summary { margin-bottom: 6px; }
.lede-more .prose { font-size: 13.5px; color: var(--ds-fg-muted); overflow-wrap: anywhere; }
/* 2026-11-14: a closed demand's outcome on top of its page */
.now.outcome { border-left: 4px solid var(--ds-border-strong); }
.now.outcome.good { border-left-color: var(--good); }
.now.outcome.info { border-left-color: var(--ds-accent); }

/* operator, 2026-11-14: the run card and Agent progress sit in the main column, under the plan */
.main > #progress { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.main > #progress > .now, .main > #progress > .full { margin-top: 0; }

/* operator, 2026-11-14: one status card under the header — the run now, its phases, the PR's
   chain after it, the next move */
.now.status { display: block; }
.status .sc-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.status .now-r small { font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--ds-fg-muted); }
.chain { list-style: none; margin: 12px 0 0; padding: 0 0 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-width: 0; }
.chain li { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: var(--ds-bg-muted); font-size: 12.5px; min-width: 0; max-width: 100%; }
.chain li + li::before { content: "→"; position: absolute; left: -14px; color: var(--ds-fg-muted); font-size: 11px; }
.chain li.lead { background: none; padding: 4px 0; color: var(--ds-fg-muted); font-size: 12px; }
.chain li.lead + li::before { content: none; }
.chain .name { font-weight: 600; color: var(--ds-fg); overflow-wrap: anywhere; }
.chain .dur { font-family: var(--mono); font-size: 11.5px; color: var(--ds-fg-muted); }
.chain li.c-now { background: var(--live-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 30%, transparent); }
.chain li.c-bad { background: var(--bad-soft); }
.chain li.c-next { background: none; box-shadow: inset 0 0 0 1px var(--ds-border); }
.chain li.c-next .name, .chain li.c-stale .name { color: var(--ds-fg-muted); font-weight: 500; }
.chain li.c-next .dot { background: none; box-shadow: inset 0 0 0 1.5px var(--ds-border-strong); }
.status .sc-next { margin: 12px 0 0 20px; font-size: 13px; color: var(--ds-fg-muted); }
.status .sc-next b { color: var(--ds-fg); }
.status .sc-ask { margin-top: 6px; overflow-wrap: anywhere; } /* D-829 step 60: the agent's own line */
.chain .name a, .chain li.lead a { color: inherit; text-decoration: none; }
.chain .name a:hover, .chain li.lead a:hover { text-decoration: underline; }

/* D-841: changing a saved answer, inside the Questions tab */
.q-change { margin-top: 10px; }
.q-change > summary { cursor: pointer; font-size: 12.5px; color: var(--ds-accent); list-style: none; }
.q-change form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; min-width: 0; }
.q-change .q-opt { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; min-width: 0; }
.q-change .q-text { overflow-wrap: anywhere; min-width: 0; }
.q-change textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
.q-change .row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 12px; }

/* D-720: Pulse Doctor's rows — an open row takes the whole line and never widens the page */
.doc-rows > li > details { flex: 1 1 100%; min-width: 0; }
.doc-rows summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; min-width: 0; }
.doc-rows .body { padding-top: 8px; min-width: 0; }
.doc-rows pre.sample { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; margin: 8px 0; font-family: var(--mono); font-size: 12px; background: var(--ds-bg-muted); border: 1px solid var(--ds-border); border-radius: 6px; padding: 8px 10px; }
.doc-rows .acts { display: flex; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.doc-rows .acts form { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
.doc-rows .acts .btn { white-space: normal; text-align: left; max-width: 100%; }
.doc-rail { padding: 12px 18px; font-size: 13px; }
.doc-what { padding: 0 18px 12px; margin: 0; font-size: 12.5px; color: var(--ds-fg-muted); border-bottom: 1px solid var(--ds-border); }
.doc-pressed { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; background: color-mix(in srgb, var(--ds-accent) 10%, transparent); color: var(--ds-fg); }
.doc-rail + .doc-rail { padding-top: 0; color: var(--ds-fg-muted); }

/* D-829 step 56: a question's context and what each option leads to */
.q-context { margin: 6px 0 10px; font-size: 13px; line-height: 1.5; color: var(--ds-fg-muted); overflow-wrap: anywhere; }
.q-effect { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--ds-fg-muted); overflow-wrap: anywhere; }
.qbody .opt .q-effect { margin-left: 0; }

.q-opt > .q-effect { grid-column: 2; }
/* D-720 step 09: the legend card and the Period calendar */
.doc-legend { margin: 0; padding: 10px 18px 14px 34px; font-size: 12.5px; color: var(--ds-fg-muted); display: flex; flex-direction: column; gap: 6px; }
.doc-legend b { color: var(--ds-fg); font-weight: 600; }
.cal { padding: 10px 14px 14px; min-width: 0; }
.cal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.cal-g { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12.5px; }
.cal-g th { font-weight: 500; font-size: 11px; color: var(--ds-fg-muted); padding: 2px 0 6px; }
.cal-g td { text-align: center; padding: 2px 0; }
.cal-g td > span, .cal-g td > a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ds-fg-muted); text-decoration: none; }
.cal-g td.out > span { opacity: .35; }
.cal-g td > a { color: var(--ds-fg); font-weight: 600; border: 2px solid transparent; }
.cal-g td > a.good { background: color-mix(in srgb, var(--ds-success) 18%, transparent); }
.cal-g td > a.warn { background: color-mix(in srgb, var(--ds-warning) 22%, transparent); }
.cal-g td > a.bad { background: color-mix(in srgb, var(--ds-destructive) 20%, transparent); }
.cal-g td.sel > a { border-color: var(--ds-accent); }
.cal-g td.today > span, .cal-g td.today > a { text-decoration: underline; text-underline-offset: 3px; }
.cal-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; font-size: 11.5px; color: var(--ds-fg-muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 5px; }
.cal-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-key i.good { background: color-mix(in srgb, var(--ds-success) 60%, transparent); }
.cal-key i.warn { background: color-mix(in srgb, var(--ds-warning) 70%, transparent); }
.cal-key i.bad { background: color-mix(in srgb, var(--ds-destructive) 65%, transparent); }

/* 2026-11-14: Ask reads as a chat — earlier turns folded, the follow-up box stuck to the bottom,
   the turns listed on the right */
.ask-turn { min-width: 0; }
details.ask-turn { scroll-margin-top: 110px; border: 1px solid var(--ds-border); border-radius: 12px; background: var(--ds-bg-elevated); }
details.ask-turn > summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; cursor: pointer; list-style: none; min-width: 0; }
details.ask-turn > summary::-webkit-details-marker { display: none; }
details.ask-turn[open] > summary { border-bottom: 1px solid var(--ds-border); }
.ask-n { flex: none; font-size: 12px; color: var(--ds-fg-muted); padding-top: 2px; }
.ask-sum { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ask-sq { font-size: 13.5px; font-weight: 600; color: var(--ds-fg); overflow-wrap: anywhere; }
.ask-sa { font-size: 12.5px; color: var(--ds-fg-muted); line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.ask-turn[open] .ask-sa { display: none; }
.ask-turn-b { display: flex; flex-direction: column; gap: 14px; padding: 12px; min-width: 0; }
.ask-turn.last { display: flex; flex-direction: column; gap: 14px; min-width: 0; scroll-margin-top: 110px; }
.ask-anchor { display: block; height: 0; scroll-margin-top: 110px; }
.ask-compose { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.35); }
.ask-compose .ask-form { padding: 10px 14px 12px; gap: 8px; }
.ask-compose .ask-form textarea { min-height: 48px; max-height: 32vh; transition: min-height .15s; }
.ask-compose .ask-form textarea:focus { min-height: 110px; }
.ask-jump { position: sticky; bottom: 150px; align-self: center; z-index: 6; }
.ask-refused { color: var(--bad); }
.ask-toc { list-style: none; margin: 0; padding: 4px 0; }
.ask-toc li a { display: flex; gap: 8px; padding: 6px 18px; font-size: 13px; color: var(--ds-fg); text-decoration: none; min-width: 0; }
.ask-toc li a:hover { background: var(--ds-bg-muted); }
.ask-toc li.live a { font-weight: 600; }
.ask-toc .mono { color: var(--ds-fg-muted); flex: none; }
.ask-toc .t { overflow-wrap: anywhere; min-width: 0; }

/* D-845: the Costs page — bars drawn by CSS, one colour per agent */
.ca1 { --c: #6366f1; } .ca2 { --c: #14b8a6; } .ca3 { --c: #f59e0b; } .ca4 { --c: #ec4899; }
.ca5 { --c: #0ea5e9; } .ca6 { --c: #8b5cf6; } .ca7 { --c: #84cc16; } .ca8 { --c: #f97316; }
.ca9 { --c: #22c55e; } .ca0 { --c: #94a3b8; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 6px; flex: none; }
.cost-periods { display: flex; gap: 6px; flex-wrap: wrap; align-self: flex-start; }
.cost-kpis { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); border: 1px solid var(--ds-border); border-radius: 12px; background: var(--ds-bg-elevated); overflow: hidden; }
.cost-kpis > div { padding: 12px 16px; min-width: 0; box-shadow: -1px 0 0 var(--ds-border), 0 -1px 0 var(--ds-border); }
.cost-kpis .k { font-size: 11.5px; color: var(--ds-fg-muted); }
.cost-kpis .v { font-size: 18px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.cost-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 18px 0; font-size: 12px; color: var(--ds-fg-muted); }
.cost-legend span { display: inline-flex; align-items: center; }
.cost-days { display: grid; gap: 4px; align-items: end; height: 220px; padding: 12px 18px 28px; min-width: 0; }
.cost-day { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.cost-col { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; border-radius: 4px 4px 0 0; overflow: hidden; }
.cost-col i { display: block; background: var(--c); width: 100%; flex: none; }
.cost-x { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ds-fg-muted); white-space: nowrap; }
.cost-bars { list-style: none; margin: 0; padding: 6px 18px 12px; display: grid; gap: 10px; }
.cost-bars li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 0; font-size: 13px; }
.cost-bars.agents li { grid-template-columns: minmax(0, 104px) minmax(0, 1fr) auto; }
.cost-bars .bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--ds-bg-muted); min-width: 2px; }
.cost-bars .bar i { display: block; height: 100%; background: var(--c); }
.cost-bars .n { display: inline-flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.cost-bars .r { text-align: right; white-space: nowrap; }
.cost-bars .s { grid-column: 2 / 4; font-size: 11.5px; color: var(--ds-fg-muted); }
.rows.plain li { font-size: 12.5px; color: var(--ds-fg-muted); }
.cost-models { margin: 0; padding: 8px 18px 12px; font-size: 12px; overflow-wrap: anywhere; }
.cost-kpis + .card { margin-top: 16px; }
.cost-days { padding-top: 26px; }
.cost-day .cost-t { position: absolute; left: 0; right: 0; font-size: 10.5px; color: var(--ds-fg-muted); text-align: center; white-space: nowrap; overflow: hidden; }
/* D-845: a spend figure opens the Costs page */
a.cost-link { color: var(--ds-accent); text-decoration: none; }  /* 2026-11-15: it must read as a link */
a.cost-link:hover { text-decoration: underline; }

/* D-854: On deck priorities — one column of cards; each row: place, the item, its presses */
.od { display: grid; gap: 16px; margin-top: 18px; min-width: 0; }
.od-add { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--ds-border); }
.od-add .search { max-width: none; }
.od-list { list-style: none; margin: 0; padding: 0; }
/* operator, 2026-11-16: the demand it came from and the demand it attaches to, each a column */
/* the presses' column has one width per section, so the From and Attach to columns line up */
#od-kept { --od-act: 310px; } #od-proposed, #od-linked { --od-act: 150px; } #od-history { --od-act: 70px; }
.od-h, .od-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 132px 150px var(--od-act, 200px); gap: 6px 14px; align-items: start; padding: 11px 18px; }
.od-row { scroll-margin-top: 110px; }
.od-h { font-size: 11.5px; color: var(--ds-fg-muted); border-bottom: 1px solid var(--ds-border); padding-top: 9px; padding-bottom: 8px; }
.od-hist .od-h, .od-hist .od-row { grid-template-columns: 72px minmax(0, 1fr) 132px 150px var(--od-act, 70px); }
.od-from, .od-to { min-width: 0; font-size: 12.5px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.od-from .src { font-size: 11.5px; color: var(--ds-fg-muted); overflow-wrap: anywhere; }
.od-to .s { font-size: 11.5px; color: var(--ds-fg-muted); }
.od-to form { margin: 0; }
.od-from .lbl, .od-to .lbl { display: none; }
.od-row .none { color: var(--ds-fg-muted); }
.od-pager { display: flex; gap: 8px 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--ds-border); }
.od-pager .s { font-size: 12.5px; color: var(--ds-fg-muted); }
.od-pager [aria-disabled] { opacity: .4; pointer-events: none; }
.od-row + .od-row { border-top: 1px solid var(--ds-border); }
.od-row:target { background: var(--ds-bg-muted); }
.od-row .n { font-size: 12px; color: var(--ds-fg-muted); padding-top: 2px; }
.od-row .b { min-width: 0; }
.od-row .t { font-size: 13.5px; line-height: 1.45; color: var(--ds-fg); overflow-wrap: anywhere; }
.od-row .m { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 4px; font-size: 12px; color: var(--ds-fg-muted); min-width: 0; }
.od-row .m a { overflow-wrap: anywhere; }
.od-row .m .tag { min-height: 19px; font-size: 11px; }
.od-row .act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.od-row .act form { margin: 0; }
.od-more { margin-top: 6px; font-size: 12px; }
.od-more summary { cursor: pointer; color: var(--ds-fg-muted); width: max-content; max-width: 100%; }
.od-more form { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; }
.od-more label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; min-width: 0; }
.od-more .search { flex: 0 1 140px; height: 30px; }
details.od-fold > summary { cursor: pointer; list-style: none; }
details.od-fold > summary::-webkit-details-marker { display: none; }
details.od-fold:not([open]) > summary { border-bottom: 0; }
@media (max-width: 900px) {
  .od-h { display: none; }
  .od-row { grid-template-columns: 22px minmax(0, 1fr); }
  .od-from, .od-to, .od-row .act { grid-column: 2; }
  .od-hist .od-row { grid-template-columns: minmax(0, 1fr); }
  .od-hist .od-from, .od-hist .od-to, .od-hist .od-row .act { grid-column: 1; }
  .od-from, .od-to { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .od-from .lbl, .od-to .lbl { display: inline; min-width: 64px; font-size: 12px; color: var(--ds-fg-muted); }
  .od-row .act { justify-content: flex-start; }
}
/* D-854 step 03: the morning line on Home and on Pulse Doctor; a suggested link */
.od-free { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; min-width: 0; }
.od-free li { overflow-wrap: anywhere; }
.od-free .s { font-size: 12px; color: var(--ds-fg-muted); }
.od-doctor { margin-top: 18px; }
.od-row .b > form { display: inline-block; margin: 6px 6px 0 0; }
/* D-854: an On deck item's conversation on the Ask page */
.od-row .m a.od-ask { font-weight: 500; }
.ask-about { margin: 0; padding: 12px 18px 0; font-size: 13px; line-height: 1.5; color: var(--ds-fg-muted); overflow-wrap: anywhere; }
.ask-about a { font-weight: 500; }
