/*
 * Tripleloop Central web app. Tokens in docs/brand-tokens.md: black type on white; oxblood is TLC's one
 * colour, as solid fills only (header band, card rule, the one primary button); links, the current menu
 * entry and tab in ink (tlc-app-ux W7, T1); solid colour, one typeface family (Source Sans).
 * Visual direction: docs/12-web-app-design-brief.md. No font or style is loaded from elsewhere (CSP).
 */
/* The brand's typefaces, served by the app from /fonts/ (web/fonts/README.md); nothing from elsewhere. */
@font-face{font-family:"Source Sans 3";src:url("/fonts/SourceSans3-Regular.ttf?v=737f13ef407a") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url("/fonts/SourceSans3-Italic.ttf?v=f0587e7f457f") format("truetype");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url("/fonts/SourceSans3-SemiBold.ttf?v=61c95726b0e3") format("truetype");font-weight:500 600;font-style:normal;font-display:swap}
@font-face{font-family:"Source Sans 3";src:url("/fonts/SourceSans3-Bold.ttf?v=d148333ee67d") format("truetype");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Source Code Pro";src:url("/fonts/SourceCodePro-Regular.ttf?v=5528c3b51fa5") format("truetype");font-weight:400;font-style:normal;font-display:swap}
:root {
  --bg:#ffffff; --panel:#ffffff; --zone:#f3f4f3; --fg:#111111; --muted:#555b57; --line:#d9dcda; --edge:#7d837f; --mark:#7d837f;
  --brand:#7d2433; --brand-fg:#ffffff; --sel:#e6e8e6; --knot:#7d2433; --knot-hl:#e8a2ad;
  --ok:#2f6b4f; --warn:#8a5300; --bad:#a8241c; --ok-soft:#e9f1dc; --bad-soft:#fbe9e7; --warn-soft:#fbf1e1;
  --sans:"Source Sans 3","Source Sans Pro",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:"Source Code Pro",ui-monospace,Menlo,Consolas,monospace;
  --measure:29em; --target:44px; --radius:8px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#121413; --panel:#1a1d1b; --zone:#222623; --fg:#eef0ee; --muted:#a9b0ab; --line:#333834; --edge:#8b928d; --mark:#8b928d;
  --brand:#7d2433; --brand-fg:#ffffff; --sel:#2e332f; --knot:#e8a2ad; --knot-hl:#ffffff;
  --ok:#7fc4a0; --warn:#e0b155; --bad:#f0918a; --ok-soft:#1f3229; --bad-soft:#3a1d1b; --warn-soft:#3a2e17;
  color-scheme:dark } }
:root[data-theme="dark"]{
  --bg:#121413; --panel:#1a1d1b; --zone:#222623; --fg:#eef0ee; --muted:#a9b0ab; --line:#333834; --edge:#8b928d; --mark:#8b928d;
  --brand:#7d2433; --brand-fg:#ffffff; --sel:#2e332f; --knot:#e8a2ad; --knot-hl:#ffffff;
  --ok:#7fc4a0; --warn:#e0b155; --bad:#f0918a; --ok-soft:#1f3229; --bad-soft:#3a1d1b; --warn-soft:#3a2e17;
  color-scheme:dark }

/* Type: one family; body 13 px, set on the root so every rem size follows; display weight for page titles only; sentence case, never all caps */
html,body{height:100%}
html{font-size:13px}
body{background:var(--bg);color:var(--fg);font-family:var(--sans);font-size:13px;line-height:1.5;margin:0;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:16px 32px}
h1{font-size:1.75rem;line-height:1.2;font-weight:700;margin:0 0 6px;text-wrap:balance;letter-spacing:-.01em}
h2{font-size:1.2rem;font-weight:500;margin:28px 0 8px}
h3{font-size:1.05rem;font-weight:500;margin:22px 0 6px}
h4{font-size:1rem;font-weight:500;margin:16px 0 6px}
h2.flush,h3.flush{margin-top:0}
p,li,.sub,.note,.group p,.progress{max-width:var(--measure)}
.sub{color:var(--muted);margin:0 0 16px}
.muted,.second{color:var(--muted)}
.second{font-size:.9rem;margin-top:2px}
.empty{color:var(--muted)}
a{color:var(--fg);text-underline-offset:2px}
code{font-family:inherit;background:var(--zone);padding:1px 5px;border-radius:4px}
pre.text{white-space:pre-wrap;font-family:inherit;font-size:.95rem;background:var(--zone);border-radius:6px;padding:12px;max-height:420px;overflow:auto;max-width:var(--measure)}

