/* The screen's one stylesheet, in the visual language of the product owner's prototype
   (prototype/ibwt-company.html): its colour variables and teal accent, a dark 232 px sidebar,
   figure tiles, filled badges in six tones, coloured initials avatars, tables with uppercase
   heads, segmented bars, Ticket cards, a right-hand drawer and dark code blocks.
   Shared parts (parts.ts) use the first half; the second half restyles the class names pages
   used before, in the same language. Light only, as the prototype is. */

/* ---- Tokens: the prototype's own --------------------------------------------------------- */
:root {
  --side: #14171f; --side2: #1f2430; --side-line: #2b3140; --side-mut: #8a92a0; --side-ink: #c9ced8;
  --bg: #f6f7f9; --sf: #fff; --ink: #161a22; --mut: #6b7380; --line: #e4e7ec; --hover: #fafbfc;
  --acc: #0f766e; --acc-s: #e0f2ef; --switch: #2dd4bf;
  --ok: #15803d; --ok-s: #e3f4e8; --risk: #b45309; --risk-s: #fdf0d9; --bad: #b91c1c; --bad-s: #fde8e8;
  --blue: #1d4ed8; --blue-s: #e4ecfd; --vio: #6d28d9; --vio-s: #eee7fd; --gray-s: #eef0f3;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* The names the earlier stylesheet used, kept as aliases so every page follows the new look. */
  --surface: var(--sf); --text: var(--ink); --muted: var(--mut); --accent: var(--acc); --accent-text: #fff;
  --warn: var(--risk); --danger: var(--bad); --danger-bg: var(--bad-s); --ok-bg: var(--ok-s);
  --radius: 7px; --gap: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
select, input, button, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
main a:not(.kpi):not(.att):not(.who):not(.ref):not(.button):not(.qi):not(.tag) { color: var(--acc); }
h1 { font-size: 23px; margin: 0; font-weight: 650; line-height: 1.25; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 14px; margin: 14px 0 6px; font-weight: 650; }
h4 { font-size: 12.5px; color: var(--mut); margin: 12px 0 4px; font-weight: 600; }
.sub { color: var(--mut); margin: 3px 0 20px; }
.mut, .muted { color: var(--mut); }
.sm { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.hrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- The shell: sidebar and main ---------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
header.side {
  background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; gap: 2px;
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
header.side .brand-block { padding: 0 10px 18px; }
header.side .brand { display: block; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .05em; }
header.side .brand:hover { text-decoration: none; }
header.side .co { font-size: 12px; color: var(--side-mut); margin-top: 2px; }
.mode-switch { display: flex; background: #0c0e13; border-radius: 9px; padding: 3px; margin: 0 4px 14px; }
.mode-switch button {
  all: unset; flex: 1; text-align: center; cursor: pointer; padding: 6px 4px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--side-mut);
}
.mode-switch button:hover { color: #e6e9ee; }
.mode-switch button.on { background: var(--switch); color: #06201c; }
.mode-switch button:focus-visible { outline: 2px solid var(--switch); outline-offset: 1px; }
header.side nav { display: flex; flex-direction: column; gap: 2px; }
header.side nav a {
  display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px;
  font-weight: 500; color: var(--side-ink);
}
header.side nav a:hover { background: var(--side2); text-decoration: none; }
header.side nav a.on { background: var(--side2); color: #fff; box-shadow: inset 3px 0 0 var(--switch); }
/* The count pill: drawn from data-count, so the link's text stays its label alone. */
header.side nav a[data-count]::after {
  content: attr(data-count); font-size: 11.5px; background: var(--side-line); color: var(--side-ink);
  border-radius: 99px; padding: 0 8px; line-height: 20px; font-weight: 500;
}
header.side .me {
  margin-top: auto; border-top: 1px solid var(--side-line); padding: 14px 10px 0;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center;
}
header.side .me .who { display: block; color: #e6e9ee; font-weight: 600; font-size: 13.5px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
header.side .me .who small { display: block; color: var(--side-mut); font-weight: 400; font-size: 12px; }
header.side .me .signout {
  grid-column: 1 / -1; margin-top: 8px; background: var(--side2); border: 1px solid var(--side-line);
  color: #e6e9ee; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; cursor: pointer;
}
header.side .me .signout:hover { border-color: var(--switch); filter: none; }
.shell > main { padding: 26px 30px 70px; min-width: 0; }

/* Under 800 px the sidebar becomes a strip across the top with the same parts. */
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  header.side {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 8px 10px; padding: 10px 12px;
  }
  header.side .brand-block { padding: 0; display: flex; align-items: baseline; gap: 8px; }
  header.side .brand { font-size: 16px; }
  .mode-switch { margin: 0; }
  header.side .me { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; gap: 8px; }
  header.side .me .who small { display: none; }
  header.side .me .signout { margin: 0; }
  header.side nav { order: 9; flex-basis: 100%; flex-direction: row; overflow-x: auto; gap: 4px; }
  header.side nav a { padding: 6px 10px; gap: 8px; white-space: nowrap; }
  header.side nav a.on { box-shadow: inset 0 -2px 0 var(--switch); }
  .shell > main { padding: 18px 16px 50px; }
}
@media (max-width: 420px) {
  header.side .brand-block .co, header.side .me .who { display: none; }
}

/* ---- Buttons and fields ------------------------------------------------------------------- */
button {
  border: 1px solid var(--acc); background: var(--acc); color: #fff; border-radius: 7px;
  padding: 6px 12px; cursor: pointer; font-weight: 500;
}
button:hover { filter: brightness(1.08); }
button.quiet, button.sm, button.ghost { background: var(--sf); color: var(--ink); border-color: var(--line); filter: none; }
button.quiet:hover, button.sm:hover { border-color: var(--acc); }
button.sm { padding: 2px 9px; font-size: 12.5px; }
button.ghost { border: none; background: none; color: var(--mut); padding: 2px 6px; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button:disabled { opacity: .6; cursor: default; }
a.button { display: inline-block; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--acc); background: var(--acc); color: #fff !important; font-weight: 500; }
a.button:hover { text-decoration: none; }
input, select, textarea { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: var(--sf); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc-s); border-color: var(--acc); }
textarea { width: 100%; resize: vertical; }

/* ---- Shared parts (parts.ts) -------------------------------------------------------------- */
.crumb { font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.crumb a { color: var(--mut) !important; }
.page-top { display: flex; align-items: flex-start; gap: 14px; }
.page-top .sub { margin-bottom: 20px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { display: block; background: var(--sf); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; color: var(--ink); }
.kpi b { display: block; font-size: 26px; font-weight: 650; line-height: 1.15; }
.kpi b .of { font-size: 15px; font-weight: 600; color: var(--mut); }
.kpi.small b { font-size: 19px; }
.kpi span { font-size: 12.5px; color: var(--mut); }
.kpi.bad b { color: var(--bad); }
.kpi.risk b { color: var(--risk); }
a.kpi:hover { border-color: var(--acc); text-decoration: none; }

.card { background: var(--sf); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.card > h2:first-child { margin-top: 0; }
p.note { color: var(--mut); font-size: 12.5px; margin: -4px 0 8px; }
.two { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }

.b { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 1px 9px; white-space: nowrap; vertical-align: middle; line-height: 1.55; }
.b.ok { background: var(--ok-s); color: var(--ok); }
.b.risk { background: var(--risk-s); color: var(--risk); }
.b.bad { background: var(--bad-s); color: var(--bad); }
.b.blue { background: var(--blue-s); color: var(--blue); }
.b.vio { background: var(--vio-s); color: var(--vio); }
.b.gray { background: var(--gray-s); color: var(--mut); }
/* Tone fills for bars and dots. */
.t-ok { background: var(--ok); } .t-risk { background: var(--risk); } .t-bad { background: var(--bad); }
.t-blue { background: var(--blue); } .t-vio { background: var(--vio); } .t-gray { background: #c9ced6; }

.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; flex: none; vertical-align: middle; }
.av.lg { width: 54px; height: 54px; font-size: 20px; }
.av.c0 { background: #0f766e; } .av.c1 { background: #1d4ed8; } .av.c2 { background: #6d28d9; } .av.c3 { background: #b45309; }
.av.c4 { background: #be185d; } .av.c5 { background: #0369a1; } .av.c6 { background: #4d7c0f; } .av.c7 { background: #b91c1c; }
.av.agent { background: #334155; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.who small { display: block; color: var(--mut); font-size: 11.5px; line-height: 1.2; }
a.who:hover { text-decoration: none; }
a.who:hover > span { text-decoration: underline; }
.ref { font-family: var(--mono); font-size: 12px; color: var(--mut); white-space: nowrap; }
a.ref:hover { color: var(--acc); }

.table-scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); text-align: left; padding: 6px 10px; font-weight: 600; white-space: nowrap; }
table.t td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t td.top { vertical-align: top; }
tr.grp td { background: var(--bg); font-size: 12px; font-weight: 600; color: var(--mut); padding: 5px 10px; }
tr.clk { cursor: pointer; }
tr.clk:hover td { background: var(--hover); }
tr.total td { background: var(--bg); font-weight: 600; }

.progress { min-width: 90px; }
.bar { height: 7px; border-radius: 99px; background: var(--gray-s); overflow: hidden; display: flex; min-width: 90px; margin: 3px 0 2px; }
.bar i { display: block; }
.load { display: flex; gap: 3px; }
.load i { width: 10px; height: 14px; border-radius: 2px; background: var(--gray-s); }

.att { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); }
.att:first-of-type { border-top: none; }
a.att:hover { text-decoration: none; }
a.att:hover b { text-decoration: underline; }
.att .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.att .att-text { min-width: 0; overflow-wrap: anywhere; }
.att small { display: block; color: var(--mut); font-size: 12.5px; }
.att .age { margin-left: auto; padding-left: 12px; color: var(--mut); font-size: 12.5px; white-space: nowrap; }

code.c { font: 12px var(--mono); background: var(--gray-s); border-radius: 5px; padding: 1px 6px; white-space: nowrap; color: var(--ink); }
pre.code { background: #14171f; color: #d6dbe4; border-radius: 8px; padding: 12px 14px; font: 12.5px/1.55 var(--mono); overflow: auto; margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout { background: var(--risk-s); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.callout.bad { background: var(--bad-s); }
.fold { color: var(--mut); flex: none; }

.scrim { position: fixed; inset: 0; background: transparent; z-index: 7; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: clamp(500px, 60vw, 720px); max-width: 100vw; background: var(--sf);
  border-left: 1px solid var(--line); box-shadow: -14px 0 40px rgba(0, 0, 0, .14); padding: 22px 24px;
  overflow: auto; z-index: 8; outline: none;
}
.drawer .close { float: right; font-size: 20px; line-height: 1; padding: 0 4px; }
.drawer h1 { font-size: 20px; margin: 4px 0 10px; }
.drawer h2 { margin-top: 18px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; overflow-y: hidden; }
.tabs a, .tabs button { border: none; background: none; border-radius: 0; padding: 8px 14px; color: var(--mut) !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink) !important; }
.tabs a.on, .tabs button.on { color: var(--ink) !important; border-bottom-color: var(--acc); }

.form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line); margin-top: 12px; }

/* Ticket cards with a row per Slice. */
.tk { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; background: var(--sf); }
.tkh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 11px 14px; cursor: pointer; }
.tkh > .mono, .tkh > .sm, .tkh > .b { white-space: nowrap; flex: none; }
.tkh .ti { font-weight: 600; min-width: 0; }
.sl { display: grid; grid-template-columns: 26px minmax(0, 1fr) 150px 190px 170px; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.sl .n { color: var(--mut); font-weight: 600; }
.sl.one { grid-template-columns: 1fr; color: var(--mut); }
.sl.wd { opacity: .55; }
.qi { display: block; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); }
.qi b { font-weight: 600; }
a.qi:hover { text-decoration: none; }
a.qi:hover b { color: var(--acc); }

/* Sign-in. */
.sign-in { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.sign-in-card { width: 100%; max-width: 420px; background: var(--sf); border-radius: 12px; padding: 28px 30px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.sign-in-card .brand { font-weight: 700; font-size: 20px; letter-spacing: .05em; color: var(--ink); }
.sign-in-card .co { font-size: 12px; color: var(--mut); margin-bottom: 22px; }
.sign-in-card h1 { font-size: 19px; margin-bottom: 4px; }
.sign-in-card p { margin: 0 0 14px; }
.sign-in form { display: flex; gap: 8px; }
.sign-in input { flex: 1; min-width: 0; }

.refused-page { display: flex; gap: 10px; align-items: baseline; }
.refused-page p { margin: 0; }

/* ---- The class names pages used before, in the same language ------------------------------ */
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 1px 9px; background: var(--gray-s); color: var(--mut); vertical-align: middle; line-height: 1.55; max-width: 100%; overflow-wrap: anywhere; }
.tag.warn { background: var(--risk-s); color: var(--risk); }
a.tag:hover { text-decoration: none; background: var(--acc-s); color: var(--acc); }
.crumbs { font-size: 13px; color: var(--mut); margin: 0 0 6px; }
.warn { color: var(--risk); }
main h1 { margin-bottom: 14px; }
.page-top h1, .drawer h1 { margin-bottom: 0; }
main h2 { margin-top: 22px; }
main .card h2:first-child, main .panel h2:first-child, main .drawer h2:first-child { margin-top: 0; }

ul.rows { list-style: none; margin: 0 0 16px; padding: 0; background: var(--sf); border: 1px solid var(--line); border-radius: 10px; }
ul.rows li { padding: 10px 14px; border-top: 1px solid var(--line); }
ul.rows li:first-child { border-top: 0; }
table.rows { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--sf); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
table.rows th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); text-align: left; padding: 8px 12px; font-weight: 600; white-space: nowrap; }
table.rows td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.rows td.actions { text-align: right; white-space: nowrap; }
ul.tokens { list-style: none; margin: 0; padding: 0; }
ul.tokens li { display: flex; gap: var(--gap); align-items: baseline; }

.panel { margin: 16px 0; padding: 16px 18px; background: var(--sf); border: 1px solid var(--line); border-radius: 10px; }
form.write { margin: 0 0 12px; }
.fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--mut); }
.fields label.check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 6px; }

.refusal { color: var(--bad); background: var(--bad-s); padding: 8px 12px; border-radius: 8px; margin: 6px 0; }
.write-button .refusal { display: block; text-align: left; white-space: normal; }
.shown-once { background: var(--ok-s); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.shown-once p { margin: 0 0 8px; }
.shown-once code { display: block; font: 13px var(--mono); word-break: break-all; margin-bottom: 8px; user-select: all; }

form.stacked .fields label.wide { flex-basis: 100%; }
form.stacked .fields label.wide input:not([type=file]) { width: 100%; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
ul.numbers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--mut); }
ul.numbers strong { color: var(--ink); }
.plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.lanes { display: flex; flex-direction: column; gap: 10px; }
.lane { background: var(--sf); border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; }
.lane.state-cancelled, .lane.state-done { opacity: .75; }
.lane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lane-no { font: 12px var(--mono); color: var(--mut); }
.pcode { font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: middle; }
.lane-title { flex: 1 1 240px; font-weight: 600; }
.lane-meta { margin: 4px 0 0; font-size: 12.5px; }
.questions { margin: 8px 0; padding: 10px 12px; background: var(--risk-s); border-radius: 8px; }
.agent-step { margin: 8px 0; font-size: 12.5px; color: var(--mut); }
ol.slices { list-style: none; margin: 10px -14px -11px; padding: 0; display: flex; flex-direction: column; }
.slice { border-top: 1px solid var(--line); }
.slice a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px 14px; color: var(--ink) !important; font-size: 13.5px; }
.slice a:hover { text-decoration: none; background: var(--hover); }
.slice.state-withdrawn { opacity: .55; }
.slice-meta { font-size: 12px; color: var(--mut); }
.slice-meta.warn { color: var(--risk); }
.slice-line { flex: 1 1 260px; min-width: 0; }
.lane-body { margin-top: 8px; }
details > summary { cursor: pointer; }
.lane-body summary { color: var(--acc); font-size: 12.5px; }
.brief-fold > summary { color: var(--acc); font-size: 12.5px; margin: 4px 0; }
.text { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; max-height: 24em; overflow: auto; }
.addition { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 4px; }
.addition p { margin: 4px 0; }
ul.files { margin: 4px 0; padding-left: 18px; }
dl.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--mut); font-size: 12.5px; }
dl.facts dd { margin: 0; }

