/* QA Playground E2E report. Tokens and components follow the QA Hub design system. */

:root {
  --bg: #fbfbfb;
  --surface: #ffffff;
  --sunken: #f4f4f5;
  --line: #e7e7e9;
  --line-2: #d9d9dd;
  --ink: #18181b;
  --ink-2: #5b5b63;
  --ink-3: #6b6b73;
  --pass: #18703f;
  --pass-bg: #e8f5ee;
  --fail: #c0262f;
  --fail-bg: #fdecee;
  --flaky: #8a5300;
  --flaky-bg: #fdf3e3;
  --skip: #a1a1aa;
  --skip-bg: #f1f1f3;
  --none: #ececef;
  --focus: #2f6fed;
  --shadow-lg: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -8px rgb(0 0 0 / 0.14);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 10px;

  --sans:
    'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e0e10;
    --surface: #151517;
    --sunken: #1b1b1e;
    --line: #26262a;
    --line-2: #33333a;
    --ink: #ededef;
    --ink-2: #a3a3ab;
    --ink-3: #8a8a92;
    --pass: #3fb877;
    --pass-bg: #12291d;
    --fail: #f2555f;
    --fail-bg: #331418;
    --flaky: #e4a33a;
    --flaky-bg: #2e220e;
    --skip: #6b6b73;
    --skip-bg: #222226;
    --none: #222226;
    --focus: #6d9bff;
    --shadow-lg: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -8px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e0e10;
  --surface: #151517;
  --sunken: #1b1b1e;
  --line: #26262a;
  --line-2: #33333a;
  --ink: #ededef;
  --ink-2: #a3a3ab;
  --ink-3: #8a8a92;
  --pass: #3fb877;
  --pass-bg: #12291d;
  --fail: #f2555f;
  --fail-bg: #331418;
  --flaky: #e4a33a;
  --flaky-bg: #2e220e;
  --skip: #6b6b73;
  --skip-bg: #222226;
  --none: #222226;
  --focus: #6d9bff;
  --shadow-lg: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -8px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
html.locked {
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
a {
  color: inherit;
}
code,
.mono,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-2);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  color: var(--ink-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  min-width: 0;
}
.top-end {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.theme-toggle {
  position: relative;
}
.theme-toggle svg {
  position: absolute;
  transition:
    transform 0.3s var(--ease-out),
    opacity 0.2s var(--ease-out);
}
.theme-toggle .i-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
:root[data-theme='dark'] .theme-toggle .i-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
:root[data-theme='dark'] .theme-toggle .i-sun {
  opacity: 1;
  transform: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
  }
  :root:not([data-theme='light']) .theme-toggle .i-sun {
    opacity: 1;
    transform: none;
  }
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s var(--ease-out);
}
.back:hover {
  color: var(--ink);
}

.hero {
  margin-bottom: 48px;
}
.hero .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 22ch;
  text-wrap: balance;
}
.hero .sub {
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 64ch;
}
.hero .sub:empty {
  display: none;
}
.hero .sub.alert {
  color: var(--fail);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hero .sub.alert::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  transform: translateY(-1px);
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 16px;
  color: var(--ink-2);
}
.hero .meta > span {
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}
.hero .meta .lbl {
  color: var(--ink-3);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.ext {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition:
    background-color 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.ext:hover {
  background: var(--sunken);
  border-color: var(--ink-3);
}
.ext svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tag {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  color: var(--ink-2);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.sec {
  margin-top: 56px;
}
.sec[hidden] {
  display: none;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.sec-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sec-note {
  color: var(--ink-3);
  font-size: 13px;
}
.empty {
  padding: 28px 0;
  color: var(--ink-2);
  text-align: center;
}
.link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
  transition: text-decoration-color 0.15s var(--ease-out);
}
.link:hover {
  text-decoration-color: currentColor;
}
button.link {
  display: inline;
}

/* ── Summary ──────────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 32px;
  padding: 20px 0 8px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stat .num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.stat .num small {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0;
}
.stat .lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}
.stat .lbl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stat .lbl.fail {
  color: var(--fail);
}
.lbl i.pass,
.legend i.pass {
  background: var(--pass);
}
.lbl i.fail,
.legend i.fail {
  background: var(--fail);
}
.lbl i.flaky,
.legend i.flaky {
  background: var(--flaky);
}
.lbl i.skip,
.legend i.skip {
  background: var(--skip);
}

.runners {
  margin-top: 18px;
}
.runners li {
  display: grid;
  grid-template-columns: 96px 1fr 72px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.runners li + li {
  border-top: 1px solid var(--line);
}
.r-name {
  font-weight: 500;
}
.r-bar {
  display: flex;
  height: 8px;
  gap: 2px;
  border-radius: 4px;
  overflow: hidden;
}
.r-bar span {
  min-width: 3px;
}
.r-bar .pass {
  background: var(--pass);
}
.r-bar .fail {
  background: var(--fail);
}
.r-bar .flaky {
  background: var(--flaky);
}
.r-bar .skip {
  background: var(--skip);
}
.r-num {
  text-align: right;
  color: var(--ink-2);
  font-size: 12.5px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── Needs attention ──────────────────────────────────────────────────────── */

.attn li + li {
  border-top: 1px solid var(--line);
}
.attn-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: calc(100% + 20px);
  padding: 12px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  transition:
    background-color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.attn-row:hover {
  background: var(--sunken);
}
.attn-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  min-width: 0;
  width: 100%;
}
.attn-title .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attn-sub {
  color: var(--ink-2);
  font-size: 12.5px;
}
.attn-msg {
  color: var(--fail);
  font: 12px/1.5 var(--mono);
  overflow-wrap: anywhere;
}
.attn-msg.flaky {
  color: var(--flaky);
}

/* ── Controls ─────────────────────────────────────────────────────────────── */

.tt-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 0 12px;
}
.search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  transition:
    border-color 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out);
}
.search:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}
.search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  flex-shrink: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  height: 100%;
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search kbd {
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 18px;
}
.search:focus-within kbd {
  display: none;
}