/* Layout */
/* The content column takes the width the menu leaves; prose keeps its own measure, tables use it all */
.app{display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px}
@media (max-width:760px){.app{grid-template-columns:1fr;gap:12px}.rail{position:static}.rail nav{display:flex;flex-wrap:wrap;gap:4px}}
.rail{position:sticky;top:16px;align-self:start}
.band{position:relative;overflow:hidden;display:flex;align-items:center;gap:16px;background:var(--brand);color:var(--brand-fg);
  margin:-16px calc(-1 * max(16px,env(safe-area-inset-right,0px))) 20px calc(-1 * max(16px,env(safe-area-inset-left,0px)));
  padding:20px max(28px,env(safe-area-inset-right,0px)) 20px max(28px,env(safe-area-inset-left,0px))}
/* As the in-chat apps' header band (src/mcp/apps.ts .band): the 48 px white knot, the faint large outline behind,
   the eyebrow, a 22 px title naming where you are, a 12 px caption (here the environment); px, not the 13 px root */
.band .mark{display:flex;width:48px;height:48px;flex:none}.band .mark svg,.band .ghost svg{width:100%;height:100%;display:block}
.band .ghost{position:absolute;right:20%;top:-110px;width:340px;height:340px;pointer-events:none}
.band>*:not(.ghost){position:relative}
.band .ttls{display:flex;flex-direction:column;min-width:0;line-height:1.45}
/* The in-chat band's height: its 64 px progress knot inside 20 px padding, whatever the title holds */
.band .ttls{min-height:64px;justify-content:center}
.band .eye{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.85}
.band .ttl{font-size:22px;font-weight:400;line-height:1.15}
.band .cap{font-size:12px;opacity:.85}
/* The progress knot at the band's right end, as in the in-chat band: 64 px, white on a faint white track, words beside */
#bandprog{margin-left:auto}
.band .dprog{gap:16px;font-size:14px;font-weight:600;color:var(--brand-fg)}
.band .dprog svg{width:64px;height:64px}
.band .knot .track{stroke:#FFFFFF;stroke-opacity:.3;stroke-width:7}
.band .knot .gap{stroke:var(--brand);stroke-width:15}
.band .knot .fill{stroke:#FFFFFF;stroke-width:7}
@media (max-width:640px){.band .dprog svg{width:36px;height:36px}.band .dprog{gap:10px}.band .ttls{min-height:36px}.band{padding:12px 14px;gap:10px}.band .mark{width:30px;height:30px}.band .ttl{font-size:16px}.band .ghost{width:180px;height:180px;top:-60px;right:-40px}}
/* Dark: the band stays oxblood with a 1 px line under it (tlc-app-ux look.md, as in the apps) */
:root[data-theme="dark"] .band{border-bottom:1px solid var(--line)}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .band{border-bottom:1px solid var(--line)} }
.band small{color:var(--brand-fg)}
main{min-width:0}
main:focus{outline:none}
.titlebar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.titlebar .row{margin:0;flex:0 0 auto}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:20px}
@media (max-width:900px){.two{grid-template-columns:1fr}}
.two>*{min-width:0}
.one{display:block}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin:10px 0}
.row>*{flex:1 1 180px}
.row>button,.row>a,.pager>*{flex:0 0 auto}
.pager{justify-content:space-between}

/* Menu */
nav a{display:flex;align-items:center;min-height:var(--target);padding:0 12px;border-radius:6px;color:var(--fg);text-decoration:none;box-sizing:border-box}
nav a:hover{background:var(--zone)}
nav a.on{background:var(--sel);color:var(--fg);font-weight:600}
nav a.subentry{padding-left:26px;font-size:.95rem}
.user{margin-top:20px;padding:12px;border-top:1px solid var(--line);font-size:.95rem}
.user label{display:block;color:var(--muted);margin-bottom:2px}

