/* The upload flow. Palette "Tabloid" (picked 22 Nov, replaced Acid): near-white page, near-black ink,
   yellow and red used only as fills with black text and a black outline.
   Shapes and type from JustFuckingPick: Barlow Condensed 900 display, DM Sans body,
   61px buttons, 11px radius, 11px pill progress bar. Stands alone (no site.css). */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 900; font-display: swap; src: url(fonts/barlow-condensed-900.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 900; font-display: swap; src: url(fonts/barlow-condensed-900-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(fonts/dm-sans-var.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(fonts/dm-sans-var-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #FBFAF5;        /* page */
  --card: #FFFEFA;      /* inputs, unpicked options */
  --alt: #EDEBE3;       /* progress track, disabled */
  --ink: #0B0B0B;       /* all text, outlines */
  --muted: #55554F;     /* secondary text (6.6:1 on the page) */
  --line: #DFDDD4;      /* dividers */
  --edge: #7A7870;      /* borders of things you can tap (3.8:1) */
  --main: #FFE14D;      /* main: yellow. Buttons, progress, picked options */
  --main-hi: #FFEA80;
  --hot: #FF3B30;    /* second: red. Stickers, off limits, errors */
  --hot-tint: #FFE2DF;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --r: 11px;
  --pad: clamp(20px, 5vw, 35px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
body.flow { min-height: 100svh; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1 { margin: 0; font: 900 clamp(54px, 14.3vw, 96px)/.85 var(--display); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
.step h1:focus, .step .big-num:focus { outline: none; }

/* top bar: back, progress, count */
.bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) var(--pad) 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.back { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); font: 700 22px/1 var(--body); }
.back:active { background: var(--main); }
.back[disabled] { visibility: hidden; }
.progress, .meter { height: 11px; border: 1px solid var(--ink); border-radius: 999px; background: var(--alt); overflow: hidden; }
.progress span, .meter span { display: block; height: 100%; width: 0; background: var(--main); border-right: 1px solid var(--ink); transition: width .3s ease; }
.count { margin: 0; font: 900 18px/1 var(--display); letter-spacing: .04em; white-space: nowrap; }

.steps-wrap { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 28px var(--pad) 32px; }
.step { display: flex; flex-direction: column; gap: 18px; }
.step[hidden] { display: none; }

/* the JFP sticker, used for Ken's credit lines */
.credit { align-self: flex-start; margin: 0 0 -4px; display: inline-block; padding: 7px 11px 5px; border: 2px solid var(--ink); border-radius: 6px; background: var(--hot); font: 900 14px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; transform: rotate(-2.5deg); transform-origin: left center; }
.credit:empty { display: none; }
.ken { margin: 0; font-size: 18px; line-height: 1.45; max-width: 32em; }
.label { display: block; margin: 0 0 10px; padding: 0; font: 800 12px/1.4 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.note { margin: 0; font-size: 15px; color: var(--muted); min-height: 1.4em; }
.fine { margin: 0; font-size: 14px; color: var(--muted); }
.error { margin: 0; padding: 13px 15px; border: 2px solid var(--ink); border-radius: 10px; background: var(--hot); font: 700 16px/1.4 var(--body); }
.error[hidden] { display: none; }
.linkish { background: none; border: 0; padding: 0; font: 600 15px/1.4 var(--body); text-decoration: underline; text-underline-offset: 5px; }

/* buttons */
.btn { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 61px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--main); color: var(--ink); font: 900 24px/1.1 var(--display); letter-spacing: .045em; text-transform: uppercase; text-align: center; text-decoration: none; transition: transform .12s ease, background .12s ease; }
.btn:hover:not(:disabled) { background: var(--main-hi); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.ghost { background: var(--card); }
.btn.ghost:hover:not(:disabled) { background: var(--alt); }
.btn:disabled { background: var(--alt); border-color: #B9B9B1; color: #8A8A82; cursor: not-allowed; }
.actions { position: sticky; bottom: 0; z-index: 4; margin-top: 6px; padding: 14px 0 max(16px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(251,250,245,0) 0%, var(--bg) 26%); }
.actions.stack { position: static; display: flex; flex-direction: column; gap: 10px; background: none; }

/* custom radios and ticks (real inputs, restyled) */
.pill input, .card input, .me input, .tick input { appearance: none; -webkit-appearance: none; flex: none; margin: 0; background: var(--card); border: 2px solid var(--ink); cursor: pointer; }
.pill input, .card input, .me input { width: 22px; height: 22px; border-radius: 50%; }
.pill input:checked, .card input:checked, .me input:checked { background: radial-gradient(circle, var(--ink) 0 42%, var(--card) 46%); }
.tick input { width: 26px; height: 26px; border-radius: 6px; }
.tick input:checked { background: var(--main) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%230B0B0B' stroke-width='3.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* step 1: export */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tabs button { min-height: 52px; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--card); font: 900 20px/1 var(--display); letter-spacing: .045em; text-transform: uppercase; }
.tabs button[aria-selected="true"] { background: var(--main); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.howto { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.howto[hidden] { display: none; }
.howto li { counter-increment: n; position: relative; min-height: 58px; padding: 15px 0 15px 46px; border-top: 1px solid var(--line); font-size: 17px; }
.howto li:last-child { border-bottom: 1px solid var(--line); }
.howto li::before { content: counter(n); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--main); font: 900 17px/1 var(--display); }
.clip { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 16px; border: 2px dashed var(--edge); border-radius: 14px; background: var(--card); color: var(--muted); font-size: 15px; text-align: center; }

/* step 2: upload */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; padding: 24px; border: 2px dashed var(--ink); border-radius: 16px; background: var(--card); text-align: center; cursor: pointer; }
.drop:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-main { font: 900 42px/.9 var(--display); text-transform: uppercase; }
.drop-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.drop.loaded { border-style: solid; background: var(--main); }
.drop.loaded .drop-sub { color: var(--ink); }
.result { border-top: 1px solid var(--line); padding-top: 18px; }
.big-num { margin: 0; font: 900 clamp(84px, 23vw, 136px)/.85 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.facts { margin: 8px 0 12px; font-size: 17px; color: var(--muted); }

/* steps 3 and 4: people and places */
.field { display: block; }
.field input, .person input[type="text"], select { width: 100%; min-height: 53px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--card); font: 500 16px/1.3 var(--body); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' stroke='%230B0B0B' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field input:focus, .person input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--hot); }
.field input::placeholder, .person input::placeholder { color: #8A8A82; opacity: 1; }
.people { list-style: none; margin: 0; padding: 0; }
.person { display: grid; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.person:last-child { border-bottom: 1px solid var(--line); }
.person .pname { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.person .pname b { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; }
.person .row2 { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.me { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.person.merged { opacity: .55; }
.person.merged .row, .person.merged .row2 { display: none; }
.person .undo { justify-self: start; }
.person.flag input[type="text"] { border-color: var(--ink); background: var(--hot-tint); box-shadow: inset 0 0 0 1px var(--ink); }
.zones .person { grid-template-columns: 1fr 1.25fr; align-items: center; }
.zones .person .pname { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.phone-zone { margin: 0; font-size: 16px; }
.phone-zone select { min-height: 44px; padding-top: 8px; padding-bottom: 8px; margin: 8px 0 0 !important; }

/* choices: pills and cards */
.choice, .heat { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.choice .label { grid-column: 1 / -1; float: left; width: 100%; }
.pill { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--card); font: 900 20px/1 var(--display); letter-spacing: .045em; text-transform: uppercase; cursor: pointer; }
.pill:has(input:checked) { background: var(--main); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pill:has(input:focus-visible), .card:has(input:focus-visible), .tick:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.pill input:focus-visible, .card input:focus-visible, .tick input:focus-visible, .me input:focus-visible { outline: none; }
.tick { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 16px; font-weight: 600; cursor: pointer; }
.tick span { padding-top: 2px; }
.heat { display: grid; gap: 10px; }
.heat .label { float: left; width: 100%; }
.card { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; row-gap: 4px; align-items: center; min-height: 76px; padding: 15px 16px; border: 1px solid var(--edge); border-radius: 12px; background: var(--card); cursor: pointer; }
.card input { grid-row: 1 / span 2; }
.card .t { font: 900 30px/.95 var(--display); text-transform: uppercase; }
.card .d { color: var(--muted); font-size: 14px; line-height: 1.4; }
.card:has(input:checked) { background: var(--main); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card:has(input:checked) .d { color: var(--ink); }
.card:has(input:disabled) { background: var(--alt); border-color: var(--line); cursor: not-allowed; }
.card:has(input:disabled) .t, .card:has(input:disabled) .d { color: #8A8A82; }
.card input:disabled { border-color: #B9B9B1; background: var(--alt); }

/* step 5: off limits (orange = protected) */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.chips button { min-height: 52px; padding: 10px 16px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--card); font: 700 16px/1.2 var(--body); text-align: left; transition: transform .1s ease; }
.chips button:active:not(:disabled) { transform: scale(.97); }
.chips button[aria-pressed="true"] { background: var(--hot); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 800; }
.chips button[aria-pressed="true"]::before { content: "\2713"; margin-right: 7px; font-weight: 900; }
.chips button[aria-pressed="true"]::after { content: " \00B7  off limits"; font-weight: 500; }
.chips button[disabled] { background: var(--alt); border-color: var(--line); color: #77776F; cursor: not-allowed; }
.chips button small { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* scan */
.scan { min-height: 60svh; justify-content: center; }

/* nominees (stub) */
.nominees .cast-names { margin: 6px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.nominees .cast-names span { display: inline-block; padding: .1em .22em .02em; border: 2px solid var(--ink); border-radius: 10px; background: var(--main); font: 900 clamp(60px, 17vw, 104px)/.9 var(--display); text-transform: uppercase; transform: rotate(-1.5deg); }
.nominees .cast-names span:nth-child(2) { transform: rotate(1deg); }
.cleared { margin: 0; color: var(--muted); }
.debug { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; }
.debug pre { white-space: pre-wrap; word-break: break-word; }

@media (min-width: 761px) {
  .steps-wrap { padding-top: 56px; }
  .actions { position: static; background: none; }
}
@media (max-width: 360px) {
  .choice { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
