/* NHP Review design system. Colour tokens are the dossier page's own (agenttime/review/dossier.html), so the site and
   the dossier read as one product in both themes. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f4ef, #111316);
  --surface: light-dark(#ffffff, #1a1d22);
  --raised: light-dark(#ffffff, #20242a);
  --sunk: light-dark(#eeebe3, #16191d);
  --line: light-dark(#dcd7cb, #2d3139);
  --line-soft: light-dark(#e8e4da, #24282f);
  --text: light-dark(#1c1b19, #ebe9e4);
  --muted: light-dark(#5b5850, #a8acb4);
  --faint: light-dark(#86827a, #7c818b);
  --accent: light-dark(#3346c0, #97a7ff);
  --accent-strong: light-dark(#2535a0, #b6c1ff);
  --accent-soft: light-dark(#e5e8fa, #222947);
  --on-accent: light-dark(#ffffff, #0d1020);
  --must: light-dark(#b42318, #ff7d73);
  --should: light-dark(#9a5300, #f2b551);
  --nice: light-dark(#3c7418, #9bd56b);
  --praise: light-dark(#ad2c6b, #ff8dc5);
  --ok: light-dark(#167a3c, #6fd896);

  --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale, ratio 1.25. */
  --step--2: .72rem;
  --step--1: .84rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
  --step-4: clamp(2rem, 1.3rem + 2.8vw, 3.1rem);

  /* Spacing scale. */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px;
  --shadow-1: 0 1px 2px light-dark(rgb(28 27 25 / .06), rgb(0 0 0 / .4)), 0 1px 1px light-dark(rgb(28 27 25 / .04), rgb(0 0 0 / .3));
  --shadow-2: 0 10px 30px -12px light-dark(rgb(28 27 25 / .22), rgb(0 0 0 / .7)), 0 2px 6px light-dark(rgb(28 27 25 / .06), rgb(0 0 0 / .4));
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar: 3.75rem;
  --page: 76rem;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 1rem); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: var(--step-0)/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
