/* The creator console. Brand from landing/src/styles/global.css: ink 0B0C10, yellow FFCF3A, Figtree, dark only.
   The landing page is a poster; this is a tool someone works in for an hour, so the scale is an app's: 15 px text,
   36 px controls, 8 px corners, one yellow action per screen. */
:root {
  --bg: oklch(14.5% 0.008 275);
  --surface: oklch(17% 0.008 275);
  --panel: oklch(20.5% 0.01 275);
  --panel-hi: oklch(24.5% 0.012 275);
  --line: oklch(25% 0.008 275);
  --line-strong: oklch(33% 0.01 275);
  --text: oklch(97% 0.003 275);
  --muted: oklch(74% 0.01 275);
  --faint: oklch(62% 0.01 275);
  --yellow: oklch(87% 0.165 90);
  --yellow-hi: oklch(91% 0.15 92);
  --yellow-wash: oklch(87% 0.165 90 / 0.12);
  --on-yellow: oklch(14.5% 0.008 275);
  --strong: oklch(80% 0.15 155);
  --strong-wash: oklch(80% 0.15 155 / 0.13);
  --good: oklch(86% 0.13 120);
  --fair: oklch(84% 0.14 80);
  --weak: oklch(72% 0.16 30);
  --bad: oklch(75% 0.15 25);
  --bad-wash: oklch(64% 0.17 25 / 0.14);

  --font: "Figtree", system-ui, sans-serif;
  --r-sm: 0.375rem;
  --r: 0.5rem;
  --r-lg: 0.75rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1rem, 4vw, 2rem);
  --shadow: 0 1px 0 oklch(100% 0 0 / 0.04) inset, 0 12px 32px oklch(0% 0 0 / 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 0.9375rem/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--yellow); color: var(--on-yellow); }
input, select { caret-color: var(--yellow); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--yellow); color: var(--on-yellow); padding: 0.5rem 0.875rem; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }
.ico { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem;
  height: 2.25rem; padding: 0 0.875rem; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font: 600 0.875rem/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.btn:hover { background: var(--panel); border-color: oklch(40% 0.01 275); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); font-weight: 700; }
.btn.primary:hover { background: var(--yellow-hi); border-color: var(--yellow-hi); }
.btn.small { height: 1.875rem; padding: 0 0.625rem; font-size: 0.8125rem; }
.btn.wide { width: 100%; height: 2.5rem; }
.btn[data-busy]::after { content: ""; width: 0.875rem; height: 0.875rem; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.link-btn { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); cursor: pointer; }
.link-btn:hover { text-decoration-color: currentColor; }

input[type=email], input[type=password], input[type=text], input[type=url], input.code, select {
  width: 100%; height: 2.5rem; padding: 0 0.75rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: 500 0.9375rem var(--font);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: oklch(42% 0.01 275); }
input:focus, select:focus { outline: 2px solid var(--yellow); outline-offset: -1px; border-color: transparent; }
input.code { height: 3rem; font-size: 1.375rem; font-weight: 700; letter-spacing: 0.35em; text-align: center; }

.icon { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--r); background: transparent; cursor: pointer; color: var(--muted); }
.icon:hover:not(:disabled) { background: var(--panel-hi); color: var(--text); }
.icon:disabled { opacity: 0.35; cursor: default; }
.icon svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.25rem;
  height: 3.5rem; padding: 0 var(--gutter);
  background: oklch(14.5% 0.008 275 / 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 900; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; padding: 0.25rem; margin-left: -0.25rem; }
