/*
 * AiPEX styles. Every value resolves to a token in tokens.css — no hex literals here.
 * Layout is single-column-first; the rail is an enhancement, not a requirement.
 */

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

html { font-size: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-canvas);
  -webkit-text-size-adjust: 100%;
}

/* --- Focus: always visible, never removed (WCAG 2.4.7) --- */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Skip link (WCAG 2.4.1) --- */
.skip-link {
  position: absolute; left: var(--space-2); top: -3rem;
  background: var(--color-canvas); color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-accent); border-radius: var(--radius);
  z-index: 100; transition: top .1s;
}
.skip-link:focus { top: var(--space-2); }

/* --- Classification banner --- */
.classbar {
  background: var(--color-header-bg); color: var(--color-on-header);
  text-align: center; font-size: .8125rem; font-weight: 700;
  letter-spacing: .06em; padding: var(--space-1) var(--space-2);
}

/* --- Masthead --- */
.masthead {
  background: var(--color-header-bg); color: var(--color-on-header);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-3) var(--space-4);
}
.brand-wordmark {
  font-size: 1.375rem; font-weight: 800; letter-spacing: .02em;
  color: var(--color-on-header); text-decoration: none;
}
.brand-wordmark::before { content: var(--brand-wordmark); }
.brand-tagline {
  display: block; font-size: .75rem; font-weight: 400; letter-spacing: .01em;
  opacity: .85; margin-top: 2px;
}
.masthead-user { display: flex; align-items: center; gap: var(--space-3); font-size: .9375rem; }
/* The masthead sits on --aipex-midnight, so controls inside it must invert.
   Without this the quiet button renders near-black on near-black. */
.masthead-user .btn {
  background: transparent;
  color: var(--color-on-header);
  border-color: var(--dod-steel-blue);
}
.masthead-user .btn:hover { background: rgba(255, 255, 255, .12); color: var(--color-on-header); }

/* --- App shell --- */
.shell { display: block; max-width: var(--content-max); margin: 0 auto; }
@media (min-width: 56rem) {
  .shell { display: grid; grid-template-columns: var(--rail-width) 1fr; gap: var(--space-6); padding: 0 var(--space-4); }
}

/* --- Primary navigation: five items, no sub-menus --- */
.rail { padding: var(--space-4) var(--space-2); }
.rail ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-1); overflow-x: auto; }
@media (min-width: 56rem) { .rail ul { flex-direction: column; overflow: visible; } }
.rail a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: var(--touch-target); padding: var(--space-2) var(--space-3);
  color: var(--color-text); text-decoration: none; border-radius: var(--radius);
  border-left: 4px solid transparent; white-space: nowrap;
}
.rail a:hover { background: var(--color-surface); }
.rail a[aria-current="page"] {
  background: var(--color-surface); border-left-color: var(--color-accent); font-weight: 700;
}
.rail .count {
  background: var(--status-action); color: var(--color-text-inverse);
  border-radius: 999px; padding: 0 .5rem; font-size: .8125rem; font-weight: 700; min-width: 1.5rem; text-align: center;
}

main { padding: var(--space-4); min-width: 0; }
main > h1 { margin-top: 0; font-size: 1.75rem; line-height: 1.25; }
main p, main li { max-width: var(--measure); }

/* --- Cards --- */
.card {
  background: var(--color-canvas); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4);
  margin-bottom: var(--space-4); box-shadow: var(--shadow-1);
}
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.card-title { margin: 0; font-size: 1.1875rem; }
.card-sub { color: var(--color-text-muted); font-size: .9375rem; margin: var(--space-1) 0 0; }