.refused { margin: 6px 0; padding: 8px 12px; background: var(--bad-s); border-radius: 8px; }
details.receipt { border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; margin: 8px 0; background: var(--sf); }
.compare { display: grid; grid-template-columns: minmax(90px, max-content) repeat(3, minmax(0, 1fr)); margin-top: 8px; border-top: 1px solid var(--line); }
.compare .row { display: contents; }
.compare .row > div { padding: 6px 8px; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: break-word; font-size: 12.5px; }
.compare code { overflow-wrap: break-word; word-break: normal; }
/* The git log of a round takes the whole width, under the three columns. */
.compare .row.full > div { grid-column: 1 / -1; }
.compare .repo-log + .repo-log { margin-top: 8px; }
.compare .row.head > div { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--mut); }
.compare .what { color: var(--mut); }
.compare .repo { margin: 0 0 4px; }
pre.git, pre.brief {
  margin: 4px 0; padding: 12px 14px; background: #14171f; color: #d6dbe4; border-radius: 8px;
  font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: break-word; max-height: 32em; overflow: auto;
}
pre.brief { max-height: 48em; }
ol.findings { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.finding, .entry { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; background: var(--sf); }
.entry.state-withheld, .entry.state-retired { opacity: .8; }
.entry.current { border-color: var(--acc); }
.entry .origin { font-size: 12.5px; }
.finding-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 12.5px; }
.finding p, .entry p { margin: 4px 0; }
.finding-reason { font-size: 12.5px; }
.final { margin-top: 12px; }
ul.redactions { margin: 6px 0; padding-left: 18px; font-size: 12.5px; color: var(--mut); }
form.search .fields label.wide { flex: 1 1 240px; }
form.search .fields label.wide input { width: 100%; }
.pager { display: flex; gap: 12px; }
ul.reasons { margin: 4px 0; padding-left: 18px; font-size: 12.5px; color: var(--risk); }
.wiki-section { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.wiki-text { margin: 6px 0; }
.built-from { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; color: var(--mut); }
ol.versions { margin: 4px 0; padding-left: 18px; }
ol.versions li { margin: 2px 0; }
code.plain { white-space: pre-wrap; overflow-wrap: anywhere; }
ul.plain-list { list-style: none; margin: 4px 0 0; padding: 0 0 0 12px; }
ul.plain-list li { padding: 2px 0; }
ul.plain-list.flush { padding-left: 0; margin: 0; }
ul.rows ul.numbers li, ul.rows ul.plain-list li { padding: 0; border-top: 0; }
ul.rows ul.numbers { margin-top: 4px; }
.day-figures { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
ul.day-items { margin: 4px 0 6px; padding-left: 18px; font-size: 12.5px; }
ul.day-items li { overflow-wrap: anywhere; }
ul.rows ul.day-items li { padding: 2px 0; border-top: 0; }
.day-open { margin-top: 6px; }
nav.tabs[data-project-filter] { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }

@media (max-width: 1000px) {
  .two, .three { grid-template-columns: minmax(0, 1fr); }
  .sl { grid-template-columns: 22px minmax(0, 1fr); }
  .sl > :nth-child(n+3) { grid-column: 2; }
  .tkh { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .drawer { padding: 18px 16px; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dd { margin-bottom: 6px; }
  table.rows th:nth-child(3), table.rows td.actions { text-align: left; }
  .compare { grid-template-columns: 1fr; }
  .compare .row.head { display: none; }
  .compare .what { font-weight: 600; color: var(--ink); border-bottom: 0; padding-bottom: 0; margin-top: 6px; }
  .compare .cell::before { content: attr(data-col); display: block; font-size: 11px; color: var(--mut); }
  .page-top { flex-wrap: wrap; }
  .b { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
}

/* Attention rows whose title is the link. */
.att b a { color: var(--ink) !important; }
.att b a:hover { text-decoration: underline; }
.att small.reason { color: var(--ink); opacity: .8; white-space: pre-wrap; }
.att .att-text .ref { margin-right: 6px; }

/* project tabs */
.card.flush { padding: 8px 12px; }
table.t a.pname { font-weight: 650; color: var(--ink) !important; }
table.t td.right { text-align: right; }
table.t tr.archived td { opacity: .7; }
.compact-forms form.write { margin: 0 0 8px; }
.compact-forms .fields { gap: 8px; }
.compact-forms .fields label { flex-direction: row; align-items: center; gap: 6px; }
.compact-forms button { padding: 4px 11px; font-size: 13px; }

/* Company: titles that are links read as titles; several people stacked in one cell. */
main a.title-link { color: var(--ink) !important; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.t .who > span { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p.kstep { font-size: 12.5px; color: var(--mut); line-height: 1.9; margin: 0 0 12px; }
p.kstep code.c { font-size: 11px; color: var(--mut); }
form.kfilter { margin-bottom: 14px; }
form.kfilter .fields { gap: 8px; align-items: center; }
form.kfilter .fields label { flex-direction: row; align-items: center; gap: 6px; }
form.kfilter .fields label.wide { flex: 1 1 260px; }
form.kfilter button { padding: 5px 12px; }
.card.kcard { padding: 4px 18px; }
ol.kentries { list-style: none; margin: 0; padding: 0; }
li.kentry { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 16px; padding: 13px 0; border-top: 1px solid var(--line); }
li.kentry:first-child { border-top: 0; }
li.kentry.current { box-shadow: inset 3px 0 0 var(--acc); padding-left: 10px; }
li.kentry.state-withheld .ktext, li.kentry.state-retired .ktext { color: var(--mut); }
.kbadges { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.kbadges .b { white-space: normal; max-width: 100%; }
a.kb { display: inline-flex; gap: 4px; flex-wrap: wrap; }
a.kb:hover { text-decoration: none; filter: brightness(.95); }
.ktext { font-size: 15px; line-height: 1.45; color: var(--ink); }
.ktext.struck { text-decoration: line-through; color: var(--mut); }
.kmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 5px; font-size: 12.5px; color: var(--mut); }
.kmeta .who { color: var(--mut); gap: 6px; }
.kmeta .av { width: 20px; height: 20px; font-size: 9px; }
p.kmore { margin: 4px 0 0; font-size: 12.5px; color: var(--mut); }
ul.ktopics { list-style: none; margin: 0; padding: 0; }
ul.ktopics li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.ktopics li:first-child { border-top: 0; }
@media (max-width: 700px) { li.kentry { grid-template-columns: minmax(0, 1fr); } }
.works-on { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.works-on .wo { white-space: nowrap; }
.works-on a.ref { color: var(--acc) !important; }
.team-add { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 4px; }
.team-add h3 { font-size: 13px; color: var(--mut); }

/* queue, my work */
ul.qlist { list-style: none; margin: 0; padding: 0; }
ul.qlist .qi-sub { display: block; margin-top: 1px; }
ul.qlist .qi .b { vertical-align: 1px; margin-left: 2px; }
p.qnext { margin: 0 0 6px; }
.qproject-head { font-size: 17px; margin: 8px 0 12px; }
.qproject-head a { color: var(--ink) !important; }
.qproject + .qproject { margin-top: 26px; }
table.t td.qnum { width: 70px; white-space: nowrap; }
table.t td.qwho { width: 190px; }
table.t td.qwide { width: 50%; }
a.tl { color: var(--ink) !important; }
tr.clk:hover a.tl { color: var(--acc) !important; }
table.t td.qage { width: 64px; text-align: right; white-space: nowrap; }
.myday + .myday { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.myday-head { margin-bottom: 4px; }
.myday-figs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 4px; }
dl.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; margin: 0; }
dl.kv dt, dl.kv dd { padding: 9px 10px; border-top: 1px solid var(--line); margin: 0; }
dl.kv dt { color: var(--mut); }
dl.kv dt:first-of-type, dl.kv dt:first-of-type + dd { border-top: 0; }
dl.kv dd code.c { white-space: normal; }
.agent-only { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 12px; }
.agent-only-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.agent-only p.agent-step { margin: 4px 0 0; color: var(--ink); }
p.setup-foot { margin: 10px 0 0; }
/* Setup, ticket 48: code blocks with a Copy control, and the agent files */
.copy-block { position: relative; }
.copy-block > button.copy-btn { position: absolute; top: 6px; right: 6px; padding: 2px 9px; font-size: 12px; z-index: 1; }
.copy-block > pre.code { padding-right: 76px; }
.agent-file { margin: 6px 0; }
details.agent-file { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
details.agent-file > summary { font-size: 12.5px; overflow-wrap: anywhere; }
details.agent-file[open] > summary { margin-bottom: 6px; }
details.agent-file pre.code { max-height: 420px; }
ul.cred-list { list-style: none; margin: 0; padding: 0; }
ul.cred-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
ul.cred-list li:first-child { border-top: 0; }
.setup-two { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }

/* day summary, people */
.ds-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 620px; }
.ds-controls nav.tabs[data-project-filter] { border: 1px solid var(--line); border-radius: 8px; background: var(--sf); margin: 0; padding: 2px; gap: 2px; justify-content: flex-end; }
.ds-controls nav.tabs[data-project-filter] a { padding: 3px 10px; font-size: 12.5px; border: 0; border-radius: 6px; margin: 0; }
.ds-controls nav.tabs[data-project-filter] a.on { background: var(--acc-s); color: var(--acc) !important; }
.ds-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: 12.5px; }
.ds-seg { display: flex; border: 1px solid var(--line); border-radius: 8px; background: var(--sf); padding: 2px; gap: 2px; }
.ds-seg a { padding: 3px 10px; border-radius: 6px; color: var(--mut) !important; white-space: nowrap; }
.ds-seg a:hover { text-decoration: none; color: var(--ink) !important; }
.ds-seg a.on { background: var(--acc-s); color: var(--acc) !important; }
.ds-date { display: inline-flex; align-items: center; gap: 4px; color: var(--mut); }
.ds-date input { padding: 3px 6px; font-size: 12.5px; }
.ds-project > h2 { margin: 18px 0 8px; }
.ds-card { padding: 8px 18px 6px; }
.ds-table { font-size: 13.5px; }
.ds-line { display: grid; gap: 0 8px; align-items: center; padding: 9px 4px; }
.ds-head { padding: 6px 0; }
.ds-head .ds-c { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--mut); font-weight: 600; }
.ds-row { border-top: 1px solid var(--line); }
.ds-row > details > summary, details.ds-row > summary { list-style: none; cursor: pointer; }
.ds-row summary::-webkit-details-marker { display: none; }
.ds-row summary:hover { background: var(--hover); }
.ds-c { min-width: 0; overflow-wrap: anywhere; }
.ds-c small { display: block; color: var(--mut); font-size: 11.5px; font-weight: 400; line-height: 1.3; }
.ds-who { display: flex; align-items: center; gap: 8px; }
.ds-who > span:nth-child(2) { min-width: 0; }
.ds-who .fold { font-size: 11px; }
.ds-it { line-height: 1.35; margin: 1px 0; }
.ds-it .ref { margin-right: 2px; white-space: normal; overflow-wrap: anywhere; color: var(--ink); }
.ds-it .mut { font-size: 12px; }
.ds-nothing { grid-column: 2 / -1; color: var(--mut); }
.ds-total { background: var(--bg); }
.ds-total > summary > .ds-c:first-child, .ds-total > summary strong { font-weight: 600; }
.ds-total .sm, .ds-agent .sm { font-size: 12px; }
.ds-total > summary:hover, .ds-agent > summary:hover { background: transparent; }
.ds-agent > summary { color: var(--mut); font-size: 12.5px; }
.ds-agent > summary strong { color: var(--ink); }
details.ds-row > .day-figures, details.ds-row > p, .ds-row .day-open { margin: 0 0 10px; padding: 10px 14px; background: var(--bg); border-radius: 8px; }
.ds-pad { padding: 8px 0; border-top: 1px solid var(--line); }
.ds-foot { margin: 6px 0 0; max-width: 980px; }
/* Numbers only in the table; names of the columns shown in the row on a phone (.ds-lab). */
.ds-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-head .ds-c { overflow-wrap: normal; word-break: normal; }
.ds-lab { display: none; }
.ds-last .ds-w { display: block; }
.ds-last, .ds-head .ds-n { white-space: normal; }
.ds-other { padding-left: 6px; }
.ds-who .fold { margin-left: -2px; }
.ds-spend { display: block; color: var(--mut); font-size: 11.5px; line-height: 1.3; }
.ds-other { display: block; font-size: 12.5px; line-height: 1.35; }
.ds-notes { margin: 6px 2px 0; }
.ds-notes span + span::before { content: "· "; }
.day-open [data-standing] { margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.day-open [data-standing] h4 { margin: 0 0 4px; }
.ds-row .day-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 18px; align-items: start; }
.day-items li .ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink); }
@media (max-width: 720px) {
  .ds-card { padding: 4px 12px; }
  .ds-card .table-scroll { overflow: visible; }
  .ds-table { min-width: 0 !important; }
  .ds-line.ds-head { display: none !important; }
  .ds-line { display: flex !important; flex-wrap: wrap; gap: 2px 10px; padding: 10px 2px; }
  .ds-line > .ds-c:first-child { flex: 1 0 100%; margin-bottom: 2px; }
  .ds-line .ds-zero { display: none; }
  .ds-n { text-align: left; }
  .ds-lab { display: inline; color: var(--mut); }
  .ds-last { display: flex; gap: 10px; flex-wrap: wrap; }
  .ds-spend { display: flex; gap: 6px; }
  .ds-line .ds-c:not(:first-child) { font-size: 13px; }
  .ds-nothing { flex: 1 0 100%; }
  .ds-row .day-figures { grid-template-columns: 1fr; }
}
@media (max-width: 800px) { .ds-controls { align-items: flex-start; max-width: none; } .ds-picker, .ds-controls nav.tabs[data-project-filter] { justify-content: flex-start; } }
.pp-card { padding: 8px 18px 14px; }
.pp-table td { vertical-align: middle; font-size: 13.5px; }
.pp-roles li { padding: 1px 0; }
.pp-tokens { white-space: nowrap; }
.pp-token-list li { gap: 8px; align-items: center; padding: 1px 0; }
.pp-tokens button.sm, .pp-table td.actions button.sm { color: var(--mut); padding: 1px 8px; font-size: 12px; }
.pp-table td.actions { text-align: right; white-space: nowrap; }
.pp-create { gap: 12px; }
.pp-create form.write { margin: 0; }
.pp-create .fields { align-items: center; flex-wrap: nowrap; }
.pp-create .fields label { flex-direction: row; align-items: center; }
.pp-create .fields label.check { padding-bottom: 0; }
.pp-create input[name=name] { width: 220px; max-width: 100%; }
@media (max-width: 600px) { .pp-create .fields { flex-wrap: wrap; } }
.pp-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Tickets tab: Ticket cards, Slice rows, the opened Slice's drawer. */
.tk .tkh .ti { flex: 0 1 auto; }
.tk .fold-btn { padding: 0 4px; font-size: 13px; }
.tk.state-done, .tk.state-cancelled { opacity: .85; }
.sl .sl-what small { display: block; font-size: 12px; margin-top: 2px; }
.sl.one { display: block; color: var(--mut); font-size: 13px; }
.sl.callout-row { background: var(--risk-s); color: var(--ink); }
.sl.callout-row.bad { background: var(--bad-s); }
.sl .agent-step { margin: 0; }
.sl .lane-body { margin: 0; }
.drawer .drawer-tags { margin: 0 0 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.drawer section[data-panel] { margin-top: 18px; }
.drawer section[data-panel] > h2 { margin: 0 0 8px; }
.lanes .tk { margin-bottom: 0; }
ul.att-list { list-style: none; margin: 0; padding: 0; }
ul.att-list li.att:first-child { border-top: 0; }
.att .lane-head { display: inline; font-weight: 600; }
.att .lane-head a.ref { margin-right: 4px; }
.att .lane-head a:not(.ref) { color: var(--ink) !important; }
.att small.wait-step { margin-top: 3px; font-size: 12px; opacity: .85; }
table.track-groups tr.grp h3 { margin: 0; font-size: 12px; color: var(--mut); }
table.track-groups a.tname { color: var(--ink) !important; font-weight: 600; }
table.track-groups td { vertical-align: top; }
.kpi b span[data-setting] { font-size: inherit; color: inherit; }
/* The Wiki docs' order (Newest or A to Z): small segmented links, as the dashboard's Project filter. */
nav.tabs.wiki-order { width: fit-content; border: 1px solid var(--line); border-radius: 8px; background: var(--sf); margin: 0 0 12px; padding: 2px; gap: 2px; }
nav.tabs.wiki-order a { padding: 3px 10px; font-size: 12.5px; border: 0; border-radius: 6px; margin: 0; }
nav.tabs.wiki-order a.on { background: var(--acc-s); color: var(--acc) !important; }
/* On a phone, each order link is a 44px touch target. */
@media (max-width: 600px) { nav.tabs.wiki-order a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 14px; } }
ul.wiki-cards { list-style: none; margin: 0; padding: 0; }
ul.wiki-cards li.card { margin-bottom: 12px; }
a.wiki-name { font-size: 16px; font-weight: 650; color: var(--ink) !important; }
article.wiki-doc { max-width: 860px; }
h2.wiki-title { font-size: 19px; }
article.wiki-doc .wiki-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 6px; }
article.wiki-doc .wiki-section h3 { font-size: 16px; }
article.wiki-doc .wiki-text { font-size: 15.5px; line-height: 1.65; max-width: 72ch; margin: 6px 0 10px; }
.wiki-versions-h { margin-top: 22px; }

/* Ticket header: badges never break or shrink */
.tkh .b, .tkh .tag { white-space: nowrap; flex: none; overflow-wrap: normal; word-break: normal; }

/* guide ---------------------------------------------------------------------------------------
   The interactive guide (guide.ts): the Guide entry at the foot of the sidebar, a layer that dims
   the page and takes every click, a spotlight cut around the element a step is about, and the
   card beside it (docked to the bottom under 600 px). Above the drawer (z-index 8). */
header.side .guide-open {
  margin-top: auto; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 1px solid var(--side-line); color: var(--side-ink); padding: 8px 10px;
  border-radius: 8px; font-weight: 500; text-align: left; filter: none;
}
header.side .guide-open::before {
  content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 99px;
  background: var(--side-line); color: #fff; font-size: 11.5px; font-weight: 700;
}
header.side .guide-open:hover { background: var(--side2); border-color: var(--switch); }
header.side .guide-open:focus-visible { outline: 2px solid var(--switch); outline-offset: 1px; }
header.side .guide-open + .me { margin-top: 0; }
@media (max-width: 800px) {
  header.side .guide-open { margin: 0 0 0 auto; width: auto; padding: 5px 9px; font-size: 12.5px; }
  header.side .guide-open + .me { margin-left: 0; }
}

.gd-layer { position: fixed; inset: 0; z-index: 40; background: transparent; }
.gd-layer.dim { background: rgba(12, 14, 20, .55); }
.gd-spot {
  position: fixed; z-index: 41; pointer-events: none; border-radius: 9px;
  box-shadow: 0 0 0 2px var(--switch), 0 0 0 200vmax rgba(12, 14, 20, .55);
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
.gd-spot[hidden] { display: none; }
.gd-card {
  position: fixed; z-index: 42; width: 360px; max-width: calc(100vw - 16px); left: 50%; top: 30%;
  background: var(--sf); color: var(--ink); border-radius: 12px; padding: 14px 16px 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); border: 1px solid var(--line);
  transition: left .18s ease, top .18s ease;
}
.gd-card.docked {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 14px 14px 0 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom)); transition: none;
}
.gd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gd-chapter { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--acc); text-transform: uppercase; letter-spacing: .04em; }
.gd-card button { font-size: 13px; padding: 5px 11px; }
.gd-card .gd-menu-btn { background: none; border: 1px solid var(--line); color: var(--mut); padding: 2px 8px; font-size: 12px; }
.gd-card .gd-menu-btn:hover { border-color: var(--acc); color: var(--ink); }
.gd-chapters { list-style: none; margin: 4px 0 8px; padding: 6px; background: var(--bg); border-radius: 8px; }
.gd-chapters button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.gd-chapters button:hover, .gd-chapters button:focus-visible { background: var(--acc-s); }
.gd-chapters button.on { font-weight: 650; color: var(--acc); }
.gd-card h2 { font-size: 16px; margin: 0 0 6px; }
.gd-text { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.gd-missing { margin: 0 0 8px; font-size: 12.5px; color: var(--risk); background: var(--risk-s); border-radius: 7px; padding: 6px 9px; }
.gd-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.gd-count { flex: 1; font-size: 12px; color: var(--mut); }
.gd-card .gd-skip { background: none; border: none; color: var(--mut); padding: 5px 6px; }
.gd-card .gd-skip:hover { color: var(--ink); text-decoration: underline; }
.gd-card .gd-back { background: var(--sf); color: var(--ink); border-color: var(--line); }
.gd-card .gd-back:disabled { opacity: .45; cursor: default; }
.gd-card button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
html.gd-open body { padding-bottom: 45vh; }
@media (max-width: 600px) { html.gd-open body { padding-bottom: 75vh; } }
@media (max-width: 420px) {
  header.side { column-gap: 6px; }
  header.side .guide-open .guide-label { display: none; }
  header.side .guide-open { padding: 4px; border: 0; background: none; }
}
@media (prefers-reduced-motion: reduce) { .gd-spot, .gd-card { transition: none; } }

/* Ticket header: on a wide screen it stays one row; a long title wraps inside its own column */
@media (min-width: 1200px) {
  .tk .tkh { flex-wrap: nowrap; }
  .tk .tkh .ti { flex: 1 1 auto; min-width: 16ch; }
  .tk .tkh .grow { display: none; }
}
.att-rest > summary { cursor: pointer; color: var(--acc); font-weight: 600; font-size: 13px; padding: 10px 0 4px; border-top: 1px solid var(--line); }

/* ---- Ticket 43: written texts with their Markdown rendered (markdown-view.ts) ---------------
   The prototype's Wiki page language: its type scale (headings in em, so a Ticket's 14.5 px and a
   Wiki doc's 15.5 px text both scale), the dark code block, its bordered table with grey heads,
   the grey note callout for a quote, green ticks. */
.md-wrap { margin: 8px 0; min-width: 0; }
.md-wrap > .text, .md-wrap > .wiki-text { margin-bottom: 2px; }
dd > .md-wrap, .cell > .md-wrap, .kbody > .md-wrap, li.entry > .md-wrap { margin-top: 0; }
.md { overflow-wrap: anywhere; min-width: 0; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .65em; white-space: pre-wrap; }
.md-inline { white-space: pre-wrap; }
.md .md-h.md-h { margin: 1.05em 0 .4em; font-weight: 650; color: var(--ink); line-height: 1.3; letter-spacing: normal; text-transform: none; }
.md .md-h.md-h1 { font-size: 1.4em; }
.md .md-h.md-h2 { font-size: 1.22em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md .md-h.md-h3 { font-size: 1.08em; }
.md .md-h.md-h4, .md .md-h.md-h5, .md .md-h.md-h6 { font-size: 1em; }
.md .md-h.md-h5, .md .md-h.md-h6 { color: var(--mut); }
.md strong { font-weight: 650; }
.md code.md-code { font: .86em var(--mono); background: var(--gray-s); color: var(--ink); border-radius: 5px; padding: 1px 5px; }
.md pre.md-pre {
  background: #14171f; color: #d6dbe4; border-radius: 8px; padding: 12px 14px; margin: .3em 0 .85em;
  font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32em; overflow: auto;
}
.md ul, .md ol { margin: 0 0 .65em; padding-left: 1.5em; }
.md li { margin: .2em 0; }
.md li > p { margin: 0 0 .35em; }
.md li > ul, .md li > ol { margin: .2em 0 .3em; }
.md ul.md-tasks { list-style: none; padding-left: .3em; }
.md ul.md-tasks ul.md-tasks { padding-left: 1.4em; }
.md .md-tick {
  display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 7px; vertical-align: -2px;
  border: 1.5px solid #9aa3b0; border-radius: 4px; background: var(--sf); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.md .md-tick.on { background: var(--ok); border-color: var(--ok); }
.md blockquote { margin: 0 0 .8em; padding: 8px 14px; border: 1px solid var(--line); border-left: 4px solid #9aa3b0; border-radius: 10px; background: var(--hover); color: #3b4350; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md .md-table { overflow-x: auto; margin: .2em 0 .9em; max-width: 100%; }
.md table { border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: .92em; }
.md th { background: #f3f4f6; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); text-align: left; padding: 7px 10px; font-weight: 600; vertical-align: bottom; }
.md td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.md .al-c { text-align: center; }
.md .al-r { text-align: right; }
main .md a.md-link { color: var(--acc); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--acc) 40%, transparent); text-underline-offset: 2px; }
main .md a.md-link:hover { text-decoration-color: var(--acc); }
.md .md-image { color: var(--mut); }
.md-switch { background: none; border: 0; padding: 1px 0; font-size: 11.5px; font-weight: 500; color: var(--mut); cursor: pointer; }
.md-switch:hover { color: var(--acc); text-decoration: underline; border: 0; }
.md-switch:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 3px; }

/* Ticket 44: Previous / Next under (and above) a paged list. The prototype has no pager; this one
   is its button.sm (white, a 1 px line, 7 px corners, 12.5 px, the accent border on hover) either
   side of the muted 12.5 px "51–100 of 128" line, at its toolbars' 8 px gaps. */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; font-size: 12.5px; }
.pager-top { margin: 0 0 12px; }
.pager .pg {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--sf);
  color: var(--ink) !important; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.pager a.pg:hover { border-color: var(--acc); text-decoration: none; }
.pager a.pg:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.pager .pg.off { color: var(--mut) !important; opacity: .55; cursor: default; }
.pager .pg-at { flex: 1; text-align: center; color: var(--mut); }
.pager .pg-n { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .pager .pg-at { order: 3; flex-basis: 100%; } .pager > :last-child { margin-left: auto; } }

/* ---- Ticket 46: the visual blocks of the cs-tasks doc format, in the prototype's Wiki docs look
   (prototype/ibwt-company.html, .wk-*): key facts, stepper, cards, marks, badges and dots, callouts,
   a folding tree, a diagram in a titled card, the contents list; and a list's preview box. ---- */
.md .ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; }
[data-section-heading] .md-hi,
.md .md-hi { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 8px; background: var(--blue-s); color: var(--blue); margin-right: .55em; vertical-align: middle; }
[data-section-heading] .md-hi .ic,
.md .md-hi .ic { width: 1.1em; height: 1.1em; }
[data-section-heading]:has(> .md-hi),
.md .md-h:has(> .md-hi) { display: flex; align-items: center; }
.md .md-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: .3em 0 1em; }
.md .md-fact { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border: 1px solid var(--line); border-top: 3px solid #c9ced6; border-radius: 12px; background: var(--hover); min-width: 0; overflow-wrap: anywhere; }
.md .md-fact .fl { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; }
.md .md-fact .fv { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); }
.md .md-fact.ok { border-top-color: var(--ok); }
.md .md-fact.warn { border-top-color: var(--risk); }
.md .md-fact.bad { border-top-color: var(--bad); }
.md .md-fact.info { border-top-color: var(--blue); }
.md ol.md-steps { list-style: none; margin: .5em 0 1.1em; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
.md ol.md-steps > li { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; margin: 0; overflow-wrap: anywhere; line-height: 1.45; }
.md .md-steps .sn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--sf); }
.md .md-steps.staged .sn { background: #c9ced6; }
.md .md-steps.staged li.done .sn { background: var(--ok); }
.md .md-steps.staged li.now .sn { background: var(--blue); }
.md ol.md-steps > li:not(:last-child)::before { content: ""; position: absolute; top: 15px; left: 32px; right: -14px; height: 2px; background: var(--line); }
.md .md-steps strong { margin-top: 7px; }
.md .md-steps .st { color: #4b5563; font-size: .88em; }
@media (max-width: 1000px) {
  .md ol.md-steps { grid-auto-flow: row; gap: 16px; }
  .md ol.md-steps > li { padding-left: 46px; min-height: 34px; }
  .md .md-steps .sn { position: absolute; left: 0; top: 0; }
  .md .md-steps strong { margin-top: 5px; }
  .md ol.md-steps > li:not(:last-child)::before { top: 32px; bottom: -16px; left: 15px; right: auto; width: 2px; height: auto; }
}
.drawer .md ol.md-steps { grid-auto-flow: row; gap: 16px; }
.drawer .md ol.md-steps > li { padding-left: 46px; min-height: 34px; }
.drawer .md .md-steps .sn { position: absolute; left: 0; top: 0; }
.drawer .md .md-steps strong { margin-top: 5px; }
.drawer .md ol.md-steps > li:not(:last-child)::before { top: 32px; bottom: -16px; left: 15px; right: auto; width: 2px; height: auto; }
.md .md-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: .3em 0 1em; }
.md .md-card { display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--hover); min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.md .md-card .ci { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue-s); color: var(--blue); margin-bottom: 4px; }
.md .md-card .ci .ic { width: 18px; height: 18px; }
.md .md-card .cx { color: #4b5563; font-size: .88em; }
/* Marks and badges as cs-tasks draws them (public/style.css .yes/.no, .pill): an icon in a tinted
   circle; a badge with its tone's icon. */
.md .mk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.md .mk .ic { width: 14px; height: 14px; vertical-align: 0; }
.md .mk.ok { color: var(--ok); background: var(--ok-s); }
.md .mk.no { color: var(--bad); background: var(--bad-s); }
.md .md-badge { vertical-align: baseline; display: inline-flex; align-items: center; gap: 4px; padding-left: 7px; }
.md .md-badge .ic { width: 12px; height: 12px; vertical-align: 0; }
/* [text](#slug): a jump within the text, looks like a link. */
.md .md-anchor { color: var(--acc); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--acc) 40%, transparent); text-underline-offset: 2px; cursor: pointer; }
.md .md-anchor:hover { text-decoration-color: var(--acc); }
.md .md-anchor:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 3px; }
/* [[name]] and [text](other.md): a document outside IBWT, not a link (cs-tasks' dead wiki link). */
.md .md-docref { color: var(--mut); text-decoration: underline dotted; text-decoration-color: #9aa3b0; text-underline-offset: 3px; cursor: help; }
.md .md-docref .ic, .md .md-image.elsewhere .ic { width: .95em; height: .95em; margin-right: 3px; vertical-align: -.12em; }
.md .md-image.elsewhere { font-style: italic; cursor: help; }
.md figure.md-figure { margin: .6em 0 1em; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--hover); }
.md figure.md-figure figcaption { margin-top: 4px; color: var(--mut); font-size: .88em; }
.md .md-card .ci.glyph { font-size: 18px; line-height: 1; overflow: hidden; white-space: nowrap; }
.md .md-dwait { min-height: 120px; display: grid; place-items: center; margin: 0; color: var(--mut); font-size: 12.5px; }
.md .md-dheld { color: var(--mut); font-size: 12.5px; margin: 0 0 6px; }
.md .md-dheld .md-draw { font-weight: 600; color: var(--acc); font-size: 12.5px; }
.md .md-dbox.held pre.md-pre, .md .md-dbox.failed pre.md-pre { margin-bottom: 0; }
.md .md-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: #9aa3b0; }
.md .md-dot.s-ok { background: var(--ok); }
.md .md-dot.s-warn { background: var(--risk); }
.md .md-dot.s-bad { background: var(--bad); }
.md .md-dot.s-off { background: #c9ced6; }
.md blockquote.md-callout { --k: var(--blue); display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--k); border-left-width: 4px; border-radius: 10px; padding: 11px 14px; margin: 0 0 1em; background: color-mix(in srgb, var(--k) 8%, #fff); color: var(--ink); }
.md blockquote.md-callout.c-note { --k: #6b7380; }
.md blockquote.md-callout.c-tip { --k: var(--acc); }
.md blockquote.md-callout.c-decision, .md blockquote.md-callout.c-important { --k: var(--vio); }
.md blockquote.md-callout.c-warning, .md blockquote.md-callout.c-gotcha { --k: var(--risk); }
.md blockquote.md-callout.c-error, .md blockquote.md-callout.c-danger { --k: var(--bad); }
.md .md-cico { display: grid; color: var(--k); flex: none; margin-top: 2px; }
.md .md-cico .ic { width: 18px; height: 18px; }
.md .md-cbody { flex: 1; min-width: 0; }
.md .md-cbody > :last-child { margin-bottom: 0; }
.md .md-tree { margin: .3em 0 1em; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--hover); font: 13px/1.75 var(--mono); overflow-x: auto; }
.md .md-tree details > details, .md .md-tree details > .tf { margin-left: 18px; border-left: 1px solid var(--line); padding-left: 10px; }
.md .md-tree summary { cursor: pointer; list-style: none; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.md .md-tree summary::-webkit-details-marker { display: none; }
.md .md-tree summary::before { content: "▸"; color: var(--mut); width: 10px; transition: transform .15s; }
.md .md-tree details[open] > summary::before { transform: rotate(90deg); }
.md .md-tree summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; border-radius: 3px; }
.md .md-tree .tf { display: flex; gap: 7px; align-items: center; padding-left: 17px; white-space: nowrap; }
.md .md-tree .ic { color: var(--blue); }
.md .md-tree .tf .ic { color: var(--mut); }
.md .md-tree .tc { color: var(--mut); font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 12.5px; margin-left: 6px; }
.md figure.md-diagram { margin: .3em 0 1em; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sf); }
.md .md-dtitle { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #f3f4f6; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.md .md-dtitle .ic { color: var(--blue); width: 15px; height: 15px; }
.md .md-dbody { padding: 18px 14px 6px; }
.md iframe.md-dframe { display: block; width: 100%; border: 0; background: transparent; pointer-events: none; }
/* Zoom and pan of a drawn diagram (zoom.ts): the frame takes no pointer events, the box does. */
.md .md-dbox.frame { position: relative; overflow: hidden; outline: none; }
.md .md-dbox.frame:focus-visible { box-shadow: 0 0 0 2px var(--acc); border-radius: 6px; }
.md .md-dpan { transform-origin: 0 0; padding-top: 34px; }
.md .md-dbox.zoomed { cursor: grab; touch-action: none; }
.md .md-dbox.dragging { cursor: grabbing; user-select: none; }
.md .md-zoom { position: absolute; top: 0; right: 0; z-index: 2; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--sf); opacity: .6; transition: opacity .15s; }
.md figure.md-diagram:hover .md-zoom, .md .md-dbox:focus-within .md-zoom, .md .md-dbox.dfull .md-zoom { opacity: 1; }
.md button.md-zoom-b { min-width: 28px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: 600 12px system-ui, sans-serif; cursor: pointer; }
.md button.md-zoom-b:hover { background: var(--acc-s); }
.md .md-dbox.dfull { position: fixed; inset: 0; z-index: 1000; background: var(--sf); padding: 12px; }
.md .md-dbox.dfull .md-dpan { padding-top: 0; }
.md .md-dbox.dfull .md-zoom { top: 12px; right: 12px; }
html.md-dfull-open, html.md-dfull-open body { overflow: hidden; }
@media (max-width: 600px) { .md .md-dbox:not(.dfull) .md-zoom-b:not(.md-zfull) { display: none; } }
@media (hover: none) { .md .md-zoom { opacity: 1; } .md button.md-zoom-b { min-width: 40px; height: 40px; } .md .md-dpan { padding-top: 46px; } }
.md .md-dcap { padding: 4px 14px 14px; text-align: center; font-size: 12.5px; line-height: 1.45; color: var(--mut); }
.md .md-derr { color: var(--bad); font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
.md .md-dbox.failed, .md .md-dbox.held { padding-bottom: 8px; }
.md .md-dbox.failed pre.md-pre { margin-bottom: 0; }
.wk { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1100px; }
.wk-toc { position: sticky; top: 12px; border-left: 2px solid var(--line); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; line-height: 1.35; max-height: calc(100vh - 24px); overflow: auto; }
.wk-toc small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); margin-bottom: 2px; }
main .wk-toc a { color: var(--mut) !important; text-decoration: none; overflow-wrap: anywhere; }
main .wk-toc a:hover, main .wk-toc a:focus-visible { color: var(--acc) !important; }
.wk-toc a.l3 { padding-left: 12px; font-size: 12.5px; }
.wk > article.wiki-doc { margin: 0; }
@media (max-width: 1000px) {
  .wk { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wk-toc { position: static; max-height: none; margin-bottom: 14px; }
}
.md-preview .md-clip { max-height: 15em; overflow: hidden; position: relative; }
.md-preview .md-clip.open { max-height: none; }
.md-preview .md-clip.cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(255, 255, 255, 0), var(--sf)); pointer-events: none; }
.md-actions { display: flex; gap: 14px; align-items: center; }
.md-switch.md-more { font-weight: 600; color: var(--acc); }
/* A badge or mark in a table cell keeps to one line: a narrow table scrolls (.md-table) instead. */
.md td .md-badge, .md th .md-badge { white-space: nowrap; overflow-wrap: normal; max-width: none; }
.md th, .md td { overflow-wrap: break-word; }

