/* ==========================================================================
   FormMaster — one design system
   --------------------------------------------------------------------------
   Replaces both of the old stylesheets. Every screen in the application —
   admin, applicant portal, public form, sign-in — is built from the tokens
   and components in this file.

   The visual idea is an official register: the vocabulary of a government
   ledger (rules rather than boxes, tabular figures, a vertical spine marking
   progress) rendered with modern restraint. Section identity colours appear
   only as thin rail marks, never as filled panels, so colour stays
   informative rather than decorative.

   Rules of the house
     1. No hard-coded colour outside the token blocks. Dark mode depends on it.
     2. Tables are first-class. Reviewing applications is the work.
     3. Motion answers an action. Nothing animates on scroll.
     4. Touch targets 44px, focus always visible, contrast AA or better.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* brand */
  --edo:          #0B3B2E;
  --edo-700:      #11523F;
  --edo-600:      #1A6B51;
  --edo-200:      #B9D8C9;
  --edo-50:       #EEF5F1;

  /* surfaces — a faint green cast, never cream */
  --page:         #F5F7F5;
  --surface:      #FFFFFF;
  --surface-2:    #FAFBFA;
  --surface-3:    #F0F2F0;
  --overlay:      rgba(10, 20, 16, .46);

  /* ink */
  --ink:          #13171A;
  --ink-2:        #343B42;
  --ink-3:        #5A646D;
  --ink-4:        #8A949D;

  /* lines */
  --line:         #E2E6E3;
  --line-2:       #CED5D0;
  --line-strong:  #9BA7A0;

  /* section identity — used as rail marks and icon tint only */
  --s-overview:   #0B3B2E;
  --s-responses:  #1D4E89;
  --s-forms:      #1F6F4A;
  --s-messages:   #7A2E5E;
  --s-people:     #0F6A74;
  --s-polls:      #8A5A00;
  --s-admin:      #454A54;

  /* semantic */
  --ok:           #1F6F4A;
  --ok-bg:        #E8F3EC;
  --info:         #1D4E89;
  --info-bg:      #E9EFF7;
  --warn:         #8A5A00;
  --warn-bg:      #FBF1DF;
  --danger:       #A3302A;
  --danger-bg:    #FBEDEC;

  /* inverse — surfaces that stay dark-on-light-text in BOTH themes.
     Using --ink as a background looks right in light mode and then inverts
     with the theme, leaving white text on a near-white bar. These do not. */
  --inverse-bg:   #13171A;
  --inverse-fg:   #FFFFFF;
  --inverse-bd:   rgba(255,255,255,.26);
  --inverse-hover:rgba(255,255,255,.24);

  /* focus */
  --focus:        #1D4E89;
  --focus-ring:   0 0 0 3px #FFFFFF, 0 0 0 5px var(--focus);

  /* elevation — restrained, one step only */
  --lift:         0 1px 2px rgba(16, 32, 25, .06), 0 2px 8px rgba(16, 32, 25, .06);
  --lift-2:       0 8px 28px rgba(16, 32, 25, .14);

  /* geometry */
  --r-sm: 4px; --r: 7px; --r-lg: 12px; --r-pill: 999px;
  --rail: 248px;      /* desktop nav width */
  --rail-sm: 68px;    /* collapsed */
  --bar: 56px;        /* top bar height */

  /* type */
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0E1412; --surface: #151C19; --surface-2: #1A221E; --surface-3: #212A25;
    --overlay: rgba(0,0,0,.6);
    --ink: #EAF0EC; --ink-2: #C3CDC7; --ink-3: #94A099; --ink-4: #6E7B74;
    --line: #26302A; --line-2: #324039; --line-strong: #4A5B51;
    --edo-50: #15241D; --edo-200: #2C5143;
    --ok-bg:#15241D; --info-bg:#141F2E; --warn-bg:#241D0E; --danger-bg:#2A1715;
    --ok:#6FC294; --info:#7FAEE6; --warn:#D9A84B; --danger:#E88A83;
    --inverse-bg: #233029; --inverse-fg: #EAF0EC; --inverse-bd: rgba(255,255,255,.22);
    --inverse-hover: rgba(255,255,255,.18);
    --focus-ring: 0 0 0 3px var(--surface), 0 0 0 5px var(--focus);
    --lift: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --page: #0E1412; --surface: #151C19; --surface-2: #1A221E; --surface-3: #212A25;
  --overlay: rgba(0,0,0,.6);
  --ink: #EAF0EC; --ink-2: #C3CDC7; --ink-3: #94A099; --ink-4: #6E7B74;
  --line: #26302A; --line-2: #324039; --line-strong: #4A5B51;
  --edo-50: #15241D; --edo-200: #2C5143;
  --ok-bg:#15241D; --info-bg:#141F2E; --warn-bg:#241D0E; --danger-bg:#2A1715;
  --ok:#6FC294; --info:#7FAEE6; --warn:#D9A84B; --danger:#E88A83;
  --inverse-bg: #233029; --inverse-fg: #EAF0EC; --inverse-bd: rgba(255,255,255,.22);
  --inverse-hover: rgba(255,255,255,.18);
  --focus-ring: 0 0 0 3px var(--surface), 0 0 0 5px var(--focus);
  --lift: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink-2);
  font: 400 15px/1.55 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { margin: 0; color: var(--ink); font-weight: 650; line-height: 1.2;
  letter-spacing: -.011em; }
h1 { font-size: 1.6rem; letter-spacing: -.021em; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .92rem; }
p  { margin: 0 0 .75rem; }
a  { color: var(--info); text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
small { font-size: .82rem; }
code, kbd { font-family: var(--mono); font-size: .86em; }
kbd {
  background: var(--surface-3); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: var(--r-sm);
  padding: 1px 5px; font-size: .76rem; color: var(--ink-2);
}
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm);
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--edo); color: #fff; padding: .6rem 1rem; border-radius: var(--r);
  transition: top .15s;
}
.skip:focus { top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------------------
   3. App shell — left rail on desktop, bottom tabs on phones
   -------------------------------------------------------------------------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--rail) 1fr; }
.app.is-collapsed { grid-template-columns: var(--rail-sm) 1fr; }