/* --- The four action states. Colour is never the only signal: each badge
       carries a text label and a shape marker (WCAG 1.4.1). --- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: .875rem; font-weight: 700; padding: var(--space-1) var(--space-3);
  border-radius: 999px; border: 2px solid currentColor; white-space: nowrap;
}
.badge::before { content: "●"; font-size: .75em; }
.badge-your_action_required   { color: var(--status-action);   background: var(--color-warn-bg); }
.badge-your_action_required::before { content: "⚑"; }
.badge-government_in_progress { color: var(--status-progress); background: var(--color-info-bg); }
.badge-government_in_progress::before { content: "◐"; }
.badge-completed              { color: var(--status-complete); background: var(--color-ok-bg); }
.badge-completed::before { content: "✔"; }
.badge-none                   { color: var(--status-idle);     background: var(--color-surface); }
.badge-none::before { content: "—"; }
.badge-closed                 { color: var(--status-closed);   background: var(--color-danger-bg); }
.badge-closed::before { content: "■"; }

/* --- Action banner --- */
.callout {
  border: 2px solid var(--status-action); background: var(--color-warn-bg);
  border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-5);
}
.callout h2 { margin: 0 0 var(--space-2); font-size: 1.125rem; color: var(--status-action); }
.callout.info { border-color: var(--color-accent); background: var(--color-info-bg); }
.callout.info h2 { color: var(--color-accent); }
.callout.ok { border-color: var(--status-complete); background: var(--color-ok-bg); }
.callout.ok h2 { color: var(--status-complete); }

/* --- Progress meter ---
   A native <progress>, so no inline style is needed and the CSP stays strict
   (style-src 'self'). The "Stage n of m" sentence beside it is the text
   equivalent, so the bar itself is decorative. */
.meter {
  display: block; width: 100%; height: 10px; margin: var(--space-2) 0;
  border: 0; border-radius: 999px; overflow: hidden;
  background: var(--color-surface-sunk);
  appearance: none; -webkit-appearance: none;
}
.meter::-webkit-progress-bar { background: var(--color-surface-sunk); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--color-accent); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--color-accent); border-radius: 999px; }

/* --- Timeline: an ordered list, state carried in text --- */
.timeline { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 1.75rem 1fr auto; gap: var(--space-3);
  align-items: baseline; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-surface-sunk);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .mark { font-weight: 700; }
.timeline .done   .mark { color: var(--status-complete); }
.timeline .current .mark { color: var(--status-action); }
.timeline .current { font-weight: 700; }
.timeline .upcoming { color: var(--color-text-muted); }
.timeline .when { color: var(--color-text-muted); font-size: .875rem; }

/* --- Definition grid for record detail --- */
.facts { display: grid; grid-template-columns: 1fr; gap: var(--space-1) var(--space-4); margin: 0; }
@media (min-width: 34rem) { .facts { grid-template-columns: 12rem 1fr; } }
.facts dt { color: var(--color-text-muted); font-size: .9375rem; }
.facts dd { margin: 0 0 var(--space-2); }

/* --- Forms --- */
.field { margin-bottom: var(--space-4); max-width: var(--measure); }
.field label { display: block; font-weight: 600; margin-bottom: var(--space-1); }
.field .hint { display: block; color: var(--color-text-muted); font-size: .9375rem; margin-bottom: var(--space-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="tel"], input[type="file"], select, textarea {
  width: 100%; min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3); font: inherit; color: var(--color-text);
  background: var(--color-canvas); border: 2px solid var(--color-border); border-radius: var(--radius);
}
textarea { min-height: 6rem; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { color: var(--color-danger); font-weight: 600; margin-top: var(--space-1); }

.check { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-3); }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .3rem; flex: none; }
.check label { font-weight: 400; }

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-4); margin: 0 0 var(--space-4); }
legend { font-weight: 700; padding: 0 var(--space-2); }

