/* Companizer's portal. The look comes from a print shop's job dockets: proofing paper, an ink-dark rail, the four
   process colours as the colour bar every ticket earns patch by patch, and one spot colour for what needs a person. */
:root {
  --ink: #141b2d; --ink-2: #232d47; --ink-3: #39445f;
  --paper: #f1f2ee; --sheet: #ffffff; --rule: #d9dcd3; --rule-strong: #b6baae;
  --text: #141b2d; --soft: #525c73; --on-ink: #c5cbdb;
  --cyan: #0097cc; --magenta: #e5007e; --yellow: #ffd400; --key: #141b2d;
  --spot: #e8490c; --spot-wash: #fdeee6; --bad: #c8102e; --bad-wash: #fbe9ec; --ok: #1a7f4b;
  --sans: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; caret-color: var(--spot); }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
small { font-size: 13px; color: var(--soft); }
code, .mono { font-family: var(--mono); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.rail { background: var(--ink); color: var(--on-ink); padding: 24px 14px 18px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; padding: 0 10px; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
#nav h2 { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8791aa; margin: 22px 10px 6px; }
#nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--on-ink); min-height: 38px; transition: background .15s, color .15s; }
#nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav a:hover { background: var(--ink-2); color: #fff; }
#nav a[aria-current] { background: var(--ink-2); color: #fff; font-weight: 600; }
#nav a.add { justify-content: flex-start; color: #8f99b3; }
.count { background: var(--spot); color: #fff; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 2px; flex: none; }
.count.plain { background: var(--rule); color: var(--ink); }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 0; border-top: 1px solid var(--ink-3); font-size: 14px; }
.who .quiet { color: var(--on-ink); }
.who .quiet:hover { color: #fff; background: var(--ink-2); }
#view { min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 40px 44px 96px; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.gate-box { background: var(--sheet); padding: 36px; max-width: 440px; border-radius: 4px; }
.gate-box h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 10px; }

/* ------------------------------------------------------------------------------------------- page heads */
.top { margin-bottom: 28px; }
.top h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.top h1 .num { color: var(--spot); }
.top h1 .tag { font-size: 13px; letter-spacing: 0; align-self: center; }
.id-big { font-size: .62em; font-weight: 600; color: var(--soft); letter-spacing: 0; }
.lede { color: var(--soft); font-size: 16px; margin-top: 8px; max-width: 72ch; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); margin: 36px 0 10px; }
.sheet > h2:first-child, .sheet-head h2, form > h2:first-child, .intake section > h2 { margin-top: 0; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--soft); font-size: 14px; }
.meta { color: var(--soft); font-size: 13px; }
.empty { color: var(--soft); padding: 18px 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--soft); margin-bottom: 14px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; padding: 4px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs.path { font-family: var(--mono); font-size: 13px; margin: 0 0 12px; }
.crumbs b { color: var(--ink); }