.rail {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  background: var(--edo); color: #CFE3D9;
  display: flex; flex-direction: column; overflow: hidden;
}
.rail__brand {
  display: flex; align-items: center; gap: .6rem; height: var(--bar);
  padding: 0 1rem; color: #fff; text-decoration: none; flex: 0 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.rail__brand:hover { text-decoration: none; }
.rail__mark {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 6px;
  background: #fff; color: var(--edo);
  display: grid; place-items: center; font-weight: 800; font-size: .78rem; letter-spacing: -.02em;
}
.rail__name { font-weight: 650; letter-spacing: -.012em; white-space: nowrap; }
.rail__sub  { display: block; font-size: .7rem; font-weight: 400; color: #8FC0A9; letter-spacing: 0; }

.rail__scroll { flex: 1 1 auto; overflow-y: auto; padding: .75rem .55rem 1rem; }
.rail__group { margin-top: 1.15rem; }
.rail__group:first-child { margin-top: 0; }
.rail__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #6E9E86; padding: 0 .65rem .4rem;
}
.rail__link {
  position: relative; display: flex; align-items: center; gap: .7rem;
  padding: .56rem .65rem; margin-bottom: 1px; border-radius: var(--r);
  color: #CFE3D9; text-decoration: none; font-size: .905rem; font-weight: 500;
  min-height: 40px; transition: background .12s, color .12s;
}
.rail__link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.rail__link.is-current { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
/* the identity mark: a thin bar, the section's own colour */
.rail__link.is-current::before {
  content: ""; position: absolute; left: -.55rem; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--mark, #fff);
}
.rail__link svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: .92; }
.rail__count {
  margin-left: auto; background: #fff; color: var(--edo);
  font-size: .7rem; font-weight: 700; min-width: 19px; height: 19px;
  border-radius: var(--r-pill); display: grid; place-items: center; padding: 0 5px;
}
.rail__foot { flex: 0 0 auto; padding: .6rem .55rem; border-top: 1px solid rgba(255,255,255,.1); }

.app.is-collapsed .rail__name, .app.is-collapsed .rail__label,
.app.is-collapsed .rail__link span, .app.is-collapsed .rail__count { display: none; }
.app.is-collapsed .rail__link { justify-content: center; padding: .56rem; }

/* main column */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--bar);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .6rem; padding: 0 1rem;
}
.topbar__toggle, .topbar__icon {
  width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink-3);
  border-radius: var(--r); display: grid; place-items: center; cursor: pointer;
  position: relative;
}
.topbar__toggle:hover, .topbar__icon:hover { background: var(--surface-3); color: var(--ink); }
.topbar__icon { text-decoration: none; }
.topbar__dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: var(--r-pill);
  font-size: .64rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.topbar__crumbs { display: flex; align-items: center; gap: .4rem; min-width: 0;
  font-size: .9rem; color: var(--ink-3); }
.topbar__crumbs b { color: var(--ink); font-weight: 600; }
.topbar__crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1 1 auto; }

/* the search trigger doubles as the command palette opener */
.omni {
  display: flex; align-items: center; gap: .5rem; height: 36px; min-width: 210px;
  padding: 0 .55rem 0 .7rem; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink-4); font: inherit; font-size: .88rem;
  cursor: pointer; text-align: left;
}
.omni:hover { border-color: var(--line-strong); color: var(--ink-3); }
.omni svg { width: 15px; height: 15px; flex: 0 0 auto; }
.omni span { flex: 1 1 auto; }

.content { flex: 1 1 auto; padding: 1.5rem 1.5rem 4.5rem; width: 100%; }
.content--wide { max-width: none; }
.content--narrow { max-width: 760px; }
.content--mid { max-width: 1080px; }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 900px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: min(84vw, var(--rail));
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--lift-2);
  }
  .app.is-open .rail { transform: none; }
  .scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 35; }
  .content { padding: 1rem 1rem 5.5rem; }
  .omni { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .omni span, .omni kbd { display: none; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 56px; color: var(--ink-4); text-decoration: none;
    font-size: .66rem; font-weight: 600; position: relative;
  }
  .tabbar__item svg { width: 21px; height: 21px; }
  .tabbar__item.is-current { color: var(--edo); }
  :root[data-theme="dark"] .tabbar__item.is-current { color: var(--edo-200); }
  .tabbar__item.is-current::before {
    content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px;
    background: currentColor; border-radius: 0 0 2px 2px;
  }
  .tabbar__count {
    position: absolute; top: 6px; left: 54%; background: var(--danger); color: #fff;
    font-size: .6rem; font-weight: 700; min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: var(--r-pill); display: grid; place-items: center;
  }
}
@media (min-width: 901px) { .rail__close { display: none; } }

/* --------------------------------------------------------------------------
   4. Page furniture
   -------------------------------------------------------------------------- */
.page-head { margin-bottom: 1.35rem; }
.page-head__row { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { flex: 1 1 auto; min-width: 0; }
.page-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-head__sub { color: var(--ink-3); margin: .3rem 0 0; font-size: .93rem; }

/* the signature mark: a short colour rule naming the section */
.eyebrow {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .085em; text-transform: uppercase;
  color: var(--ink-4);
}
.eyebrow::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px;
  background: var(--mark, var(--edo)); flex: 0 0 auto;
}

.section { margin-top: 2rem; }
.section > h2 { margin-bottom: .2rem; }
.section__note { color: var(--ink-3); font-size: .9rem; margin-bottom: .9rem; }

/* --------------------------------------------------------------------------
   5. Surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.card__head {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--line);
}
.card__head h2, .card__head h3 { flex: 1 1 auto; min-width: 0; font-size: 1rem; }
.card__body { padding: 1.1rem; }
.card__body--flush { padding: 0; }
.card__foot {
  padding: .75rem 1.1rem; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--side { grid-template-columns: minmax(0,1fr) 320px; align-items: start; }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--side { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0,1fr); } }

/* statistic — the number leads, the label explains */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: .95rem 1.05rem; border-top: 3px solid var(--mark, var(--edo)); }
.stat__n { font-size: 1.85rem; font-weight: 700; color: var(--ink); line-height: 1.05;
  letter-spacing: -.028em; }
.stat__l { font-size: .83rem; color: var(--ink-3); margin-top: .22rem; }
.stat__d { font-size: .78rem; margin-top: .4rem; display: flex; align-items: center; gap: .3rem; }
.stat__d.up { color: var(--ok); } .stat__d.down { color: var(--danger); }
.stat__d.flat { color: var(--ink-4); }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 38px; padding: 0 .9rem; border-radius: var(--r);
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .89rem/1 var(--font); cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { --btn-bg: var(--edo); --btn-fg: #fff; --btn-bd: var(--edo); }
.btn--primary:hover { background: var(--edo-700); }
.btn--danger  { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--danger:hover { filter: brightness(1.08); background: var(--danger); }
.btn--ghost   { --btn-bd: transparent; --btn-bg: transparent; --btn-fg: var(--ink-3); }
.btn--ghost:hover { color: var(--ink); }
.btn--sm { min-height: 31px; padding: 0 .6rem; font-size: .82rem; }
.btn--lg { min-height: 46px; padding: 0 1.3rem; font-size: .98rem; }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 38px; }
.btn--icon.btn--sm { width: 31px; }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 1.05rem; }
/* :not() keeps this from beating the layout of a label that IS a control.
   `.field > label` outranks `.switch` and `.check` on specificity, so without
   the exclusions a switch inside a field is forced to display:block and its
   knob lands on top of the words beside it. */
.field > label:not(.switch):not(.check), .label {
  display: block; font-weight: 600; color: var(--ink); font-size: .9rem; margin-bottom: .3rem;
}
.field__hint { font-size: .82rem; color: var(--ink-3); margin: -.1rem 0 .35rem; }
.req { color: var(--danger); font-weight: 700; }

.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: .55rem .7rem;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .94rem;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235A646D' stroke-width='1.8'%3E%3Cpath d='M4 6.5 8 10.5l4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 15px;
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}
.field__error { color: var(--danger); font-size: .84rem; margin-top: .3rem; font-weight: 500; }

.check { display: flex; align-items: flex-start; gap: .6rem; padding: .35rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--edo); flex: 0 0 auto; }
.check span { font-size: .92rem; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  display: block;   /* a span: blockify explicitly, never rely on the parent */
  width: 42px; height: 24px; border-radius: var(--r-pill); background: var(--line-2);
  position: relative; transition: background .16s; flex: 0 0 auto;
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .16s; box-shadow: var(--lift);
}
.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--focus-ring); }

/* a row of filters above a table */
.filters {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  padding: .75rem 1.1rem; border-bottom: 1px solid var(--line);
}
.filters .input, .filters .select { min-height: 36px; font-size: .88rem; width: auto; }
.filters__search { flex: 1 1 240px; min-width: 180px; }