/* Tabs: text links with an underline for the current one */
nav.tabs{display:flex;gap:2px;flex-wrap:wrap;margin:14px 0 6px;border-bottom:1px solid var(--line)}
nav.tabs a{border-radius:0;padding:0 12px;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-1px}
nav.tabs a:hover{background:none;color:var(--fg)}
nav.tabs a.on{background:none;box-shadow:none;color:var(--fg);font-weight:600;border-bottom-color:var(--fg)}
nav.tabs.sub,nav.tabs.items{border-bottom:0;margin-top:6px}
nav.tabs.sub a.on,nav.tabs.items a.on{border-bottom-color:var(--fg)}
.crumb{margin-bottom:6px}
.crumb a{text-decoration:none}
/* Links in lists, tables and crumbs carry a 44 px target too */
.group li a,td a,th a,.crumb a{display:inline-block;box-sizing:border-box;min-height:var(--target);padding-block:10px;line-height:24px}
/* B6: an inline link in a sentence is a 44 px target at any body size (13 px since UX iteration 1, issue #427). */
main p>a{padding-block:calc((var(--target) - 1em) / 2)}
.opt:focus-within:not(:has(:focus-visible)){outline:none}

/* Controls: one filled primary per view; everything else outline or text */
select,input,textarea,button{font:inherit;color:inherit}
select,input,textarea{background:var(--panel);border:1px solid var(--edge);border-radius:6px;padding:8px 10px;width:100%;box-sizing:border-box;min-height:var(--target)}
textarea{min-height:88px}
input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:0;accent-color:var(--fg);margin:0}
label{display:block}
span.f{display:block;font-size:.95rem;color:var(--muted);margin:10px 0 4px}
/* Required fields (issue 112): an asterisk after the label and "required" in the hint. */
span.f .req{color:var(--bad)}
span.f .hint{font-size:.85em}
button,.btnlink{display:inline-flex;align-items:center;justify-content:center;min-height:var(--target);padding:0 16px;border-radius:6px;border:1px solid var(--edge);background:var(--panel);color:var(--fg);cursor:pointer;text-decoration:none;line-height:1.2;box-sizing:border-box;font-weight:500}
button:hover,.btnlink:hover{border-color:var(--fg)}
button.p,.btnlink.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-fg)}
button.p:hover,.btnlink.primary:hover{filter:brightness(1.08)}
.btnlink.on{border-color:var(--fg)}
button.s{min-height:var(--target);padding:0 12px;font-weight:400}
button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:3px solid var(--fg);outline-offset:2px}
.opt:focus-within{outline:3px solid var(--fg);outline-offset:2px}

/* Status: words with a quiet dot, not pills */
.st{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:var(--fg)}
.st::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--mark);flex:0 0 auto}
.st.ok::before{background:var(--ok)} .st.warn::before{background:var(--warn)} .st.bad::before{background:var(--bad)} .st.acc::before{background:var(--fg)}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;border:2px solid var(--mark);vertical-align:middle;margin-right:6px}
.dot.full{background:var(--ok);border-color:var(--ok)} .dot.half{background:linear-gradient(90deg,var(--fg) 50%,transparent 50%);border-color:var(--fg)} .dot.split{border-style:dashed;border-color:var(--warn)} .dot.held{background:var(--zone)}

/* Surfaces */
.card,.group,.progress,.item{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.card{padding:18px}
.group{padding:14px 18px;margin:0 0 12px}
.group p{margin:0 0 6px}
.group ul{margin:0;padding-left:20px}
.progress{padding:12px 18px;margin:0 0 14px}
/* Issue #286 (A25): the all-done panel in Decide. */
.progress.alldone h2{margin:0 0 4px}.progress.alldone p{margin:4px 0 0}
.item{margin-bottom:12px}
.item .body{padding:4px 18px 18px}
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:6px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:.9rem;color:var(--muted);font-weight:500;background:var(--zone)}
tr.run-group th{color:var(--fg);font-weight:600;background:var(--panel)}
tr:last-child td{border-bottom:0}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0}
.kv dt{color:var(--muted)} .kv dd{margin:0}
.banner{background:var(--warn-soft);border-left:3px solid var(--warn);border-radius:6px;padding:10px 14px;margin:10px 0}
.note{color:var(--muted);border-left:3px solid var(--warn);padding-left:12px;margin:10px 0}
fieldset{border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px;margin:12px 0}
legend{color:var(--muted);padding:0 4px}
.inline{display:inline-flex;align-items:center;gap:8px;margin-right:16px;min-height:var(--target)}
details>summary{cursor:pointer;padding:10px 0;display:list-item;min-height:var(--target);box-sizing:border-box}

