/* GovCon Evidence Run, in the MillerKnoll Publication Layer design language (pub.millerknoll.com):
   black on white, Untitled Sans (Regular, Medium, Bold), solid black 4 px buttons, 1 px grey
   outlined fields, grey table header band, black footer band. Light only, like the source site.
   Untitled Sans is a licensed MillerKnoll brand face: it is named here and renders where the
   font is installed or served; Helvetica / Arial stand in elsewhere. */
:root {
  --ink: #000000;
  --ink-strong: #252525;      /* page titles */
  --ink-body: rgba(0, 0, 0, 0.87);
  --muted: #808080;           /* current page in the navigation, secondary text */
  --line: rgba(0, 0, 0, 0.23); /* field outlines */
  --rule: #e0e0e0;            /* table rows, card edges */
  --divider: #afa99f;         /* the warm grey vertical rule in the header */
  --band: #d9d9d9;            /* table header band */
  --disabled: #e5e5e5;
  --surface: #ffffff;
  --ok: #2e7d4f; --warn: #a36a00; --stop: #b3261e;
  --font: "Untitled Sans", UntitledSans, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-medium: "Untitled Sans Medium", UntitledSansMedium, "Untitled Sans", UntitledSans, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-bold: "Untitled Sans Bold", UntitledSansBold, "Untitled Sans", UntitledSans, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* .card and .rows set display, which would override the attribute */
html, body { height: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; display: flex; flex-direction: column; }

/* Header: wordmark left, navigation right, warm grey rule before the user item */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 28px; flex-wrap: wrap; }
.site-header img { height: 25px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 32px; font-family: var(--font-medium); font-size: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.site-nav .rule { width: 1px; height: 24px; background: var(--divider); }

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 68px; padding-block: 18px 48px; display: grid; gap: 24px; flex: 1 0 auto; align-content: start; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { margin: 0; font-family: var(--font-bold); font-weight: 700; font-size: 24px; color: var(--ink-strong); }
h2 { margin: 0; font-family: var(--font-bold); font-weight: 700; font-size: 18px; color: var(--ink-strong); }
p { margin: 0; }
.lede { max-width: 72ch; color: var(--ink-body); font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.banner { border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; font-size: 14px; color: var(--ink-body); }
.banner.error { border-color: var(--stop); color: var(--stop); }

/* Steps read like the site's navigation: current step black and underlined, others grey */
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; font-family: var(--font-medium); font-size: 14px; }
.progress li { color: var(--muted); }
.progress li.done { color: var(--ink); }
.progress li.current { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.card { border-top: 1px solid var(--rule); padding-top: 22px; display: grid; gap: 18px; }
form { display: grid; gap: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.field { display: grid; gap: 6px; min-width: 0; }
label { font-family: var(--font-medium); font-size: 14px; color: var(--ink); }
input, select { font: inherit; font-size: 14px; color: var(--ink-body); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8.5px 14px; min-width: 0; }
input::placeholder { color: rgba(0, 0, 0, 0.42); }
input:hover, select:hover { border-color: var(--ink); }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.drop { border: 1px dashed var(--line); border-radius: 4px; padding: 16px; display: grid; gap: 8px; color: var(--ink-body); font-size: 14px; }
.drop.over { border-color: var(--ink); background: #fafafa; }

/* Lists and tables: grey header band, thin rules, 14 px rows */
.file-list, .book-list, .rows, .downloads { list-style: none; margin: 0; padding: 0; display: grid; }
.file-list li, .book-list li, .downloads li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-body); }
.file-list:not(:empty)::before, .downloads:not(:empty)::before { content: attr(data-header); display: block; background: var(--band); padding: 10px 12px; font-size: 14px; color: var(--ink); }
.file-list li select { padding: 4px 8px; font-size: 13px; }
.file-list .name, .downloads .name { min-width: 0; overflow-wrap: anywhere; }
.data { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
/* Price-book picker: brand filter, search, grouped list, selected list in citation order */
.books { display: grid; gap: 12px; }
.books-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.books-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.books-tools input[type="search"] { flex: 1 1 280px; }
.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; }
.segmented .seg { border: 0; border-radius: 0; height: 35px; background: var(--surface); color: var(--ink); }
.segmented .seg + .seg { border-left: 1px solid var(--ink); }
.segmented .seg[aria-pressed="true"] { background: var(--ink); color: #fff; }
.segmented .count { font-family: var(--font); opacity: 0.7; margin-left: 4px; }
.books-actions { display: flex; gap: 20px; flex-wrap: wrap; }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.books-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.book-groups { max-height: 420px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 4px; }
.book-group h3 { margin: 0; position: sticky; top: 0; background: var(--band); padding: 8px 12px; font-family: var(--font-medium); font-weight: 400; font-size: 13px; color: var(--ink); }
.book-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-body); cursor: pointer; font-family: var(--font); }
.book-row .file { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.book-row .tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.book-selected { border: 1px solid var(--rule); border-radius: 4px; }
.book-selected .band { background: var(--band); padding: 8px 12px; font-family: var(--font-medium); font-size: 13px; }
.book-selected ol { margin: 0; padding: 4px 12px 4px 34px; display: grid; gap: 0; font-size: 14px; color: var(--ink-body); }
.book-selected li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.book-selected li:last-child { border-bottom: 0; }
.book-selected li .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.book-selected .move { display: inline-flex; gap: 4px; }
.book-selected .move button { height: 24px; padding: 0 7px; font-size: 12px; }
.book-selected p { padding: 8px 12px; }
input[type="checkbox"] { accent-color: #000; width: 16px; height: 16px; padding: 0; }
.notice { border-left: 2px solid var(--ink); padding: 4px 14px; font-size: 14px; display: grid; gap: 6px; color: var(--ink-body); }
.notice strong { font-family: var(--font-medium); font-weight: 400; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font); color: var(--ink-body); font-size: 14px; }

/* Buttons: solid black, white text, 4 px corners; secondary is outlined; disabled is light grey */
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
button { font-family: var(--font-medium); font-size: 14px; height: 35px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; }
button.primary { background: var(--ink); color: #fff; }
button:hover { opacity: 0.85; }
button:disabled { background: var(--disabled); border-color: var(--disabled); color: #fff; cursor: not-allowed; opacity: 1; }

.rows { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.rows li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--rule); align-items: start; font-size: 14px; color: var(--ink-body); }
.rows li:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.stop { background: var(--stop); }
.pill { font-family: var(--font-medium); font-size: 12px; padding: 2px 10px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.stop { color: var(--stop); }
.detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.status-line { display: flex; gap: 12px; align-items: center; font-family: var(--font-medium); font-size: 16px; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; color: var(--ink-body); }
.summary b { font-family: var(--font-medium); font-weight: 400; color: var(--ink); }
/* Loader: the site's five grey dots */
.spinner { display: inline-flex; gap: 6px; }
.spinner::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9e9e9e; box-shadow: 14px 0 #b0b0b0, 28px 0 #c2c2c2, 42px 0 #d4d4d4, 56px 0 #e6e6e6; margin-right: 56px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .spinner::before { animation: none; } }
.downloads a { color: var(--ink); font-family: var(--font-medium); text-decoration: underline; text-underline-offset: 3px; }

/* Footer: black band, product name in white on the right */
.site-footer { background: #000; color: #fff; font-family: var(--font-medium); font-size: 16px; padding: 12px 80px; text-align: right; flex-shrink: 0; }

@media (max-width: 760px) {
  .site-header { padding: 16px; }
  .site-nav { gap: 18px; font-size: 14px; }
  .page { padding-inline: 16px; }
  .fields, .books-grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer { padding: 12px 16px; }
}

/* ---------- Demo mode: notice in the header, switch in the lower-right corner ---------- */
.site-header { flex-wrap: nowrap; }
.demo-links a { margin-left: 12px; color: var(--ink); text-underline-offset: 3px; white-space: nowrap; }
.demo-flag { flex: 1 1 auto; margin: 0 24px; max-width: 760px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px; font-size: 14px; color: var(--ink-body); text-align: center; }
.demo-switch { position: fixed; right: 20px; bottom: 62px; z-index: 10; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 10px; background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); font-family: var(--font-medium); font-size: 14px; }
.demo-switch .track { width: 34px; height: 18px; border-radius: 9px; background: var(--disabled); position: relative; transition: background 0.15s; }
.demo-switch .thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
.demo-switch[aria-checked="true"] .track { background: var(--ink); }
.demo-switch[aria-checked="true"] .thumb { left: 18px; }
.demo-switch:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .demo-switch .track, .demo-switch .thumb { transition: none; } }

/* ---------- Navigation states and link-buttons ---------- */
.site-nav a.current { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
a.button { display: inline-flex; align-items: center; font-family: var(--font-medium); font-size: 14px; height: 35px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
a.button.primary { background: var(--ink); color: #fff; }
.view { display: grid; gap: 22px; }

/* ---------- My runs: table left, detail right ---------- */
.runs-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.runs-table-wrap { overflow-x: auto; }
.runs-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink-body); }
.runs-table th { background: var(--band); text-align: left; font-family: var(--font); font-weight: 400; color: var(--ink); padding: 10px 12px; }
.runs-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.runs-table tbody tr { cursor: pointer; }
.runs-table tbody tr:hover { background: #fafafa; }
.runs-table tbody tr.selected { background: #f2f2f2; box-shadow: inset 3px 0 0 var(--ink); }
.runs-table .sub { display: block; font-size: 12px; color: var(--muted); }
.run-detail { border: 1px solid var(--rule); border-radius: 4px; padding: 18px; display: grid; gap: 14px; min-height: 240px; align-content: start; }
#run-detail-body { display: grid; gap: 14px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.band { background: var(--band); padding: 8px 12px; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.live { font-family: var(--font-medium); font-size: 12px; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.2s ease-in-out infinite; }
.feed { list-style: none; margin: -14px 0 0 0; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--rule); border-top: 0; }
.feed li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-body); }
.feed li:last-child { border-bottom: 0; }
.feed .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.feed li.status { font-family: var(--font-medium); color: var(--ink); }
.feed li.message { background: #fafafa; }
.feed li.new { animation: arrive 0.6s ease-out; }
@keyframes arrive { from { background: #f0f0f0; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .feed li.new { animation: none; } }
.state { font-family: var(--font-medium); font-size: 12px; padding: 2px 10px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; display: inline-block; }
.state.running, .state.collecting { color: var(--ink); }
.state.complete { color: var(--ok); }
.state.failed, .state.needs_attention, .state.budget_reached { color: var(--stop); }
.state.draft, .state.prechecked { color: var(--muted); }
.downloads { max-height: 360px; overflow-y: auto; }

@media (max-width: 900px) {
  .runs-layout { grid-template-columns: minmax(0, 1fr); }
  .site-header { flex-wrap: wrap; }
  .demo-flag { order: 3; flex-basis: 100%; margin: 8px 0 0; }
}

/* ---------- Download all ---------- */
.package-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.package-row .button[aria-busy="true"] { background: var(--disabled); border-color: var(--disabled); color: var(--ink); cursor: progress; }

/* ---------- Welcome ---------- */
.welcome { justify-items: center; text-align: center; padding: 64px 0 40px; gap: 26px; }
.welcome h1 { font-family: var(--font); font-weight: 400; font-size: 34px; line-height: 1.25; max-width: 760px; }
.welcome-lede { max-width: 720px; margin: 0; font-size: 18px; color: var(--ink-body); }
.welcome-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; max-width: 960px; width: 100%; counter-reset: step; text-align: left; }
.welcome-steps li { counter-increment: step; padding: 18px 20px; border-left: 1px solid var(--rule); display: grid; gap: 6px; align-content: start; }
.welcome-steps li:first-child { border-left: 0; }
.welcome-steps li::before { content: counter(step); font-family: var(--font-bold); font-size: 13px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.welcome-steps b { font-family: var(--font-medium); font-weight: 400; color: var(--ink); }
.welcome-steps span { font-size: 14px; color: var(--ink-body); }
.welcome-note { margin: 0; color: var(--muted); font-size: 15px; max-width: 640px; }
.welcome-note b { color: var(--ink); font-family: var(--font-medium); font-weight: 400; }
@media (max-width: 760px) {
  .welcome { padding-top: 32px; }
  .welcome h1 { font-size: 26px; }
  .welcome-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .welcome-steps li:nth-child(3) { border-left: 0; }
}

/* ---------- New run: steps that build out as you go ---------- */
.done-steps { display: grid; gap: 0; }
.done-steps:empty { display: none; }
.done-step { display: grid; grid-template-columns: 26px 140px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.done-num { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-medium); }
.done-name { font-family: var(--font-medium); color: var(--ink); }
.done-detail { color: var(--ink-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .done-step { grid-template-columns: 26px minmax(0, 1fr) auto; } .done-detail { grid-column: 2 / 4; white-space: normal; } }

/* ---------- Price-book recommendation ---------- */
.recommend { border: 1px solid var(--rule); border-radius: 4px; }
.recommend .band { border-radius: 4px 4px 0 0; }
.recommend-body { padding: 12px 14px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-body); }
.recommend-body p { margin: 0; }
.rec-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-radius: 4px; }
.rec-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.rec-list li:last-child { border-bottom: 0; }
.rec-title { color: var(--ink); }
.rec-list .tag, .book-row .tag.rec { font-size: 12px; border: 1px solid var(--rule); border-radius: 4px; padding: 1px 8px; color: var(--muted); white-space: nowrap; }
.tag.on { color: var(--ok); border-color: var(--ok); }
.tag.rec { color: var(--ink); border-color: var(--ink); }
.actions.start { justify-content: flex-start; }

/* ---------- Before you upload (dialog) ---------- */
.dialog { border: 0; border-radius: 4px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog form { padding: 24px; display: grid; gap: 14px; }
.dialog h2 { margin: 0; }
.dialog p { margin: 0; font-size: 14px; color: var(--ink-body); }
.dialog .status-line:empty { display: none; }

/* ---------- Page frame: centered demo notice, welcome centered in the page, bottom bar ---------- */
body { min-height: 100vh; }
.site-header { display: grid; grid-template-columns: 1fr minmax(0, 760px) 1fr; align-items: center; gap: 24px; }
.site-header > a { justify-self: start; }
.site-header .site-nav { justify-self: end; grid-column: 3; }
.demo-flag { grid-column: 2; margin: 0; max-width: none; width: 100%; }
main.page { flex: 1 0 auto; display: flex; flex-direction: column; }
main.page > .view:not([hidden]) { flex: 1 0 auto; }
.welcome { align-content: center; justify-content: center; padding: 40px 0; }
.bottom-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 24px; }
.bottom-bar #help { grid-column: 2; margin: 0; text-align: center; font-size: 13px; color: var(--muted); max-width: 820px; }
.demo-switch { position: static; justify-self: end; box-shadow: none; }
@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-header .site-nav { grid-column: 2; }
  .demo-flag { grid-column: 1 / -1; grid-row: 2; }
  .bottom-bar { grid-template-columns: 1fr; justify-items: center; }
  .bottom-bar #help { grid-column: 1; }
  .demo-switch { justify-self: center; }
}

/* ---------- Draft note, estimate ---------- */
.notice.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.estimate:empty { display: none; }
.estimate { font-size: 14px; color: var(--ink-body); border-left: 3px solid var(--ink); padding: 6px 12px; }
.estimate b { font-family: var(--font-medium); font-weight: 400; color: var(--ink); }

/* ---------- Run actions, chat, question ---------- */
.run-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.run-actions:not(:has(button:not([hidden]))) { display: none; }
.confirm-actions { display: inline-flex; gap: 10px; }
.chat { border: 1px solid var(--rule); border-radius: 4px; padding: 14px; display: grid; gap: 10px; }
.chat label[for] { font-family: var(--font-medium); font-size: 14px; }
.chat textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; resize: vertical; min-height: 72px; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.question { border: 1px solid var(--warn); border-left-width: 4px; border-radius: 4px; padding: 12px 14px; display: grid; gap: 6px; }
.question b { font-family: var(--font-medium); font-weight: 400; color: var(--warn); font-size: 14px; }
.question p { margin: 0; color: var(--ink); font-size: 14px; white-space: pre-wrap; }
.feed li.you { background: #f4f4f4; }
.feed li.you span:last-child::before { content: "You: "; font-family: var(--font-medium); }
.feed li.question { background: #fff8eb; }
.state.waiting { color: var(--warn); }
.state.stopped { color: var(--muted); }

/* ---------- Gap report on the page ---------- */
.gap { border: 1px solid var(--rule); border-radius: 4px; }
.gap summary { background: var(--band); padding: 8px 12px; cursor: pointer; font-size: 14px; }
.gap-report { padding: 4px 16px 16px; font-size: 14px; color: var(--ink-body); max-height: 560px; overflow: auto; }
.gap-report h1 { font-size: 18px; margin: 14px 0 6px; }
.gap-report h2 { font-size: 16px; margin: 18px 0 6px; font-family: var(--font-bold); }
.gap-report h3 { font-size: 14px; margin: 14px 0 6px; font-family: var(--font-medium); font-weight: 400; }
.gap-report p, .gap-report ul, .gap-report ol { margin: 6px 0; }
.gap-report table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; }
.gap-report th { background: var(--band); text-align: left; font-weight: 400; padding: 6px 8px; }
.gap-report td { border-bottom: 1px solid var(--rule); padding: 6px 8px; vertical-align: top; }
.gap-report code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #f2f2f2; padding: 0 3px; border-radius: 3px; }
.file-list .name .tag { margin-left: 8px; }

/* ---------- Folding sections (gap report, downloads): gray bar with a caret ---------- */
.fold { border: 1px solid var(--rule); border-radius: 4px; }
.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--band); padding: 6px 12px; min-height: 38px; cursor: pointer; font-size: 14px; color: var(--ink); }
.fold > summary::-webkit-details-marker { display: none; }
.fold-title { display: inline-flex; align-items: center; gap: 10px; }
.fold-title::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 2px; }
.fold[open] .fold-title::before { transform: rotate(45deg); margin-top: -4px; }
@media (prefers-reduced-motion: reduce) { .fold-title::before { transition: none; } }
.fold-count { color: var(--muted); font-size: 13px; }
.fold-body { padding: 12px; display: grid; gap: 10px; }
.fold-body .package-row { margin: 0; }
.fold .downloads { border: 1px solid var(--rule); border-radius: 4px; }
.fold .downloads li:last-child { border-bottom: 0; }
button.small { height: 28px; padding: 0 12px; font-size: 13px; background: var(--surface); }
button.small[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* ---------- My runs: list on top (scrolls after about five runs), full-width run below ---------- */
.runs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.runs-table-wrap { max-height: 318px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 4px; }
.runs-table thead th { position: sticky; top: 0; z-index: 1; }
.runs-table tbody tr:last-child td { border-bottom: 0; }
.runs-table td:first-child, .runs-table th:first-child { width: 45%; }
#runs-empty { padding: 12px; margin: 0; }
.fold .downloads::before { display: none; }

/* ---------- My runs: list (left) and progress (right), same height, each scrolls ---------- */
.runs-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; height: 360px; }
.runs-top .runs-table-wrap { max-height: none; height: 100%; }
.runs-progress { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.runs-progress #runs-progress-empty { padding: 12px; margin: 0; }
.runs-progress .progress-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.runs-progress .progress-panel[hidden] { display: none; }
.runs-progress .feed { flex: 1; max-height: none; margin: 0; border: 0; overflow-y: auto; }
.progress-panel { display: grid; gap: 14px; }
.runs-progress .progress-panel { gap: 0; }
#run-detail-body > .progress-panel .feed { margin-top: -14px; }
@media (max-width: 900px) { .runs-top { grid-template-columns: minmax(0, 1fr); height: auto; } .runs-top > * { height: 320px; } }
#runs-slot .run-detail { min-height: 0; }