/* --- Error summary at the top of a form, linking to each field (WCAG 3.3.1) --- */
.error-summary {
  border: 2px solid var(--color-danger); background: var(--color-danger-bg);
  border-radius: var(--radius); padding: var(--space-4); margin-bottom: var(--space-4);
}
.error-summary h2 { margin: 0 0 var(--space-2); font-size: 1.0625rem; color: var(--color-danger); }
.error-summary ul { margin: 0; padding-left: var(--space-5); }
.error-summary a { color: var(--color-danger); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--touch-target); padding: var(--space-2) var(--space-5);
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: var(--radius); border: 2px solid var(--color-accent);
  background: var(--color-accent); color: var(--color-text-inverse); text-decoration: none;
}
.btn:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--color-accent); }
.btn-secondary:hover { background: var(--color-surface); color: var(--color-accent-hover); }
.btn-quiet { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-quiet:hover { background: var(--color-surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* --- Lists --- */
.stack { list-style: none; margin: 0; padding: 0; }
.stack > li { border-bottom: 1px solid var(--color-surface-sunk); padding: var(--space-3) 0; }
.stack > li:last-child { border-bottom: 0; }

/* --- Wide content scrolls inside its own container --- */
.scroll-x { overflow-x: auto; }

/* --- Links ---
   Underlined by default so they are distinguishable without relying on colour
   (WCAG 1.4.1), with a thicker underline on hover rather than a colour-only change. */
a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--color-accent-hover); text-decoration-thickness: 2px; }
a.btn, .rail a, .section-nav a, .brand-wordmark { text-decoration: none; }
.rail a:hover, .section-nav a:hover { text-decoration: underline; }
.card-title a { color: var(--color-text); text-decoration: none; }
.card-title a:hover { color: var(--color-accent); text-decoration: underline; }

/* --- Theme switch (light / dark / system) --- */
.theme-switch {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--dod-steel-blue); border-radius: 999px;
  padding: 2px; background: rgba(255, 255, 255, .08);
}
.theme-switch button {
  font: inherit; font-size: .8125rem; font-weight: 600;
  min-height: 32px; padding: 0 var(--space-3);
  border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--color-on-header);
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.theme-switch button:hover { background: rgba(255, 255, 255, .16); }
.theme-switch button[aria-pressed="true"] {
  background: var(--dod-white); color: var(--aipex-midnight);
}
@media (max-width: 34rem) {
  .theme-switch button span.label { display: none; }
  .theme-switch button { padding: 0 var(--space-2); }
}

/* --- Find a job panel (Home and My Applications) --- */
.find-job { background: var(--color-surface); border-color: var(--color-border-strong); }
.find-job .search-bar { margin: var(--space-3) 0; }

/* --- Job search --- */
.search-bar {
  display: flex; gap: var(--space-2); margin-bottom: var(--space-4);
  max-width: 46rem;
}
.search-bar input { flex: 1; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.chip {
  font: inherit; font-size: .875rem; cursor: pointer;
  min-height: 32px; padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: 999px;
  background: var(--color-surface); color: var(--color-text);
}
.chip:hover { background: var(--color-surface-sunk); border-color: var(--color-accent); }

.results-head {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  align-items: baseline; justify-content: space-between;
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}
.results-head p { margin: 0; font-weight: 600; }
.sort { display: flex; align-items: center; gap: var(--space-2); }
.sort label { font-size: .9375rem; color: var(--color-text-muted); white-space: nowrap; }
.sort select { width: auto; min-width: 12rem; }

.search-layout { display: block; }
@media (min-width: 62rem) {
  .search-layout { display: grid; grid-template-columns: 17rem 1fr; gap: var(--space-6); align-items: start; }
  .filters { position: sticky; top: var(--space-4); max-height: calc(100vh - 6rem); overflow-y: auto; }
}
.filters {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-4); background: var(--color-surface); margin-bottom: var(--space-5);
}
.filters h2 { margin-top: 0; }
.filter-group { border: 0; border-top: 1px solid var(--color-border); padding: var(--space-3) 0 0; margin: 0 0 var(--space-3); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group legend { font-size: .9375rem; font-weight: 700; padding: 0; }
.filter-group .check { margin-bottom: var(--space-2); align-items: center; }
.filter-group .check input { margin-top: 0; }
.filter-group .check label { font-size: .9375rem; }
.filter-group .field { margin-bottom: var(--space-2); }

.results { min-width: 0; }
.job-card { transition: border-color .12s, box-shadow .12s; }
.job-card:hover { border-color: var(--color-accent); box-shadow: 0 2px 10px rgba(53, 94, 147, .16); }
.job-card .card-title { font-size: 1.125rem; }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0; }

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-top: var(--space-5);
  padding-top: var(--space-4); border-top: 1px solid var(--color-border);
}
.pager [aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* --- Profile groups: talent data vs federal application questions --- */
.group-heading {
  margin: var(--space-7) 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 3px solid var(--color-accent);
  font-size: 1.375rem;
}
.group-heading:first-of-type { margin-top: var(--space-5); }
.group-help { color: var(--color-text-muted); margin-top: 0; }

/* --- Profile: index beside one section at a time ---
   A card per entry made this page scroll for pages. One section, one panel, and
   repeating data as table rows — the way the internal profile already shows it. */
.profile-layout { display: block; }
@media (min-width: 60rem) {
  .profile-layout { display: grid; grid-template-columns: 17rem 1fr; gap: var(--space-5); align-items: start; }
  .section-index { position: sticky; top: var(--space-4); max-height: calc(100vh - 6rem); overflow-y: auto; }
}
.section-index { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-3); background: var(--color-surface); margin-bottom: var(--space-4); }
.section-index ul { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.index-group { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin: var(--space-3) 0 var(--space-2); }
.index-link {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  font: inherit; font-size: .9375rem; text-align: left; cursor: pointer;
  min-height: 36px; padding: var(--space-1) var(--space-2);
  background: transparent; border: 0; border-left: 3px solid transparent;
  border-radius: var(--radius); color: var(--color-text);
}
.index-link:hover { background: var(--color-surface-sunk); }
.index-link.is-active { background: var(--color-canvas); border-left-color: var(--color-accent); font-weight: 700; }
.index-mark { flex: none; width: 1.1rem; }
.index-weight { margin-left: auto; font-size: .75rem; color: var(--color-text-muted); }

.section-panel {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-5); background: var(--color-canvas); box-shadow: var(--shadow-1);
}
.section-panel:focus { outline: none; }
.panel-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.profile-actions { position: sticky; bottom: 0; background: var(--color-canvas); padding: var(--space-3) 0; border-top: 1px solid var(--color-border); margin-top: var(--space-4); }