/* Inbox list and steps */
.steps{display:grid;gap:12px;margin:12px 0}
.step{border-left:3px solid var(--line);padding:2px 0 2px 12px}
.step b{display:block;font-size:.9rem;font-weight:600;color:var(--muted)}
.step.miss{border-color:var(--bad)}
/* Read like a document (T6): a label column beside each field; the change as a numbered list under a rule */
.steps.doc{gap:0;border-top:1px solid var(--line)}
.steps.doc .step{display:grid;grid-template-columns:7.5em minmax(0,1fr);gap:4px 14px;border-left:0;border-bottom:1px solid var(--line);padding:10px 0}
.steps.doc .step b{font-size:.95rem;padding-top:1px}
.steps.doc .step.miss b{color:var(--bad)}
.steps.doc .v p,.steps.doc .v ol,.steps.doc .v ul{margin:0}
.steps.doc .v ol,.steps.doc .v ul{padding-left:1.3em}
/* Issue #285: an intro line, a list and the next paragraph apart by a little space. */
.steps.doc .v>:not(:first-child){margin-top:.35em}
/* The Change row keeps the same thin rule as every other row (prototype; was a 2 px rule under Change) */
@media (max-width:520px){.steps.doc .step{grid-template-columns:1fr}}
/* The state under the title, in words (T7) */
.statel{margin:-2px 0 6px;font-weight:600}
/* The header (L4): title and batch line; top right the knot beside the words "N of M decided" */
.dphead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 14px}
.dphead .batch{margin:2px 0 0}
.dprog{display:flex;align-items:center;gap:8px;font-weight:600;flex:0 0 auto}
.titlebar>h1{flex:1 1 auto}
.titlebar>.dprog{margin-bottom:4px}
.knot{width:40px;height:40px;flex:0 0 auto}
.knot .track{stroke:var(--line);stroke-width:9}
.knot .gap{stroke:var(--bg);stroke-width:18}
.knot .fill{stroke:var(--knot);stroke-width:9;stroke-linecap:round}
/* The tag as a segmented control, the re-check date beside it; the chosen tag in ink (L8) */
.tagrow{align-items:flex-end}
.tagrow>.segfield{flex:0 1 auto;display:flex;flex-direction:column;gap:4px}
.tagrow>label{flex:0 1 165px;min-width:150px}
.seg{display:inline-flex;flex-wrap:wrap;border:1px solid var(--edge);border-radius:6px;overflow:hidden}
.seg label{display:flex;margin:0;cursor:pointer;border-left:1px solid var(--edge)}
.seg label:first-child{border-left:0}
.seg input{position:absolute;opacity:0;width:1px;height:1px}
.seg span{display:flex;align-items:center;min-height:var(--target);padding:0 11px;font-weight:500}
.seg label:has(input:checked){background:var(--fg);color:var(--bg)}
.seg label:has(input:focus-visible){outline:3px solid var(--fg);outline-offset:-3px}
@media (max-width:520px){.tagrow>.segfield{flex:1 1 100%}.seg{display:grid;grid-template-columns:1fr 1fr}.seg label:nth-child(odd){border-left:0}.seg label:nth-child(n+3){border-top:1px solid var(--edge)}}
/* The picked option's card outlined (L6) */
.opts.side .opt.on,.opts.side .opt:has(input:checked){box-shadow:0 0 0 1px var(--fg)}
ul.files{list-style:none;margin:0;padding:0;display:grid;gap:2px}
ul.files a{display:flex;align-items:center;min-height:var(--target);color:inherit}
ul.files a.on{color:var(--fg);font-weight:600}