.wordmark svg { width: 1.375rem; height: 1.375rem; color: var(--yellow); }
.wordmark.big { font-size: 1.25rem; }
.wordmark.big svg { width: 1.75rem; height: 1.75rem; }
.org { position: relative; display: flex; align-items: center; min-width: 0; margin-right: 1rem; }
.org::before { content: ""; width: 1px; height: 1.25rem; background: var(--line-strong); rotate: 20deg; margin: 0 0.625rem 0 0.5rem; }
.org-btn { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 15rem; height: 2rem; padding: 0 0.5rem; border: 0; border-radius: var(--r); background: none; cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.org-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-btn svg { width: 0.875rem; height: 0.875rem; flex: none; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.org-btn:hover, .org-btn[aria-expanded=true] { background: var(--panel); }
.tabs { display: flex; gap: 0.125rem; align-self: stretch; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 0.75rem; color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: -1px; height: 2px; background: var(--yellow); }
.balance {
  margin-left: auto; margin-right: 0.5rem; padding: 0.25rem 0.625rem; border-radius: 999px;
  background: var(--yellow-wash); color: var(--yellow);
  font-weight: 700; font-size: 0.8125rem; white-space: nowrap; text-decoration: none;
}
.balance:hover { background: oklch(87% 0.165 90 / 0.2); }
.balance.low { background: var(--bad-wash); color: var(--bad); }
.account { position: relative; }
.account-btn { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); cursor: pointer; }
.account-btn:hover { background: var(--panel-hi); }
.avatar { font-weight: 800; font-size: 0.8125rem; }
.menu {
  position: absolute; right: 0; top: calc(100% + 0.375rem); min-width: 14rem; padding: 0.25rem;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow); z-index: 30;
}
.org-menu { left: 0; right: auto; min-width: 16rem; }
.menu-email { padding: 0.5rem 0.625rem; color: var(--muted); font-size: 0.8125rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.menu-label { display: grid; gap: 0.125rem; padding: 0.5rem 0.625rem; color: var(--faint); font-size: 0.75rem; font-weight: 600; }
.menu-label small { font-weight: 500; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 0.25rem 0; }
.menu button { width: 100%; text-align: left; padding: 0.4375rem 0.625rem; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.menu button:hover, .menu button:focus-visible { background: var(--panel-hi); outline-offset: -2px; }
.menu [role=menuitemradio] { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.menu [role=menuitemradio] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu [role=menuitemradio] small { color: var(--faint); font-size: 0.75rem; }
.menu [aria-checked=true] span { color: var(--yellow); font-weight: 600; }
.rename { width: min(26rem, calc(100vw - 2rem)); padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.rename::backdrop { background: oklch(8% 0.01 275 / 0.7); }
.rename h2 { font-size: 1.0625rem; margin-bottom: 0.25rem; }
.rename p:not(.err) { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; }
.rename-act { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }

/* ---------- pages ---------- */

.page { max-width: 72rem; margin: 0 auto; padding: 2rem var(--gutter) 5rem; }
.page-head { margin-bottom: 1.25rem; }
.page-sub { margin-top: 0.25rem; color: var(--faint); font-size: 0.875rem; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.875rem 1rem; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.notice.bad { background: var(--bad-wash); border-color: oklch(64% 0.17 25 / 0.3); }
.notice.bad p { color: oklch(90% 0.05 25); font-weight: 500; }
.empty { max-width: 36rem; padding: 2.5rem 0 1rem; }
.table .empty { padding: 2.5rem 1.25rem; }
.empty h1, .empty h2 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.empty p { color: var(--muted); }
.empty p + p { margin-top: 0.625rem; }
.empty b { color: var(--text); }
.sk { display: block; height: 0.875rem; width: 60%; border-radius: var(--r-sm); background: var(--panel); }
.sk.title { height: 1.75rem; width: min(26rem, 80%); }
.skeleton .sk, .skeleton .poster, .skeleton .cover, .sk.title { animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: 0.55; } }

/* ---------- Videos ---------- */

.add {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  padding: 0.75rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.add-field { position: relative; flex: 1 1 22rem; }
.field-ico { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; fill: none; stroke: var(--faint); stroke-width: 1.75; stroke-linecap: round; pointer-events: none; }
.add-field input { padding-left: 2.25rem; padding-right: 10rem; background: var(--bg); }
.kind { position: absolute; right: 0.75rem; top: 50%; translate: 0 -50%; font-size: 0.75rem; font-weight: 600; color: var(--muted); pointer-events: none; white-space: nowrap; }
.kind.ok { color: var(--strong); }
.kind.ok::before { content: "✓ "; }
.kind.no { color: var(--bad); }
.add .btn { height: 2.5rem; }
.add-or { color: var(--faint); font-size: 0.8125rem; padding: 0 0.125rem; }
.add-note { margin: 0.5rem 0 1.75rem 0.125rem; color: var(--faint); font-size: 0.8125rem; }
.add-note.bad { color: var(--bad); }
.add-note a { color: var(--text); font-weight: 600; }

/* the list reads as a table: cover, video, length, added, status */
.table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.table.is-empty .thead { display: none; }
.thead, .rows .row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 5.5rem 7.5rem 12.5rem; align-items: center; column-gap: 1rem; }
.thead { padding: 0.5rem 1rem; color: var(--faint); font-size: 0.75rem; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--bg); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows .row { position: relative; padding: 0.625rem 1rem; border-bottom: 1px solid var(--line); transition: background-color 120ms var(--ease-out); }
.table .rows:last-child .row:last-child, #list .rows .row:last-child { border-bottom: 0; }
#uploads:not(:empty) + #list .rows .row:first-child { border-top: 0; }
.rows .row:has(a.row-title):hover { background: var(--panel); }
.cover { display: grid; place-items: center; width: 2.25rem; aspect-ratio: 9 / 16; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-hi); color: var(--faint); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ico { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.row-main { display: grid; gap: 0.125rem; min-width: 0; }
.row-title { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row-title::after { content: ""; position: absolute; inset: 0; }
.row-meta, .cell { color: var(--faint); font-size: 0.8125rem; }
.row-error { color: var(--bad); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.num, .thead .num { text-align: right; }
.cell.status { display: grid; gap: 0.375rem; justify-items: start; }
.state-link { position: relative; z-index: 1; font-weight: 600; font-size: 0.8125rem; color: var(--text); }
.row .btn { position: relative; z-index: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%;
  padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  background: var(--panel-hi); color: var(--muted);
}
.badge::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; flex: none; }
.badge b { font-weight: 700; color: var(--text); }
.badge.done { background: var(--strong-wash); color: var(--strong); }
.badge.working { background: var(--yellow-wash); color: var(--yellow); overflow: hidden; text-overflow: ellipsis; }
.badge.failed { background: var(--bad-wash); color: var(--bad); }
.track { display: block; width: 100%; max-width: 10rem; height: 0.25rem; border-radius: 999px; background: var(--panel-hi); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--yellow); border-radius: inherit; transition: width 600ms var(--ease-out); }
.uploading .track i { background: var(--text); }
.skeleton .row { padding: 0.75rem 1rem; }

/* ---------- one video ---------- */

.crumbs { display: flex; align-items: center; gap: 0.5rem; min-width: 0; margin-bottom: 0.875rem; color: var(--faint); font-size: 0.8125rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhead h1 { max-width: 48rem; font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
.vmeta { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.625rem 0 0; padding: 0; color: var(--faint); font-size: 0.8125rem; }
.vmeta li { display: inline-flex; align-items: center; gap: 0.375rem; }
.live, .video .notice { margin-top: 1.25rem; }
.live { padding: 1rem 1.125rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.live p { color: var(--muted); font-size: 0.875rem; }
.live p b { color: var(--text); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.375rem; margin: 0.875rem 0 0; padding: 0; }
.steps li { padding-top: 0.5rem; border-top: 3px solid var(--panel-hi); color: var(--faint); font-size: 0.75rem; font-weight: 600; }
.steps li.done { border-color: var(--yellow); color: var(--muted); }
.steps li.now { border-image: linear-gradient(90deg, var(--yellow) 40%, var(--panel-hi) 40%) 1; color: var(--text); }
.steps li span { color: var(--yellow); }

.first { margin-top: 1.75rem; }
.first h2 { margin-bottom: 0.625rem; }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0.625rem; }
.pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.875rem;
  padding: 0.625rem 1rem 0.625rem 0.625rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  text-align: left; cursor: pointer; transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}
.pick:hover { border-color: var(--line-strong); background: var(--panel); }
.pick-poster { width: 2.75rem; aspect-ratio: 9 / 16; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-hi); }
.pick-poster img { width: 100%; height: 100%; object-fit: cover; }
.pick-body { display: grid; gap: 0.125rem; min-width: 0; }
.pick-on { color: var(--faint); font-size: 0.75rem; font-weight: 600; }
.pick-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-why { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-score { display: grid; justify-items: end; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.pick-score small { margin-top: 0.25rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0; color: var(--faint); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 1rem; }
.seg { display: inline-flex; padding: 0.1875rem; gap: 0.125rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 0.375rem; height: 1.875rem; padding: 0 0.625rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.seg button span { color: var(--faint); font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--panel-hi); color: var(--text); }
.sort { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--faint); font-size: 0.8125rem; }
.sort select { width: auto; height: 2.25rem; padding: 0 2rem 0 0.75rem; font-size: 0.8125rem; font-weight: 600; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a5ad' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 0.5rem center / 0.875rem no-repeat; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 44vw), 1fr)); gap: 1.25rem 0.75rem; }
.video .grid.skeleton { margin-top: 2rem; }
.grid-empty { grid-column: 1 / -1; padding: 2rem 0; color: var(--faint); }
.clip { display: grid; gap: 0.5rem; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-lg); }
.poster { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; background: var(--panel); box-shadow: 0 0 0 1px var(--line) inset; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; background: oklch(0% 0 0 / 0.35); opacity: 0; transition: opacity 160ms var(--ease-out); }
.play svg { width: 2.75rem; height: 2.75rem; padding: 0.75rem 0.625rem 0.75rem 0.875rem; border-radius: 50%; background: oklch(100% 0 0 / 0.92); fill: var(--on-yellow); }
.clip:hover .play, .clip:focus-visible .play { opacity: 1; }
.clip:focus-visible { outline: none; }
.clip:focus-visible .poster { outline: 2px solid var(--yellow); outline-offset: 2px; }
.len { position: absolute; right: 0.375rem; bottom: 0.375rem; padding: 0.0625rem 0.375rem; border-radius: var(--r-sm); background: oklch(0% 0 0 / 0.72); font-size: 0.6875rem; font-weight: 700; }
.len:empty { display: none; }
.mark { position: absolute; left: 0.375rem; top: 0.375rem; padding: 0.125rem 0.4375rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 800; }
.mark.yes { background: var(--strong); color: var(--on-yellow); }
.mark.no { background: var(--bad); color: var(--on-yellow); }
.clip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 0.875rem; line-height: 1.35; }
.rank { color: var(--faint); margin-right: 0.375rem; font-weight: 500; }
.chips { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 0.25rem; align-items: baseline; padding: 0.0625rem 0.375rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.6875rem; color: var(--faint); }
.chip b { font-weight: 700; }
.chip.strong b, .pick-score.strong, .band.strong { color: var(--strong); }
.chip.good b, .pick-score.good, .band.good { color: var(--good); }
.chip.fair b, .pick-score.fair, .band.fair { color: var(--fair); }
.chip.weak b, .pick-score.weak, .band.weak { color: var(--weak); }
.grid.skeleton .poster { display: block; }

/* ---------- player ---------- */

.player { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.player::backdrop { background: oklch(8% 0.01 275 / 0.88); backdrop-filter: blur(4px); }
.player[open] { display: grid; place-items: center; animation: lift 200ms var(--ease-out); }
@keyframes lift { from { opacity: 0; transform: translateY(6px); } }
.pl {
  display: grid; grid-template-columns: auto minmax(20rem, 25rem);
  max-height: min(92dvh, 56rem); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px oklch(0% 0 0 / 0.6);
}
.pl-video { background: oklch(5% 0 0); display: grid; place-items: center; }
.pl-video video { display: block; height: min(92dvh, 56rem); max-height: 100%; aspect-ratio: 9 / 16; width: auto; background: #000; }
.pl-side { padding: 0.75rem 1.25rem 1.25rem; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 0.875rem; scrollbar-width: thin; }
.pl-top { display: flex; align-items: center; justify-content: space-between; margin-right: -0.5rem; }
.pl-count { color: var(--faint); font-size: 0.8125rem; font-weight: 600; }
.pl-nav { display: flex; }
.pl-side h2 { font-size: 1.1875rem; font-weight: 800; line-height: 1.25; }
.pl-meta { margin-top: -0.5rem; color: var(--faint); font-size: 0.8125rem; }
.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.verdict button {
  height: 2.5rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg);
  font-weight: 700; font-size: 0.875rem; cursor: pointer; transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.verdict button:hover { background: var(--panel); }
.verdict [data-verdict=yes][aria-pressed=true] { background: var(--strong); border-color: var(--strong); color: var(--on-yellow); }
.verdict [data-verdict=no][aria-pressed=true] { background: var(--bad); border-color: var(--bad); color: var(--on-yellow); }
.dl { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dl .btn { flex: 1 1 auto; height: 2.5rem; }
.dl-note { margin-top: -0.25rem; color: var(--faint); font-size: 0.75rem; line-height: 1.45; }
.fit { display: grid; gap: 1rem; padding-top: 0.875rem; border-top: 1px solid var(--line); }
.fit-head { display: flex; align-items: baseline; gap: 0.5rem; font-weight: 700; font-size: 0.875rem; }
.fit-head b { margin-left: auto; font-size: 1.125rem; font-weight: 800; }
.band { font-size: 0.6875rem; font-weight: 700; padding: 0.0625rem 0.4375rem; border-radius: 999px; background: var(--panel-hi); }
.meter { height: 0.25rem; margin: 0.5rem 0 0.625rem; border-radius: 999px; background: var(--panel-hi); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; }
.meter i.strong { background: var(--strong); } .meter i.good { background: var(--good); } .meter i.fair { background: var(--fair); } .meter i.weak { background: var(--weak); }
.plus, .minus { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.minus { margin-top: 0.25rem; }
.plus li, .minus li { position: relative; padding-left: 1.125rem; }
.plus li::before { content: "+"; position: absolute; left: 0.125rem; color: var(--strong); font-weight: 800; }
.minus li::before { content: "−"; position: absolute; left: 0.125rem; color: var(--fair); font-weight: 800; }
.why { padding-top: 0.875rem; border-top: 1px solid var(--line); }
.why h3 { font-size: 0.8125rem; margin-bottom: 0.25rem; color: var(--faint); font-weight: 600; }
.why p { color: var(--muted); font-size: 0.875rem; }

/* ---------- Credits ---------- */

.wallet {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem 2rem;
  max-width: 48rem; padding: 1.25rem 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.wallet-main { display: grid; gap: 0.25rem; }
.wallet .left { color: var(--muted); font-weight: 600; }
.wallet .left b { margin-right: 0.375rem; font-size: 2.5rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: var(--text); vertical-align: -0.1em; }
.wallet.low .left b { color: var(--bad); }
.used { color: var(--faint); font-size: 0.8125rem; }
.wallet-act { display: grid; justify-items: end; gap: 0.375rem; }
.wallet-act span { color: var(--faint); font-size: 0.75rem; max-width: 16rem; text-align: right; }
.wallet-how { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.history { margin-top: 2.25rem; max-width: 48rem; }
.history h2 { margin-bottom: 0.625rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
th { text-align: left; color: var(--faint); font-weight: 600; font-size: 0.75rem; padding: 0.5rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
td { padding: 0.625rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--faint); white-space: nowrap; width: 8.5rem; }
.num { text-align: right; white-space: nowrap; }
td.num { font-weight: 700; }
td.up { color: var(--strong); }
td a { text-decoration-color: var(--line-strong); }
td a:hover { text-decoration-color: currentColor; }

/* ---------- sign in ---------- */

.auth { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 1.5rem; padding: 2rem 1rem; }
.auth .wordmark { color: var(--text); }
.auth-card { width: min(24rem, calc(100vw - 2rem)); padding: 1.75rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 60px oklch(0% 0 0 / 0.35); }
.auth-card h1 { font-size: 1.375rem; margin-bottom: 0.375rem; }
.auth-card .lede { color: var(--muted); font-size: 0.875rem; }
.auth-card .lede b { color: var(--text); overflow-wrap: anywhere; }
.auth-card form { display: grid; gap: 0.375rem; margin-top: 1.25rem; }
.auth-card label { font-weight: 600; font-size: 0.8125rem; margin-top: 0.5rem; color: var(--muted); }
.auth-card label:first-child { margin-top: 0; }
.pw { position: relative; display: block; }
.pw input { padding-right: 4rem; }
.pw-show { position: absolute; right: 0.3125rem; top: 50%; translate: 0 -50%; padding: 0.3125rem 0.5rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.pw-show:hover { color: var(--text); background: var(--panel-hi); }
.btn.google { margin-top: 1.25rem; background: var(--text); border-color: var(--text); color: var(--on-yellow); gap: 0.625rem; font-weight: 700; }
.btn.google:hover { background: oklch(90% 0.004 275); border-color: oklch(90% 0.004 275); }
.btn.google svg { width: 1.0625rem; height: 1.0625rem; }
.or { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0 -0.25rem; color: var(--faint); font-size: 0.75rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-card h1 + .err { margin-top: 0.5rem; }
.forgot { justify-self: end; font-size: 0.8125rem; color: var(--muted); margin-top: 0.125rem; }
.field-hint { color: var(--faint); font-size: 0.75rem; }
.err { min-height: 1.125rem; color: var(--bad); font-size: 0.8125rem; font-weight: 500; margin-top: 0.25rem; }
.err:empty { min-height: 0.5rem; }
.agree { margin-top: 0.875rem; color: var(--faint); font-size: 0.75rem; text-align: center; }
.agree a { color: var(--muted); }
.switch { margin-top: 1.25rem; color: var(--muted); font-size: 0.875rem; text-align: center; }
.auth-foot { color: var(--faint); font-size: 0.8125rem; text-align: center; }
.auth-foot a { color: var(--muted); }

/* ---------- drop, toasts ---------- */

.drop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: oklch(14.5% 0.008 275 / 0.85); pointer-events: none; }
.drop p { padding: 2rem 2.75rem; border: 2px dashed var(--yellow); border-radius: var(--r-lg); font-size: 1.125rem; font-weight: 800; color: var(--yellow); }
.toasts { position: fixed; z-index: 60; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); translate: -50% 0; display: grid; gap: 0.5rem; width: min(28rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { padding: 0.625rem 0.875rem; border-radius: var(--r); background: var(--text); color: var(--on-yellow); font-weight: 600; font-size: 0.875rem; box-shadow: 0 10px 30px oklch(0% 0 0 / 0.4); animation: lift 180ms var(--ease-out); transition: opacity 300ms var(--ease-out); }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; }

/* ---------- smaller screens ---------- */

@media (max-width: 960px) {
  .thead, .rows .row { grid-template-columns: 2.25rem minmax(0, 1fr) 5rem 10.5rem; }
  .thead span:nth-child(4), .rows .row .cell:nth-of-type(2) { display: none; }
}

@media (max-width: 760px) {
  /* logo, organisation, balance and account on top; the tabs get a row of their own below */
  .bar { flex-wrap: wrap; height: auto; gap: 0 0.5rem; padding-top: 0.5rem; }
  .bar .wordmark span { display: none; }
  .org { flex: 1 1 0; margin-right: 0; }
  .org-btn { max-width: 100%; }
  .balance { margin: 0; }
  .tabs { order: 5; flex-basis: 100%; height: 2.5rem; margin-left: -0.75rem; }
  .page { padding-top: 1.5rem; }
  .add { padding: 0.625rem; }
  .add .btn { flex: 1 1 auto; }
  .add-or { display: none; }
  .add-field { flex-basis: 100%; }
  .add-field input { padding-right: 0.75rem; }
  .kind { position: static; display: block; translate: none; margin-top: 0.375rem; }
  .kind:empty { display: none; }
  .thead { display: none; }
  .rows .row { grid-template-columns: 2.25rem minmax(0, 1fr); row-gap: 0.375rem; }
  .rows .row .cell:not(.status) { display: none; }
  .rows .row .cell.status { grid-column: 2; }
  .row-title { white-space: normal; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 0.75rem; }
  .toolbar { gap: 0.625rem; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { flex: 1 0 auto; }
  .wallet { grid-template-columns: 1fr; }
  .wallet-act { justify-items: start; }
  .wallet-act span { text-align: left; }
  .player[open] { place-items: stretch; }
  .pl { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; overflow-y: auto; }
  .pl-video video { height: auto; width: 100%; max-height: 62dvh; }
  .pl-side { overflow: visible; }
  .pl-top { position: sticky; top: 0; z-index: 1; background: var(--surface); margin: -0.75rem -1.25rem 0; padding: 0.375rem 0.75rem 0.375rem 1.25rem; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .pl { grid-template-columns: auto minmax(18rem, 22rem); }
  .pl-video video { height: min(88dvh, 52rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