code { font: .86em var(--mono); padding: .05em .35em; border-radius: var(--r-sm); background: var(--sunk); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.icon { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: var(--s4); top: var(--s3); z-index: 80; background: var(--surface); padding: var(--s2) var(--s4); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.display { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; line-height: 1.12; }
.eyebrow { display: block; margin: 0; font-size: var(--step--2); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }
.lede { margin: 0; color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 44rem; }
.quiet { margin: 0; color: var(--muted); font-size: var(--step--1); }
.meta { margin: 0; color: var(--muted); font-size: var(--step--1); display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; }

/* Logo. */
.logo { width: 1.9rem; height: 1.9rem; flex: none; }
.logo-bg { fill: var(--accent); }
.logo-play { fill: var(--on-accent); }
.logo-dot { fill: light-dark(#f2b551, #f2b551); }

/* Buttons. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.4rem; padding: .45rem .95rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--step--1); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s var(--ease), box-shadow .15s; }
.btn:hover { border-color: var(--faint); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: var(--shadow-1); }
.btn.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--sunk); color: var(--text); }
.btn.lg { min-height: 3rem; padding: .7rem 1.35rem; font-size: var(--step-0); border-radius: var(--r-lg); }
.btn.block { width: 100%; }
.btn .icon { width: 1rem; height: 1rem; }
.icon-btn { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--text); }
.icon-btn .icon { width: 1.2rem; height: 1.2rem; }

/* App bar. */
.appbar { position: sticky; top: 0; z-index: 40; height: var(--bar); display: flex; align-items: center; gap: var(--s4); padding: 0 clamp(var(--s4), 3vw, var(--s6)); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-tag { font-size: var(--step--2); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: .22rem .5rem; border-radius: 99px; }
.crumbs { flex: 1; min-width: 0; }
.crumbs ol { display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); white-space: nowrap; overflow: hidden; }
.crumbs li { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.crumbs li::before { content: "/"; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.appbar-end { display: flex; align-items: center; gap: var(--s2); flex: none; }
.theme-icon { display: none; }
:root:not([data-theme]) .theme-icon[data-for="auto"], :root[data-theme="light"] .theme-icon[data-for="light"], :root[data-theme="dark"] .theme-icon[data-for="dark"] { display: contents; }
.me { display: flex; align-items: center; gap: .55rem; padding: 0 var(--s2); }
.me-text { display: flex; flex-direction: column; line-height: 1.15; }
.me-text b { font-size: var(--step--1); }
.me-text small { font-size: var(--step--2); color: var(--muted); }
.signout { margin: 0; }

/* Avatars. */
.avatar { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: #fff; flex: none; box-shadow: 0 0 0 2px var(--bg); }
.avatar.sm { width: 1.55rem; height: 1.55rem; font-size: .62rem; }
.tone-0 { background: #3346c0; } .tone-1 { background: #0b6e60; } .tone-2 { background: #9a5300; }
.tone-3 { background: #6c34c9; } .tone-4 { background: #ad2c6b; } .tone-5 { background: #1d5bbd; }
.stack { display: inline-flex; }
.stack .avatar + .avatar { margin-left: -.4rem; }

/* Page. */
.wrap { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: var(--s6) clamp(var(--s4), 3vw, var(--s6)) var(--s8); }
.hero, .page-head { padding: var(--s5) 0 var(--s6); display: grid; gap: var(--s3); }
.hero h1, .page-head h1 { margin: 0; font-size: var(--step-4); }
.hero.empty { padding-top: var(--s8); }
.block { margin-top: var(--s6); }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.block-head h2 { margin: 0; font-size: var(--step-2); font-weight: 680; letter-spacing: -.01em; }
.block-head h2 a { color: inherit; text-decoration: none; }
.block-head h2 a:hover { color: var(--accent); }
.block-head p { margin: 0; color: var(--muted); font-size: var(--step--1); }

/* Thumbnails. */
.thumb, .cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--sunk), var(--line)); border-radius: var(--r-md); }
.thumb img, .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.thumb-icon { position: absolute; inset: 0; margin: auto; width: 2.5rem; height: 2.5rem; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 1.5; }
.runtime { position: absolute; right: .5rem; bottom: .5rem; padding: .15rem .45rem; border-radius: var(--r-sm); background: rgb(10 11 14 / .78); color: #fff; font: 600 .74rem/1.3 var(--mono); letter-spacing: .02em; backdrop-filter: blur(4px); }

/* Status pills and chips. */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .65rem; border-radius: 99px; font-size: var(--step--2); font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.status-waiting { color: var(--muted); background: var(--sunk); }
.status-active { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.status-must { color: var(--must); background: color-mix(in srgb, var(--must) 12%, transparent); }
.count { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .22rem .65rem .22rem .25rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: var(--step--1); }
.chip .avatar { box-shadow: none; }
.chip-name { font-weight: 600; }
.chip-count { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sev { min-width: 1.3rem; padding: 0 .35rem; border-radius: 99px; font-size: .7rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.sev-must-fix { color: var(--must); background: color-mix(in srgb, var(--must) 14%, transparent); }
.sev-should-fix { color: var(--should); background: color-mix(in srgb, var(--should) 14%, transparent); }
.sev-nice-to-have { color: var(--nice); background: color-mix(in srgb, var(--nice) 14%, transparent); }

/* Cut cards. */
.cut-grid, .show-grid, .cut-list, .review-list, .frames, .ep-links { margin: 0; padding: 0; list-style: none; }
.cut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s5); }
.cut-card { display: flex; flex-direction: column; gap: var(--s3); height: 100%; padding: var(--s2) var(--s2) var(--s4); border-radius: var(--r-lg); color: var(--text); text-decoration: none; transition: background-color .2s; }
.cut-card:hover { color: var(--text); background: var(--surface); box-shadow: var(--shadow-2); }
.cut-card:hover img, .show-cover:hover img, .cut-row:hover img, .cut-poster:hover img { transform: scale(1.035); }
.cut-card-body { display: grid; gap: .3rem; padding: 0 var(--s2); }
.cut-card-title { font: 600 var(--step-1)/1.25 var(--serif); }

/* Show cards. */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: var(--s5); }
.show-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.show-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.show-cover { position: relative; display: block; color: #fff; text-decoration: none; }
.show-cover .cover { border-radius: 0; }
.show-cover .runtime { display: none; }
.show-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 9 12 / 0) 35%, rgb(8 9 12 / .82)); pointer-events: none; }
.show-cover-text { position: absolute; z-index: 1; left: var(--s5); right: var(--s5); bottom: var(--s4); display: grid; gap: .2rem; }
.show-cover-text .eyebrow { color: rgb(255 255 255 / .78); }
.show-title { font-size: var(--step-3); }
.show-cover:hover { color: #fff; }
.show-body { display: grid; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); }
.show-stats { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2); color: var(--muted); font-size: var(--step--1); }
.ep-links { border-top: 1px solid var(--line-soft); }
.ep-links a { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "t c v" "m c v"; align-items: center; column-gap: var(--s4); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line-soft); color: var(--text); text-decoration: none; border-radius: var(--r-sm); }
.ep-links li:last-child a { border-bottom: 0; }
.ep-links a:hover { background: var(--sunk); }
.ep-title { grid-area: t; font-weight: 650; }
.ep-meta { grid-area: m; color: var(--muted); font-size: var(--step--1); }
.ep-links .count { grid-area: c; }
.ep-links .chev { grid-area: v; color: var(--faint); }

/* Episode cut list. */
.cut-list { display: grid; gap: var(--s4); }
.cut-row { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr auto; align-items: center; gap: var(--s5); padding: var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1); transition: box-shadow .25s var(--ease); }
.cut-row:hover { box-shadow: var(--shadow-2); }
.cut-row-thumb .thumb { border-radius: var(--r-lg); }
.cut-row-main { display: grid; gap: var(--s2); min-width: 0; }
.cut-row-title { margin: 0; font: 600 var(--step-2)/1.2 var(--serif); }
.cut-row-title a { color: var(--text); text-decoration: none; }
.cut-row-title a:hover { color: var(--accent); }
.cut-row-side { display: grid; justify-items: end; gap: var(--s3); padding-right: var(--s3); }

/* Cut page. */
.cut-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(19rem, 1fr); gap: clamp(var(--s5), 4vw, var(--s7)); align-items: start; padding-top: var(--s4); }
.cut-poster { position: relative; display: block; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-2); }
.cut-poster .cover { border-radius: 0; }
.play-badge { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: rgb(255 255 255 / .92); color: #111; box-shadow: 0 10px 30px rgb(0 0 0 / .35); transition: transform .25s var(--ease); }
.play-badge .icon { width: 1.8rem; height: 1.8rem; margin-left: .2rem; }
.cut-poster:hover .play-badge { transform: scale(1.08); }
.cut-info { display: grid; gap: var(--s4); justify-items: start; }
.cut-info h1 { margin: 0; font-size: var(--step-4); }
.cut-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s5); width: 100%; margin: var(--s2) 0 0; border-top: 1px solid var(--line); }
.facts div { padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { font-size: var(--step--2); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .15rem 0 0; font-variant-numeric: tabular-nums; }
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--s3); }
.frames figure { margin: 0; position: relative; }
.frames img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; border-radius: var(--r-md); }
.frames figcaption { position: absolute; left: .45rem; bottom: .45rem; padding: .1rem .4rem; border-radius: var(--r-sm); background: rgb(10 11 14 / .75); color: #fff; font: 600 .72rem var(--mono); }
.review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--s4); }
.review-card { display: grid; gap: var(--s3); align-content: start; padding: var(--s5); border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-1); }
.review-who { display: flex; align-items: center; gap: var(--s3); }
.review-who > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.2; }
.review-who small { color: var(--muted); font-size: var(--step--1); }
.review-detail { display: grid; gap: var(--s2); }
.review-count { display: flex; align-items: center; gap: .4rem; margin: 0; }
.review-count b { font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.sev-list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
.sev-row { display: inline-flex; align-items: center; gap: .35rem; }
.sev-dot { width: .55rem; height: .55rem; border-radius: 50%; }
.sev-row.sev-must-fix .sev-dot { background: var(--must); }
.sev-row.sev-should-fix .sev-dot { background: var(--should); }
.sev-row.sev-nice-to-have .sev-dot { background: var(--nice); }
.sev-row.sev-must-fix, .sev-row.sev-should-fix, .sev-row.sev-nice-to-have { background: none; }

/* Footer. */
.sitefoot { padding: var(--s5) clamp(var(--s4), 3vw, var(--s6)); border-top: 1px solid var(--line-soft); color: var(--faint); font-size: var(--step--2); }
.sitefoot span { display: flex; align-items: center; gap: .5rem; max-width: var(--page); margin: 0 auto; }
.sitefoot .logo, .login-foot .logo { width: 1.1rem; height: 1.1rem; opacity: .7; }

/* Login. */
.login-body { background:
  radial-gradient(60rem 40rem at 12% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
  radial-gradient(50rem 36rem at 105% 110%, color-mix(in srgb, #f2b551 20%, transparent), transparent 60%),
  var(--bg); }
.login { flex: 1; display: grid; place-content: center; justify-items: center; gap: var(--s5); padding: var(--s6) var(--s4); }
.login-card { width: min(26rem, calc(100vw - 2rem)); display: grid; gap: var(--s4); padding: clamp(var(--s5), 5vw, var(--s6)); border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.login-card h1 { margin: var(--s3) 0 0; font-size: var(--step-3); }
.login-card .lede { font-size: var(--step-0); }
.login-brand { display: flex; align-items: center; gap: .7rem; }
.login-brand .logo { width: 2.6rem; height: 2.6rem; }
.login-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand small { font-size: var(--step--2); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.login-foot { display: flex; align-items: center; gap: .45rem; margin: 0; color: var(--muted); font-size: var(--step--1); }
.form { display: grid; gap: var(--s4); margin-top: var(--s2); }
.field { display: grid; gap: .35rem; font-size: var(--step--1); font-weight: 650; }
.field input { width: 100%; min-height: 2.9rem; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); font-size: var(--step-0); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.field input:hover { border-color: var(--faint); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pw { position: relative; display: block; }
.pw input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.alert { margin: 0; padding: .7rem .9rem; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: var(--step--1); }
.alert-error { background: color-mix(in srgb, var(--must) 12%, transparent); color: var(--must); font-weight: 600; }

/* Tablet and phone. */
@media (max-width: 960px) {
  .cut-hero { grid-template-columns: 1fr; }
  .cut-row { grid-template-columns: minmax(9rem, 14rem) 1fr; }
  .cut-row-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; padding: 0 var(--s2) var(--s1); }
  .me-text { display: none; }
}
@media (max-width: 640px) {
  .brand-name, .crumbs { display: none; }
  .appbar { justify-content: space-between; }
  .cut-row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
