:root {
  --fg: #1c1d1f;
  --muted: #5f6368;
  --bg: #fbfbfa;
  --rule: #e3e3e0;
  --accent: #9a6a1c;
  --danger: #a3321f;
  /* One per engine, for the badge that says which model searched. Apart
     from the accent and from danger, and legible as text on the page. */
  --engine-chatgpt: #1a7f5a;
  --engine-claude: #8b3f8f;
  --engine-gemini: #2f5fc4;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e3;
    --muted: #9a9da1;
    --bg: #151617;
    --rule: #2a2c2e;
    --accent: #d9a54a;
    --danger: #e07a63;
    --engine-chatgpt: #4cc2a0;
    --engine-claude: #cf8ad6;
    --engine-gemini: #7fa6f5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 var(--sans);
}

/* --- frame ---------------------------------------------------------------- */

/* The site header is defined once, with the application frame below. */

main {
  max-width: 64rem;
  padding: 2rem;
}

h1 { font-size: 1.6rem; font-weight: 600; margin: 0.25rem 0 1.25rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 2.25rem 0 0.75rem; }

a { color: var(--accent); }

.muted { color: var(--muted); }

/* --- code ----------------------------------------------------------------- */

code, pre { font-family: var(--mono); font-size: 0.92em; }

pre {
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  overflow-x: auto;
}

.secret { user-select: all; }

.code-display {
  font-family: var(--mono);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  margin: 1.25rem 0 0.5rem;
}

/* --- tables --------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; font-size: 0.93em; }

th {
  text-align: left;
  font-weight: 600;
  font-size: 0.78em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding: 0.4rem 1rem 0.4rem 0;
}

td {
  border-bottom: 1px solid var(--rule);
  padding: 0.45rem 1rem 0.45rem 0;
  vertical-align: top;
}

th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }

.status { font-family: var(--mono); font-size: 0.88em; }
.status-revoked, .status-expired { color: var(--muted); }

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1.5rem;
}
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* --- forms ---------------------------------------------------------------- */

.stack > * + * { margin-top: 0.9rem; }
.stack label { display: block; }
.narrow { max-width: 24rem; }

input[type="text"], input[type="email"], input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem 0.55rem;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
}

button {
  font: inherit;
  padding: 0.35rem 0.95rem;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
  cursor: pointer;
}

button.secondary { color: var(--fg); background: transparent; }
button.link { padding: 0; color: var(--fg); background: none; border: 0; }
button.link:hover { color: var(--accent); }

input:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

form.inline { display: inline; margin: 0; }
.inline-actions { display: flex; gap: 0.75rem; }

.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 0.25rem 0; }

.notice {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--accent);
}

/* --- artifacts: runs, analyses, the toolkit ------------------------------- */

.crumb { margin: 0; color: var(--muted); font-size: 0.9em; }
.subject { font-size: 1.35rem; margin: 0.35rem 0 0.4rem; }
.meta { color: var(--muted); margin: 0 0 1.5rem; }

.answer {
  white-space: pre-wrap;
  line-height: 1.6;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--rule);
}

details { margin: 0.5rem 0; }
details > summary { cursor: pointer; }
details pre { max-height: 32rem; }

table.compact { width: auto; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { margin: 0.2rem 0; }


ol.questions li { margin: 0.25rem 0; }
.tag {
  font-family: var(--mono);
  font-size: 0.8em;
  padding: 0 0.35rem;
  border: 1px solid var(--rule);
  color: var(--muted);
}

.status-completed, .status-pass { color: var(--fg); }
.status-failed, .status-fail, .status-error { color: var(--danger); }
.status-queued, .status-running, .status-partial, .status-not_applicable { color: var(--muted); }

/* Evidence strength is understated on purpose: weaker claims are quieter. */
.evidence-suggestive, .evidence-experimental { color: var(--muted); font-style: italic; }

.tool { margin-bottom: 2.5rem; max-width: 44rem; }
.tool textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.45rem 0.55rem;
  font: inherit; color: var(--fg); background: transparent; border: 1px solid var(--rule);
}
.tool input[type="number"] {
  display: block; width: 8rem; margin-top: 0.25rem; padding: 0.4rem 0.55rem;
  font: inherit; color: var(--fg); background: transparent; border: 1px solid var(--rule);
}
fieldset.engines { border: 0; padding: 0; margin: 0; display: flex; gap: 1.25rem; }
fieldset.engines legend { padding: 0; margin-bottom: 0.25rem; }
label.check { display: inline-flex; align-items: center; gap: 0.35rem; }

/* --- sharing ------------------------------------------------------------- */

input.share-url {
  width: 100%;
  max-width: 44rem;
  padding: 0.4rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
}
.shared-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
/* Under a report, the footer sits in the report's text column. */
main.report .shared-footer { max-width: calc(66rem - 4.5rem); margin: 4rem auto 0; transform: translateX(2.25rem); }

/* --- home and docs -------------------------------------------------------- */

.hero { max-width: 48rem; }
.lede { font-size: 1.05rem; }

/* Terminal output is part of the visual identity: shown, not screenshotted. */
pre.terminal { line-height: 1.45; background: transparent; }

/* The docs' own pages, as secondary navigation in the header's style. */
.doc-nav {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: calc(1.15 * var(--u)); row-gap: calc(0.35 * var(--u));
  padding-bottom: 0.75rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: calc(0.85 * var(--u));
}
.doc-nav a { color: var(--muted); text-decoration: none; }
.doc-nav a:hover { color: var(--fg); }
.doc-nav a[aria-current="page"] { color: var(--accent); }
.doc-nav .raw-link { margin-left: auto; }

.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 70rem) {
  .doc:has(.toc) { grid-template-columns: 12rem minmax(0, 1fr); }
  .toc { position: sticky; top: 1rem; align-self: start; font-size: 0.88em; }
}

.prose { max-width: 46rem; }
.prose h1 { margin-top: 0; }
.prose h3 { font-size: 0.98rem; margin: 1.75rem 0 0.5rem; }
.prose table { margin: 1rem 0; }
.prose li { margin: 0.2rem 0; }
.prose :not(pre) > code { padding: 0 0.2rem; border: 1px solid var(--rule); }

.endpoint, .schema { margin: 1.25rem 0 1.75rem; }
.endpoint h4, .schema h4 { margin: 0 0 0.4rem; font-weight: 600; }
.method { color: var(--accent); margin-right: 0.35rem; }

/* --- the index: home and dashboard ---------------------------------------- */

/* Four text roles: heading (sans, bold), body (sans), label (mono, uppercase,
   muted) and data (mono). Physical treatment is a small vocabulary: .outlined,
   .offset-shadow, .floating-action. The grid does the rest. */
main.wide { max-width: 88rem; }

.index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 3rem;
  row-gap: 3rem;
  align-items: start;
}
.span-2 { grid-column: span 2; }

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.object > * { margin: 0; }
.object > * + * { margin-top: 1rem; }
.object ul.plain li { margin: 0 0 0.6rem; }
.object ul.plain li:last-child { margin-bottom: 0; }
.index pre { border: 0; padding: 0; }
/* Commands wrap rather than scroll: a column is narrower than a terminal. */
.index pre.terminal { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Ledgers: figures aligned in mono, names in sans, no rules between rows. */
table.ledger { width: auto; font-size: 0.92em; }
table.ledger th, table.ledger td {
  border-bottom: 0;
  padding: 0.2rem 1.5rem 0.2rem 0;
  white-space: nowrap;
}
table.ledger th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding-bottom: 0.6rem;
}
table.ledger td:last-child, table.ledger th:last-child { padding-right: 0; }
table.ledger td.num { font-family: var(--mono); font-size: 0.95em; }
table.ledger .wrap { white-space: normal; }
/* IDs are for finding things again, not for reading: quiet until wanted. */
table.ledger a:has(> code) { color: var(--muted); }
table.ledger a:has(> code):hover { color: var(--accent); }

.scroll { overflow-x: auto; }

/* Outlined figures: a thick square border with the page colour behind it. */
.outlined {
  position: relative;
  border: 2px solid var(--fg);
  background: var(--bg);
  padding: 1.5rem 1.75rem;
}

/* A dotted shadow set down and to the right, as if printed slightly off-register.
   Two strips, so nothing is drawn under the figure itself. */
.offset-shadow::before, .offset-shadow::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-image: radial-gradient(var(--fg) 1.1px, transparent 1.4px);
  background-size: 4px 4px;
  opacity: 0.7;
}
.offset-shadow::before { top: 10px; right: -10px; bottom: -10px; width: 8px; }
.offset-shadow::after { left: 10px; right: -10px; bottom: -10px; height: 8px; }

