/* Test Manager. Builds on the tokens in app.css; the two below are the only additions. */
:root {
  --running: #1d4ed8;
  --running-bg: #eff6ff;
  --heal: #be185d;
  --heal-bg: #fdf2f8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --running: #60a5fa; --running-bg: #13233d; --heal: #f472b6; --heal-bg: #33172a; }
}
:root[data-theme="dark"] { --running: #60a5fa; --running-bg: #13233d; --heal: #f472b6; --heal-bg: #33172a; }

body.manager { display: grid; grid-template-columns: 64px 1fr; min-height: 100vh; font-size: 14px; }

/* Left rail */
.rail {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; padding: 12px 6px;
  position: sticky; top: 0; height: 100vh;
}
.rail a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: 8px; color: var(--muted);
  text-decoration: none; font-size: 10.5px;
}
.rail a:hover { background: var(--bg); color: var(--ink); }
.rail a[aria-current="page"] { background: var(--bg); color: var(--accent); font-weight: 600; }
.rail svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.shell { min-width: 0; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 48px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.topbar h1 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.topbar h1 span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.clientpicker { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
select, input {
  padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 13px;
}
button {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.queue {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  color: var(--running); background: var(--running-bg); white-space: nowrap;
}

/* The work area takes the whole sheet. Running text keeps its own measure; tables, lists and
   panels take the room. The side gutter grows a little with the window. */
body.manager main { padding: 20px clamp(16px, 2vw, 40px) 64px; }
.topbar { padding-inline: clamp(16px, 2vw, 40px); }
.pagehead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pagehead h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.pagehead p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar input[type="search"] { flex: 0 1 320px; }

/* Status dots and strips */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.dot.passed { background: var(--pass); }
.dot.failed, .dot.timedOut { background: var(--fail); }
.dot.skipped { background: var(--skip); }
.dot.running { background: var(--running); }
.strip { display: inline-flex; gap: 2px; vertical-align: middle; }
.strip i { width: 6px; height: 14px; border-radius: 2px; background: var(--line); }
.strip i.passed { background: var(--pass); }
.strip i.failed, .strip i.timedOut { background: var(--fail); }
.strip i.skipped { background: var(--skip); opacity: 0.55; }
/* The latest result stands a little taller, so the direction of the strip is not in doubt. */
.strip { align-items: flex-end; }
.strip i.latest { height: 20px; width: 8px; opacity: 1; }

/* Suites */
.split { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.tree { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; position: sticky; top: 68px; }
.tree button {
  display: flex; justify-content: space-between; width: 100%; text-align: left;
  border: 0; background: none; padding: 6px 8px; border-radius: 6px; color: var(--ink);
}
.tree button:hover { background: var(--bg); }
.tree button[aria-pressed="true"] { background: var(--bg); color: var(--accent); font-weight: 600; }
.tree .count { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 400; }
.tree .sub { padding-left: 20px; font-size: 13px; color: var(--muted); }

.case {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; margin-bottom: 6px; display: grid;
  grid-template-columns: 14px 1fr auto; gap: 2px 10px; align-items: center;
}
.case .dot { grid-row: 1; }
.case .name { font-weight: 550; min-width: 0; }
.case .tags { margin-left: 8px; }
.case .meta { grid-column: 2 / 4; color: var(--muted); font-size: 12px; }
.case.removed .name { text-decoration: line-through; color: var(--muted); }
.tag {
  display: inline-block; font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 7px; margin-right: 4px; line-height: 1.6;
}
.kind { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; margin-right: 4px; }
.kind.product { color: var(--fail); background: var(--fail-bg); }
.kind.vendor-unavailable { color: var(--vendor); background: var(--vendor-bg); }
.kind.blocked-by-extension { color: var(--skip); background: var(--skip-bg); }
.kind.environment { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.kind.heal { color: var(--heal); background: var(--heal-bg); }
.kind.unknown { color: var(--accent); background: var(--bg); border: 1px solid var(--accent); }

/* Tables */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th {
  text-align: left; font-size: 11px;
  color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
table.list td { padding: 0 12px; height: 40px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr.link { cursor: pointer; }
table.list tbody tr.link:hover td { background: var(--bg); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: var(--font-mono); font-size: 12.5px; }
td.wrap { white-space: normal; }

.bar { display: inline-block; width: 110px; height: 6px; border-radius: 3px; background: var(--fail-bg); overflow: hidden; vertical-align: middle; margin-left: 8px; }
.bar i { display: block; height: 100%; background: var(--pass); }
.bar.none { background: var(--line); }

/* Trends */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin: 0 0 2px; font-size: 13px; }
.card .cardsub { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.card li:first-child { border-top: 0; }
.card li small { color: var(--muted); }
.chart { width: 100%; height: 150px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .pt { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.chart text { fill: var(--muted); font-size: 10px; }
.chart .k-product { fill: var(--fail); }
.chart .k-vendor-unavailable { fill: var(--vendor); }
.chart .k-blocked-by-extension { fill: var(--skip); }
.chart .k-environment { fill: var(--muted); }
.chart .k-unknown { fill: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

/* Empty and loading states */
.emptycard {
  background: var(--panel); border: 1px dashed var(--line); border-radius: 10px;
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.emptycard h3 { margin: 0 0 4px; color: var(--ink); font-size: 15px; }
.emptycard p { margin: 0 0 12px; }
.skeleton { height: 40px; border-radius: 8px; margin-bottom: 6px; background: linear-gradient(90deg, var(--panel), var(--line), var(--panel)); background-size: 200% 100%; animation: sweep 1.2s linear infinite; }
@keyframes sweep { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; z-index: 5;
  background: var(--panel); border-left: 1px solid var(--line); padding: 20px;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
}
.drawer h2 { margin: 0 0 4px; font-size: 16px; }
.drawer .hint { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; }
.drawer label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.drawer select, .drawer input { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; }
.drawer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.formerror { color: var(--fail); font-size: 12.5px; margin: 0; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .tree { position: static; }
  .drawer { width: 100%; }
}

/* Stepper */
.backlink { color: var(--accent); text-decoration: none; }
.stepper { display: grid; grid-template-columns: clamp(340px, 24vw, 480px) 1fr; gap: 16px; align-items: start; }
.steps { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepshead { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.steps ol { list-style: none; margin: 0; padding: 0; max-height: 72vh; overflow: auto; }
.step { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: start; padding: 7px 10px; font-size: 12.5px; cursor: pointer; border-left: 3px solid transparent; }
.step.group { font-weight: 600; background: var(--bg); border-top: 1px solid var(--line); }
.step:hover { background: var(--bg); }
.step.current { border-left-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.step.failed .kindicon { stroke: var(--fail); }
.kindicon { width: 16px; height: 16px; fill: none; stroke: var(--pass); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.steptitle { min-width: 0; overflow-wrap: anywhere; }
.steptitle small { display: block; color: var(--fail); font-weight: 400; }
.stage { min-width: 0; }
.addressbar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px 10px 0 0; font-size: 12.5px; color: var(--muted); }
.addressbar #stepUrl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.addressbar .spacer { flex: 1; }
.toggle { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.shot { position: relative; background: var(--bg); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden; line-height: 0; }
.shot img { width: 100%; display: block; }
.noshot { line-height: 1.5; text-align: center; color: var(--muted); padding: 60px 0; margin: 0; }
.pointer { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); opacity: 0.55; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); pointer-events: none; }
.pointerlabel { position: absolute; transform: translate(14px, 10px); background: var(--accent); color: var(--on-accent); font-size: 11.5px; line-height: 1.4; padding: 2px 8px; border-radius: 999px; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pointerlabel.left { transform: translate(calc(-100% - 14px), 10px); }
.timeline { display: flex; gap: 3px; margin: 10px 0; }
.seg { flex: 1; height: 8px; min-width: 6px; padding: 0; border: 0; border-radius: 4px; background: var(--pass); opacity: 0.45; }
.seg.failed { background: var(--fail); }
.seg.current { opacity: 1; background: var(--accent); }
.seg:hover { opacity: 1; }
.logs { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.logtabs { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.logtabs button { border: 0; background: none; }
.logtabs button[aria-selected="true"] { background: var(--bg); color: var(--accent); font-weight: 600; }
.logbody { max-height: 260px; overflow: auto; font-size: 12px; }
.logbody table.list { border: 0; border-radius: 0; }
.logbody td { height: auto; padding: 4px 8px; vertical-align: top; font-family: var(--font-mono); font-size: 11.5px; }
.logbody .src { color: var(--muted); max-width: 240px; overflow-wrap: anywhere; }
.logbody .lvl-error td { color: var(--fail); }
.logbody .lvl-warning td { color: var(--skip); }
@media (max-width: 860px) { .stepper { grid-template-columns: 1fr; } }

/* Secrets: update and reveal */
.secretactions { text-align: right; }
.secretactions button { margin-left: 6px; padding: 3px 10px; }
table.list tr.secretrow td { height: auto; padding: 10px 12px; background: var(--bg); white-space: normal; }
.secretbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secretbox .grow { flex: 1 1 320px; font-size: 12px; color: var(--muted); }
.secretbox input[type="password"], .secretbox input[type="text"] { display: block; width: 100%; margin-top: 4px; font-family: var(--font-mono); }
.secretvalue { flex: 1 1 320px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; user-select: all; }
.secretbox .formerror { flex-basis: 100%; }
.notice { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; color: var(--pass); background: var(--pass-bg); font-size: 13px; }
/* `table.list td` is more specific than `td.wrap`, so wrapping cells have to say so here. */
table.list td.wrap { white-space: normal; overflow-wrap: anywhere; padding-top: 6px; padding-bottom: 6px; }
.secretactions { white-space: nowrap; }

/* ---- Identity ------------------------------------------------------------------------- */
/* The rail is the navy of the Nucleos wordmark in both themes; the active section carries
   the teal. Nothing else on the page is allowed to be this heavy. */
.rail { background: var(--rail); border-right: 0; }
.rail a { color: var(--rail-ink); }
.rail a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.rail a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 3px 0 0 #2fb8b1; }
.topbar h1 { font-weight: 650; }
.pagehead { display: block; margin-bottom: 16px; }
.pagehead h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; }
.pagehead p { margin-top: 2px; max-width: 78ch; }
table.list th { font-size: 12px; color: var(--muted); }
.toolbar { justify-content: space-between; flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---- Suites: the roster --------------------------------------------------------------- */
.split { grid-template-columns: clamp(190px, 17vw, 340px) minmax(0, 1fr); }
.tree { padding: 6px; }
.rosterwrap { min-width: 0; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .cell { margin-left: 12px; cursor: default; }

table.roster { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table.roster th, table.roster td { padding: 0; }
table.roster thead th { position: sticky; top: 48px; z-index: 1; height: 36px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--muted); }
table.roster thead th:first-child { border-top-left-radius: 10px; }
table.roster thead th:last-child { border-top-right-radius: 10px; }
table.roster .casecol { text-align: left; font-weight: 400; }
table.roster thead .casecol { padding-left: 16px; }
table.roster .runcol { width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
table.roster thead .runcol a { color: inherit; text-decoration: none; }
table.roster thead .runcol a:hover { color: var(--accent); text-decoration: underline; }
/* The latest run is the column people came for. */
table.roster .runcol.latest { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
table.roster thead .runcol.latest { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }

/* Level 1: the suite folder. */
table.roster .rosterfolder th { text-align: left; padding: 20px 16px 6px; font-size: 15px; font-weight: 650; color: var(--ink); background: var(--bg); border-top: 1px solid var(--line); }
table.roster tbody tr.rosterfolder:first-child th { border-top: 0; padding-top: 14px; }
/* Level 2: the describe block, indented under its folder. */
table.roster .rostergroup th { text-align: left; padding: 10px 16px 8px 28px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.rostergroup .count { margin-left: 10px; font-size: 12px; font-weight: 400; }
/* Level 3: a test case, indented again, one per row. */
.caserow > th, .caserow > td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.caserow:hover > th, .caserow:hover > td { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.caserow:hover > .runcol.latest { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.casecell { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; min-height: 46px; padding: 9px 16px 9px 40px; }
.caserow button[data-case] { display: inline-flex; align-items: baseline; gap: 10px; border: 0; background: none; padding: 0; color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.35; text-align: left; }
.caserow button[data-case]:hover .name { color: var(--accent); text-decoration: underline; }
.caserow .tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.caserow .tags .tag { margin: 0; }
.chev { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform 0.12s; flex: none; }
.caserow.open .chev { transform: translateY(-3px) rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
.caserow.removed .name { text-decoration: line-through; color: var(--muted); font-weight: 400; }
table.roster tbody tr:last-child > th, table.roster tbody tr:last-child > td { border-bottom: 0; }
table.roster tbody tr:last-child > :first-child { border-bottom-left-radius: 10px; }
table.roster tbody tr:last-child > :last-child { border-bottom-right-radius: 10px; }

/* A result. "Did not run" is a quiet dot, so the runs that happened carry the picture. */
.cell { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line); vertical-align: middle; }
a.cell, .legend .cell.passed, .legend .cell.failed, .legend .cell.skipped { width: 22px; height: 22px; border-radius: 5px; }
.legend .cell { width: 10px; height: 10px; }
.cell.passed { background: var(--pass); }
.cell.failed, .cell.timedOut { background: var(--fail); }
.cell.skipped { background: var(--skip-bg); box-shadow: inset 0 0 0 1.5px var(--skip); }
.legend .cell.passed, .legend .cell.failed, .legend .cell.skipped { width: 14px; height: 14px; border-radius: 4px; }
a.cell:hover, a.cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* An opened test case: what it does, and how it has been going. */
table.roster .casedetail td { padding: 16px 20px 20px 58px; background: var(--bg); border-bottom: 1px solid var(--line); }
.casegrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; }
.casegrid h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.casesteps, .caseruns { list-style: none; margin: 0; padding: 0; }
.casesteps li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding: 4px 0; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.casesteps li.group { font-weight: 650; font-size: 13px; padding-top: 12px; }
.casesteps li.group:first-child { padding-top: 0; }
.casesteps .kindicon { stroke: var(--muted); }
.caseruns li { display: grid; grid-template-columns: 10px auto auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.caseruns li:first-child { border-top: 0; padding-top: 0; }
.caseruns .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.caseruns a { color: var(--accent); }
@media (max-width: 980px) { .casegrid { grid-template-columns: 1fr; } .split { grid-template-columns: 1fr; } table.roster thead th { position: static; } .casecell { padding-left: 28px; } }

/* ---- Run drawer: suites as checkboxes ------------------------------------------------- */
.drawer fieldset.checks { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px 10px; }
.drawer fieldset.checks legend { padding: 0 4px; font-size: 12px; color: var(--muted); }
.drawer fieldset.checks .hint { margin: 6px 0 0; }
.drawer label.check { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 0; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.drawer label.check input { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); }
.drawer { overflow-y: auto; }

/* With more than ten runs on show, the columns and cells tighten so the roster still fits. */
.rosterwrap { overflow-x: auto; }
table.roster.dense .runcol { width: 24px; }
table.roster.dense thead .runcol { font-size: 0; }
table.roster.dense thead .runcol.latest { font-size: 10.5px; }
table.roster.dense a.cell { width: 16px; height: 16px; border-radius: 4px; }
.toolbar select { padding: 3px 6px; }

/* ---- The stage ------------------------------------------------------------------------ */
/* The workspace is one sheet resting on the navy ground: the rail belongs to the ground, the
   work belongs to the sheet. It is the one structural flourish; inside the sheet everything
   stays flat and quiet. */
body.manager { background: var(--rail); }
.shell { background: var(--bg); margin: 8px 8px 8px 0; border-radius: 16px; overflow: clip; min-height: calc(100vh - 16px); }
.topbar { border-radius: 16px 16px 0 0; }
.rail { height: 100vh; }
@media (max-width: 860px) { .shell { margin: 0; border-radius: 0; } .topbar { border-radius: 0; } }

/* The verdict: how the latest run went, said once and large. */
.verdict h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 650; max-width: 40ch; margin: 4px 0 8px; }
.verdict .num { font-variant-numeric: tabular-nums; }
.verdict .num.fail { color: var(--fail); }
.verdict .num.pass { color: var(--pass); }
.verdict p a { color: var(--accent); text-decoration: none; font-weight: 600; }
.verdict p a:hover { text-decoration: underline; }

/* Text meant only for screen readers takes the ink colour, not the default link blue. */
.sr { color: var(--ink); }

/* ---- Controls --------------------------------------------------------------------------- */
/* One height, one radius and one focus ring for everything you can click or type into. */
select, input[type="search"], input[type="text"], input[type="password"], .drawer input:not([type="checkbox"]) {
  height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px;
  background-color: var(--panel); color: var(--ink); font: inherit; font-size: 13px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
select:hover, input:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
select:focus-visible, input:focus-visible, .selectfield:focus-within {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
/* A dropdown draws its own arrow, so it looks the same in every browser and both themes. */
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237f8fa0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px;
}
input[type="search"] {
  padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%237f8fa0' stroke-width='1.6'/%3E%3Cpath d='m10.5 10.5 3 3' stroke='%237f8fa0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center; background-size: 15px;
}
.toolbar input[type="search"] { flex: 0 1 340px; }
.drawer select, .drawer input:not([type="checkbox"]) { height: 38px; padding-top: 0; padding-bottom: 0; }

/* A dropdown with its name inside the field, so the top bar reads as controls, not a form. */
.selectfield { display: inline-flex; align-items: center; height: 34px; padding-left: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); transition: border-color 0.12s, box-shadow 0.12s; }
.selectfield:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.selectfield > span { font-size: 12px; color: var(--muted); }
.selectfield select, .selectfield select:hover, .selectfield select:focus-visible { height: 32px; border: 0; box-shadow: none; background-color: transparent; padding-left: 8px; }

/* A choice between a few fixed options is a row of buttons, not a dropdown. */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: color-mix(in srgb, var(--ink) 7%, var(--panel)); }
.segmented button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-checked="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 38, 59, 0.16); }
.withlabel { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
button { height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; transition: background-color 0.12s, border-color 0.12s; }
button:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); border-color: transparent; }
.secretactions button, .stepshead button, .addressbar button { height: 30px; padding: 0 12px; }
.tree button, .logtabs button, .caserow button[data-case] { height: auto; }
@media (prefers-reduced-motion: reduce) { select, input, button, .selectfield { transition: none; } }

/* ---- Tables ----------------------------------------------------------------------------- */
/* Rows are the content, so they get the room; the grid that held them is mostly gone. The
   header is a quiet band, the lines between rows are faint, and a row answers the pointer. */
table.list { border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: clip; }
table.list thead th { height: 40px; padding: 0 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--bg) 55%, var(--panel)); border-bottom: 1px solid var(--line); }
table.list td { height: 52px; padding: 0 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-size: 13.5px; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr.link:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
table.list tbody tr.link:focus-visible { outline: 0; }
table.list tbody tr.link:focus-visible td { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
table.list td.when { font-weight: 600; font-variant-numeric: tabular-nums; }
table.list td.num { color: var(--muted); }
table.list td:first-child, table.list th:first-child { padding-left: 18px; padding-right: 0; width: 28px; }
table.list.secrets td:first-child, table.list.secrets th:first-child { width: auto; padding-right: 16px; }
table.list td.wrap { padding-top: 10px; padding-bottom: 10px; }
table.list small.muted { color: var(--muted); margin-left: 8px; }
.logbody table.list td { height: auto; padding: 5px 10px; }
.logbody table.list td:first-child { width: auto; padding-right: 10px; }

/* A status dot with a soft halo reads at a glance without shouting. */
.dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent); color: var(--line); }
.dot.passed { color: var(--pass); }
.dot.failed, .dot.timedOut { color: var(--fail); }
.dot.skipped { color: var(--skip); }
.dot.running { color: var(--running); }

.bar { width: 96px; height: 4px; border-radius: 2px; margin-left: 12px; }
table.roster thead th { background: color-mix(in srgb, var(--bg) 55%, var(--panel)); }
.tree button { font-weight: 500; }
.tree button[aria-pressed="true"] { font-weight: 650; }

/* ---- Create ----------------------------------------------------------------------------- */
.createway { margin-bottom: 14px; }
.createcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.createcards .card[hidden] { display: none; }
.createcards .card { padding: 18px 20px 20px; border-radius: 12px; }
.createcards .card h3 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.createcards .cardsub { max-width: 60ch; line-height: 1.5; }
.createcards textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical; }
.createcards textarea:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.formrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.formrow .primary { margin-left: auto; }
.selectfield input, .selectfield input:hover, .selectfield input:focus-visible { height: 32px; border: 0; box-shadow: none; background: transparent; padding: 0 10px 0 8px; font-weight: 600; width: 150px; }
table.list.upload { margin-top: 14px; }
table.list.upload td:first-child, table.list.upload th:first-child { width: auto; padding-right: 16px; }
table.list.upload input { width: 100%; min-width: 110px; height: 30px; padding: 0 8px; }
.unavailable { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--skip-bg); color: var(--skip); }
.events { list-style: none; margin: 12px 0 0; padding: 0; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.events li { padding: 6px 10px; border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.events li:first-child { border-top: 0; }
.events:empty { display: none; }
pre.draft { margin-top: 12px; max-height: 320px; overflow: auto; font-size: 12px; }
textarea.draft { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; line-height: 1.55; white-space: pre; overflow: auto; tab-size: 2; }
textarea.draft[readonly] { background: var(--bg); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Describe it: the proposal on paper, then the tests being written. */
.createcards .card.wide { grid-column: 1 / -1; }
.formrow .formactions { margin-left: auto; display: inline-flex; gap: 8px; }
.formrow .formactions .primary { margin-left: 0; }
.createcards .hint { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.createcards .working { margin: 14px 0 0; display: flex; align-items: center; gap: 10px; }
.proposal { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.proposal > .cardsub { max-width: 78ch; }
.pscenario { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 10px; margin-top: 18px; }
.pscenario h4 { grid-column: 1 / -1; margin: 0; font-size: 13.5px; font-weight: 650; }
.pcase { padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pcase.off { background: var(--bg); }
.pcase.off .psteps, .pcase.off .ptitle { color: var(--muted); }
.phead { display: flex; align-items: center; gap: 8px; }
.phead input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.phead .ptitle { flex: 1; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; box-shadow: none; font-weight: 600; font-size: 13.5px; text-overflow: ellipsis; }
.phead .ptitle:hover, .phead .ptitle:focus-visible { border-color: var(--line); background: var(--panel); }
.pkind { flex: none; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.pproblem { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; color: var(--skip); background: var(--skip-bg); }
.createcards ol.psteps { margin: 8px 0 2px; padding: 0 0 0 30px; list-style: decimal; font-size: 13px; line-height: 1.45; }
.createcards ol.psteps li { display: list-item; padding: 3px 0; border-top: 0; }
.createcards ol.psteps small { display: block; color: var(--muted); font-size: 12.5px; }
.pcase textarea { margin-top: 8px; font-size: 13px; }
button.linkbutton, button.linkbutton:hover { height: auto; padding: 2px 0; margin-left: 24px; border: 0; background: none; box-shadow: none; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; }
button.linkbutton:hover { text-decoration: underline; }
.pleft { margin-top: 16px; font-size: 13px; }
.pleft summary, .job summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.pleft ul { margin-top: 6px; }
.pleft li small { text-align: right; }
#refineForm { margin-top: 16px; }
#refineForm input { flex: 1; min-width: 220px; }
.proposal .drawer-actions, #authorOut .drawer-actions { margin-top: 14px; }
.jobstitle { margin: 22px 0 4px; font-size: 13.5px; font-weight: 650; }
.job { padding: 12px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; }
.jhead { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.jhead .jstate { margin-left: auto; color: var(--muted); font-size: 12px; }
.job .cardsub { margin: 6px 0 0 19px; }
.job details { margin: 8px 0 0 19px; }
.job .formrow, .job .notice { margin: 10px 0 0 19px; }
.job .formrow .primary { margin-left: 0; }
/* The suite and the name are long by nature; they take what the row can give. */
.job .jsave .selectfield { flex: 1 1 260px; max-width: 560px; min-width: 0; }
.job .selectfield input, .job .selectfield input:hover, .job .selectfield input:focus-visible { flex: 1; min-width: 0; width: 250px; }
.job .jagain input { flex: 1 1 260px; max-width: 560px; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }
.createcards .cardsub a { color: var(--accent); }

/* An attached extension: the choice, and the three ways to attach a build. */
.extfield .formrow { margin-top: 12px; }
.extfield .selectfield select { max-width: clamp(340px, 36vw, 640px); text-overflow: ellipsis; }
.extattach { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.extattach .hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.extattach .formrow { margin-top: 10px; }
.extattach [data-ext="url"] input { flex: 1; min-width: 220px; }
.extattach .formerror { margin-top: 10px; }
.extbusy { color: var(--muted); font-size: 12.5px; }
.extnote { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.extnote.warn { padding: 6px 10px; border-radius: 8px; color: var(--skip); background: var(--skip-bg); }
/* In the Run drawer the field is laid out like the drawer's other fields: label above, full width. */
.drawer .extfield { margin: 0 0 12px; }
.drawer .extfield > .formrow { display: block; margin-top: 0; }
.drawer .extfield .selectfield, .drawer .extfield .selectfield:hover { display: block; height: auto; margin-bottom: 8px; padding: 0; border: 0; background: none; box-shadow: none; }
.drawer .extfield .selectfield select, .drawer .extfield .selectfield select:hover { width: 100%; max-width: none; height: 38px; margin-top: 4px; padding-left: 8px; border: 1px solid var(--line); background-color: var(--panel); }
.drawer .extattach .formrow { display: flex; }
.drawer .extattach input { margin: 0; }
/* The drawer shows every input as a block; the two file inputs are driven by buttons and stay out of sight. */
.extfield input[type="file"] { display: none; }
@media (max-width: 1040px) { .createcards { grid-template-columns: 1fr; } }

/* A session that is running: its steps beside the agent's browser. */
.pshead { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pshead h4 { margin: 0; font-size: 13.5px; font-weight: 650; }
.pshead .selectfield input { width: clamp(220px, 22vw, 420px); }
.session { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr); gap: 18px; margin: 12px 0 0 19px; align-items: start; }
.session .formrow, .session .notice { margin: 10px 0 0; }
.ssteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card .ssteps li.sstep { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 0; border-top: 0; font-size: 13px; }
.sstep .dot { margin-top: 5px; }
.sstep p { margin: 0; line-height: 1.45; }
.sstep.waiting p { color: var(--muted); }
.sstep small { color: var(--muted); }
.sstep ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.card .sstep ul li, .card .snotes li { display: block; padding: 0; border-top: 0; }
.sstep code { display: block; padding: 4px 8px; border-radius: 6px; background: var(--bg); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.snotes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; color: var(--muted); font-size: 12.5px; }
.snotes:empty { display: none; }
.ssay input, .sstuck input[type="text"] { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.sstuck { margin-top: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--fail) 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--fail) 5%, var(--panel)); }
.sstuck .sreason { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.sstuck .sfield { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.sstuck textarea { font-size: 13px; }
.sstuck input[type="text"] { width: 100%; margin-top: 8px; }
.sscreen { margin: 0; position: sticky; top: 12px; }
.sscreen img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.sscreen .swait { margin: 0; padding: 60px 0; border: 1px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.sscreen figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.sscreen img { cursor: pointer; }
.sscreen.yours img { cursor: crosshair; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.sscreen .sdid { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.sscreen .stype input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
@media (max-width: 900px) { .session { grid-template-columns: minmax(0, 1fr); } .sscreen { position: static; } }
.session [hidden] { display: none; }

/* Clients: a list that chooses one, and that client's sheet. The sheet is the page's one
   focal thing: a name, a sentence saying what it is ready for, then its facts as a spec list. */
.clients { display: grid; grid-template-columns: clamp(220px, 20vw, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.clientlist { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); position: sticky; top: 68px; max-height: calc(100vh - 96px); }
.clientscroll { display: grid; gap: 4px; align-content: start; overflow-y: auto; min-height: 0; }
.clientscroll [hidden] { display: none; }
.clientfilter { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; flex: none; }
.nomatch { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 12.5px; }
.clientitem { display: grid; gap: 2px; justify-items: start; height: auto; padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; white-space: normal; }
.clientitem strong { font-size: 13.5px; font-weight: 600; }
.clientitem span { color: var(--muted); font-size: 12px; }
.clientitem:hover { background: var(--bg); }
.clientitem[aria-pressed="true"] { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.clientitem.new { flex: none; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; padding-bottom: 12px; }
.clientitem.new strong { color: var(--accent); }
.tagline { color: var(--accent); font-size: 11.5px; font-weight: 600; }
.clientsheet { padding: 22px 24px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 0; }
.sheethead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sheethead h3 { margin: 0; font-size: clamp(20px, 1.6vw, 26px); font-weight: 650; letter-spacing: -0.015em; line-height: 1.15; }
.sheethead p { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 62ch; line-height: 1.5; }
.sheetactions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.readiness { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 0; font-size: 15px; line-height: 1.45; max-width: 70ch; }
.readiness .dot { flex: none; transform: translateY(-1px); }
.gaps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.gaps:empty { display: none; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 28px; margin: 20px 0 0; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.specs a { color: var(--accent); }
.specs[hidden], .sheetedit[hidden] { display: none; }
.sheetedit { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.sheetedit .formrow, .sheetedit .formerror { grid-column: 1 / -1; margin-top: 0; }
.sheetpart { margin-top: 22px; }
.sheetpart h4 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
.sheetpart .cardsub { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.appchips { display: flex; flex-wrap: wrap; gap: 8px; }
.appchips button { height: 32px; padding: 0 12px 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.appchips button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.appchips button[aria-checked="true"] { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.appchips button[aria-checked="true"]::before { background: var(--accent); border-color: var(--accent); }
.secretlist { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 28px; }
.card .secretlist li, .secretlist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.runline { margin: 0; font-size: 13px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.runline a { color: var(--accent); }
.sheetfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.sheetfoot [hidden] { display: none; }
button.danger { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 40%, var(--line)); }
button.danger:hover { background: color-mix(in srgb, var(--fail) 10%, var(--panel)); }
.confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 100%; font-size: 13px; }
.confirm[hidden] { display: none; }
.confirm span:first-child { flex: 1 1 320px; }
.newclient { margin-top: 18px; display: grid; gap: 14px; }
.newclient .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.newclient .readiness { margin-top: 2px; }
.newclient .cardsub { margin: 0; color: var(--muted); font-size: 12.5px; max-width: 78ch; line-height: 1.5; }
.newclient [hidden] { display: none; }
.field.lead input { height: 44px; font-size: 15px; }
.newadmin summary { cursor: pointer; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.newadmin .cardsub { margin-top: 10px; }
.notice .linkbutton { margin-left: 6px; }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); align-content: start; }
.field input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; }
.field input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field small { font-size: 11.5px; line-height: 1.4; }
.muted { color: var(--muted); }
@media (max-width: 900px) { .clients { grid-template-columns: minmax(0, 1fr); } .clientlist { position: static; max-height: 50vh; } }
span.mono { font-family: var(--font-mono); font-size: 12px; }
.sheetpart .linkbutton { margin-left: 0; }

/* Clients: what the sheet says beyond the facts, and the forms that change them. */
.clientitem .tags { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tagline.prod { color: var(--fail); }
.tagline.quiet { color: var(--muted); font-weight: 500; }
.sheetnote { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12.5px; line-height: 1.45; max-width: 86ch; }
.sheetnote.prod { color: var(--fail); background: var(--fail-bg); }
.readiness.check { margin-top: 10px; font-size: 13.5px; }
.readiness.check[hidden] { display: none; }
.readiness a { color: var(--accent); }
.extstate { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.extstate.problem { color: var(--fail); }
.extstate.ready { color: var(--pass); }
.field select { width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; }
.field[hidden] { display: none; }
.sheetedit.plain { margin-top: 12px; padding-top: 0; border-top: 0; }
.newapp { margin-top: 12px; }
.newapp summary, .removedlist summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.infra { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 13px; line-height: 1.5; }
.infra[hidden] { display: none; }
.infra p { margin: 0; max-width: 80ch; }
.infra ul, .card .infra ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; max-width: 620px; }
.card .infra li, .infra li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-top: 1px solid var(--line); }
.infra s { color: var(--muted); margin-right: 8px; }
.runstrip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12.5px; }
.runstrip a { width: 14px; height: 22px; border-radius: 4px; background: var(--skip); opacity: 0.85; }
.runstrip a.passed { background: var(--pass); }
.runstrip a.failed { background: var(--fail); }
.runstrip a:hover { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
.runstrip .muted { margin-left: 8px; }
.footleft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheetfoot .formerror { flex: 1 1 100%; }
.removedlist { margin-top: 6px; padding: 10px 12px 4px; border-top: 1px solid var(--line); }
.removedrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.removedrow span { display: grid; }
.removedrow small { color: var(--muted); font-size: 11.5px; }
.removedrow button { height: 28px; padding: 0 10px; }
.drawer .hint.production { margin: -4px 0 12px; padding: 8px 10px; border-radius: 8px; color: var(--fail); background: var(--fail-bg); }
.drawer .hint.production[hidden] { display: none; }

/* Manual steps: a test case written out for a person, in a case's detail and in the Steps view. */
.casetabs { margin-bottom: 14px; }
.msetup { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 78ch; }
.msetup strong { color: var(--ink); font-weight: 600; }
.msteps { margin: 0; padding: 0 0 0 22px; display: grid; gap: 12px; max-width: 86ch; }
.card .msteps li, .msteps > li { display: list-item; padding: 0 0 0 4px; border-top: 0; font-size: 13.5px; line-height: 1.5; }
.msteps > li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.msteps p { margin: 0; }
.msteps .mdo { font-weight: 600; }
.msteps .mexp { margin-top: 2px; }
.msteps .mexp span { color: var(--pass); font-size: 12px; font-weight: 650; margin-right: 6px; }
.mhow { list-style: none; margin: 6px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 3px; }
.card .mhow li, .mhow li { display: block; padding: 0; border-top: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.mcode { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mpartial { margin: 12px 0 0; color: var(--skip); font-size: 12.5px; }
pre.casecode { margin-top: 0; max-height: 480px; white-space: pre; }
.mdoc { display: grid; gap: 26px; }
.mfolder h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.mgroup { margin-top: 14px; }
.mgroup h4 { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.mcase { padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.mcase + .mcase { margin-top: 10px; }
.mcase header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mcase h5 { margin: 0; font-size: 14.5px; font-weight: 650; }
.mcase .dot:not(.passed):not(.failed):not(.skipped):not(.timedOut) { background: var(--line); }

/* Suites, List view: the roster's rows without its run columns, one line per case, sortable.
   The columns are given their share of the width; long names wrap inside their own column. */
table.roster.flat { table-layout: fixed; }
table.roster.flat thead th { text-align: left; padding: 0 12px; }
table.roster.flat thead th.casecol { width: 38%; padding-left: 16px; }
table.roster.flat thead th:nth-child(2) { width: 18%; }
table.roster.flat thead th:nth-child(3) { width: 22%; }
table.roster.flat thead th:nth-child(4) { width: 15%; }
table.roster.flat thead th.num { width: 7%; text-align: right; padding-right: 16px; }
table.roster.flat tbody td { padding: 9px 12px; font-size: 12.5px; line-height: 1.4; vertical-align: middle; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
table.roster.flat tbody td.num { text-align: right; padding-right: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.roster.flat .casedetail td { padding: 16px 20px 20px 58px; }
.sortbtn, .sortbtn:hover { height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; }
.sortbtn:hover { color: var(--ink); text-decoration: underline; }
th[aria-sort] .sortbtn { color: var(--ink); }
.resultlink { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; }
.resultlink:hover { text-decoration: underline; }

/* Tags: the ones a run is chosen by, the ones on a test, and the list of them all in the tree. */
.tagpicks { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpicks button { height: 30px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: 12.5px; }
.tagpicks button .count { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: 0.8; }
.tagpicks button[aria-checked="true"] { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); font-weight: 600; }
.treetags { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.treetags h4 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; padding: 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.treetags h4 .linkbutton { margin-left: 0; }
.tagrow { display: flex; align-items: center; gap: 4px; }
.tagrow > button[data-tagfilter] { flex: 1; min-width: 0; }
.tagacts { display: inline-flex; gap: 4px; }
.tree .tagacts button, .tree .tagrename button { width: auto; height: 26px; padding: 0 8px; font-size: 11.5px; justify-content: center; }
.tagrename { display: flex; gap: 4px; padding: 3px 4px; }
.tagrename input { flex: 1; min-width: 0; height: 26px; padding: 0 6px; font-size: 12.5px; }
.treetags .hint { margin: 8px 8px 4px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.treetags .formerror { margin: 6px 8px; }
.tagshead { margin-top: 18px !important; }
.tagchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag.own { display: inline-flex; align-items: center; gap: 2px; padding-right: 2px; }
.tag.own button, .tag.own button:hover { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.tag.own button:hover { color: var(--fail); background: color-mix(in srgb, var(--fail) 12%, transparent); }
.tagedit .formrow { margin-top: 8px; }
.tagedit .formrow input { flex: 0 1 240px; height: 30px; }
.tagedit .formrow button { height: 30px; }
.tagedit .hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.tree .treetags h4 .linkbutton, .tree .treetags h4 .linkbutton:hover { display: inline; width: auto; padding: 2px 0; background: none; color: var(--accent); font-size: 11.5px; font-weight: 600; }
.tree .tagacts button { display: inline-flex; border: 1px solid var(--line); }
.tree .tagacts button.danger { color: var(--fail); }
.tree .tagrename button { display: inline-flex; border: 1px solid var(--line); }
.tree .tagrename button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tagsnotice { margin: 8px; padding: 6px 8px; border-radius: 6px; background: var(--pass-bg); color: var(--pass); font-size: 11.5px; line-height: 1.4; }

/* A test's tags, at the top of the test: the first thing in an opened one. */
.tagbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tagbarlabel { color: var(--muted); font-size: 12px; font-weight: 600; }
.tagaddform { display: inline-flex; gap: 6px; margin-left: auto; }
.tagaddform input { width: 230px; height: 30px; padding: 0 8px; font-size: 12.5px; }
.tagaddform button { height: 30px; padding: 0 12px; }
.tagbar .formerror { flex: 1 1 100%; margin: 0; }
.mcase .tagbar { margin: 0 0 12px; background: var(--bg); }
button.tagadd, button.tagadd:hover { height: 20px; padding: 0 8px; border: 1px dashed var(--line); border-radius: 999px; background: none; box-shadow: none; color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer; }
button.tagadd:hover, button.tagadd:focus-visible { color: var(--accent); border-color: var(--accent); }

/* ---- Finish ------------------------------------------------------------------------------
   The last word on how things look, over everything above: a light rail on a soft ground,
   the work on one raised sheet, controls with a hair of depth, and one radius throughout.
   Nothing here changes what anything does. */

/* The ground and the sheet. */
body.manager { background: var(--rail); }
.shell { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); margin: 8px 8px 8px 0; }
.topbar { border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
.topbar h1 { font-weight: 600; letter-spacing: -0.02em; }
.pagehead h2, .verdict h2, .sheethead h3 { font-weight: 600; letter-spacing: -0.025em; }
.pagehead p, .verdict p { color: var(--muted); }

/* The rail: quiet until something is chosen, and then a small raised tile. */
.rail a { color: var(--rail-ink); border-radius: 10px; transition: background-color 0.12s, color 0.12s; }
.rail a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.rail a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); }

/* Buttons. A plain one is a white key with a hairline and a little depth; the primary is the
   one filled thing on a page. The buttons that are really rows, tabs or links stay flat. */
button { border-radius: 8px; border-color: color-mix(in srgb, var(--ink) 14%, var(--line)); box-shadow: var(--shadow-xs); font-weight: 500; }
button:hover { background: color-mix(in srgb, var(--ink) 4%, var(--panel)); }
button:active { box-shadow: none; transform: translateY(0.5px); }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 550; box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
button.primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--panel)); border-color: transparent; }
button:disabled, button:disabled:hover { box-shadow: none; transform: none; }
.tree button, .logtabs button, .caserow button[data-case], .segmented button, .clientitem, .step, .seg, .sortbtn, button.linkbutton, button.tagadd, .tag.own button,
.tree button:hover, .caserow button[data-case]:hover, .segmented button:hover, .sortbtn:hover { box-shadow: none; transform: none; }
.tree button:hover, .clientitem:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.caserow button[data-case]:hover, .segmented button:hover, .sortbtn:hover, .logtabs button:hover { background: none; }
button.danger { border-color: color-mix(in srgb, var(--fail) 35%, var(--line)); }

/* Fields share the buttons' depth, and say where the cursor is with a soft ring. */
select, input[type="search"], input[type="text"], input[type="password"], input[type="url"], textarea, .selectfield, .field input, .field select {
  border-radius: 8px; border-color: color-mix(in srgb, var(--ink) 12%, var(--line)); box-shadow: var(--shadow-xs);
}
.selectfield select, .selectfield input, .selectfield select:hover, .selectfield input:hover { box-shadow: none; }
select:focus-visible, input:focus-visible, textarea:focus-visible, .selectfield:focus-within {
  border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
:focus-visible { outline-color: color-mix(in srgb, var(--ink) 55%, transparent); }
.segmented { border-radius: 9px; background: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
.segmented button[aria-checked="true"] { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), var(--shadow-xs); }

/* Panels: one radius, a hairline, and enough shadow to lift them off the sheet. */
.card, table.list, table.roster, .tree, .clientlist, .clientsheet, .mcase, .tagbar, .createcards .card, .infra, .sstuck {
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
table.list thead th, table.roster thead th { background: color-mix(in srgb, var(--ink) 2.5%, var(--panel)); font-weight: 500; letter-spacing: 0; }
table.list thead th:first-child, table.roster thead th:first-child { border-top-left-radius: var(--radius); }
table.list thead th:last-child, table.roster thead th:last-child { border-top-right-radius: var(--radius); }
table.list tbody tr.link:hover td { background: color-mix(in srgb, var(--ink) 3%, var(--panel)); }
table.list tbody tr.link:focus-visible td { background: color-mix(in srgb, var(--ink) 6%, var(--panel)); }
.drawer { box-shadow: -1px 0 0 var(--line), -24px 0 48px rgba(0, 0, 0, 0.10); }

/* Small things: tags and chips as quiet pills, numbers lined up, links that read as links. */
.tag { border-radius: 999px; background: color-mix(in srgb, var(--ink) 4%, var(--panel)); border: 1px solid var(--line); }
.kind { font-weight: 550; letter-spacing: 0; }
.kind.unknown { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); background: var(--panel); }
.notice { border: 1px solid color-mix(in srgb, var(--pass) 22%, transparent); border-radius: 8px; }
.verdict .num, table.list td.num, table.list td.when, .count { font-variant-numeric: tabular-nums; }
.clientitem[aria-pressed="true"], .tree button[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 5%, var(--panel)); }
.clientitem[aria-pressed="true"] { box-shadow: inset 2px 0 0 var(--ink); }
.readiness { letter-spacing: -0.01em; }
pre, pre.draft, textarea.draft, .mcode, .sstep code { border-radius: 8px; }
@media (max-width: 860px) { .shell { margin: 0; border: 0; border-radius: 0; box-shadow: none; } .topbar { border-radius: 0; } }

/* Filled marks (grid cells, dots, strips) use the brighter of each status colour; text keeps
   the deeper one, which reads better at small sizes. */
.cell.passed, .runstrip a.passed, .strip i.passed { background: var(--pass-fill); }
.cell.failed, .cell.timedOut, .runstrip a.failed, .strip i.failed, .strip i.timedOut { background: var(--fail-fill); }
.dot.passed { background: var(--pass-fill); color: var(--pass-fill); }
.dot.failed, .dot.timedOut { background: var(--fail-fill); color: var(--fail-fill); }
.dot.skipped { background: var(--skip-fill); color: var(--skip-fill); }
.bar i { background: var(--pass-fill); }

/* ---- Colour ------------------------------------------------------------------------------
   Where the page speaks up. Teal is the brand and whatever is chosen; the headline wears the
   colour of how the latest run went; a tag keeps one hue of its own wherever it appears. */

/* The name, with its mark: a shield with a tick in it. */
.topbar h1 { display: flex; align-items: center; }
.topbar h1::before {
  content: ""; flex: none; width: 24px; height: 24px; margin-right: 10px; border-radius: 7px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.5l6 2.2v4.6c0 3.7-2.5 6.3-6 7.7-3.5-1.4-6-4-6-7.7V6.7z'/%3E%3Cpath d='M9.3 11.8l1.9 1.9 3.5-3.7'/%3E%3C/svg%3E") center / 18px no-repeat,
    linear-gradient(140deg, #2dd4bf, #0f766e 70%);
  box-shadow: 0 1px 2px rgba(8, 30, 28, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* The rail: the page you are on is the teal one. */
.rail a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 13%, var(--panel)); color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* The one filled button on a page is teal, and throws a little of it underneath. */
button.primary {
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 86%, #000)); border-color: color-mix(in srgb, var(--primary) 80%, #000);
  box-shadow: 0 1px 2px rgba(8, 30, 28, 0.2), 0 6px 14px -6px color-mix(in srgb, var(--primary) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
button.primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 90%, #fff), var(--primary)); border-color: color-mix(in srgb, var(--primary) 80%, #000); }
button.primary:disabled, button.primary:disabled:hover { background: color-mix(in srgb, var(--primary) 45%, var(--panel)); border-color: transparent; box-shadow: none; }

/* Focus and what is chosen are teal too. */
select:focus-visible, input:focus-visible, textarea:focus-visible, .selectfield:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
:focus-visible { outline-color: var(--accent); }
.segmented button[aria-checked="true"] { color: var(--accent); }
.clientitem[aria-pressed="true"], .tree button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 11%, var(--panel)); }
.clientitem[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--accent); }
table.list tbody tr.link:hover td { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }

/* The headline is a banner in the colour of the result, with a mark that says it at a glance. */
.verdict {
  position: relative; overflow: hidden; margin-bottom: 20px; padding: 18px 24px 18px 78px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-xs);
  --state: var(--muted);
}
.verdict.passed { --state: var(--pass-fill); }
.verdict.failed { --state: var(--fail-fill); }
.verdict.passed, .verdict.failed {
  border-color: color-mix(in srgb, var(--state) 32%, var(--line));
  background: linear-gradient(100deg, color-mix(in srgb, var(--state) 14%, var(--panel)), var(--panel) 62%);
}
.verdict h2 { margin-top: 0; }
.verdict p { margin-bottom: 0; }
.verdict::before {
  content: ""; position: absolute; left: 22px; top: 20px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--state); box-shadow: 0 0 0 6px color-mix(in srgb, var(--state) 18%, transparent);
}
.verdict::after {
  content: ""; position: absolute; left: 22px; top: 20px; width: 38px; height: 38px; background: var(--panel);
  -webkit-mask: var(--mark) center / 20px no-repeat; mask: var(--mark) center / 20px no-repeat;
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5.5 10h9'/%3E%3C/svg%3E");
}
.verdict.passed::after { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.3 3.3L15 6.8'/%3E%3C/svg%3E"); }
.verdict.failed::after { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l8 8M14 6l-8 8'/%3E%3C/svg%3E"); }
@media (max-width: 600px) {
  .verdict { padding: 14px 16px 14px 58px; }
  .verdict::before, .verdict::after { left: 16px; top: 16px; width: 28px; height: 28px; }
  .verdict::after { -webkit-mask-size: 15px; mask-size: 15px; }
}

/* Tags in their own hue; the same hue as a dot where a tag is a row or a switch. */
.tag.hue {
  background: oklch(var(--tag-bg-l) 0.045 var(--hue)); border-color: oklch(var(--tag-line-l) 0.07 var(--hue));
  color: oklch(var(--tag-ink-l) 0.115 var(--hue)); font-weight: 550;
}
.tag.own.hue button { color: inherit; opacity: 0.7; }
.tag.own.hue button:hover { opacity: 1; }
.tagdot { flex: none; align-self: center; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: oklch(0.68 0.14 var(--hue)); }
.tagrow > button[data-tagfilter] { justify-content: flex-start; }
.tagrow > button[data-tagfilter] .count { margin-left: auto; }
.tagpicks button { display: inline-flex; align-items: center; }
.tagpicks button .tagdot { margin-right: 6px; }

/* Counts in the tree are small pills, so the eye can run down them. */
.tree .count { flex: none; align-self: center; min-width: 24px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 11.5px; text-align: center; }
.tree button[aria-pressed="true"] .count { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); font-weight: 600; }

/* A suite's name in the grid carries the brand at its edge. */
table.roster .rosterfolder th { box-shadow: inset 3px 0 0 var(--accent); }

/* The bar above the grid holds still: the filter and View stay where they are whichever view
   is chosen, and what comes and goes with a view does so on the right or on a line of its own. */
.rosterwrap .toolbar { justify-content: flex-start; }
.rosterwrap .toolbar .withlabel:has(#rosterWindow) { margin-left: auto; }
.rosterwrap .toolbar .legend { flex-basis: 100%; }

/* Secrets: the bar above the list, and the form a new one is made in. */
.secretbar { justify-content: space-between; }
.secretnew { margin-bottom: 12px; }
.secretnew h3 { margin: 0 0 10px; font-size: 14px; }
.secretnew .secretbox { align-items: flex-end; }
.secretnew .secretbox .toggle { height: 36px; }
.secretnew .secretbox .cardsub { flex-basis: 100%; margin: 0; }
.secretnew input[name="key"] { text-transform: uppercase; }
.secretnew input[name="key"]::placeholder { text-transform: none; }

/* ---- Type --------------------------------------------------------------------------------
   Geist throughout. Headings are set tight and at one weight; small text is never lighter
   than regular; names, references and code are in the mono face, a touch smaller. */
.topbar h1 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.02em; }
.pagehead h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; }
.verdict h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.04em; }
.pagehead p, .verdict p { font-size: 13.5px; line-height: 1.5; }
.card h3, .sheethead h3, .emptycard h3 { font-weight: 600; letter-spacing: -0.02em; }
.rail a { font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
button { font-weight: 500; letter-spacing: -0.005em; }
button.primary { font-weight: 550; }
table.list thead th, table.roster thead th { font-size: 12px; font-weight: 500; letter-spacing: 0; }
table.roster .rosterfolder th { font-weight: 600; letter-spacing: -0.02em; }
.caserow button[data-case], .mcase h5 { font-weight: 550; letter-spacing: -0.01em; }
td.mono, span.mono, .mono, code { font-family: var(--font-mono); letter-spacing: -0.01em; }
.tag, .kind, .count, .tagline { letter-spacing: 0; }

/* ---- Secrets ----------------------------------------------------------------------------
   A sheet of rows, one for each secret: a mark in the colour of how it stands, its name and
   where it is kept, when it last changed, and what can be done with it. */
.secretshead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.secretshead > div { flex: 1 1 420px; min-width: 0; }
.secretshead p { margin-bottom: 0; }
.secretsum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.secretvault { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.secretvault code { margin-left: 4px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 12px; }

.secretstate { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; --state: var(--muted); --state-bg: color-mix(in srgb, var(--ink) 5%, var(--panel)); color: var(--state); background: var(--state-bg); }
.secretstate i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.secretstate.present, .secretitem.present .secretstate { --state: var(--pass); --state-bg: var(--pass-bg); }
.secretstate.missing, .secretitem.missing .secretstate { --state: var(--skip); --state-bg: var(--skip-bg); }
.secretstate.error, .secretitem.error .secretstate { --state: var(--fail); --state-bg: var(--fail-bg); }

.secretsheet { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-xs); overflow: clip; }
.secretitem + .secretitem { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.secretmain { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, auto) auto; align-items: center; gap: 6px 16px; padding: 14px 18px; transition: background-color 0.12s; }
.secretitem:hover > .secretmain { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.secreticon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, var(--panel)); }
.secreticon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.secretitem.present .secreticon { color: var(--pass); background: var(--pass-bg); }
.secretitem.missing .secreticon { color: var(--skip); background: var(--skip-bg); }
.secretitem.error .secreticon { color: var(--fail); background: var(--fail-bg); }
.secretname { display: grid; gap: 2px; min-width: 0; }
.secretname strong { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.secretref { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.secretstand { display: grid; justify-items: end; gap: 4px; min-width: 0; text-align: right; }
.secretdetail { max-width: 46ch; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.secretsheet .secretactions { display: flex; gap: 6px; }
.secretsheet .secretactions button { margin: 0; height: 32px; padding: 0 12px; }
.secretsheet .secretrow { padding: 14px 18px 16px 74px; border-top: 1px dashed var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--panel)); }
.secretsheet .secretrow[hidden] { display: none; }
.secretsnote { margin-top: 12px; color: var(--muted); font-size: 12.5px; }

/* Fields in the forms, with their label above. */
.secretbox .grow { display: grid; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.secretbox input[type="password"], .secretbox input[type="text"] { height: 36px; margin-top: 0; padding: 0 11px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 13px; }
.secretbox button { height: 36px; }
.secretbox { align-items: flex-end; }
.secretbox .toggle { height: 36px; font-size: 12.5px; color: var(--muted); }

/* A revealed value, with a line that runs down the thirty seconds it stays. */
.secretbox.revealed { align-items: stretch; }
.secretvalue { position: relative; display: block; padding: 9px 12px 11px; border-radius: 9px; font-family: var(--font-mono); font-size: 13px; overflow: hidden; }
.secretvalue::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: secret-drain 30s linear forwards; }
@keyframes secret-drain { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .secretvalue::after { animation: none; opacity: 0.4; } }

/* The form a new one is made in. */
.secretnew { margin-bottom: 14px; padding: 18px 20px; border-radius: 14px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow-sm); }
.secretnew h3 { margin: 0 0 14px; font-size: 15px; }
.secretnew .secretbox .cardsub { order: 9; }

@media (max-width: 820px) {
  .secretmain { grid-template-columns: 40px minmax(0, 1fr); }
  .secretstand { grid-column: 2; justify-items: start; text-align: left; }
  .secretsheet .secretactions { grid-column: 2; }
  .secretsheet .secretrow { padding-left: 18px; }
  .secretvault { margin-left: 0; }
}

/* The top bar keeps to one line; on a narrow window the name drops its second half. */
.topbar h1, .topbar button { white-space: nowrap; }
@media (max-width: 760px) { .topbar h1 span { display: none; } }

/* ---- Sign-in -----------------------------------------------------------------------------
   One card in the middle of the window, and in the top bar who is signed in and the way out. */
body.signin { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: var(--rail); }
.signincard { width: min(380px, 100%); padding: 32px 30px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-sm), 0 24px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent); }
.signinmark {
  display: block; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.5l6 2.2v4.6c0 3.7-2.5 6.3-6 7.7-3.5-1.4-6-4-6-7.7V6.7z'/%3E%3Cpath d='M9.3 11.8l1.9 1.9 3.5-3.7'/%3E%3C/svg%3E") center / 30px no-repeat,
    linear-gradient(140deg, #2dd4bf, #0f766e 70%);
  box-shadow: 0 1px 2px rgba(8, 30, 28, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.signincard h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.035em; }
.signinsub { margin: 4px 0 22px; color: var(--muted); font-size: 13.5px; }
.signincard form { display: grid; gap: 14px; }
.signincard .field { font-weight: 500; }
.signincard .field input { height: 40px; font-size: 14px; }
.signincard button { height: 40px; margin-top: 4px; font-size: 14px; }
.signinnote { margin: 18px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.who { display: inline-flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.who[hidden] { display: none; }
.who button { height: 30px; padding: 0 10px; font-size: 12.5px; }
@media (max-width: 760px) { .who #whoName { display: none; } }

/* The run drawer: where the run goes. */
.runwhere { margin-bottom: 12px; }
.runwhere .formlabel { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.runwhere .segmented { display: inline-flex; }
.drawer .runwhere .hint { margin: 6px 0 0; }
.runwhere button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- A run on the cluster, as it happens ------------------------------------------------
   What the cluster is doing, step by step, and what each runner's browser is showing. */
.liverun { margin-bottom: 16px; padding: 18px 20px 20px; border-radius: 14px; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.liverun header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.liverun h3 { margin: 0; font-size: 15px; }
.livewhen { margin-left: auto; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.livestages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.livestages li { display: grid; grid-template-columns: 20px 1fr; gap: 2px 8px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--bg) 50%, var(--panel)); font-size: 12.5px; }
.livemark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--panel); font-size: 11px; font-weight: 700; line-height: 1; }
.livelabel { font-weight: 550; color: var(--muted); }
.livedetail { grid-column: 2; color: var(--muted); font-size: 11.5px; line-height: 1.4; overflow-wrap: anywhere; }
.livestages li.done .livemark { border-color: var(--pass-fill); background: var(--pass-fill); }
.livestages li.done .livelabel { color: var(--ink); }
.livestages li.active { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.livestages li.active .livelabel { color: var(--ink); }
.livestages li.active .livemark { border-color: var(--accent); border-top-color: transparent; animation: live-turn 0.9s linear infinite; }
.livestages li.failed { border-color: color-mix(in srgb, var(--fail-fill) 45%, var(--line)); background: var(--fail-bg); }
.livestages li.failed .livemark { border-color: var(--fail-fill); background: var(--fail-fill); }
.livestages li.failed .livelabel, .livestages li.failed .livedetail { color: var(--fail); }
@keyframes live-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .livestages li.active .livemark { animation: none; border-top-color: var(--accent); } }
.liverunners { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 640px)); gap: 14px; }
.liverunner { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.livescreen { display: grid; place-items: center; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--ink) 6%, var(--panel)); }
.livescreen img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.livescreen img[hidden], .livescreen p[hidden] { display: none; }
.livescreen p { margin: 0; padding: 0 20px; color: var(--muted); font-size: 12.5px; text-align: center; }
.liverunner figcaption { display: grid; gap: 3px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.liverunner .livestate { color: var(--muted); font-size: 12px; }
.liverunner code { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liverunner.running .livestate { color: var(--accent); }

/* ---- Published extension builds ---------------------------------------------------------
   What CI has put in the bucket for the client's site: one line a build, newest first. */
.extfield > .formrow { flex-wrap: wrap; }
.extpublished { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.extpublished[hidden] { display: none; }
.extpublished .hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.extpublished .hint strong { color: var(--ink); font-weight: 550; }
.extpubhead { display: grid; gap: 10px; }
.extpubhead input { width: 100%; height: 32px; font-size: 13px; }
.extfield .extpubhead input[type="search"] { padding: 0 10px 0 34px; margin: 0; }
.extpublist { display: grid; margin: 10px 0 0; padding: 0; max-height: 320px; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.extpublist li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 7px 10px; font-size: 12.5px; }
.extpublist li[hidden] { display: none; }
.extpublist li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.extpubversion { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.extpubref { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.extpubref.branch { color: var(--accent); }
.extpubwhen { color: var(--muted); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.extpubmarks .kind { margin: 0 0 0 4px; }
.extpublist button { height: 26px; padding: 0 10px; font-size: 12px; }
.extpublished button.linkbutton { margin: 8px 0 0; }
.drawer .extpublist li { grid-template-columns: 62px minmax(0, 1fr) auto; row-gap: 2px; }
.drawer .extpubwhen { grid-column: 2; }
.drawer .extpubmarks { grid-column: 1 / 3; }
.drawer .extpublist button { grid-column: 3; grid-row: 1 / 3; }
.livestages[hidden] { display: none; }

/* ---- Activity: who did what, a day at a time ---------------------------------------- */
table.activity td { height: auto; padding-top: 9px; padding-bottom: 9px; vertical-align: top; }
table.activity td.when { width: 1%; color: var(--muted); font-weight: 500; }
table.activity td:nth-child(2) { width: 1%; font-weight: 600; }
/* What was done gets the room: it carries the name of the thing, which reads badly broken over lines. */
table.activity td:nth-child(3) { width: 48%; }
table.activity td:nth-child(2) .muted { font-weight: 400; }
table.activity td .tag { margin-right: 2px; }
table.activity td .mono { font-size: 12.5px; overflow-wrap: anywhere; }
table.activity td a.mono { color: var(--accent); text-decoration: none; }
table.activity td a.mono:hover { text-decoration: underline; }
/* A day's heading: a row of its own, quieter than the column headings above it. */
table.list tr.dayrow th { padding: 14px 12px 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }

/* Narrow screens, and anything wider than the page.
   The shell clips what overflows it, so a top bar that did not fit lost its right-hand end:
   the Client picker, Run tests and Sign out could not be reached on a phone or tablet. It now
   wraps on to a second line. A table or a row of cards wider than the page used to be cut
   off with no way to it; the view scrolls sideways under the top bar instead. */
main#view { overflow-x: auto; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
@media (max-width: 900px) {
  .topbar { height: auto; min-height: 48px; flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .topbar-right { flex-wrap: wrap; row-gap: 8px; min-width: 0; max-width: 100%; }
  /* A long client name is cut short in the picker, not pushed off the screen. */
  .topbar .selectfield { min-width: 0; max-width: 100%; }
  .topbar .selectfield select { flex: 0 1 auto; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
}
/* A link-style button keeps its place under the pointer: the general hover rule moved these
   two sideways, away from the pointer and back. */
.notice .linkbutton:hover { margin-left: 6px; }
.sheetpart .linkbutton:hover { margin-left: 0; }

/* Suites: the strip that syncs saved tests with the repository they are kept in. */
.syncstrip { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 14px; }
.syncstrip .cardsub, .syncstrip .formerror { margin: 0; }
