/* Hooklab by Directive Labs: shared styles for the client and admin views.
   Single dark theme to match the Directive Labs brand (near-black #0A0A0A, white pill buttons). */
:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1D1D1D;
  --ink: #F4F4F1;
  --muted: #A6A6A0;
  --faint: #6F6F6A;
  --line: #2A2A28;
  --main: #8C92FF;
  --ta: #FF6F8F;
  --tb: #3DD3B2;
  --tc: #FFB54A;
  --good: #3DD3B2;
  --warn: #FFB54A;
  --bad: #FF6B61;
  --btn-bg: #F4F4F1;
  --btn-ink: #0A0A0A;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 0 0 1px var(--line);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
a { color: var(--main); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--main); outline-offset: 2px; border-radius: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.btn.primary:hover { filter: brightness(.88); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn svg { width: 16px; height: 16px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.notice {
  border-radius: var(--radius); padding: 12px 16px; margin: 16px 0;
  background: var(--surface); border: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start;
}
.notice.good { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.notice .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--muted); }
.notice.good .dot { background: var(--good); } .notice.bad .dot { background: var(--bad); } .notice.warn .dot { background: var(--warn); }

/* Role colours */
.r-main { --role: var(--main); }
.r-trial_a { --role: var(--ta); }
.r-trial_b { --role: var(--tb); }
.r-trial_c { --role: var(--tc); }
.role-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--role); display: inline-block; flex: none; }
.role-chip {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--ink);
}

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); font: 700 17px var(--display); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.skeleton { color: var(--muted); padding: 80px 0; text-align: center; }

/* ===================================================== client dashboard */
.topbar { padding: 20px 0; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.who h1 { font-size: 19px; }
.who .handle { color: var(--muted); font-size: 14px; }
.sync-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }

.verdict-hero { padding: 28px 0 8px; }
.verdict-hero p.lead {
  font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.18; letter-spacing: -0.02em; margin: 0; max-width: 24ch;
}
.verdict-hero p.lead b { font-weight: 800; }
.verdict-hero p.lead q { quotes: '\201C' '\201D'; font-weight: 800; color: var(--main); }
.verdict-hero .sub { color: var(--muted); margin: 14px 0 0; max-width: 68ch; }

.tabs { display: flex; gap: 6px; margin: 26px 0 6px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line); background: transparent; padding: 7px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.test {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 24px; margin: 18px 0 26px;
}
.test-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.test-head h2 { font-size: 24px; }
.test-head .when { color: var(--muted); font-size: 14px; margin-top: 4px; }
.verdict {
  display: inline-flex; align-items: center; white-space: nowrap; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px;
  background: var(--surface-2); font-weight: 600; font-size: 14px;
}
.verdict .role-dot { width: 22px; height: 22px; display: grid; place-items: center; }
.verdict .role-dot svg { width: 13px; height: 13px; color: #0A0A0A; }
.verdict.flat { color: var(--muted); }

/* The lineup: four vertical reel frames that fill with views */
.lineup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.slot { min-width: 0; }
.slot .role-chip { margin-bottom: 10px; }
.frame {
  position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); isolation: isolate;
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.frame::after { /* dim the thumbnail so the meter reads */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10,12,22,.78), rgba(10,12,22,.2) 55%, rgba(10,12,22,.05));
}
.frame .meter {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--fill, 0) * 100%);
  background: linear-gradient(to top, color-mix(in srgb, var(--role) 70%, transparent), color-mix(in srgb, var(--role) 38%, transparent));
  border-top: 3px solid var(--role);
  transition: height 900ms cubic-bezier(.2,.8,.2,1);
  mix-blend-mode: normal;
}
.frame .count {
  position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; z-index: 1;
}
.frame .count b { display: block; font: 800 clamp(22px, 2.6vw, 32px)/1 var(--display); letter-spacing: -0.02em; }
.frame .count span { font-size: 12.5px; opacity: .9; }
.frame .open {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px);
}
.frame .open svg { width: 15px; height: 15px; }
.frame.empty { border: 2px dashed var(--line); background: transparent; display: grid; place-items: center; text-align: center; padding: 16px; }
.frame.empty::after { display: none; }
.frame.empty p { margin: 0; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .frame .meter { transition: none; } }

.hook { margin: 12px 0 2px; font-weight: 600; line-height: 1.3; }
.visual { font-size: 13px; color: var(--muted); margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.frame.waiting { border-color: color-mix(in srgb, var(--role) 45%, var(--line)); }
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--role) 14%, transparent); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--role) 35%, transparent);
}
.stats { margin: 12px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: 13.5px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; text-align: right; font-weight: 600; }

