/* ============================================================================
   RCORP MUN — layout & components
   Every value here comes from a token in theme.css. If you find yourself typing
   a hex code, a px radius or a font name in this file, put it in theme.css
   instead — that file is the swap point when the brand is finalised.
   ========================================================================== */

/* ---------- reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-black);
  margin: 0 0 var(--sp-4);
}
p { margin: 0 0 var(--sp-4); }
a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-accent-hover); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }
hr { border: 0; border-top: var(--bw) solid var(--c-line); margin: var(--sp-6) 0; }

/* Focus: visible, high-contrast, and never removed. Keyboard users are a hard
   requirement here — a fair chunk of applicants use screen readers on phones. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: var(--sp-3); top: var(--sp-3);
  transform: translateY(-200%);
  background: var(--c-accent); color: #fff;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  z-index: 100; font-weight: var(--fw-bold); text-decoration: none;
}
.skip-link:focus { transform: translateY(0); color: #fff; }

.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;
}

/* ---------- layout --------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-paper-2); border-block: var(--bw) solid var(--c-line); }

.section__head { max-width: 46rem; margin-bottom: var(--sp-6); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head h2 { font-size: var(--fs-h2); }
.section__head p { color: var(--c-muted-strong); font-size: var(--fs-lead); margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-accent); margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: ""; width: 1.75rem; height: var(--bw-strong);
  background: var(--c-accent); display: block;
}
.section__head--center .eyebrow::before { display: none; }

.grid { display: grid; gap: var(--sp-5); }
/* 26rem, not 20rem: at container width auto-fit would otherwise squeeze three
   columns in and strand a lone fourth card on its own row. */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

/* ---------- header --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-paper);
  border-bottom: var(--bw) solid var(--c-line);
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
/* The wordmark PNG is black-on-WHITE with no alpha. `mix-blend-mode: multiply`
   drops its white ground against any light surface so it never shows as a box.
   Do not put it on a dark background — see theme.css. */
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; flex: none; }
.brand img { height: 34px; width: auto; mix-blend-mode: multiply; }
.brand__year {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-sm); color: var(--c-muted);
  letter-spacing: var(--ls-label); padding-left: var(--sp-3);
  border-left: var(--bw) solid var(--c-line);
}

.nav-toggle {
  display: none; background: none; border: var(--bw) solid var(--c-line);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--c-ink); cursor: pointer;
}

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  color: var(--c-ink-2); text-decoration: none;
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md);
  white-space: nowrap;
}
.nav a:hover { background: var(--c-paper-3); color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-accent); }
/* The nav's CTA is a .btn. `.nav a` is a more specific selector than `.btn`, so
   without this it wins and paints the label ink-on-red — which is exactly what
   happened the first time this rendered. Restate the button colours here rather
   than reaching for !important. */
.nav a.btn { color: #fff; background: var(--c-accent); }
.nav a.btn:hover { color: #fff; background: var(--c-accent-hover); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-paper); border-bottom: var(--bw) solid var(--c-line);
    padding: var(--sp-3) var(--gutter) var(--sp-5);
    box-shadow: var(--sh-md);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: var(--sp-3); border-bottom: var(--bw) solid var(--c-line); border-radius: 0; }
  .nav .btn { margin-top: var(--sp-4); justify-content: center; border-bottom: 0; }
}