/* --------------------------------------------------------------------------
   8. Tables — the hero of the admin
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* A sticky header offset against the viewport (top: var(--bar)) displaces
   itself downward over the first row in Chromium, because the table is not
   the scrollport it is being measured against. Stickiness therefore belongs
   to a container that actually scrolls, and is opt-in: add --sticky to the
   wrapper for a long table. Short tables need none of it. */
.table-wrap--sticky { max-height: min(70vh, 720px); overflow: auto; }
.table-wrap--sticky table.data thead th { position: sticky; top: 0; z-index: 2; }

table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.data thead th {
  background: var(--surface-2); color: var(--ink-3);
  font-size: .73rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  text-align: left; padding: .6rem .8rem; white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
}
table.data thead th a { color: inherit; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; }
table.data thead th a:hover { color: var(--ink); }
table.data tbody td {
  padding: .68rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle;
  color: var(--ink-2);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tbody tr.is-selected td { background: var(--edo-50); }
table.data tbody tr.is-cursor td { box-shadow: inset 0 0 0 1px var(--focus); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.tight { width: 1%; white-space: nowrap; }
.cell-strong { color: var(--ink); font-weight: 600; }
.cell-sub { color: var(--ink-4); font-size: .82rem; }
.ref {
  font-family: var(--mono); font-size: .82rem; font-weight: 600;
  color: var(--info); text-decoration: none; white-space: nowrap;
}
.ref:hover { text-decoration: underline; }

.rowcheck { width: 18px; height: 18px; accent-color: var(--edo); }

/* bulk action bar that rises when rows are selected */
.bulkbar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .7rem 1.1rem; background: var(--inverse-bg); color: var(--inverse-fg);
  border-radius: var(--r-lg); box-shadow: var(--lift-2); margin-top: .75rem;
}
.bulkbar b { font-weight: 700; }
.bulkbar .btn { --btn-bg: rgba(255,255,255,.14); --btn-fg: var(--inverse-fg); --btn-bd: var(--inverse-bd); }
.bulkbar .btn:hover { background: var(--inverse-hover); }

/* pagination */
.pager { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pager__info { color: var(--ink-3); font-size: .86rem; margin-right: auto; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 .5rem; border-radius: var(--r);
  border: 1px solid var(--line-2); display: inline-flex; align-items: center;
  justify-content: center; font-size: .86rem; font-weight: 600;
  color: var(--ink-2); text-decoration: none; background: var(--surface);
}
.pager a:hover { background: var(--surface-3); text-decoration: none; }
.pager .is-current { background: var(--edo); border-color: var(--edo); color: #fff; }
.pager .is-disabled { opacity: .4; pointer-events: none; }

/* --------------------------------------------------------------------------
   9. Badges, pills, status
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .5rem; border-radius: var(--r-sm);
  font-size: .76rem; font-weight: 650; letter-spacing: .01em;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge--new   { background: var(--info-bg);   color: var(--info); }
.badge--review{ background: var(--warn-bg);   color: var(--warn); }
.badge--short { background: var(--ok-bg);     color: var(--ok); }
.badge--reject{ background: var(--danger-bg); color: var(--danger); }
.badge--muted { background: var(--surface-3); color: var(--ink-4); }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: .82rem; color: var(--ink-2); text-decoration: none;
}
.chip:hover { border-color: var(--line-strong); text-decoration: none; }
.chip.is-on { background: var(--edo); border-color: var(--edo); color: #fff; }
.chip__x { color: var(--ink-4); font-weight: 700; }

.tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem;
  overflow-x: auto; }
.tabs a {
  padding: .6rem .85rem; font-size: .91rem; font-weight: 600; color: var(--ink-3);
  text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-current { color: var(--ink); border-bottom-color: var(--mark, var(--edo)); }
.tabs .count { color: var(--ink-4); font-weight: 500; margin-left: .3rem; }

/* --------------------------------------------------------------------------
   10. Notices
   -------------------------------------------------------------------------- */
.notice {
  display: flex; gap: .7rem; padding: .85rem 1rem; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 1.1rem;
  border-left: 3px solid var(--ink-4);
}
.notice svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.notice h4 { margin-bottom: .15rem; font-size: .92rem; }
.notice p:last-child { margin-bottom: 0; }
.notice p { font-size: .89rem; }
.notice--ok     { background: var(--ok-bg);     border-color: var(--ok);     color: var(--ok); }
.notice--info   { background: var(--info-bg);   border-color: var(--info);   color: var(--info); }
.notice--warn   { background: var(--warn-bg);   border-color: var(--warn);   color: var(--warn); }
.notice--danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.notice--ok h4, .notice--info h4, .notice--warn h4, .notice--danger h4 { color: inherit; }
.notice--ok p, .notice--info p, .notice--warn p, .notice--danger p { color: var(--ink-2); }

.empty { text-align: center; padding: 3rem 1.5rem; color: var(--ink-3); }
.empty svg { width: 34px; height: 34px; color: var(--ink-4); margin-bottom: .6rem; }
.empty h3 { margin-bottom: .3rem; }
.empty p { max-width: 42ch; margin-inline: auto; font-size: .92rem; }

/* toasts */
.toasts {
  position: fixed; z-index: 90; right: 1rem; bottom: 1rem;
  display: flex; flex-direction: column; gap: .5rem; max-width: min(92vw, 380px);
}
@media (max-width: 900px) { .toasts { bottom: 72px; left: 1rem; right: 1rem; max-width: none; } }
.toast {
  display: flex; align-items: flex-start; gap: .6rem;
  background: var(--inverse-bg); color: var(--inverse-fg); padding: .75rem .9rem; border-radius: var(--r);
  box-shadow: var(--lift-2); font-size: .89rem;
  animation: toast-in .2s ease;
}
.toast--ok     { background: var(--ok); }
.toast--danger { background: var(--danger); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .75;
  cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------------------
   11. Timeline — the ledger spine
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 1.6rem; margin: 0; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.timeline li { position: relative; padding-bottom: 1.15rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -1.6rem; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.timeline li.is-done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.is-now::before  { background: var(--surface); border-color: var(--edo); box-shadow: 0 0 0 3px var(--edo-50); }
.timeline__t { font-weight: 600; color: var(--ink); font-size: .93rem; }
.timeline__m { font-size: .82rem; color: var(--ink-4); }
.timeline__b { font-size: .88rem; margin-top: .2rem; }

/* definition rows */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .1rem 1rem; font-size: .92rem; }
.dl dt { color: var(--ink-3); padding: .45rem 0; border-bottom: 1px solid var(--line); }
.dl dd { margin: 0; color: var(--ink); padding: .45rem 0; border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }

/* --------------------------------------------------------------------------
   12. Command palette
   -------------------------------------------------------------------------- */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 100; background: var(--overlay);
  display: grid; align-items: start; justify-items: center; padding: 10vh 1rem 1rem;
}
.palette {
  width: min(640px, 100%); background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--lift-2); overflow: hidden; border: 1px solid var(--line);
}
.palette__in {
  display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.palette__in svg { width: 18px; height: 18px; color: var(--ink-4); flex: 0 0 auto; }
.palette__in input {
  flex: 1 1 auto; border: 0; outline: none; background: none; color: var(--ink);
  font: inherit; font-size: 1.02rem;
}
.palette__list { max-height: min(52vh, 420px); overflow-y: auto; padding: .35rem; }
.palette__group { font-size: .69rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-4); padding: .6rem .7rem .3rem; }
.palette__item {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .55rem .7rem; border: 0; border-radius: var(--r); background: none;
  color: var(--ink-2); font: inherit; font-size: .92rem; text-align: left; cursor: pointer;
  text-decoration: none;
}
.palette__item:hover, .palette__item.is-active { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.palette__item svg { width: 16px; height: 16px; color: var(--ink-4); flex: 0 0 auto; }
.palette__item .meta { margin-left: auto; font-size: .78rem; color: var(--ink-4); }
.palette__foot {
  display: flex; gap: 1rem; padding: .55rem 1rem; border-top: 1px solid var(--line);
  background: var(--surface-2); font-size: .76rem; color: var(--ink-4);
}

/* --------------------------------------------------------------------------
   13. Drawer / modal
   -------------------------------------------------------------------------- */
/* A dialog taller than the window is centred on it, so it overflows equally
   top and bottom: the title goes off the top and the confirm button off the
   bottom, and because <dialog> traps focus there is no way to scroll to it.
   The composer and the broadcast form are both tall enough to hit this on a
   laptop. The body scrolls instead, and the head and foot stay put. */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface);
  color: var(--ink-2); box-shadow: var(--lift-2); width: min(560px, 94vw);
  max-height: min(86vh, 860px);
  display: flex; flex-direction: column; overflow: hidden;
}
/* A closed dialog must stay hidden: display:flex above would otherwise beat
   the user-agent rule that hides it. */
dialog.modal:not([open]) { display: none; }
dialog.modal::backdrop { background: var(--overlay); }
/* Some dialogs wrap their head/body/foot in a <form>, which would otherwise
   be the only flex child and leave the body unconstrained. */
dialog.modal > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
dialog.modal .card__head { border-radius: var(--r-lg) var(--r-lg) 0 0; flex: 0 0 auto; }
dialog.modal .card__body { overflow-y: auto; flex: 1 1 auto; }
dialog.modal .card__foot { flex: 0 0 auto; }
dialog.modal--wide { width: min(880px, 94vw); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(520px, 100vw); background: var(--surface); box-shadow: var(--lift-2);
  display: flex; flex-direction: column; border-left: 1px solid var(--line);
}
.drawer__head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--line); }
.drawer__head h2 { flex: 1 1 auto; font-size: 1.02rem; }
.drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem; }
.drawer__foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-2);
  display: flex; gap: .5rem; }