details.trend { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
details.trend summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
details.trend summary::-webkit-details-marker { display: none; }
details.trend summary svg { width: 14px; height: 14px; transition: transform .2s; }
details.trend[open] summary svg { transform: rotate(90deg); }
.chart { margin-top: 12px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.chart .legend span { display: inline-flex; align-items: center; gap: 6px; }

.board { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; margin: 18px 0 26px; }
.board h2 { font-size: 24px; }
.board p { color: var(--muted); margin: 6px 0 0; }
.table-scroll { overflow-x: auto; margin-top: 16px; }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.rank th { text-align: right; font-weight: 600; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.rank th:nth-child(-n+2) { text-align: left; }
table.rank td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
table.rank td:nth-child(-n+2) { text-align: left; }
table.rank td.n { color: var(--faint); width: 32px; }
table.rank .hk { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
table.rank .hk .role-dot { transform: translateY(-1px); }
table.rank .sub { color: var(--muted); font-size: 12.5px; margin-left: 17px; }
table.rank tr:last-child td { border-bottom: 0; }

.connect {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px;
  margin: 26px 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.connect h2 { font-size: 30px; }
.connect p { color: var(--muted); }
.connect ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; }
.connect li { display: flex; gap: 10px; }
.connect li svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 2px; }
.mini-lineup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini-lineup div { aspect-ratio: 9/16; border-radius: 10px; background: var(--surface-2); position: relative; overflow: hidden; }
.mini-lineup div::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); background: color-mix(in srgb, var(--role) 75%, transparent); border-top: 3px solid var(--role); }

.foot { color: var(--faint); font-size: 13px; padding: 10px 0 48px; }

@media (max-width: 860px) {
  .lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .connect { grid-template-columns: 1fr; padding: 24px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .test, .board { padding: 18px 16px; border-radius: 14px; }
  .sync-state .label { display: none; }
}

/* ===================================================== admin */
.admin { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 14px; }
.side .brand { font: 800 18px var(--display); padding: 0 8px; }
.side .brand small { display: block; font: 500 13px var(--body); color: var(--muted); }
.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.client-list button {
  width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; display: flex; gap: 10px; align-items: center;
}
.client-list button:hover { background: var(--surface-2); }
.client-list button[aria-current="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.client-list .avatar { width: 30px; height: 30px; font-size: 13px; }
.client-list .nm { font-weight: 600; font-size: 14px; display: block; line-height: 1.25; }
.client-list .st { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.status-dot.on { background: var(--good); } .status-dot.err { background: var(--bad); }
.pill { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--warn); color: #0A0A0A; border-radius: 999px; padding: 1px 8px; }
.add-client { display: flex; gap: 6px; }
.add-client input { flex: 1; min-width: 0; }
.side .bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }

.pane { padding: 28px 32px 60px; max-width: 1200px; min-width: 0; }
.pane-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pane-head .avatar { width: 52px; height: 52px; font-size: 20px; }
.pane-head h1 { font-size: 28px; }
.pane-head .meta { color: var(--muted); font-size: 14px; }
.pane-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.section-title h2 { font-size: 20px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.batch-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.batch-head h3 { font-size: 18px; }
.batch-head .acts { margin-left: auto; display: flex; gap: 4px; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.aslot { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; gap: 10px; min-width: 0; }
.aslot .thumb { width: 54px; aspect-ratio: 9/16; border-radius: 7px; background: var(--surface-2); overflow: hidden; flex: none; border: 2px solid var(--role); }
.aslot .thumb img { width: 100%; height: 100%; object-fit: cover; }
.aslot .thumb.none { border-style: dashed; border-color: var(--line); }
.aslot .info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aslot .info .hk { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.aslot .info .v { font-size: 12.5px; color: var(--muted); }
.aslot.suggested { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.tag { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; align-self: flex-start; }
.tag.auto { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.tag.confirmed { background: color-mix(in srgb, var(--main) 15%, transparent); color: var(--main); }
.tag.suggested { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tag.none { background: var(--surface-2); color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--main); font-weight: 600; font-size: 12.5px; cursor: pointer; text-align: left; }

.reel-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.reel-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.reel-table tr:last-child td { border-bottom: 0; }
.reel-table .t { width: 40px; }
.reel-table .t img, .reel-table .t div { width: 34px; aspect-ratio: 9/16; border-radius: 5px; object-fit: cover; background: var(--surface-2); }
.reel-table .cap { max-width: min(420px, 48vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-table tr.ignored { opacity: .5; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 22px; margin-bottom: 8px; }

.howto { counter-reset: s; list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.howto li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.howto li::before { content: counter(s); font: 700 13px var(--display); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 220px; }

input[type=text], input[type=date], input[type=password], input[type=url], input[type=search], textarea, select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; width: 100%;
}
textarea { resize: vertical; min-height: 60px; }
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
label.f .hint { font-weight: 400; color: var(--muted); }

dialog {
  border: 0; border-radius: 18px; padding: 0; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
dialog::backdrop { background: rgba(17, 20, 29, .5); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
dialog .dlg-head h2 { font-size: 20px; }
dialog .dlg-body { padding: 20px 22px; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.vbox { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; border-top: 4px solid var(--role); }
.vbox h3 { font-size: 15px; font-family: var(--body); }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cand { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); cursor: pointer; text-align: left; display: grid; gap: 6px; }
.cand:hover { border-color: var(--main); }
.cand.current { border-color: var(--main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--main) 20%, transparent); }
.cand img, .cand .ph { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.cand .c { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cand .m { font-size: 12px; display: flex; justify-content: space-between; color: var(--faint); }
.cand.out { opacity: .55; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 50; }

@media (max-width: 1100px) { .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .pane { padding: 20px 16px 48px; }
  .vgrid, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .slots { grid-template-columns: 1fr; } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { background: var(--surface); padding: 32px; border-radius: 18px; box-shadow: var(--shadow); width: min(380px, 100%); display: grid; gap: 14px; }
.login h1 { font-size: 24px; }

/* Brand lockup: Hooklab by Directive Labs for <client> */
.lockup { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lockup .product { font: 800 22px/1 var(--display); letter-spacing: -0.03em; }
.lockup .by { color: var(--muted); font-size: 14px; }
.lockup .by b { color: var(--ink); font-weight: 600; }
.brandbar { border-bottom: 1px solid var(--line); }
.brandbar .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 16px; }
.brandbar .sync-state { margin-left: auto; }
.pane-head { margin-bottom: 18px; }

/* ===================================================== many tests at once */
.verdict-hero.compact { padding: 26px 0 0; }
.verdict-hero.compact p.lead { font-size: clamp(22px, 2.6vw, 32px); max-width: 34ch; }
.tabs { margin-top: 22px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 14px 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); }
.seg .n { opacity: .65; font-weight: 500; margin-left: 2px; }
.controls .search { flex: 1 1 220px; min-width: 0; }
.controls .search input { border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.controls .sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.controls .sort select { width: auto; border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.legend-line { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.legend-line span { display: inline-flex; align-items: center; gap: 6px; }

h3.wk { font: 600 13px var(--body); color: var(--muted); margin: 22px 0 8px; display: flex; gap: 8px; align-items: baseline; }
h3.wk span { color: var(--faint); font-weight: 500; }
.tlist { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.trow {
  width: 100%; display: grid; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  grid-template-columns: 44px minmax(0, 1.25fr) minmax(220px, 1.3fr) minmax(150px, auto);
  padding: 10px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink);
}
.tlist .trow:first-child { border-top: 0; }
.trow:hover { background: var(--surface-2); }
.tthumb { width: 44px; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--surface-2); max-width: 100%; }
.tthumb img { width: 100%; height: 100%; object-fit: cover; }
.tmain { min-width: 0; display: grid; gap: 3px; }
.ttitle { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tmeta { font-size: 12.5px; color: var(--muted); }
.tbars { display: grid; gap: 4px; min-width: 0; }
.tb { display: grid; grid-template-columns: 12px minmax(0, 1fr) 44px; align-items: center; gap: 8px; font-size: 12px; }
.tb em { font-style: normal; font-weight: 700; color: var(--role); font-size: 11.5px; }
.tb .track { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.tb .track i { display: block; height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--role) 55%, transparent); }
.tb b { font-weight: 600; text-align: right; color: var(--muted); }
.tb.win .track i { background: var(--role); }
.tb.win b { color: var(--ink); }
.tb.off b { color: var(--faint); }
.tverdict { justify-self: end; }
.tverdict .verdict { font-size: 13px; padding: 6px 12px 6px 8px; }
.tverdict .verdict .role-dot { width: 18px; height: 18px; }
.more { text-align: center; margin: 16px 0 0; }
.back { margin: 22px 0 -4px; }
.empty-state.small { padding: 36px 16px; }

@media (max-width: 860px) {
  .trow { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; padding: 12px 14px; }
  .tthumb { grid-row: span 2; width: 40px; align-self: start; }
  .tbars { grid-column: 2; }
  .tverdict { grid-column: 2; justify-self: start; }
}

/* admin: auto-grouped tests */
.section-title .seg { flex-wrap: wrap; }
.batch-head .tag { align-self: center; }
.card.tip { font-size: 14px; color: var(--muted); line-height: 1.55; margin-top: 18px; }
.card.tip b { color: var(--ink); }
code { font: 600 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
details.reels-all > summary { list-style: none; cursor: pointer; }
details.reels-all > summary::-webkit-details-marker { display: none; }
details.reels-all > summary h2::after { content: ' +'; color: var(--faint); font-weight: 500; }
details.reels-all[open] > summary h2::after { content: ' −'; }
.reel-table select { width: auto; max-width: 260px; font-size: 13px; padding: 6px 10px; }

input[type=search] { -webkit-appearance: none; appearance: none; }
