/* Rules Ready site. Daylight tokens (branding/HQ-DESIGN-OPTIONS.md). */
:root {
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-alt: #FAF9F6;
  --text: #14182B;
  --muted: #5B6075;
  --navy: #1E2952;
  --navy-hover: #2A3870;
  --navy-pressed: #111830;
  --yellow: #FACC15;
  --chip-bg: #FEF7D6;
  --chip-text: #713F12;
  --border: #E6E3DC;
  --border-strong: #8C8778;  /* inputs: 3:1 against white for WCAG 1.4.11 */
  --success-fg: #15803D; --success-bg: #DCFCE7;
  --warning-fg: #9A3412; --warning-bg: #FFEDD5;
  --danger-fg: #B91C1C;  --danger-bg: #FEE2E2;
  --info-fg: #1D4ED8;    --info-bg: #DBEAFE;
  --shadow: 0 4px 16px rgba(20, 24, 43, 0.06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; padding: 8px 12px;
  background: var(--navy); color: #fff; border-radius: 6px; z-index: 10;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 8px 0; display: inline-block; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); text-underline-offset: 6px; }

main { padding: 48px 0 72px; }

h1 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin: 48px 0 12px; }
h3 { font-size: 1.125rem; line-height: 1.3; margin: 28px 0 8px; }
p { margin: 0 0 16px; }
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 640px; }
.meta { color: var(--muted); font-size: 0.9375rem; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px;
  background: var(--navy); color: #fff; border: 2px solid var(--navy);
  border-radius: 8px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; text-decoration: none; }
.button:active { background: var(--navy-pressed); }
.button.secondary { background: var(--surface); color: var(--text); border: 1px solid #D6D2C8; }
.button.secondary:hover { background: var(--bg); color: var(--text); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Hero */
.hero { padding: 8px 0 8px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.key-date {
  display: inline-block; margin-bottom: 16px; padding: 4px 12px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-text); font-weight: 600; font-size: 0.875rem;
}

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; background: var(--surface); border: 1px solid #ECE9E2; border-radius: 14px;
  box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); }
.card a.stretch { font-weight: 600; margin-top: auto; text-decoration: none; }
.card a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.card a.stretch:hover { text-decoration: underline; }
.card a.stretch:focus-visible { outline: none; }
.card a.stretch:focus-visible::after { outline: 3px solid var(--navy); outline-offset: 3px; }

.panel { background: var(--surface); border: 1px solid #ECE9E2; border-radius: 14px; box-shadow: var(--shadow); padding: 28px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 1rem; }
caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #EFEDE7; vertical-align: top; }
thead th { background: var(--surface-alt); font-size: 0.875rem; font-weight: 600; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* Notes */
.note { border-left: 4px solid var(--navy); background: var(--surface); padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 24px 0; }
.note p:last-child { margin: 0; }
.note.general { border-left-color: var(--yellow); background: var(--chip-bg); color: #3F2A0A; }

/* Lists */
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.sources { font-size: 0.9375rem; }
.sources li { margin-bottom: 8px; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { margin: 0; border-bottom: 1px solid #EFEDE7; }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 0; cursor: pointer; }
.checklist input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); }
.checklist .detail { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.checklist .due { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--chip-text); background: var(--chip-bg); border-radius: 999px; padding: 0 8px; margin-left: 6px; }

/* Forms */
.form-group { margin: 0 0 24px; }
fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
legend, .label { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; font-size: 1.0625rem; }
.hint { display: block; color: var(--muted); font-size: 0.9375rem; margin: 0 0 10px; }
input[type="email"], input[type="text"] {
  font: inherit; width: 100%; max-width: 420px; min-height: 44px; padding: 8px 12px;
  border: 2px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--text);
}
.money { display: flex; align-items: stretch; max-width: 260px; }
.money span {
  display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-alt);
  border: 2px solid var(--border-strong); border-right: 0; border-radius: 6px 0 0 6px; font-weight: 600;
}
.money input { border-radius: 0 6px 6px 0; }
input:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.choice { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 0 0 10px; cursor: pointer; }
.choice input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); }
.consent { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px; max-width: 560px; }
.consent .choice { margin: 0; }
.error-message { display: block; color: var(--danger-fg); font-weight: 600; margin: 0 0 8px; }
.has-error input[type="email"], .has-error input[type="text"], .has-error .money span { border-color: var(--danger-fg); }
.has-error { border-left: 4px solid var(--danger-fg); padding-left: 14px; }
.error-summary { border: 3px solid var(--danger-fg); background: #fff; padding: 16px 20px; border-radius: 10px; margin-bottom: 28px; }
.error-summary h2 { margin: 0 0 8px; font-size: 1.125rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--danger-fg); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; }
.form-status:empty { display: none; }
.status { padding: 14px 16px; border-radius: 10px; }
.status.ok { background: var(--success-bg); color: #14532D; }
.status.err { background: var(--danger-bg); color: #7F1D1D; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 8px 0 16px; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details[open] summary { margin-bottom: 8px; }

/* Checker result */
.result { margin-top: 32px; }
.result[hidden] { display: none; }
.result-card { border-radius: 14px; padding: 24px 28px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.result-card h2 { margin-top: 0; }
.result-card.yes { border-top: 6px solid var(--navy); }
.result-card.now { border-top: 6px solid var(--danger-fg); }
.result-card.later { border-top: 6px solid var(--yellow); }
.result-card.no { border-top: 6px solid var(--success-fg); }
.figure { font-variant-numeric: tabular-nums; font-weight: 700; }

/* FAQ */
.faq h3 { margin-top: 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0 40px; font-size: 0.9375rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  main { padding-top: 32px; }
  .panel, .result-card { padding: 20px; }
  h2 { margin-top: 40px; }
}

@media print {
  .site-header, .site-footer, .waitlist, .no-print { display: none !important; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.section-gap { margin-top: 48px; }
.panel > h2:first-child, .waitlist > h2:first-child { margin-top: 0; }
