/* Drag King Name Generator - "Playbill" design system */
:root {
  --bg: #FAF4E8; --surface: #FFFDF8; --surface-2: #F2E8D5;
  --text: #2A1418; --muted: #5F474B; --border: #D9C8AA;
  --primary: #7A1F2B; --on-primary: #FFF8EE; --link: #7A1F2B;
  --accent: #B8862B; --accent-ink: #6E4B0B;
  --hl-bg: #5C1320; --hl-text: #FFF4E2; --hl-muted: #EBD6BA; --hl-accent: #E8BC63;
  --success: #1F6B3A; --error: #A3202A; --warn: #7A4F00; --focus: #1F4FD1;
  --curtain: rgba(122, 31, 43, .07);
  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-1: 6px; --r-2: 10px; --r-3: 16px;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 6rem;
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.2rem + .9vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.8vw, 2.7rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.2rem);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170D10; --surface: #231418; --surface-2: #2E1B20;
    --text: #F7ECDC; --muted: #CDB8AC; --border: #4E3239;
    --primary: #E8BC63; --on-primary: #1B0E11; --link: #F0C877;
    --accent: #E8BC63; --accent-ink: #F0C877;
    --hl-bg: #3A1620; --hl-text: #FFF4E2; --hl-muted: #E6CFB3; --hl-accent: #E8BC63;
    --success: #86D6A0; --error: #FFA3A3; --warn: #F2C46B; --focus: #9DBBFF;
    --curtain: rgba(232, 188, 99, .06);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--step-0)/1.65 var(--font-body); font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--s-4); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--s-4); }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: var(--s-4); top: -4rem; background: var(--primary); color: var(--on-primary); padding: var(--s-3) var(--s-4); border-radius: var(--r-1); z-index: 50; transition: top .2s; }
.skip:focus { top: var(--s-3); }
.wrap { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.eyebrow { font: 700 .8rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 var(--s-3); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 56ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header (not sticky) */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--border); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.lm-hat { fill: var(--primary); }
.lm-band { fill: var(--accent); }
.lm-stache { fill: var(--text); }
.wordmark { display: grid; line-height: 1; }
.wm-top { font: 700 1.35rem/1 var(--font-display); letter-spacing: -.01em; }
.wm-bottom { font: 700 .66rem/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.nav-list { display: flex; gap: var(--s-2); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav-list a:hover { background: var(--surface-2); }
.nav-list a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-list a.nav-cta { background: var(--primary); color: var(--on-primary); font-weight: 700; box-shadow: none; border-radius: 999px; }
.nav-list a.nav-cta:hover { filter: brightness(1.1); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--r-2); cursor: pointer; }
.menu-btn .bar { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: background .2s; }
.menu-btn .bar::before, .menu-btn .bar::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; transition: transform .25s; }
.menu-btn .bar::before { top: -6px; } .menu-btn .bar::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bar { background: none; }
.menu-btn[aria-expanded="true"] .bar::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 980px) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--s-3) 1.25rem var(--s-5); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: var(--s-1); }
  .js .nav-list a { min-height: 52px; border-radius: var(--r-2); }
  .js .nav-list a[aria-current="page"] { box-shadow: none; background: var(--surface-2); border-radius: var(--r-2); }
  .no-js .header-row { flex-wrap: wrap; padding-block: var(--s-3); }
  .no-js .nav-list { flex-wrap: wrap; }
}