.seg {
  position: relative;
  display: inline-flex;
  padding: 3px;
  background: var(--sunken);
  border-radius: 9px;
  isolation: isolate;
}
.seg-ind {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    0 0 0 1px var(--line);
  transition:
    transform 0.25s var(--ease-out),
    width 0.25s var(--ease-out);
  z-index: -1;
}
.seg button {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition:
    color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.seg button[aria-pressed='true'],
.seg button[aria-selected='true'] {
  color: var(--ink);
}
.seg .count {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

.select {
  height: 36px;
  padding: 0 30px 0 10px;
  max-width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238b8b93' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 8px center / 14px;
  appearance: none;
  transition: border-color 0.15s var(--ease-out);
}
.select:hover {
  border-color: var(--ink-3);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ink-2);
  transition:
    background-color 0.15s var(--ease-out),
    color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.icon-btn:hover {
  background: var(--sunken);
  color: var(--ink);
}
.icon-btn:active,
.seg button:active,
.pager button:active,
.attn-row:active,
.t-open:active,
.btn:active,
.ext:active,
.thumb:active {
  transform: scale(0.96);
}
.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.btn:hover {
  background: var(--sunken);
  border-color: var(--ink-3);
}
.btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Tests table ──────────────────────────────────────────────────────────── */

.tt-wrap {
  border-top: 1px solid var(--line);
}
.tt {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.tt th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-3);
}
.tt td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.tt tbody tr[data-i] {
  cursor: pointer;
  transition: background-color 0.12s var(--ease-out);
}
.tt tbody tr[data-i]:hover {
  background: var(--sunken);
}
.tt tbody tr.fail {
  background: color-mix(in srgb, var(--fail-bg) 55%, transparent);
}
.tt tbody tr.fail:hover {
  background: var(--fail-bg);
}
.c-test {
  overflow-wrap: anywhere;
}
.c-browser {
  width: 112px;
  color: var(--ink-2);
}
.c-status {
  width: 112px;
}
.c-retries {
  width: 84px;
  color: var(--ink-2);
  text-align: right;
}
.c-dur {
  width: 96px;
  text-align: right;
  color: var(--ink-2);
}
.t-open {
  font-weight: 500;
  text-align: left;
  border-radius: 4px;
}
.t-open:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
}
.t-file {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 12px;
}
.t-file code {
  font-size: 12px;
}
.retries.some {
  color: var(--flaky);
  font-weight: 500;
}
.tt tr.fail .retries.some {
  color: var(--fail);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip.pass {
  background: var(--pass-bg);
  color: var(--pass);
}
.chip.fail {
  background: var(--fail-bg);
  color: var(--fail);
}
.chip.flaky {
  background: var(--flaky-bg);
  color: var(--flaky);
}
.chip.skip {
  background: var(--skip-bg);
  color: var(--ink-2);
}

.tt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.tt-count {
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pager {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pager button,
.pager span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition:
    background-color 0.15s var(--ease-out),
    color 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}
.pager button:hover:not(:disabled) {
  background: var(--sunken);
  color: var(--ink);
}
.pager button[aria-current] {
  background: var(--ink);
  color: var(--bg);
}
.pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Drawer ───────────────────────────────────────────────────────────────── */

.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s 0.45s;
}
.drawer-root.open {
  visibility: visible;
  transition: none;
  pointer-events: auto;
}
.scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.32);
  opacity: 0;
  transition: opacity 0.35s var(--ease-drawer);
}
.drawer {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: min(620px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 16px));
  transition: transform 0.45s var(--ease-drawer);
  outline: none;
}
.drawer-root.open .scrim {
  opacity: 1;
}
.drawer-root.open .drawer {
  transform: none;
}
.drawer.dragging {
  transition: none;
}
.grabber {
  display: none;
}