/* --------------------------------------------------------------------------
   14. Charts drawn in markup (no library — data cost matters here)
   -------------------------------------------------------------------------- */
.bars { display: flex; flex-direction: column; gap: .55rem; }
.bar__row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .7rem;
  align-items: center; font-size: .88rem; }
.bar__label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* These are spans, so they must be blockified explicitly. A grid item is
   blockified for free, which is why the track looked right while the fill
   inside it silently ignored both width and height. */
.bar__track { display: block; height: 8px; background: var(--surface-3);
  border-radius: var(--r-pill); overflow: hidden; }
.bar__fill  { display: block; height: 100%; min-width: 2px;
  background: var(--mark, var(--edo)); border-radius: var(--r-pill); }
.bar__n { color: var(--ink-3); font-size: .83rem; min-width: 3ch; text-align: right; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.spark i { flex: 1 1 auto; background: var(--edo-200); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i.is-peak { background: var(--edo); }

.funnel { display: flex; flex-direction: column; gap: .4rem; }
.funnel__step { display: flex; align-items: center; gap: .7rem; font-size: .89rem; }
.funnel__bar { display: flex; height: 30px; border-radius: var(--r-sm); background: var(--mark, var(--edo));
  display: flex; align-items: center; padding: 0 .55rem; color: #fff; font-weight: 650;
  font-size: .83rem; min-width: 2.6rem; }

/* --------------------------------------------------------------------------
   15. Auth pages — one screen, split
   -------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 920px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }
.auth__aside {
  background: var(--edo); color: #CFE3D9; padding: 3rem; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
.auth__aside h2 { color: #fff; font-size: 1.9rem; letter-spacing: -.025em; max-width: 16ch; }
.auth__aside p { color: #A9CFBC; max-width: 44ch; }
.auth__marks { display: flex; flex-direction: column; gap: .5rem; margin-top: 2rem; }
.auth__marks i { height: 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); display: block; }
.auth__panel { display: grid; place-items: center; padding: 2rem 1.25rem; background: var(--surface); }
.auth__box { width: min(400px, 100%); }
.auth__box h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.auth__box .lead { color: var(--ink-3); margin-bottom: 1.6rem; }
.auth__alt { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   16. Utilities (few, deliberate)
   -------------------------------------------------------------------------- */
.row { display: flex; align-items: center; gap: .6rem; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.push { margin-left: auto; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }
.strong { color: var(--ink); font-weight: 600; }
.mono { font-family: var(--mono); font-size: .88em; }
.nowrap { white-space: nowrap; }
.mt0{margin-top:0}.mt1{margin-top:.5rem}.mt2{margin-top:1rem}.mt3{margin-top:1.5rem}
.mb0{margin-bottom:0}.mb1{margin-bottom:.5rem}.mb2{margin-bottom:1rem}.mb3{margin-bottom:1.5rem}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   17. Print — reviewers do print applications
   -------------------------------------------------------------------------- */
@media print {
  .rail, .topbar, .tabbar, .toasts, .bulkbar, .page-head__actions, .filters, .pager { display: none !important; }
  .app { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { border: 1px solid #999; break-inside: avoid; }
  .content { padding: 0; }
  a[href]::after { content: ""; }
}

/* --------------------------------------------------------------------------
   18. Section instructions (form builder)
   --------------------------------------------------------------------------
   A section with instructions and no questions is how this application has
   always expressed a notice page. The editor lives collapsed under the
   section title so a plain section is not cluttered by it.
   -------------------------------------------------------------------------- */
.fm-step-instructions {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.fm-step-instructions > summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; cursor: pointer; list-style: none;
  font-size: .86rem; font-weight: 600; color: var(--ink-3);
}
.fm-step-instructions > summary::-webkit-details-marker { display: none; }
.fm-step-instructions > summary::before {
  content: "\25B8"; font-size: .8em; color: var(--ink-4); transition: transform .15s;
}
.fm-step-instructions[open] > summary::before { transform: rotate(90deg); }
.fm-step-instructions > summary:hover { color: var(--ink); background: var(--surface-3); }
.fm-step-instructions__hint {
  margin-left: auto; font-weight: 400; font-size: .78rem; color: var(--ink-4);
}
.fm-step-instructions__body { padding: 0 1rem 1rem; }

.fm-toolbar {
  display: flex; gap: .3rem; flex-wrap: wrap; align-items: center;
  padding: .4rem; margin-bottom: .5rem;
  border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0; background: var(--surface);
}
.fm-toolbar__spacer { flex: 1 1 auto; }
.fm-toolbar .fm-btn { min-height: 28px; padding: 0 .5rem; font-size: .8rem; }

.fm-step-instructions__body textarea {
  border-radius: 0 0 var(--r) var(--r); margin-top: -.5rem;
  font-family: var(--mono); font-size: .84rem; line-height: 1.55;
}
.fm-step-instructions__preview {
  border: 1px solid var(--line-2); border-radius: 0 0 var(--r) var(--r);
  margin-top: -.5rem; padding: .8rem 1rem; background: var(--surface);
  min-height: 120px;
}
/* The preview must read like the public form, not like the editor. */
.fm-step-instructions__preview :where(h1,h2,h3,h4) { margin: .6rem 0 .3rem; }
.fm-step-instructions__preview ul { margin: .4rem 0 .4rem 1.1rem; }
.fm-step-instructions__preview hr { margin: .8rem 0; }
.fm-step-instructions__preview p { margin-bottom: .6rem; }

/* --------------------------------------------------------------------------
   19. Notification panel
   -------------------------------------------------------------------------- */
.notif { position: relative; }
.notif__panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: min(360px, calc(100vw - 2rem));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--lift-2); overflow: hidden;
}
.notif__head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .7rem .9rem; border-bottom: 1px solid var(--line);
}
.notif__list { max-height: min(60vh, 420px); overflow-y: auto; }
.notif__item {
  display: block; padding: .7rem .9rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink-2);
}
.notif__item:last-child { border-bottom: 0; }
.notif__item:hover { background: var(--surface-2); text-decoration: none; }
.notif__item.is-unread { background: var(--edo-50); }
.notif__item.is-unread .notif__title::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--info); margin-right: .4rem; vertical-align: middle;
}
.notif__title { font-weight: 600; color: var(--ink); font-size: .9rem; }
.notif__body { font-size: .84rem; color: var(--ink-3); margin-top: .1rem; }
.notif__when { font-size: .76rem; color: var(--ink-4); margin-top: .2rem; }
.notif__empty { padding: 2rem 1rem; text-align: center; color: var(--ink-4); font-size: .88rem; }
.notif__foot {
  display: block; padding: .6rem .9rem; text-align: center; font-size: .86rem;
  font-weight: 600; border-top: 1px solid var(--line); background: var(--surface-2);
  text-decoration: none;
}
@media (max-width: 480px) {
  .notif__panel { position: fixed; top: var(--bar); right: .5rem; left: .5rem; width: auto; }
}


