/* Colors sampled from the 2026 mail piece; red for buttons and errors is
   PTP brand Bright Red, which passes contrast with white text. */
:root {
  color-scheme: light;
  /* Brand colors (same in both themes). The promo panel and footer are navy
     in both themes, like the mail piece. */
  --navy: #17254D;
  --navy-2: #263C64;
  --red: #ED1443;
  --red-ink: #D01B26;
  --sky: #81C3ED;
  --pale: #CCEFFC;
  --white: #FFFFFF;
  --focus: #FCAE47;

  /* Theme tokens: light values. Dark values follow below. */
  --panel-bg: #CCEFFC;
  --panel-dots: rgb(129 195 237 / 0.35);
  --surface: #FFFFFF;
  --ink: #0C0F26;
  --muted: #3A4766;
  --line: #9DB3C9;
  --heading: #D01B26;
  --input-bg: #FFFFFF;
  --letter-bg: #E9EEF3;
  --letter-border: #C7D2DE;
  --history-head: #17254D;
  --history-border: #17254D;
  --btn-alt: #17254D;
  --btn-alt-hover: #263C64;
  --callout-bg: #CCEFFC;
  --option-active: #CCEFFC;
  --error-bg: #FDECEE;
  --error-ink: #8E0025;
  --draft-bg: #FFF3DC;
  --draft-ink: #0C0F26;
  --shadow: rgb(23 37 77 / 0.08);

  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Saira", system-ui, -apple-system, "Segoe UI", sans-serif;

  --halftone-dark: radial-gradient(circle, rgb(255 255 255 / 0.07) 1.5px, transparent 1.9px) 0 0 / 9px 9px;
  --halftone-light: radial-gradient(circle, var(--panel-dots) 1.5px, transparent 1.9px) 0 0 / 9px 9px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --panel-bg: #0D1530;
    --panel-dots: rgb(129 195 237 / 0.12);
    --surface: #16213F;
    --ink: #E8F1FA;
    --muted: #A9B8CF;
    --line: #3B4C75;
    --heading: #FF5C7A;
    --input-bg: #0F1730;
    --letter-bg: #0F1730;
    --letter-border: #3B4C75;
    --history-head: #0B1124;
    --history-border: #3B4C75;
    --btn-alt: #3A5FA8;
    --btn-alt-hover: #4A6FB8;
    --callout-bg: #0F1A38;
    --option-active: #24345C;
    --error-bg: #4A1220;
    --error-ink: #FFB3C1;
    --draft-bg: #3A2A0A;
    --draft-ink: #FFD58A;
    --shadow: rgb(0 0 0 / 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --panel-bg: #0D1530;
  --panel-dots: rgb(129 195 237 / 0.12);
  --surface: #16213F;
  --ink: #E8F1FA;
  --muted: #A9B8CF;
  --line: #3B4C75;
  --heading: #FF5C7A;
  --input-bg: #0F1730;
  --letter-bg: #0F1730;
  --letter-border: #3B4C75;
  --history-head: #0B1124;
  --history-border: #3B4C75;
  --btn-alt: #3A5FA8;
  --btn-alt-hover: #4A6FB8;
  --callout-bg: #0F1A38;
  --option-active: #24345C;
  --error-bg: #4A1220;
  --error-ink: #FFB3C1;
  --draft-bg: #3A2A0A;
  --draft-ink: #FFD58A;
  --shadow: rgb(0 0 0 / 0.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.5 var(--body);
  color: var(--ink);
  background: var(--navy);
}
img { max-width: 100%; height: auto; display: block; }
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color 120ms;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; top: 8px; left: 8px; z-index: 10; background: var(--white); padding: 8px 12px; }

/* ---------- Layout ---------- */
.page { display: grid; }
@media (min-width: 960px) {
  .page { grid-template-columns: minmax(380px, 5fr) 7fr; min-height: 100vh; min-height: 100dvh; }
}

/* ---------- Left: navy promo panel ---------- */
.promo {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    var(--halftone-dark),
    repeating-conic-gradient(from 0deg at 30% 35%, rgb(255 255 255 / 0.05) 0 7deg, transparent 7deg 18deg),
    var(--navy);
}
.promo__inner {
  position: relative;
  padding: 24px 16px 28px;
  max-width: 520px;
  margin: 0 auto;
}
.promo__vote { width: min(260px, 70%); margin: 0 0 12px; }
.promo__title {
  margin: 0;
  font: 900 clamp(34px, 8vw, 58px)/0.95 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.promo__title span { display: block; overflow-wrap: anywhere; }
.promo__red { color: var(--red); }
.promo__sky { color: var(--sky); margin-top: 4px; }
.rule { border: 0; height: 5px; background: var(--red); margin: 18px 0; }
.promo__prize { margin: 0; font-family: var(--display); text-transform: uppercase; line-height: 0.9; }
.promo__amount { display: block; font-weight: 900; font-size: clamp(64px, 16vw, 112px); color: var(--pale); letter-spacing: 0.01em; }
.promo__in { display: block; font-weight: 800; font-size: clamp(40px, 10vw, 68px); color: var(--sky); }
.promo__vote-info { margin: 0; font-weight: 500; font-size: 16px; color: var(--pale); }
.promo__vote-info a { color: var(--white); font-weight: 700; }

@media (max-width: 959px) {
  /* Keep the form close to the top on phones. */
  .promo__vote { width: 180px; }
  .promo__amount { font-size: clamp(56px, 15vw, 88px); }
  .promo__in { font-size: clamp(32px, 8vw, 52px); }
  .rule { margin: 14px 0; height: 4px; }
}
@media (min-width: 960px) {
  .promo__inner { padding: 56px 40px; position: sticky; top: 0; }
  .promo__vote { width: 100%; max-width: 400px; margin-bottom: 20px; }
}

/* ---------- Right: pale claim panel ---------- */
.claim {
  background: var(--halftone-light), var(--panel-bg);
  padding: 28px 16px 40px;
}
.claim__inner { max-width: 640px; margin: 0 auto; }
@media (min-width: 960px) {
  .claim { padding: 64px 48px; display: flex; align-items: center; }
  .claim__inner { width: 100%; }
}

.step { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 24px 18px; box-shadow: 0 2px 0 var(--shadow); }
@media (min-width: 600px) { .step { padding: 32px 36px; } }

.heading {
  margin: 0 0 10px;
  font: 900 clamp(32px, 6vw, 44px)/1 var(--display);
  text-transform: uppercase;
  color: var(--heading);
}
.heading:focus { outline: none; }
.lede { margin: 0 0 18px; font-size: 17px; color: var(--ink); }
.fine { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }

/* Vote-history table, styled after the mail piece. */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.history {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--history-border);
  border-radius: 6px;
  overflow: hidden;
}
.history__col + .history__col { border-left: 2px solid var(--history-border); }
.history__year {
  display: block;
  background: var(--history-head);
  color: var(--white);
  text-align: center;
  font: 800 24px/1 var(--display);
  padding: 10px 4px;
}
.history__cell { padding: 12px; display: flex; justify-content: center; background: var(--surface); }
.letter {
  width: 100%;
  max-width: 96px;
  height: 84px;
  text-align: center;
  font: 900 56px/1 var(--display);
  text-transform: uppercase;
  color: var(--ink);
  background: var(--letter-bg);
  border: 2px solid var(--letter-border);
  border-radius: 6px;
  caret-color: var(--red);
}
.letter:focus { border-color: var(--sky); background: var(--input-bg); }

.btn {
  display: inline-block;
  margin-top: 20px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 16px 24px;
  background: var(--red-ink);
  color: var(--white);
  font: 800 24px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #B3141E; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn--navy { background: var(--btn-alt); }
.btn--navy:hover { background: var(--btn-alt-hover); }

.error {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 5px solid var(--red-ink);
  background: var(--error-bg);
  color: var(--error-ink);
  font-weight: 600;
}

/* ---------- Claim form ---------- */
.row { display: grid; gap: 0 16px; }
@media (min-width: 600px) {
  .row.two { grid-template-columns: 1fr 1fr; }
  .row.three { grid-template-columns: 2fr 1fr 1.2fr; }
}
.field { margin-bottom: 16px; position: relative; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input, .field select {
  width: 100%;
  font: 400 17px/1.3 var(--body);
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--sky); outline: 3px solid var(--focus); outline-offset: 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red-ink); }
.hint { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.field__error { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--error-ink); }

.combo__box { position: relative; }
.combo__list {
  position: absolute;
  z-index: 5;
  left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px 0;
  list-style: none;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}
.combo__list li { padding: 10px 12px; cursor: pointer; }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--option-active); }
.combo__list li.combo__attrib { cursor: default; font-size: 12px; color: var(--muted); padding: 4px 12px; }
.combo__list li.combo__attrib:hover { background: none; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin: 8px 0 14px; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--sky); }
.check a { font-weight: 600; }
.turnstile { margin: 8px 0 0; min-height: 65px; }

