/* UW TestLab web app. Ported from design/b-timeline and design/shared/status.css.
   A status is always colour + icon + word (design/status-vocabulary.md). */
:root {
  --tone-ok: #1a7f37;      --tone-ok-bg: #dafbe1;      --tone-ok-line: #8fd8a0;
  --tone-bad: #c62828;     --tone-bad-bg: #ffe4e1;     --tone-bad-line: #f2a59d;
  --tone-warn: #9a5b00;    --tone-warn-bg: #fff1cc;    --tone-warn-line: #f0c869;
  --tone-run: #0b62d6;     --tone-run-bg: #ddeaff;     --tone-run-line: #93b8f3;
  --tone-wait: #5a5f8a;    --tone-wait-bg: #ebecf7;    --tone-wait-line: #b8bbd9;
  --tone-muted: #626a73;   --tone-muted-bg: #eef0f2;   --tone-muted-line: #c6ccd2;
  --tone-info: #7341c4;    --tone-info-bg: #f0e8ff;    --tone-info-line: #c6aef0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tone-ok: #5fd37a;    --tone-ok-bg: #12301b;    --tone-ok-line: #2a6a3a;
    --tone-bad: #ff7b72;   --tone-bad-bg: #3b1513;   --tone-bad-line: #7d2b25;
    --tone-warn: #f2c14e;  --tone-warn-bg: #352708;  --tone-warn-line: #765817;
    --tone-run: #6cb0ff;   --tone-run-bg: #0f2747;   --tone-run-line: #2b5590;
    --tone-wait: #a9adda;  --tone-wait-bg: #23253a;  --tone-wait-line: #4a4e75;
    --tone-muted: #9aa3ad; --tone-muted-bg: #22272d; --tone-muted-line: #3d454e;
    --tone-info: #c2a3ff;  --tone-info-bg: #2a1c45;  --tone-info-line: #5b3f94;
  }
}
:root[data-theme="dark"] {
  --tone-ok: #5fd37a;    --tone-ok-bg: #12301b;    --tone-ok-line: #2a6a3a;
  --tone-bad: #ff7b72;   --tone-bad-bg: #3b1513;   --tone-bad-line: #7d2b25;
  --tone-warn: #f2c14e;  --tone-warn-bg: #352708;  --tone-warn-line: #765817;
  --tone-run: #6cb0ff;   --tone-run-bg: #0f2747;   --tone-run-line: #2b5590;
  --tone-wait: #a9adda;  --tone-wait-bg: #23253a;  --tone-wait-line: #4a4e75;
  --tone-muted: #9aa3ad; --tone-muted-bg: #22272d; --tone-muted-line: #3d454e;
  --tone-info: #c2a3ff;  --tone-info-bg: #2a1c45;  --tone-info-line: #5b3f94;
}

.ico { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.ico.spin { animation: tl-spin 1.6s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ico.spin { animation: none; } }

.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  padding: .2em .55em .2em .45em; border-radius: 999px;
  border: 1px solid var(--tone-line); background: var(--tone-bg); color: var(--tone);
}
.badge.sm { font-size: .75rem; padding: .1em .45em .1em .35em; }
.badge.plain { background: transparent; border-color: transparent; padding-left: 0; }
.badge.mod { font-weight: 500; border-style: dashed; }

.t-ok    { --tone: var(--tone-ok);    --tone-bg: var(--tone-ok-bg);    --tone-line: var(--tone-ok-line); }
.t-bad   { --tone: var(--tone-bad);   --tone-bg: var(--tone-bad-bg);   --tone-line: var(--tone-bad-line); }
.t-warn  { --tone: var(--tone-warn);  --tone-bg: var(--tone-warn-bg);  --tone-line: var(--tone-warn-line); }
.t-run   { --tone: var(--tone-run);   --tone-bg: var(--tone-run-bg);   --tone-line: var(--tone-run-line); }
.t-wait  { --tone: var(--tone-wait);  --tone-bg: var(--tone-wait-bg);  --tone-line: var(--tone-wait-line); }
.t-muted { --tone: var(--tone-muted); --tone-bg: var(--tone-muted-bg); --tone-line: var(--tone-muted-line); }
.t-info  { --tone: var(--tone-info);  --tone-bg: var(--tone-info-bg);  --tone-line: var(--tone-info-line); }

/* Dot strip: recent results of one flow, oldest left. */
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 9px; height: 9px; border-radius: 2px; background: var(--tone); display: block; }
.dots i.t-muted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tone-muted-line); }
.dots i.t-warn { border-radius: 50%; }

/* Progress made of one segment per planned flow. */
@keyframes tl-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .segbar > span.t-run { animation: none; } }