/* Single-instance sections in columns rather than one field per line. */
/* Columns respond to the CONTAINER, not the viewport. A media query on the viewport
   gave a 409 px panel three 125 px columns on a 1400 px screen, which is how the
   controls ended up cramped; auto-fit fits as many 14rem columns as actually fit. */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 var(--space-4);
}
.field-grid > .field { margin-bottom: var(--space-3); min-width: 0; }
/* A checkbox is an ordinary grid cell.
   It used to span with `grid-column: 1 / -1`, which lands in a COLLAPSED track under
   `repeat(auto-fit, …)` — the item ends up outside the grid and its label renders
   past the edge of the panel. Spanning is not worth that; the label wraps beside the
   box in a normal cell. */
.field-grid > .check {
  align-items: flex-start;
  align-self: start;
  margin-bottom: var(--space-3);
  min-width: 0;
  min-height: var(--touch-target);
}
/* flex:1 or this collapses to zero width and throws its label out of the panel. */
.field-grid > .check > div { min-width: 0; flex: 1; }
.field-grid > .check label { margin: 0; line-height: 1.35; }
.field-grid .field label { display: block; }
.field-grid select, .field-grid input:not([type="checkbox"]), .field-grid textarea { max-width: 100%; }

/* Repeating sections: a one-line summary per entry, and one entry open at a time.
   Ten selects across a table row means every one is squeezed and half are off-screen,
   so the list stays scannable and editing gets the full width of the panel. */
.entry-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.entry-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3); border: 1px solid var(--color-border);
  border-radius: var(--radius); margin-bottom: var(--space-2); background: var(--color-canvas);
}
.entry-row:hover { border-color: var(--color-border-strong); }
.entry-row.is-incomplete { border-left: 4px solid var(--status-action); }
.entry-summary { min-width: 0; }
.entry-summary p { margin: 2px 0 0; }
.entry-gap { color: var(--status-action); font-weight: 600; }
.entry-actions { display: flex; gap: var(--space-2); flex: none; }
.entry-empty { padding: var(--space-3); border: 1px dashed var(--color-border); border-radius: var(--radius); margin-bottom: var(--space-2); }

/* The open editor gets the whole panel: full-width controls, nothing clipped. */
.entry-row.is-editing {
  display: block; background: var(--color-surface);
  border-color: var(--color-accent); border-left: 4px solid var(--color-accent);
  padding: var(--space-4);
}
.entry-editing-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.entry-editing-head h4 { margin: 0; font-size: 1.0625rem; }
.entry-row.is-editing .field { margin-bottom: var(--space-3); }
/* Full-width controls in the editor — but NOT checkboxes. Stretching a checkbox to
   100% renders the box centred in a 400 px-wide control and shoves its label clean
   out of the panel. */