/* An action that hangs off the bottom edge of its outlined figure. */
.has-action { padding-bottom: 2.5rem; margin-bottom: 1.5rem; }
.floating-action {
  position: absolute;
  z-index: 1;
  left: 1.75rem;
  bottom: 0;
  transform: translateY(50%);
  padding: 0.45rem 1rem;
  border: 2px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.floating-action:hover { color: var(--accent); border-color: var(--accent); }

/* The intro. */
.intro { margin-top: 1rem; }
.intro h1 { font-size: 1.8rem; margin: 0; }
.intro .lede { font-size: 1.25rem; line-height: 1.45; max-width: 34rem; margin-top: 1.25rem; }
.intro pre.terminal { font-size: 1.05rem; margin-top: 1.75rem; }
.intro pre.terminal + p { margin-top: 1.25rem; }

/* The four things you can do: one size, whatever each one holds. */
.tools { margin-top: 3rem; grid-auto-rows: 1fr; align-items: stretch; }
.tools > :not(.capability) { align-self: start; }
.capability { display: flex; flex-direction: column; padding: 1.75rem 1.75rem 2.75rem; }
.capability > table.ledger { align-self: flex-start; }
.capability > p.muted:last-of-type { margin-top: auto; padding-top: 1.25rem; }
.capability h2 { font-size: 1.4rem; line-height: 1.25; margin: 0; }
.capability > * + * { margin-top: 1.25rem; }
.capability pre.terminal { margin-top: 1.5rem; }
.capability ul.plain li { margin-bottom: 0.7rem; }
.capability .findings li { margin-bottom: 0.9rem; }
.capability .label + * { margin-top: 0.75rem; }
.colophon { margin: 0; font-size: 0.9em; }

/* The signed-in readout: an instrument set above the editorial page. */
.activity { margin: 0.5rem 0 4rem; }
.activity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
.activity .account { font-family: var(--mono); font-size: 0.85em; color: var(--muted); }
.activity table.ledger { width: 100%; }
.activity table.ledger td { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.activity td.figures { font-family: var(--mono); font-size: 0.95em; }
.activity pre { border: 0; padding: 0; margin: 0; }
.activity .empty > * + * { margin-top: 0.75rem; }
.tally { margin: 1.25rem 0 0; font-size: 0.9em; }

@media (max-width: 64rem) {
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
}

@media (max-width: 40rem) {
  .index { grid-template-columns: minmax(0, 1fr); row-gap: 2.75rem; }
  .span-2 { grid-column: auto; }
  main { padding: 1.25rem; }
  .outlined { padding: 1.25rem; }
  .has-action { padding-bottom: 2.25rem; }
  .tools { grid-auto-rows: auto; }
  .capability { padding: 1.5rem 1.25rem 2.5rem; }
  .capability h2 { font-size: 1.25rem; }
  .floating-action { left: 1.25rem; }
  .intro .lede { font-size: 1.15rem; }
  /* On a phone the subject matters more than the whole ULID; the full ID is one tap away. */
  .activity td:first-child code {
    display: inline-block;
    max-width: 9ch;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Textareas and selects outside the toolkit (a project's context, a member's
   role) read like the text inputs beside them. */
.stack textarea {
  display: block; width: 100%; max-width: 24rem; font: inherit; color: inherit;
  padding: 0.45rem 0.6rem; border: 1px solid var(--rule); background: var(--bg);
}
.stack select, td select { font: inherit; padding: 0.15rem 0.3rem; }


/* --- fanouts: what each model searched -------------------------------------- */

/* Which model is the loudest thing in a row; its name is always written out,
   so the colour only repeats what the text says. */
.engine-badge {
  --engine: var(--muted);
  display: inline-flex; align-items: baseline; gap: 0.4em;
  font-weight: 600; color: var(--engine); white-space: nowrap;
}
.engine-badge::before {
  content: ""; width: 0.6em; height: 0.6em; border-radius: 50%;
  background: var(--engine); transform: translateY(-0.05em);
}
a.engine-badge { text-decoration: none; }
a.engine-badge:hover { text-decoration: underline; }
.engine-chatgpt { --engine: var(--engine-chatgpt); }
.engine-claude { --engine: var(--engine-claude); }
.engine-gemini { --engine: var(--engine-gemini); }

.crumb a { color: inherit; }
.crumb .sep { margin: 0 0.35em; }
.crumb .here { color: var(--fg); }
/* --- a result, read as a typeset report ------------------------------------ */

/* Two layers. The application around a result is sans and mono, small and
   quiet. The result itself is set like a technical report: a serif for what
   is read, a gutter for section and reference numbers, prose at a reading
   measure, tables and code allowed the full width of the page. Colour is for
   status and links. */

:root { --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }

/* Shared by any page that shows an engine's answer (the run page too). */
.answer-text { font-size: 1.0625rem; line-height: 1.65; max-width: 68ch; overflow-wrap: break-word; }
.answer-text > :first-child { margin-top: 0; }
.answer-text p, .answer-text ul, .answer-text ol { margin: 0 0 0.9em; }
.answer-text li { margin: 0.25em 0; }
.answer-text h4, .answer-text h5, .answer-text h6 { font-size: 1em; font-weight: 600; margin: 1.6em 0 0.5em; }
.answer-text a { text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.answer-text table { display: block; overflow-x: auto; margin: 1rem 0; font-size: 0.88em; }
.answer-text :not(pre) > code { padding: 0 0.2rem; border: 1px solid var(--rule); }
.answer-text blockquote { margin: 1em 0; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--muted); }
/* In a report the answer spans the column; its prose keeps the measure (below). */
.artifact .answer-text { max-width: none; }

button.action {
  padding: 0; border: 0; background: none; font: inherit; color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
button.action:hover { color: var(--fg); }

.identifier { display: inline-flex; align-items: baseline; gap: 0.5em; }
.identifier code { color: var(--muted); font-size: 0.9em; }
.identifier .copy {
  padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.85em;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.2em;
}
.identifier .copy:hover { color: var(--fg); }
.nowrap { white-space: nowrap; }

/* The page. */
main.report { max-width: none; padding: 3.5rem 2rem 6rem; }
/* Three spacing levels, and only three: between the report's numbered
   sections, between the regions inside a section, and inside a region. */
.artifact {
  --gutter: 4.5rem;
  --measure: 40rem;
  --space-major: 4.5rem;
  --space-region: 3.25rem;
  --space-inner: 0.75rem;
  max-width: 66rem;
  margin: 0 auto;
  padding-left: var(--gutter);
}
/* Section numbers hang in the gutter, set against the heading like a report's. */
.artifact .section-no {
  display: inline-block; width: var(--gutter); margin-left: calc(-1 * var(--gutter));
  padding-right: 1.1rem; text-align: right;
  font-family: var(--serif); font-weight: 400; color: var(--muted);
  font-variant-numeric: tabular-nums lining-nums;
}
.artifact { --rule-strong: color-mix(in srgb, var(--fg) 85%, transparent); }
@media (prefers-color-scheme: dark) { .artifact { --rule-strong: color-mix(in srgb, var(--fg) 45%, transparent); } }

/* Title matter. */
.artifact-header { max-width: 52rem; }
.kicker { margin: 0 0 1.5rem; font-size: 0.8rem; color: var(--muted); }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--fg); }
.kicker .sep { margin: 0 0.5em; opacity: 0.6; }
.artifact-title {
  font-family: var(--serif); font-weight: 400; font-size: 2.1rem; line-height: 1.2;
  letter-spacing: -0.005em; max-width: 32ch; margin: 0 0 0.9rem;
  white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: balance;
}
.dateline { margin: 0; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dateline .status { font-family: inherit; font-size: inherit; }
.artifact-controls {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem;
  margin-top: 1.4rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.8rem;
}
.artifact-actions { display: flex; gap: 1.25rem; align-items: baseline; }
.artifact-hint { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--muted); }
.artifact-hint a { color: inherit; }

/* Sections. */
.artifact h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.25;
  margin: 0 0 2rem; letter-spacing: -0.005em;
}
.artifact h2 .status { font-family: var(--sans); font-size: 0.8rem; margin-left: 0.75rem; vertical-align: 0.25em; }
/* Every numbered section opens the same way: the major gap, a rule, then its heading. */
.summary, .response, .analysis, .report-section { margin-top: var(--space-major); padding-top: 2.25rem; border-top: 1px solid var(--rule); }
/* Under every section heading, one line in Dromad's voice saying what the section is. */
.section-deck { margin: -1.4rem 0 2rem; max-width: var(--measure); font-size: 0.9rem; color: var(--muted); }


/* Tables, as a report sets them: a rule above, one under the head, one
   below; no boxes and no row rules; figures aligned. */
.artifact table.booktabs, .artifact .answer-text table {
  width: auto; border-collapse: collapse;
  border-top: 1.5px solid var(--rule-strong); border-bottom: 1.5px solid var(--rule-strong);
  font-variant-numeric: tabular-nums lining-nums;
}
.artifact table.booktabs th, .artifact .answer-text th {
  text-transform: none; letter-spacing: 0; color: var(--fg);
  font-weight: 400; font-size: inherit; text-align: left; vertical-align: bottom;
  border-bottom: 1px solid var(--rule-strong); padding: 0.55rem 1.75rem 0.45rem 0;
}
.artifact table.booktabs td, .artifact .answer-text td {
  border-bottom: 0; padding: 0.4rem 1.75rem 0.4rem 0; vertical-align: top;
}
.artifact table.booktabs tbody tr:first-child td, .artifact .answer-text tbody tr:first-child td { padding-top: 0.7rem; }
.artifact table.booktabs tbody tr:last-child td, .artifact .answer-text tbody tr:last-child td { padding-bottom: 0.7rem; }
.artifact table.booktabs :is(th, td):last-child, .artifact .answer-text :is(th, td):last-child { padding-right: 0; }
.artifact table.booktabs .num { text-align: right; }

/* A figure: one bar per answer on one scale, labelled directly with its
   counts, so no legend has to be decoded. The words say what the tones say. */
.figure { margin: 0; }
table.usage { width: 100%; max-width: 60rem; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
table.usage th, table.usage td { border: 0; padding: 0.4rem 0; vertical-align: middle; }
table.usage thead th { padding: 0; border: 0; }
table.usage tbody tr:first-child :is(th, td) { padding-top: 0.2rem; }
table.usage tbody th { text-align: left; text-transform: none; letter-spacing: 0; color: var(--fg); font-family: var(--serif); font-weight: 400; font-size: 1.05rem; width: 7.5rem; padding-right: 1.25rem; white-space: nowrap; }
table.usage tbody th a { color: var(--fg); text-decoration: none; }
table.usage tbody th a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
table.usage td.bar { width: 100%; }
.bar-line { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.bar-label { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.bar-label .n { font-family: var(--serif); font-size: 1.05rem; color: var(--fg); }
.bar-label .sep { margin: 0 0.25rem; }
table.usage .status { font-family: var(--sans); font-size: 0.8rem; }
.track { display: flex; gap: 2px; height: 0.75rem; min-width: 3px; }
.seg { display: block; min-width: 3px; }
.seg:last-child { border-radius: 0 2px 2px 0; }
.seg-cited { background: color-mix(in srgb, var(--fg) 82%, transparent); }
.seg-seen { background: color-mix(in srgb, var(--fg) 20%, transparent); }
.seg-unknown { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--fg) 35%, transparent) 0 2px, transparent 2px 5px); }
/* A term with a definition: dotted underline, the definition on hover or focus. */
.term { position: relative; cursor: help; text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 0.25em; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.term-def {
  position: absolute; z-index: 5; top: calc(100% + 0.5rem); left: 0; width: min(18rem, 80vw);
  padding: 0.6rem 0.75rem; border: 1px solid var(--rule); background: var(--bg);
  box-shadow: 0 4px 16px color-mix(in srgb, #000 12%, transparent);
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.45; color: var(--fg);
  text-align: left; white-space: normal; text-decoration: none;
  display: none;
}
/* Shown only when asked for; hidden, it takes no room, so it cannot widen the page. */
.term:hover .term-def, .term:focus .term-def, .term:focus-within .term-def { display: block; }
.caption { margin: var(--space-inner) 0 0; font-size: 0.8rem; color: var(--muted); max-width: var(--measure); }
.caption-label { color: var(--fg); font-weight: 600; margin-right: 0.3em; }

/* External output: what another system returned. A tinted field with a
   firm rule down its left edge and its source named in words; no box. Set
   for reading, never as code. Its provider's details sit with the run. */
.external {
  margin: 0; width: fit-content; max-width: 100%;
  border-left: 2px solid color-mix(in srgb, var(--fg) 45%, transparent);
  background: color-mix(in srgb, var(--fg) 2.5%, var(--bg));
  padding: 0.85rem 1.6rem 1.05rem 1.3rem;
}
/* The boundary's name: whose text this is, small and spaced, not a badge. */
.external-label {
  display: flex; align-items: baseline; gap: 0.4rem;
  margin: 0 0 0.75rem; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.external-source { font-weight: 600; color: var(--fg); }
.external-kind::before { content: "·"; margin-right: 0.4rem; }
.external .answer-text > :last-child { margin-bottom: 0; }
/* A collapsible answer opens as a preview that fades out; the button shows
   it all. Only with JavaScript: without it the answer is simply whole. */
.external-toggle { display: none; }
.js .external.collapsible:not(.open) .answer-text {
  position: relative; max-height: 10.5rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
  mask-image: linear-gradient(to bottom, #000 45%, transparent);
}
/* A preview that ends at a whole paragraph needs no fade. */
.js .external.collapsible.natural:not(.open) .answer-text { -webkit-mask-image: none; mask-image: none; }
.js .external-toggle {
  display: inline-block; margin-top: 0.6rem; padding: 0; border: 0; background: none;
  font: inherit; font-size: 0.8rem; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
.js .external-toggle:hover { color: var(--fg); }
.js .external-toggle[hidden] { display: none; }

/* Dromad's reference mark on a link the answer cited: the same [n] as the list below. */
a.cite { white-space: nowrap; }
a.cite::after {
  content: "[" attr(data-ref) "]"; margin-left: 0.15em; font-family: var(--sans); font-size: 0.7em;
  color: var(--accent); vertical-align: 0.3em; text-decoration: none; display: inline-block;
}
/* Normalised emphasis. A good document is mostly regular weight: the
   model's run-in labels and headings are set in the sans at semibold
   (lighter than the serif's bold), inline bold reads as italic, bold in
   a table is plain, and code is never bold. */
.external strong { font-family: var(--sans); font-weight: 560; font-size: 0.9em; letter-spacing: 0.005em; }
.external strong.soft { font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: 0; font-style: italic; }
.external strong.plain { font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.external strong code, .external th code { font-weight: 400; }
.external :is(h4, h5, h6) { font-family: var(--sans); font-weight: 560; letter-spacing: 0.005em; }

/* The answer: someone else's text, set as a short document. */
.artifact .answer-text { font-family: var(--serif); font-size: 1.125rem; line-height: 1.62; }
.artifact .answer-text > :is(p, ul, ol, blockquote, h4, h5, h6, hr) { max-width: var(--measure); }
/* Every answer's block spans the column, whatever it holds: the boundary is
   the same for each engine; the prose inside keeps its reading measure. */
.artifact .external { margin: 0; width: auto; }
/* Inside the boundary the answer is quieter than the report around it:
   body size, tighter leading, smaller headings, a denser table. */
.artifact .external .answer-text { font-size: 1.07rem; line-height: 1.55; }
/* The reading measure in characters, so smaller type does not mean longer lines. */
.artifact .external .answer-text > :is(p, ul, ol, blockquote, h4, h5, h6, hr) { max-width: 58ch; }
.artifact .external .answer-text p, .artifact .external .answer-text ul, .artifact .external .answer-text ol { margin-bottom: 0.7em; }
.artifact .external .answer-text li { margin: 0.2em 0; }
.artifact .external .answer-text h4 { font-size: 0.92em; margin: 1.4em 0 0.35em; }
.artifact .external .answer-text :is(h5, h6) { font-size: 0.88em; margin: 1.3em 0 0.3em; }
.artifact .external .answer-text table { font-size: 0.86rem; line-height: 1.42; margin: 1.1rem 0 1.25rem; }
.artifact .external .answer-text :is(th, td) { padding-top: 0.28rem; padding-bottom: 0.28rem; padding-right: 1.25rem; }
.artifact .external .answer-text th { padding-top: 0.35rem; }
.artifact .external .answer-text :not(pre) > code { font-size: 0.8em; }
.artifact .answer-text p, .artifact .answer-text ul, .artifact .answer-text ol { margin: 0 0 0.85em; }
.artifact .answer-text ul, .artifact .answer-text ol { padding-left: 1.35em; }
.artifact .answer-text li { margin: 0.3em 0; padding-left: 0.2em; }
.artifact .answer-text li > :is(ul, ol) { margin: 0.3em 0 0.4em; }
.artifact .answer-text li::marker { color: var(--muted); }
.artifact .answer-text ol > li::marker { font-variant-numeric: tabular-nums; }
/* An answer's own headings, below the report's: size and space, not weight. */
.artifact .answer-text h4 { font-size: 0.95em; margin: 1.9em 0 0.5em; }
.artifact .answer-text :is(h5, h6) { font-size: 0.88em; margin: 1.7em 0 0.4em; }
.artifact .answer-text blockquote { font-style: italic; }
.artifact .answer-text a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.artifact .answer-text a:hover { color: var(--accent); }
.artifact .answer-text :not(pre) > code {
  font-size: 0.78em; padding: 0.05em 0.25em; border: 0;
  background: color-mix(in srgb, var(--fg) 4.5%, transparent);
}
.artifact .answer-text pre {
  font-size: 0.82rem; line-height: 1.5; border: 0; border-left: 1px solid var(--rule);
  padding: 0.25rem 0 0.25rem 1.25rem; margin: 1.25rem 0; max-width: 100%;
}
.artifact .answer-text hr { border: 0; height: 1px; width: 5rem; background: var(--rule); margin: 2rem 0; }
.artifact .answer-text table {
  display: block; overflow-x: auto; width: max-content; max-width: 100%;
  margin: 1.75rem 0 2rem; font-size: 0.93rem; line-height: 1.5;
}
.artifact .answer-text td { min-width: 7rem; max-width: 34rem; }

.artifact h3.subhead {
  font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1.1rem;
  margin: 2.25rem 0 0.8rem;
}
.artifact .note { font-family: var(--serif); font-style: italic; color: var(--muted); max-width: var(--measure); }

/* Appendices open on a quiet row: its name, then Show or Hide. */
.appendix > summary {
  list-style: none; display: flex; align-items: baseline; gap: 1rem;
  padding: 0.55rem 0; border-top: 1px solid var(--rule); color: var(--muted); cursor: pointer;
}
.appendix > summary::-webkit-details-marker { display: none; }
.appendix > summary::after { content: "Show"; color: var(--muted); margin-left: auto; }
.appendix[open] > summary::after { content: "Hide"; }
.appendix > summary:hover, .appendix > summary:hover::after { color: var(--fg); }

.run-error { margin: 0; font-family: var(--serif); max-width: var(--measure); }
/* Structured records: Dromad's own data, ruled and aligned, to be scanned
   rather than read. Narrative is typeset; structure is ruled. The rules
   mark rows, the head, the group and the columns that matter: a rule
   above and below, none down the sides, so a record sits in the page
   rather than in a box. Labels are mono and small, as on the home page;
   values are ordinary type; links are the only colour. */
.artifact { --rule-mid: color-mix(in srgb, var(--fg) 32%, transparent); }
table.records {
  width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-mid); border-bottom: 1px solid var(--rule-mid);
  font-family: var(--sans); font-size: 0.9rem; line-height: 1.4; font-variant-numeric: tabular-nums lining-nums;
}
table.records th {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 0.4rem 0.8rem; border-bottom: 1px solid var(--rule-mid);
}
table.records td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.records tbody tr:last-child td { border-bottom: 0; }
table.records :is(th, td):first-child { padding-left: 0; }
table.records :is(th, td):last-child { padding-right: 0; }
/* The index is a reference, not a value: small, faint, no rule of its own. */
table.records :is(th, td).idx {
  width: 2.4rem; padding-right: 0.6rem; font-family: var(--mono); font-size: 0.7rem;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}
table.records :is(th, td).dom {
  width: 1%; white-space: nowrap; font-family: var(--mono); font-size: 0.76rem; color: var(--muted);
  border-left: 1px solid var(--rule);
}
table.records :is(th, td).narrow { width: 1%; white-space: nowrap; border-left: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; }
table.records .num { text-align: right; }
table.records .mono { font-family: var(--mono); font-size: 0.8rem; }
table.records .how { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-left: 0.3rem; }
/* A query is language: ordinary type, in a column that says it is data. */
table.records td.query { font-size: 0.93rem; }
table.records-sources td:nth-child(2) { font-size: 0.93rem; }
table.records tbody tr:hover td { background: color-mix(in srgb, var(--fg) 3%, transparent); }
/* Rows read across on one line of type. The head keeps one size whatever
   the column: set after the cell rules so they cannot enlarge it. */
table.records td { vertical-align: baseline; }
table.records thead th, table.records thead th:is(.idx, .dom, .narrow) {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted); vertical-align: bottom;
}

a.rec-link { color: var(--fg); text-decoration: none; }
a.rec-link:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.records-note { margin: 0.45rem 0 0; font-size: 0.78rem; color: var(--muted); }
.dom-inline { display: none; }
@media (max-width: 40rem) {
  /* On a phone the domain goes under its title, and the run's fields stack. */
  table.records :is(th, td).dom { display: none; }
  .dom-inline { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 0.15rem; overflow-wrap: anywhere; }
  table.records :is(th, td) { padding-left: 0.6rem; padding-right: 0.6rem; }
  table.records :is(th, td).idx { width: 2.4rem; white-space: nowrap; }
  table.records td { overflow-wrap: anywhere; }
  table.records-exec thead { display: none; }
  table.records-exec, table.records-exec :is(tbody, tr, td) { display: block; width: auto; }
  table.records-exec td, table.records-exec td.narrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; width: auto; border: 0; border-bottom: 1px solid var(--rule); text-align: left; white-space: normal; }
  table.records.records-exec :is(th, td) + :is(th, td) { border-left: 0; }
  table.records-exec td:last-child { border-bottom: 0; text-align: left; }
  table.records-exec .identifier, table.records-exec .identifier * { white-space: nowrap; overflow-wrap: normal; }
  table.records-exec td[data-label]::before {
    content: attr(data-label); flex: none; width: 5.5rem;
    font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  }
}

/* Subsections of an engine section, each with a short landmark label. On a
   wide page the label hangs in the left margin, right-aligned in the same
   column as the section numbers and centred on the subsection's top rule,
   so the margin reads as an outline: RESPONSE, SEARCHES, CITED SOURCES,
   OTHER SOURCES, EXECUTION. The data keeps the full column. Narrower, the
   label sits above its content in the same type. */
.sub { position: relative; margin-top: var(--space-region); }
.sub:first-of-type { margin-top: 0; }
h2 + .sub, .section-deck + .sub { margin-top: 0; }
/* The landmarks are the page's one structural use of colour: amber, like
   links, so the four regions of an engine stand out at scanning speed. */
.sub-label {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem;
  font-family: var(--mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
  margin-bottom: var(--space-inner);
}
/* A region's count belongs to the region, not to its name: it sits at the
   right end of the region's top rule (on the label's line when narrow). */
.sub-count {
  position: absolute; top: 0; right: 0; margin: 0; line-height: 1;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.02em; color: var(--muted);
  font-variant-numeric: tabular-nums; transform: translateY(calc(-100% - var(--space-inner) / 2));
}
.table-note { margin: var(--space-inner) 0 0; font-size: 0.78rem; color: var(--muted); }
.table-note .note-label { font-style: italic; margin-right: 0.2rem; }
/* One rule for the margin: a label's top aligns with the top edge of the
   region it names, whether that edge is a table's rule or the answer's field. */
@media (min-width: 1270px) {
  .artifact .sub-label {
    position: absolute; top: 0; right: calc(100% + 0.5rem); margin: 0;
    line-height: 1; justify-content: flex-end; padding-top: 0.45rem;
  }
  /* A short amber tick leads from the label to the region it names. */
  .artifact .sub-label::after {
    content: ""; flex: none; width: 0.9rem; height: 1px; background: var(--accent); opacity: 0.7;
  }
}
@media (max-width: 1269px) {
  .sub-count { top: 0.1rem; transform: none; }
  /* With no label to share a line with, the count takes its own, above the table. */
  .sub > .sub-count:first-child { position: static; margin-bottom: 0.45rem; text-align: right; }
}

/* Sources: one table, two states. The cited rows lead; a row at their foot
   says how many more the search found and opens them in place, dimmer,
   under a NOT CITED divider. */
table.records .more-toggle td { padding: 0; border-bottom: 0; }
.more-button {
  display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0 0.6rem 3rem; border: 0; border-top: 1px solid var(--rule-mid); background: none;
  font: inherit; font-size: 0.85rem; color: var(--muted); text-align: left; cursor: pointer;
}
.more-button:hover { color: var(--fg); }
.more-button .more-state { color: var(--accent); font-size: 0.82rem; white-space: nowrap; }
.more-button:hover .more-state { color: var(--fg); }
.more-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.records tbody.more-rows td { color: var(--muted); }
table.records tbody.more-rows a.rec-link { color: color-mix(in srgb, var(--fg) 62%, transparent); }
table.records tbody.more-rows a.rec-link:hover { color: var(--accent); }
table.records tbody.more-rows td.idx { color: color-mix(in srgb, var(--muted) 55%, transparent); }
table.records tbody.more-rows .how { margin-left: 0.5rem; }
table.records tr.more-divider td {
  padding: 0.9rem 0 0.35rem; border-bottom: 1px solid var(--rule-mid);
  font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted);
}
/* Only with JavaScript are the extra rows folded away; without it they show. */
.more-toggle { display: none; }
.js .more-toggle { display: table-row-group; }
.js .more-rows:not(.shown) { display: none; }
/* With the toggle row there, it is the transition: the divider is for when there is no toggle. */
.js tr.more-divider { display: none; }
.js .more-rows.shown tr:nth-child(2) td { border-top: 1px solid var(--rule-mid); }

/* Which engine you are reading: once a section's own heading has scrolled
   away, a slim bar with its number and name holds the top of the window
   until the next engine's section takes over. It takes no room in the flow. */
.engine-bar {
  position: sticky; top: 0; z-index: 4; height: 2.4rem; margin: 0 0 -2.4rem calc(-1 * var(--gutter));
  display: flex; align-items: center;
  background: var(--bg); border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg); opacity: 0; visibility: hidden; transition: opacity 120ms ease;
}
.engine-bar .section-no { font-family: var(--serif); font-size: 1rem; letter-spacing: 0; text-transform: none; vertical-align: 0; }
.engine-bar.stuck { opacity: 1; visibility: visible; }

/* More rows of the same state (the rest of a long list) are not dimmed:
   only a different state is. */
table.records tbody.more-rows.same td { color: inherit; }
table.records tbody.more-rows.same a.rec-link { color: var(--fg); }
table.records tbody.more-rows.same td.idx { color: color-mix(in srgb, var(--muted) 75%, transparent); }
table.records tbody.more-rows.same :is(td.dom, td.narrow) { color: var(--muted); }

/* A coverage figure: the whole bar is every run; the heavy part, those that cited it. */
.cov-track { width: 58%; background: color-mix(in srgb, var(--fg) 9%, transparent); border-radius: 0 2px 2px 0; }
.cov-track .seg { height: 100%; }

/* A matrix of states: marks centred under their column. */
table.records-matrix :is(th, td).mark { width: 1%; white-space: nowrap; text-align: center; border-left: 1px solid var(--rule); padding-left: 1rem; padding-right: 1rem; }
table.records-matrix td.mark { font-size: 0.85rem; }
table.records-matrix td.state-absent, table.records-matrix td.state-unknown { color: var(--muted); }
table.records-matrix td.state-seen { color: var(--muted); }
table.records-prompts td:first-child { font-size: 0.9rem; }
table.records tr.tracked td.dom-cell { color: var(--fg); font-weight: 600; }
table.records tr.none td { color: var(--muted); }
a.page-link { display: block; font-size: 0.85rem; }
td.dom-cell { font-family: var(--mono); font-size: 0.82rem; }
table.records-pages td:first-child { font-size: 0.93rem; }
table.records-pages td.dom { font-size: 0.76rem; }
@media (max-width: 40rem) {
  /* On a phone a record keeps its essential columns; the rest wait for a wider screen. */
  .artifact table.records .opt { display: none; }
  .artifact table.records-matrix :is(th, td).mark { padding-left: 0.4rem; padding-right: 0.4rem; }
  /* The prompts grid keeps its prompts readable and scrolls sideways in its own frame. */
  .artifact table.records-prompts td:first-child { min-width: 13rem; }
  .artifact code { overflow-wrap: anywhere; }
  .artifact .scroll { overflow-x: auto; }
}

/* The share controls at a report's end sit with the appendices, in their voice. */
.appendix-block { margin-top: var(--space-major); font-size: 0.85rem; }
.artifact .appendix-block h2 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; margin: 0 0 var(--space-inner); }
ul.run-ids { list-style: none; padding: 0; columns: 3 16rem; column-gap: 2rem; }
ul.run-ids li { padding: 0.1rem 0; }
ul.run-ids a { color: var(--muted); }

/* Execution: provenance on one quiet line. */
.exec-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.6rem; margin: 0;
  padding: 0.55rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: 0.8rem; color: var(--muted);
}
.exec-row .mono { font-family: var(--mono); }
.exec-row .exec-link { margin-left: auto; color: var(--accent); }
.exec-row .exec-link:hover { color: var(--fg); }

/* Execution: the run as fields. */
table.records-exec td { vertical-align: baseline; }
table.records-exec :is(th, td) + :is(th, td) { border-left: 1px solid var(--rule); }
table.records-exec .act { text-align: right; white-space: nowrap; }
table.records-exec .act a { color: var(--accent); font-size: 0.82rem; }

/* Scope: what this report holds, said once near the title. */
.scope { margin: 0.3rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* Further analysis: Dromad's own reading across the answers. */

.finding { max-width: var(--measure); font-family: var(--serif); font-size: 1.06rem; line-height: 1.6; margin: 0; }
.sub .table-note + .finding, .sub .scroll + .finding { margin-top: var(--space-inner); }
.finding a { color: inherit; }
table.records-overlap td.dom-cell { font-family: var(--mono); font-size: 0.82rem; }
table.records-pages td:first-child { font-size: 0.93rem; }
table.records-pages td.dom { font-size: 0.76rem; }
@media (max-width: 40rem) {
  /* On a phone a record keeps its essential columns; the rest wait for a wider screen. */
  .artifact table.records .opt { display: none; }
  .artifact table.records-matrix :is(th, td).mark { padding-left: 0.4rem; padding-right: 0.4rem; }
  /* The prompts grid keeps its prompts readable and scrolls sideways in its own frame. */
  .artifact table.records-prompts td:first-child { min-width: 13rem; }
  .artifact code { overflow-wrap: anywhere; }
  .artifact .scroll { overflow-x: auto; }
}
table.records-overlap :is(th, td).mark { width: 7rem; text-align: center; border-left: 1px solid var(--rule); }
table.records-overlap td.mark { font-size: 0.8rem; }
ul.related { list-style: none; padding: 0; margin: 0; max-width: var(--measure); font-size: 0.9rem; }
ul.related li + li { margin-top: var(--space-inner); }
.analysis .caption a { color: inherit; }

/* Fields: one thing's facts, a name and a value to a row. The name is
   ordinary type, quieter than the value; a value that is data is mono. */
table.records-fields tbody th {
  width: 11rem; padding: 0.5rem 0.8rem 0.5rem 0; border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.82rem; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--muted); vertical-align: baseline;
}
table.records-fields tbody tr:last-child th { border-bottom: 0; }
table.records-fields td.mono { overflow-wrap: anywhere; }
table.records-fields code { font-size: 0.8rem; }
/* Unknown is a value, and not "no": quieter, and set apart. */
.artifact .unknown { color: var(--muted); font-style: italic; }
.dateline .mono { font-family: var(--mono); font-size: 0.78rem; }
.url-title { overflow-wrap: anywhere; }
.url-title wbr { display: inline; }

/* A run's sources: the citation's positions sit beside its count. */
table.records-run-sources td.narrow .how { margin-left: 0.35rem; }

/* Findings: a check's name, its key as a reference, and what was found.
   Only a failure is coloured, in the page's one colour for trouble; a pass
   is the absence of news, and an error is Dromad's, not the page's. */
table.records-findings .check-name { font-size: 0.93rem; }
table.records-findings code.how { font-family: var(--mono); font-size: 0.7rem; margin-left: 0.5rem; }
table.records-findings .check-item { margin: 0.3rem 0 0; max-width: var(--measure); font-size: 0.85rem; }
table.records-findings td.result { font-weight: 600; color: var(--fg); }
table.records-findings tr.check-fail td.result { color: var(--danger); }
table.records-findings tbody.more-rows td.result { font-weight: 400; color: var(--muted); }
details.check-more { margin-top: 0.35rem; font-size: 0.82rem; }
details.check-more > summary { cursor: pointer; color: var(--accent); }
details.check-more > summary:hover { color: var(--fg); }
details.check-more p { max-width: var(--measure); margin: 0.4rem 0 0; color: var(--muted); }

/* An outline: each heading indented by its level, its level as the index. */
table.records-outline td.lvl-2 { padding-left: 1.2rem; }
table.records-outline td.lvl-3 { padding-left: 2.4rem; }
table.records-outline td:is(.lvl-4, .lvl-5, .lvl-6) { padding-left: 3.6rem; }
table.records-outline td.lvl-1 { font-weight: 600; }
.excerpt-text p { margin: 0; font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 40rem) {
  table.records-fields tbody th { width: 7.5rem; }
  table.records-fields .identifier, table.records-fields .identifier * { white-space: nowrap; overflow-wrap: normal; }
  table.records-findings code.how { display: block; margin: 0.1rem 0 0; }
  .url-title { overflow-wrap: normal; }
}

/* A run's searches: each search call numbered, the queries it carried
   beside it. A rule between calls; none between queries issued together. */
table.records-searches td.idx { vertical-align: top; font-size: 0.8rem; color: var(--muted); }
table.records-searches tbody + tbody tr:first-child td { border-top: 1px solid var(--rule-mid); }
/* Inside one call, the number column stays open down the call's rows. */
table.records-searches tbody tr:not(:last-child) td.idx { border-bottom-color: transparent; }
table.records-searches tbody tr:not(:last-child) td.query { border-bottom-color: color-mix(in srgb, var(--rule) 55%, transparent); }
table.records-searches tbody:not(:last-child) tr:last-child td { border-bottom: 0; }
.run-link { margin: var(--space-inner) 0 0; font-size: 0.8rem; color: var(--muted); }
.run-link a { color: var(--accent); }
.run-link a:hover { color: var(--fg); }
.run-link code { margin-left: 0.5rem; font-size: 0.72rem; }

/* A fanout's counts: prompts by engines. Each count opens its searches;
   each run's count sits beneath, quieter. */
table.records-fanout td:nth-child(2) { font-size: 0.93rem; min-width: 16rem; }
table.records-fanout td.mark { vertical-align: top; }
table.records-fanout a.count { font-size: 0.95rem; color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums; }
table.records-fanout a.count:hover { color: var(--fg); text-decoration: underline; }
table.records-fanout a.count.zero { color: var(--muted); }
table.records-fanout .per-run { display: block; margin-top: 0.15rem; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
table.records-fanout tfoot td { border-top: 1px solid var(--rule-mid); border-bottom: 0; font-size: 0.85rem; color: var(--muted); }
table.records-fanout tfoot td.mark { color: var(--fg); }
@media (max-width: 40rem) {
  table.records-fanout td:nth-child(2) { min-width: 0; }
  .artifact table.records-fanout :is(th, td).idx { width: 1.6rem; padding-right: 0.2rem; }
  .artifact table.records-fanout :is(th, td).mark { padding-left: 0.35rem; padding-right: 0.35rem; }
}

/* Which part of the artifact the page shows: quiet links in the controls row. */
.scope-filter { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.8rem; }
.scope-filter a { color: var(--muted); text-decoration: none; padding-bottom: 0.1rem; border-bottom: 1px solid transparent; }
.scope-filter a:hover { color: var(--fg); }
.scope-filter a[aria-current] { color: var(--fg); border-bottom-color: var(--fg); }
.scope-filter .n { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-left: 0.15rem; }

/* Generated questions: a model's writing that is also structured data.
   The external boundary (tint, rule, label) says who wrote them; inside it,
   ruled records. Its cluster headings are the model's names, set in the
   records' own type, not as Dromad's margin landmarks. */
.artifact .external-records { padding-bottom: 0.4rem; }
.artifact .external-records table.records { border-bottom: 0; }
table.records-questions td.question { font-size: 0.95rem; }
table.records-questions td.idx { font-size: 0.7rem; }
table.records-questions tr.cluster th {
  padding: 1.1rem 0 0.45rem; border-bottom: 1px solid var(--rule-mid);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--fg); text-align: left;
}
table.records-questions tbody:first-of-type tr.cluster th { padding-top: 0.6rem; }
table.records-questions .cluster-meta { margin-left: 0.75rem; font-weight: 400; font-size: 0.78rem; color: var(--muted); }
table.records-questions tbody tr:not(.cluster):hover td { background: color-mix(in srgb, var(--fg) 3%, transparent); }
.spec-inline { display: none; }
@media (max-width: 40rem) {
  /* The specificity column waits for a wider screen; its label goes under the question. */
  .spec-inline { display: block; margin-top: 0.1rem; font-size: 0.74rem; color: var(--muted); }
}

/* Raw evidence: the stored JSON, closed until wanted, scrolling in its own frame. */
.sub details.raw:first-of-type { margin-top: var(--space-inner); }
details.raw pre {
  max-height: 32rem; overflow: auto; margin: 0.4rem 0 0.9rem; padding: 0.75rem 0.9rem;
  background: color-mix(in srgb, var(--fg) 3%, transparent); border-radius: 3px;
  font-size: 0.72rem; line-height: 1.5; color: var(--fg);
}

/* On this page: the report's structure, beside it where there is room. */
.report-toc { display: none; }
.report-toc-label { margin: 0 0 0.6rem; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
ol.toc-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rule); font-size: 0.84rem; }
ol.toc-list a { display: block; padding: 0.28rem 0 0.28rem 0.85rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; }
ol.toc-list a:hover { color: var(--fg); }
ol.toc-list a[aria-current] { color: var(--fg); border-left-color: var(--fg); }
.toc-inline { margin: 1rem 0 0; font-size: 0.8rem; }
.toc-inline > summary { cursor: pointer; color: var(--muted); }
.toc-inline ol.toc-list { margin-top: 0.5rem; }
/* On a desktop a report page is set a size smaller, so a centred report
   leaves margins wide enough for its index; the report keeps its
   proportions because its widths are in the same units. */
@media (min-width: 1100px) {
  html.report-page { font-size: 14.5px; }
  html.report-page body { font-size: 0.9375rem; }
}

/* The index is marginalia, not a sidebar: the report stays centred as if
   it were not there, and the index sits in the right margin only when that
   margin can hold it (report 66rem + page padding + an index of 8.75rem and
   its gap on each side: 91rem, 1320px at the desktop size). Narrower, it
   folds into the control under the title; the report never moves or narrows
   for it. */
.report-layout { position: relative; }
@media (min-width: 1320px) {
  .report-toc {
    display: block; position: absolute; top: 0; bottom: 0;
    left: calc(50% + 33rem + 1.75rem); width: 8.75rem;
  }
  .report-toc-inner { position: sticky; top: 2.5rem; margin-top: 12rem; }
  .toc-inline { display: none; }
}

/* Appendices: method and provenance, closed until wanted. */
.appendices { margin-top: var(--space-major); }
.appendix { font-size: 0.85rem; }
.appendix > summary { font-size: 0.85rem; color: var(--fg); }

.appendix > :not(summary) { margin: var(--space-inner) 0 calc(var(--space-inner) * 2); color: var(--muted); }
.appendix p { max-width: var(--measure); }
.appendix table.booktabs { font-size: 0.85rem; }
.appendix dl.facts { font-size: 0.85rem; }
.appendix dl.facts dd code { color: var(--fg); }
.appendix:last-child { border-bottom: 1px solid var(--rule); }

/* --- the application frame, quieter --------------------------------------- */

/* The header is one size on every page. Docs and the home page keep a 16px
   root where app and report pages take 14.5px, so its lengths are in --u, what
   a rem is on an app page at the same width, rather than in rem. */
:root { --u: 1rem; }
@media (min-width: 1100px) { :root { --u: 14.5px; } }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: calc(1.75 * var(--u)); row-gap: calc(0.35 * var(--u));
  padding: calc(0.7 * var(--u)) calc(2 * var(--u));
  font-size: calc(0.85 * var(--u)); line-height: 1.55;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 75%, transparent);
}
.wordmark { font-family: var(--mono); font-weight: 600; font-size: calc(0.95 * var(--u)); color: var(--fg); text-decoration: none; }
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; margin-left: auto;
  column-gap: calc(1.15 * var(--u)); row-gap: calc(0.35 * var(--u));
}
.site-header a, .site-header button.link { color: var(--muted); font-size: inherit; text-decoration: none; }
.site-header a:hover, .site-header button.link:hover { color: var(--fg); }
.site-header a[aria-current] { color: var(--accent); }
.site-header .wordmark, .site-header .wordmark:hover { color: var(--fg); }
.site-header .muted { color: var(--muted); }
.shared-note { margin-left: auto; }