/* ---- Ticket 47: a Wiki doc alone in a tab of its own (pages/wiki-alone.ts), its two controls
   beside the version line, the header of the saved .html file (wiki-file.ts), a diagram's picture
   there, the download's off-screen frames, and print. The saved file's stylesheet is cut from this
   file (css-pick.ts), so every rule here that the file's elements match goes into it. ---- */
.doc-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: -4px 0 8px; }
.doc-line p.note { margin: 0; flex: 1 1 320px; }
.doc-ctls { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 12.5px; }
.doc-ctl { background: none; border: 0; padding: 1px 0; font: inherit; font-size: 12.5px; line-height: 1.45; font-weight: 600; color: var(--acc) !important; cursor: pointer; text-decoration: none; filter: none; }
.doc-ctl:hover { text-decoration: underline; filter: none; }
.doc-ctl:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 3px; }
.doc-ctl:disabled { color: var(--mut) !important; cursor: default; text-decoration: none; opacity: 1; }
.doc-progress, .doc-said { color: var(--mut); font-size: 12.5px; }
.doc-progress .doc-ctl { margin-left: 6px; }
main.alone { max-width: 1160px; margin: 0 auto; padding: 18px 30px 60px; min-width: 0; }
.alone-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 16px; font-size: 13px; color: var(--mut); }
.alone-who { margin: 22px 0 0; font-size: 12.5px; color: var(--mut); }
.alone-who button { font: inherit; color: var(--acc); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; text-decoration: underline; }
.alone-brand { font-weight: 700; letter-spacing: .05em; color: var(--ink); }
.alone-where { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.file-head { max-width: 1100px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--sf); font-size: 12.5px; color: var(--mut); }
.file-from { margin: 0 0 8px; overflow-wrap: anywhere; }
dl.file-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 0; }
dl.file-facts dt { color: var(--mut); }
dl.file-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.md img.md-dpic { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.dl-frames { position: fixed; left: -10000px; top: 0; width: 900px; height: 600px; overflow: hidden; pointer-events: none; }
.dl-frames iframe { display: block; width: 900px; height: 600px; border: 0; }
@media (max-width: 600px) {
  main.alone { padding: 12px 14px 40px; }
}
@media print {
  .alone-bar, .alone-who, .doc-ctls, .md-switch, .md-actions, .dl-frames { display: none !important; }
  body { background: #fff; }
  main.alone { max-width: none; padding: 0; }
  .wk { display: block; max-width: none; }
  .wk-toc { position: static; max-height: none; margin-bottom: 14px; }
  article.wiki-doc { border: 0; padding: 0; max-width: none; }
  .md pre.md-pre, .md-preview .md-clip { max-height: none; overflow: visible; }
  .md figure.md-diagram, .md .md-fact, .md .md-card, .md blockquote, .md table { break-inside: avoid; }
}
/* Ticket 50: what to tell your agent (the prototype's "Through an agent only" box), a Ticket's
   own page, proposed Slices (striped, as the prototype's lanes), the Tickets filter */
.tell { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0; background: var(--sf); }
.tell-head { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.tell-whose { margin: 4px 0 6px; font-size: 13px; }
ul.tell-options { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.tell-options li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.tell-label { font-size: 12.5px; font-weight: 600; padding-top: 2px; }
code.c.tell-say { white-space: pre-wrap; overflow-wrap: anywhere; display: block; padding: 4px 8px; }
button.copy-btn { padding: 2px 10px; font-size: 12px; }
.tell.compact { margin: 6px 0 0; padding: 6px 10px; }
.tk .sl.prop { background: repeating-linear-gradient(135deg, var(--sf), var(--sf) 8px, var(--gray-s) 8px, var(--gray-s) 10px); }
.proposal { border: 1px solid var(--line); border-radius: 9px; background: var(--sf); padding: 12px 14px; margin: 10px 0; }
.proposal ol.prop-slices { margin: 8px 0 0; padding-left: 20px; }
.proposal ol.prop-slices > li { margin: 0 0 12px; }
.proposal .prop-line { font-weight: 600; }
.ticket-sections > section { margin: 0 0 18px; }
.ticket-sections h2 { font-size: 15px; margin: 0 0 8px; }
ol.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
ol.history li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
ol.history li:first-child { border-top: 0; }
form.tfilter .fields { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
form.tfilter label { display: flex; flex-direction: column; font-size: 12px; color: var(--mut); gap: 3px; }
form.tfilter label.wide { flex: 1 1 220px; }
form.tfilter select, form.tfilter input { font: inherit; font-size: 13px; }
.tfilter-on { font-size: 12.5px; color: var(--mut); margin: 4px 0 10px; }
.finding-rule { font-size: 12.5px; color: var(--mut); margin: 2px 0; }
@media (max-width: 600px) {
  ul.tell-options li { grid-template-columns: minmax(0, 1fr) auto; }
  ul.tell-options li .tell-label { grid-column: 1 / -1; }
  ol.history li { grid-template-columns: 1fr; gap: 0; }
  form.tfilter label { flex: 1 1 45%; }
}
.tkh a.ti { flex: 1 1 260px; color: var(--ink); text-decoration: none; }
.tkh a.ti:hover { text-decoration: underline; }
.tell.compact ul.tell-options li { grid-template-columns: minmax(0, 1fr) auto; }
.tell.compact .tell-label { display: none; }
.tell.compact code.c.tell-say { font-size: 11.5px; }
@media (max-width: 600px) {
  .tell.compact ul.tell-options li { grid-template-columns: 1fr; justify-items: start; }
}
/* Fix round of 50: a decision that is not the viewer's, one plain line; the compact box's
   "whose" line kept small */
p.tell-waits { margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--line); font-size: 13px; }
.tell.compact .tell-whose { font-size: 12px; margin: 2px 0 4px; }
/* Fix round of 50: a finding as the server sends it: a question to the person in its own style,
   files by repository name with the near ones marked, the files not counted folded */
li.finding.question { border-left: 3px solid var(--blue); padding-left: 10px; }
p.finding-question { margin: 4px 0; font-size: 13.5px; }
.tag.ask { background: var(--blue-s); color: var(--blue); }
.tag.near { font-size: 11px; }
ul.finding-files { list-style: none; margin: 4px 0; padding: 0; font-size: 12.5px; }
ul.finding-files li { margin: 2px 0; overflow-wrap: anywhere; }
details.finding-excused { margin: 4px 0; font-size: 12.5px; color: var(--mut); }
details.finding-excused summary { cursor: pointer; }
details.finding-excused ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 12px; }
details.finding-excused li { overflow-wrap: anywhere; }