.dr-head {
  position: relative;
  padding: 20px 56px 16px 24px;
  border-bottom: 1px solid var(--line);
}
.dr-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--ink-2);
  font-size: 13px;
}
.dr-suite {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dr-suite:empty {
  display: none;
}
.dr-suite + .dr-title {
  margin-top: 2px;
}
.dr-title {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.dr-file {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--ink-3);
  min-width: 0;
}
.dr-file code {
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.dr-file .icon-btn {
  width: 28px;
  height: 28px;
}
.dr-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.dr-tabs {
  margin: 14px 24px 0;
  align-self: flex-start;
  max-width: calc(100% - 48px);
}
.dr-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 28px;
  overscroll-behavior: contain;
}
.dr-sec {
  margin-top: 20px;
}
.dr-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dr-sec h3 {
  font-size: 13px;
  font-weight: 600;
}
.dr-sec .hint,
.hint {
  color: var(--ink-2);
  font-size: 12.5px;
}
.dr-sec p code,
.muted code {
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--sunken);
}
.note {
  margin-top: 16px;
  color: var(--ink-2);
}
.annot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 13px;
}
.annot .tag {
  margin-right: 4px;
}

.steps .step {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
}
.step + .step {
  border-top: 1px solid var(--line);
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pass);
  align-self: center;
  justify-self: center;
}
.step.fail .step-dot {
  background: var(--fail);
}
.step.skip .step-dot {
  background: var(--skip);
}
.step.skip .step-title {
  color: var(--ink-2);
}
.step-title {
  overflow-wrap: anywhere;
  min-width: 0;
}
.step-sub {
  color: var(--ink-3);
  font-size: 12px;
  margin-left: 6px;
  white-space: nowrap;
}
.step-dur {
  color: var(--ink-2);
  font: 12px var(--mono);
  font-variant-numeric: tabular-nums;
}
.step-err {
  grid-column: 2 / -1;
}
.err {
  margin: 4px 0 0;
  padding: 10px 12px;
  background: var(--fail-bg);
  color: var(--fail);
  border-radius: 8px;
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
}
.code {
  margin: 0;
  padding: 12px 14px;
  background: var(--sunken);
  color: var(--ink);
  border-radius: 8px;
  font: 12px/1.6 var(--mono);
  white-space: pre;
  overflow: auto;
  max-height: 320px;
}
.stack {
  margin-top: 12px;
}
.stack summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  list-style: none;
  border-radius: 6px;
  transition: color 0.15s var(--ease-out);
}
.stack summary::-webkit-details-marker {
  display: none;
}
.stack summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s var(--ease-out);
}
.stack[open] summary::before {
  transform: rotate(45deg);
}
.stack summary:hover {
  color: var(--ink);
}
.stack pre {
  margin: 6px 0 0;
  padding: 12px;
  background: var(--sunken);
  border-radius: 8px;
  font: 11.5px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}
.err-loc {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
}

