:root {
  --red: #c8102e;
  --red-dark: #9e0c24;
  --ink: #1d1d1f;
  --ink-2: #4a4a50;
  --line: #dcdce0;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --green: #1f7a4a;
  --amber: #a15c00;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px; }
a { color: var(--red); }
[hidden] { display: none !important; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 20px; color: var(--red); text-decoration: none; letter-spacing: .2px; }
.header-link { font-weight: 600; text-decoration: none; }

/* Hero */
.hero { background: var(--bg-soft); padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--red); margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.15; margin: 0 0 16px; max-width: 760px; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 680px; margin: 0 0 28px; }

/* Buttons */
.btn { display: inline-block; border: 0; border-radius: 6px; padding: 14px 26px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-secondary { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn-block { width: 100%; margin-top: 8px; }

/* Info cards */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-card h2, .info-card h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; color: var(--red); }
.info-card p { margin: 0 0 6px; }
.muted { color: var(--ink-2); font-size: 15px; }

.section-title { font-size: 26px; margin: 0 0 18px; }

/* Status */
.status-banner { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: 20px; font-weight: 600; }

/* Type switch */
.type-switch { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.type-tab { border: 0; background: transparent; padding: 10px 18px; border-radius: 6px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.type-tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.form-intro { color: var(--ink-2); margin: 0 0 20px; }

/* Form */
.reg-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.note { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-size: 19px; font-weight: 700; padding: 20px 0 10px; width: 100%; border-top: 1px solid var(--line); margin-top: 12px; }
fieldset:first-of-type legend { border-top: 0; margin-top: 0; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 16px; }
.req { color: var(--red); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #b9b9bf; border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(200,16,46,.25); outline-offset: 1px; border-color: var(--red); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { grid-template-columns: 2fr 1fr 1fr; }
.radios { display: flex; gap: 22px; flex-wrap: wrap; }
.radios.stack { flex-direction: column; gap: 8px; }
.radios label { font-weight: 500; display: flex; gap: 8px; align-items: center; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 16px; cursor: pointer; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: 0 0 auto; }
input[type="radio"] { width: 18px; height: 18px; }
.hint { color: var(--ink-2); font-size: 14.5px; margin: 6px 0 0; }
.sub { padding-left: 16px; border-left: 3px solid var(--line); margin: 0 0 16px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); background: #fff7f8; }
.has-error .label, .has-error > label, .check.has-error span { color: var(--red-dark); }
.form-error { background: #fff0f2; color: var(--red-dark); border: 1px solid #f3b9c3; padding: 12px 14px; border-radius: 8px; margin: 8px 0; font-weight: 600; }
.hp { position: absolute; left: -9999px; }

.closed-panel, .success-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg-soft); }
.closed-panel h3, .success-panel h3 { margin-top: 0; }
.success-panel { background: #edf7f1; border-color: #b9dfc8; }

.contacts { margin: 56px 0 24px; }
.contacts .info-grid { margin-top: 0; }

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 24px 0; font-size: 14px; color: var(--ink-2); margin-top: 48px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .info-grid, .row, .row-3 { grid-template-columns: 1fr; }
  .reg-form { padding: 20px 16px; }
  .hero { padding: 44px 0 40px; }
  .type-switch { display: flex; border-radius: 14px; }
  .type-tab { flex: 1 1 100%; border-radius: 10px; }
}

/* Compact layout */
legend { padding: 16px 0 8px; margin-top: 8px; }
.field { margin-bottom: 14px; }
.hint-tight { margin: -6px 0 14px; }
.input-short { max-width: 140px; }
.yn { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: start; padding: 12px 0; margin: 0; border-top: 1px solid #eee; }
.yn .label { margin: 0; font-weight: 600; }
.yn .label .hint { display: block; font-weight: 400; margin-top: 2px; }
.yn .radios { padding-top: 2px; flex-wrap: nowrap; }
.yn + .sub { margin-top: 4px; }
details.terms { margin: 4px 0 14px; }
details.terms summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 15px; }
details.terms .hint { margin-top: 6px; }
.check-confirm { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .yn { grid-template-columns: 1fr; }
}

/* ---------- Subtle design + scroll motion ---------- */
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 18px -10px rgba(0,0,0,.25); background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px); }
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

/* Hero: soft candlelight glow */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px); }
.hero::before { width: 520px; height: 520px; right: -120px; top: -160px; background: radial-gradient(circle, rgba(255,186,96,.30), rgba(255,186,96,0) 65%); animation: glow 7s ease-in-out infinite; }
.hero::after { width: 360px; height: 360px; right: 140px; bottom: -220px; background: radial-gradient(circle, rgba(200,16,46,.12), rgba(200,16,46,0) 65%); animation: glow 9s ease-in-out infinite reverse; }
@keyframes glow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }


