/* playhustletown.com: the game's UI v2 tokens (game/src/ui/tokens.ts, tools/ui2/HANDOFF.md), mobile first. */
:root {
  --paper: #F5F0E6;
  --sunk: #EDE7DB;
  --card: #FFFDF9;
  --line: #E6DED0;
  --line2: #CFC6B6;
  --ink: #1D1B24;
  --ink2: #433E48;
  --ink3: #6A645C;
  --go: #2E7D46;
  --go-lip: #1E5A31;
  --go-tint: #E3F2E6;
  --stop-tint: #F9E3DF;
  --stop-text: #963A2F;
  --info: #3668A1;
  --mustard: #F5C541;
  --mustard-lip: #D9A520;
  --mustard-tint: #FDF0C8;
  --eyebrow: #C0432C;
  --teal: #2C7C79;
  --gold: #EDBE4E;
  --gold-lip: #B88A22;
  --night: #24222B;
  --night-ink: #F6F1E8;
  --sky: #4FA3E3;
  --shadow-card: 0 1px 2px rgba(29,27,36,0.05), 0 6px 18px rgba(29,27,36,0.07);
  --shadow-float: 0 2px 6px rgba(29,27,36,0.10), 0 10px 26px rgba(29,27,36,0.14);
  --display: 'Archivo', 'Arial Black', sans-serif;
  --body: 'Figtree', 'Helvetica Neue', sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 17px/1.5 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--info); text-underline-offset: 2px; }
a:hover { color: #244B78; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.3px; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
.eyebrow { font: 800 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.8px; color: var(--eyebrow); margin: 0 0 8px; }
.lead { font-size: 19px; line-height: 1.45; color: var(--ink2); }
.small { font-size: 14px; line-height: 1.4; color: var(--ink3); }

/* Buttons: one primary per page (go = proceed), cream secondary, 44 pt targets, 12 pt apart */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 26px; border: 0; border-radius: 18px;
  font: 900 18px/1 var(--display); text-transform: uppercase; letter-spacing: 0.3px; text-decoration: none;
  cursor: pointer; transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn-go { background: var(--go); color: #fff; box-shadow: 0 4px 0 var(--go-lip), 0 8px 18px rgba(30,90,49,0.22); margin-bottom: 4px; }
.btn-go:hover { color: #fff; background: #2A7541; }
.btn-go:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--go-lip); }
.btn-go[disabled] { background: #8DB89A; box-shadow: 0 4px 0 #6F9A7C; cursor: progress; }
.btn-2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 18px; background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line2); box-shadow: 0 3px 0 var(--line2); margin-bottom: 3px;
  font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer;
}
.btn-2:hover { color: var(--ink); background: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Cards */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow-card); padding: 20px; }
.card + .card { margin-top: 16px; }
.tint-go { background: var(--go-tint); }
.tint-mustard { background: var(--mustard-tint); }

/* Header on inner pages */
.topbar { padding: 14px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo { width: 168px; }
.topbar .btn-2 { min-height: 44px; font-size: 15px; padding: 0 16px; }

/* Landing hero: the title art with the logo in its sky (nothing covers a face) */
.hero { position: relative; }
.hero-art { position: relative; max-width: 560px; margin: 0 auto; background: #5BA9E6; }
.hero-art .cast { width: 100%; aspect-ratio: 780 / 1479; object-fit: cover; object-position: 50% 48%; }
.hero-art .logo { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); width: min(80%, 380px); filter: drop-shadow(0 6px 12px rgba(29,27,36,0.18)); }
.hero-art h1 { margin: 0; }
.pitch { padding-top: 28px; padding-bottom: 8px; }
.pitch .btn-row { margin-top: 18px; }

/* Facts */
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.facts li { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-card); padding: 14px 16px 14px 16px; border-left: 6px solid var(--mustard); }
.facts strong { font-family: var(--display); font-weight: 900; display: block; font-size: 17px; margin-bottom: 2px; }