/* ---------- buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-size: var(--fs-body); font-weight: var(--fw-bold);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md);
  border: var(--bw-strong) solid var(--c-accent);
  background: var(--c-accent); color: #fff; text-decoration: none;
  cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  min-height: 44px;              /* phone-first: a real touch target */
}
.btn:hover { background: var(--c-accent-hover); border-color: var(--c-accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-accent); }
.btn--ghost:hover { background: var(--c-accent-soft); color: var(--c-accent-hover); }
.btn--quiet { background: transparent; color: var(--c-ink); border-color: var(--c-line-strong); }
.btn--quiet:hover { background: var(--c-paper-3); color: var(--c-ink); border-color: var(--c-line-strong); }
.btn--sm { font-size: var(--fs-sm); padding: var(--sp-2) var(--sp-4); min-height: 38px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- the TBA treatment ---------------------------------------------- */
/* Almost everything on this site is unannounced. That has to read as a decision,
   not as a page that failed to load — hence a real component with a label, a
   short explanation and, where known, a date. Never leave an empty section. */
.tba {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-5);
  background:
    repeating-linear-gradient(
      135deg,
      var(--c-paper-2) 0, var(--c-paper-2) 10px,
      var(--c-paper) 10px, var(--c-paper) 20px
    );
  border: var(--bw) dashed var(--c-line-strong);
  border-radius: var(--r-lg);
}
.tba--center { align-items: center; text-align: center; }
.tba__label {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-accent); background: var(--c-paper);
  border: var(--bw) solid var(--c-accent-border);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill);
}
.tba__label::before {
  content: ""; width: .5rem; height: .5rem; border-radius: var(--r-pill);
  background: var(--c-accent); flex: none;
}
.tba p { margin: 0; color: var(--c-muted-strong); font-size: var(--fs-sm); max-width: 46rem; }
.tba__when { font-weight: var(--fw-bold); color: var(--c-ink); }

.badge-tba {
  display: inline-block; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-muted-strong); background: var(--c-paper-3);
  border-radius: var(--r-pill); padding: var(--sp-1) var(--sp-3);
}

/* ---------- hero ----------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 8vw, 5rem) var(--section-y); background: var(--c-paper); }
.hero__mark { width: min(420px, 78vw); margin-bottom: var(--sp-5); mix-blend-mode: multiply; }
.hero h1 {
  font-size: var(--fs-hero); margin-bottom: var(--sp-4);
  letter-spacing: var(--ls-display); max-width: 18ch;
}
.hero h1 .accent { color: var(--c-accent); }
.hero__lead { font-size: var(--fs-lead); color: var(--c-muted-strong); max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

/* Two columns only when there is genuinely room. Below that the aside falls
   under the lead, which is the right reading order anyway. */
.hero__grid { display: grid; gap: var(--sp-7); align-items: start; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr); gap: var(--sp-8); }
}
.hero__aside {
  border: var(--bw) solid var(--c-line);
  border-top: 3px solid var(--c-accent);
  border-radius: var(--r-lg);
  background: var(--c-paper-2);
  padding: var(--sp-5);
}
.hero__aside h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.hero__aside p { font-size: var(--fs-sm); color: var(--c-muted-strong); }
.ticks { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.ticks li {
  position: relative; padding-left: 1.6em; font-size: var(--fs-sm); color: var(--c-ink-2);
}
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-accent); font-weight: var(--fw-bold);
}

.hero__facts {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin-top: var(--sp-7); padding-top: var(--sp-6);
  border-top: var(--bw-strong) solid var(--c-accent);
}
.fact dt {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-muted); margin-bottom: var(--sp-1);
}
.fact dd {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-h3); color: var(--c-ink); line-height: var(--lh-tight);
}
.fact dd small { display: block; font-family: var(--font-body); font-weight: var(--fw-normal);
  font-size: var(--fs-sm); color: var(--c-muted); margin-top: var(--sp-1); letter-spacing: 0; }

/* ---------- cards ---------------------------------------------------------- */
.card {
  background: var(--c-paper); border: var(--bw) solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.card--flat { box-shadow: none; }
.card h3 { font-size: var(--fs-h3); margin: 0; }
.card p { margin: 0; font-size: var(--fs-sm); color: var(--c-muted-strong); }
.card__foot { margin-top: auto; padding-top: var(--sp-3); }

.committee { position: relative; border-top: var(--bw-strong) solid var(--c-accent); }
.committee__abbr {
  font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: var(--fs-xs); letter-spacing: var(--ls-label);
  color: var(--c-accent); text-transform: uppercase;
}
.committee__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: auto; padding-top: var(--sp-3);
}
.chip {
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  background: var(--c-paper-2); border: var(--bw) solid var(--c-line);
  border-radius: var(--r-pill); padding: var(--sp-1) var(--sp-3);
  color: var(--c-muted-strong);
}
.chip--crisis { background: var(--c-accent-soft); border-color: var(--c-accent-border); color: var(--c-accent-hover); }