/* Offered after a code that doesn't match; replaces the small free-entry link. */
.nudge { margin-top: 20px; padding: 18px; background: var(--callout-bg); border-radius: 10px; }
.nudge p { margin: 0; }
.nudge .btn { margin-top: 12px; font-size: 20px; padding: 14px 20px; }
.nudge:not([hidden]) + .free-entry-link { display: none; }
.callout { margin-top: 20px; padding: 18px; background: var(--callout-bg); border-radius: 10px; }
.callout p { margin: 0; }
.callout .btn { margin-top: 12px; }

.voting-note { margin: 18px 4px 0; font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--white); border-top: 6px solid var(--red); }
.footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 28px 16px;
  display: grid; gap: 20px; align-items: center; justify-items: start;
}
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 40px; padding: 32px 40px; }
  .footer__nav { justify-self: end; }
}
.footer__logo { width: 180px; }
.disclaimer {
  border: 1.5px solid color-mix(in srgb, var(--white) 70%, transparent);
  padding: 8px 12px; font-size: 13px; line-height: 1.45; max-width: 60ch;
}
.footer__nav { display: flex; gap: 8px 22px; font-size: 15px; font-weight: 500; flex-wrap: wrap; align-items: center; }
.footer__nav a { text-decoration-color: transparent; }
.footer__nav a:hover { text-decoration-color: currentColor; }
.theme-toggle {
  font: inherit; color: inherit; background: none; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 999px;
  padding: 4px 12px; line-height: 1.3;
}
.theme-toggle:hover { border-color: currentColor; }