/* ------------------------------------------------------------------------------ the colour bar and tags */
.strip { display: inline-grid; grid-template-columns: repeat(4, 18px); gap: 2px; flex: none; vertical-align: middle; }
.strip.none { visibility: hidden; }
.p { height: 14px; background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.p.full, .p.now { box-shadow: none; }
.p0.full, .p0.now { background: var(--cyan); }
.p1.full, .p1.now { background: var(--yellow); }
.p2.full, .p2.now { background: var(--magenta); }
.p3.full, .p3.now { background: var(--key); }
.p.now { animation: press 1.4s ease-in-out infinite; }
.p.bad { box-shadow: none; background: repeating-linear-gradient(135deg, var(--bad) 0 3px, #fff 3px 6px); }
.p.flag { box-shadow: inset 0 0 0 2px var(--spot); background: var(--spot-wash); }
@keyframes press { 50% { opacity: .28; } }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--soft); white-space: nowrap; }
.tag::before { content: ""; width: 8px; height: 8px; background: var(--rule-strong); flex: none; }
.tag.you { color: #a83205; } .tag.you::before { background: var(--spot); }
.tag.live { color: #00668c; } .tag.live::before { background: var(--cyan); animation: press 1.4s ease-in-out infinite; }
.tag.ok { color: var(--ink); } .tag.ok::before { background: var(--key); }
.tag.bad { color: var(--bad); } .tag.bad::before { background: var(--bad); }

/* --------------------------------------------------------------------------------------------- dockets */
.dockets { display: grid; gap: 10px; }
.dockets:not(:empty) { margin-bottom: 8px; }
.docket { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 16px; align-items: start; background: var(--sheet); padding: 20px 22px; border-radius: 3px; box-shadow: 0 1px 0 var(--rule), 0 8px 24px -18px rgb(20 27 45 / .35); text-decoration: none; margin: 0; }
a.docket { transition: transform .2s var(--ease), box-shadow .2s; align-items: center; }
a.docket:hover { transform: translateY(-1px); box-shadow: 0 1px 0 var(--rule), 0 14px 28px -18px rgb(20 27 45 / .5); }
.spot { width: 14px; height: 14px; background: var(--spot); margin-top: 5px; }
a.docket .spot { margin-top: 0; align-self: start; position: relative; top: 5px; }
.docket-body { display: grid; gap: 6px; min-width: 0; }
.docket h3 { font-size: 19px; line-height: 1.3; }
.docket .says { color: var(--text); max-width: 80ch; overflow-wrap: anywhere; }
.docket textarea { margin-top: 8px; }
.docket .meta a { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------------------------------------ rows */
.rows { background: var(--sheet); border-radius: 3px; box-shadow: 0 1px 0 var(--rule); }
.row { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, auto) auto; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--rule); text-decoration: none; min-height: 50px; }
.row:first-child { border-top: 0; }
a.row { transition: background .15s; }
a.row:hover { background: #f8f9f6; }
.row .id { font: 600 13px var(--mono); color: var(--soft); white-space: nowrap; }
.row .title { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.row .title small { flex-basis: 100%; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.needs .title small { color: #a83205; }
.row.project { grid-template-columns: minmax(0, 1fr) minmax(0, auto) 120px; }
.row.project .title b { font-size: 17px; letter-spacing: -.01em; }
.files-list .row { grid-template-columns: 16px minmax(0, 1fr) auto; min-height: 42px; padding-block: 8px; color: var(--ink); }
.row .actions { margin: 0; }
div.row { grid-template-columns: 76px minmax(0, 1fr) auto; }
progress { appearance: none; -webkit-appearance: none; border: 0; height: 8px; width: 120px; background: var(--rule); border-radius: 0; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--rule); }
progress::-webkit-progress-value { background: var(--key); }
progress::-moz-progress-bar { background: var(--key); }
.group { margin-top: 0; }

/* ------------------------------------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule-strong); margin: -6px 0 26px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--soft); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }

/* ---------------------------------------------------------------------------------------------- sheets */
.sheet { background: var(--sheet); padding: 24px 26px; border-radius: 3px; box-shadow: 0 1px 0 var(--rule); margin-bottom: 14px; min-width: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.cols > div > h2:first-child { margin-top: 0; }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.pages { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 20px; }
.pages a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 3px; text-decoration: none; color: var(--soft); min-height: 38px; }
.pages a:hover { background: #e7e9e2; color: var(--ink); }
.pages a[aria-current] { background: var(--ink); color: #fff; font-weight: 600; }
.pages a.add { justify-content: flex-start; }
.folds { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; align-items: start; margin: 4px 0 0; }
.fold { background: var(--sheet); border-radius: 3px; box-shadow: 0 1px 0 var(--rule); margin-bottom: 14px; }
.folds .fold { margin: 0; }
.folds .fold[open] { grid-column: 1 / -1; }
.fold > summary { display: flex; align-items: center; gap: 8px; padding: 13px 18px; cursor: pointer; font-weight: 600; list-style: none; border-radius: 3px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: #f8f9f6; }
.fold > form, .fold > .pre { padding: 6px 18px 20px; }
.banner { background: var(--spot-wash); color: #7a2503; padding: 12px 16px; border-radius: 3px; margin-top: 14px; overflow-wrap: anywhere; box-shadow: inset 0 0 0 1px #f6c9b4; }
.banner.bad { background: var(--bad-wash); color: #8d0b20; box-shadow: inset 0 0 0 1px #f0b9c2; }
.banner.calm { background: var(--sheet); color: var(--text); box-shadow: 0 1px 0 var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }

/* ----------------------------------------------------------------------------------------------- forms */
form { display: grid; gap: 16px; margin: 0; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field small, .check small, .choice small, .drop small { font-weight: 400; display: block; }
input[type=text], input[type=number], textarea, select { font: inherit; font-weight: 400; color: var(--text); background: var(--sheet); border: 1.5px solid var(--rule-strong); border-radius: 3px; padding: 9px 11px; width: 100%; min-height: 42px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6a7388; }
input:hover, textarea:hover, select:hover { border-color: var(--ink-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(0 151 204 / .28); }
input:disabled, select:disabled { background: var(--paper); color: var(--soft); }
textarea.code, pre.code { font: 13px/1.55 var(--mono); tab-size: 2; }
textarea.tall { min-height: 420px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; align-items: start; }
button { font: inherit; font-weight: 600; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 3px; padding: 0 16px; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, color .15s, transform .1s; }
button:hover { background: var(--ink); color: #fff; }
button:active { transform: translateY(1px); }
button.primary { background: var(--ink); color: #fff; }
button.primary:hover { background: var(--ink-3); border-color: var(--ink-3); }
button.big { min-height: 48px; padding: 0 26px; font-size: 16px; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.danger:hover, button.danger[data-sure] { background: var(--bad); color: #fff; }
button.quiet { border-color: transparent; background: transparent; color: var(--soft); font-weight: 500; padding: 0 10px; }
button.quiet:hover { background: var(--paper); color: var(--ink); }
button.quiet[data-sure] { color: var(--bad); }
button.icon-only { padding: 0; width: 32px; min-height: 32px; }
button:disabled { opacity: .5; cursor: default; }
button.busy { cursor: progress; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; cursor: pointer; }
.check input, .choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
fieldset.inline { display: flex; flex-wrap: wrap; gap: 8px 22px; }
fieldset.inline legend { float: left; width: 100%; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1.5px solid var(--rule-strong); border-radius: 3px; cursor: pointer; background: var(--sheet); transition: border-color .15s; }
.choice label:hover { border-color: var(--ink-3); }
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice b { display: block; }
.reveal { display: grid; gap: 14px; margin-top: 14px; }
.intake { gap: 0; max-width: 820px; }
.intake section { padding: 26px 0; border-top: 1px solid var(--rule-strong); display: grid; gap: 14px; }
.intake section:first-child { border-top: 0; padding-top: 0; }
.intake > .actions { padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.drop { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; align-items: center; padding: 18px; border: 1.5px dashed var(--rule-strong); border-radius: 3px; cursor: pointer; background: var(--sheet); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--ink); border-style: solid; background: #f8f9f6; }
.drop b { display: block; }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.files:empty { display: none; }
.files li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--sheet); border-radius: 3px; box-shadow: 0 1px 0 var(--rule); min-height: 44px; }
.files .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files progress { width: 80px; }
.secret { font: 13px/1.5 var(--mono); background: var(--paper); padding: 12px 14px; border-radius: 3px; overflow-wrap: anywhere; user-select: all; }

/* -------------------------------------------------------------------------------------- content blocks */
.md { max-width: 74ch; overflow-wrap: anywhere; }
.md > * + * { margin-top: 10px; }
.md > :first-child { margin-top: 0; }
.md h2 { font-size: 22px; letter-spacing: -.02em; text-transform: none; color: var(--ink); margin: 0; }
.md h3 { font-size: 17px; margin-top: 22px; }
.md h4 { font-size: 15px; margin-top: 16px; }
.md ul { margin: 8px 0 0; padding-left: 20px; }
.md li { margin: 4px 0; }
.md li.task { list-style: none; position: relative; margin-left: -20px; padding-left: 24px; }
.md li.task::before { content: ""; position: absolute; left: 0; top: 4px; width: 13px; height: 13px; box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.md li.task.checked::before { background: var(--key); box-shadow: none; }
.md code, .sub code { background: var(--paper); padding: 1px 5px; border-radius: 2px; }
pre.code { background: var(--paper); padding: 14px 16px; border-radius: 3px; overflow: auto; margin: 0; white-space: pre; }
pre.source { max-height: 72vh; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.picture { max-width: 100%; height: auto; display: block; background: var(--paper); }
.notes { list-style: none; margin: 16px 0 0; padding: 0; }
.notes li { padding: 14px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px; }
.notes p { max-width: 80ch; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 9px; font-size: 14px; }
.e { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.e time { color: var(--soft); font-size: 13px; }
.e span { overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); font-weight: 700; }
th, td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td small { display: block; }

/* ------------------------------------------------------------------------------------------------ runs */
.run { background: var(--sheet); border-radius: 3px; box-shadow: 0 1px 0 var(--rule); margin-bottom: 8px; }
.run > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.run > summary::-webkit-details-marker { display: none; }
.run .what { font-weight: 600; }
.run summary .meta { margin-left: auto; }
.inside { padding: 0 16px 16px; display: grid; gap: 12px; }
.facts { display: grid; gap: 8px; }
.facts:empty { display: none; }
.facts ul { margin: 6px 0 0; padding-left: 18px; }
.log { background: var(--ink); color: #d5daea; font: 12.5px/1.55 var(--mono); padding: 12px 14px; border-radius: 3px; max-height: 420px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.log.tall { max-height: 68vh; }
.log:empty::before { content: "Nothing yet."; color: #8791aa; }
.m { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 1px 0; }
.m .t { color: #7c87a3; }
.m .b { white-space: pre-wrap; overflow-wrap: anywhere; }
.m.SYSTEM .b { color: #9aa5c0; }
.m.PERSON .b { color: var(--yellow); }
.m.question .b { color: #ffb08f; font-weight: 600; }
.m.bad .b { color: #ff8a9b; }
.m.good .b { color: #7fe0b0; }
.next p { max-width: 70ch; }
.next > * + * { margin-top: 14px; }
.intake .field > span { font-size: 15px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 3px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 12px 32px -12px rgb(20 27 45 / .6); z-index: 20; animation: rise .25s var(--ease); }
#toast.bad { background: var(--bad); }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }

/* --------------------------------------------------------------------------------------------- narrower */
@media (max-width: 980px) {
  .cols, .split { grid-template-columns: minmax(0, 1fr); }
  .pages { position: static; flex-direction: row; flex-wrap: wrap; }
  .pages a { background: var(--sheet); box-shadow: 0 1px 0 var(--rule); }
}
@media (max-width: 780px) {
  .shell { display: block; }
  .rail { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 10px 12px 0; padding-top: max(10px, env(safe-area-inset-top)); }
  .brand { font-size: 17px; padding: 6px 4px; flex: 1; }
  .who { border: 0; padding: 0; }
  .who span { display: none; }
  #nav { order: 3; flex: 1 0 100%; flex-direction: row; overflow-x: auto; gap: 2px; padding: 6px 0 8px; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  #nav h2 { display: none; }
  #nav a { flex: none; min-height: 40px; padding: 8px 12px; }
  .page { padding: 24px 16px 96px; }
  .top h1 { font-size: 27px; }
  .lede { font-size: 15px; }
  .docket { grid-template-columns: 12px minmax(0, 1fr); padding: 16px; gap: 12px; }
  a.docket > .icon { display: none; }
  .spot { width: 12px; height: 12px; }
  .docket h3 { font-size: 17px; }
  .docket .actions button.primary { flex: 1; min-height: 46px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .row .id { grid-column: 1; grid-row: 1; }
  .row .title { grid-column: 1 / -1; grid-row: 2; }
  .row .meta { grid-column: 1; grid-row: 3; text-align: left; }
  .row .strip, .row > .tag, .row > button { grid-column: 2; grid-row: 1; justify-self: end; }
  .row.project { grid-template-columns: minmax(0, 1fr) auto; }
  .row.project .title { grid-row: 1; grid-column: 1; }
  .row.project progress { grid-row: 1; grid-column: 2; width: 72px; align-self: center; }
  .row.project .meta { grid-row: 2; grid-column: 1 / -1; white-space: normal; }
  .files-list .row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .files-list .row > * { grid-row: 1; grid-column: auto; }
  div.row { grid-template-columns: minmax(0, 1fr) auto; }
  div.row .actions { grid-column: 1 / -1; grid-row: 3; }
  .sheet { padding: 18px 16px; }
  .e { grid-template-columns: minmax(0, 1fr); gap: 0; }
  button { min-height: 44px; }
  textarea.tall { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* The team: models and jobs, one ruled entry each. */
.team h2 { margin: 26px 0 4px; }
.crews { list-style: none; margin: 10px 0 16px; padding: 0; border-top: 1px solid var(--rule); }
.crew { position: relative; display: grid; gap: 12px; padding: 16px 44px 16px 0; border-bottom: 1px solid var(--rule); }
.crew > .quiet { position: absolute; top: 12px; right: 0; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
.crew-head { display: grid; gap: 2px; }
.crew-head small { color: var(--soft); font-size: 14px; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; align-items: start; }
.crew-grid output { min-height: 40px; display: flex; align-items: center; font-weight: 600; }
.crew-grid .field > span { display: grid; }
.warn { margin: 0; color: #a83205; font-size: 14px; }
.row .title .job { font: 600 12px var(--mono); color: var(--soft); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 1px 6px; }
@media (min-width: 1100px) { .crew-grid.model { grid-template-columns: minmax(90px, .7fr) 1.5fr 1.3fr .8fr 1fr; } }
.repo-line { margin: 4px 0 16px; overflow-wrap: anywhere; }

/* A worker with what it can run, and a sign-in in progress under it. */
.worker { border-top: 1px solid var(--rule); }
.worker:first-child { border-top: 0; }
.worker .row { border-top: 0; grid-template-columns: 76px minmax(0, 1fr) auto; }
.worker .row .actions { justify-content: flex-end; }
.signin { padding: 4px 18px 18px 110px; display: grid; gap: 8px; }
.signin p, .signin ol { margin: 0; }
.signin ol { padding-left: 20px; display: grid; gap: 8px; }
.signin a { overflow-wrap: anywhere; }
.code-big { font: 600 22px/1.2 var(--mono); letter-spacing: .06em; background: var(--paper); padding: 4px 10px; border-radius: 3px; user-select: all; white-space: nowrap; }
@media (max-width: 780px) { .signin { padding-left: 18px; } .worker .row { grid-template-columns: 76px minmax(0, 1fr); } .worker .row .actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* The machine's load: three meters, each a figure, a bar and the last minutes. */
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px; }
@media (max-width: 780px) { .meters { grid-template-columns: minmax(0, 1fr); } }
.meter { display: grid; gap: 6px; align-content: start; min-width: 0; }
.meter h3 { font-size: 14px; font-weight: 600; color: var(--soft); }
.meter .figure { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.meter .sub { margin: 0; }
.gauge { display: block; width: 100%; height: 6px; }
.gauge .track { fill: var(--rule); } .gauge .fill { fill: var(--ink); } .gauge.high .fill { fill: var(--spot); }
.trend { display: block; width: 100%; height: 44px; margin-top: 6px; border-bottom: 1px solid var(--rule); }
.trend polyline { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-linejoin: round; }
.meters .up { grid-column: 1 / -1; margin: 0; }

/* Archived projects: one quiet line under the projects. */
#nav a.shelf { color: #8f99b3; }
#nav a.shelf small { color: inherit; font: 600 12px var(--mono); }

/* The project's preview: one line under its name. */
.preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; padding: 10px 16px; background: var(--sheet); border-radius: 3px; box-shadow: 0 1px 0 var(--rule); min-width: 0; }
.preview[hidden] { display: none; }
.preview .what { font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.preview a { font-weight: 600; overflow-wrap: anywhere; }
.preview a.tag { text-decoration: none; }
.preview button { margin-left: auto; }
.preview button + button { margin-left: 0; }
