/* The client portal's only stylesheet. Colours and shapes follow the prototype the
   owner approved. System fonts: no font is fetched from a third party (the CSP
   allows nothing but this origin). */

:root {
  --ink: #1f1d24; --ink-2: #3a3642; --muted: #6e6977; --line: #e8e3da; --paper: #faf8f3; --white: #ffffff;
  --lilac: #eeebf3; --gold: #e8a33d; --gold-2: #f0b254; --amber: #9a5b0e; --amber-ink: #7a4708; --cream: #fbefd9;
  --soft: #c9c4d2;
  --display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; }
body.dark { background: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--amber); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h-20 { font-size: 20px; } .h-22 { font-size: 22px; } .h-24 { font-size: 24px; } .h-28 { font-size: 28px; }
.h-32 { font-size: 32px; } .h-34 { font-size: 34px; } .h-36 { font-size: 36px; }
.muted { color: var(--muted); } .soft { color: var(--soft); } .ink-soft { color: var(--ink-2); font-size: 15px; }
.small-text { font-size: 14px; } .strong { font-weight: 800; } .center { text-align: center; } .narrow { max-width: 420px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.eyebrow.gold { color: var(--gold); }
.stack-2, .stack-6, .stack-8, .stack-10, .stack-12, .stack-14, .stack-16, .stack-22, .stack-24, .stack-28 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; }
.stack-14 { gap: 14px; } .stack-16 { gap: 16px; } .stack-22 { gap: 22px; } .stack-24 { gap: 24px; } .stack-28 { gap: 28px; }
.self-start { align-self: flex-start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 0; background: var(--gold); color: var(--ink); font: inherit; font-weight: 800; font-size: 16px;
  line-height: 1.1; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--gold-2); color: var(--ink); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn.small { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.ghostlight { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }
.btn.ghostlight:hover { background: var(--paper); color: var(--ink); }
.btn.got { background: var(--lilac); color: var(--ink-2); box-shadow: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lilac); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.iconbtn:hover { background: var(--line); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; }
.pad { padding: 22px; } .pad-16 { padding: 16px; }
.field { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--muted); border-radius: 12px; font: inherit;
  background: var(--white); color: var(--ink); }
.label { font-weight: 800; font-size: 15px; }
.alert { background: var(--cream); color: var(--amber-ink); border-radius: 12px; padding: 12px 14px; font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 14px;
  font-weight: 800; white-space: nowrap; }
.chip.run { background: var(--lilac); color: var(--ink-2); }
.chip.ready { background: var(--ink); color: var(--paper); }
.chip.slow { background: var(--cream); color: var(--amber-ink); }
.chip.gone { background: var(--white); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--soft); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.later { display: inline-flex; align-self: flex-start; padding: 3px 10px; border-radius: 999px; border: 1.5px dashed var(--ink);
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* Sign-in and other pages before the portal */
.login { min-height: 100vh; padding: 56px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 28px;
  color: var(--paper); }
.login-card { width: 100%; max-width: 420px; padding: 24px; color: var(--ink); }

/* Header */
.top { background: var(--ink); color: var(--paper); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px 16px; }
.logo-link { display: flex; align-items: center; min-height: 48px; padding: 4px 0; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-right form { margin: 0; }
.who { font-size: 14px; color: var(--soft); text-align: right; line-height: 1.3; }
.who a { color: var(--gold); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.title-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; color: var(--amber);
  font-weight: 800; font-size: 16px; text-decoration: none; }

/* My episodes */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; width: 100%; padding: 16px 18px; background: var(--white);
  border: 1px solid var(--line); border-radius: 20px; color: var(--ink); text-decoration: none; }
.row:hover { border-color: var(--ink); color: var(--ink); }
.row-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.row-meta { font-size: 15px; }
.row-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }

