/* ==========================================================================
   Nerval FF&E Tradeshow Draw
   Design tokens lifted from Style.txt so this app matches ffe.nervalcorp.com.
   Plain CSS on purpose — no build step, so Railway just runs `npm start`.
   ========================================================================== */

/* Fonts are loaded from <head> (see views/partials/head.ejs) so they do not
   wait on this stylesheet, and the icon font is subset to the glyphs used. */

:root {
  --primary: #a82628;
  --primary-container: #d23235;
  --on-primary: #ffffff;
  --secondary: #5f5e5e;
  --on-surface: #1b1c1c;
  --surface: #fbf9f8;
  --surface-container-low: #f5f3f3;
  --surface-container: #efeded;
  --surface-container-highest: #e4e2e2;
  --outline: #906f6e;
  --tertiary: #005468;

  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-700: #3f3f46;

  /* Manifold CF is licensed — drop the woff2 into /public/fonts and enable the
     @font-face block below to get the real thing. Archivo is a close stand-in. */
  --font-head: 'Manifold CF', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-cta: 'Arimo', 'Roboto', sans-serif;

  --max: 1280px;
  --max-narrow: 860px;
}

/*
@font-face {
  font-family: 'Manifold CF';
  src: url('/fonts/ManifoldCF-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
*/

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Nothing in this layout is meant to scroll sideways; a single overflowing
     child should not be able to shift the whole page on a phone. `clip` rather
     than `hidden` because `hidden` would make <html> a scroll container and
     break the sticky staff bar. */
  overflow-x: clip;
}

/* Grey flash on tap looks like a bug on iOS; the :active styles do the job. */
a, button, label, summary { -webkit-tap-highlight-color: rgba(210, 50, 53, 0.12); }

:focus-visible { outline: 3px solid var(--primary-container); outline-offset: 2px; }

/* Long unbroken strings — emails, pasted post links — must wrap rather than
   push a container wider than the screen. */
.breakable { overflow-wrap: anywhere; word-break: break-word; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--primary-container); }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }

section { border-bottom: 1px solid var(--zinc-200); }
.section { padding: 72px 0; }
.section-compact { padding: 48px 0; }
.section-tint { background: var(--surface-container-low); }
.section-white { background: #fff; }

/* -------------------------------------------------------------- typography */
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 4vw, 32px); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 17px; line-height: 1.35; }

p { margin: 0 0 16px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--secondary); }
.muted { color: var(--secondary); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; line-height: 1.5; }

.overline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--secondary);
  margin: 0 0 14px;
  font-weight: 500;
}
.overline-light { color: rgba(255, 255, 255, 0.72); }

.section-heading {
  border-left: 4px solid var(--primary-container);
  padding-left: 24px;
  margin-bottom: 20px;
}
.accent { color: var(--primary-container); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--primary-container);
  color: #fff;
  padding: 16px 32px;
  font-family: var(--font-cta);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  min-height: 48px;   /* comfortable touch target */
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--primary); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 18px 36px; font-size: 15px; }