/* --------------------------------------------------------------------------
   20. Landing page
   --------------------------------------------------------------------------
   The front door. Most visitors read this on a phone, on a connection they
   pay for by the megabyte, at a moment that matters — a state job is not a
   casual purchase. It answers three questions in the order people ask them:

     is anything open?   ·   is this real and free?   ·   what do I do?

   On colour. A recruitment portal does not have to look like a tax form.
   The palette is six saturated hues carried on the deep Edo green, in the
   register of Nigerian print and cloth rather than of municipal stationery,
   and it is systematic rather than sprinkled: each hue belongs to a position
   in a sequence. Vacancy one is emerald, two is saffron, three is cyan, and
   the same six run the steps and the ribbon. The colour therefore tells you
   where you are in a list, which is work, not ornament.

   The ribbon — six bars under the masthead and above the footer — is the one
   element the page is allowed to be loud with. Everything else stays quiet.
   -------------------------------------------------------------------------- */
:root {
  /* Drawn from the gold of the Edo crest and the greens of the state arms,
     then extended into a full sequence. Checked against white and against
     the deep green; the dark-mode set below is lifted for the same job. */
  --c1: #0E9F6E;   /* emerald  */
  --c2: #E8990C;   /* saffron  */
  --c3: #0E9BBF;   /* cyan     */
  --c4: #C2367C;   /* rose     */
  --c5: #5B52D3;   /* indigo   */
  --c6: #C9A227;   /* brass — the crest colour, and the hero's accent */

  /* Each hue carries the text colour that is legible ON it. White on saffron
     is 2.3:1 and white on brass is worse; dark on indigo is 2.7:1. There is
     no single answer, so the answer is stored next to the hue and the two are
     always set together. */
  --c1-on: #04231A;
  --c2-on: #231703;
  --c3-on: #04212A;
  --c4-on: #FFFFFF;
  --c5-on: #FFFFFF;
  --c6-on: #231703;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c1: #37C993; --c2: #F5B63F; --c3: #45BEDC;
    --c4: #E26BA6; --c5: #8F88E8; --c6: #E0BE4A;
    /* Every hue is lifted for the dark page, so every one now takes dark text. */
    --c1-on: #07160F; --c2-on: #231703; --c3-on: #04212A;
    --c4-on: #2A0A1B; --c5-on: #0D0A2B; --c6-on: #231703;
  }
}
:root[data-theme="dark"] {
  --c1: #37C993; --c2: #F5B63F; --c3: #45BEDC;
  --c4: #E26BA6; --c5: #8F88E8; --c6: #E0BE4A;
  --c1-on: #07160F; --c2-on: #231703; --c3-on: #04212A;
  --c4-on: #2A0A1B; --c5-on: #0D0A2B; --c6-on: #231703;
}

.land { --gutter: clamp(1.25rem, 5vw, 3rem); --wide: 1180px; }
.land__in { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* the ribbon ------------------------------------------------------------ */
.ribbon { display: flex; height: 6px; }
.ribbon > i { flex: 1; }
.ribbon > i:nth-child(1) { background: var(--c1); }
.ribbon > i:nth-child(2) { background: var(--c2); }
.ribbon > i:nth-child(3) { background: var(--c3); }
.ribbon > i:nth-child(4) { background: var(--c4); }
.ribbon > i:nth-child(5) { background: var(--c5); }
.ribbon > i:nth-child(6) { background: var(--c6); }

/* masthead ------------------------------------------------------------- */
.masthead { background: var(--edo); color: #fff; }
.masthead__in {
  max-width: var(--wide); margin-inline: auto;
  padding: .85rem var(--gutter);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.masthead__brand {
  display: flex; align-items: center; gap: .75rem;
  color: #fff; text-decoration: none; margin-right: auto; min-width: 0;
}
.masthead__crest {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  object-fit: cover; background: #fff;
}
.masthead__name { font-weight: 700; font-size: 1rem; line-height: 1.15; letter-spacing: -.012em; }
.masthead__sub {
  display: block; font-weight: 500; font-size: .76rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c6); margin-top: .12rem;
}
.masthead .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.38); }
.masthead .btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.75); }
.masthead .btn--primary { background: #fff; color: var(--edo); border-color: #fff; font-weight: 600; }
.masthead .btn--primary:hover { background: rgba(255,255,255,.88); }

/* Recruitment fraud is common and costly for exactly this audience, so the
   warning is stated once, plainly, before anything is asked of anyone. */
.warnstrip { background: var(--c2); color: #231703; font-weight: 500; font-size: .88rem; }
.warnstrip__in {
  max-width: var(--wide); margin-inline: auto; padding: .6rem var(--gutter);
  display: flex; align-items: center; gap: .55rem;
}
.warnstrip b { font-weight: 750; }

/* hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--edo); }
.hero__track { display: flex; transition: transform .6s cubic-bezier(.22,.7,.3,1); }
.hero__slide {
  position: relative; flex: 0 0 100%; min-width: 100%;
  min-height: clamp(400px, 60vh, 580px);
  background-size: cover; background-position: center;
  display: grid; align-items: center;
}
/* Two washes over whatever gets uploaded: a colour bloom that ties the band
   to the palette, and a dark ramp heaviest on the left where the words are,
   clearing to the right so the picture is still a picture. */
.hero__slide::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,32,24,.94) 0%, rgba(6,32,24,.8) 44%, rgba(6,32,24,.26) 80%, rgba(6,32,24,.1) 100%),
    radial-gradient(90% 120% at 8% 110%, rgba(14,159,110,.55) 0%, rgba(14,155,191,.28) 45%, rgba(91,82,211,0) 78%),
    radial-gradient(70% 90% at 100% 0%, rgba(232,153,12,.3) 0%, rgba(194,54,124,.12) 50%, rgba(0,0,0,0) 80%);
}
.hero__body {
  position: relative; z-index: 1;
  max-width: var(--wide); margin-inline: auto; width: 100%;
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  color: #fff;
}
.hero__col {
  /* rem, not ch: ch is measured against this element's own 1rem font, which
     made the column far too narrow for a 3rem headline — the title broke
     three ways and the two buttons stacked. */
  max-width: min(100%, 36rem);
  border-left: 3px solid var(--c6);
  padding-left: clamp(1rem, 2.2vw, 1.6rem);
}
.hero__eyebrow {
  font-size: .8rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase;
  color: var(--c6); margin: 0 0 .7rem;
}
.hero__title {
  color: inherit;   /* h1 is var(--ink) globally; over the scrim that is black on black */
  font-size: clamp(2rem, 4.6vw, 3.05rem); font-weight: 700;
  letter-spacing: -.032em; line-height: 1.06; margin: 0; text-wrap: balance;
}
.hero__text {
  margin: 1rem 0 0; max-width: 48ch;
  font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; color: rgba(255,255,255,.9);
}
.hero__cta { margin-top: 1.75rem; }
.hero__cta .btn--primary { background: #fff; color: var(--edo); border-color: #fff; }
.hero__cta .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.hero__cta .btn--ghost:hover { background: rgba(255,255,255,.14); }

.hero__arrow {
  position: absolute; bottom: clamp(1.25rem, 3vw, 2rem); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4); background: rgba(6,32,24,.45);
  color: #fff; cursor: pointer; display: grid; place-items: center;
}
.hero__arrow:hover { background: rgba(6,32,24,.85); border-color: rgba(255,255,255,.85); }
.hero__arrow--prev { right: calc(var(--gutter) + 52px); }
.hero__arrow--next { right: var(--gutter); }
/* One chevron in the icon set, pointing right; back is that one turned round
   rather than a second near-identical path to keep in step. */