/* Log viewer lines */
.log { font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; counter-reset: ln; }
.log .ln { display: flex; gap: 12px; padding: 0 10px; white-space: pre; }
.log.wrapped .ln { white-space: pre-wrap; word-break: break-all; }
/* Videos, Flows and Writer */
.vbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vbar .fsearch { flex: 1 1 260px; min-width: 0; }
.vbar .fsearch input[type=search] { height: 44px; }
.vbar .fsearch > .ico { top: 13px; }
.vbar select { height: 44px; }
.vcard { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.vhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vhead h2 { font-family: inherit; font-size: 17px; font-weight: 600; margin: 0; }
.vruns { font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, 142px); gap: 16px 14px; }
.vt { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vbox { position: relative; }
.vbox video { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: #2a2a27; display: block; object-fit: contain; }
.vbadge { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--card); color: var(--tone); pointer-events: none; box-shadow: 0 1px 3px #0000002e; }
.vbadge .ico { font-size: 11px; stroke-width: 3; }
.vclip { position: absolute; top: 8px; right: 8px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #000000a6; color: #fff; display: inline-flex; align-items: center; pointer-events: none; }
.vt figcaption { display: flex; align-items: flex-start; gap: 4px; font-size: 13px; }
.vt figcaption .col { min-width: 0; flex: 1; gap: 1px; align-items: stretch; }
.vname { display: block; max-width: 100%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdate { color: var(--ink); text-decoration: none; font-weight: 500; }
.vdate:hover { text-decoration: underline; }
.icobtn.vcopy { flex: none; color: var(--ink-2); border: 0; background: none; }
/* Flows: a side list of sets and areas beside one table in sections. */
.flayout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 20px; align-items: start; }
.fside { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.fside a, .fside summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; }
.fside a:hover, .fside summary:hover { background: var(--card-2); }
.fside a.on { background: var(--card-2); font-weight: 600; }
.fside .n { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.fside-h { margin: 16px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.fside-more summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 500; }
.fside-more summary::-webkit-details-marker { display: none; }
.fside-more[open] summary { display: none; }
.fside-more { border: 0; padding: 0; }
.fmain { min-width: 0; }
.fbar { display: flex; gap: 12px; align-items: center; }
.fbar .fsearch { flex: 1; min-width: 0; }
.fseg { flex: none; padding: 4px; gap: 2px; background: var(--card-2); border: 0; }
.fseg a { border-radius: 8px; padding: 8px 14px; }
.fseg a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px #0000001a; }
.fseg .n { color: var(--ink-2); font-weight: 500; }
.fseg .n.bad { color: var(--tone-bad); }
.ftable-wrap { padding: 0; }
/* Fixed layout: the columns take their widths from the header, so they don't shift while the rows load. */
.ftable { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ftable th, .ftable td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.ftable thead th { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 14px 16px; }
.ftable tr.fsec th { background: var(--card-2); text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); padding: 10px 16px; }
.fsec-in { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.fsec-in .muted { font-weight: 400; font-size: 14px; }
.ft-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; font-weight: 500; }
.ft-name > a:first-child { color: var(--ink); text-decoration: none; }
.ft-name > a:first-child:hover { text-decoration: underline; }
.c-flow .fc-tags { margin-top: 4px; }
.fc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.c-hist { width: 120px; white-space: nowrap; }
.c-last { width: 150px; font-size: 14px; }
.c-act { width: 96px; white-space: nowrap; }
.c-flow { overflow-wrap: anywhere; }
.ft-act { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.rowmenu { position: relative; border: 0; padding: 0; }
.rowmenu summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 700; letter-spacing: .05em; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary:hover, .rowmenu[open] summary { background: var(--card-2); color: var(--ink); }
.rowmenu .menu { position: absolute; right: 0; top: 38px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; width: 240px; box-shadow: 0 12px 30px #0000001a; display: flex; flex-direction: column; gap: 4px; z-index: 6; white-space: normal; }
.rowmenu .menu a.btn { width: 100%; justify-content: flex-start; }
@media (max-width: 900px) {
  .flayout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fside { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .fside-h, .fside-more { display: none; }
  .fside a { border: 1px solid var(--line); padding: 6px 12px; font-size: 14px; }
  .fbar { flex-direction: column; align-items: stretch; }
  .fseg { overflow-x: auto; }
}
@media (max-width: 760px) {
  .c-hist, .c-last { display: none; }
  .ftable th, .ftable td { padding: 10px 12px; }
}
/* A flow's last results as bars, oldest left; empty slots keep every strip the same width. */
.hist { display: inline-flex; gap: 3px; flex: none; }
.hist i { width: 8px; height: 16px; border-radius: 2px; background: var(--tone); display: block; }
.hist i.none { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.hist i.t-muted { background: var(--tone-muted-line); }
/* Status pills: same size for every status. */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; background: var(--tone-bg); color: var(--tone); }
.pill .ico { font-size: 12px; stroke-width: 3; }
.pill.t-ok { background: var(--pill-ok-bg); color: var(--pill-ok); }
.pill.t-bad { background: var(--pill-bad-bg); color: var(--pill-bad); }
a.pill:hover { filter: brightness(.97); }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--card-2); color: var(--ink-2); }
.note { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--tone-ok); }
.ev .card.one { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: 13px; }
.stepper span { display: inline-flex; gap: 5px; align-items: center; padding: 3px 10px; border-radius: 999px; color: var(--ink-2); }
.stepper span.done { color: var(--tone-ok); }
.stepper span.cur { background: var(--tone-info-bg); color: var(--tone-info); font-weight: 600; }
.stepper span.stop { background: var(--card-2); color: var(--ink); font-weight: 600; }
.stepper b { width: 14px; height: 1px; background: var(--line); }
@media (max-width: 760px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vbar .seg { overflow-x: auto; }
}
.log .ln::before { counter-increment: ln; content: counter(ln); width: 3.2em; text-align: right; flex: none; opacity: .45; user-select: none; }
.log .ln.err { background: var(--tone-bad-bg); color: var(--tone-bad); }
.log .ln.ok { color: var(--tone-ok); }
.log .ln.hit mark { background: var(--tone-warn-line); color: inherit; border-radius: 2px; }
.log .ln.focus { outline: 2px solid var(--tone-run); outline-offset: -2px; }
.log .ln.hide { display: none; }

/* ---------------------------------------------------------------- page */
:root {
  --bg: #f8f6f1; --card: #ffffff; --card-2: #f3f0e9; --ink: #24221e; --ink-2: #6c675d; --line: #e5e0d5;
  --accent: #0f6e66; --accent-ink: #ffffff; --accent-soft: #dff1ee;
  --pill-ok: #1f5e3a; --pill-ok-bg: #e7f3ec; --pill-bad: #a01f15; --pill-bad-bg: #fdecea;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #161512; --card: #1f1d1a; --card-2: #272521; --ink: #efebe3; --ink-2: #a39d91; --line: #35322c;
  --accent: #3cc7b6; --accent-ink: #062521; --accent-soft: #123430; --pill-ok: var(--tone-ok); --pill-ok-bg: var(--tone-ok-bg); --pill-bad: var(--tone-bad); --pill-bad-bg: var(--tone-bad-bg); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #161512; --card: #1f1d1a; --card-2: #272521; --ink: #efebe3; --ink-2: #a39d91; --line: #35322c;
  --accent: #3cc7b6; --accent-ink: #062521; --accent-soft: #123430; --pill-ok: var(--tone-ok); --pill-ok-bg: var(--tone-ok-bg); --pill-bad: var(--tone-bad); --pill-bad-bg: var(--tone-bad-bg); color-scheme: dark; }
* { box-sizing: border-box; }
select { max-width: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); } button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-2); } .mono { font-family: var(--mono); font-size: 13px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.2; } h2 { font-size: 21px; } h3 { font-size: 17px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.inline { display: inline; margin: 0; }
.cmd { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:not(.pri):hover, .icobtn:hover, .me summary:hover { background: var(--card-2); }
.btn.quiet:hover { background: var(--accent-soft); }

header.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topin { max-width: 980px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 10px 14px; align-items: center; }
.topin > .station, .topin > .icobtn, .topin > .me > summary, .topin > .btn.pri { height: 44px; }
.topin > .icobtn { width: 44px; justify-content: center; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 19px; text-decoration: none; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.logo .ico { color: var(--accent); font-size: 20px; stroke-width: 2.2; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { text-decoration: none; color: var(--ink-2); padding: 10px 14px; border-radius: 8px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.topnav a:hover { color: var(--ink); }
.navcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--tone-bad); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
:root[data-theme="dark"] .navcount { color: #1f0b0a; }
/* The Faucets menu mark: the badge's red, as a round dot instead of a count. */
.navcount.dot { width: 9px; height: 9px; min-width: 0; padding: 0; border-radius: 50%; }
/* A station problem is amber, not red: red is only for the app (design/status-vocabulary.md). */
.navcount.warn { background: var(--tone-warn); }
:root[data-theme="dark"] .navcount.warn { color: #241a05; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .navcount { color: #1f0b0a; }
  :root:not([data-theme="light"]) .navcount.warn { color: #241a05; }
}
.topnav a.on { color: var(--ink); background: var(--card-2); }
.station { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; padding: 0 14px; border-radius: 999px; background: var(--pill-ok-bg); color: var(--pill-ok); white-space: nowrap; cursor: help; position: relative; }
.station .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone-ok); }
.station .pop { display: none; position: absolute; right: 0; top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 270px; box-shadow: 0 12px 30px #0000001a; color: var(--ink); white-space: normal; font-weight: 400; }
.station:hover .pop, .station:focus .pop, .station:focus-within .pop { display: block; }
.station.bad .dot { background: var(--tone-warn); }
.station.bad { background: var(--tone-warn-bg); color: var(--tone-warn); font-weight: 600; }
.pop ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.pop li { display: flex; gap: 8px; align-items: center; }
.pop li.t-ok, .pop li.t-warn { color: var(--tone); }
.me { position: relative; }
.me summary { list-style: none; cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 14px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-weight: 500; }
.me summary::-webkit-details-marker { display: none; }
.me .menu { position: absolute; right: 0; top: 50px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; width: 220px; box-shadow: 0 12px 30px #0000001a; display: flex; flex-direction: column; gap: 6px; z-index: 6; }
.me .menu button, .me .menu a.btn { width: 100%; justify-content: flex-start; }
details.me { border: 0; padding: 0; }
.btn { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 7px 14px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding-left: 4px; padding-right: 4px; }
.btn.danger { color: var(--tone-bad); }
.btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icobtn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 80px; display: flex; flex-direction: column; gap: 26px; }
.wrap.narrow { max-width: 520px; }
.col { max-width: 760px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.pad { padding: 20px 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--ink-2); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead { font-size: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.live { display: flex; flex-direction: column; gap: 26px; }


.qn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--card-2); color: var(--ink-2); }

.tl { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.ev { position: relative; text-decoration: none; color: inherit; display: block; }
.ev::before { content: ""; position: absolute; left: -24px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px var(--bg); }
.ev .card { padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.ev:hover .card { border-color: var(--tone-line); }
.ev .h { font-weight: 600; }
.ev .meta { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px 12px; flex-wrap: wrap; }
.ev .side { text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ev .fails { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 14px; }
.ev .fails div { display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.ev .fails .ico { color: var(--tone-bad); }
.src { display: inline-flex; gap: 4px; align-items: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed] { height: 36px; padding: 0 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:hover { border-color: color-mix(in srgb, var(--line) 60%, var(--ink-2)); }
.chip .n, .ftoggle .n { font-size: 12px; color: var(--ink-2); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.fsearch { position: relative; display: block; }
.fsearch > .ico { position: absolute; left: 16px; top: 15px; font-size: 18px; color: var(--ink-2); pointer-events: none; }
.fsearch input[type=search] { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 12px; }
.filterbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ftoggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; min-height: 44px; cursor: pointer; }
.ftoggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.ftoggle:has(input:disabled) { cursor: default; opacity: .7; }
.search { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.filters { display: flex; flex-direction: column; gap: 12px; }

.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.opt { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px 16px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.opt span { font-size: 13px; color: var(--ink-2); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chipopt { position: relative; }
.chipopt input { position: absolute; opacity: 0; pointer-events: none; }
.chipopt:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chipopt:has(input:checked) .muted { color: inherit; opacity: .7; }
.chipopt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick { display: none; }
form:has(input[name=what][value=tag]:checked) .pick[data-for=tag],
form:has(input[name=what][value=group]:checked) .pick[data-for=group],
form:has(input[name=what][value=journeys]:checked) .pick[data-for=journeys],
form:has(input[name=what][value=flows]:checked) .pick[data-for=flows],
form:has(input[name=what][value=record]:checked) .pick[data-for=record],
form:has(input[name=what][value=rerun]:checked) .pick[data-for=rerun] { display: block; }
/* Start a run: modes and a list on the left, "Your run" on the right. */
.slayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.smain { min-width: 0; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.mode { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode b { font-size: 15px; }
.mode span { font-size: 13px; color: var(--ink-2); }
.mode:hover { border-color: color-mix(in srgb, var(--line) 60%, var(--ink-2)); }
.mode:has(input:checked) { border: 2px solid var(--accent); padding: 11px; background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.mode:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plist { padding: 0; overflow: hidden; }
.ptools { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.ptools .fsearch { flex: 1; min-width: 0; }
.ptools .fsearch input[type=search] { height: 42px; }
.ptools .fsearch > .ico { top: 12px; }
.ptools select { flex: none; width: 150px; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.ptools + .prow, .plist > .prow:first-child { border-top: 0; }
label.prow { cursor: pointer; }
label.prow:hover { background: var(--card-2); }
.prow input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.prow.hide { display: none; }
.prow .pn { width: 18px; text-align: right; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.prow .ps { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.prow .ps.t-bad { color: var(--tone-bad); } .prow .ps.t-warn { color: var(--tone-warn); }
.pfoot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.plist .pad { padding: 16px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.sside { position: sticky; top: 16px; }
.ssum { font-size: 21px; font-weight: 700; line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.flabel { font-weight: 600; }
.seg.sseg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--card-2); border: 0; }
.sseg label { position: relative; text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.sseg input { position: absolute; opacity: 0; pointer-events: none; }
.sseg label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px #0000001a; }
.sseg label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.sside select, .sside input[type=text], .sside input[type=number] { width: 100%; }
.sside .check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.sside .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.sgo { width: 100%; justify-content: center; height: 48px; font-size: 16px; }
.field.other-branch, .field.other-flows { display: none; }
form:not(:has(input[name=platform][value=ios]:checked)):has(#build_android option[value=other]:checked) .field.other-branch,
form:has(input[name=platform][value=ios]:checked):has(#build_ios option[value=other]:checked) .field.other-branch,
form:has(#flows_pick option[value=other]:checked) .field.other-flows { display: flex; }
@media (max-width: 860px) {
  .slayout { grid-template-columns: minmax(0, 1fr); }
  .sside { position: static; }
  .ptools { flex-direction: column; } .ptools select { width: 100%; }
}
form:has(input[name=platform][value=ios]:checked) .for-android,
form:not(:has(input[name=platform][value=ios]:checked)) .for-ios { display: none; }
form:has(input[name=what][value=rerun]:checked) .not-rerun { display: none; }
form:not(:has(input[name=what][value=rerun]:checked)) .only-rerun { display: none; }
.checklist { max-height: 300px; overflow: auto; }
.checklist label { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line); cursor: pointer; align-items: center; }
.checklist label:first-child { border-top: 0; }
.checklist label.hide { display: none; }
.step { display: flex; flex-direction: column; gap: 14px; }
.stepn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; font-family: system-ui; font-size: 14px; margin-right: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field .lbl { font-weight: 600; }
.field .hint { font-size: 13px; color: var(--ink-2); }
input[type=text], input[type=number], input[type=password], input[type=search], input[type=url], input[type=date], select { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.confirm { position: sticky; bottom: 12px; display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: var(--ink); color: var(--bg); border-radius: 16px; box-shadow: 0 12px 30px #00000033; flex-wrap: wrap; }
.confirm .muted { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.confirm .btn.pri { background: var(--accent); }
.qline { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.qline i { font-style: normal; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; opacity: .75; white-space: nowrap; }
.qline i.me { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; font-weight: 700; }

.fail { border-left: 5px solid var(--tone-bad); overflow: hidden; scroll-margin-top: 80px; }
.fail.t-warn { border-left-color: var(--tone-warn); }
.shotimg { display: block; width: 100%; border-radius: 14px; border: 6px solid #1f2328; background: #1f2328; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.shots a { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.shots img { width: 100%; border-radius: 8px; border: 3px solid #1f2328; }
video.clip { width: 100%; max-height: 520px; border-radius: 10px; background: #0d1117; display: block; }
.noshot { min-height: 120px; border-radius: 14px; border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center; padding: 12px; color: var(--ink-2); font-size: 13px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; margin: 12px 0 0; }
.facts dt { color: var(--ink-2); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.flows { display: flex; flex-direction: column; }
.fl { display: grid; grid-template-columns: 136px 1fr auto; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); align-items: baseline; scroll-margin-top: 80px; }
.fl:first-child { border-top: 0; }
.fl .x { font-size: 13px; color: var(--ink-2); }
.fl:target, .fail:target { box-shadow: 0 0 0 3px var(--accent); }
.techline { font-family: var(--mono); font-size: 12.5px; background: var(--card-2); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--tone-bg); border: 1px solid var(--tone-line); }
.callout > .ico { color: var(--tone); margin-top: 3px; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: var(--tone-bg); border: 1px solid var(--tone-line); }
.banner > .ico { color: var(--tone); font-size: 20px; margin-top: 2px; }
.banner b { display: block; font-size: 16px; }

.reader { display: flex; flex-direction: column; }
.reader .bar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reader .tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.reader .tabs a { text-decoration: none; padding: 7px 12px; border-radius: 10px 10px 0 0; color: var(--ink-2); font-size: 14px; }
.reader .tabs a.on { background: var(--card-2); color: var(--ink); font-weight: 600; }
.reader .log { height: 62vh; min-height: 300px; overflow: auto; background: var(--card-2); padding: 8px 0; border-radius: 0 0 16px 16px; }
.reader .note { padding: 8px 16px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg a { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.seg a.on { background: var(--ink); color: var(--bg); }
.rtable { overflow-x: auto; }
.rtable table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rtable td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable tr:last-child td { border-bottom: 0; }
.rtable td a.rowlink { color: inherit; text-decoration: none; }
.rtable tr:hover td { background: var(--card-2); }
.rtable .show-sm { display: none; }
.rtable .clip { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.rtable td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cnt { display: inline-flex; gap: 8px; white-space: nowrap; }
.cnt span { display: inline-flex; gap: 3px; align-items: center; color: var(--tone); }
.empty { text-align: center; padding: 34px; color: var(--ink-2); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; }
.err-box { color: var(--tone-bad); }

@media (max-width: 760px) {
  .topin { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .topnav { order: 3; width: 100%; flex: none; flex-wrap: wrap; }
  .topnav a { padding: 8px 12px; }
  .topin .btn.pri span.long { display: none; }
  .wrap { padding: 18px 16px 60px; gap: 20px; }
  h1 { font-size: 24px; }
  .fail .media, .fail .media.novideo { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .fail .media > :last-child { grid-column: 1 / -1; }
  .fail .media > * { min-width: 0; } .fail .mono { overflow-wrap: anywhere; }
  .fl { grid-template-columns: 1fr auto; padding: 12px 16px; } .fl > :first-child { grid-column: 1 / -1; }
  .twocol { grid-template-columns: 1fr; }
  .ev .card { grid-template-columns: 1fr; } .ev .side { text-align: left; }
  .confirm { bottom: 8px; } .confirm .btn.pri { width: 100%; justify-content: center; }
  .pad { padding: 16px; }
  .rtable .hide-sm { display: none; }
  .station .lbl, .me .lbl { display: none; }
  .topin > .station { padding: 0 16px; }
  .rtable .show-sm { display: block; font-size: 13px; color: var(--ink-2); }
  .cnt { flex-wrap: wrap; gap: 2px 8px; white-space: normal; }
  .rtable .clip { max-width: 140px; } .rtable td, .rtable th { padding: 8px 8px; }
}
.log .ln::before { content: attr(data-n); counter-increment: none; }

/* Utilities (the page's CSP allows no inline styles). */
.m0 { margin: 0; } .mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack.s { gap: 8px; } .stack.l { gap: 26px; }
.center { text-align: center; align-items: center; } .self-center { align-self: center; } .self-start { align-self: flex-start; }
.small { font-size: 13px; } .nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 220px; }
.row.nowrap { flex-wrap: nowrap; gap: 8px; min-width: 0; }

/* Repairs: the menu's red dot while a flow is broken */

/* Repairs: a break's plain-text description, for copying to an agent */
.break-any { overflow-wrap: anywhere; min-width: 0; }
.desc { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: var(--card-2); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28em; overflow: auto; }

/* Home: the live card with the queue inside, four tiles, then the runs list. */
.nowcard { padding: 0; overflow: hidden; }
.now { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.now .top { align-items: flex-start; gap: 12px; }
.now.idle { flex-direction: row; align-items: center; }
.nowh { font-family: inherit; font-size: 20px; font-weight: 600; margin: 2px 0 2px; }
.eyebrow.t-run { color: var(--tone-warn); text-transform: none; letter-spacing: 0; font-size: 14px; }
.eyebrow.t-ok { color: var(--tone-ok); text-transform: none; letter-spacing: 0; font-size: 15px; }
.pulse, .dotok { width: 10px; height: 10px; border-radius: 50%; background: var(--tone-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-warn) 25%, transparent); }
.dotok { background: var(--tone-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-ok) 25%, transparent); }
.pulse { animation: tl-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.prog { display: flex; flex-direction: column; gap: 6px; }
progress.bar { width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--card-2); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress.bar::-webkit-progress-bar { background: var(--card-2); border-radius: 4px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
.nowlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.nowlist li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.nowlist li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowlist li .n a { color: inherit; text-decoration: none; }
.nowlist li .r { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.nowlist li.t-ok .ico, .nowlist li.t-bad .ico, .nowlist li.t-warn .ico, .nowlist li.t-muted .ico { color: var(--tone); }
.nowlist li.cur .ico { color: var(--accent); }
.nowlist li.later { color: var(--ink-2); }
.upnext { border-top: 1px solid var(--line); background: var(--card-2); }
.uph { padding: 12px 22px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.qrow { display: flex; align-items: center; gap: 14px; padding: 10px 22px; border-top: 1px solid var(--line); }
.uph + .qrow { border-top: 0; }
.qrow.new { background: var(--accent-soft); }
.qmain { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qrow .qn { width: 18px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pill.sm { height: 20px; padding: 0 8px; font-size: 11px; vertical-align: 1px; }
.icobtn.sm { width: 32px; height: 32px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink-2); text-decoration: none; font-size: 14px; }
.tile b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile:hover { border-color: color-mix(in srgb, var(--line) 60%, var(--ink-2)); }
.tile.t-bad b { color: var(--tone-bad); } .tile.t-warn b { color: var(--tone-warn); }
.tile .navcount.dot { position: absolute; top: 10px; right: 10px; }
.rbar { display: flex; align-items: center; gap: 12px; }
.rbar h2 { flex: none; }
.rbar .fsearch { flex: 1; min-width: 0; }
.rbar .fsearch input[type=search] { height: 44px; }
.rbar .fsearch > .ico { top: 13px; }
.rfilters summary.btn { height: 44px; }
.rfilters .menu { top: 50px; width: 260px; gap: 10px; }
.rfilters .menu select { width: 100%; }
.rlist { padding: 0; overflow: hidden; }
.rday { padding: 10px 22px; background: var(--card-2); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border-top: 1px solid var(--line); }
.rday:first-child { border-top: 0; }
.rrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 56px; gap: 4px 16px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.rday + .rrow { border-top: 0; }
.rrow:hover { background: color-mix(in srgb, var(--card-2) 60%, var(--card)); }
.rst { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--tone); }
.rst.t-muted, .rst.t-wait { color: var(--ink-2); }
.rmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rmain > b { font-weight: 500; font-size: 15px; }
.rmain > .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfail { color: var(--tone-bad); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdur { font-size: 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rtime { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.rfoot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rbar { flex-wrap: wrap; } .rbar .fsearch { flex-basis: 100%; order: 3; }
  .rrow { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .rrow .rst { grid-column: 1 / -1; } .rrow .rdur { display: none; }
  .now.idle { flex-direction: column; align-items: stretch; }
  .now .top { flex-wrap: wrap; }
}

.homehead { flex-wrap: wrap; gap: 12px; }

/* Run page: a back link, the result and title with its actions, a card per failure, the other flows folded. */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; align-self: flex-start; }
.ico.flip { transform: scaleX(-1); }
.runhead { align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.runhead h1 { overflow-wrap: anywhere; }
.runacts { flex-wrap: wrap; gap: 8px; }
.failhead h2 { font-family: inherit; font-size: 18px; font-weight: 600; margin: 0; }
.why { padding: 14px 18px; border-radius: 12px; background: var(--tone-bad-bg); color: var(--tone-bad); font-size: 16px; }
.why.t-warn { background: var(--tone-warn-bg); color: var(--tone-warn); }
.fmedia { display: grid; grid-template-columns: 180px 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.fmedia figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fmedia figcaption { font-size: 13px; color: var(--ink-2); }
.fmedia .shotimg { border: 0; border-radius: 12px; aspect-ratio: 9 / 19; object-fit: cover; object-position: top; background: #2a2a27; }
.fmedia video.clip { aspect-ratio: 9 / 19; border-radius: 12px; background: #2a2a27; object-fit: contain; max-height: none; }
.fmedia .noshot { aspect-ratio: 9 / 19; min-height: 0; }
.fside2 hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.others summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-weight: 600; }
.others summary::-webkit-details-marker { display: none; }
.others summary .t-ok { color: var(--tone-ok); display: inline-flex; align-items: center; gap: 6px; }
.others summary .show, .others summary .hide { color: var(--accent); font-weight: 500; }
.others:not([open]) summary .hide, .others[open] summary .show { display: none; }
.others[open] .flows { border-top: 1px solid var(--line); }
.others { padding: 0; }
@media (max-width: 760px) {
  .fmedia { grid-template-columns: 1fr 1fr; }
  .fmedia .fside2 { grid-column: 1 / -1; }
}

/* ===== Flows ==========================================================================
   Built for 100-150 journeys: a status summary, failing journeys first as dense rows with a
   step bar, passing ones folded away; areas as one scrollable chip row; lists as plain rows. */
.fx-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fx-head h1 { font-size: 34px; letter-spacing: -.02em; }
.fx-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); text-decoration: none; margin-bottom: 6px; }
.fx-back .ico { transform: scaleX(-1); }
.fx-back:hover { color: var(--ink); }
.fx-search { margin: 0; }
.fx-search label { position: relative; display: block; }
.fx-search .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-2); pointer-events: none; }
.fx-search input[type=search] { width: 280px; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); transition: width .2s, border-color .2s; }
.fx-search input[type=search]:focus { width: 340px; border-color: var(--accent); outline: none; }
.fx-head .btn.pri { height: 42px; border-radius: 999px; padding: 0 18px; }
.fx-icon { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.fx-icon:hover { color: var(--ink); }
.fx-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-h h2 { font-size: 22px; }
.fx-count { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--card-2); border-radius: 999px; padding: 1px 9px; font-variant-numeric: tabular-nums; }

/* By area: tiles that open an area's flows; the run button stays quiet until hovered. */
.fx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.fx-tile { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 12px 16px; transition: border-color .2s; }
.fx-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.fx-tile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: var(--ink); text-decoration: none; }
.fx-tile-main b { font-size: 15px; }
.fx-tile-main span { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fx-tile-main em { font-style: normal; color: var(--tone-bad); font-weight: 600; }
.fx-tile.alt { background: transparent; border-style: dashed; }
.fx-play { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; text-decoration: none; background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); transition: background .15s, color .15s; }
.fx-play .ico { width: 13px; height: 13px; translate: 1px 0; fill: currentColor; }
.fx-tile:hover .fx-play, .fx-play:focus-visible { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

/* Journey summary: three counts that jump to their part of the list. */
.fx-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-sum a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: var(--card-2); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-sum i { width: 8px; height: 8px; border-radius: 50%; }
.fx-sum .s-fail i, .s-fail .fx-dot { background: var(--tone-bad); }
.fx-sum .s-ok i, .s-ok .fx-dot { background: var(--tone-ok); }
.fx-sum .s-never i, .s-never .fx-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tone-muted-line); }
.fx-sum .s-fail { color: var(--tone-bad); background: var(--tone-bad-bg); }

/* Blocks and rows */
.fx-block { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.fx-block-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fx-block-h b { font-size: 16px; }
.fx-block-h > span:not(.sp) { font-size: 13px; color: var(--ink-2); }
.fx-list { list-style: none; margin: 0; padding: 0; }
.fx-block > .fx-list + .fx-list, .fx-block > .fx-list + .fx-fold, .fx-block > .fx-fold + .fx-fold, .fx-block > .fx-fold + .fx-list { border-top: 1px solid var(--line); }
.fx-row, .fx-jrow { display: grid; align-items: center; gap: 6px 14px; padding: 10px 16px; border-top: 1px solid var(--line); }
.fx-list > li:first-child { border-top: 0; }
.fx-row:hover, .fx-jrow:hover { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.fx-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.fx-row .pill { grid-column: 2; justify-self: start; }
.fx-name { color: var(--ink); text-decoration: none; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-name:hover { text-decoration: underline; }
.fx-last { font-size: 13px; color: var(--ink-2); white-space: nowrap; min-width: 110px; text-align: right; }
.fx-run { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; opacity: .55; transition: opacity .15s, color .15s, border-color .15s, background .15s; }
.fx-run .ico { width: 12px; height: 12px; translate: 1px 0; fill: currentColor; }
.fx-row:hover .fx-run, .fx-jrow:hover .fx-run, .fx-run:focus-visible { opacity: 1; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.fx-list.numbered { counter-reset: step; }
.fx-list.numbered > .fx-row { grid-template-columns: 22px auto minmax(0, 1fr) auto auto; }
.fx-list.numbered > .fx-row::before { counter-increment: step; content: counter(step); font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fx-list.numbered > .fx-row .pill { grid-column: 3; }

/* A journey row: dot · name/sub · area · step bar · last · run */
.fx-jrow { grid-template-columns: 10px minmax(0, 1fr) minmax(120px, 220px) auto auto; }
.fx-dot { width: 10px; height: 10px; border-radius: 50%; }
.fx-jname { min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.fx-jname b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-jname span { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-jname:hover b { text-decoration: underline; }
.fx-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; }
.fx-steps li { flex: 1; height: 8px; border-radius: 4px; background: var(--tone); min-width: 4px; }
.fx-steps li.none { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.fx-steps li.t-muted { background: var(--tone-muted-line); }

/* Folded groups of journeys (never run, passing) */
.fx-fold { border: 0; padding: 0; }
.fx-fold > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.fx-fold > summary::-webkit-details-marker { display: none; }
.fx-fold > summary::before { content: "›"; font-size: 18px; line-height: 1; transition: rotate .15s; }
.fx-fold[open] > summary::before { rotate: 90deg; }
.fx-fold > summary:hover { color: var(--ink); }
.fx-fold > .fx-list { border-top: 1px solid var(--line); }

/* Broken flows first */
.fx-alert { border: 1px solid var(--tone-bad-line); background: var(--tone-bad-bg); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fx-alert-h { display: flex; align-items: center; gap: 8px; color: var(--tone-bad); }
.fx-alert-h a { font-size: 14px; font-weight: 600; }
.fx-alert .fx-list { background: var(--card); border-radius: 14px; }

/* Status filters on lists */
.fx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-filters a { padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.fx-filters a.on { color: var(--ink); border-color: var(--ink); }
.fx-filters .n.bad { color: var(--tone-bad); }

@media (max-width: 900px) {
  .fx-jrow { grid-template-columns: 10px minmax(0, 1fr) minmax(80px, 140px) auto; }
  .fx-jrow .fx-last { display: none; }
}
@media (max-width: 760px) {
  .fx-search, .fx-search input[type=search], .fx-search input[type=search]:focus { width: 100%; }
  .fx-search { flex: 1 1 100%; order: 3; }
  .fx-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fx-row .fx-last { display: none; }
  .fx-run { opacity: 1; }
}
.fx-jrow .fx-last em { font-style: normal; color: var(--tone-bad); font-weight: 600; }
/* Two parts of the overview, one tap apart. */
.fx-jump { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); width: max-content; }
.fx-jump a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.fx-jump a:hover { background: var(--card-2); }
.fx-jump .n { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fx-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
/* The switch works as tabs without script: #areas in the address shows the areas, anything
   else shows the journeys; the chosen tab is filled. */
.fx-jump a { transition: background .15s, color .15s; }
.fx-jump.is-overview a.j, :is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.a, .fx-jump a.on { background: var(--ink); color: var(--bg); }
.fx-jump.is-overview a.j .n, :is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.a .n, .fx-jump a.on .n { color: inherit; opacity: .65; }
:is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.j { background: transparent; color: var(--ink); }
:is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.j .n { color: var(--ink-2); opacity: 1; }
:is(html.at-areas body, body:has(#areas:target)) .fx-part-journeys, html:not(.at-areas) body:not(:has(#areas:target)) .fx-part-areas { display: none; }

/* ===== Home: hero, glance tiles, activity and latest failures ======================
   Read from the newest page of runs; no inline styles (CSP): bar heights are classes h1-h10. */
.hx-hero { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 4px; }
.hx-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.hx-hero h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.03em; }
.hx-grad { color: var(--accent); }  /* the theme accent: teal on light, mint on dark */

.hx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hx-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); text-decoration: none; transition: border-color .2s; min-width: 0; }
a.hx-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hx-k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hx-tile b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-tile b small { font-size: 16px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.hx-sub { font-size: 12px; color: var(--ink-2); }
a.hx-tile.is-bad:hover { border-color: var(--tone-bad-line); }  /* the red edge only on hover */
.hx-tile.is-bad b, .hx-tile.is-bad .hx-k { color: var(--tone-bad); }
.hx-tile.is-warn b { color: var(--tone-warn); }
.hx-meter { width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--card-2); appearance: none; -webkit-appearance: none; }
.hx-meter::-webkit-progress-bar { background: var(--card-2); }
.hx-meter::-webkit-progress-value { background: var(--tone-ok); border-radius: 3px; }
.hx-meter::-moz-progress-bar { background: var(--tone-ok); border-radius: 3px; }

.hx-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.hx-card { border: 1px solid var(--line); border-radius: 20px; background: var(--card); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hx-card-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hx-card-h b { font-size: 16px; }
.hx-key { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: 0; }
.hx-key.ok { background: var(--tone-ok); } .hx-key.bad { background: var(--tone-bad); }

.hx-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; }
.hx-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.hx-stack { flex: 1; width: 100%; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.hx-stack i { display: block; border-radius: 5px; min-height: 4px; }
.hx-stack i.ok { background: var(--tone-ok); } .hx-stack i.bad { background: var(--tone-bad); }
.hx-col > span { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hx-stack .h0 { height: 4px; } .hx-stack .h1 { height: 10%; } .hx-stack .h2 { height: 20%; } .hx-stack .h3 { height: 30%; }
.hx-stack .h4 { height: 40%; } .hx-stack .h5 { height: 50%; } .hx-stack .h6 { height: 60%; } .hx-stack .h7 { height: 70%; }
.hx-stack .h8 { height: 80%; } .hx-stack .h9 { height: 90%; } .hx-stack .h10 { height: 100%; }

.hx-fails { list-style: none; margin: -6px -8px; padding: 0; display: flex; flex-direction: column; }
.hx-fails a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.hx-fails a:hover { background: var(--card-2); }
.hx-x { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-bad-bg); color: var(--tone-bad); }
.hx-x .ico { width: 12px; height: 12px; stroke-width: 3; }
.hx-fmain { min-width: 0; display: flex; flex-direction: column; }
.hx-fmain b { font-weight: 600; font-size: 14px; }
.hx-fmain .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-clear { display: flex; align-items: center; gap: 10px; color: var(--tone-ok); font-weight: 600; padding: 20px 0; }

@media (max-width: 980px) { .hx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .hx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-hero h1 { font-size: 32px; } }

/* Runs filters on Home: two quiet chip groups; the chosen chip is tinted, not black. */
.hx-runs-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hx-fgroup { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card-2); }
.hx-fgroup a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.hx-fgroup a:hover { color: var(--ink); }
.hx-fgroup a.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.hx-fgroup .ico { width: 14px; height: 14px; }
.hx-sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hx-fgroup .s-passed .hx-sdot { background: var(--tone-ok); }
.hx-fgroup .s-broken .hx-sdot { background: var(--tone-bad); }
.hx-fgroup a.s-passed.on { color: var(--tone-ok); }
.hx-fgroup a.s-broken.on { color: var(--tone-bad); }
.hx-freset { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; }
.hx-freset:hover { color: var(--ink); }
.hx-freset .ico { width: 14px; height: 14px; }
@media (max-width: 760px) { .hx-filter { width: 100%; } }
#runs { scroll-margin-top: 84px; }

/* Home: the running run as a compact strip; its full step list folds away (kept open across live updates). */
.now-strip { padding: 14px 18px; gap: 10px; }
.ns-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ns-what { min-width: 0; display: flex; flex-direction: column; }
.ns-what b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-strip .prog { gap: 8px; }
.ns-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ns-cur { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ns-cur b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-cur .ico { color: var(--accent); flex: none; }
.ns-n.t-ok { color: var(--tone-ok); } .ns-n.t-bad { color: var(--tone-bad); font-weight: 600; }
.ns-steps { border: 0; padding: 0; }
.ns-steps > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); width: max-content; }
.ns-steps > summary::-webkit-details-marker { display: none; }
.ns-steps > summary::after { content: " ↓"; } .ns-steps[open] > summary::after { content: " ↑"; }
.ns-steps .nowlist { margin-top: 10px; font-size: 14px; }
.upnext .qrow { padding: 8px 18px; }
@media (max-width: 760px) { .ns-line { flex-wrap: wrap; } }

/* Home without Activity: Latest failures spans the row; its list runs in two columns on wide screens. */
.hx-grid.one { grid-template-columns: minmax(0, 1fr); }
.hx-grid.one .hx-fails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
@media (max-width: 760px) { .hx-grid.one .hx-fails { grid-template-columns: minmax(0, 1fr); } }
/* Each filter group says what it filters, so platform and result read as two choices that combine. */
.hx-flabel { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-left: 6px; }
.hx-flabel:first-child { margin-left: 0; }

/* Home spacing: an idle live block takes no room (no gap above the hero); the hero sits flush at the top. */
.live:not(:has(> *)) { display: none; }
.hx-hero { padding: 0; gap: 6px; }

/* ===== Start a run ================================================================
   Journey rows carry a state dot and show their start choice only when picked; areas are
   tiles; flow states get a dot; the side panel stays in view with Start at its foot. */
.jrow .pt { display: inline-flex; align-items: center; gap: 8px; }
.jdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.jdot.s-ok { background: var(--tone-ok); }
.jdot.s-bad { background: var(--tone-bad); }
.jdot.s-never { box-shadow: inset 0 0 0 1.5px var(--tone-muted-line); }
.jrow:not(:has(input:checked)) select.ps { display: none; }
.pick .hide { display: none !important; }

.atiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 14px; }
.atile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.atile input { position: absolute; opacity: 0; pointer-events: none; }
.atile b { font-size: 14px; }
.atile span { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.atile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.atile:has(input:checked) { border: 2px solid var(--accent); padding: 9px 13px; background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.atile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.ps.st { display: inline-flex; align-items: center; gap: 6px; }
.ps.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--tone-muted-line)); }

.sside { position: sticky; top: 84px; align-self: start; }
.sside .sgo { width: 100%; justify-content: center; height: 46px; font-size: 16px; }
.sside details#more > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
@media (max-width: 860px) { .sside { position: static; } }
/* The platform is the one choice on the side panel: a bigger switch. */
.sseg.splat label { padding: 12px 10px; font-size: 16px; font-weight: 700; }

/* ===== Start a run, step by step ===================================================
   1 What to run (four cards, then the picker for that card), 2 On which phone (two big cards),
   More settings folded, and a bar at the bottom of the screen with the summary and Start. */
.sr { display: flex; flex-direction: column; gap: 26px; padding-bottom: 8px; }
.sr-head { display: flex; flex-direction: column; gap: 6px; }
.sr-head h1 { font-size: 34px; letter-spacing: -.02em; }
.sr-free { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone-ok); margin-right: 8px; vertical-align: 1px; }
.sr-step { display: flex; flex-direction: column; gap: 12px; }
.sr-q { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.sr-n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-family: system-ui, sans-serif; font-size: 13px; font-weight: 700; background: var(--ink); color: var(--bg); }

.sr-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sr-mode, .sr-plat { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.sr-mode input, .sr-plat input { position: absolute; opacity: 0; pointer-events: none; }
.sr-mode b, .sr-plat b { font-size: 16px; }
.sr-mode span, .sr-plat span { font-size: 13px; color: var(--ink-2); }
.sr-mode:hover, .sr-plat:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sr-mode:has(input:checked), .sr-plat:has(input:checked) { border: 2px solid var(--accent); padding: 13px 15px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.sr-mode:has(input:focus-visible), .sr-plat:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-plats { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 10px; }
.sr-plat { flex-direction: row; align-items: center; gap: 12px; padding: 16px 18px; }
.sr-plat:has(input:checked) { padding: 15px 17px; }
.sr-plat .ico { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.sr-plat:has(input:checked) .ico { color: var(--accent); }
.sr-plat b { font-size: 18px; }
.sr-plat span { margin-left: auto; }

.sr-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.sr-tools { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.sr-tools .fsearch { flex: 1; min-width: 0; }
.sr-tools .fsearch input[type=search] { height: 42px; border-radius: 999px; }
.sr-tools .fsearch > .ico { top: 12px; }
.sr-tools select { flex: none; width: 170px; border-radius: 999px; }
.sr-list { display: flex; flex-direction: column; }
.sr-scroll { max-height: 460px; overflow: auto; }
.sr-pick { cursor: pointer; transition: background .12s; }
.sr-pick:hover { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.sr-pick:has(input:checked) { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.sr-list > .prow:first-child { border-top: 0; }
.jrow.sr-pick { grid-template-columns: minmax(0, 1fr) auto; }
.jrow .pt { cursor: pointer; }
.sr-name { display: flex; flex-direction: column; min-width: 0; }
.sr-name b { font-weight: 600; }
.sr-name > span { font-size: 12px; color: var(--ink-2); }
.sr-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.sr-pad { padding: 16px; }
.sr-areas { padding: 0; }

.sr-more { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 0; }
.sr-more > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; }
.sr-more > summary::-webkit-details-marker { display: none; }
.sr-more > summary::before { content: "›"; font-size: 18px; line-height: 1; transition: rotate .15s; color: var(--ink-2); }
.sr-more[open] > summary::before { rotate: 90deg; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; padding: 4px 18px 18px; }
.sr-cell { display: flex; flex-direction: column; gap: 10px; }
.sr-grid select, .sr-grid input[type=text], .sr-grid input[type=number] { width: 100%; }
.sr-grid .check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; align-self: end; padding-bottom: 8px; }
.sr-grid .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.sr-bar { position: sticky; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 20px; border-radius: 18px; background: var(--ink); color: var(--bg); }
.sr-bar-what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-bar-what > span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.sr-bar-what b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-bar-plat { font-size: 14px; font-weight: 600; opacity: .85; white-space: nowrap; }
.sr-bar-plat .ico { width: 14px; height: 14px; vertical-align: -2px; }
.sr-go { height: 46px; padding: 0 22px; border-radius: 999px; font-size: 16px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .sr-plats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sr-tools { flex-direction: column; } .sr-tools select { width: 100%; }
  .sr-bar-plat { display: none; }
}

/* Start a run: one bar under the title — the phone, what will run, Start. */
.sr-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 12px 12px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.sr-plat-pick { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--card-2); }
.sr-plat-pick .sr-plat { flex-direction: row; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 12px; background: transparent; }
.sr-plat-pick .sr-plat b { font-size: 16px; }
.sr-plat-pick .sr-plat .ico { width: 18px; height: 18px; }
.sr-plat-pick .sr-plat:has(input:checked) { padding: 10px 18px; border: 0; background: var(--card); box-shadow: inset 0 0 0 2px var(--accent); }
.sr-rerun-note { font-size: 14px; color: var(--ink-2); padding-left: 6px; }
.sr-top-what { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.sr-top-what > span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.sr-top-what b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .sr-top .sr-go { width: 100%; justify-content: center; } .sr-plat-pick { width: 100%; } .sr-plat-pick .sr-plat { flex: 1; justify-content: center; } }

/* Start a run: platform chips (both may be on), a top bar that stays in view, each build shown for its platform. */
.sr-top { position: sticky; top: 72px; z-index: 4; padding: 10px 10px 10px 12px; gap: 14px; }
.sr-chips { display: inline-flex; gap: 6px; }
.sr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; transition: background .15s, color .15s, border-color .15s; }
.sr-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sr-chip .ico { width: 15px; height: 15px; }
.sr-chip:hover { color: var(--ink); }
.sr-chip:has(input:checked) { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: var(--accent); color: var(--ink); }
.sr-chip:has(input:checked) .ico { color: var(--accent); }
.sr-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-top-what em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--accent); }
.sr-top .sr-go { height: 42px; }
form.sr .for-android, form.sr .for-ios { display: revert !important; }
form.sr:not(:has(input[name=platform][value=android]:checked)) .for-android,
form.sr:not(:has(input[name=platform][value=ios]:checked)) .for-ios { display: none !important; }
form.sr .field select.for-android, form.sr .field select.for-ios { width: 100%; }
@media (max-width: 760px) { .sr-top { top: 120px; } }
form.sr .field.for-android, form.sr .field.for-ios { display: flex !important; }
form.sr:not(:has(input[name=platform][value=android]:checked)) .field.for-android,
form.sr:not(:has(input[name=platform][value=ios]:checked)) .field.for-ios { display: none !important; }
.sr-grid label.check.sr-cell { flex-direction: row; align-items: center; }
.sr-top { top: 66px; }
/* The run bar sits at the foot of the screen and stays there while the lists scroll. */
.sr-top { position: sticky; top: auto; bottom: 14px; z-index: 4; box-shadow: 0 -1px 0 var(--line); }
@media (max-width: 760px) { .sr-top { top: auto; bottom: 8px; } }
/* What to run: the Flows page's pill switch, here with radios inside. */
.sr-tabs .sr-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.sr-tabs .sr-tab input { position: absolute; opacity: 0; pointer-events: none; }
.sr-tabs .sr-tab:hover { background: var(--card-2); }
.sr-tabs .sr-tab:has(input:checked) { background: var(--ink); color: var(--bg); }
.sr-tabs .sr-tab:has(input:checked) .n { color: inherit; opacity: .65; }
.sr-tabs .sr-tab:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Start a run: platform chips beside the What-to-run switch, in the style of Home's Runs filters. */
.sr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sr-platpick { display: inline-flex; align-items: center; gap: 8px; }
.sr-pchip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; transition: background .15s, color .15s; }
.sr-pchip input { position: absolute; opacity: 0; pointer-events: none; }
.sr-pchip .ico { width: 14px; height: 14px; }
.sr-pchip:hover { color: var(--ink); }
.sr-pchip:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.sr-pchip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .sr-row .sp { display: none; } }

/* Videos: the filter bar in the Flows page's look. */
.vx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vx-bar .fx-jump a.on { background: var(--ink); color: var(--bg); }
.vx-search input[type=search] { width: 240px; }
.vx-search input[type=search]:focus { width: 300px; }
.vx-when { height: 42px; border-radius: 999px; padding: 0 14px; border: 1px solid var(--line); background: var(--card); }
@media (max-width: 760px) { .vx-bar .sp { display: none; } .vx-search, .vx-search input[type=search], .vx-search input[type=search]:focus { width: 100%; } .vx-search { flex: 1 1 100%; } }
label.vx-search { position: relative; display: block; }

/* ===== One search box everywhere ====================================================
   Flows, Start a run, Videos and the log share it: a 40px pill, the icon inside on the left,
   the card colour, a thin line; focus turns the line to the accent with a soft ring. Its width
   no longer jumps on focus. (!important: earlier page rules set these with higher specificity.) */
:is(.fsearch, .fx-search, label.search) { position: relative; display: block; }
:is(.fsearch, .fx-search, label.search) > .ico,
.fx-search label > .ico {
  position: absolute !important; left: 14px !important; top: 50% !important; translate: 0 -50%;
  width: 16px; height: 16px; color: var(--ink-2); pointer-events: none;
}
:is(.fsearch, .fx-search, label.search) input[type=search] {
  height: 40px !important; padding: 0 14px 0 38px !important; border-radius: 999px !important;
  border: 1px solid var(--line) !important; background: var(--card) !important;
  font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
:is(.fsearch, .fx-search, label.search) input[type=search]::placeholder { color: var(--ink-2); opacity: .85; }
:is(.fsearch, .fx-search, label.search) input[type=search]:hover { border-color: color-mix(in srgb, var(--ink-2) 45%, var(--line)) !important; }
:is(.fsearch, .fx-search, label.search) input[type=search]:focus {
  outline: none; border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
/* Steady widths: the page bars keep one size; inside a panel's toolbar the box fills it. */
.fx-search input[type=search], .fx-search input[type=search]:focus { width: 280px !important; }
.sr-tools .fsearch input[type=search], .ptools .fsearch input[type=search], .vbar .fsearch input[type=search] { width: 100% !important; }
@media (max-width: 760px) { .fx-search input[type=search], .fx-search input[type=search]:focus { width: 100% !important; } }
/* The log's search: its label was the box; now the input is, so the label drops its own frame. */
label.search { border: 0 !important; padding: 0 !important; background: none !important; }
label.search input[type=search] { flex: 1; width: 100%; }

/* ===== One switch everywhere ========================================================
   Flows tabs, Flows status filters, Home's Platform/Result, Start a run's What-to-run and
   Platform, Videos' filters: one white pill with a thin line; options are 14px semibold;
   the chosen one is filled with ink. Status dots keep their colours. */
:is(.fx-jump, .hx-fgroup, .fx-filters) {
  display: inline-flex !important; flex-wrap: wrap; gap: 2px !important; padding: 3px !important;
  border: 1px solid var(--line) !important; border-radius: 999px !important; background: var(--card) !important;
  width: max-content; max-width: 100%;
}
:is(.fx-jump, .hx-fgroup, .fx-filters) > :is(a, label) {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px !important; border: 0 !important;
  border-radius: 999px !important; background: transparent !important; box-shadow: none !important;
  color: var(--ink) !important; font-size: 14px !important; font-weight: 600 !important; text-decoration: none;
  white-space: nowrap; cursor: pointer; transition: background .15s, color .15s;
}
:is(.fx-jump, .hx-fgroup, .fx-filters) > :is(a, label):hover { background: var(--card-2) !important; }
:is(.fx-jump, .hx-fgroup, .fx-filters) > :is(a.on, label:has(input:checked)) { background: var(--ink) !important; color: var(--bg) !important; }
:is(.fx-jump, .hx-fgroup, .fx-filters) .n { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
:is(.fx-jump, .hx-fgroup, .fx-filters) > :is(a.on, label:has(input:checked)) .n { color: inherit; opacity: .65; }
:is(.fx-jump, .hx-fgroup, .fx-filters) .ico { width: 14px; height: 14px; }
/* Flows overview: the tab the page shows is filled (Journeys by default, By area with #areas). */
.fx-jump.is-overview a.j, :is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.a { background: var(--ink) !important; color: var(--bg) !important; }
:is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.j { background: transparent !important; color: var(--ink) !important; }
.vx-bar .fx-search input[type=search], .vx-bar .fx-search input[type=search]:focus { width: 210px !important; }
.vx-when { height: 40px !important; font-size: 14px; }
@media (max-width: 760px) { .vx-bar .fx-search input[type=search], .vx-bar .fx-search input[type=search]:focus { width: 100% !important; } }

/* ===== One chevron for every drop-down ==============================================
   The browser's own arrow sat in the corner of the pill-shaped selects; ours sits 14px in,
   the same small chevron everywhere. A grey that reads on both themes (CSS vars can't reach
   inside a data: image; the page's CSP allows data: images). */
select:not([multiple]) {
  appearance: none !important; -webkit-appearance: none !important;
  padding-right: 38px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8a82' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 15px center !important; background-size: 11px 8px !important;
  cursor: pointer;
}
select:not([multiple]):hover { border-color: color-mix(in srgb, var(--ink-2) 45%, var(--line)); }
select:not([multiple]):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ===== Chosen pills: a gradient in the theme's own colour instead of flat black =========
   Teal on light, mint on dark — the accent family, so it fits the warm palette. Used by every
   switch: Flows tabs and status, Home's filters, Start a run, Videos. */
:root { --pill-on: linear-gradient(135deg, #0f6e66 0%, #1b8a7a 55%, #2aa38f 100%); --pill-on-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pill-on: linear-gradient(135deg, #2aa38f 0%, #3cc7b6 60%, #6fe0cf 100%); --pill-on-ink: #062521; } }
:root[data-theme="dark"] { --pill-on: linear-gradient(135deg, #2aa38f 0%, #3cc7b6 60%, #6fe0cf 100%); --pill-on-ink: #062521; }

:is(.fx-jump, .hx-fgroup, .fx-filters) > :is(a.on, label:has(input:checked)),
.fx-jump.is-overview a.j, :is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.a {
  background: var(--pill-on) !important; color: var(--pill-on-ink) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset;
}
:is(html.at-areas body, body:has(#areas:target)) .fx-jump.is-overview a.j { background: transparent !important; color: var(--ink) !important; box-shadow: none; }

/* Start a run, By area: the picked area's flows under the tiles, numbered, with their state. */
.sr-aflows { margin-top: 12px; }
.sr-aflows[hidden] { display: none; }
.sr-aflows-h { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sr-aflows ol { list-style: none; margin: 0; padding: 0; }
.sr-aflows .prow { grid-template-columns: 22px minmax(0, 1fr) auto; }
.sr-aflows .pt .tag { font-size: 11px; margin-left: 6px; }

/* Flows By area: tiles pick an area (the picked one has the accent edge); its flows list under them. */
.fx-tile-main { cursor: pointer; position: relative; }
.fx-tile-main input { position: absolute; opacity: 0; pointer-events: none; }
.fx-tile:has(input:checked) { border: 2px solid var(--accent); padding: 11px 11px 11px 15px; background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.fx-tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-area-panel { margin-top: 4px; }
.fx-area-panel[hidden] { display: none; }
.fx-area-panel .fx-block-h .ico { width: 13px; height: 13px; vertical-align: -2px; }
.fx-more { padding: 12px 16px; border-top: 1px solid var(--line); }
.fx-area-panel > .fx-block-h + .fx-more { border-top: 0; }

/* Flows tabs: no colour animation, so arriving on By area from another tab doesn't flash Journeys first. */
.fx-jump > a, .fx-jump > label { transition: none !important; }

/* ---- sign-in hero ---- */
.loginhero{max-width:420px;margin:8vh auto 0;text-align:center;padding:0 8px}
.loginart{margin:0 auto 6px;filter:drop-shadow(0 0 30px rgba(191,90,242,.15))}
.loginh{font-size:clamp(2rem,6vw,2.6rem);font-weight:800;letter-spacing:-.03em;margin:0}
.loginh .lg1{background:linear-gradient(135deg,#fff,#86868b);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.loginh .lg2{background:linear-gradient(135deg,var(--brass,#bf5af2),#0a84ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.loginbtn{display:flex;flex-direction:column;align-items:center;gap:2px;margin:26px auto 0;padding:16px 28px;
  width:100%;max-width:360px;border-radius:14px;text-decoration:none;cursor:pointer;
  background:#141414;border:1px solid #2c2c2e;transition:border-color .2s cubic-bezier(.4,0,.2,1)}
.loginbtn:hover{border-color:#bf5af2}
.loginbtn svg{margin-bottom:6px;color:#f5f5f7}
.loginbtn b{font-size:16px;color:#f5f5f7}
.loginbtn .muted{font-size:12px}