/* Buttons and form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-2); border: 2px solid var(--primary); background: var(--primary); color: var(--on-primary); font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-ghost { background: none; color: var(--link); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-sm { min-height: 44px; padding: 0 var(--s-4); font-size: .95rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: var(--r-2); cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[aria-pressed="true"] { color: var(--accent-ink); }
.icon-btn[aria-pressed="true"] svg { fill: var(--accent); }
.field { margin-bottom: var(--s-5); }
label, .label { display: block; font-weight: 700; margin-bottom: var(--s-2); }
.help { color: var(--muted); font-size: .9rem; margin: var(--s-2) 0 0; line-height: 1.45; }
.error { color: var(--error); font-size: .92rem; font-weight: 500; margin: var(--s-2) 0 0; min-height: 0; }
.error:empty { display: none; }
input[type="text"], input[type="email"], input[type="number"], select, textarea { width: 100%; min-height: 48px; padding: 10px var(--s-3); font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-2); }
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; font-weight: 500; margin: 0; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.status { min-height: 1.6em; margin: var(--s-3) 0 0; font-weight: 500; }
.status.is-ok { color: var(--success); } .status.is-error { color: var(--error); } .status.is-warn { color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Hero */
.hero { padding-block: var(--s-8) var(--s-8); background: repeating-linear-gradient(90deg, var(--curtain) 0 16px, #0000 16px 32px); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s-7); align-items: center; }
.hero h1 { margin-bottom: var(--s-4); }
.hero h1 em { font-style: italic; color: var(--link); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.chips li { display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .92rem; font-weight: 500; }
.chips svg { color: var(--accent-ink); }
.marquee { position: relative; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--r-3); padding: var(--s-7) var(--s-5) var(--s-5); }
.marquee::before { content: ""; position: absolute; inset: 14px 18px auto; height: 12px; background: radial-gradient(circle at 50% 50%, var(--accent) 0 3.4px, #0000 4px) 0 0 / 20px 12px repeat-x; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.marquee h2, .panel-title { font-size: var(--step-1); margin-bottom: var(--s-4); }
.compact-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; margin-bottom: var(--s-4); }
.compact-row .field { flex: 1 1 200px; margin: 0; }

/* Tickets (signature result display) */
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2); animation: rise .35s ease both; }
.ticket-main { padding: var(--s-4) var(--s-4); min-width: 0; }
.ticket-actions { display: flex; align-items: center; padding: 0 var(--s-2); border-inline-start: 2px dashed var(--border); }
.ticket-tag { display: block; font: 700 .72rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: var(--s-1); }
.ticket-name { font: 700 var(--step-1)/1.25 var(--font-display); margin: 0; overflow-wrap: anywhere; }
.ticket-note { margin: var(--s-2) 0 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.ticket.headliner { background: var(--hl-bg); border-color: var(--hl-accent); border-width: 2px; }
.ticket.headliner .ticket-tag { color: var(--hl-accent); }
.ticket.headliner .ticket-name { font-size: var(--step-2); color: var(--hl-text); }
.ticket.headliner .ticket-note { color: var(--hl-muted); }
.ticket.headliner .icon-btn { color: var(--hl-muted); }
.ticket.headliner .icon-btn:hover { background: rgba(255, 255, 255, .12); color: var(--hl-text); }
.ticket.headliner .icon-btn[aria-pressed="true"] { color: var(--hl-accent); }
.ticket.headliner .ticket-actions { border-inline-start-color: var(--hl-accent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.empty { display: grid; place-items: center; text-align: center; min-height: 220px; border: 2px dashed var(--border); border-radius: var(--r-2); padding: var(--s-5); color: var(--muted); }
.empty[hidden] { display: none; }
.result-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }

/* Sections */
section { scroll-margin-top: var(--s-4); }
.band { padding-block: var(--s-8); }
.band-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.band-dark { background: var(--hl-bg); color: var(--hl-text); }
.band-dark .eyebrow { color: var(--hl-accent); }
.band-dark a { color: var(--hl-accent); }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--s-7); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 3.2rem 1fr; gap: var(--s-4); padding: var(--s-5) 0; border-top: 1px solid var(--border); }
.rows li:last-of-type { border-bottom: 1px solid var(--border); }
.rows .num { font: 700 2rem/1 var(--font-display); font-style: italic; color: var(--accent-ink); }
.rows h3 { margin-bottom: var(--s-1); }
.rows p { margin: 0; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); counter-reset: step; list-style: none; padding: 0; margin: var(--s-6) 0 0; }
.steps li { position: relative; padding-top: var(--s-6); border-top: 3px double var(--accent); }
.steps li::before { counter-increment: step; content: "0" counter(step); position: absolute; top: -.85rem; left: 0; background: var(--surface-2); padding-right: var(--s-3); font: italic 700 1.6rem/1 var(--font-display); color: var(--link); }
.steps p { color: var(--muted); margin: 0; }
.personas { columns: 2 340px; column-gap: var(--s-7); margin: var(--s-6) 0 0; padding: 0; }
.persona { break-inside: avoid; padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.persona dt { font: 700 var(--step-1)/1.2 var(--font-display); font-style: italic; }
.persona dd { margin: var(--s-1) 0 0; color: var(--muted); }
.persona .sample { display: inline-block; margin-top: var(--s-2); padding: 2px 12px; border: 1px solid var(--accent); border-radius: 999px; color: var(--text); font-size: .9rem; font-weight: 700; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-6); }
.point svg { color: var(--hl-accent); margin-bottom: var(--s-3); }
.point h3 { margin-bottom: var(--s-2); }
.point p { color: var(--hl-muted); margin: 0; }
.cta { text-align: center; }
.cta .lede { margin-inline: auto; }

