/* Software Development Grant: online application */

:root {
  --navy-950: #08162b;
  --navy-900: #0b1d38;
  --navy-800: #102a4c;
  --navy-700: #1a3a63;
  --navy-500: #4a6487;
  --navy-100: #e4eaf2;
  --navy-050: #f1f4f9;

  --ink: #121a27;
  --ink-2: #3d4757;
  --ink-3: #687284;
  --line: #d3dae3;
  --line-strong: #b4bfcc;
  --line-soft: #e6eaf0;
  --bg: #f3f5f8;
  --surface: #ffffff;

  --ok: #1c6a4f;
  --err: #a2232d;
  --err-050: #fbf0f1;

  --focus-ring: 0 0 0 3px rgba(26, 58, 99, 0.14);
  --radius: 3px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy-800); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-950); }
:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.muted { color: var(--ink-3); }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- masthead */

.masthead { background: var(--navy-900); color: #fff; }
.masthead__inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.wordmark {
  color: #fff; text-decoration: none; white-space: nowrap;
  font-size: 13.5px; letter-spacing: 0.12em;
}
.wordmark b { font-weight: 600; }
.wordmark span { font-weight: 400; opacity: 0.72; }
.wordmark:hover { color: #fff; }

.masthead__meta {
  margin: 0; display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; letter-spacing: 0.03em; color: rgba(255, 255, 255, 0.64);
  font-variant-numeric: tabular-nums;
}
.masthead__meta .sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.22); }

.topbar { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; display: none; }
.topbar i {
  display: block; height: 100%; background: var(--navy-700);
  transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.5s var(--ease);
}

/* ---------------------------------------------------------------- intro */

.intro { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.intro__inner { position: relative; padding-top: 72px; padding-bottom: 56px; }

.intro__title {
  margin: 0; max-width: 14ch;
  font-family: var(--serif); font-weight: 500; font-optical-sizing: auto;
  font-size: clamp(36px, 5vw, 54px); line-height: 1.04; letter-spacing: -0.018em;
  color: var(--navy-950);
}

.intro__lede { margin: 22px 0 0; max-width: 58ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

.introduced {
  display: inline-flex; align-items: center; gap: 8px; margin: 26px 0 0;
  padding: 7px 12px 7px 11px; font-size: 13.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.introduced strong { font-weight: 500; color: var(--ink); }
.introduced__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(28, 106, 79, 0.14); }
.introduced__code {
  margin-left: 4px; padding-left: 10px; border-left: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3);
}

.facts {
  margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-top: 2px solid transparent;
}
.facts::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -2px; height: 2px;
  background: var(--navy-800); transform-origin: left;
}
.facts__item { padding: 18px 22px 20px; border-left: 1px solid var(--line-soft); min-width: 0; }
.facts__item:first-child { border-left: 0; }
.facts dt { font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; }
.facts__value { margin-top: 8px !important; font-family: var(--serif); font-size: 21px; line-height: 1.2; color: var(--navy-950); font-variant-numeric: lining-nums; }
.facts__note { margin-top: 4px !important; font-size: 13px; color: var(--ink-3); }