/* Cards */
.info-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; background: #fff; }
.info-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -16px rgba(0,0,0,.3); border-color: #cfcfd4; }
.btn { transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(200,16,46,.7); }
.reg-form { box-shadow: 0 18px 40px -32px rgba(0,0,0,.35); }
.sub { animation: subIn .3s ease; }
@keyframes subIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before, .hero::after, .sub { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .info-card:hover, .btn-primary:hover { transform: none; }
  .scroll-progress { display: none; }
}

/* ---------- Thank-you page ---------- */
.ty-hero { padding-block: 56px 48px; }
.ty-main { padding-top: 40px; }
.ty-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.ty-steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 68px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ty-steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.ty-steps h3 { margin: 4px 0 6px; font-size: 18px; }
.ty-steps p { margin: 0; color: var(--ink-2); }
.ty-actions { margin: 8px 0 0; padding: 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.ty-actions p { margin: 0 0 14px; }
.ty-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.info-card.is-yours { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.info-card.is-yours h3::after { content: "Your region"; margin-left: 8px; font-size: 11px; letter-spacing: .06em; background: var(--red); color: #fff; padding: 2px 7px; border-radius: 4px; vertical-align: 2px; white-space: nowrap; display: inline-block; }
@media (max-width: 720px) {
  .ty-steps li { padding: 16px 16px 16px 60px; }
  .ty-steps li::before { left: 16px; top: 16px; }
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 44px; width: auto; }
@media (max-width: 720px) { .brand img { height: 36px; } }

/* ---------- MADD Canada card + button style (matches madd.ca) ---------- */
:root {
  --red: #d8001c;
  --red-dark: #ad0016;
  --card: #f4f4f4;
  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "PT Sans", "Helvetica Neue", Arial, sans-serif;
}
body { font-family: var(--font-body); }
h1, .section-title, .info-card h2, .info-card h3, .ty-steps h3, .closed-panel h3, .success-panel h3, legend {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0; text-wrap: balance;
}
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; }
.section-title { font-size: 30px; }
legend { font-size: 22px; }

/* Cards: light grey panel, red top rule, curved lifted shadow */
.info-grid, .ty-steps, .register, .ty-actions-wrap { isolation: isolate; }
.info-card, .reg-form, .ty-steps li, .ty-actions, .closed-panel {
  position: relative; background: var(--card); border: 0; border-top: 3px solid var(--red); border-radius: 0;
}
.info-card::before, .info-card::after,
.reg-form::before, .reg-form::after,
.ty-steps li::after, .ty-actions::before, .ty-actions::after,
.closed-panel::before, .closed-panel::after {
  content: ""; position: absolute; z-index: -1; bottom: 14px; width: 48%; height: 24px; max-height: 40%;
  box-shadow: 0 14px 12px rgba(0, 0, 0, .45);
}
.info-card::before, .reg-form::before, .ty-actions::before, .closed-panel::before { left: 10px; transform: rotate(-2.5deg); }
.info-card::after, .reg-form::after, .ty-steps li::after, .ty-actions::after, .closed-panel::after { right: 10px; transform: rotate(2.5deg); }
.reg-form, .info-card:hover { box-shadow: none; }
.info-card:hover { transform: none; border-color: var(--red); }
.info-card h2, .info-card h3 { text-transform: none; color: var(--ink); font-size: 23px; line-height: 1.2; margin-bottom: 10px; }
.info-card p { color: var(--ink-2); }
.info-grid { gap: 28px; }
.ty-steps { gap: 22px; }
.ty-steps h3 { font-size: 22px; }
.ty-steps li { border-left: 0; border-right: 0; border-bottom: 0; }
.ty-steps li::before { border-radius: 0; background: var(--red); }
.info-card.is-yours { box-shadow: none; outline: 2px solid var(--red); outline-offset: -2px; }
.info-card.is-yours h3::after { border-radius: 0; font-family: var(--font-body); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea { border-radius: 2px; }

/* Buttons: solid red, square corners */
.btn { border-radius: 2px; font-family: var(--font-body); font-weight: 700; font-size: 16px; padding: 14px 28px; letter-spacing: .01em; }
.btn-primary { background: var(--red); }
.btn-primary:hover { background: var(--red-dark); transform: none; box-shadow: none; }
.btn-secondary { background: transparent; border: 2px solid var(--red); padding: 12px 26px; }
.btn-secondary:hover { background: var(--red); color: #fff; }
.type-switch { border-radius: 2px; }
.type-tab { border-radius: 2px; }
.type-tab.is-active { background: var(--red); color: #fff; box-shadow: none; }
.ty-steps li::after { left: 14px; right: 14px; width: auto; transform: none; box-shadow: 0 12px 12px -4px rgba(0, 0, 0, .35); }
.status-banner, .form-error, .success-panel, .closed-panel { border-radius: 2px; }

/* ---------- Registration status panel ---------- */
.status-banner { display: flex; align-items: stretch; gap: 24px; padding: 22px 24px; margin-bottom: 24px;
  background: var(--card); border: 0; border-left: 5px solid var(--red); border-radius: 0; font-weight: 400; }
.status-banner.is-closed { border-left-color: #8a8a90; }
.status-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.status-label { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.15; color: var(--ink); }
.status-text { margin: 0; color: var(--ink-2); }
.round-track { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; }
.round-track li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: #fff; border: 1px solid #d6d6da; font-size: 14px; color: var(--ink-2); }
.round-track .rt-name { font-weight: 700; }
.round-track .rt-state { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.round-track li.is-on { background: var(--red); border-color: var(--red); color: #fff; }

.deadline { flex: 0 0 auto; display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 120px; padding-left: 24px; border-left: 1px solid #dcdce0; text-align: center; }
.dl-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-2); }
.dl-cal { display: grid; width: 76px; background: #fff; box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); }
.dl-month { background: var(--red); color: #fff; font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 0; }
.dl-day { font-family: var(--font-display); font-size: 38px; line-height: 1.15; color: var(--ink); padding: 2px 0 4px; font-variant-numeric: tabular-nums; }
.dl-year { font-size: 13px; color: var(--ink-2); }
.dl-left { font-size: 13px; font-weight: 700; color: var(--red); }

@media (max-width: 720px) {
  .status-banner { flex-direction: column; gap: 16px; padding: 18px 16px; }
  .deadline { grid-template-columns: auto auto; grid-template-areas: "cal label" "cal year" "cal left"; justify-items: start; justify-content: start; column-gap: 14px;
    padding-left: 0; padding-top: 16px; border-left: 0; border-top: 1px solid #dcdce0; text-align: left; }
  .dl-cal { grid-area: cal; width: 64px; text-align: center; }
  .dl-label { grid-area: label; align-self: end; }
  .dl-left { grid-area: left; }
  .dl-year { grid-area: year; align-self: start; }
  .dl-day { font-size: 32px; }
}
.status-text { font-size: 19px; color: var(--ink); }

/* ---------- Load + scroll motion (subtle) ---------- */
@keyframes headerIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tilePop { 0% { opacity: 0; transform: translateY(8px) scale(.92); } 70% { opacity: 1; transform: translateY(0) scale(1.03); } 100% { transform: none; } }
@keyframes ruleGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.js .site-header .header-inner { animation: headerIn .6s ease both; }

/* Hero entrance plays on load, no scrolling needed */
.js .hero h1, .js .hero .lede, .js .hero .btn { animation: riseIn .8s cubic-bezier(.2,.7,.2,1) both; }
.js .hero .lede { animation-delay: .12s; }
.js .hero .btn { animation-delay: .24s; }
.js .hero .reveal { opacity: 1; transform: none; transition: none; }

/* Form sections ease in one by one as you scroll down the form */
.js .reveal-soft { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal-soft.is-visible { opacity: 1; transform: none; }

/* Red top rule on cards draws in when the card appears */
.js .info-card.reveal { background-image: linear-gradient(var(--red), var(--red)); background-repeat: no-repeat; background-size: 0% 3px; background-position: 0 0; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), background-size .8s ease .25s; transition-delay: var(--d, 0s); }
.js .info-card.reveal.is-visible { background-size: 100% 3px; }
.js .info-card.reveal { border-top: 3px solid transparent; background-color: var(--card); background-origin: border-box; }

/* Deadline tile pops in */
.js .reveal.is-visible .dl-cal { animation: tilePop .7s cubic-bezier(.2,.7,.2,1) .2s both; }

@media (prefers-reduced-motion: reduce) {
  .js .site-header .header-inner, .js .hero h1, .js .hero .lede, .js .hero .btn, .js .reveal.is-visible .dl-cal { animation: none; }
  .js .reveal-soft { opacity: 1; transform: none; transition: none; }
  .js .info-card.reveal { background-size: 100% 3px; transition: none; }
}

/* Key facts inside the status panel */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; }
.fact { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.fact > div { display: grid; gap: 3px; min-width: 0; }
.fact strong { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.2; color: var(--ink); }
.fact span { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.fact-icon { flex: 0 0 auto; width: 36px; height: 36px; padding: 7px; background: #fff; border-top: 2px solid var(--red); fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.js .reveal.is-visible .fact { animation: riseIn .6s cubic-bezier(.2,.7,.2,1) both; }
.js .reveal.is-visible .fact:nth-child(2) { animation-delay: .08s; }
.js .reveal.is-visible .fact:nth-child(3) { animation-delay: .16s; }
.js .reveal.is-visible .fact:nth-child(4) { animation-delay: .24s; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr; gap: 14px; } }
@media (prefers-reduced-motion: reduce) { .js .reveal.is-visible .fact { animation: none; } }

/* Facts as a simple bulleted list */
.facts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fact { display: block; position: relative; padding-left: 22px; font-size: 18px; line-height: 1.45; color: var(--ink); }
.fact::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--red); }
.status-main { justify-content: center; }

/* Mobile polish: even field spacing and larger tap targets */
.header-link { padding: 10px 0; }
@media (max-width: 720px) {
  .row, .row-3 { gap: 0; }
  .radios label { min-height: 44px; padding-right: 8px; }
  .radios { gap: 4px 18px; }
  .check { padding: 6px 0; }
  .yn { gap: 2px; }
  .yn .radios { padding-top: 0; }
  details.terms summary { padding: 8px 0; }
  .type-tab { min-height: 44px; }
}

/* "More info" accordions for long notes */
details.more { margin: 6px 0 14px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--red); padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 16px; height: 16px; flex: 0 0 auto;
  background: linear-gradient(var(--red), var(--red)) center/10px 2px no-repeat, linear-gradient(var(--red), var(--red)) center/2px 10px no-repeat;
  border: 1.5px solid var(--red); transition: transform .25s ease, background-size .25s ease; }
details.more[open] > summary::before { background-size: 10px 2px, 2px 0; transform: rotate(180deg); }
details.more > summary:hover { text-decoration: underline; }
details.more > summary:focus-visible { outline: 3px solid rgba(216,0,28,.25); outline-offset: 2px; }
details.more .more-body { padding: 8px 0 2px 14px; border-left: 2px solid #dcdce0; margin-top: 6px; }
details.more .more-body .hint { margin: 0 0 8px; }
details.more .more-body .hint:last-child { margin-bottom: 0; }
details.more[open] .more-body { animation: moreIn .3s ease; }
@keyframes moreIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { details.more > summary { padding: 10px 0; } }
@media (prefers-reduced-motion: reduce) { details.more[open] .more-body { animation: none; } details.more > summary::before { transition: none; } }