.hero__arrow--prev svg { transform: rotate(180deg); }

.hero__dots {
  position: absolute; left: var(--gutter); bottom: calc(clamp(1.25rem, 3vw, 2rem) + 16px);
  z-index: 2; display: flex; gap: .4rem;
}
.hero__dot {
  width: 30px; height: 4px; border-radius: 2px; padding: 0; cursor: pointer;
  border: 0; background: rgba(255,255,255,.34); transition: background .2s;
}
.hero__dot:nth-child(6n+1)[aria-current="true"] { background: var(--c1); }
.hero__dot:nth-child(6n+2)[aria-current="true"] { background: var(--c2); }
.hero__dot:nth-child(6n+3)[aria-current="true"] { background: var(--c3); }
.hero__dot:nth-child(6n+4)[aria-current="true"] { background: var(--c4); }
.hero__dot:nth-child(6n+5)[aria-current="true"] { background: var(--c5); }
.hero__dot:nth-child(6n+6)[aria-current="true"] { background: var(--c6); }

.hero--single .hero__arrow, .hero--single .hero__dots { display: none; }

@media (max-width: 639.98px) {
  /* The arrows would sit on the words: the hero is only as wide as the text
     here, so there is no margin to put them in. Phones swipe. */
  .hero__arrow { display: none; }
  .hero__dots  { bottom: 1.25rem; }
  .hero__slide { min-height: clamp(360px, 62vh, 470px); }
}
@media (prefers-reduced-motion: reduce) { .hero__track { transition: none; } }

/* the open-now bar ------------------------------------------------------ */
.openbar { background: var(--c1); color: #04231A; }
.openbar__in {
  max-width: var(--wide); margin-inline: auto; padding: .95rem var(--gutter);
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  font-weight: 500;
}
.openbar__dot {
  width: 9px; height: 9px; border-radius: 50%; background: #04231A; flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(4,35,26,.18);
}
.openbar__n { font-weight: 750; }
.openbar__link { color: #04231A; margin-left: auto; font-weight: 700; font-size: .92rem; }
.openbar--shut { background: var(--surface-3); color: var(--ink-2); }
.openbar--shut .openbar__dot { background: var(--ink-4); box-shadow: 0 0 0 4px var(--line); }

/* vacancies as a published notice list, not a card grid ------------------
   These are announcements in a sequence, so they are numbered and ruled like
   a notice board rather than boxed like products. The number takes the hue
   for its position, which is what makes the colour information. */
.vacancy {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 3vw, 2.25rem);
  align-items: start; padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--line-2);
}
.vacancy:last-child { border-bottom: 1px solid var(--line-2); }
.vacancy__n {
  display: grid; place-items: center; flex: 0 0 auto;
  width: clamp(44px, 6vw, 54px); height: clamp(44px, 6vw, 54px);
  border-radius: var(--r);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 750;
  font-variant-numeric: tabular-nums;
  background: var(--vac, var(--c1)); color: var(--vac-on, var(--c1-on));
}
.vacancy__name { font-size: clamp(1.2rem, 2.4vw, 1.55rem); letter-spacing: -.022em; margin: 0; }
.vacancy__meta {
  display: flex; gap: .55rem .9rem; flex-wrap: wrap; align-items: center;
  margin-top: .55rem; font-size: .88rem; color: var(--ink-3);
}
.vacancy__tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .55rem; border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 650; letter-spacing: .01em;
  color: var(--vac, var(--c1));
  background: color-mix(in srgb, var(--vac, var(--c1)) 14%, transparent);
}
.vacancy__text { margin: .8rem 0 0; color: var(--ink-2); max-width: 62ch; }
.vacancy__go { align-self: center; }
.vacancy__go .btn--primary {
  background: var(--vac, var(--edo)); border-color: var(--vac, var(--edo));
  color: var(--vac-on, #fff);
}

@media (max-width: 739.98px) {
  .vacancy { grid-template-columns: auto 1fr; }
  .vacancy__go { grid-column: 2; align-self: start; margin-top: 1rem; }
}

/* how it works — a real sequence, which is what earns the numbers -------- */
.steps { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 899.98px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479.98px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 3px solid var(--stp, var(--c1)); padding-top: 1rem; }
.step__n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--stp, var(--c1)); color: var(--stp-on, var(--c1-on));
  font-size: .82rem; font-weight: 750;
}
.step__t { margin: .75rem 0 .3rem; font-size: 1.02rem; letter-spacing: -.012em; }
.step__b { margin: 0; color: var(--ink-3); font-size: .92rem; line-height: 1.55; }

/* poll ------------------------------------------------------------------ */
.pollcard {
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.pollcard__rule { height: 4px; background: var(--c5); }
.pollcard__in { padding: clamp(1.25rem, 3vw, 1.75rem); }
.pollcard__eyebrow {
  font-size: .76rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c5); margin: 0 0 .5rem;
}
.pollcard__q { font-size: 1.1rem; font-weight: 650; margin: 0; letter-spacing: -.015em; }
.pollcard__opts { display: grid; gap: .5rem; margin-top: 1.1rem; max-width: 34rem; }
.pollcard__opt {
  display: flex; align-items: center; gap: .65rem;
  padding: .72rem .9rem; border: 1px solid var(--line-2);
  border-radius: var(--r); background: var(--surface);
  cursor: pointer; text-align: left; font: inherit; font-size: .95rem;
  color: var(--ink); width: 100%; transition: border-color .15s, background .15s;
}
.pollcard__opt::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--line-2);
}
.pollcard__opt:hover { border-color: var(--c5); background: color-mix(in srgb, var(--c5) 7%, transparent); }
.pollcard__opt:hover::before { border-color: var(--c5); }
/* Not signed in: the choices are shown but must not look like controls — a
   ring in a box reads as a radio button, and pressing it would do nothing. */