/* One episode */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.split-main { flex: 999 1 460px; min-width: 0; }
.split-side { flex: 1 1 280px; }
.timeline { flex: 1 1 280px; padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: flex; gap: 14px; }
.step-rail { flex: 0 0 26px; display: flex; flex-direction: column; align-items: center; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 2px solid var(--soft); color: var(--paper); }
.line { flex: 1; width: 2px; min-height: 20px; background: var(--line); }
.step-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-bottom: 18px; }
.step-label { font-weight: 600; color: var(--muted); }
.step-desc { font-size: 15px; color: var(--ink-2); }
.step.done .dot { background: var(--ink); border-color: var(--ink); }
.step.done .line { background: var(--ink); }
.step.done .step-label { color: var(--ink); }
.step.current .dot { background: var(--gold); border-color: var(--gold); animation: pulse 1.6s ease-out infinite; }
.step.current .step-label, .step.stuck .step-label { color: var(--ink); font-weight: 800; }
.step.stuck .dot { background: var(--cream); border-color: var(--amber); color: var(--amber-ink); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(232, 163, 61, 0); } }
@media (prefers-reduced-motion: reduce) { .step.current .dot { animation: none; } }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { flex: 0 0 20px; margin-top: 3px; color: var(--amber); }
.slowbox { padding: 22px; border-radius: 20px; background: var(--cream); border: 1px solid var(--gold); }
.darkbox { padding: 22px; border-radius: 20px; background: var(--ink); color: var(--paper); align-items: flex-start; }

.clips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 10px; }
.clip { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.thumb { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; aspect-ratio: 9 / 16;
  border-radius: 14px; background: var(--ink); color: var(--paper); padding: 12px 10px 10px; overflow: hidden; text-decoration: none; }
.thumb.alt { background: var(--ink-2); }
.thumb:hover { box-shadow: 0 0 0 3px var(--gold); color: var(--paper); }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-hook, .play, .thumb-foot { position: relative; }
.thumb-img + .thumb-hook { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.thumb-hook { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.15; overflow-wrap: anywhere; }
.play { align-self: center; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center; }
.thumb-foot { display: flex; justify-content: flex-end; min-height: 18px; }
.dur { background: var(--gold); color: var(--ink); border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 800; }
.clip-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.clip-title { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.file-icon { flex: 0 0 34px; height: 48px; border-radius: 8px; background: var(--lilac); color: var(--ink-2); display: flex;
  align-items: center; justify-content: center; }
.file-text { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; }
.file-what { font-weight: 700; }
.next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.next li { display: flex; gap: 12px; align-items: flex-start; }
.num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--ink); display: flex; align-items: center;
  justify-content: center; font-family: var(--display); font-weight: 600; }

/* The report, in its sandboxed frame */
.report { width: 100%; height: 75vh; min-height: 480px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }

/* The clip preview */
.sheet { width: calc(100% - 20px); max-width: 400px; max-height: calc(100% - 20px); border: 0; border-radius: 24px; padding: 12px 14px 14px;
  background: var(--paper); color: var(--ink); }
.sheet[open] { display: flex; flex-direction: column; gap: 10px; }
.sheet::backdrop { background: rgba(31, 29, 36, 0.84); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-video { align-self: center; width: auto; height: 50vh; min-height: 250px; max-height: 520px; max-width: 100%; aspect-ratio: 9 / 16;
  border-radius: 16px; background: var(--ink); }
.sheet-nav { display: flex; justify-content: space-between; gap: 8px; }

@media (max-width: 480px) {
  .h-36 { font-size: 30px; } .h-32 { font-size: 27px; }
  .title-bar .btn { width: 100%; }
}

.posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.posts > li { padding-top: 16px; border-top: 1px solid var(--line); }
.post-title { margin: 0; font-size: 17px; font-weight: 800; }
.post { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; padding: 12px 14px; border-radius: 14px; background: var(--paper); }
.post-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.post-text p { margin: 0; overflow-wrap: anywhere; }
.post-net { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* Staff: the second step of a sign-in */
.code-field { font-size: 24px; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: block; width: 100%; max-width: 220px; height: auto; margin: 4px 0; border-radius: 8px; }
.secret { display: block; padding: 12px 14px; border-radius: 12px; background: var(--lilac); color: var(--ink);
  font: 700 18px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.06em; overflow-wrap: anywhere;
  user-select: all; }
.uri { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper); color: var(--ink-2);
  font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
details summary { cursor: pointer; color: var(--amber); font-weight: 700; }

/* Staff: the review window */
.reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.review { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 20px; scroll-margin-top: 16px; }
.review-thumb { flex: 0 0 150px; width: 150px; }
.review-body { flex: 1 1 300px; min-width: 0; }
.review-note { padding: 10px 12px; border-radius: 12px; background: var(--cream); color: var(--amber-ink); border-left: 4px solid var(--gold);
  white-space: pre-line; overflow-wrap: anywhere; }
.note-field { min-height: 72px; resize: vertical; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) {
  .review-thumb { flex-basis: 100%; width: 100%; max-width: 220px; }
}