/* ---------- definition rows (venue, fees) ---------------------------------- */
.rows { border: var(--bw) solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; background: var(--c-paper); }
.rows > div {
  display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); border-bottom: var(--bw) solid var(--c-line);
}
.rows > div:last-child { border-bottom: 0; }
.rows dt { font-weight: var(--fw-bold); color: var(--c-ink); font-size: var(--fs-sm); }
.rows dd { margin: 0; color: var(--c-ink-2); }
@media (max-width: 620px) { .rows > div { grid-template-columns: 1fr; gap: var(--sp-1); } }

/* ---------- FAQ ------------------------------------------------------------ */
.faq { border-top: var(--bw) solid var(--c-line); }
.faq details { border-bottom: var(--bw) solid var(--c-line); }
.faq summary {
  cursor: pointer; list-style: none; padding: var(--sp-4) 0;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-h3); color: var(--c-ink);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-accent); flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { margin-bottom: var(--sp-4); color: var(--c-muted-strong); }

/* ---------- footer --------------------------------------------------------- */
.site-footer { background: var(--c-dark); color: var(--c-dark-muted); padding-block: var(--sp-7) var(--sp-6); }
.site-footer h2, .site-footer h3 { color: var(--c-dark-ink); font-size: var(--fs-sm);
  letter-spacing: var(--ls-label); text-transform: uppercase; margin-bottom: var(--sp-3); }
.site-footer a { color: var(--c-dark-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.footer__grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.footer__bottom {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: var(--bw) solid var(--c-dark-line);
  display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between;
  font-size: var(--fs-xs);
}
/* The Rcorp Enterprises mark is white-on-transparent, built for a dark header —
   it needs NO filter here, and DOES need filter:brightness(0) on light paper.
   That is the opposite of the conference wordmark. Both are documented in the
   Rcorp Enterprises brand note. */
.footer__issuer { display: flex; align-items: center; gap: var(--sp-3); }
.footer__issuer img { height: 30px; width: auto; }

/* ---------- forms ---------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: var(--sp-6); }

.fieldset {
  border: var(--bw) solid var(--c-line); border-radius: var(--r-lg);
  padding: var(--sp-5); margin: 0; background: var(--c-paper);
}
.fieldset > legend {
  font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: var(--fs-h3); color: var(--c-ink);
  padding-inline: var(--sp-3); margin-inline-start: calc(var(--sp-3) * -1);
}
.fieldset__hint { margin: 0 0 var(--sp-5); color: var(--c-muted-strong); font-size: var(--fs-sm); }

.field-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field--wide { grid-column: 1 / -1; }

.field > label, .field-label {
  font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--c-ink);
}
/* A .choice IS a <label>, so a standalone checkbox sitting directly in a .field
   (the two consent boxes) inherited the bold field-label weight and rendered its
   whole explanatory sentence in bold. Only the <strong> lead-in should be bold. */
.field > label.choice { font-weight: var(--fw-normal); font-size: var(--fs-body); }
.req { color: var(--c-accent); font-weight: var(--fw-bold); }
.field__hint { font-size: var(--fs-xs); color: var(--c-muted); margin: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], select, textarea {
  font: inherit; font-size: 16px;   /* 16px stops iOS Safari zooming on focus */
  width: 100%; padding: var(--sp-3);
  color: var(--c-ink); background: var(--c-paper);
  border: var(--bw) solid var(--c-line-strong); border-radius: var(--r-md);
  min-height: 44px;
}
textarea { min-height: 8rem; resize: vertical; line-height: var(--lh-body); }
select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--c-muted) 50%),
  linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: var(--sp-7);
}
input:focus, select:focus, textarea:focus { border-color: var(--c-accent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--c-error); background: var(--c-error-soft);
}

.field__error { display: none; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-error); }
.field__error[data-shown="true"] { display: block; }

.counter { font-size: var(--fs-xs); color: var(--c-muted); text-align: right; }
.counter[data-over="true"] { color: var(--c-error); font-weight: var(--fw-bold); }

