:root {
  --paper: #F2F4EE;
  --paper-2: #E6EBE0;
  --ink: #14243B;
  --ink-soft: #4A5869;
  --rule: #B9C3B4;
  --green: #1F7A4E;
  --green-deep: #155A39;
  --yellow: #F2C230;
  --white: #FFFFFF;
  --red: #A33A2B;

  --font: "Public Sans", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.4rem;
  --step-4: clamp(2.6rem, 6vw, 4.6rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Buttons */
.btn {
  display: inline-block;
  font: 700 var(--step-0)/1 var(--font);
  text-decoration: none;
  padding: 0.95em 1.4em;
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--white); border-color: var(--white); }
.btn-small { font-size: var(--step--1); padding: 0.7em 1em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.seal { width: 44px; height: 44px; color: var(--ink); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.brand-text span { font-size: 0.8rem; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--green); }
.nav-toggle {
  display: none;
  font: 700 0.95rem var(--font);
  background: none; border: 2px solid var(--ink); border-radius: 4px;
  padding: 8px 14px; color: var(--ink); cursor: pointer;
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 112px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.lede {
  margin-top: 28px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* The form: signature element */
.form-ers {
  margin: 0;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.form-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  border-bottom: 2px solid var(--ink);
}
.form-head > * { padding: 14px 16px; }
.form-id {
  border-right: 2px solid var(--ink);
  display: flex; flex-direction: column; justify-content: center;
}
.form-no { font-size: 0.75rem; font-weight: 600; }
.form-big { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.form-title { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; }
.form-title strong { font-size: 1.05rem; font-weight: 800; }
.form-title span { font-size: 0.82rem; color: var(--ink-soft); }
.form-year {
  border-left: 2px solid var(--ink);
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: var(--ink); color: var(--white);
}
.form-year span { font-size: 0.72rem; opacity: .8; }
.form-year strong { font-size: 1.5rem; font-weight: 900; line-height: 1; }

.form-lines { list-style: none; margin: 0; padding: 0; }
.form-lines li {
  display: grid;
  grid-template-columns: 44px 1fr minmax(9.5em, auto);
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}
.form-lines .ln {
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.95rem;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}
.form-lines .desc { padding: 14px 14px; font-size: 0.95rem; align-self: center; }
.form-lines .desc em { font-style: normal; color: var(--ink-soft); }
.form-lines .amt {
  padding: 14px 16px;
  text-align: right;
  font-weight: 700;
  font-size: 1.15rem;
  border-left: 1px solid var(--rule);
  align-self: stretch;
  display: flex; align-items: center; justify-content: flex-end;
}
.form-lines .amt.neg::before { content: "−"; margin-right: 2px; }
.form-lines .subtotal { border-bottom: 2px solid var(--ink); }
.form-lines .total { background: #E5F1EA; border-bottom: 2px solid var(--ink); }
.form-lines .total .ln { background: var(--green); color: var(--white); border-right-color: var(--green); }
.form-lines .total .desc { font-weight: 700; }
.form-lines .total .amt { color: var(--green-deep); font-size: 1.5rem; font-weight: 900; }

.form-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px; font-size: 0.95rem;
}
.form-foot strong { font-variant-numeric: tabular-nums; }
.stamp {
  font-weight: 900; font-size: 1rem; letter-spacing: 0.02em;
  color: var(--green);
  border: 3px solid var(--green);
  border-radius: 6px;
  padding: 4px 12px;
  transform: rotate(-6deg);
  opacity: 0;
}
.form-ers.done .stamp { animation: stamp .35s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stamp {
  from { opacity: 0; transform: rotate(-6deg) scale(1.8); }
  to   { opacity: .9; transform: rotate(-6deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .stamp { opacity: .9; } }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 2px solid var(--ink); }
.section h2 {
  font-size: var(--step-3);
  font-weight: 900;
  letter-spacing: -0.03em;
}
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.section-head p { font-size: var(--step-1); color: var(--ink-soft); max-width: 40ch; }

.section-ink { background: var(--ink); color: var(--paper); border-top-color: var(--ink); }
.section-ink .section-head p { color: #B8C3CF; }
.section-tint { background: var(--paper-2); }

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.steps li { padding: 28px 28px 8px 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.step-n {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 2px solid var(--ink); border-radius: 50%;
  font-weight: 900; margin-bottom: 20px;
}
.steps li:last-child .step-n { background: var(--green); border-color: var(--green); color: var(--white); }
.steps h3 { font-size: var(--step-1); font-weight: 800; margin-bottom: 10px; }
.steps p { color: var(--ink-soft); max-width: 36ch; }

/* Roster table */
.table-scroll { overflow-x: auto; }
.roster {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  min-width: 680px;
}
.roster th, .roster td { text-align: left; padding: 18px 16px; border-bottom: 1px solid #33455E; vertical-align: top; }
.roster thead th {
  font-size: 0.85rem; font-weight: 600; color: #B8C3CF;
  border-bottom: 2px solid var(--paper);
}
.roster tbody th { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.roster td { color: #D5DCE3; }
.roster .num { text-align: right; white-space: nowrap; }
.roster td.num { color: var(--paper); font-weight: 600; }
.class-tag {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; margin-right: 12px;
  background: var(--yellow); color: var(--ink);
  font-weight: 900; font-size: 0.85rem; border-radius: 4px;
  vertical-align: middle;
}

.hire {
  margin-top: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px;
  border: 2px solid var(--yellow);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(242,194,48,.08) 14px 28px);
}
.hire h3 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.hire p { color: #B8C3CF; max-width: 52ch; }

/* Qualify */
.qualify-grid { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: clamp(40px, 6vw, 88px); align-items: start; }
.lede-sm { margin-top: 20px; font-size: var(--step-1); color: var(--ink-soft); max-width: 38ch; }
.checklist { list-style: none; padding: 0; margin: 32px 0 0; }
.checklist li { padding: 12px 0 12px 36px; border-top: 1px solid var(--rule); position: relative; font-weight: 600; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 16px; height: 9px;
  border-left: 3px solid var(--green); border-bottom: 3px solid var(--green);
  transform: rotate(-45deg);
}

.eligibility {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 8px 24px 24px;
}
.eligibility fieldset { border: 0; border-bottom: 1px solid var(--rule); margin: 0; padding: 20px 0; }
.eligibility legend { font-weight: 700; padding: 0; margin-bottom: 12px; display: flex; gap: 12px; align-items: baseline; float: left; width: 100%; }
.eligibility legend + * { clear: both; }
.eligibility .ln {
  flex: none; display: inline-grid; place-items: center;
  width: 26px; height: 26px; background: var(--ink); color: var(--white);
  font-size: 0.8rem; font-weight: 800;
}
.eligibility label {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 20px 4px 38px; cursor: pointer;
}
.eligibility input[type="radio"] { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
.eligibility .btn { margin-top: 24px; width: 100%; }
.result { margin-top: 20px; padding: 16px 18px; border-left: 6px solid var(--green); background: #E5F1EA; }
.result.maybe { border-left-color: var(--yellow); background: #FBF3D6; }
.result.no { border-left-color: var(--ink-soft); background: var(--paper); }
.result.error { border-left-color: var(--red); background: #F7E4E0; }
.result strong { display: block; margin-bottom: 4px; }

/* Ledger */
.ledger-bar {
  display: flex; height: 72px;
  border: 2px solid var(--ink);
  background: var(--white);
}
.seg { width: calc(var(--w) * 1%); transform-origin: left; }
.seg + .seg { border-left: 2px solid var(--paper-2); }
.seg-a { background: var(--green); }
.seg-b { background: var(--ink); }
.seg-c { background: #5B6E86; }
.seg-d { background: var(--yellow); }
.seg-e { background: #A6B1A2; }
.ledger-key {
  margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
}
.ledger-key > div { padding: 12px 16px 12px 0; border-top: 2px solid var(--ink); }
.ledger-key > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.ledger-key dt { font-size: 0.95rem; color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.ledger-key dd { margin: 4px 0 0; font-size: var(--step-3); font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sw { width: 12px; height: 12px; flex: none; display: inline-block; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 22px 48px 22px 0; position: relative;
  font-size: var(--step-1); font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 1.8rem; font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-soft); max-width: 62ch; }

/* About page */
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.about-hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 104px); }
.about-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 20ch;
}
.about-intro {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px;
  border-top: 2px solid var(--ink); padding-top: 28px;
}
.about-intro p { font-size: var(--step-1); color: var(--ink-soft); max-width: 42ch; }

.record {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}
.record-head { display: grid; grid-template-columns: auto 1fr; border-bottom: 2px solid var(--ink); }
.record-head > * { padding: 14px 16px; }
.record-body { display: grid; grid-template-columns: 300px 1fr; }
.record-id { border-right: 2px solid var(--ink); background: var(--paper); padding: 24px; }
.monogram {
  width: 112px; height: 112px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--yellow);
  font-size: 2.6rem; font-weight: 900; letter-spacing: -0.04em;
  border-radius: 50%;
  margin-bottom: 20px;
}
.record-fields { margin: 0; }
.record-fields > div { padding: 10px 0; border-top: 1px solid var(--rule); }
.record-fields dt { font-size: 0.8rem; color: var(--ink-soft); }
.record-fields dd { margin: 2px 0 0; font-weight: 700; line-height: 1.3; }
#tyler-name { font-size: 1.3rem; font-weight: 900; letter-spacing: -0.01em; }
.record-link {
  display: inline-block; margin-top: 16px;
  font-weight: 700; color: var(--green-deep);
  text-underline-offset: 3px;
}
.record-bio { padding: clamp(24px, 4vw, 40px); }
.record-bio p { max-width: 64ch; color: var(--ink-soft); }
.record-bio p + p { margin-top: 16px; }
.record-bio .bio-lede { font-size: var(--step-1); color: var(--ink); font-weight: 600; line-height: 1.4; margin-bottom: 20px; }
.record-bio h3 { font-size: var(--step-1); font-weight: 800; margin: 36px 0 8px; }
.record-skills { list-style: none; margin: 0; padding: 0; max-width: 64ch; }
.record-skills li { padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-soft); }
.record-skills strong { color: var(--ink); }

.seats-title { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; margin: 80px 0 20px; }
.seats { width: 100%; border-collapse: collapse; min-width: 560px; }
.seats th, .seats td { text-align: left; padding: 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.seats thead th { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.seats tbody th { font-weight: 800; white-space: nowrap; }
.seats td { color: var(--ink-soft); }
.status {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  padding: 2px 10px; border: 2px solid var(--green); color: var(--green-deep); border-radius: 4px;
}
.seats-cta { margin-top: 24px; }
.seats-cta a { font-weight: 700; color: var(--green-deep); }

/* Footer */
.site-footer { background: var(--ink); color: #B8C3CF; padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px 48px; }
.site-footer strong { color: var(--paper); font-size: 1.1rem; }
.site-footer p { margin-top: 8px; max-width: 52ch; font-size: 0.95rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--paper); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.fine { grid-column: 1 / -1; border-top: 1px solid #33455E; padding-top: 20px; font-size: 0.85rem !important; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .qualify-grid, .faq-wrap { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .about-intro { grid-template-columns: 1fr; }
  .record-body { grid-template-columns: 1fr; }
  .record-id { border-right: 0; border-bottom: 2px solid var(--ink); }
  .ledger-key { grid-template-columns: repeat(2, 1fr); }
  .ledger-key > div + div { padding-left: 0; border-left: 0; }
  .ledger-key > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; text-align: center; }
}

@media (max-width: 520px) {
  .brand-text span { display: none; }
  .form-ers { box-shadow: 6px 6px 0 var(--ink); }
  .form-head { grid-template-columns: auto 1fr; }
  .form-year { grid-column: 1 / -1; border-left: 0; border-top: 2px solid var(--ink); flex-direction: row; gap: 8px; justify-content: center; align-items: baseline; padding: 8px; }
  .form-lines li { grid-template-columns: 36px 1fr; }
  .form-lines .amt { grid-column: 2; border-left: 0; padding-top: 0; font-size: 1.1rem; }
  .form-lines .desc { padding-bottom: 4px; }
  .eligibility { padding: 4px 16px 20px; box-shadow: 6px 6px 0 var(--ink); }
  .eligibility label { margin-left: 0; }
  .hire { padding: 24px; }
}
