:root {
  --ink: #0d2340;
  --muted: #64748b;
  --line: #e5eaf0;
  --surface: #ffffff;
  --page: #f7f9fc;
  --focus: #0a5b88;
  --shadow: 0 18px 60px rgba(13, 35, 64, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -100px, rgba(0, 80, 126, 0.055), transparent 36%),
    var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(100% - 32px, 900px);
  min-height: 104px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.brand-mark {
  width: clamp(106px, 11vw, 138px);
  height: auto;
}

.application-shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 64px) 0 clamp(42px, 7vw, 76px);
}
.application-intro {
  max-width: 700px;
  margin: 0 auto 24px;
  padding-inline: 4px;
}
.eyebrow {
  margin: 0 0 10px;
  color: #146b9d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 9px;
  border-radius: 999px;
  background: currentColor;
}
h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.intro-copy {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}

.form-card {
  position: relative;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(10px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.tally-frame {
  display: block;
  width: 100%;
  min-height: 660px;
  border: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 180ms ease;
}
.tally-frame.is-ready { opacity: 1; }
.form-loading {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.form-loading.is-hidden { display: none; }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d8e0e8;
  border-top-color: #0a5b88;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.noscript-note {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: #f2f6fa;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.noscript-note a { color: var(--focus); font-weight: 700; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 58%, white);
  outline-offset: 3px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 24px, 900px);
    min-height: 86px;
  }
  .brand-mark { width: 100px; }
  .application-shell {
    width: min(100% - 20px, 820px);
    padding-top: 28px;
    padding-bottom: 38px;
  }
  .application-intro {
    margin-bottom: 20px;
    padding-inline: 6px;
  }
  h1 {
    font-size: clamp(36px, 11vw, 46px);
    line-height: 1.02;
  }
  .intro-copy { margin-top: 12px; }
  .form-card {
    padding: 4px;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(13, 35, 64, 0.08);
  }
  .tally-frame { min-height: 720px; }
}

@media (max-width: 360px) {
  .application-shell { width: min(100% - 14px, 820px); }
  .application-intro { padding-inline: 8px; }
  .form-card { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