/* radio / checkbox — big enough to hit with a thumb */
.choice-list { display: flex; flex-direction: column; gap: var(--sp-2); margin: 0; padding: 0; border: 0; }
.choice {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3); border: var(--bw) solid var(--c-line);
  border-radius: var(--r-md); cursor: pointer; background: var(--c-paper);
}
.choice:hover { background: var(--c-paper-2); }
.choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.choice input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c-accent); }
.choice span { font-size: var(--fs-sm); }
.choice strong { display: block; font-size: var(--fs-body); color: var(--c-ink); }

/* ranked committee preference */
.rank-grid { display: flex; flex-direction: column; gap: var(--sp-3); }
.rank-row {
  /* The rank column has to fit "1 — first" plus the select's arrow gutter. It was
     8.5rem and clipped the option text to "1 — first c" — visible the moment the
     ranking got a screen of its own. Do not shrink it without re-rendering. */
  display: grid; grid-template-columns: 1fr 10rem; gap: var(--sp-3); align-items: center;
  padding: var(--sp-3); border: var(--bw) solid var(--c-line); border-radius: var(--r-md);
  background: var(--c-paper);
}
.rank-row__name { font-weight: var(--fw-medium); font-size: var(--fs-sm); }
.rank-row__name small { display: block; color: var(--c-muted); font-weight: var(--fw-normal); font-size: var(--fs-xs); }
.rank-row select { min-height: 44px; }
@media (max-width: 520px) { .rank-row { grid-template-columns: 1fr; } }

/* the acknowledgement block — the single most important thing on the form */
.ack {
  border: var(--bw-strong) solid var(--c-accent);
  border-radius: var(--r-lg); padding: var(--sp-5); background: var(--c-accent-soft);
}
.ack h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.ack ul { margin: 0 0 var(--sp-4); padding-left: 1.2em; }
.ack li { font-size: var(--fs-sm); }
.ack .choice { background: var(--c-paper); border-color: var(--c-accent-border); }

.form__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }
.form__status { font-size: var(--fs-sm); font-weight: var(--fw-medium); }