/* Options side by side, each with the tag it would get */
.opts{display:grid;gap:10px;margin:12px 0}
.opts.side{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
/* Options side by side; stacked on a phone (L6) */
@media (max-width:600px){.opts.side{grid-template-columns:1fr}}
.opt{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;display:flex;flex-direction:column;gap:8px;cursor:pointer;min-height:var(--target);background:var(--panel)}
.opt .ol{display:flex;flex-direction:column;gap:2px}
.opt .otag{font-size:.95rem;color:var(--muted)}
.opt.on,.opt:has(input:checked){border-color:var(--fg);background:var(--sel)}
/* A finding's illustrations side by side, each labelled (the pack's decision page) */
.ills{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0}
.ill{margin:0;border:1px solid var(--line);border-radius:var(--radius);padding:10px;display:flex;flex-direction:column;gap:8px;background:var(--panel)}
.ill .art{min-height:120px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;border-radius:6px}
.ill .art img{display:block;max-width:100%;max-height:320px;height:auto}
.ill .art iframe{width:100%;height:240px;border:0}
.ill figcaption a{display:inline-flex;align-items:center;min-height:var(--target);color:inherit}
.illus{display:block;max-width:100%;max-height:180px;margin-top:6px;border:1px solid var(--line);border-radius:6px;background:#fff}

/* Messages */
.result{margin:12px 0;padding:10px 14px;border-radius:6px;border-left:3px solid var(--line);max-width:var(--measure)}
.result.ok{background:var(--ok-soft);border-left-color:var(--ok)} .result.bad{background:var(--bad-soft);border-left-color:var(--bad)}
.result a{color:inherit}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:10px 16px;border-radius:8px;opacity:0;pointer-events:none}
.toast.show{opacity:1;transition:opacity .2s}

/* Motion only in answer to an action: the outcome of a write settles in; nothing moves on load */
.settle{animation:settle .35s ease-out}
@keyframes settle{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* The knot loader while a view reads (tlc-app-ux M2): one lap per 1.6 s, per 6 s under reduced motion */
.knotload{display:flex;align-items:center;gap:10px;color:var(--muted);margin:24px 0}
.knotload .knot{width:40px;height:40px}
.knotload .track{stroke:var(--line);stroke-width:9}
.knotload .gap{stroke:var(--bg);stroke-width:18}
.knotload .hl{stroke:var(--knot);stroke-width:9;stroke-linecap:round;stroke-dasharray:30 70;animation:knot-lap 1.6s linear infinite}
@keyframes knot-lap{to{stroke-dashoffset:-100}}
.dprog .progress-run{animation:knot-lap 6s linear infinite}
@media (prefers-reduced-motion:reduce){.dprog .progress-run{animation:none}}
@media (prefers-reduced-motion:reduce){.knotload .hl{animation:knot-lap 6s linear infinite!important}}
/* The first sight of TLC at sign-in (M3). Each part rests in its final state; the motion only leads up to
   it, so under reduced motion (no animation) the knot stands still and the highlight stays hidden. */
.firstsight .first{width:72px;height:72px;margin:8px 0 4px}
.firstsight .line{stroke:var(--knot);stroke-width:9}
.firstsight .gap{stroke:var(--bg);stroke-width:18}
.firstsight .dot{fill:var(--fg);transform-box:fill-box;transform-origin:center}
.firstsight .hl9{stroke:var(--knot-hl);stroke-width:9;stroke-linecap:round;stroke-dasharray:9 91;opacity:0}
.firstsight .line:not(.cross){animation:knot-draw 1.8s ease-in-out .2s backwards}
.firstsight .gap,.firstsight .cross{animation:knot-fade .25s ease-out 2s backwards}
.firstsight .dot{animation:knot-pop .45s ease-out 2.3s backwards}
.firstsight .hl9{animation:knot-on 0s linear 2.75s forwards,knot-lap 4s linear 2.75s infinite}
@keyframes knot-draw{from{stroke-dasharray:100 100;stroke-dashoffset:100}to{stroke-dasharray:100 100;stroke-dashoffset:0}}
@keyframes knot-fade{from{opacity:0}}
@keyframes knot-pop{0%{transform:scale(0)}70%{transform:scale(1.15)}100%{transform:scale(1)}}
@keyframes knot-on{to{opacity:1}}

/* Person search */
.ps{margin:10px 0}
.ps-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px;max-width:520px}
.ps-list button{width:100%;justify-content:flex-start;font-weight:400}
.ps-note{margin-top:6px}

/* File a finding */
dialog.dlg{border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--fg);padding:20px 22px;width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto}
dialog.dlg::backdrop{background:rgba(0,0,0,.45)}