.btn-outline {
  background: transparent;
  border-color: var(--on-surface);
  color: var(--on-surface);
}
.btn-outline:hover {
  background: transparent;
  border-color: var(--primary-container);
  color: var(--primary-container);
}
.btn-outline-light {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.btn-outline-light:hover {
  background: transparent;
  border-color: var(--primary-container);
  color: var(--primary-container);
}
.btn-pill { border-radius: 999px; padding: 10px 24px; text-transform: none; min-height: 42px; }
.btn-sm { padding: 9px 16px; font-size: 13px; min-height: 40px; }
.btn-quiet {
  background: var(--surface-container);
  color: var(--on-surface);
}
.btn-quiet:hover { background: var(--surface-container-highest); color: var(--on-surface); }
.btn-danger { background: #7a1a1c; }
.btn-danger:hover { background: #5d1315; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------------ header */
.site-header { background: var(--on-surface); color: #fff; position: relative; z-index: 20; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo:hover { color: #fff; }

/* The supplied SVG left 13 shapes with no fill, which SVG renders black — hence
   the logo was illegible on the dark bar. public/logo/ holds recoloured variants
   (white for dark grounds, dark ink for light grounds, red for the favicon);
   the brand originals in Logo/ are untouched. */
.logo-img { height: 34px; width: auto; display: block; }
.logo-img-sm { height: 26px; }
@media (max-width: 480px) { .logo-img { height: 28px; } }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-family: var(--font-cta);
  font-size: 14px;
  font-weight: 600;
}
.site-nav a:hover { color: #fff; }
.site-nav a.is-active { color: #fff; box-shadow: inset 0 -2px 0 var(--primary-container); padding-bottom: 4px; }
.site-nav .btn { padding: 10px 20px; }

.header-entries {
  font-family: var(--font-cta);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  border-left: 1px solid var(--zinc-700);
  padding-left: 20px;
}
.header-entries strong { color: #fff; font-size: 15px; }

@media (max-width: 900px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--on-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 3px solid var(--primary-container);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--zinc-700); }
  .site-nav a.is-active { box-shadow: none; color: var(--primary-container); }
  .site-nav .btn { margin-top: 16px; justify-content: center; }
  .header-entries { border: 0; padding: 14px 0 0; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(circle at 88% -10%, rgba(210, 50, 53, 0.55), transparent 55%),
    linear-gradient(160deg, #d23235 0%, #7d1c1e 28%, #12100f 72%);
  color: #fff;
  border-bottom: 0;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  padding: 64px 0 76px;
  align-items: start;
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 56px; }
}

.hero h1 { color: #fff; }
.hero-kicker {
  font-family: var(--font-cta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 18px;
}
.hero-prize {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(52px, 12vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.hero-sub { color: rgba(255, 255, 255, 0.82); font-size: 18px; max-width: 44ch; }
.booth-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 7px 14px;
  font-family: var(--font-cta);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.ticket-edge {
  height: 16px;
  background-image: radial-gradient(circle at 8px 0, var(--surface) 8px, transparent 8.5px);
  background-size: 16px 16px;
  background-repeat: repeat-x;
}
.ticket-edge-tint {
  background-image: radial-gradient(circle at 8px 0, var(--surface-container-low) 8px, transparent 8.5px);
}

/* ------------------------------------------------------------ entry ladder */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ladder li { display: flex; gap: 16px; align-items: flex-start; }
.chip {
  flex: 0 0 auto;
  min-width: 62px;
  text-align: center;
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  padding: 10px 6px;
  position: relative;
}
/* Ticket notches, so the chips echo the printed flyer. */
.chip::before, .chip::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--surface);
}
.chip::before { left: -5px; }
.chip::after { right: -5px; }
.chip-on-dark::before, .chip-on-dark::after { background: #12100f; }
.chip-on-white::before, .chip-on-white::after { background: #fff; }
.chip-on-tint::before, .chip-on-tint::after { background: var(--surface-container-low); }

.ladder h4 { font-family: var(--font-body); font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.ladder p { margin: 0; font-size: 14.5px; color: var(--secondary); }
.ladder-dark h4 { color: #fff; }
.ladder-dark p { color: rgba(255, 255, 255, 0.66); }

/* -------------------------------------------------------------------- form */
.card {
  background: #fff;
  border: 1px solid var(--zinc-200);
  padding: 32px;
}
.card-flush { padding: 0; }
.card-dark {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(2px);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: 1; }
}

.field label {
  display: block;
  font-family: var(--font-cta);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  padding: 14px;
  border: 1px solid var(--zinc-300);
  background: #fff;
  color: var(--on-surface);
  border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary-container);
  outline-offset: -2px;
  border-color: var(--primary-container);
}
.field .req { color: var(--primary-container); }
.field-error input, .field-error select { border-color: var(--primary-container); background: #fdf6f6; }
.error-text { color: var(--primary); font-size: 13px; margin: 6px 0 0; font-weight: 500; }
.field-hint { color: var(--secondary); font-size: 12.5px; margin: 6px 0 0; }

.consent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--zinc-200);
  background: var(--surface-container-low);
  padding: 18px;
}
.consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--primary-container);
}
.consent label { font-size: 14.5px; line-height: 1.5; color: var(--on-surface); cursor: pointer; }
.consent .consent-head {
  display: block;
  font-family: var(--font-cta);
  font-weight: 700;
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------ notice */
.notice {
  border-left: 4px solid var(--primary-container);
  background: var(--surface-container-low);
  padding: 18px 20px;
  margin-bottom: 28px;
}
/* Confirmation panels use brand black, not green — the palette in Style.txt
   has no green in it. Small status badges in the staff tables keep their
   colours, where green/amber/red carry meaning at a glance. */
.notice-success { border-color: var(--on-surface); background: var(--surface-container); }
/* A voided contact is a warning, not an error: nothing has been lost and it is
   one click to undo, so it borrows the deep red of the danger button rather
   than shouting. */
.notice-void { border-color: #7a1a1c; background: var(--surface-container); }
.notice h3 { margin-bottom: 6px; }
.notice p:last-child { margin-bottom: 0; }

.entry-count {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--primary-container);
}

/* ------------------------------------------------------------------- cards */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Two feature cards across the top, three smaller beneath. Six tracks: the
   first two span 3 each (half the row), the remaining three span 2 each. Both
   rows come out full width, so there is no hole to design around. */
.offers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; }
.offers > * { grid-column: span 2; }
.offers > :nth-child(1), .offers > :nth-child(2) { grid-column: span 3; }

/* A feature card is ~616px wide; 4:3 there would tower over the row. */
.offer-feature .offer-img { aspect-ratio: 3 / 2; }
.offer-feature h3 { font-size: 22px; }
.offer-feature .offer-body { padding: 24px 24px 26px; }

.offer {
  background: #fff;
  border: 1px solid var(--zinc-200);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.offer:hover { border-color: var(--primary-container); color: inherit; transform: translateY(-2px); }

/* Fixed ratio so the grid does not reflow as the photos arrive. */
.offer-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-container);
  overflow: hidden;
}
.offer-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.offer:hover .offer-img img { transform: scale(1.04); }

.offer-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.offer-num {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-cta);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  letter-spacing: 0.08em;
}
.offer h3 { font-size: 19px; text-transform: uppercase; letter-spacing: 0.01em; }
.offer p { margin: 0; font-size: 14.5px; color: var(--secondary); }
.offer-link {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-cta);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-container);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------------------ feature image */
/* Fixed aspect ratio so the page does not reflow while photos load on a slow
   convention connection. */
.feature-img {
  background: var(--surface-container);
  border: 1px solid var(--zinc-200);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.feature-img img { width: 100%; height: 100%; object-fit: cover; }

.figure { margin: 0; }
.figure figcaption {
  margin-top: 10px;
  font-family: var(--font-cta);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
}

/* -------------------------------------------------------------- stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats > div {
  padding: 32px 24px;
  text-align: center;
  border-left: 1px solid var(--zinc-300);
}
.stats > div:first-child { border-left: 0; }
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
  .stats > div { border-left: 0; border-top: 1px solid var(--zinc-300); }
  .stats > div:first-child { border-top: 0; }
}
.stat-number {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--primary-container);
}
.stat-label {
  font-family: var(--font-cta);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--secondary);
  margin-top: 8px;
}

/* ------------------------------------------------------------- dual CTA/footer */
.cta-strip { background: var(--on-surface); color: #fff; padding: 68px 0; border: 0; }
.cta-strip h2 { color: #fff; margin-bottom: 14px; }
.cta-strip p { color: var(--surface-container); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.cta-grid > div + div {
  border-left: 1px solid var(--zinc-700);
  padding-left: 48px;
}
@media (max-width: 820px) {
  .cta-grid { grid-template-columns: 1fr; gap: 36px; }
  .cta-grid > div + div { border-left: 0; border-top: 1px solid var(--zinc-700); padding: 32px 0 0; }
}

.site-footer {
  background: #12100f;
  color: rgba(255, 255, 255, 0.66);
  padding: 44px 0;
  font-size: 14px;
  border: 0;
}
.site-footer a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.site-footer a:hover { color: var(--primary-container); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-cta);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-legal {
  border-top: 1px solid var(--zinc-700);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.48);
}

/* --------------------------------------------------------------- prose/rules */
.prose h2 { margin: 44px 0 14px; }
.prose h3 { margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; color: var(--secondary); }
.prose li { margin-bottom: 8px; }
.prose dl { margin: 0; }
.prose dt {
  font-family: var(--font-cta);
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-top: 18px;
}
.prose dd { margin: 4px 0 0; }
.todo {
  background: #fff6d6;
  border-left: 4px solid #b58900;
  padding: 14px 18px;
  font-size: 14px;
}

/* ===================================================== staff / entry desk == */
.staff-body { background: var(--surface-container-low); }
.staff-bar { background: #12100f; color: #fff; position: sticky; top: 0; z-index: 30; }
.staff-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.staff-bar a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-family: var(--font-cta); font-size: 13.5px; font-weight: 600; }
.staff-bar a:hover, .staff-bar a.is-active { color: #fff; }
.staff-bar nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.staff-who { font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.staff-tag {
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-cta);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  text-transform: uppercase;
}

.staff-main { padding: 32px 0 72px; }
.staff-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }

.flash {
  background: #12100f;
  color: #fff;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-family: var(--font-cta);
  font-size: 14px;
  font-weight: 600;
  border-left: 4px solid var(--primary-container);
}

.searchbar { display: flex; gap: 12px; margin-bottom: 24px; }
.searchbar input {
  flex: 1;
  font-size: 17px;
  padding: 16px;
  border: 1px solid var(--zinc-300);
  background: #fff;
}
.searchbar input:focus { outline: 2px solid var(--primary-container); outline-offset: -2px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--zinc-300); border: 1px solid var(--zinc-300); margin-bottom: 28px; }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: #fff; padding: 18px 20px; }
.tile .n { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1; }
.tile .l { font-family: var(--font-cta); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--secondary); margin-top: 6px; }
.tile-alert .n { color: var(--primary-container); }

.table-wrap { overflow-x: auto; border: 1px solid var(--zinc-200); background: #fff; }
/* Long list kept inside its card on desktop; released to flow on mobile. */
.table-scroll { border: 0; max-height: 420px; overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th {
  text-align: left;
  font-family: var(--font-cta);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  padding: 12px 14px;
  border-bottom: 1px solid var(--zinc-300);
  white-space: nowrap;
  background: var(--surface-container-low);
}
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--surface-container); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface-container-low); }
table.data .num { font-family: var(--font-head); font-weight: 800; font-size: 17px; }
table.data a { font-weight: 600; text-decoration: none; }

.badge {
  display: inline-block;
  font-family: var(--font-cta);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: var(--surface-container);
  color: var(--secondary);
  white-space: nowrap;
}
.badge-pending { background: #fff2cf; color: #7a5900; }
.badge-confirmed { background: #e6f4ea; color: #1f7a3d; }
.badge-rejected { background: #fbe4e4; color: #8f1f21; }

.quick-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.quick-add form { display: flex; }
.quick-add .btn { width: 100%; justify-content: center; text-align: center; padding: 22px 18px; font-size: 15px; line-height: 1.25; }

.stack { display: grid; gap: 22px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 80% 0%, rgba(210, 50, 53, 0.4), transparent 55%),
    #12100f;
}
.login-card { background: #fff; border: 1px solid var(--zinc-200); padding: 36px; width: 100%; max-width: 420px; }

/* ==========================================================================
   Mobile
   Most of this traffic is phones: attendees scanning the booth QR, and staff
   working the entry desk on their own handsets. Desktop is the secondary case.
   Breakpoints: 760px = large phone / small tablet, 560px = phone, 380px = small.
   ========================================================================== */

@media (max-width: 760px) {
  .wrap, .wrap-narrow { padding: 0 18px; }

  .section { padding: 44px 0; }
  .section-compact { padding: 28px 0; }

  h1 { font-size: clamp(30px, 8vw, 40px); }
  h2 { font-size: clamp(24px, 6.5vw, 30px); }
  .lead { font-size: 16.5px; }

  /* The red accent bar costs 28px of a 360px screen; tighten it. */
  .section-heading { padding-left: 16px; border-left-width: 3px; }

  .hero-grid { padding: 32px 0 40px; gap: 28px; }
  .hero-sub { font-size: 16.5px; }
  .hero-prize { text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35); }

  .card { padding: 22px 18px; }
  .notice { padding: 15px 16px; margin-bottom: 20px; }
  .cta-strip { padding: 44px 0; }
  .site-footer { padding: 32px 0; }

  .grid { gap: 20px; }
  .stats > div { padding: 22px 18px; }

  /* Below 760px the feature cards stop being special: two columns, and the
     odd card out spans the full width so the row is never half empty. */
  .offers { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .offers > *,
  .offers > :nth-child(1),
  .offers > :nth-child(2) { grid-column: auto; }
  .offers > :nth-child(1) { grid-column: span 2; }
  .offer-feature .offer-img { aspect-ratio: 4 / 3; }
  .offer-feature h3 { font-size: 17px; }
  .offer-feature .offer-body { padding: 18px 16px 20px; }
  .offer-body { padding: 18px 16px 20px; }
  .offer h3 { font-size: 17px; }

  /* Full-width buttons stack better than side-by-side halves on a phone. */
  .btn-row { gap: 10px; }
  .btn-row > .btn { flex: 1 1 100%; justify-content: center; }

  .staff-main { padding: 22px 0 48px; }
  .staff-bar .wrap { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .staff-bar nav { gap: 14px; row-gap: 10px; }
  .staff-who { width: 100%; order: 9; }

  /* Search first, buttons under it — the input needs the full width. */
  .searchbar { flex-wrap: wrap; }
  .searchbar input { flex: 1 1 100%; }
  .searchbar .btn { flex: 1 1 0; justify-content: center; }

  .staff-head { gap: 12px; }
  .quick-add .btn { padding: 20px 16px; }
}

@media (max-width: 560px) {
  /* ---- data tables become stacked cards --------------------------------
     A six-column table on a 360px screen is unusable, and sideways scrolling
     hides exactly the column you need. Each row becomes a card with the
     column name shown against its value (from the td's data-label). */
  table.data thead { display: none; }

  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }

  table.data tr {
    border-bottom: 1px solid var(--zinc-300);
    padding: 12px 0 14px;
  }
  table.data tr:last-child { border-bottom: 0; }
  table.data tr:hover td { background: transparent; }

  table.data td {
    display: flex;
    gap: 14px;
    align-items: baseline;
    justify-content: space-between;
    border: 0;
    padding: 4px 14px;
    text-align: right;
  }

  table.data td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-family: var(--font-cta);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    text-align: left;
  }

  /* The name row reads as the card's title. */
  table.data td[data-label="Name"],
  table.data td[data-label="Person"],
  table.data td[data-label="Winner"] {
    display: block;
    text-align: left;
    font-size: 17px;
    padding-bottom: 8px;
  }
  table.data td[data-label="Name"]::before,
  table.data td[data-label="Person"]::before,
  table.data td[data-label="Winner"]::before { display: none; }

  /* An empty cell would render as a stray label. */
  table.data td:empty { display: none; }

  .cell-action { padding-top: 10px; }
  .btn-block-sm { width: 100%; justify-content: center; }

  /* The scroll container is no longer needed once rows are stacked, and a
     max-height on it would clip the cards. */
  .table-wrap { overflow-x: visible; }
  .table-scroll { max-height: none; overflow: visible; }

  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 14px 16px; }
  .tile .n { font-size: 24px; }

  .offers { grid-template-columns: 1fr; }
  .offers > :nth-child(1) { grid-column: auto; }

  .form-grid { gap: 14px; }
  .consent { padding: 15px; gap: 12px; }

  /* Stat strip: three short numbers read fine side by side and save a lot of
     vertical space on a phone. */
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > div { padding: 20px 8px; border-left: 1px solid var(--zinc-300); border-top: 0; }
  .stats > div:first-child { border-left: 0; }
  .stat-number { font-size: 26px; }
  .stat-label { font-size: 10px; letter-spacing: 0.1em; margin-top: 6px; }

  .entry-count { font-size: 34px; }
  .login-card { padding: 26px 20px; }
  .prose dl dd { margin-bottom: 2px; }
}

@media (max-width: 380px) {
  .wrap, .wrap-narrow { padding: 0 14px; }
  .card { padding: 18px 14px; }
  .btn { padding: 15px 20px; font-size: 13.5px; }
  .btn-lg { padding: 17px 22px; font-size: 14px; }
  .chip { min-width: 54px; font-size: 16px; }
  .ladder li { gap: 12px; }
  .tiles { grid-template-columns: 1fr; }
  .stat-label { font-size: 9.5px; }
}

/* Short landscape phone: reclaim vertical space so the form is reachable. */
@media (max-height: 480px) and (orientation: landscape) {
  .hero-grid { padding: 22px 0 26px; }
  .section { padding: 32px 0; }
  .staff-bar { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .staff-bar, .site-footer, .btn, .searchbar { display: none !important; }
  body { background: #fff; }
}