/* ---------- Free entry ---------- */
.free-entry-link { margin: 16px 0 0; font-size: 15px; text-align: center; }
.free-entry-link a { color: var(--ink); font-weight: 600; }
body:not([data-free-entry="on"]) .free-entry-link { display: none; }
body[data-entry="free"] .code-only { display: none; }
#back-to-code { color: var(--muted); }

/* ---------- Contest not open ---------- */
body[data-status="closed"] .step:not(.step--closed),
body[data-status="upcoming"] .step:not(.step--upcoming) { display: none; }
body[data-status="closed"] .step--closed,
body[data-status="upcoming"] .step--upcoming { display: block; }

/* ---------- Rules page ---------- */
.doc { background: var(--halftone-light), var(--panel-bg); color: var(--ink); padding: 28px 16px 48px; }
.doc__inner { max-width: 800px; margin: 0 auto; background: var(--surface); border-radius: 18px; padding: 24px 18px; }
@media (min-width: 600px) { .doc__inner { padding: 40px 48px; } }
.doc__bar { background: var(--navy); padding: 14px 16px; }
.doc__bar a { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font: 800 22px/1 var(--display); text-transform: uppercase; }
.doc__bar img { width: 84px; }
.doc h1 { font: 900 clamp(28px, 6vw, 40px)/1.05 var(--display); text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.doc h1 + h1 { color: var(--heading); margin-bottom: 20px; }
.doc ol { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc li > p { margin: 6px 0; }
.draft { margin: 0 0 20px; padding: 10px 14px; background: var(--draft-bg); color: var(--draft-ink); border-left: 5px solid var(--focus); font-weight: 600; }