/* Event cards ("Try a card"): the in-game card, answers as neutral cream rows */
.section { padding-top: 32px; padding-bottom: 8px; }
.cards { display: grid; gap: 20px; margin-top: 16px; }
.ev { background: var(--card); border-radius: 22px; box-shadow: var(--shadow-float); overflow: hidden; border: 3px solid var(--card); }
.ev.uncommon { border-color: var(--teal); }
.ev.rare { border: 3px double var(--gold-lip); outline: 2px solid var(--gold); outline-offset: -7px; }
.ev-art { position: relative; aspect-ratio: 4 / 3; background: var(--sunk); }
.ev-art img { width: 100%; height: 100%; object-fit: cover; }
.pill { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; font: 800 12px/1 var(--body); text-transform: uppercase; letter-spacing: 0.6px; background: #EEEAE3; color: var(--ink2); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.pill.uncommon { background: var(--teal); color: #fff; }
.pill.rare { background: var(--gold); color: #2B2410; }
.ev-body { padding: 16px 16px 18px; }
.ev-body h3 { font-size: 24px; margin-bottom: 8px; }
.ev-speaker { font: 800 13px/1.2 var(--body); color: var(--ink3); text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 6px; }
.ev-text { font-size: 17px; line-height: 1.45; margin: 0 0 14px; }
.answers { display: grid; gap: 12px; }
.answer { background: var(--paper); border: 1.5px solid var(--line2); border-radius: 16px; box-shadow: 0 3px 0 var(--line2); }
.answer summary { list-style: none; cursor: pointer; min-height: 56px; padding: 12px 40px 12px 14px; position: relative; display: flex; flex-direction: column; justify-content: center; font: 800 17px/1.25 var(--body); }
.answer summary::-webkit-details-marker { display: none; }
.answer summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 2.5px solid var(--ink3); border-bottom: 2.5px solid var(--ink3); transform: translateY(-70%) rotate(45deg); transition: transform 120ms ease; }
.answer[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.answer .check { font: 700 13px/1.2 var(--body); color: var(--ink3); margin-top: 3px; }
.answer[open] { background: var(--card); }
.outcome { padding: 0 14px 14px; }
.outcome p { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--go-tint); font-size: 16px; line-height: 1.45; }
.outcome p + p { margin-top: 8px; }
.outcome p.fail { background: var(--stop-tint); }
.outcome b { display: block; font: 800 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink3); margin-bottom: 3px; }
.cur { display: inline-block; height: 1.1em; width: auto; vertical-align: -0.22em; margin-right: 2px; }

/* Waitlist */
.waitlist { padding-top: 36px; padding-bottom: 12px; }
.waitlist .card { padding: 22px 20px; }
.field { display: grid; gap: 6px; margin: 16px 0 14px; }
.field label { font: 800 15px/1.2 var(--body); }
.field input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line2);
  background: #fff; color: var(--ink); font: 600 17px/1 var(--body);
}
.field input:focus { border-color: var(--info); outline: 3px solid rgba(54,104,161,0.25); }
.wl-form .btn { width: 100%; }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; }
.form-msg.err { color: var(--stop-text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.promise { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 15px; color: var(--ink2); }
.promise li { padding-left: 24px; position: relative; }
.promise li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 12px; border-right: 2.5px solid var(--go); border-bottom: 2.5px solid var(--go); transform: rotate(40deg); }
.soon { padding: 14px 16px; border-radius: 14px; background: var(--mustard-tint); font-weight: 700; }

/* Discord */
.community { padding-top: 20px; padding-bottom: 8px; }

/* Long-form pages (legal, support) */
.doc { padding-top: 8px; padding-bottom: 32px; }
.doc h1 { font-size: 32px; margin-top: 8px; }
.doc h2 { font-size: 22px; margin: 28px 0 10px; }
.doc h3 { font-size: 18px; margin: 22px 0 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--line2); background: var(--sunk); border-radius: 0 12px 12px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; line-height: 1.4; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--sunk); font-weight: 800; }
.doc tr:last-child td { border-bottom: 0; }
.doc .part { margin-top: 40px; padding-top: 8px; border-top: 3px solid var(--line2); }
.toc { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 8px; }
.toc a { min-height: 44px; display: inline-flex; align-items: center; }
mark.todo { background: var(--mustard); color: #2B2410; padding: 1px 4px; border-radius: 4px; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.banner { background: var(--mustard-tint); border: 2px dashed var(--mustard-lip); border-radius: 16px; padding: 12px 14px; margin: 12px 0 18px; font-size: 15px; }
.preview-bar { background: var(--night); color: var(--night-ink); font: 700 13px/1.3 var(--body); padding: 8px var(--gutter); text-align: center; }
.preview-bar a { color: var(--mustard); }

/* Phones: tables become stacked rows (no sideways scrolling) */
@media (max-width: 640px) {
  .doc table, .doc thead, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; left: -9999px; }
  .doc tr { border-bottom: 1px solid var(--line2); padding: 6px 0; }
  .doc tr:last-child { border-bottom: 0; }
  .doc td { border: 0; padding: 4px 12px; }
  .doc td[data-label]::before { content: attr(data-label); display: block; font: 800 12px/1.3 var(--body); text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink3); }
}

/* Footer */
.foot { margin-top: 40px; padding: 26px 0 34px; background: var(--night); color: var(--night-ink); font-size: 15px; }
.foot a { color: var(--night-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 14px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.foot p { margin: 0 0 6px; color: #C9C3BA; }

/* Wider screens: art beside the pitch, cards in a row */
@media (min-width: 900px) {
  h1 { font-size: 42px; }
  .doc h1 { font-size: 40px; }
  .hero { background: linear-gradient(180deg, #5BA9E6 0%, #8CC6EE 100%); padding: 0; }
  .landing-top { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 32px var(--gutter); }
  .landing-top .hero-art { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-float); }
  .landing-top .pitch { background: var(--card); border-radius: 26px; padding: 32px; box-shadow: var(--shadow-float); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .waitlist .card { padding: 32px; }
  .waitlist-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