/* Attachments */
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border-radius: 10px;
  text-align: left;
  transition: transform 0.1s var(--ease-out);
}
.thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
  transition: border-color 0.15s var(--ease-out);
}
.thumb:hover img {
  border-color: var(--ink-3);
}
.thumb span,
.att-cap {
  color: var(--ink-2);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-video video {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  background: #000;
}
.att-video .att-cap {
  display: block;
  margin-top: 6px;
}
.att-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.att-list li + li {
  border-top: 1px solid var(--line);
}
.att-list .nm {
  min-width: 0;
  overflow-wrap: anywhere;
}
.att-list .nm small {
  display: block;
  color: var(--ink-2);
  font-size: 12px;
}
.att-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* Retries */
.attempts li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 4px 14px;
  padding: 10px 0;
}
.attempts li + li {
  border-top: 1px solid var(--line);
}
.attempts .a-name {
  font-weight: 500;
}
.attempts .a-dur {
  color: var(--ink-2);
  font: 12px var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 64px;
}
.attempts .a-err {
  grid-column: 1 / -1;
  color: var(--fail);
  font: 12px/1.5 var(--mono);
  overflow-wrap: anywhere;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 16px;
  background: rgb(0 0 0 / 0.92);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.2s var(--ease-out),
    visibility 0s 0.2s;
}
.lightbox.open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s var(--ease-out);
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ededef;
  min-width: 0;
}
.lb-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.lb-bar .lb-actions {
  display: inline-flex;
  gap: 8px;
  flex-shrink: 0;
}
.lb-bar .icon-btn,
.lb-bar .btn {
  color: #ededef;
  border-color: rgb(255 255 255 / 0.28);
}
.lb-bar .icon-btn:hover,
.lb-bar .btn:hover {
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}
.lb-bar .btn svg {
  stroke: currentColor;
}
.lb-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #fff;
  transform: scale(0.96);
  transition: transform 0.25s var(--ease-out);
}
.lightbox.open .lb-stage img {
  transform: none;
}

/* ── Tooltip + toast ──────────────────────────────────────────────────────── */

.tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  max-width: 280px;
  padding: 6px 9px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease-out);
}
.tip.on {
  opacity: 1;
}
.tip:empty {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  transform: translate(-50%, 16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s var(--ease-out),
    opacity 0.2s var(--ease-out);
}
.toast.on {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}
.foot-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.foot .link {
  color: var(--ink-2);
}

/* ── Entrance (the one orchestrated animation) ────────────────────────────── */

html:not(.ready) .r-bar span {
  transform: scaleX(0);
}
html.ready:not(.still) .r-bar span {
  animation: grow-x 0.6s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
  transform-origin: left;
}
@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .c-browser {
    width: 92px;
  }
  .c-retries {
    width: 72px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 32px 16px 56px;
  }
  .top {
    margin-bottom: 28px;
  }
  .hero .sub {
    font-size: 15px;
  }
  .sec {
    margin-top: 44px;
  }
  .sec-head {
    flex-wrap: wrap;
    gap: 2px 16px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .runners li {
    grid-template-columns: 72px 1fr 64px;
    gap: 10px;
  }
  .attn-row {
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
    width: calc(100% + 16px);
  }
  .icon-btn,
  .dr-file .icon-btn {
    width: 36px;
    height: 36px;
  }
  .back {
    min-height: 36px;
  }
  .ext {
    height: 36px;
  }

  /* Table becomes a list of stacked rows */
  .tt thead {
    display: none;
  }
  .tt,
  .tt tbody,
  .tt tr,
  .tt td {
    display: block;
    width: auto;
  }
  .tt tbody tr[data-i] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'test test status' 'browser retries dur';
    gap: 6px 10px;
    padding: 12px 4px;
    border-top: 1px solid var(--line);
  }
  .tt td {
    padding: 0;
    border: 0;
    text-align: left;
  }
  .tt td.c-test {
    grid-area: test;
  }
  .tt td.c-status {
    grid-area: status;
  }
  .tt td.c-browser {
    grid-area: browser;
    font-size: 12.5px;
  }
  .tt td.c-retries {
    grid-area: retries;
    font-size: 12.5px;
    text-align: left;
  }
  .tt td.c-retries:empty {
    display: block;
  }
  .tt td.c-dur {
    grid-area: dur;
    font-size: 12.5px;
    text-align: right;
  }
  .t-open {
    display: block;
    min-height: 24px;
  }
  .seg {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .seg::-webkit-scrollbar {
    display: none;
  }
  .tt-bar .select {
    flex: 1 1 140px;
  }
  .seg button {
    height: 36px;
  }
  .pager button,
  .pager span {
    min-width: 40px;
    height: 40px;
  }
  .btn {
    height: 36px;
  }
  .stack summary {
    min-height: 36px;
  }

  /* Drawer becomes a bottom sheet */
  .drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(88vh, 760px);
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
  }
  .grabber {
    display: block;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 2px;
    background: var(--line-2);
    flex-shrink: 0;
    touch-action: none;
  }
  .dr-head {
    padding: 12px 56px 14px 18px;
    touch-action: none;
  }
  .dr-tabs {
    margin: 12px 18px 0;
    max-width: calc(100% - 36px);
  }
  .dr-body {
    padding: 6px 18px 28px;
  }
  .dr-close {
    top: 10px;
    right: 10px;
  }
  .att-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .att-list li {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation: none !important;
  }
}