.pollcard__opt--preview { cursor: default; background: transparent; border-style: dashed; color: var(--ink-3); }
.pollcard__opt--preview::before { border-color: var(--line); }

/* closing band ---------------------------------------------------------- */
.closeband {
  color: #fff;
  background:
    radial-gradient(80% 140% at 0% 100%, rgba(14,159,110,.9) 0%, rgba(14,155,191,.45) 42%, rgba(11,59,46,0) 76%),
    radial-gradient(70% 120% at 100% 0%, rgba(232,153,12,.5) 0%, rgba(194,54,124,.3) 45%, rgba(11,59,46,0) 78%),
    var(--edo);
}
.closeband__in {
  max-width: var(--wide); margin-inline: auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1fr auto;
}
@media (max-width: 739.98px) { .closeband__in { grid-template-columns: 1fr; } }
.closeband h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.028em; margin: 0; }
.closeband p { margin: .65rem 0 0; color: rgba(255,255,255,.85); max-width: 54ch; }
.closeband .btn--primary { background: #fff; color: var(--edo); border-color: #fff; }

.landfoot { background: var(--edo-700); color: rgba(255,255,255,.82); font-size: .86rem; }
.landfoot__in {
  max-width: var(--wide); margin-inline: auto; padding: 1.75rem var(--gutter);
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.landfoot a { color: #fff; }
.landfoot__right { margin-left: auto; display: flex; gap: 1.25rem; }

/* --------------------------------------------------------------------------
   21. People
   --------------------------------------------------------------------------
   Applicants upload a passport photograph as part of applying, so a list of
   people can show faces. At 1,981 accounts that is most of what makes the
   list usable: a face is recognised before a username is read.
   -------------------------------------------------------------------------- */
.avatar {
  border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: block;
  background: var(--surface-3);
}
.avatar--initial {
  display: grid; place-items: center; font-weight: 650; line-height: 1;
  letter-spacing: -.01em;
}
.person { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.person__text { min-width: 0; }

/* --------------------------------------------------------------------------
   22. Audit trail — what actually changed
   -------------------------------------------------------------------------- */
.audit-diff { margin-top: .4rem; }
.audit-diff > summary {
  cursor: pointer; font-size: .82rem; color: var(--ink-3);
  list-style: none; display: inline-flex; align-items: center; gap: .35rem;
}
.audit-diff > summary::-webkit-details-marker { display: none; }
.audit-diff > summary::before {
  content: "▸"; font-size: .7em; transition: transform .15s;
}
.audit-diff[open] > summary::before { transform: rotate(90deg); }
.audit-diff > summary:hover { color: var(--ink); }
.audit-diff__list {
  margin: .5rem 0 0; padding: .6rem .75rem;
  background: var(--surface-3); border-radius: var(--r-sm);
  font-size: .84rem;
}
.audit-diff__list dt { font-weight: 650; color: var(--ink-2); margin-top: .4rem; }
.audit-diff__list dt:first-child { margin-top: 0; }
.audit-diff__list dd {
  margin: .1rem 0 0; display: flex; gap: .4rem; flex-wrap: wrap; align-items: baseline;
}
.audit-diff__from { color: var(--ink-3); text-decoration: line-through; }
.audit-diff__arrow { color: var(--ink-4); }
.audit-diff__to { color: var(--ink); font-weight: 500; }

/* --------------------------------------------------------------------------
   23. Inbox
   --------------------------------------------------------------------------
   An inbox is scanned, not read. Three things have to be visible without
   stopping: who wrote, whether anything is waiting, and how recent it is.
   The old rows labelled every conversation with the form name, so an inbox of
   five said "General" five times, and the unread marker was a small red word
   among three other badges.
   -------------------------------------------------------------------------- */
.thread {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; text-decoration: none; color: inherit;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.thread:last-child { border-bottom: 0; }
.thread:hover { background: var(--surface-3); }
.thread.is-current { background: var(--edo-50); border-left-color: var(--edo); }
.thread__body { flex: 1; min-width: 0; }

.thread__top { display: flex; align-items: baseline; gap: .5rem; }
.thread__who {
  font-weight: 600; font-size: .92rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread__time { margin-left: auto; font-size: .78rem; color: var(--ink-4); flex: 0 0 auto; }

.thread__subject {
  font-size: .9rem; color: var(--ink-2); margin-top: .1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread__preview {
  font-size: .85rem; color: var(--ink-3); margin-top: .15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.thread__meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
.thread__status, .thread__tag {
  font-size: .72rem; font-weight: 600; padding: .1rem .45rem;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-3);
}
.thread__status--open     { background: var(--warn-bg);   color: var(--warn); }
.thread__status--resolved { background: var(--ok-bg);     color: var(--ok); }
.thread__status--pending  { background: var(--info-bg);   color: var(--info); }
.thread__tag { font-weight: 500; }

/* Unread: a count to the right, and weight on the row. One signal can be
   missed while scanning; the pair cannot. */
.thread__unread {
  /* Top-aligned, beside the timestamp, rather than centred against the body —
     centred, it lands in the middle of the preview text. */
  flex: 0 0 auto; align-self: flex-start; margin-top: .1rem;
  min-width: 22px; height: 22px; padding: 0 .35rem;
  border-radius: var(--r-pill); background: var(--danger); color: #fff;
  font-size: .74rem; font-weight: 700; line-height: 22px; text-align: center;
}
.thread.is-unread { background: var(--surface); }
.thread.is-unread .thread__who,
.thread.is-unread .thread__subject { font-weight: 700; color: var(--ink); }
.thread.is-unread .thread__preview { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   24. Applicant portal — profile
   --------------------------------------------------------------------------
   The one page in the portal that is about the person rather than about a
   form, so it is allowed to look like somebody's page: a coloured band, their
   photograph sitting over it, and the three numbers that matter to them.
   Each number is a link, because a figure you cannot act on is decoration.
   -------------------------------------------------------------------------- */
.pcard {
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
}
.pcard__band {
  height: 92px;
  background:
    radial-gradient(70% 180% at 0% 100%, rgba(14,159,110,.95) 0%, rgba(14,155,191,.5) 45%, rgba(11,59,46,0) 78%),
    radial-gradient(60% 150% at 100% 0%, rgba(232,153,12,.55) 0%, rgba(194,54,124,.35) 48%, rgba(11,59,46,0) 80%),
    var(--edo);
}
.pcard__body {
  display: grid; gap: 1.25rem;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  padding: 0 1.25rem 1.25rem;
  margin-top: -46px;          /* lifts the photo onto the band */
}
@media (max-width: 739.98px) {
  .pcard__body { grid-template-columns: 1fr; align-items: start; }
}

.pcard__photo { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.pcard__frame {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden;
  background: var(--surface-3); display: grid; place-items: center;
  border: 4px solid var(--surface); box-shadow: var(--lift);
}
.pcard__frame img { width: 100%; height: 100%; object-fit: cover; }
.pcard__frame span { font-size: 2.2rem; font-weight: 700; color: var(--ink-4); }
.pcard__photo form { margin: 0; }

.pcard__who { min-width: 0; padding-bottom: .25rem; }
.pcard__name { font-size: 1.35rem; letter-spacing: -.022em; margin: 0; }
.pcard__mail { margin: .2rem 0 0; color: var(--ink-3); font-size: .92rem; }
.pcard__since { margin: .2rem 0 0; color: var(--ink-4); font-size: .84rem; }

.pstats { display: flex; gap: .6rem; flex-wrap: wrap; }
.pstat {
  display: grid; gap: .1rem; min-width: 86px; padding: .6rem .8rem;
  border-radius: var(--r); text-decoration: none;
  background: color-mix(in srgb, var(--s, var(--c1)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--s, var(--c1)) 30%, transparent);
  transition: transform .12s, box-shadow .12s;
}
.pstat:hover { transform: translateY(-1px); box-shadow: var(--lift); }
.pstat__n {
  font-size: 1.4rem; font-weight: 700; line-height: 1.05;
  color: var(--s, var(--c1)); font-variant-numeric: tabular-nums;
}
.pstat__l { font-size: .76rem; color: var(--ink-3); }
/* Something is actually waiting, so it gets a pulse once rather than forever. */
.pstat.is-live .pstat__n::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: .3rem;
  border-radius: 50%; background: var(--s); vertical-align: middle;
}

.pcard__foot { border-top: 1px solid var(--line); padding: 1rem 1.25rem; background: var(--surface-3); }
.pcomplete { display: flex; align-items: center; gap: .7rem; }
.pcomplete__track {
  flex: 1; height: 8px; border-radius: var(--r-pill);
  background: var(--line-2); overflow: hidden;
}
.pcomplete__fill { display: block; height: 100%; border-radius: var(--r-pill); transition: width .3s; }
.pcomplete__n { font-size: .82rem; font-weight: 650; color: var(--ink-2); flex: 0 0 auto; }

.pchecks { list-style: none; margin: .85rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pcheck {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; padding: .22rem .6rem; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--ink-3);
  border: 1px dashed var(--line-2);
}
.pcheck__mark {
  width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center;
  font-size: .62rem; background: var(--line-2); color: transparent;
}
.pcheck.is-done {
  background: color-mix(in srgb, var(--c1) 12%, transparent);
  border-style: solid; border-color: color-mix(in srgb, var(--c1) 32%, transparent);
  color: var(--ink-2);
}
.pcheck.is-done .pcheck__mark { background: var(--c1); color: #fff; }
.pcard__note { margin: .8rem 0 0; font-size: .84rem; color: var(--ink-3); }

/* A coloured rail on a card, so a long page has landmarks you can aim at
   rather than four identical white boxes. */
.card--rail { border-top: 3px solid var(--rail, var(--edo)); }

/* Notification channels: one colour each, used in the legend and the header,
   so a column can be read without tracing back up to its heading. */
.chanlegend { display: flex; gap: .4rem; flex-wrap: wrap; margin: .9rem 0 .25rem; }
.chan {
  font-size: .74rem; font-weight: 650; padding: .15rem .5rem;
  border-radius: var(--r-pill); white-space: nowrap;
}
.chan--inapp { background: color-mix(in srgb, var(--c3) 15%, transparent); color: var(--c3); }
.chan--email { background: color-mix(in srgb, var(--c2) 18%, transparent); color: var(--warn); }
.chan--push  { background: color-mix(in srgb, var(--c5) 15%, transparent); color: var(--c5); }

/* On the applicant's side the subject takes the lead line, so it may wrap to
   two lines rather than being clipped — a truncated subject is often the only
   part that said what the message was about. */
.thread__who--subject {
  white-space: normal; overflow: visible;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* --------------------------------------------------------------------------
   25. Public form — identity bar and title
   --------------------------------------------------------------------------
   Used only when a form carries a carousel. The carousel is the hero; a
   second saturated slab under it competed with the picture and said nothing
   the picture had not. These two pieces say the things the picture cannot:
   who the form is from, and what it is.
   -------------------------------------------------------------------------- */
.fm-orgbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.fm-orgbar__in {
  max-width: 66rem; margin-inline: auto;
  padding: .7rem clamp(1rem, 4vw, 1.5rem);
  display: flex; align-items: center; gap: .65rem;
}
.fm-orgbar__logo { border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.fm-orgbar__name {
  font-weight: 650; font-size: .92rem; letter-spacing: -.01em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-orgbar__who { margin-left: auto; font-size: .82rem; color: var(--ink-3); flex: 0 0 auto; }

.fm-formhead { background: var(--page); }
.fm-formhead__in {
  max-width: 66rem; margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1rem, 4vw, 1.5rem) clamp(.75rem, 2vw, 1rem);
}
.fm-formhead__badge {
  display: inline-block; margin-bottom: .6rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--edo); background: var(--edo-50);
  border: 1px solid var(--edo-200);
  padding: .22rem .6rem; border-radius: var(--r-pill);
}
.fm-formhead h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 700;
  letter-spacing: -.028em; line-height: 1.12; margin: 0; text-wrap: balance;
}
.fm-formhead p {
  margin: .7rem 0 0; max-width: 60ch;
  color: var(--ink-3); font-size: 1rem; line-height: 1.6;
}

/* A hero on a form page is an introduction, not a destination: the form is
   what the person came for, so the band is shorter here than on the landing
   page and the first question stays near the fold. */
.fm-form-page .hero__slide { min-height: clamp(240px, 36vh, 360px); }
.fm-form-page .hero__body  { padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1rem, 4vw, 1.5rem); }
.fm-form-page .hero__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

/* --------------------------------------------------------------------------
   26. Hero text animation
   --------------------------------------------------------------------------
   The previous release gave every slide two dropdowns of animate.css class
   names — about seventy options each, for a decision nobody revisits, costing
   roughly 70KB of stylesheet on connections that are paid for by the
   megabyte. This is four options, chosen once per form, written as three
   keyframes here.

   The three lines arrive in reading order rather than as a block: the eyebrow
   first, then the headline, then the supporting line, 70ms apart. That is
   slow enough to read as a sequence and fast enough not to be a wait.

   `backwards` matters: without it each line is painted in its final position
   for one frame before the delay starts, which reads as a flicker.
   -------------------------------------------------------------------------- */
@keyframes hero-up   { from { opacity: 0; transform: translateY(14px); } }
@keyframes hero-fade { from { opacity: 0; } }
@keyframes hero-left { from { opacity: 0; transform: translateX(-20px); } }

.hero[data-hero-anim] .hero__slide.is-active :where(.hero__eyebrow, .hero__title, .hero__text, .hero__cta) {
  animation-duration: .55s;
  animation-timing-function: cubic-bezier(.22, .7, .3, 1);
  animation-fill-mode: backwards;
}
.hero[data-hero-anim] .hero__slide.is-active .hero__eyebrow { animation-delay: 0s; }
.hero[data-hero-anim] .hero__slide.is-active .hero__title   { animation-delay: .07s; }
.hero[data-hero-anim] .hero__slide.is-active .hero__text    { animation-delay: .14s; }
.hero[data-hero-anim] .hero__slide.is-active .hero__cta     { animation-delay: .21s; }

.hero[data-hero-anim="up"]   .hero__slide.is-active :where(.hero__eyebrow, .hero__title, .hero__text, .hero__cta) { animation-name: hero-up; }
.hero[data-hero-anim="fade"] .hero__slide.is-active :where(.hero__eyebrow, .hero__title, .hero__text, .hero__cta) { animation-name: hero-fade; }
.hero[data-hero-anim="left"] .hero__slide.is-active :where(.hero__eyebrow, .hero__title, .hero__text, .hero__cta) { animation-name: hero-left; }

/* Asked for less motion: the words still arrive, they just do not travel. */
@media (prefers-reduced-motion: reduce) {
  .hero[data-hero-anim] .hero__slide.is-active :where(.hero__eyebrow, .hero__title, .hero__text, .hero__cta) {
    animation: none;
  }
}