/* FAQ */
.faq details { border-top: 1px solid var(--border); }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) var(--s-6) var(--s-4) 0; font-weight: 700; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: var(--s-2); top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--font-body); color: var(--accent-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 var(--s-4); color: var(--muted); }
.faq .answer p:last-of-type { margin-bottom: 0; }

/* Tool page */
.page-head { padding-block: var(--s-7) var(--s-6); background: repeating-linear-gradient(90deg, var(--curtain) 0 16px, #0000 16px 32px); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: var(--step-3); margin-bottom: var(--s-3); }
.page-head p { margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-4); font-size: .92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--border); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: var(--s-6); padding-block: var(--s-7); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s-5); }
.panel.stage { border: 2px solid var(--primary); padding-top: var(--s-7); position: relative; }
.panel.stage::before { content: ""; position: absolute; inset: 14px 18px auto; height: 12px; background: radial-gradient(circle at 50% 50%, var(--accent) 0 3.4px, #0000 4px) 0 0 / 20px 12px repeat-x; }
.stage .results-wrap { min-height: 380px; }
.lineup { margin-top: var(--s-6); }
.lineup-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.lineup-item { display: flex; align-items: center; gap: var(--s-1); padding: 0 var(--s-2) 0 var(--s-4); border: 1px solid var(--border); border-radius: var(--r-2); background: var(--bg); font-weight: 500; }
.lineup-item span { flex: 1; min-width: 0; padding-block: var(--s-2); overflow-wrap: anywhere; }
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-5); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: var(--s-2); }
.table-scroll { overflow-x: auto; margin: var(--s-4) 0 var(--s-5); border: 1px solid var(--border); border-radius: var(--r-2); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-of-type td { border-bottom: 0; }
.formula { padding: var(--s-4) var(--s-5); background: var(--surface-2); border-inline-start: 4px solid var(--accent); border-radius: var(--r-1); font-weight: 500; }
.callout { padding: var(--s-4) var(--s-5); border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); background: var(--surface); border-radius: var(--r-1); margin: var(--s-5) 0; }
.updated { color: var(--muted); font-size: .95rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s-7); padding-block: var(--s-7); align-items: start; }
.notfound { padding-block: var(--s-9); text-align: center; }
.notfound .big { font: italic 700 clamp(5rem, 20vw, 10rem)/1 var(--font-display); color: var(--accent-ink); margin: 0; }

/* Footer */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding-block: var(--s-7) var(--s-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.footer-grid h2 { font: 700 .8rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: inline-block; padding: 6px 0; min-height: 36px; }
.footer-grid p { color: var(--muted); max-width: 36ch; margin-top: var(--s-3); }
.copyright { margin: var(--s-6) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .points, .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .wm-top { font-size: 1.15rem; } .wm-bottom { letter-spacing: .16em; }
  .logo-mark { width: 38px; height: 38px; }
  .hero { padding-block: var(--s-6) var(--s-7); }
  .marquee, .panel { padding-inline: var(--s-4); }
  .btn-row .btn { flex: 1 1 auto; }
}
@media (min-width: 1500px) { .wrap { width: min(100% - 4rem, 1240px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .skip, .tool-form, .result-tools, .ticket-actions, .lineup, .page-head p, .tool-extra, .marquee::before, .panel.stage::before, .crumbs { display: none !important; }
  .tool-layout { display: block; padding: 0; }
  .panel, .panel.stage { border: 0; padding: 0; }
  .ticket, .ticket.headliner { background: #fff; color: #000; border: 1px solid #000; break-inside: avoid; }
  .ticket.headliner .ticket-name, .ticket.headliner .ticket-note, .ticket.headliner .ticket-tag { color: #000; }
  .status, .empty { display: none; }
}

/* Utilities added after review */
[hidden] { display: none !important; }
.marquee .results-wrap { min-height: 400px; }
.marquee .empty { min-height: 260px; }