.alert {
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  border: var(--bw) solid var(--c-line); font-size: var(--fs-sm);
}
.alert--error { border-color: var(--c-error); background: var(--c-error-soft); color: var(--c-accent-hover); }
.alert--warn  { border-color: #e8d5a8; background: var(--c-warn-soft); color: var(--c-warn); }
.alert--ok    { border-color: #b8dcc7; background: var(--c-ok-soft); color: var(--c-ok); }
.alert strong { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-body); }
.alert :last-child { margin-bottom: 0; }

/* ---------- the stepped application flow ------------------------------------
   apply.html is one question per screen. The markup is a plain stack of
   <section class="step"> inside one <form>; js/apply.js hides all but one of
   them. With JavaScript off nothing is hidden and the whole thing reads as the
   long form it used to be — so never hide a .step from CSS. */
.form--stepped { gap: var(--sp-5); }

.stepper { display: flex; flex-direction: column; gap: var(--sp-2); }
.stepper__meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.stepper__title {
  font-weight: var(--fw-bold); font-size: var(--fs-xs); color: var(--c-ink);
  letter-spacing: var(--ls-label); text-transform: uppercase;
}
.stepper__count { font-size: var(--fs-xs); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.stepper__track { height: 6px; border-radius: var(--r-pill); background: var(--c-paper-3); overflow: hidden; }
.stepper__fill {
  height: 100%; width: 0; border-radius: var(--r-pill);
  background: var(--c-accent); transition: width var(--t-med);
}

.step {
  border: var(--bw) solid var(--c-line); border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5); background: var(--c-paper); box-shadow: var(--sh-sm);
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
/* The step container is the focus target on every navigation, so it takes focus
   programmatically — but a mouse user should never see a ring round the whole
   card. :focus-visible keeps it for the keyboard. */
.step:focus { outline: none; }
.step:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.step__q { font-size: var(--fs-h2); margin-bottom: var(--sp-3); }
.step__q label { cursor: pointer; }
.step__hint { color: var(--c-muted-strong); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.step > .field-grid, .step > .field, .step > .rank-grid { margin-top: var(--sp-4); }

.step-nav { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.step-nav .btn { min-width: 8rem; }
.step-nav #next-btn, .step-nav #submit-btn { margin-left: auto; }
.step-nav .form__status { flex-basis: 100%; margin: 0; }

/* review & submit */
.review {
  margin: 0; border: var(--bw) solid var(--c-line); border-radius: var(--r-md);
  overflow: hidden; background: var(--c-paper);
}
.review > div {
  display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-4); border-bottom: var(--bw) solid var(--c-line);
}
.review > div:last-child { border-bottom: 0; }
.review dt {
  font-weight: var(--fw-bold); font-size: var(--fs-xs); color: var(--c-muted-strong);
  text-transform: uppercase; letter-spacing: var(--ls-label);
}
.review dd { margin: 0; display: flex; gap: var(--sp-3); align-items: flex-start; justify-content: space-between; }
.review__val { white-space: pre-wrap; font-size: var(--fs-sm); min-width: 0; overflow-wrap: anywhere; }
.review > div[data-empty="true"] .review__val { color: var(--c-muted); font-style: italic; }
.review__edit {
  flex: none; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: var(--c-accent); background: transparent;
  border: var(--bw) solid var(--c-line-strong); border-radius: var(--r-pill);
  padding: var(--sp-1) var(--sp-3); min-height: 32px; cursor: pointer;
}
.review__edit:hover { background: var(--c-accent-soft); border-color: var(--c-accent-border); color: var(--c-accent-hover); }
@media (max-width: 620px) { .review > div { grid-template-columns: 1fr; gap: var(--sp-1); } }

/* success state */
.success { text-align: center; padding: var(--sp-8) var(--sp-5); }
.success__tick {
  width: 68px; height: 68px; margin: 0 auto var(--sp-5);
  border-radius: var(--r-pill); background: var(--c-accent); color: #fff;
  display: grid; place-items: center; font-size: 2rem; font-weight: var(--fw-bold);
}
.success h2 { font-size: var(--fs-h1); }
.success p { max-width: 40ch; margin-inline: auto; color: var(--c-muted-strong); }
[hidden] { display: none !important; }

/* ---------- admin ---------------------------------------------------------- */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
  padding: var(--sp-4) 0; border-bottom: var(--bw) solid var(--c-line);
}
.admin-bar__spacer { margin-left: auto; }
.table-wrap { overflow-x: auto; border: var(--bw) solid var(--c-line); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 46rem; }
table.data th, table.data td { padding: var(--sp-3); text-align: left; border-bottom: var(--bw) solid var(--c-line); vertical-align: top; }
table.data thead th {
  background: var(--c-paper-3); font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: var(--ls-label); color: var(--c-muted-strong); position: sticky; top: 0;
}
table.data tbody tr:hover { background: var(--c-paper-2); }
table.data tbody tr[aria-selected="true"] { background: var(--c-accent-soft); }
.status-pill {
  display: inline-block; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill);
  background: var(--c-paper-3); color: var(--c-muted-strong); text-transform: uppercase;
  letter-spacing: .04em;
}
.status-pill[data-status="new"] { background: var(--c-accent-soft); color: var(--c-accent-hover); }
.status-pill[data-status="shortlisted"], .status-pill[data-status="offered"] { background: var(--c-ok-soft); color: var(--c-ok); }
.status-pill[data-status="rejected"], .status-pill[data-status="declined"] { background: var(--c-paper-3); color: var(--c-muted); }

.detail { border: var(--bw) solid var(--c-line); border-radius: var(--r-lg); padding: var(--sp-5); background: var(--c-paper); }
.detail dl { margin: 0; }
.detail dl > div { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: var(--sp-4);
  padding: var(--sp-3) 0; border-bottom: var(--bw) solid var(--c-line); }
.detail dl > div:last-child { border-bottom: 0; }
.detail dt { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--c-muted-strong); }
.detail dd { margin: 0; white-space: pre-wrap; }
@media (max-width: 620px) { .detail dl > div { grid-template-columns: 1fr; gap: var(--sp-1); } }

/* ---------- print ---------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .hero__actions, .form__actions, .admin-bar, .nav-toggle,
  .stepper, .step-nav, .review__edit { display: none !important; }
  /* A printed application should show every question, not step 1 of 13. */
  .step[hidden] { display: block !important; }
  body { color: #000; }
  a { text-decoration: none; color: #000; }
}
