/* 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. */
.segbar { display: flex; gap: 2px; height: 10px; }
.segbar > span { flex: 1; border-radius: 2px; background: var(--tone-muted-line); opacity: .55; }
.segbar > span.t-ok, .segbar > span.t-bad, .segbar > span.t-warn, .segbar > span.t-run { background: var(--tone); opacity: 1; }
.segbar > span.t-run { animation: tl-pulse 1.4s ease-in-out infinite; }
.segbar > span.t-muted { opacity: .35; }
@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 */
.vshelf { display: flex; flex-direction: column; gap: 10px; }
.vshelf h3 { min-width: 0; }
.vrow { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.vc { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.vc video { width: 100%; aspect-ratio: 9 / 16; max-height: 340px; border-radius: 10px; background: #0d1117; display: block; object-fit: contain; }
.vc .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.fc { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.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) {
  .vrow { grid-auto-columns: 160px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
}
.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;
  --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; 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; 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; }

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: 18px; align-items: center; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 19px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.topnav a.on { color: var(--ink); background: var(--card-2); }
.station { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--ink-2); white-space: nowrap; cursor: help; position: relative; }
.station .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone-ok); box-shadow: 0 0 0 3px var(--tone-ok-bg); }
.station .pop { display: none; position: absolute; right: 0; top: 26px; 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); box-shadow: 0 0 0 3px var(--tone-warn-bg); }
.station.bad { 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 10px; font-size: 13px; 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: 38px; 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 { 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.wide { max-width: 1280px; }
.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; }

.hero { border-left: 5px solid var(--tone-run); }
.hero .flowlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 18px; margin-top: 14px; font-size: 14px; }
.hero .flowlist div { display: flex; gap: 8px; align-items: center; min-width: 0; }
.hero .flowlist span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero .flowlist .t-ok, .hero .flowlist .t-bad, .hero .flowlist .t-run, .hero .flowlist .t-warn, .hero .flowlist .t-muted { color: var(--tone); }
.hero .flowlist .later { color: var(--ink-2); }
.hero .flowlist a { color: inherit; text-decoration: none; }

.queue { display: flex; flex-direction: column; }
.qi { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.qi:first-child { border-top: 0; }
.qi.new { background: var(--accent-soft); border-radius: 14px; }
.qn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--card-2); color: var(--ink-2); }
.qi .sub { font-size: 13px; color: var(--ink-2); }

.day { display: flex; flex-direction: column; gap: 10px; }
.day > h3 { color: var(--ink-2); font-family: system-ui, sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.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); }
.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; flex-direction: column; gap: 12px; }
form:has(input[name=what][value=tag]:checked) .pick[data-for=tag],
form:has(input[name=what][value=journey]:checked) .pick[data-for=journey],
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],
form:has(input[name=app][value=branch]:checked) .pick[data-for=branch],
form:has(input[name=app][value=apk]:checked) .pick[data-for=apk] { display: flex; }
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], 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); }
.fail .media { display: grid; grid-template-columns: 200px minmax(0, 300px) 1fr; gap: 18px; align-items: start; }
.fail .media.novideo { grid-template-columns: 200px 1fr; }
.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); }

.slot { display: flex; flex-direction: column; gap: 0; }
.slotlabel { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 4px 8px; }
.slotframe { border: 2px dashed var(--tone-run-line); border-radius: 20px; padding: 6px; }
.slotframe.free { border-color: var(--line); }
.slotframe .hero { border-radius: 14px; }
.then { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 13px; padding: 10px 0 8px 24px; }
.then::before { content: ""; width: 2px; height: 22px; background: var(--line); margin-right: 6px; }
.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%; overflow-x: auto; flex: none; }
  .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; }
  .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; }
  .slotframe { padding: 4px; border-radius: 18px; }
  .qi { grid-template-columns: 30px 1fr; } .qi > :last-child { grid-column: 2; justify-self: start; }
}
.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; }