/* Call log: the one place for call names, and the one place for monospace */
.logwrap{margin-top:32px;color:var(--muted)}
.log{font-family:var(--mono);font-size:.85rem;background:var(--zone);border-radius:6px;padding:10px 12px;max-height:220px;overflow:auto;white-space:pre-wrap;color:var(--fg)}
/* Stewarding: the scorecard across loops, dense enough to fit a wide window; the Loop column stays put when it scrolls */
.scorecard table{table-layout:auto}
.scorecard th,.scorecard td{padding:8px 10px;vertical-align:top}
.scorecard thead th{min-width:110px;line-height:1.3}
.scorecard thead th span.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.scorecard td{min-width:110px}
.scorecard th[scope=row],.scorecard thead th:first-child{position:sticky;left:0;z-index:1;background:var(--panel);min-width:140px;box-shadow:1px 0 0 var(--line)}
.scorecard thead th:first-child{background:var(--zone)}
.scorecard th[scope=row]{font-weight:500;color:var(--fg)}
.scorecard td.fail{background:var(--bad-soft)}
.scorecard .clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* A text button: the action in words, no box, still a 44 px target */
button.textbtn{border:0;background:none;padding:0;color:var(--fg);text-decoration:underline;text-underline-offset:2px;font-weight:500;justify-content:flex-start;text-align:left}
button.textbtn:hover{border:0;color:var(--fg)}
td.nowrap{white-space:nowrap}
tr.on td{background:var(--sel)}
.detail{margin-top:16px}
/* The model's usage charts (Service). Issue #252 (option a, "Neutral chart ink", Tentative, [decided:
   Jesper]): the input series is neutral slate ink, never oxblood (T1: the brand is never a state or a
   series) and never the company green (W7: it stays CPH Mist's); output stays warm, apart from it by
   hue and lightness for colour-blind separation in both themes. Issue #311 (option a, Tentative,
   [decided: Jesper]): the light output series darkens to #a87a3a, 3.8:1 on white, so data marks reach the
   3:1 WCAG 1.4.11 asks of graphics (W8); the dark value is unchanged at 6.0:1. */