.entry-row.is-editing select,
.entry-row.is-editing input:not([type="checkbox"]),
.entry-row.is-editing textarea { width: 100%; }

.row-remove {
  font: inherit; cursor: pointer; min-height: 40px; min-width: 40px;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: transparent; color: var(--color-text-muted);
}
.row-remove:hover { border-color: var(--color-danger); color: var(--color-danger); }

/* Type-ahead over a reference registry. */
.ref-control { position: relative; width: 100%; }
.ref-control input { width: 100%; }
.ref-chosen { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ref-results {
  position: absolute; z-index: 20; left: 0; top: 100%; min-width: 100%; max-width: 32rem;
  list-style: none; margin: 2px 0 0; padding: var(--space-1);
  max-height: 16rem; overflow-y: auto; min-width: 20rem;
  background: var(--color-canvas); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.ref-option {
  display: block; width: 100%; text-align: left; font: inherit; font-size: .9375rem;
  cursor: pointer; padding: var(--space-2); border: 0; border-radius: var(--radius);
  background: transparent; color: var(--color-text);
}
.ref-option:hover { background: var(--color-surface); }
.ref-other { border-top: 1px solid var(--color-border); color: var(--color-accent); font-weight: 600; }

/* --- Profile health chips, mirroring the internal profile's strip --- */
.health-chips { margin: var(--space-3) 0 var(--space-4); }
.health-chip {
  font-size: .8125rem; font-weight: 600; border-radius: 999px;
  padding: 2px var(--space-3); border: 1px solid currentColor;
}
.health-done { color: var(--status-complete); background: var(--color-ok-bg); }
.health-todo { color: var(--status-idle);     background: var(--color-surface); }
.health-sor  { color: var(--status-progress); background: var(--color-info-bg); }

/* --- Profile readiness --- */
.readiness .meter { height: 14px; }
.readiness-list li { display: grid; grid-template-columns: 1.75rem 1fr; gap: var(--space-2); align-items: start; }
.readiness-list p { margin: 2px 0 0; }
.readiness-mark { font-size: 1rem; line-height: 1.4; }

/* Repeating profile entries (a job, a degree, a certification) */
.entry {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); padding: var(--space-4);
  margin: 0 0 var(--space-4);
}
.entry legend { font-size: .9375rem; font-weight: 700; color: var(--color-text-muted); }

details.card summary { cursor: pointer; font-weight: 600; }
details.card summary:hover { color: var(--color-accent); }
details.card ul { margin-top: var(--space-3); }

/* --- Utility --- */
.muted { color: var(--color-text-muted); }
.small { font-size: .875rem; }
.tag {
  display: inline-block; font-size: .8125rem; font-weight: 600;
  background: var(--color-surface-sunk); color: var(--color-text);
  border-radius: var(--radius); padding: 2px var(--space-2); margin-right: var(--space-2);
}
.disclaimer {
  font-size: .875rem; color: var(--color-text-muted); font-style: italic;
  border-left: 3px solid var(--color-border-strong); padding-left: var(--space-3); margin: var(--space-2) 0;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.section-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.section-nav a { font-size: .875rem; }

/* --- Sign-in page --- */
.auth-wrap { max-width: 30rem; margin: var(--space-7) auto; padding: 0 var(--space-4); }
.dev-note {
  border: 2px dashed var(--color-border-strong); background: var(--color-surface);
  border-radius: var(--radius); padding: var(--space-3); margin: var(--space-4) 0; font-size: .9375rem;
}

/* --- Footer --- */
footer { border-top: 1px solid var(--color-border); margin-top: var(--space-7); padding: var(--space-5) var(--space-4); }
footer p { color: var(--color-text-muted); font-size: .875rem; }

@media print { .rail, .masthead-user, .btn { display: none; } }

/* Referee list + an error shown where it happened rather than only announced. */
.plain-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.ref-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--border); }
.ref-row p { margin: .15rem 0 0; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.prewrap { white-space: pre-wrap; }
.field-check { display: flex; align-items: center; gap: .5rem; }
.inline-error { color: var(--color-danger); font-weight: 600; margin-top: .5rem; }
