/* Self-hosted fonts (SIL Open Font License, see /fonts) */
@font-face { font-family: "Saira"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/saira-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Saira"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/saira-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Saira"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/saira-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Saira"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/saira-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Saira"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/saira-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Saira"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/saira-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/public-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/public-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/public-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/public-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/public-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/public-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --blue: #1E4F9C;
  --blue-deep: #143C7A;
  --navy: #0F2A55;
  --red: #E2252B;
  --graphite: #4A4F57;
  --ink: #16202F;
  --muted: #5E6878;
  --paper: #F1F4F9;
  --surface: #FFFFFF;
  --line: #D5DDE9;
  --line-strong: #B9C5D6;
  --blue-wash: #E8EFFA;
  --red-wash: #FDECEC;
  --ok: #1D7A4F;

  --display: "Saira", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
[hidden] { display: none !important; }

/* Coverage rings behind everything */
.backdrop {
  position: fixed; inset: 0; width: 100%; height: 100%;
  color: var(--line); pointer-events: none; z-index: 0;
}
.backdrop circle { stroke-width: 1; }
.backdrop .pulse { stroke: var(--blue); stroke-width: 1.5; opacity: 0; transform-origin: 1080px 820px; animation: ping 6s ease-out 1s infinite; }
@keyframes ping {
  0% { transform: scale(1); opacity: .35; }
  100% { transform: scale(4.4); opacity: 0; }
}

.shell {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 56px; padding: 48px 32px 64px;
  align-items: start;
}

/* Side column */
.side { position: sticky; top: 40px; }
.brand { display: block; width: min(300px, 100%); margin: 0 0 36px -4px; }
.side h1 {
  font: 700 2.25rem/1.05 var(--display);
  letter-spacing: -0.01em; color: var(--navy);
  margin: 0 0 14px;
}
.intro { color: var(--muted); margin: 0 0 32px; max-width: 34ch; }

.brief {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 22px;
}
.brief h2 { font: 600 1.05rem/1.2 var(--display); margin: 0 0 10px; color: var(--navy); }
.brief-empty { margin: 0; color: var(--muted); font-size: .92rem; }
.brief-list { margin: 0; display: grid; gap: 10px; }
.brief-list > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; font-size: .9rem; }
.brief-list > div.fresh { animation: settle .35s ease-out; }
.brief-list dt { color: var(--muted); }
.brief-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@keyframes settle { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.side-foot { margin: 28px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.side-foot a { color: inherit; }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(15, 42, 85, .04), 0 24px 48px -28px rgba(15, 42, 85, .28);
  padding: 36px 44px 32px;
}

/* Progress rail: the logo's red line and ball */
.rail { margin: 0 0 40px; }
.rail-line { position: relative; height: 18px; margin: 0 10px 10px 4px; }
.rail-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px;
  background: var(--line); border-radius: 2px;
}
.rail-fill {
  position: absolute; left: 0; top: 8px; height: 2px; width: 0;
  background: var(--red); border-radius: 2px;
  transition: width .6s cubic-bezier(.65, 0, .35, 1);
}
.rail-dot {
  position: absolute; top: 0; left: 0; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #FF7A7E 0 18%, var(--red) 46%, #A3121A 100%);
  box-shadow: 0 3px 6px rgba(163, 18, 26, .35);
  transition: left .6s cubic-bezier(.65, 0, .35, 1);
}
.rail-steps { list-style: none; margin: 0 10px 0 4px; padding: 0; position: relative; height: 28px; }
.rail-steps li { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.rail-steps li:nth-child(1) { left: 0; transform: translateX(-4px); }
.rail-steps li:nth-child(2) { left: 25%; }
.rail-steps li:nth-child(3) { left: 50%; }
.rail-steps li:nth-child(4) { left: 75%; }
.rail-steps li:nth-child(5) { left: auto; right: -10px; transform: none; }
.rail-now { display: none; margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.rail-steps button {
  appearance: none; background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font: 500 .85rem/1.2 var(--body); color: var(--muted);
  display: inline-flex; gap: 6px; align-items: baseline;
  border-radius: var(--r-sm);
}
.rail-steps button:disabled { cursor: default; opacity: .55; }
.rail-steps .n { font-family: var(--display); font-weight: 600; }
.rail-steps li.is-current button { color: var(--navy); font-weight: 600; }
.rail-steps li.is-done button { color: var(--blue); }

/* Steps */
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step.enter { animation: stepIn .38s ease-out; }
.step.enter-back { animation: stepBack .38s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
legend {
  font: 700 1.75rem/1.15 var(--display); color: var(--navy);
  padding: 0; margin: 0 0 8px; letter-spacing: -0.005em;
}
.lede { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

.field { margin: 0 0 20px; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.hint { margin: -2px 0 8px; font-size: .85rem; color: var(--muted); }
.field > .hint:last-of-type:not(:first-child) { margin: 6px 0 0; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], textarea {
  width: 100%; min-height: 48px;
  padding: 11px 14px;
  font: 400 1rem/1.4 var(--body); color: var(--ink);
  background: #FBFCFE;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #8B95A5; }
input:hover, textarea:hover { border-color: #93A3BA; }
input:focus, textarea:focus {
  outline: none; background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 79, 156, .18);
}
.field.invalid input, .field.invalid textarea { border-color: var(--red); background: #FFFAFA; }
.err { margin: 6px 0 0; font-size: .85rem; color: #B3151B; min-height: 0; }
.err:empty { display: none; }
.form-err { margin-top: 12px; padding: 10px 14px; background: var(--red-wash); border-radius: var(--r-sm); }

.affix { display: flex; align-items: stretch; }
.affix-pre {
  display: grid; place-items: center; padding: 0 12px;
  background: var(--blue-wash); color: var(--blue-deep); font-weight: 600; font-size: .9rem;
  border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.affix input { border-radius: 0 var(--r-sm) var(--r-sm) 0; font-variant-numeric: tabular-nums; }

.group { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 6px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.group h3 { font: 600 1.1rem/1.2 var(--display); margin: 0 0 4px; color: var(--navy); }
.check-inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: .9rem; cursor: pointer; margin: 0; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }

/* Service tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.tile { position: relative; margin: 0; cursor: pointer; font-weight: 400; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-body {
  display: grid; gap: 6px; height: 100%;
  padding: 20px 20px 18px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  background: #FBFCFE;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.tile-ico { width: 40px; height: 40px; color: var(--graphite); margin-bottom: 6px; transition: color .15s; }
.tile-title { font: 600 1.08rem/1.25 var(--display); color: var(--ink); }
.tile-text { font-size: .9rem; color: var(--muted); }
.tile-body::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px;
  border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff;
}
.tile:hover .tile-body { border-color: #93A3BA; }
.tile input:focus-visible + .tile-body { box-shadow: 0 0 0 3px rgba(30, 79, 156, .25); }
.tile input:checked + .tile-body { border-color: var(--blue); background: var(--blue-wash); }
.tile input:checked + .tile-body .tile-ico { color: var(--blue); }
.tile input:checked + .tile-body::after {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 20px; margin-top: 24px; }
.count { animation: settle .3s ease-out; }
.count .hint { min-height: 2.6em; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; }
.stepper input { text-align: center; border-radius: 0; font-variant-numeric: tabular-nums; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button {
  appearance: none; border: 1px solid var(--line-strong); background: #fff; color: var(--blue);
  font: 600 1.3rem/1 var(--body); cursor: pointer;
}
.stepper button:first-child { border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.stepper button:last-child { border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.stepper button:hover { background: var(--blue-wash); }
.stepper button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.meter {
  margin: 4px 0 0; padding: 12px 16px;
  border-radius: var(--r-sm); background: var(--paper);
  font-size: .92rem; color: var(--graphite);
}
.meter strong { color: var(--navy); font-family: var(--display); font-size: 1.05rem; }

/* Timeline */
.timeline { margin: 12px 0 0; padding: 22px 24px 18px; background: var(--paper); border-radius: var(--r-md); }
.tl-track { position: relative; height: 2px; background: var(--line-strong); margin: 9px 9px 0; }
.tl-span { position: absolute; top: -1px; height: 4px; left: 0; width: 0; background: var(--red); border-radius: 2px; transition: left .4s ease, width .4s ease; }
.tl-points { list-style: none; margin: -10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.tl-points li { display: grid; gap: 2px; justify-items: center; text-align: center; }
.tl-points li:first-child { justify-items: start; text-align: left; }
.tl-points li:last-child { justify-items: end; text-align: right; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); margin-bottom: 8px; transition: background-color .2s, border-color .2s; }
li.is-set .tl-dot { border-color: var(--blue); background: var(--blue); }
li[data-tl=event].is-set .tl-dot { border-color: var(--red); background: var(--red); }
.tl-k { font-size: .8rem; color: var(--muted); }
.tl-v { font: 600 .98rem/1.2 var(--display); color: var(--navy); }
.timeline figcaption { margin-top: 14px; font-size: .88rem; color: var(--graphite); }
.timeline.bad figcaption { color: #B3151B; }

/* Review */
.review { display: grid; gap: 14px; margin-bottom: 26px; }
.rv {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px;
}
.rv-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.rv-head h3 { font: 600 1rem/1.2 var(--display); margin: 0; color: var(--navy); }
.rv-edit { appearance: none; border: 0; background: none; color: var(--blue); font: 600 .88rem var(--body); cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.rv-edit:hover { text-decoration: underline; }
.rv dl { margin: 0; display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: .93rem; }
.rv dt { color: var(--muted); }
.rv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
legend:focus { outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.turnstile { margin-top: 8px; }

/* Actions */
.actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.actions-gap { flex: 1; }
.saved { font-size: .82rem; color: var(--muted); }
.btn {
  appearance: none; cursor: pointer;
  min-height: 48px; padding: 0 26px;
  font: 600 1rem/1 var(--display); letter-spacing: .01em;
  border-radius: var(--r-sm); border: 1.5px solid transparent;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(30, 79, 156, .35); outline-offset: 2px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.primary[disabled] { opacity: .65; cursor: progress; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--blue); background: var(--blue-wash); }
.btn.ghost[aria-hidden=true] { visibility: hidden; }

/* Done */
.done { text-align: left; padding-top: 44px; }
.done:focus { outline: none; }
.done-mark { width: 150px; height: 30px; margin-bottom: 18px; overflow: visible; }
.done-mark line { stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw .7s ease-out forwards; }
.done-mark circle { fill: var(--red); transform-origin: 108px 12px; transform: scale(0); animation: pop .35s .6s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
.done h2 { font: 700 2rem/1.1 var(--display); color: var(--navy); margin: 0 0 12px; }
.done p { max-width: 56ch; }
.muted { color: var(--muted); }
.done .btn { margin-top: 10px; }

/* 404 */
.nf { max-width: 560px; width: calc(100% - 32px); margin: 12vh auto 0; position: relative; z-index: 1; }
.nf img { width: 220px; margin-bottom: 28px; }
.nf h1 { font: 700 1.8rem/1.1 var(--display); color: var(--navy); margin: 0 0 10px; }
.nf .btn { display: inline-grid; place-items: center; text-decoration: none; margin-top: 8px; }

/* Responsive */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; gap: 28px; padding: 28px 20px 48px; }
  .side { position: static; }
  .brand { width: 230px; margin-bottom: 22px; }
  .side h1 { font-size: 1.9rem; }
  .intro { max-width: 60ch; margin-bottom: 0; }
  .brief, .side-foot { display: none; }
}
@media (max-width: 620px) {
  .shell { padding: 20px 16px 40px; }
  .card { padding: 24px 18px 22px; border-radius: 14px; }
  .row, .tiles { grid-template-columns: 1fr; gap: 0 16px; }
  .tiles { gap: 12px; }
  legend { font-size: 1.45rem; }
  .rail { margin-bottom: 28px; }
  .rail-steps .t { display: none; }
  .rail-steps { height: 24px; }
  .rail-now { display: block; }
  .count .hint { min-height: 0; }
  .rv dl { grid-template-columns: 1fr; gap: 0; }
  .rv dd { margin-bottom: 8px; }
  .tl-v { font-size: .86rem; }
  .actions { flex-wrap: wrap; }
  .saved { order: 3; width: 100%; text-align: center; }
  .btn { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .done-mark line { stroke-dashoffset: 0; }
  .done-mark circle { transform: none; }
}

/* ---------- v2 fields ---------- */
.req { color: var(--red); font-weight: 700; margin-left: 2px; }
.lede:has(+ .req-note) { margin-bottom: 6px; }
.req-note { margin: 0 0 24px; font-size: .85rem; color: var(--muted); }
.req-note .req { margin: 0 2px 0 0; }
.q { font-weight: 600; font-size: .95rem; margin: 0 0 8px; }
.hint.after { margin: 6px 0 0; }
.group h3 .opt, .q .opt { font-family: var(--body); font-weight: 400; }
.field > .err + .reveal, .choices + .reveal, .choices + .err + .reveal { margin-top: 14px; }
.reveal { margin-bottom: 0; animation: settle .25s ease-out; }
input.after { margin-top: 10px; }
.check-inline.below { margin-top: 10px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; margin: 0; font-weight: 500; font-size: .92rem; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #FBFCFE; color: var(--ink);
  transition: border-color .15s, background-color .15s;
}
.choice span::before {
  content: ""; width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--line-strong); background: #fff;
}
.choice input[type=checkbox] + span::before { border-radius: 4px; }
.choice input[type=radio] + span::before { border-radius: 50%; }
.choice:hover span { border-color: #93A3BA; }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(30, 79, 156, .25); }
.choice input:checked + span { border-color: var(--blue); background: var(--blue-wash); color: var(--blue-deep); }
.choice input[type=checkbox]:checked + span::before {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.choice input[type=radio]:checked + span::before { border-color: var(--blue); box-shadow: inset 0 0 0 3.5px #fff; background: var(--blue); }

select.affix-pre {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 600 .92rem var(--body); padding: 0 28px 0 12px; min-height: 48px;
  background: var(--blue-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23143C7A' stroke-width='1.8'/%3E%3C/svg%3E") right 9px center/10px no-repeat;
}
select.affix-pre:focus { outline: none; box-shadow: 0 0 0 3px rgba(30, 79, 156, .18); border-color: var(--blue); }

.tiles { grid-template-columns: 1fr 1fr; }

/* connection rows */
.cp-head, .cp-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 128px 40px; gap: 10px; align-items: center; }
.cp-head { font-size: .82rem; color: var(--muted); margin: 10px 0 6px; }
.cp-head:has(+ .cp-rows:empty) { display: none; }
.cp-rows { display: grid; gap: 10px; }
.cp-row select {
  width: 100%; min-height: 48px; padding: 0 30px 0 12px; font: 400 1rem var(--body); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); appearance: none; -webkit-appearance: none;
  background: #FBFCFE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E6878' stroke-width='1.8'/%3E%3C/svg%3E") right 11px center/10px no-repeat;
}
.cp-row select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 79, 156, .18); }
.cp-remove {
  appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.cp-remove:hover { color: #B3151B; border-color: #E8A8AA; background: var(--red-wash); }
.cp-remove:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cp-foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.cp-total { font-size: .9rem; color: var(--graphite); }
.cp-total strong { font-family: var(--display); color: var(--navy); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .92rem; }

/* upload */
.drop {
  position: relative; display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 24px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  background: #FBFCFE; cursor: pointer; font-weight: 400; margin: 0;
  transition: border-color .15s, background-color .15s;
}
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-wash); }
.drop:focus-within { box-shadow: 0 0 0 3px rgba(30, 79, 156, .25); border-color: var(--blue); }
.drop-main { font-weight: 600; color: var(--ink); }
.drop-main u { color: var(--blue); text-underline-offset: 3px; }
.drop-sub { font-size: .85rem; color: var(--muted); }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: .92rem;
}
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-list .fsize { color: var(--muted); font-size: .85rem; white-space: nowrap; }

.rv dd { white-space: pre-line; }

@media (max-width: 620px) {
  .tiles { grid-template-columns: 1fr; }
  .cp-head { display: none; }
  .cp-row { grid-template-columns: minmax(0, 1fr) 84px 40px; grid-template-areas: "area qty rm" "type type type"; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .cp-row .cp-area { grid-area: area; }
  .cp-row .cp-qty { grid-area: qty; }
  .cp-row .cp-type { grid-area: type; }
  .cp-row .cp-remove { grid-area: rm; }
  .choice span { min-height: 40px; padding: 7px 12px; }
}