:root{--chart-in:#4f5560;--chart-out:#a87a3a}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){--chart-in:#aeb4bd;--chart-out:#bb8a42} }
:root[data-theme="dark"]{--chart-in:#aeb4bd;--chart-out:#bb8a42}
svg.chart{width:100%;max-width:900px;height:auto;display:block;margin:6px 0 10px}
svg.chart .grid{stroke:var(--line);stroke-width:1}
svg.chart .tick{fill:var(--muted);font-size:11px;font-family:var(--sans)}
svg.chart .ch-in{fill:var(--chart-in)} svg.chart .ch-out{fill:var(--chart-out)}
svg.chart .hit{fill:transparent}
svg.chart .bar:hover .hit{fill:var(--zone)}
.legend{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend .sw{display:inline-block;width:12px;height:12px;border-radius:3px}
.legend .sw.ch-in{background:var(--chart-in)} .legend .sw.ch-out{background:var(--chart-out)}
/* Stewarding as the practice's scorecard: lead line, tiles, status matrix, details filter */
p.lead{font-size:1.1rem;margin:0 0 4px;max-width:none}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 6px}
@media (max-width:760px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tile{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.tile b{font-size:1.9rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1}
.tile span{color:var(--muted)}
.matrix table{table-layout:auto}
.matrix th,.matrix td{padding:4px 4px;text-align:center;vertical-align:middle}
.matrix thead th{font-size:.9rem;line-height:1.2;white-space:normal;min-width:0}
.matrix th[scope=row]{text-align:left;position:sticky;left:0;background:var(--panel);z-index:1;box-shadow:1px 0 0 var(--line);padding-left:10px;white-space:nowrap}
.matrix thead th:first-child{position:sticky;left:0;z-index:2;background:var(--zone);text-align:left;padding-left:10px}
.matrix tr.on th[scope=row]{background:var(--sel)}
/* A status as a compact outlined pill: the word, coloured by its tone, never colour alone */
.vp{display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;padding:3px 8px;border:1px solid var(--edge);border-radius:999px;font-size:.8rem;line-height:1.1;color:var(--muted);text-decoration:none;white-space:nowrap;font-style:normal}
.matrix td a.cell{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--target);padding:0 2px;line-height:1.1;text-decoration:none}
.matrix td a.cell:hover .vp{background:var(--zone)}
.vp.ok{color:var(--ok);border-color:var(--ok)} .vp.bad{color:var(--bad);border-color:var(--bad)} .vp.warn{color:var(--warn);border-color:var(--warn)}
.legend .vp{padding:2px 8px;gap:4px}
.filter{display:flex;gap:8px;margin:6px 0 10px}
.filter button.on{border-color:var(--fg);background:var(--sel);font-weight:600}

/* Web app 9: a tab strip never takes the prose measure (subnav carries .sub). From 900 px up it is
   one line; where the column is narrower than the strip, the strip scrolls, never the page. */
nav.tabs{max-width:none}
@media (min-width:900px){nav.tabs{flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;scrollbar-width:thin}}
/* The content column's gutters: 30 px each side from 900 px up, every page; the menu keeps its own */
@media (min-width:900px){main{padding-inline:30px}}
/* A tab's status line: dot and words; the words wrap on a phone */
p.status{margin:10px 0 4px}
p.status .st{white-space:normal}
.how{margin-top:10px}

/* Web app 10: Decide as the practice's decision page: the items on the left, the item on the right */
.decide{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:24px;align-items:start}
.decide>.drawer{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);padding:0 12px 10px}
/* Two panes (tlc-app-ux L1): the list beside the item; on a phone, two tabs, one pane at a time */
.decide>.ptabs{display:none}
@media (max-width:899px){.decide{grid-template-columns:minmax(0,1fr)}.decide>.drawer{position:static;max-height:none}
  .decide>.ptabs{display:flex;gap:4px;border-bottom:1px solid var(--line)}
  .decide>.ptabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:none;color:var(--muted);font-weight:500}
  .decide>.ptabs button[aria-selected=true]{color:var(--fg);font-weight:600;border-bottom-color:var(--fg)}
  .decide[data-show=item]>.drawer,.decide[data-show=list]>.pane{display:none}}
.drawer>.itotal{margin:10px 0 4px;font-weight:600}
.ilist .itotal{margin:0 0 8px;color:var(--muted)}
.ilist .igroup{margin:10px 0}
.ilist .ihead{margin:0 0 2px}
.ilist a{display:flex;align-items:center;gap:4px;min-height:var(--target);padding:0 8px;border-radius:6px;color:var(--fg);text-decoration:none}
.ilist a:hover{background:var(--zone)}
.ilist a.on{background:var(--sel);font-weight:600}
/* Titles wrap instead of being cut with an ellipsis (L3) */
.ilist a{align-items:flex-start;padding-block:10px}
.ilist a .dot{margin-top:calc((1.5em - 14px) / 2);flex:0 0 auto}
/* Compact rows where there is a mouse or trackpad; touch keeps 44 px targets (B6). Marker beside the title, the title on as many lines as it needs */
@media (pointer:fine){.ilist a{min-height:0;padding-block:5px;gap:8px}.ilist .igroup{margin:12px 0 6px}}
.ilist .ihead{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:0 8px}
.ilist .it{white-space:normal;overflow-wrap:anywhere}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.opt.rec{border-style:dashed;border-color:var(--fg)}
.opt .rectag{font-size:.95rem;font-weight:600;color:var(--muted)}
.illfig{display:flex;flex-direction:column;gap:2px;margin-top:6px}.illfig .muted{font-size:.9rem}
fieldset.tests{display:grid;gap:4px;margin:10px 0}
fieldset.tests label.inline{align-items:flex-start}
.ilegend{display:flex;flex-direction:column;gap:4px;margin:10px 0 0}
.ilegend .prov{font-style:normal;display:inline-block;width:14px;margin-right:2px} .ilist .prov{font-style:normal}

/* The line on each card (every panel drawn as a card): oxblood, a solid fill (W7). Last in the file, so
   no later border shorthand on these panels undoes it. */
.card,.group,.progress,.item,.tile,.decide>.drawer{border-top:3px solid var(--brand)}
/* Decide, laid out as the in-chat decision page (prototype): no card chrome or oxblood line on the list or the item,
   the list set off by a rule on its right, the item flat beside it; the counts ride in the band's caption. */
.decide>.drawer{border:0;border-right:1px solid var(--line);border-radius:0;background:none;padding:0 16px 10px 0}
/* Issue #499 (option a, "Full-height line", [decided: Jesper]; principle: structural lines mark layout regions, not
   content length): beside the list (900 px and wider) the two panes fill the height the view leaves them (--decide-fill,
   set by twoPanes: the view less what stands above and below them) and both stretch, so the list's rule runs to the
   bottom of the view whatever the content's length; on a long page the list stays sticky at the view's height. */
@media (min-width:900px){.decide{min-height:var(--decide-fill,0px);align-items:stretch}}
.decide .item{border:0;border-radius:0;background:none}
.decide .item .body{padding:0}
.decide .item h3{margin-top:0}
/* Issue #494: the All done panel is as flat as the rest of Decide (W10): no card box, no oxblood line. */
.decide .progress{border:0;border-radius:0;background:none;padding:0}
.band .cap .progress{display:inline;max-width:none;padding:0;margin:0;border:0;background:none;color:inherit}
.band .cap .progress b{font-weight:400}.band .cap .muted{color:inherit}
@media (max-width:899px){.decide>.drawer{border-right:0;padding-right:0}}

/* Issue #250: an inbox item's Touches, one reference per line (role list for screen readers). */
.touches .refs .ref { margin: 2px 0; }

/* Skeletons in the final layout beside the knot loader (tlc-app-ux A9; issue #257); breakpoints as the
   views' own. They pulse between full and 55% opacity over 1.4 s, as M1 has it and as the in-chat cards'
   do, and stop under reduced motion (issue #350; B7 allows motion while data loads). */
.skel{display:flex;flex-direction:column;gap:14px;margin-top:8px}
.skel .sk{background:var(--zone);border-radius:6px;animation:sk-pulse 1.4s ease-in-out infinite}
@keyframes sk-pulse{0%,100%{opacity:1}50%{opacity:.55}}
@media (prefers-reduced-motion:reduce){.skel .sk{animation:none}}
.skel .sk-title{height:34px;width:42%}
.skel .sk-line{height:18px;width:68%}
.skel .sk-line.short{width:36%}
.skel .sk-button{height:44px;width:200px;max-width:100%}
.skel .sk-rows,.skel .sk-list{display:flex;flex-direction:column;gap:8px}
.skel .sk-row{height:40px;width:100%}
.skel .sk-group{display:flex;flex-direction:column;gap:10px}
.skel .sk-tabs,.skel .sk-ptabs{display:flex;gap:10px;flex-wrap:wrap}
.skel .sk-tab{height:36px;width:88px}
.skel .sk-ptabs{display:none}
.skel .sk-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.skel .sk-tile{height:84px}
.skel .sk-panes{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:24px}
.skel .sk-item{display:flex;flex-direction:column;gap:12px}
.skel .sk-block{height:48px}
.skel .sk-opts{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.skel .sk-opt{height:120px}
@media (max-width:899px){.skel .sk-panes{grid-template-columns:minmax(0,1fr)}.skel .sk-list{display:none}.skel .sk-ptabs{display:flex}}
@media (max-width:760px){.skel .sk-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Picks: below Save on a Decide item, the picks so far and the item's state (marker and words) */
.item .picks{border:1px solid var(--line);border-radius:var(--radius);padding:10px 12px;margin-top:12px;background:var(--panel)}
.item .picks>b{display:block;margin-bottom:4px}
.item .picks .pst{margin:6px 0 0;color:var(--muted);display:flex;align-items:baseline;gap:6px}
.item .picks .pst .dot{transform:translateY(1px)}
/* Issue #488: a loop's document read as a page. */
.card.doc{max-width:var(--measure)}
.card.doc blockquote{margin:8px 0;padding:4px 12px;border-left:3px solid var(--line);color:var(--muted)}
.card.doc pre.text.code{font-family:var(--mono);font-size:.9rem;max-height:none}
.card.doc li+li{margin-top:2px}