/* The navigation menus: a summary that reads as a nav item with a chevron,
   opening a ruled panel of rows in the rail's style. */
.nav-menu { position: relative; margin: 0; }
.nav-menu > summary { list-style: none; cursor: pointer; color: var(--muted); white-space: nowrap; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
  content: ""; display: inline-block; margin-left: calc(0.35 * var(--u)); vertical-align: 0.18em;
  border: calc(0.24 * var(--u)) solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.nav-menu > summary:hover, .nav-menu[open] > summary { color: var(--fg); }
.nav-menu > summary.is-current { color: var(--accent); }
.nav-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-name { display: inline-block; max-width: calc(14 * var(--u)); overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* The workspace menu, and Sign up, are the header's one bordered control. */
.nav-workspace > summary, .site-header a.nav-control {
  color: var(--fg); border: 1px solid var(--rule); border-radius: 4px;
  padding: calc(0.15 * var(--u)) calc(0.55 * var(--u));
}
.nav-workspace > summary:hover, .nav-workspace[open] > summary, .site-header a.nav-control:hover { border-color: var(--muted); }
div.nav-account { display: flex; align-items: center; column-gap: calc(1.15 * var(--u)); }

.nav-panel {
  position: absolute; top: calc(100% + 0.6 * var(--u)); left: 0; z-index: 20;
  min-width: calc(17 * var(--u)); padding: calc(0.35 * var(--u)) calc(0.9 * var(--u)) calc(0.5 * var(--u));
  background: var(--bg); border: 1px solid var(--rule);
  box-shadow: 0 6px 20px color-mix(in srgb, #000 12%, transparent);
}
.site-nav .nav-panel { left: calc(-0.9 * var(--u)); }
.nav-account .nav-panel { left: auto; right: 0; }
.nav-panel form { margin: 0; }
.nav-group {
  margin: calc(0.45 * var(--u)) 0 calc(0.1 * var(--u)); font-family: var(--mono); font-size: calc(0.68 * var(--u));
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list + .nav-group, .nav-list + .nav-list, .nav-panel > .nav-foot {
  margin-top: calc(0.35 * var(--u)); border-top: 1px solid var(--rule); padding-top: calc(0.25 * var(--u));
}
.nav-row {
  display: block; width: 100%; padding: calc(0.4 * var(--u)) 0; text-align: left;
  font: inherit; color: inherit; text-decoration: none; background: none; border: 0; cursor: pointer;
}
.site-header .nav-row, .site-header .nav-row:hover { color: inherit; }
.nav-label { display: block; font-size: calc(0.88 * var(--u)); font-weight: 500; color: var(--fg); }
.nav-value { display: block; margin-top: calc(0.05 * var(--u)); font-size: calc(0.76 * var(--u)); color: var(--muted); white-space: nowrap; }
.nav-value code { font-size: calc(0.72 * var(--u)); }
@media (hover: hover) { .nav-row:hover .nav-label { color: var(--accent); } }
.nav-row:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--accent); padding-left: calc(0.6 * var(--u)); }
.nav-row:focus-visible .nav-label { color: var(--accent); }
.nav-row[aria-current] { box-shadow: inset 2px 0 0 var(--accent); padding-left: calc(0.6 * var(--u)); }
.nav-row[aria-current] .nav-label { color: var(--accent); }

@media (max-width: 40rem) {
  .site-header { position: relative; padding-left: calc(1.25 * var(--u)); padding-right: calc(1.25 * var(--u)); }
  .nav-menu { position: static; }
  .nav-panel, .site-nav .nav-panel, .nav-account .nav-panel { left: calc(1.25 * var(--u)); right: calc(1.25 * var(--u)); top: 100%; min-width: 0; }
  .nav-value { white-space: normal; }
  /* The wordmark and the menus on one line, the links under them. */
  .nav-account { margin-left: auto; }
  .nav-account .nav-name { max-width: calc(9 * var(--u)); }
  .site-header .site-nav { order: 3; width: 100%; margin-left: 0; }
}

@media (max-width: 40rem) {
  main.report { padding: 2rem 1.25rem 4rem; }
  main.report .shared-footer { margin-left: 2.1rem; transform: none; }
  .artifact { --gutter: 2.1rem; }
  .artifact-title { font-size: 1.6rem; }
  .artifact .external { margin-left: 0; padding: 0.75rem 0.9rem 0.9rem 0.95rem; width: auto; }
  .artifact .external .answer-text { font-size: 1.02rem; }
  .artifact h2 { font-size: 1.35rem; }
  .artifact .answer-text { font-size: 1.05rem; }
  .artifact .section-no { padding-right: 0.6rem; }
  /* A wide table becomes a list of its rows: the head as one line, each row
     an entry, rather than columns squeezed to a word each. */
  .artifact .answer-text :is(table, thead, tbody, tr) { display: block; width: auto; }
  .artifact .answer-text table { font-size: 0.95rem; overflow: visible; }
  .artifact .answer-text thead tr { display: flex; flex-wrap: wrap; gap: 0 0.9rem; border-bottom: 1px solid var(--rule-strong); max-width: 100%; }
  .artifact .answer-text th { min-width: 0; max-width: 100%; }
  .artifact .answer-text th { padding: 0.5rem 0 0.4rem; border: 0; color: var(--muted); }
  .artifact .answer-text tbody tr { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .artifact .answer-text tbody tr:last-child { border-bottom: 0; }
  .artifact .answer-text td { display: block; min-width: 0; max-width: none; padding: 0 !important; }
  .artifact .answer-text td + td { margin-top: 0.2rem; }
  /* Stacked, a row's first cell is the entry's name: Dromad's emphasis, not the model's. */
  .artifact .answer-text tbody td:first-child { font-weight: 700; }
  table.usage tbody th { width: 5.25rem; padding-right: 0.6rem; font-size: 1rem; vertical-align: top; }
  table.usage td.bar { vertical-align: top; padding-top: 0.55rem; }
  .bar-line { gap: 0.2rem 0.6rem; }
  .bar-label { white-space: normal; }
  table.records-overlap :is(th, td).mark { width: auto; }
  .external { padding: 1rem 1.1rem 1.2rem 1.1rem; }
}

/* --- application pages ---------------------------------------------------- */
/* Every non-artifact page is an application page (main.app; see "The
   application style" in ARTIFACT_DESIGN.md). On a desktop it takes the
   reports' type scale. */
@media (min-width: 1100px) {
  html:has(> body > main.app) { font-size: 14.5px; }
  html:has(> body > main.app) body { font-size: 0.9375rem; }
}

/* --- the application surface: the dashboard ------------------------------- */
/* Operating Dromad, not reading it: sans type, the full canvas, one work
   stream with its controls. The same vocabulary as the reports (rules,
   amber for action, mono only for schema), a different composition. */
main.app {
  --rule-mid: color-mix(in srgb, var(--fg) 32%, transparent);
  max-width: 100rem; margin: 0 auto; padding: 2rem 2.5rem 5rem;
}
.app-head { display: flex; align-items: baseline; gap: 0.9rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--rule); }
.app-head h1 { margin: 0; font-family: var(--sans); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.005em; }
.app-context { margin: 0; font-size: 0.85rem; color: var(--muted); }
.app-action { margin-left: auto; font-size: 0.85rem; color: var(--accent); text-decoration: none; }
.app-action:hover { color: var(--fg); }

.work { margin-top: 1.75rem; }
.work-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-bottom: 0.9rem; min-height: 2rem; }
.work-bar h2 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.work-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-left: auto; }
.work-filters input[type="search"], .work-filters select {
  font: inherit; font-size: 0.85rem; color: var(--fg); background: transparent;
  border: 1px solid var(--rule); border-radius: 0; height: 2rem; padding: 0 0.6rem; margin: 0;
}
.work-filters input[type="search"] { width: 17rem; }
.work-filters select, .tool-form select, .app-form select {
  appearance: none; -webkit-appearance: none; padding-right: 1.7rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 0.85rem) 55%, calc(100% - 0.55rem) 55%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat;
}
.work-filters select option { color: #1c1d1f; }
.work-filters :is(input, select):hover { border-color: var(--muted); }
.work-filters :is(input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
/* With JavaScript, choosing a type or project submits; Enter submits a search. */
.js-on .filter-submit { display: none; }
.filter-submit { height: 2rem; padding: 0 0.8rem; font-size: 0.85rem; }
.filter-clear { font-size: 0.85rem; color: var(--muted); text-decoration: none; margin-left: 0.25rem; }
.filter-clear:hover { color: var(--fg); }

/* The stream: ruled like the reports' structured evidence. The subject leads;
   type, result and time support it. A whole row opens its work. */
table.work-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.4;
  border-top: 1px solid var(--rule-mid); border-bottom: 1px solid var(--rule-mid); font-variant-numeric: tabular-nums;
}
table.work-table th {
  padding: 0.45rem 1rem 0.45rem 0; border-bottom: 1px solid var(--rule-mid); text-align: left;
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
table.work-table td { padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.work-table tr:last-child td { border-bottom: 0; }
table.work-table :is(th, td).updated { padding-right: 0; text-align: right; white-space: nowrap; }
table.work-table.is-list th:nth-child(1) { width: 56%; }
table.work-table.is-list th:nth-child(2) { width: 10rem; }
/* A row with somewhere to go is one link: its subject's link covers the whole
   row. At rest it looks like the other rows; hovered or focused it takes a
   faint tint and its subject turns amber, the accent for what opens. */
tr.work-row { position: relative; --bleed: 0.75rem; }
tr.work-row.has-link { cursor: pointer; }
/* The row's lit state is painted behind the text by its link, bleeding a
   little past the text on both sides as a selected row in a list does. */
.work-link::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed));
}
@media (hover: hover) {
  tr.work-row.has-link:hover .work-link::before { background: color-mix(in srgb, var(--fg) 3.5%, var(--bg)); }
  tr.work-row.has-link:hover .work-link { color: var(--accent); }
}
/* Keyboard focus: the same tint, a touch stronger, and a thin amber edge at
   the tint's outer end, so the row in focus is findable at a glance. */