/* Guilloche rosette: generated in form.js, drawn on load */
.guilloche {
  position: absolute; top: 44px; right: 40px; width: 380px; height: 380px;
  color: var(--navy-700); opacity: 0.34; pointer-events: none;
}
.guilloche path {
  fill: none; stroke: currentColor; stroke-width: 0.55;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 3.2s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 1ms);
}
.intro__title, .intro__lede, .introduced, .facts { position: relative; z-index: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- layout */

.layout {
  display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 56px;
  align-items: start; padding-top: 48px; padding-bottom: 96px;
}

.rail { align-self: stretch; } /* full column height so the inner block can stick */
.rail__sticky { position: sticky; top: 32px; }
.rail__nav { position: relative; list-style: none; margin: 0 0 28px; padding: 0; border-left: 1px solid var(--line); }
.rail__nav a {
  display: flex; align-items: center; gap: 12px; margin-left: -1px;
  padding: 9px 0 9px 16px; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: 14px;
  transition: color 0.2s, border-color 0.3s var(--ease);
}
.rail__nav a:hover { color: var(--ink); }
.is-submitted .rail__nav a { pointer-events: none; }
.rail__nav a.is-active { border-left-color: var(--navy-800); color: var(--ink); font-weight: 500; }
.rail__nav:has(.rail__mark) a.is-active { border-left-color: transparent; }
.rail__mark {
  position: absolute; left: -1px; top: 0; width: 2px; height: 0; opacity: 0; pointer-events: none;
  background: var(--navy-800); transition: transform 0.55s var(--ease), height 0.55s var(--ease), opacity 0.3s;
}
.rail__num { width: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.rail__label { flex: 1; }

.ring { width: 18px; height: 18px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 1.6; }
.ring__track { stroke: var(--line); }
.ring__fill {
  stroke: var(--navy-700); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  transition: stroke-dashoffset 0.6s var(--ease), fill 0.3s;
}
.ring__tick {
  fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(90deg); transform-origin: 10px 10px;
  stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset 0.35s var(--ease) 0.15s;
}
.is-complete .ring__fill { fill: var(--navy-700); }
.is-complete .ring__tick { stroke-dashoffset: 0; }

.rail__block { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.rail__block:first-of-type { margin-top: 0; }
.rail__value { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.rail__value a { text-decoration: none; }
.rail__value a:hover { text-decoration: underline; }

.meter { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.meter span:last-child { font-family: var(--mono); color: var(--ink); }
.meter__bar { height: 3px; margin-top: 8px; background: var(--line-soft); overflow: hidden; }
.meter__bar i { display: block; height: 100%; background: var(--navy-700); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.6s var(--ease); }
.rail__draft { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.rail__draft button {
  padding: 0; border: 0; background: none; font: inherit; color: var(--navy-800);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

/* ---------------------------------------------------------------- form sheet */

.sheet { min-width: 0; background: var(--surface); border: 1px solid var(--line); }

.section { padding: 44px 52px 48px; border-top: 1px solid var(--line-soft); }
.section:first-of-type { border-top: 0; }
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.section__num { transition: color 0.4s; }
.section__check { width: 20px; height: 20px; margin-left: auto; align-self: center; flex: none; opacity: 0; transform: scale(0.7); transition: opacity 0.3s, transform 0.5s var(--ease); }
.section__check circle {
  fill: none; stroke: var(--ok); stroke-width: 1.4; stroke-dasharray: 57; stroke-dashoffset: 57;
  transform: rotate(-90deg); transform-origin: 10px 10px; transition: stroke-dashoffset 0.7s var(--ease);
}
.section__check path {
  fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 0.35s var(--ease) 0.4s;
}
.section.is-complete .section__check { opacity: 1; transform: none; }
.section.is-complete .section__check circle, .section.is-complete .section__check path { stroke-dashoffset: 0; }
.section.is-complete .section__num { color: var(--ok); }
.section__num { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-3); }
.section__title {
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: 25px;
  line-height: 1.2; letter-spacing: -0.006em; color: var(--navy-950);
}
.section__intro { margin: -14px 0 28px; max-width: 62ch; color: var(--ink-2); font-size: 14.5px; }

/* Fields share row tracks (subgrid) so labels, hints and inputs align across a row. */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 20px; margin-bottom: -24px; }
.grid--tight { margin-top: 28px; margin-bottom: -14px; }
.f-6 { grid-column: span 6; }
.f-3 { grid-column: span 3; }
.f-2 { grid-column: span 2; }

.field {
  display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0;
  align-content: start; min-width: 0; margin-bottom: 24px;
}
.grid--tight .field { margin-bottom: 14px; }
.field > .label { grid-row: 1; }
.field > .hint { grid-row: 2; }
.field > .control, .field > .check, .field > .recaptcha-box { grid-row: 3; }
.field > .msgs { grid-row: 4; min-width: 0; }
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 500; color: var(--ink);
}
.opt { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.hint { margin: -2px 0 8px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.info { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-3); }
.info:empty { display: none; }
.info b { font-weight: 500; color: var(--ink-2); }
.linkbtn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 500; color: var(--navy-800);
  text-decoration: underline; text-underline-offset: 2px;
}

.control { position: relative; }
.control::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--navy-700); transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease); pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.control:focus-within::after { transform: scaleX(1); }
.is-invalid .control::after { background: var(--err); }

.input {
  display: block; width: 100%; height: 46px; margin: 0;
  padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #9aa3b0; }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--navy-700); box-shadow: var(--focus-ring); }
.mono-input { font-family: var(--mono); font-size: 14.5px; letter-spacing: 0.02em; }
.has-tick .input { padding-right: 40px; }

.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23687284' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
}
.select:invalid, .select.is-empty { color: #8a94a2; }
.select option { color: var(--ink); }

.textarea { height: auto; min-height: 210px; padding: 12px 14px; line-height: 1.6; resize: vertical; }

.is-invalid .input { border-color: var(--err); }
.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(162, 35, 45, 0.12); }

.tick {
  position: absolute; right: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.tick path {
  fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 0.4s var(--ease);
}
.is-valid .tick { opacity: 1; }
.is-valid .tick path { stroke-dashoffset: 0; }

.error {
  display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 0;
  font-size: 13px; line-height: 1.45; color: var(--err);
  animation: error-in 0.3s var(--ease);
}
.error::before {
  content: ""; flex: none; width: 14px; height: 14px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.25' fill='none' stroke='%23a2232d' stroke-width='1.3'/%3E%3Cpath d='M7 3.8v4M7 9.6v.3' stroke='%23a2232d' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.error[hidden] { display: none; }
@keyframes error-in { from { opacity: 0; transform: translateY(-3px); } }

/* Currency inputs */
.control--affix .affix {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 44px;
  display: grid; place-items: center; pointer-events: none;
  font: 500 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--ink-3);
  border-right: 1px solid var(--line-soft); background: var(--navy-050);
  border-radius: var(--radius) 0 0 var(--radius);
}
.control--affix .input { padding-left: 58px; }
.money { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

.textarea--short { min-height: 104px; }

/* Indicative annual value */
.impact {
  grid-column: 1 / -1; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 18px 22px; background: var(--navy-050);
  border: 1px solid var(--navy-100); border-left: 3px solid var(--navy-800);
}
.impact p { margin: 0; }
.impact__label { font-size: 14px; font-weight: 500; color: var(--ink); }
.impact__note { margin-top: 2px !important; font-size: 12.5px; color: var(--ink-3); }
.impact__value {
  display: flex; align-items: baseline; gap: 6px; white-space: nowrap;
  font-family: var(--mono); font-size: 26px; font-weight: 500; color: var(--navy-950);
  font-variant-numeric: tabular-nums; transition: color 0.3s;
}
.impact__cur { font-size: 14px; color: var(--ink-3); letter-spacing: 0.04em; }
.impact.is-empty .impact__value { color: var(--line-strong); }

/* Counter */
.counter { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter__bar { position: relative; width: 72px; height: 3px; background: var(--line-soft); overflow: hidden; flex: none; }
.counter__bar i {
  position: absolute; inset: 0; background: var(--line-strong); transform-origin: left;
  transform: scaleX(var(--p, 0)); transition: transform 0.3s var(--ease), background-color 0.3s;
}
.counter.is-enough .counter__bar i { background: var(--ok); }
.counter [data-count] { font-family: var(--mono); color: var(--ink-2); }

/* Key conditions and terms */
.conditions { padding: 22px 26px 18px; background: var(--navy-050); border: 1px solid var(--navy-100); border-left: 3px solid var(--navy-800); }
.conditions ol { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.conditions li {
  counter-increment: c; position: relative; padding: 0 0 10px 30px;
  font-size: 14.5px; line-height: 1.55; color: var(--ink);
}
.conditions li::before {
  content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 12px; color: var(--navy-500);
}

.terms { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.terms summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 500; font-size: 14.5px;
}
.terms summary::-webkit-details-marker { display: none; }
.terms summary svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; transition: transform 0.3s var(--ease); }
.terms[open] summary svg { transform: rotate(180deg); }
.terms summary:hover { background: var(--navy-050); }
.terms__body {
  max-height: 380px; overflow: auto; padding: 6px 22px 22px;
  border-top: 1px solid var(--line-soft); font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
  overscroll-behavior: contain;
}
.terms[open] .terms__body { animation: unfold 0.4s var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }
.terms__body h3 { display: flex; gap: 12px; margin: 18px 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.terms__body h3 .mono { width: 26px; font-weight: 400; color: var(--ink-3); }
.terms__body ol { margin: 0; padding: 0; list-style: none; }
.terms__body li { display: flex; gap: 12px; margin-bottom: 6px; }
.terms__body li .mono { flex: none; width: 26px; font-size: 12px; padding-top: 2px; color: var(--ink-3); }
.terms__body li p { margin: 0; }

/* Declaration checkboxes */
.check {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 18px; cursor: pointer; font-size: 14px; line-height: 1.55; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s, background-color 0.2s;
}
.check:hover { border-color: var(--line-strong); }
.check input {
  -webkit-appearance: none; appearance: none; display: grid; place-content: center;
  width: 20px; height: 20px; margin: 1px 0 0; cursor: pointer;
  background: var(--surface); border: 1.5px solid #8f99a7; border-radius: 2px;
  transition: background-color 0.2s, border-color 0.2s;
}
.check input::before {
  content: ""; width: 12px; height: 12px; background: #fff; transform: scale(0);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 9%, 38% 72%);
  transition: transform 0.2s var(--ease);
}
.check input:checked { background: var(--navy-800); border-color: var(--navy-800); }
.check input:checked::before { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.check.is-checked { border-color: var(--navy-700); background: var(--navy-050); color: var(--ink); }
.is-invalid .check { border-color: var(--err); }

.recaptcha-box { min-height: 78px; }

/* Error summary */
.summary {
  margin: 28px 0 0; padding: 18px 22px; background: var(--err-050);
  border: 1px solid rgba(162, 35, 45, 0.35); border-left: 4px solid var(--err);
}
.summary:focus { outline: none; }
.summary__title { margin: 0 0 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.summary__list { margin: 0; padding-left: 18px; font-size: 14px; }
.summary__list li { margin: 3px 0; }
.summary__list a { color: var(--err); }

/* Submit */
.submit-row { display: flex; align-items: center; gap: 22px 28px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px; border: 0; border-radius: var(--radius);
  background: var(--navy-800); color: #fff; cursor: pointer;
  font: 500 15px/1 var(--sans); letter-spacing: 0.01em; white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--navy-950); }
.btn:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 3px; }
.btn__arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn[disabled] { cursor: progress; }
.btn.is-busy { background: var(--navy-900); }
.btn.is-busy .btn__arrow { opacity: 0; }
.btn.is-busy::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 38%;
  background: rgba(255, 255, 255, 0.75); animation: busy 1.15s var(--ease) infinite;
}
@keyframes busy { from { transform: translateX(-100%); } to { transform: translateX(270%); } }

.btn--quiet { background: var(--surface); color: var(--navy-900); border: 1px solid var(--line-strong); height: 46px; }
.btn--quiet:hover { background: var(--navy-050); }

.fineprint { display: flex; gap: 9px; margin: 0; max-width: 46ch; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.fineprint svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-linejoin: round; }
.fineprint a { color: inherit; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* reCAPTCHA v3 badge: hidden, with the required disclosure shown beside the submit button */
.grecaptcha-badge { visibility: hidden; }

.notice { padding: 44px 52px; }
.notice p { margin: 12px 0 0; color: var(--ink-2); }
.notice--warn { padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--err-050); }
.notice--warn p { margin: 0; }

/* ---------------------------------------------------------------- acknowledgement */

.ack { padding: 48px 52px 52px; animation: ack-in 0.6s var(--ease); }
.ack:focus { outline: none; }
@keyframes ack-in { from { opacity: 0; transform: translateY(8px); } }

.ack__head { display: flex; gap: 20px; align-items: flex-start; }
.ack__seal { flex: none; width: 52px; height: 52px; }
.ack__seal circle, .ack__seal path {
  fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.ack__seal circle { animation: draw 0.9s var(--ease) 0.1s forwards; }
.ack__seal path { stroke-width: 2; animation: draw 0.5s var(--ease) 0.75s forwards; }
.ack__title { margin: 2px 0 0; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; color: var(--navy-950); }
.ack__lede { margin: 10px 0 0; max-width: 56ch; color: var(--ink-2); }
.ack__lede strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.ack__ref {
  display: flex; flex-direction: column; gap: 2px; margin: 34px 0 0; padding: 22px 26px;
  background: var(--navy-050); border: 1px solid var(--navy-100); border-left: 3px solid var(--navy-800);
}
.ack__ref .eyebrow { margin: 0; }
.ack__code { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: 0.06em; color: var(--navy-950); font-variant-numeric: tabular-nums; }

.ack__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line-soft); }
.ack__meta > div { padding: 14px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.ack__meta > div:nth-child(odd) { padding-right: 20px; }
.ack__meta dt { font-size: 12.5px; color: var(--ink-3); }
.ack__meta dd { margin: 2px 0 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }

.ack__h { margin-top: 36px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 0 0 22px; position: relative; }
.steps > li:not(:last-child)::before { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 6px; width: 1px; background: var(--line); }
.steps__n {
  display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--surface);
}
.steps p { margin: 3px 0 0; color: var(--ink-2); font-size: 14.5px; }
.steps .steps__title { margin-top: 3px; font-weight: 500; color: var(--ink); font-size: 15px; }
.docs { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.docs li { position: relative; padding: 7px 0 7px 22px; border-top: 1px solid var(--line-soft); }
.docs li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 1px; background: var(--ink-3); }

.ack__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.textlink { font-size: 14px; }

/* ---------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 40px; font-size: 13px; color: var(--ink-3); }
.footer p { margin: 0; max-width: 70ch; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .reveal { animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 60ms); }
  .layout { animation: rise 0.9s var(--ease) 0.36s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .guilloche path, .ack__seal circle, .ack__seal path { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- form motion */

/* Focused field: a quiet highlight behind label, hint and input */
.field { position: relative; z-index: 0; }
.field::before {
  content: ""; position: absolute; inset: -12px -14px -6px; z-index: -1; border-radius: 4px;
  background: var(--navy-050); opacity: 0; transform: scale(0.985); pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.field:focus-within::before { opacity: 1; transform: none; }
.label, .hint { transition: color 0.25s; }
.field:focus-within > .label { color: var(--navy-800); }
.field:focus-within > .hint { color: var(--ink-2); }

/* Indicative value: a soft ring when the figure changes */
.impact.is-pulse { animation: impact-ring 0.9s var(--ease); }
.impact.is-pulse .impact__value { animation: value-lift 0.6s var(--ease); }
@keyframes impact-ring { from { box-shadow: 0 0 0 0 rgba(26, 58, 99, 0.2); } to { box-shadow: 0 0 0 12px rgba(26, 58, 99, 0); } }
@keyframes value-lift { 35% { transform: translateY(-2px); } }

/* Declaration ticks settle with a small overshoot */
.check input:checked::before { animation: tick-pop 0.32s var(--ease); }
@keyframes tick-pop { 0% { transform: scale(0); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Submit: a single light sweep when every required field is complete */
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; opacity: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}
.btn.is-ready:not(.is-busy)::before { animation: sheen 1.5s var(--ease) 0.2s 1; }
.btn.is-ready:not(.is-busy) .btn__arrow { animation: nudge 1.1s var(--ease) 0.4s 2; }
@keyframes sheen { from { opacity: 1; transform: translateX(0); } to { opacity: 1; transform: translateX(420%); } }
@keyframes nudge { 40% { transform: translateX(4px); } }

.summary:not([hidden]) { animation: rise 0.45s var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  .facts::before { animation: rule-in 1.2s var(--ease) 0.55s both; }
  .facts__item { animation: rise 0.7s var(--ease) both; }
  .facts__item:nth-child(1) { animation-delay: 0.5s; }
  .facts__item:nth-child(2) { animation-delay: 0.58s; }
  .facts__item:nth-child(3) { animation-delay: 0.66s; }
  .facts__item:nth-child(4) { animation-delay: 0.74s; }

  /* Sections below the fold rise in, item by item, when reached */
  .will-reveal .section__head, .will-reveal .section__intro, .will-reveal .grid > *,
  .will-reveal .conditions, .will-reveal .terms, .will-reveal .submit-row { opacity: 0; transform: translateY(16px); }
  .will-reveal.is-revealed .section__head, .will-reveal.is-revealed .section__intro, .will-reveal.is-revealed .grid > *,
  .will-reveal.is-revealed .conditions, .will-reveal.is-revealed .terms, .will-reveal.is-revealed .submit-row {
    opacity: 1; transform: none;
    transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--k, 0) * 55ms);
  }
}
@keyframes rule-in { from { transform: scaleX(0); } }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .guilloche { width: 320px; height: 320px; top: 24px; right: -90px; opacity: 0.24; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .rail { display: none; }
  .topbar { display: block; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts__item:nth-child(3) { border-left: 0; }
  .facts__item:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .masthead__inner { height: 54px; }
  .wordmark { font-size: 12.5px; letter-spacing: 0.1em; }
  .masthead__meta span:not(:first-child) { display: none; }
  .intro__inner { padding-top: 44px; padding-bottom: 36px; }
  .intro__lede { font-size: 16px; }
  .guilloche { width: 260px; height: 260px; top: -112px; right: -118px; opacity: 0.2; }
  .facts { margin-top: 32px; }
  .facts__item { padding: 14px 16px 16px; }
  .facts__value { font-size: 18px; }
  .layout { padding-top: 20px; padding-bottom: 56px; }
  .section, .ack, .notice { padding: 32px 20px 36px; }
  .section__title { font-size: 22px; }
  .grid > * { grid-column: 1 / -1; }
  .conditions { padding: 18px 18px 12px; }
  .terms__body { padding: 4px 16px 18px; }
  .submit-row .btn { width: 100%; justify-content: center; }
  .ack__code { font-size: 24px; }
  .ack__meta { grid-template-columns: minmax(0, 1fr); }
  .ack__meta > div:nth-child(odd) { padding-right: 0; }
}

@media (max-width: 420px) {
  .facts__item { padding: 12px 12px 14px; }
  .facts__value { font-size: 16.5px; }
  .facts__note { font-size: 12px; }
}

/* ---------------------------------------------------------------- print (acknowledgement) */

@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; font-size: 11pt; }
  .masthead { background: none; color: var(--ink); border-bottom: 1.5pt solid var(--navy-900); }
  .wordmark, .wordmark:hover { color: var(--navy-900); }
  .masthead__meta { color: var(--ink-3); }
  .masthead__meta .sep { background: var(--line); }
  .wrap { padding: 0; max-width: none; }
  .intro, .rail, .footer, .topbar, .skip, .ack__actions, .guilloche { display: none !important; }
  .layout { display: block; padding: 0; animation: none; }
  .sheet { border: 0; }
  .ack { padding: 8mm 0 0; animation: none; }
  .ack__seal circle, .ack__seal path { animation: none; stroke-dashoffset: 0; }
  .ack__ref, .conditions { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .will-reveal * { opacity: 1 !important; transform: none !important; }
  .field::before { display: none; }
  .steps > li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