.work-link:focus-visible::before { background: color-mix(in srgb, var(--fg) 5%, var(--bg)); box-shadow: inset 2px 0 0 var(--accent); }
.work-link:focus-visible { color: var(--accent); }
.work-link { color: var(--fg); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
/* The link's area is the whole row. */
.work-link::after { content: ""; position: absolute; inset: 0; }
.work-link:focus-visible { outline: none; }

.work-project { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: var(--muted); }
.work-subject { color: var(--fg); font-weight: 500; font-size: 0.95rem; }
/* Type is the quietest column: what the result is of, not what happened. */
.work-type { color: color-mix(in srgb, var(--muted) 72%, transparent); font-size: 0.8rem; white-space: nowrap; }
/* Set a size smaller, it sits on the subject's baseline, not above it. */
table.work-table td.work-type { padding-top: 0.82rem; }
.work-result .line { display: block; color: var(--muted); font-size: 0.82rem; }
.work-result .line.first { color: var(--fg); font-size: 0.88rem; }
tr.is-failed .work-result .line.first { color: var(--danger); }
tr.is-running .work-result .line.first, tr.is-queued .work-result .line.first { color: var(--muted); font-style: italic; }
.updated { color: var(--muted); font-size: 0.82rem; }
.work-more { margin: 1rem 0 0; font-size: 0.85rem; }
.work-empty { padding: 2rem 0; color: var(--muted); }
.work-empty pre { max-width: 36rem; }
.work-foot { margin: 2.5rem 0 0; font-size: 0.78rem; color: var(--muted); }

@media (max-width: 40rem) {
  main.app { padding: 1.25rem 1.25rem 3rem; }
  .work-filters { margin-left: 0; width: 100%; }
  .work-filters input[type="search"] { width: 100%; }
  .work-filters select { flex: 1; }
  /* A row stacks: the subject, then its type, result and time on one quiet line. */
  table.work-table thead { display: none; }
  table.work-table, table.work-table tbody { display: block; }
  tr.work-row { display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  table.work-table tr:last-child { border-bottom: 0; }
  table.work-table td { padding: 0; border: 0; }
  .work-subject { grid-column: 1 / -1; }
  .work-type { grid-column: 1; margin-top: 0.3rem; font-size: 0.8rem; }
  table.work-table td.work-type { padding-top: 0; }
  .work-result { grid-column: 1; }
  .work-result .line { display: inline; font-size: 0.8rem; }
  .work-result .line + .line::before { content: " · "; }
  .work-result .line.first { font-size: 0.8rem; }
  table.work-table td.updated { grid-column: 2; grid-row: 2; align-self: start; margin-top: 0.3rem; }
}

/* Work-type markers, dashboard only: a small square in a muted hue per
   family beside the Type label. A semantic signal, never a pill, never on
   the row or the subject; the label stays, so nothing depends on colour. */
:root {
  /* Five families, one muted hue each, apart from the accent and from danger. */
  --type-prompt: #5a7399;
  --type-fanout: #3d8580;
  --type-questions: #86699a;
  --type-audit: #7a8547;
  --type-analysis: #9a6079;
}
@media (prefers-color-scheme: dark) {
  :root {
    --type-prompt: #8ea5cb;
    --type-fanout: #6fb5b0;
    --type-questions: #b69bc8;
    --type-audit: #a9b675;
    --type-analysis: #c992ab;
  }
}
.type-mark { display: inline-block; width: 0.46rem; height: 0.46rem; margin-right: 0.55rem; vertical-align: 0.06em; background: var(--tm); }
.tm-prompt { --tm: var(--type-prompt); }
.tm-fanout { --tm: var(--type-fanout); }
.tm-questions { --tm: var(--type-questions); }
.tm-audit { --tm: var(--type-audit); }
.tm-citations { --tm: var(--type-analysis); }

/* The dashboard's rail: agent access, the environment and the complete
   indexes, beside the work and narrower than it. Real destinations with real
   state, as ruled rows; never cards, counts for show, or ways to run work. */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 3.5rem; margin-top: 1.75rem; align-items: start; }
.app-grid > .work { margin-top: 0; }
.app-rail { display: flex; flex-direction: column; gap: 2.25rem; }
/* Beside the work, the rail's first rule meets the table's top rule. */
@media (min-width: 1100.01px) { .app-rail { padding-top: 2.9rem; } .settings-main + .app-rail { padding-top: 0; } }
.rail-block h2 {
  margin: 0; padding: 0.45rem 0; border-top: 1px solid var(--rule-mid); border-bottom: 1px solid var(--rule-mid);
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { border-bottom: 1px solid var(--rule); }
.rail-row { display: block; padding: 0.55rem 0; color: inherit; text-decoration: none; }
.rail-label { display: block; font-size: 0.88rem; font-weight: 500; color: var(--fg); }
.rail-value { display: block; margin-top: 0.1rem; font-size: 0.78rem; color: var(--muted); }
.rail-index .rail-row { display: flex; justify-content: space-between; align-items: baseline; }
/* Credit: the amount new work can spend, on the label's line, in figures. */
.rail-billing { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: baseline; }
.rail-billing .rail-value { grid-column: 1 / -1; }
.rail-amount { font-family: var(--mono); font-size: 0.95rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.rail-count { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .rail-row:hover .rail-label { color: var(--accent); } }
.rail-row:focus-visible { outline: none; }
.rail-row:focus-visible .rail-label { color: var(--accent); }
.rail-row:focus-visible { box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.6rem; }
.rail-note { margin: 0.8rem 0 0.4rem; font-size: 0.78rem; color: var(--muted); }
.rail-code { margin: 0; padding: 0.55rem 0.75rem; font-size: 0.76rem; border: 0; border-left: 2px solid var(--rule); background: color-mix(in srgb, var(--fg) 2.5%, var(--bg)); }
@media (max-width: 1100px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  /* Narrower, the rail comes first: access, billing and the indexes above the work. */
  .app-rail { order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem; }
}

/* Application lists beyond the dashboard (ARTIFACT_DESIGN.md, "The
   application style"). A page with no rail puts its list straight under the
   heading. */
.work.app-single { margin-top: 1.75rem; }
/* A second link in a row (its parent) sits above the row's own link. */
.work-sub { position: relative; z-index: 1; display: block; width: fit-content; margin-top: 0.2rem; font-size: 0.78rem; color: var(--muted); text-decoration: none; }
.work-sub:hover { color: var(--accent); }
.work-sub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.work-by { display: block; margin-top: 0.15rem; font-size: 0.74rem; }
/* The runs of one parent: the subject once, the runs under it, no rule between. */
table.work-table tr.work-row:has(+ tr.cont) td { border-bottom-color: transparent; }
table.work-table tr.cont td { padding-top: 0.25rem; }
/* A list of one kind puts, in the Type column's place, what each item asked:
   two quiet lines, still the quietest column. */
.work-asked { white-space: normal; }
table.work-table.is-list.work-table-asked th:nth-child(2) { width: 17rem; }
.work-asked .line { display: block; }
.work-asked .line + .line { font-size: 0.76rem; }
@media (max-width: 40rem) {
  .work-asked .line { display: inline; }
  .work-asked .line + .line::before { content: " · "; }
}
/* A form in the rail: labels above fields, the rail's width, one button. */
.rail-form { display: flex; flex-direction: column; gap: 0.3rem; padding-top: 0.8rem; }
.rail-form label { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.rail-form label:first-of-type { margin-top: 0; }
.rail-form input[type="text"], .rail-form input[type="url"] {
  height: 2rem; margin: 0; padding: 0 0.6rem; font-size: 0.88rem; border-radius: 0;
}
.rail-form button { align-self: flex-start; margin-top: 0.7rem; font-size: 0.85rem; padding: 0.3rem 0.9rem; }
.rail-form .errorlist { font-size: 0.8rem; }
/* Nothing to show in a quiet column says so, quieter still. */
.work-asked.is-none .line { font-style: italic; }
.rail-form textarea { margin: 0; padding: 0.35rem 0.6rem; font: inherit; font-size: 0.85rem; color: var(--fg); background: transparent; border: 1px solid var(--rule); border-radius: 0; resize: vertical; }
.rail-form :is(input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.rail-help { margin: 0.5rem 0 0; font-size: 0.76rem; color: var(--muted); }
.rail-id { margin: 0.6rem 0 0; font-size: 0.78rem; }
.app-context a { color: inherit; text-decoration: none; }
.app-context a:hover { color: var(--accent); }
.rail-state { margin: 0; padding: 0.55rem 0; font-size: 0.88rem; color: var(--fg); border-bottom: 1px solid var(--rule); }
.rail-edit > summary { list-style: none; cursor: pointer; padding: 0.55rem 0; font-size: 0.82rem; color: var(--accent); border-bottom: 1px solid var(--rule); }
.rail-edit > summary::-webkit-details-marker { display: none; }
.rail-edit > summary::after { content: " ↓"; }
.rail-edit[open] > summary::after { content: " ↑"; }
.rail-edit > summary:hover { color: var(--fg); }
.rail-edit > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The toolkit: one row per tool, what it does, its form, and the same thing
   from a terminal, side by side and of equal weight. */
.tool-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; margin: 1.1rem 0 0.5rem; }
.tool-intro { margin: 0; max-width: 46rem; font-size: 0.85rem; color: var(--muted); }
.tool-index { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.82rem; }
.tool-index a { color: var(--muted); text-decoration: none; }
.tool-index a:hover { color: var(--accent); }
.tool-notice { max-width: 46rem; }
.tool-row {
  display: grid; grid-template-columns: 17rem minmax(0, 26rem) minmax(0, 1fr); gap: 1.5rem 3rem;
  padding: 1.9rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem;
}
.tool-row:first-of-type { border-top-color: var(--rule-mid); margin-top: 1rem; }
.tool-about h2 { margin: 0 0 0.45rem; font-size: 1rem; font-weight: 600; }
.tool-about p { margin: 0; font-size: 0.84rem; color: var(--muted); }
.tool-form { display: flex; flex-direction: column; gap: 0.65rem; }
.tool-form > label { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }
.tool-form :is(input[type="text"], input[type="url"], input[type="number"], select, textarea) {
  margin: 0; width: 100%; font: inherit; font-size: 0.88rem; color: var(--fg); background: transparent;
  border: 1px solid var(--rule); border-radius: 0; padding: 0.35rem 0.6rem;
}
.tool-form select option { color: #1c1d1f; }
.tool-form :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.tool-form fieldset.engines { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.85rem; }
.tool-form fieldset.engines legend { width: 100%; margin-bottom: 0.3rem; padding: 0; font-size: 0.8rem; color: var(--muted); }
.tool-form button { align-self: flex-start; font-size: 0.85rem; padding: 0.3rem 0.95rem; }
.tool-help { margin: 0; font-size: 0.76rem; color: var(--muted); }
.tool-none { justify-content: center; }
.tool-cli-label {
  margin: 0 0 0.45rem; font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.tool-cli pre {
  margin: 0; padding: 0.6rem 0.8rem; font-size: 0.78rem; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 0; border-left: 2px solid var(--rule); background: color-mix(in srgb, var(--fg) 2.5%, var(--bg));
}
@media (max-width: 1100px) {
  .tool-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool-about { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .tool-row { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

/* Plain rows: records without a destination, e.g. what a fanout will ask. */
table.work-table td.work-plain { font-size: 0.9rem; color: var(--fg); }
table.work-table td.work-index { width: 2.5rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
table.work-table th.num-col { width: 2.5rem; }
table.work-table td.work-figure { font-family: var(--mono); font-size: 0.82rem; color: var(--fg); }
.work-bar-next { margin-top: 2.25rem; }
.rail-row a { color: var(--accent); }
.rail-confirm { gap: 0.6rem; }
.rail-confirm button { margin-top: 0.4rem; }
.rail-back { font-size: 0.82rem; color: var(--muted); text-decoration: none; }
.rail-back:hover { color: var(--accent); }

/* Settings pages: sections with sans headings on a rule, ruled tables,
   one-column forms; the settings pages as a rail beside them. */
.settings-main > section { padding-top: 0; }
.settings-main > section + section { margin-top: 2.75rem; }
.settings-main h2 { margin: 0 0 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule-mid); font-size: 0.95rem; font-weight: 600; }
.settings-main h3 { margin: 1.5rem 0 0.6rem; font-size: 0.88rem; font-weight: 600; }
.settings-note { margin: 0 0 0.9rem; max-width: 46rem; font-size: 0.85rem; color: var(--muted); }
.settings-main p { max-width: 46rem; }
.settings-main pre { max-width: 46rem; margin: 0.4rem 0 0; padding: 0.6rem 0.8rem; font-size: 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere; border: 0; border-left: 2px solid var(--rule); background: color-mix(in srgb, var(--fg) 2.5%, var(--bg)); }
.settings-main .notice { max-width: 46rem; }
.settings-main table.work-table { margin-top: 0; }
.settings-main table.work-table td { font-size: 0.88rem; }
table.work-table td.mono, table.work-table td code { font-family: var(--mono); font-size: 0.78rem; }
table.work-table td.muted-cell { color: var(--muted); }
table.work-table td.act { text-align: right; white-space: nowrap; padding-right: 0; }
table.work-table button.secondary { font-size: 0.78rem; padding: 0.15rem 0.65rem; }
table.work-table select { font: inherit; font-size: 0.85rem; }
/* Fields: one thing's facts, a name and a value to a row. */
table.work-table.fields th[scope="row"] { width: 14rem; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); text-align: left; font-family: var(--sans); font-size: 0.85rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); vertical-align: top; }
table.work-table.fields tr:last-child th { border-bottom: 0; }
table.work-table.fields td { color: var(--fg); }
.app-form { display: flex; flex-direction: column; gap: 0.65rem; max-width: 26rem; margin-top: 0.4rem; }
.app-form > label { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }
.app-form :is(input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea) {
  margin: 0; width: 100%; font: inherit; font-size: 0.88rem; color: var(--fg); background: transparent;
  border: 1px solid var(--rule); border-radius: 0; padding: 0.35rem 0.6rem;
}
.app-form :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.app-form fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.88rem; }
.app-form fieldset legend { width: 100%; margin-bottom: 0.3rem; padding: 0; font-size: 0.8rem; color: var(--muted); }
.app-form button { align-self: flex-start; font-size: 0.85rem; padding: 0.3rem 0.95rem; }
.app-form .field-help, .app-form .helptext { margin: 0; font-size: 0.76rem; color: var(--muted); }
.rail-row[aria-current="page"] .rail-label { color: var(--accent); }
.rail-row[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.6rem; }
.rail-value code { font-size: 0.74rem; }
.settings-note.work-after { margin-top: 0.75rem; }
.balance-figure { font-size: 1.05rem; }
table.work-table tfoot th, table.work-table tfoot td { padding: 0.55rem 1rem 0.55rem 0; border-top: 1px solid var(--rule-mid); font-size: 0.85rem; text-align: left; font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
table.work-table tfoot td.updated { text-align: right; color: var(--fg); padding-right: 0; }

/* One form or one message: the same heading and controls, a narrow column. */
main.app.app-narrow { max-width: calc(28rem + 5rem); padding-top: 4.5rem; }
.narrow-body { margin-top: 1.5rem; }
.narrow-body > p { margin: 0 0 1rem; font-size: 0.9rem; }
.narrow-body .settings-note, .narrow-body .muted-note { font-size: 0.82rem; color: var(--muted); }
.narrow-body .app-form { max-width: none; }
.narrow-body .app-form + p { margin-top: 1.25rem; }
.narrow-body .notice { font-size: 0.85rem; }
.narrow-body .code-display { margin: 1rem 0 0.5rem; font-family: var(--mono); font-size: 1.9rem; letter-spacing: 0.08em; }
.narrow-body .inline-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.narrow-body .inline-actions button { font-size: 0.85rem; padding: 0.3rem 0.95rem; }
@media (max-width: 40rem) { main.app.app-narrow { padding-top: 2rem; } }
.narrow-body > p.narrow-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); font-size: 0.85rem; }
.narrow-links a { color: var(--accent); text-decoration: none; }
.narrow-links a:hover { color: var(--fg); }
main.app .shared-footer { margin-top: 3rem; font-size: 0.78rem; }
/* A table straight under a section heading shares the heading's rule. */
.settings-main h2 + table.work-table { border-top: 0; }
