/*
 * Portal styling, built on the Irish Red Cross design system.
 *
 * Tokens live in app/design/tokens.css and are the single source of truth for
 * colour, type and spacing - imported first, below. Per the design system's own
 * rules: never hardcode a colour, font or spacing value here. If a value is
 * missing, add it to tokens.css (and design/tokens.json) rather than inventing
 * one locally.
 *
 * Class naming follows the system: .irc-<block>__<element> --<modifier>.
 *
 * Navigation is in two shapes, which is the design pack v2 shape (26 Aug 2026):
 *
 *  - PUBLIC pages keep the top header with mega-menus (.irc-nav / .irc-mega),
 *    here and in Components/Layout/HeaderNav.razor, driven by wwwroot/js/nav.js.
 *  - The SIGNED-IN portal is an app shell - a left sidebar and an app bar,
 *    .irc-side / .irc-appbar, in wwwroot/css/portal.css. This reverses the
 *    earlier "top menu everywhere" instruction for the signed-in area only.
 *
 * One departure: a dark scheme is included. The supplied tokens define no dark
 * palette, so this derives one from the same ink scale and is marked as needing
 * brand sign-off (docs/design/branding.md). Every pair still clears AA. It follows
 * the device until the visitor picks with the footer's sun/moon button, which puts
 * data-theme on <html> - see the theme block below and Services/ThemePreference.cs.
 *
 * Contrast was computed rather than assumed. Since IRC-2619 the red is the
 * website's #e51c21, which is 4.65:1 with white text, so it clears AA
 * as a FILL (--accent, through --irc-red-text-bg). As TEXT it is only 3.96:1 on
 * the grey panel colour, so red drawn on the page stays on --irc-red-dark
 * (#b3121a, 6.96:1 on white, 5.9:1 on the panel). See tokens.css.
 */

/*
 * Tokens are linked before this file from Pages/Shared/_Layout.cshtml. Order
 * matters: every var(--irc-*) below resolves from tokens.css, and if it loads
 * second the page renders with no padding or type scale at all.
 */

:root {
  /* Semantic aliases onto the brand tokens, so components never reach for a
     raw brand value and a re-brand touches one file. */
  --bg: var(--irc-surface);
  --surface: var(--irc-surface-2);
  --surface-raised: var(--irc-surface);
  --fg: var(--irc-ink);
  --muted: var(--irc-ink-3);
  --border: var(--irc-line);
  --border-strong: var(--irc-line-strong);
  /*
   * The red, in two jobs - the same colour in light, different in dark:
   *
   *   --accent         a FILL: buttons, the header CTA, badges, the avatar,
   *                    unread dots. Carries --accent-fg (white) text.
   *   --accent-text    the red DRAWN ON the page: link text, the brand name,
   *                    chips, current-item markers, focus outlines, keylines.
   *
   * IRC-2619: the fill is the website's red, which carries white text at
   * 4.65:1, and darkens to red-dark under the pointer, as the website's own
   * buttons do. Text in red is red-dark in light, because the website's red is
   * below AA as text on the grey panels (3.96:1); in dark, text and lines take
   * a lighter red (see the dark blocks). Use --accent only where the red is a
   * surface; anything drawn in red on the page, including a border or an
   * outline, is --accent-text.
   */
  --accent: var(--irc-red-text-bg);
  --accent-fg: #ffffff;
  /* The fill under --accent-fg, hovered. */
  --accent-hover: var(--irc-red-dark);
  --accent-text: var(--irc-red-dark);
  /* A link under the pointer: the website's maroon. */
  --accent-text-hover: var(--irc-red-darker);
  --accent-subtle: var(--irc-red-tint);
  --accent-subtle-border: var(--irc-red-tint-2);
  --error: #a3161b;
  --error-subtle: var(--irc-red-tint);
  --success: var(--irc-teal);
  /* Text on a --success fill, as --accent-fg is on an --accent one. */
  --success-fg: #ffffff;
  --success-subtle: #eef6f6;
  /* No warning alias existed until PE-009. The palette has an amber token but
     nothing semantic pointing at it, and "expiring" is the case it is for. */
  --warning: var(--irc-amber);
  --warning-subtle: #fdf4e6;
  --measure: 70ch;

  /* Which schemes the browser may draw its own furniture in - scrollbars, date
     pickers, select pop-ups, autofill, any control with no background of ours.
     Without it they stayed light under the dark palette. */
  color-scheme: light dark;
}

/*
 * Derived dark palette - NOT part of the supplied system. Needs brand sign-off
 * before go-live (docs/design/branding.md). Ink scale inverted. Red fills keep
 * the light theme's red; red drawn on the ground (text, lines) is lifted to
 * #ff7b7b to clear contrast - until 15 Oct 2026 everything red was a pink
 * #ff9aa8, which read as off-brand.
 *
 * The grounds are a dark grey-brown, not near-black, so the footer - IRC ink in
 * both schemes - still reads as a darker band below the page. Until 15 Oct 2026
 * --bg was #14100f, darker than the footer, which vanished into it. Cards,
 * borders and the tints moved up with the grounds to keep the same layering.
 *
 * TWO TRIGGERS, ONE PALETTE. The device's setting, unless the visitor has picked
 * with the footer's sun/moon button, which puts data-theme on <html>:
 *
 *   no data-theme        -> follow prefers-color-scheme (every first visit)
 *   data-theme="dark"    -> dark, whatever the device says
 *   data-theme="light"   -> light, whatever the device says
 *
 * So the dark declarations appear twice below and the two blocks MUST stay
 * identical. light-dark() would say it once, but before iOS 17.5 it voids every
 * colour on the page rather than falling back, and older iPhones are a real
 * part of this audience. tests/e2e/theme.spec.ts compares the two blocks
 * property by property and fails on any drift - add a dark alias to both.
 */
:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #262120;
    --surface: #2d2827;
    --surface-raised: #352f2e;
    --fg: #f2eeed;
    --muted: #b3aaa9;
    --border: #4d4544;
    --border-strong: #8e8584;
    /* --accent, --accent-fg and --accent-hover are not here: the fill is the
       light theme's red with white text in both schemes (15 Oct 2026). Only
       red drawn on the dark ground is lifted - a redder red than the first
       derived palette's pink #ff9aa8. Lighter rather than darker under the
       pointer, because darker would sink into the ground. */
    --accent-text: #ff7b7b;
    --accent-text-hover: #ffa0a0;
    --accent-subtle: #3b2326;
    --accent-subtle-border: #5e333a;
    --error: #ffb3ab;
    --error-subtle: #3b2321;
    --success: #7fd0cd;
    --success-fg: #14100f;
    --success-subtle: #1d302e;
    /* Lifted the way the red is, and for the same reason: the light-mode amber
       is unreadable on a dark ground. */
    --warning: #f0b757;
    --warning-subtle: #3a301f;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #262120;
  --surface: #2d2827;
  --surface-raised: #352f2e;
  --fg: #f2eeed;
  --muted: #b3aaa9;
  --border: #4d4544;
  --border-strong: #8e8584;
  --accent-text: #ff7b7b;
  --accent-text-hover: #ffa0a0;
  --accent-subtle: #3b2326;
  --accent-subtle-border: #5e333a;
  --error: #ffb3ab;
  --error-subtle: #3b2321;
  --success: #7fd0cd;
  --success-fg: #14100f;
  --success-subtle: #1d302e;
  --warning: #f0b757;
  --warning-subtle: #3a301f;
}

/* ---------- reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--irc-font-body);
  font-size: var(--irc-fs-300);
  line-height: var(--irc-lh-body);
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

/* IRC-2619: the website's headings - Marr Sans Cond semibold, sized from its
   type scale (tokens.css). */
h1,
h2,
h3,
h4 {
  font-family: var(--irc-font-display);
  font-weight: 600;
  letter-spacing: var(--irc-tracking-tight);
  line-height: var(--irc-lh-tight);
  margin: 0 0 var(--irc-s4);
  text-wrap: balance;
}

h1 {
  font-size: clamp(var(--irc-fs-600), 1.2rem + 2vw, var(--irc-fs-700));
}
h2 {
  font-size: var(--irc-fs-500);
  margin-top: var(--irc-s7);
}
h3 {
  font-size: var(--irc-fs-450);
  line-height: var(--irc-lh-snug);
  margin-top: var(--irc-s6);
}

p {
  margin: 0 0 var(--irc-s4);
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-text-hover);
}

:focus-visible {
  border-radius: var(--irc-radius-sm);
  box-shadow: var(--irc-focus);
  outline: none;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- skip link, stub banner ---------- */

.skip-link {
  background: var(--irc-ink);
  border-radius: var(--irc-radius);
  color: #ffffff;
  left: var(--irc-s4);
  padding: var(--irc-s3) var(--irc-s4);
  position: absolute;
  text-decoration: none;
  top: -100%;
  z-index: 200;
}
.skip-link:focus {
  top: var(--irc-s2);
}
/* Ink in both schemes, so the global a:hover colour is wrong for it in both. */
.skip-link:hover {
  color: #ffffff;
}

/* Topbar treatment from the design system, carrying the IRC-1271 AC4 warning. */
.stub-banner {
  background: var(--irc-ink);
  color: #ffffff;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: var(--irc-tracking-caps);
  margin: 0;
  /* Overrides the global p max-width, which otherwise clips the banner to the
     measure and leaves it spanning only part of the viewport. */
  max-width: none;
  padding: var(--irc-s2) var(--irc-gutter);
  text-align: center;
  text-transform: uppercase;
}

/* ---------- header (.irc-header) ---------- */

.irc-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--irc-z-header);
}

.irc-header__inner {
  align-items: center;
  display: flex;
  gap: var(--irc-s5);
  margin-inline: auto;
  max-width: var(--irc-container);
  min-height: var(--irc-header-h);
  padding-inline: var(--irc-gutter);
}

.irc-header__spacer {
  flex: 1 1 auto;
}

.irc-header__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: var(--irc-s3);
}

.brand {
  align-items: center;
  color: var(--accent-text);
  display: flex;
  flex: 0 0 auto;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-400);
  font-weight: 800;
  gap: var(--irc-s2);
  letter-spacing: var(--irc-tracking-tight);
  text-decoration: none;
}

/* Red cross mark, drawn rather than an asset - swap for the official lockup. */
.brand::before {
  background: var(--irc-red);
  clip-path: polygon(38% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 38% 100%, 38% 62%, 0 62%, 0 38%, 38% 38%);
  content: "";
  flex: none;
  height: 1.35rem;
  width: 1.35rem;
}

main {
  margin-inline: auto;
  max-width: var(--irc-container);
  padding: var(--irc-s7) var(--irc-gutter) var(--irc-s9);
}

/* ---------- primary nav (.irc-nav) ---------- */

.irc-nav {
  align-items: center;
  display: flex;
}

.irc-nav__list {
  align-items: center;
  display: flex;
  /*
   * NOWRAP, and the reason is measured rather than aesthetic.
   *
   * The primary nav is given 540px at the 1240px container width, and the five
   * sections need 610px. It wrapped onto a second line for every multi-role
   * member, on every page, and had done since well before the sections were
   * renamed - the previous six-section menu needed 597px in the same 540px, so
   * this is a long-standing layout fault rather than anything IRC-1792 did.
   *
   * It went unnoticed because nothing could see it. The a11y and route specs
   * assert that links EXIST and are reachable, which stays true when the row
   * wraps, and the drawer breakpoint at 68rem is well below the widths where
   * this happens. It was found by reading the frames of the first demonstration
   * video, which is the first thing in this project to look at the header rather
   * than query it.
   *
   * Wrapping was never the right failure anyway: a two-line header pushes the
   * page down, moves the sticky header's height around, and reads as a mistake.
   * Below 68rem the whole nav is replaced by the drawer, so nowrap here cannot
   * produce an overflowing row on a phone - it only holds the desktop row on one
   * line, which the tighter padding below now leaves room for.
   */
  flex-wrap: nowrap;
  gap: var(--irc-s1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.irc-nav__item {
  position: relative;
}

.irc-nav__link {
  align-items: center;
  background: none;
  border: 0;
  border-radius: var(--irc-radius-sm);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-300);
  font-weight: 600;
  gap: var(--irc-s2);
  letter-spacing: normal;
  min-height: 44px;
  /*
   * Horizontal padding trimmed from 12px to 8px so the five sections fit the
   * 540px the header gives them - 610px at 12px, 570px at 8px, and the gaps and
   * carets make up the rest. Vertical padding is untouched: it is what keeps the
   * 44px touch target the WCAG target-size rule wants, and shrinking that to win
   * horizontal room would trade an invisible fault for a real one.
   */
  padding: var(--irc-s3) var(--irc-s2);
  /*
   * A section label is a name and never breaks. Without this the row stops
   * wrapping (nowrap on the list) and starts wrapping INSIDE a button instead -
   * "My Branch" became "My" over "Branch", which is the same fault one level
   * down and looks more like a bug, not less.
   */
  white-space: nowrap;
  position: relative;
  text-decoration: none;
  text-transform: none;
}

/*
 * The active-item underline lives on the list item, not on the link.
 * As a pseudo-element inside the button box it counted as a second background
 * behind the label, and axe reported a colour-contrast violation because it
 * could not resolve which colour the text actually sits on.
 */
.irc-nav__item::after {
  background: var(--irc-red);
  bottom: 0;
  content: "";
  height: 3px;
  left: var(--irc-s3);
  position: absolute;
  right: var(--irc-s3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--irc-dur) var(--irc-ease);
}

.irc-nav__item:hover::after,
.irc-nav__item.is-open::after,
.irc-nav__item:has(> .irc-nav__link[aria-current="page"])::after {
  transform: scaleX(1);
}

/* The call-to-action carries its own fill, so no underline. */
.nav-cta::after {
  display: none;
}

/*
 * The global `button` rules give every button the primary fill, and
 * `button:hover:not(:disabled)` (specificity 0,2,1) outranks a single class.
 * Nav triggers, the burger and the drawer accordions are buttons for the right
 * semantic reasons but must not look like primary actions - without this the
 * open trigger was painted red-darker under red-dark text, which axe measured
 * at 1.42:1.
 */
.irc-nav .irc-nav__link,
.irc-nav .irc-nav__link:hover,
.irc-header__actions .irc-burger,
.irc-header__actions .irc-burger:hover,
.irc-acc .irc-acc__btn,
.irc-acc .irc-acc__btn:hover {
  background: none;
  color: var(--fg);
}

.irc-nav .irc-nav__link:hover,
.irc-acc .irc-acc__btn:hover {
  color: var(--accent-text);
}

/* IRC-2619: a pill, as every action on the new redcross.ie is (Figma). */
.irc-nav .nav-cta .irc-nav__link {
  background: var(--accent);
  border-radius: var(--irc-radius-pill);
  color: var(--accent-fg);
  padding-inline: var(--irc-s5);
}
.irc-nav .nav-cta .irc-nav__link:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
}
.irc-nav__caret {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  height: 7px;
  opacity: 0.55;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--irc-dur) var(--irc-ease);
  width: 7px;
}

.irc-nav__item.is-open .irc-nav__caret {
  transform: rotate(225deg) translateY(-2px);
}

/* ---------- mega menu (.irc-mega) ---------- */

.irc-mega {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-top: 3px solid var(--irc-red);
  box-shadow: var(--irc-shadow-2);
  left: 0;
  min-width: 21rem;
  padding: var(--irc-s6);
  position: absolute;
  top: 100%;
  z-index: var(--irc-z-mega);
}

.irc-mega--wide {
  min-width: min(46rem, calc(100vw - 2 * var(--irc-gutter)));
}

/* Keep the last menus on screen rather than overflowing the viewport. */
.irc-nav__item:nth-last-child(-n + 2) .irc-mega {
  left: auto;
  right: 0;
}

.irc-mega__cols {
  display: grid;
  gap: var(--irc-s6);
  grid-template-columns: repeat(var(--irc-mega-cols, 1), minmax(0, 1fr));
}

.irc-mega__group-title {
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: var(--irc-tracking-caps);
  margin: 0 0 var(--irc-s3);
  padding-bottom: var(--irc-s2);
  text-transform: uppercase;
}

.irc-mega__list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.irc-mega__list a {
  align-items: center;
  border-radius: var(--irc-radius-sm);
  color: var(--fg);
  display: flex;
  gap: var(--irc-s2);
  justify-content: space-between;
  min-height: 40px;
  padding: var(--irc-s2) var(--irc-s3);
  text-decoration: none;
}

.irc-mega__list a:hover,
.irc-mega__list a[aria-current="page"] {
  background: var(--accent-subtle);
  color: var(--accent-text);
}

/* ---------- burger + drawer ---------- */

.irc-burger {
  align-items: center;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  display: none;
  gap: var(--irc-s2);
  min-height: 44px;
  padding: var(--irc-s3);
}

.irc-burger__bars,
.irc-burger__bars::before,
.irc-burger__bars::after {
  background: var(--fg);
  content: "";
  display: block;
  height: 2px;
  position: relative;
  width: 22px;
}
.irc-burger__bars::before {
  position: absolute;
  top: -7px;
}
.irc-burger__bars::after {
  position: absolute;
  top: 7px;
}

.irc-drawer {
  background: var(--bg);
  inset: 0;
  overflow-y: auto;
  padding: var(--irc-s5) var(--irc-gutter) var(--irc-s9);
  position: fixed;
  z-index: var(--irc-z-drawer);
}

.irc-drawer__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--irc-s5);
}

.irc-acc {
  border-top: 1px solid var(--border);
}

.irc-acc__item {
  border-bottom: 1px solid var(--border);
}

.irc-acc__btn {
  align-items: center;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-400);
  font-weight: 600;
  gap: var(--irc-s3);
  justify-content: space-between;
  letter-spacing: normal;
  min-height: 56px;
  padding: var(--irc-s4) 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  width: 100%;
}

.irc-acc__panel {
  padding-bottom: var(--irc-s4);
}

.irc-acc__panel a {
  border-left: 2px solid var(--border);
  color: var(--fg);
  display: block;
  min-height: 44px;
  padding: var(--irc-s3) 0 var(--irc-s3) var(--irc-s4);
  text-decoration: none;
}

.irc-acc__panel a:hover {
  border-left-color: var(--irc-red);
  color: var(--accent-text);
}

.irc-acc__sub-title {
  color: var(--muted);
  font-size: var(--irc-fs-100);
  letter-spacing: var(--irc-tracking-caps);
  margin: var(--irc-s4) 0 var(--irc-s2);
  text-transform: uppercase;
}

/*
 * Below this width the header cannot hold seven mega-menus, and touch devices
 * have no hover to open them with, so nav collapses into the drawer.
 */
@media (max-width: 77.5rem) {
  /*
   * 77.5rem = 1240px, the container width, and it is a MEASUREMENT.
   *
   * The desktop row needs the full container to hold the logo, five sections and
   * the account actions. Measured on the branch-officer persona, which is the
   * widest: between the old 68rem breakpoint and 1240px the sign-out button ran
   * past the right edge of the header and was clipped. Below 1240px the drawer
   * is simply the right control, and it was already built.
   *
   * Raised together with the nowrap above, and neither works without the other:
   * nowrap alone trades a wrapped row for a clipped one across that same band.
   */
  .irc-nav {
    display: none;
  }
  .irc-burger {
    display: inline-flex;
  }
}

@media (min-width: 77.501rem) {
  .irc-drawer {
    display: none;
  }
}

.nav-name {
  font-family: var(--irc-font-display);
  font-weight: 700;
  margin: 0;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s1);
  margin: 0 0 var(--irc-s4);
}

/* .irc-tag from the design system. */
.role-chip {
  background: var(--accent-subtle);
  border-radius: var(--irc-radius-pill);
  color: var(--accent-text);
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: var(--irc-tracking-caps);
  padding: 2px var(--irc-s2);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  flex: none;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  padding: 0 var(--irc-s2);
}

h2 .badge {
  margin-left: var(--irc-s2);
  vertical-align: middle;
}

/* ---------- buttons (.irc-btn) ---------- */

/*
 * PILL, AND SENTENCE CASE. From the website wireframe (Figma, 17 Sep 2026).
 *
 * Two changes and they go together. Every action in the wireframe is fully
 * round - Donate Now, Start Fundraising, Apply to Volunteer, Sign In - and none
 * of them is uppercased. The caps in that design are reserved for EYEBROW
 * labels above section headings (OUR AREAS OF FOCUS, OUR PERFORMANCE), which is
 * the opposite of what this portal was doing: shouting the buttons and having no
 * eyebrows at all.
 *
 * Only the two rules that are actually BUTTONS changed. The other uppercase
 * rules in this file - .role-chip, .org-subheading, .route-badge, .stub-banner,
 * .optional-marker - are labels and meta, which is exactly the job the wireframe
 * gives caps, so they keep it.
 *
 * text-transform is presentational only: the accessible name and textContent are
 * unchanged, so no spec that matches on button text is affected by this.
 *
 * IRC-2619: the type is the website's button - Plus Jakarta Sans, bold, 16px
 * (chrome.min.css, .wp-block-button__link) - not the heading face.
 */
button {
  align-items: center;
  background: var(--accent);
  border: 2px solid transparent;
  border-radius: var(--irc-radius-pill);
  color: var(--accent-fg);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--irc-font-body);
  font-size: var(--irc-fs-300);
  font-weight: 700;
  gap: var(--irc-s2);
  min-height: 48px;
  padding: var(--irc-s3) var(--irc-s6);
  transition: background var(--irc-dur) var(--irc-ease), border-color var(--irc-dur) var(--irc-ease);
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button-quiet {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
  min-height: 38px;
  padding: var(--irc-s2) var(--irc-s4);
}
.button-quiet:hover:not(:disabled) {
  background: transparent;
  border-color: var(--fg);
}

/* ---------- forms ---------- */

fieldset {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius);
  margin: 0 0 var(--irc-s5);
  padding: var(--irc-s5);
}

legend {
  font-family: var(--irc-font-display);
  font-weight: 700;
  padding: 0 var(--irc-s2);
}

.field {
  margin-bottom: var(--irc-s5);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--irc-s2);
}

input[type='text'],
input[type='email'],
input[type='date'],
input[type='tel'],
input[type='search'],
select,
textarea {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--irc-radius-sm);
  color: var(--fg);
  font: inherit;
  /* max-width alongside width so a long option in a select cannot push the
     control past its column and scroll a 360px page sideways. */
  max-width: 100%;
  padding: var(--irc-s3);
  width: 100%;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

input[aria-invalid='true'],
select[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--error);
  border-width: 2px;
}

.checkbox {
  align-items: flex-start;
  display: flex;
  gap: var(--irc-s2);
  margin-bottom: var(--irc-s4);
}

.checkbox input {
  accent-color: var(--irc-red);
  flex: none;
  height: 1.15rem;
  margin-top: 0.2rem;
  width: 1.15rem;
}

.checkbox label {
  font-weight: 400;
  margin: 0;
}

/* ---------- messages ---------- */

.hint {
  color: var(--muted);
  font-size: var(--irc-fs-200);
  margin-top: var(--irc-s1);
}

.error {
  color: var(--error);
  font-weight: 700;
  margin-top: var(--irc-s1);
}

[role='alert'] {
  background: var(--error-subtle);
  border: 1px solid var(--error);
  border-left-width: 5px;
  border-radius: var(--irc-radius);
  margin-bottom: var(--irc-s5);
  padding: var(--irc-s4) var(--irc-s5);
}

[role='alert'] h1,
[role='alert'] h2 {
  margin-top: 0;
}

[role='alert'] ul {
  margin: 0;
  padding-left: var(--irc-s5);
}

[role='status'] {
  background: var(--success-subtle);
  border: 1px solid var(--success);
  border-left-width: 5px;
  border-radius: var(--irc-radius);
  color: var(--success);
  font-weight: 700;
  margin-bottom: var(--irc-s5);
  padding: var(--irc-s3) var(--irc-s5);
}

/* A live region kept on the page so its first message is announced (a committee
   meeting, the meetings list, compliance, emergency availability, the shift register)
   has nothing to say until then. Empty, it drew an empty green box (DEV, 13 Oct 2026). */
[role='status']:empty {
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
}

/* ---------- cards (.irc-card) ---------- */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-lg);
  box-shadow: var(--irc-shadow-1);
  padding: var(--irc-s5);
  transition: box-shadow var(--irc-dur) var(--irc-ease), transform var(--irc-dur) var(--irc-ease);
}

.card h2 {
  margin-top: 0;
}

/*
 * Multi-column throughout - the design system's .irc-grid--3. auto-fit gives
 * three across on desktop, two on tablet, one on phone, with no breakpoints to
 * maintain.
 */
.card-grid {
  display: grid;
  gap: var(--irc-s5);
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  margin-top: var(--irc-s6);
}

.card-grid .card {
  border-top: 3px solid var(--irc-red);
  display: flex;
  flex-direction: column;
}

.card-grid .card:hover {
  box-shadow: var(--irc-shadow-2);
  transform: translateY(-2px);
}

.card-grid .card h2 {
  font-size: var(--irc-fs-500);
  margin-bottom: var(--irc-s2);
  margin-top: 0;
}

.card-grid .card p {
  color: var(--muted);
  flex: 1;
  font-size: var(--irc-fs-200);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s4);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* .irc-link-arrow */
.actions a {
  align-items: center;
  color: var(--accent-text);
  display: inline-flex;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-200);
  font-weight: 700;
  gap: var(--irc-s1);
  letter-spacing: var(--irc-tracking-caps);
  text-decoration: none;
}
.actions a::after {
  content: '\2192';
  transition: transform var(--irc-dur) var(--irc-ease);
}
.actions a:hover {
  text-decoration: underline;
}
.actions a:hover::after {
  transform: translateX(3px);
}

/* ---------- sign-in list (multi-column) ---------- */

.user-list {
  display: grid;
  gap: var(--irc-s4);
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  list-style: none;
  margin: var(--irc-s6) 0 0;
  max-width: var(--irc-container);
  padding: 0;
}

.user-list form {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--irc-red);
  border-radius: var(--irc-radius);
  display: flex;
  flex-direction: column;
  gap: var(--irc-s3);
  height: 100%;
  justify-content: space-between;
  padding: var(--irc-s5);
}

.user-list strong {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
}

.user-list .hint {
  margin: var(--irc-s1) 0 var(--irc-s3);
}

.user-list .roles {
  margin: 0;
}

.user-list button {
  align-self: flex-start;
}

/* ---------- membership card ---------- */

/*
 * Member photograph on the digital card. The card face carries number, photo,
 * expiry and badges - no scannable code (IRC-1571, clarified 25 Aug 2026). The
 * .qr rules that used to sit here styled a code the face was never meant to
 * carry; the wallet pass carries the barcode instead.
 */
.card-photo {
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  float: right;
  height: auto;
  margin: 0 0 var(--irc-s4) var(--irc-s4);
  width: 8.75rem;
}

dl.detail {
  display: grid;
  gap: var(--irc-s2) var(--irc-s5);
  grid-template-columns: minmax(8rem, auto) 1fr;
  margin: 0 0 var(--irc-s4);
}

dl.detail dt {
  color: var(--muted);
  font-size: var(--irc-fs-200);
}

dl.detail dd {
  font-weight: 600;
  margin: 0;
}

@media (max-width: 30rem) {
  dl.detail {
    gap: 0;
    grid-template-columns: 1fr;
  }
  dl.detail dd {
    margin-bottom: var(--irc-s3);
  }
}

ul[data-testid='card-badges'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul[data-testid='card-badges'] li {
  border-bottom: 1px solid var(--border);
  padding: var(--irc-s3) 0;
}

ul[data-testid='card-badges'] li:last-child {
  border-bottom: 0;
}

/* ---------- footer (.irc-footer) ---------- */

footer {
  background: var(--irc-ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--irc-fs-200);
  padding: var(--irc-s8) var(--irc-gutter) var(--irc-s6);
}

/* Positions the theme switch against the links' own box - see .theme-switch. */
.irc-footer__inner {
  margin: 0 auto;
  max-width: var(--irc-container);
  position: relative;
}

footer nav ul {
  display: grid;
  gap: var(--irc-s5) var(--irc-s7);
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  list-style: none;
  margin: 0 auto;
  max-width: var(--irc-container);
  padding: 0;
}

footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/*
 * The light/dark switch (FooterNav.razor). Drawn in the footer's own white-on-ink,
 * not the palette aliases: the footer is ink in both schemes, so an alias that
 * flips would put dark-scheme text on it in one of them.
 */
/*
 * At the right-hand end of the first row of links, centred on it, and out of the
 * flow - so the links lay out exactly as they did before the switch existed (same
 * columns, same wrapping, same footer height). In flow it took 64px of width from
 * the links, which pushed them onto a second row at laptop widths.
 *
 * It cannot cover a link: a column is never narrower than 9rem (144px), the
 * longest link ("Accessibility") is about 80px, and the switch is 40px, so the
 * last column always has room for both. A much longer link in the footer would
 * need this revisited.
 */
.theme-switch {
  --theme-switch-size: 40px;
  display: flex;
  position: absolute;
  right: 0;
  top: calc((var(--irc-lh-body) * 1em - var(--theme-switch-size)) / 2);
}

/* Undoes the global pill fill: this is an icon on the footer, not an action. */
.theme-switch__button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.72);
  height: var(--theme-switch-size);
  justify-content: center;
  min-height: 0;
  padding: 0;
  width: var(--theme-switch-size);
}
.theme-switch__button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  color: #ffffff;
}
/* The global ring is red at 40% - barely there on ink. */
.theme-switch__button:focus-visible {
  box-shadow: none;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/*
 * Moon while the page is light, sun while it is dark: the button shows what
 * pressing it does. The same three cases as the palette at the top of the file,
 * because on a first visit only the browser knows which scheme is showing.
 */
.theme-switch__to-light {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-switch__to-dark {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-switch__to-light {
    display: inline-flex;
  }
}
:root[data-theme="dark"] .theme-switch__to-dark {
  display: none;
}
:root[data-theme="dark"] .theme-switch__to-light {
  display: inline-flex;
}

.loading {
  color: var(--muted);
  padding: var(--irc-s7) 0;
}

/* ---------- wallet options ---------- */

/*
 * Placeholder marks. Apple and Google both publish official badge artwork under
 * their brand guidelines; that artwork must replace these before go-live, and
 * neither mark may be redrawn by hand.
 */
.wallet-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s3);
  list-style: none;
  margin: var(--irc-s4) 0 0;
  padding: 0;
}

.wallet-options button {
  background: var(--irc-ink);
  border-color: var(--irc-ink);
  color: #ffffff;
}

.wallet-options button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.wallet-mark {
  font-size: 1.1em;
  line-height: 1;
}

/* ==========================================================================
   Page layout: measure, and multi-column without touching markup
   ==========================================================================

   The portal was structurally right and visually a single 1240px column, with
   prose running the full width - which is roughly 160 characters a line, about
   twice a comfortable measure.

   `main` becomes a twelve-column grid. Everything defaults to the full span, so
   nothing moves unless a rule says it should; prose is capped at `--measure`;
   and a `.card` that is a direct child takes half the width, so a run of cards
   pairs up on desktop and stacks on phone. That last part is why this is CSS
   and not fifteen page edits - the pages already emit the cards, they were just
   being laid out one per row.

   Cards inside `.card-grid` are not direct children of `main`, so its own
   auto-fit sizing still governs them. */

main {
  align-content: start;
  column-gap: var(--irc-s5);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: var(--irc-s4);
}

/* Full span is the default so that adding a page cannot silently land an
   element in a half column. Half width is opt-in, below. */
main > * {
  grid-column: 1 / -1;
  margin-block-end: 0;
  min-width: 0;
}

/* Reading measure. Applied to the text elements rather than to `main`, so that
   grids and cards still use the full container. */
main > p,
main > h1,
main > h2,
main > h3,
main > ul:not([class]),
main > ol:not([class]),
main > dl:not([class]) {
  max-width: var(--measure);
}

/* Vertical rhythm, since grid gaps are uniform and headings need more air above
   them than a paragraph does. */
main > h2 {
  margin-block-start: var(--irc-s5);
}

main > h3 {
  margin-block-start: var(--irc-s3);
}

main > .card {
  grid-column: span 6;
}

/* One card left on its own row keeps the half width rather than stretching to
   fill it - a lone full-bleed card reads as a page-wide banner. */
main > .card:only-of-type {
  grid-column: span 7;
}

@media (max-width: 60rem) {
  main > .card,
  main > .card:only-of-type {
    grid-column: 1 / -1;
  }
}

/* ---------- page head ---------- */

/*
 * The h1 carried no more weight than an h2. A short rule in the brand red is
 * enough to anchor the page without adding a component to every view.
 */
main > h1 {
  margin-block-end: var(--irc-s2);
  position: relative;
  padding-block-end: var(--irc-s3);
}

main > h1::after {
  background: var(--irc-red-dark);
  block-size: 3px;
  border-radius: 2px;
  content: "";
  inline-size: 3rem;
  inset-block-end: 0;
  inset-inline-start: 0;
  position: absolute;
}

/* The sentence under an h1 is a standfirst, not body copy. */
main > h1 + p {
  color: var(--muted);
  font-size: var(--irc-fs-300);
  line-height: 1.5;
}

/* ---------- description lists ---------- */

/*
 * `.detail` had no styling at all, so a membership card's fields rendered as a
 * stacked run of unaligned label/value pairs. Two columns with the labels in
 * their own track is what makes it scan as a record.
 */
.detail {
  column-gap: var(--irc-s5);
  display: grid;
  grid-template-columns: auto 1fr;
  margin: var(--irc-s4) 0 0;
  row-gap: var(--irc-s2);
}

.detail dt {
  color: var(--muted);
  font-size: var(--irc-fs-200);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.detail dd {
  font-variant-numeric: tabular-nums;
  margin: 0;
}

@media (max-width: 30rem) {
  .detail {
    grid-template-columns: 1fr;
    row-gap: var(--irc-s1);
  }

  .detail dd {
    margin-block-end: var(--irc-s3);
  }
}

/* ---------- card surfaces ---------- */

/*
 * A hairline border on white is not much of a surface. The accent edge is the
 * one the design system already uses on `.card-grid` items; applying it to
 * standalone cards keeps the two consistent rather than having two kinds of
 * card that look unrelated.
 */
.card {
  border-start-start-radius: var(--irc-radius-lg);
  border-start-end-radius: var(--irc-radius-lg);
  overflow: hidden;
  padding: var(--irc-s6);
  position: relative;
}

.card::before {
  background: linear-gradient(90deg, var(--irc-red-dark), var(--irc-red));
  block-size: 3px;
  content: "";
  inset-block-start: 0;
  inset-inline: 0;
  position: absolute;
}

/* `.card-grid` already draws its own top border; two would stack. */
.card-grid .card::before {
  content: none;
}

.card > h2:first-child,
.card > h3:first-child {
  margin-block-start: 0;
}

/* ---------- action links ---------- */

/*
 * These are the primary route off most pages and read as a row of plain links.
 * Enough surface to be a target, and comfortably over the 24px minimum that
 * WCAG 2.2 target-size asks for.
 */
.actions a {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-block-size: 2.75rem;
  padding: var(--irc-s2) var(--irc-s5);
  transition: background-color var(--irc-dur) var(--irc-ease),
    border-color var(--irc-dur) var(--irc-ease);
}

.actions a:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
}

/*
 * IRC-2557. The one thing a new joiner's dashboard asks them to do, filled like a
 * button so it reads as the primary action rather than one link among several.
 */
.actions a.action-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-fg);
}

.actions a.action-primary:hover {
  background: var(--accent-hover);
  border-color: transparent;
}

/* ---------- signed-in header at narrow widths ---------- */

/*
 * The signed-out header fits a phone; the signed-in one does not. It gains the
 * member's name and a Sign out control, and with the burger alongside them the
 * row was 143px wider than a 360px viewport - so every signed-in page scrolled
 * sideways.
 *
 * Nothing caught it: axe does not check overflow, and no spec signed in at a
 * phone width. The spec added with this change does both.
 *
 * The row wraps rather than shrinking, because shrinking is what pushed the
 * burger off-screen in the first place.
 */
@media (max-width: 40rem) {
  .irc-header__inner {
    flex-wrap: wrap;
    row-gap: var(--irc-s3);
  }

  .irc-header__actions {
    flex: 1 0 100%;
    justify-content: flex-end;
  }

  /* The greeting is the one thing here that is not a control, and the dashboard
     says the same thing with more room. */
  .nav-name {
    display: none;
  }
}

/* ---------- branch transfer (PE-014) ---------- */

/*
 * The Requested / Approved / Completed track. A row of pills rather than a
 * connected stepper: a connector drawn in CSS is decoration a screen reader
 * cannot see and a 360px screen has no room for, and the ordered list already
 * carries the sequence.
 *
 * Every state is written out in words inside the pill, so the colours are
 * reinforcement rather than the message (WCAG 1.4.1). The pairs below were
 * checked against the same ink and brand scales the rest of this file uses and
 * clear AA in both schemes.
 */
.progress {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  list-style: none;
  margin: 0 0 var(--irc-s4);
  padding: 0;
}

.progress li {
  border: 1px solid var(--border-strong);
  border-radius: var(--irc-radius);
  display: flex;
  flex-direction: column;
  flex: 1 1 8rem;
  min-width: 0;
  padding: var(--irc-s2) var(--irc-s3);
}

.progress__label {
  font-family: var(--irc-font-display);
  font-weight: 700;
}

.progress__state {
  font-size: var(--irc-fs-200);
}

.progress li[data-state='done'] {
  background: var(--success-subtle);
  border-color: var(--success);
  color: var(--success);
}

.progress li[data-state='current'] {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.progress li[data-state='todo'] {
  background: var(--surface);
  color: var(--muted);
}

/*
 * The same panel renders up to three times on the member page - in flight, just
 * submitted, and each past request - so it needs a separator of its own rather
 * than relying on being the only thing in its card.
 */
.transfer-panel + .transfer-panel {
  border-block-start: 1px solid var(--border);
  margin-block-start: var(--irc-s5);
  padding-block-start: var(--irc-s5);
}

.transfer-panel__heading {
  font-size: var(--irc-fs-400);
  margin-block-start: 0;
}

.transfer-panel__outcome {
  margin-block-end: var(--irc-s3);
}

/* ==========================================================================
   PE-009 (IRC-1800): roles, prerequisites and currency
   ==========================================================================

   Appended as one block at the end of the file rather than threaded through it,
   so the Wave 2 and Wave 3 portal tasks editing site.css at the same time do
   not collide with this one.

   The rule here that is not decoration: the three registration routes must be
   visibly different, because reading "branch mediated" as "sign yourself up"
   sends a member off to do something that is not theirs to do. Each route gets
   its own card edge, its own chip colour and its own chip wording, and
   roles.spec.ts asserts the three chips do not share a background.

   Colour never carries the difference on its own - the chip text says which
   route it is - and every badge sits ink-on-tint, so contrast holds in both
   schemes without depending on a hue.

   The --warning aliases this block introduced live with the others at the top
   of the file now, so the dark scheme has one pair of blocks to keep in step
   rather than two.
   ---------------------------------------------------------------------- */

/* Text for assistive technology only. Gives repeated action links - "Find a
   course", "View the pathway" - a destination a screen-reader user can tell
   apart when they are listed out of context. */
.visually-hidden {
  block-size: 1px;
  clip-path: inset(50%);
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

/* ---------- role catalogue ---------- */

/* `.card-grid .card p` sets flex:1 on every paragraph, which is right for a
   dashboard card of one line and wrong for these, which carry several. Only the
   summary absorbs the spare height, so the controls line up along the bottom of
   a row. */
.card-grid .role-card p {
  color: var(--muted);
  flex: 0 0 auto;
}

.card-grid .role-card > p.role-summary {
  color: var(--fg);
  flex: 1 0 auto;
  font-size: var(--irc-fs-300);
}

.card-grid .role-card h3 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

/* Same specificity as `.card-grid .card`, later in the file - so the route
   colour replaces the default red edge rather than fighting it. */
.card-grid .role-card--self {
  border-top-color: var(--success);
}

.card-grid .role-card--branch {
  border-top-color: var(--accent-text);
}

.card-grid .role-card--prerequisite {
  border-top-color: var(--warning);
}

.card-grid .role-card--other {
  border-top-color: var(--border-strong);
}

.route {
  margin: 0 0 var(--irc-s3);
}

.route-badge {
  border: 1px solid;
  border-radius: 999px;
  color: var(--fg);
  display: inline-block;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: var(--irc-tracking-caps);
  padding: var(--irc-s1) var(--irc-s3);
  text-transform: uppercase;
}

.route-badge--self {
  background: var(--success-subtle);
  border-color: var(--success);
}

.route-badge--branch {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
}

.route-badge--prerequisite {
  background: var(--warning-subtle);
  border-color: var(--warning);
}

.route-badge--other {
  background: var(--surface);
  border-color: var(--border-strong);
}

.route-explanation {
  margin-bottom: var(--irc-s3);
}

/* ---------- standing interest ---------- */

.interest {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s3);
  padding-top: var(--irc-s3);
}

.interest__status {
  margin: 0 0 var(--irc-s1);
}

.status-badge,
.step-badge,
.currency-badge {
  color: var(--fg);
}

.status-badge--active,
.step-badge--met {
  background: var(--success-subtle);
  border-color: var(--success);
}

.status-badge--progress,
.step-badge--outstanding,
.currency-badge--expiring {
  background: var(--warning-subtle);
  border-color: var(--warning);
}

.status-badge--interested {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
}

.status-badge--closed,
.status-badge--other {
  background: var(--surface);
  border-color: var(--border-strong);
}

.currency-badge--expired {
  background: var(--error-subtle);
  border-color: var(--error);
}

.interest-recorded {
  margin-block: var(--irc-s3);
}

.interest-recorded p {
  margin: 0;
}

/* No display property here, on purpose. `hidden` is what closes this panel, and
   a display:flex or display:grid would silently defeat it - the form would stay
   on screen while aria-expanded said it was closed. */
.interest-form {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s3);
  padding-top: var(--irc-s4);
}

.interest-form .field {
  margin-bottom: var(--irc-s3);
}

.interest-form textarea {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--irc-radius-sm);
  color: var(--fg);
  font: inherit;
  padding: var(--irc-s3);
  resize: vertical;
  width: 100%;
}

.form-actions {
  align-items: center;
  gap: var(--irc-s3);
}

/* ---------- prerequisite pathway ---------- */

.pathway {
  display: grid;
  gap: var(--irc-s4);
  list-style: none;
  margin: var(--irc-s4) 0 var(--irc-s6);
  max-width: 52rem;
  padding: 0;
}

.pathway__step {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--irc-radius);
  padding: var(--irc-s4) var(--irc-s5);
}

.pathway__step--met {
  border-left-color: var(--success);
}

.pathway__step--outstanding {
  border-left-color: var(--warning);
}

/* The step number is text, not a list marker. list-style:none drops list
   semantics in Safari with VoiceOver and a marker-only number would go with it
   - "step 2 of 3" is the part a member actually navigates by. */
.pathway__number {
  color: var(--muted);
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: var(--irc-tracking-caps);
  margin: 0 0 var(--irc-s1);
  text-transform: uppercase;
}

.pathway__title {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

.pathway__title .badge {
  margin-left: var(--irc-s2);
  vertical-align: middle;
}

.pathway__step p {
  margin-top: 0;
}

.step-warning {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- currency panel ---------- */

.currency-panel {
  border-left: 4px solid var(--warning);
}

.currency-list {
  display: grid;
  gap: var(--irc-s5);
  list-style: none;
  margin: var(--irc-s4) 0 0;
  padding: 0;
}

.currency-list > li + li {
  border-top: 1px solid var(--border);
  padding-top: var(--irc-s5);
}

.currency-list h3 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-400);
  margin: 0 0 var(--irc-s2);
}

/* ---------- registration wizard (PE-002) ---------- */

/*
 * Added by W2.6a, appended as one block for the same reason PE-009's is: several
 * portal tasks edit this file at once and a block at the end collides with
 * nobody. Everything here is scoped to the wizard - the step indicator uses
 * PE-009's .visually-hidden rather than declaring a second one, because two
 * definitions of one shared utility is a rule only half the site obeys.
 *
 * Not another progress track, and it is now the third thing in this file that
 * could be called one: PE-014's .progress is three states on one request,
 * PE-009's currency chips are a status per row, and this is a position within
 * ten steps. They carry different information, which is why they are not one
 * component yet - but three is where that stops being true, so the next task
 * that needs a progress affordance should make one component of all four rather
 * than a fourth variant.
 */

/* The form is held to eight of the twelve tracks: a text field spanning 1240px
   is a field nobody can read the label of and the value in at the same time. */
main > .wizard,
main > .wizard-position,
main > .wizard-steps {
  grid-column: span 8;
}

@media (max-width: 60rem) {
  main > .wizard,
  main > .wizard-position,
  main > .wizard-steps {
    grid-column: 1 / -1;
  }
}

.wizard-position {
  color: var(--muted);
  font-size: var(--irc-fs-200);
  margin-bottom: var(--irc-s2);
}

.wizard-position strong {
  color: var(--fg);
}

/* Wraps rather than scrolls. Ten steps do not fit a 360px row on any type scale,
   and a horizontally scrolling progress bar is a progress bar half of which
   nobody knows is there - tests/e2e/layout.spec.ts asserts the whole page does
   not scroll sideways at that width. */
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  list-style: none;
  margin: 0 0 var(--irc-s6);
  padding: 0;
}

.wizard-steps__item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  color: var(--muted);
  display: flex;
  font-size: var(--irc-fs-200);
  gap: var(--irc-s2);
  min-width: 0;
  padding: var(--irc-s2) var(--irc-s3);
}

.wizard-steps__number {
  background: var(--border);
  border-radius: 50%;
  color: var(--fg);
  flex: none;
  font-weight: 700;
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  width: 1.5rem;
}

.wizard-steps__item--done {
  border-color: var(--success);
  color: var(--fg);
}

.wizard-steps__item--done .wizard-steps__number {
  background: var(--success);
  color: var(--success-fg);
}

/* The current step is marked by weight and a solid rule as well as by colour -
   "which step am I on" cannot be a hue-only distinction (WCAG 1.4.1). */
.wizard-steps__item--current {
  border-color: var(--accent-text);
  border-width: 2px;
  color: var(--fg);
  font-weight: 700;
}

.wizard-steps__item--current .wizard-steps__number {
  background: var(--accent);
  color: var(--accent-fg);
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s3);
  margin-top: var(--irc-s5);
}

.wizard-choice .checkbox {
  margin-bottom: var(--irc-s5);
}

.wizard-choice .hint {
  margin-bottom: 0;
}

.household-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Every child on a household application looks the same (IRC-2557, 27 Nov 2026): Child 1 sits at the top of
   Child information and each further child follows it, divided by a line rather than indented under it. */
.household-member {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s5);
  padding-top: var(--irc-s4);
}

.household-member h3 {
  margin-top: 0;
}

.branch-options {
  list-style: none;
  margin: 0;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0 var(--irc-s2) 0 0;
}

.branch-options label .hint {
  display: block;
  margin: 0;
}

/* --------------------------------------------------------------------------
   SA-022 data-use gate (IRC-1853).

   One rule, and it is a list reset rather than a new look: the badge, the card
   and the action list are the ones already in this file, so the gate an officer
   meets reads as part of the portal rather than as an error page bolted on.
   -------------------------------------------------------------------------- */
.gate-status {
  list-style: none;
  margin: 0 0 var(--irc-s4);
  padding: 0;
}

.gate-status li {
  align-items: baseline;
  display: flex;
  gap: var(--irc-s2);
  margin-bottom: var(--irc-s2);
}

/* ==========================================================================
   PE-018 (IRC-1848): training catalogue, bookings and certificates
   ==========================================================================

   Appended as one block at the end of the file rather than threaded through it,
   so the Wave 3 portal tasks editing site.css at the same time do not collide
   with this one.

   Two rules here are not decoration:

   - Every list on these three screens is a grid of full-width cards rather than
     the two-up `.card-grid`. A session list inside a half-width card wraps a
     date, a venue and a control into a column narrow enough to overflow at
     360px, which is what layout.spec.ts and training.spec.ts both guard.
   - `min-inline-size: 0` on the grid items. A grid track defaults to
     `min-content`, so one long unbroken string - an eircode, a booking
     reference - pushes the track wider than the viewport and the whole page
     scrolls sideways. It is the single most common cause of the 360px failure
     and it is invisible until the string is long enough.
   ---------------------------------------------------------------------- */

/* ---------- search panel ---------- */

.search-panel {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius);
  margin-block-end: var(--irc-s5);
  padding: var(--irc-s4) var(--irc-s5);
}

.search-panel h2 {
  font-size: var(--irc-fs-400);
  margin-block: 0 var(--irc-s3);
}

.search-panel__fields {
  display: grid;
  /* One column on a phone, as many as fit after that. 14rem is the width a date
     input needs before its own controls start to clip. */
  gap: var(--irc-s3) var(--irc-s4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.search-panel .field {
  margin-block-end: 0;
  min-inline-size: 0;
}

.search-panel .hint {
  margin-block-end: 0;
}

/* ---------- the three lists ---------- */

.course-list,
.booking-list,
.certificate-list {
  display: grid;
  gap: var(--irc-s4);
  list-style: none;
  margin: var(--irc-s3) 0 var(--irc-s6);
  padding: 0;
}

.course-list > li,
.booking-list > li,
.certificate-list > li {
  min-inline-size: 0;
}

.course-card h3,
.booking-card h3,
.certificate-card h2 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

.course-card h4 {
  font-size: var(--irc-fs-300);
  letter-spacing: var(--irc-tracking-caps);
  margin: var(--irc-s4) 0 var(--irc-s2);
  text-transform: uppercase;
}

/* ---------- course detail ---------- */

/* Wraps rather than scrolls: five metadata items do not fit a 360px row on any
   type scale, and a row that scrolls sideways is the defect this file's own
   layout gate exists to catch. */
.course-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  margin: 0 0 var(--irc-s3);
}

.course-summary {
  margin-block-end: var(--irc-s3);
}

.course-prerequisites {
  background: var(--warning-subtle);
  border-left: 4px solid var(--warning);
  border-radius: var(--irc-radius-sm);
  margin-block: var(--irc-s3);
  padding: var(--irc-s3) var(--irc-s4);
}

.course-prerequisites p {
  margin: 0;
}

/* The paper-attendance note. Marked out rather than run into the body copy: a
   member who has been told elsewhere to scan a code on the day needs to see
   that this course is different without reading the whole card. */
.checkin-note {
  border-left: 4px solid var(--accent-text);
  color: var(--muted);
  margin-block: var(--irc-s3);
  padding-inline-start: var(--irc-s3);
}

/* ---------- sessions ---------- */

.session-list {
  display: grid;
  gap: var(--irc-s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.session-list > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  min-inline-size: 0;
  padding: var(--irc-s3) var(--irc-s4);
}

.session-when {
  font-weight: 700;
  margin: 0;
}

.session-where,
.session-places {
  margin: 0 0 var(--irc-s2);
}

/* One presentation for a refusal, whether the portal saw it coming or the API
   returned it. They read identically to a member, so they look identical. */
.session-refusal {
  background: var(--warning-subtle);
  border-left: 4px solid var(--warning);
  border-radius: var(--irc-radius-sm);
  margin-block: var(--irc-s2);
  padding: var(--irc-s2) var(--irc-s3);
}

.session-refusal p {
  margin: 0;
}

.session-booked {
  background: var(--success-subtle);
  border-left: 4px solid var(--success);
  border-radius: var(--irc-radius-sm);
  margin-block: var(--irc-s2);
  padding: var(--irc-s2) var(--irc-s3);
}

.session-booked p {
  margin: 0;
}

/* ---------- bookings ---------- */

.booking-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  margin: 0 0 var(--irc-s3);
}

.booking-detail,
.certificate-detail {
  margin-block-end: var(--irc-s3);
}

/* A booking reference and an eircode are unbroken strings. Without this they set
   the grid track's minimum width and the page scrolls sideways on a phone. */
.booking-detail dd,
.certificate-detail dd {
  overflow-wrap: anywhere;
}

.status-badge--booked,
.status-badge--attended {
  background: var(--success-subtle);
  border-color: var(--success);
}

.status-badge--waitlisted,
.status-badge--pending-payment,
.status-badge--pending-review {
  background: var(--warning-subtle);
  border-color: var(--warning);
}

.status-badge--cancelled,
.status-badge--no-show {
  background: var(--surface);
  border-color: var(--border-strong);
}

.booking-cancelled-notice {
  font-weight: 700;
}

.cancel-confirm {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s3);
  padding-top: var(--irc-s3);
}

/* ---------- certificates ---------- */

.certificate-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  margin: 0 0 var(--irc-s3);
}

/* The point of the screen: what this certificate is holding up. Tinted with the
   accent rather than the warning, because it is context on every certificate and
   not an alarm on the current one - the expiry badge above it carries the
   urgency. */
.certificate-blocks {
  background: var(--accent-subtle);
  border-left: 4px solid var(--accent-text);
  border-radius: var(--irc-radius-sm);
  margin-block: var(--irc-s3);
  padding: var(--irc-s3) var(--irc-s4);
}

.certificate-blocks p {
  margin: 0 0 var(--irc-s2);
}

.certificate-actions {
  margin-block-end: 0;
}

/* ==========================================================================
   PE-021 (IRC-1851): trainer sessions, expenses and the session pack
   ==========================================================================

   Appended as one block at the end of the file rather than threaded through it,
   so the Wave 3 portal tasks editing site.css at the same time do not collide
   with this one - the same reason the PE-018 block above is shaped this way.

   Almost everything here is a list reset or a reuse. The status badges, the
   card, the description list and the action list are the ones already in this
   file, and the two lists follow the PE-018 rule that made those screens survive
   a 360px viewport: full-width cards in a single-column grid, each with
   `min-inline-size: 0` so one long unbroken string - a venue address, an expense
   reference, a check-in URL - cannot push a grid track wider than the phone.

   The one genuinely new thing is the pack, and it is new because it is read
   across a room rather than at arm's length.
   ---------------------------------------------------------------------- */

/* ---------- the diary and the claims ---------- */

.session-diary,
.claim-list {
  display: grid;
  gap: var(--irc-s4);
  list-style: none;
  margin: var(--irc-s3) 0 var(--irc-s6);
  padding: 0;
}

.session-diary > li,
.claim-list > li {
  min-inline-size: 0;
}

.trainer-session-card h2,
.claim-card h3 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

.session-status,
.claim-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  margin: 0 0 var(--irc-s3);
}

/* A venue address, an expense reference and a session id are all unbroken
   strings. Without this they set the grid track's minimum width. */
.trainer-session-detail dd,
.claim-detail dd,
.pack-detail dd {
  overflow-wrap: anywhere;
}

/* Session lifecycle, in the vocabulary the rest of the portal already uses:
   confirmed and delivered read as done, scheduled as planned rather than as a
   problem. `cancelled` reuses the booking modifier above. */
.status-badge--confirmed,
.status-badge--delivered {
  background: var(--success-subtle);
  border-color: var(--success);
}

.status-badge--scheduled,
.status-badge--submitted {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
}

/* ---------- confirming a session ---------- */

.confirm-panel {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s3);
  padding-top: var(--irc-s3);
}

.confirm-panel fieldset {
  margin-bottom: var(--irc-s4);
  padding: var(--irc-s4);
}

/* [role='status'] already carries the outcome styling; these only stop two
   paragraphs inside it from inheriting the page's paragraph spacing. */
.confirm-outcome p {
  margin: 0 0 var(--irc-s2);
}

.confirm-outcome p:last-child {
  margin-bottom: 0;
}

/* ---------- the claim form ---------- */

.claim-form fieldset,
.claim-form .field:last-of-type {
  margin-bottom: var(--irc-s4);
}

/* ---------- the session pack ---------- */

/*
 * The pack is read across a room, from a projector or from a sheet pinned to a
 * wall, which is why it is the one surface here that does not simply inherit the
 * page's type scale.
 */
.session-pack {
  text-align: center;
}

.session-pack .detail {
  text-align: start;
}

/*
 * The QR, sized to be scannable rather than to fit a layout. A white plate
 * behind it because a dark-mode card would put a dark quiet zone around a code
 * whose contrast is the whole reason it scans, and `pixelated` because the image
 * is a bitmap of squares - smoothing it is exactly the wrong interpolation.
 */
.pack-qr {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  display: block;
  height: auto;
  image-rendering: pixelated;
  inline-size: min(16rem, 100%);
  margin: var(--irc-s4) auto;
  padding: var(--irc-s3);
}

/*
 * The text fallback, and it is deliberately not a footnote. A QR that will not
 * scan in a badly lit village hall leaves this as the only way in, so it is
 * marked out as its own block and set large enough to read off a wall.
 */
.pack-join {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius-sm);
  margin-block: var(--irc-s4);
  padding: var(--irc-s3) var(--irc-s4);
  text-align: start;
}

.pack-join h3 {
  font-size: var(--irc-fs-400);
  margin: 0 0 var(--irc-s2);
}

.pack-join p {
  margin: 0 0 var(--irc-s2);
}

.pack-join__url {
  font-family: var(--irc-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: var(--irc-fs-400);
  font-weight: 700;
  /* A URL is one unbroken string, and this is the page where it is longest. */
  overflow-wrap: anywhere;
}

/* ==========================================================================
   PE-020 organisation training manager (IRC-1850)
   --------------------------------------------------------------------------
   Layout only. Every badge on the three employer screens reuses an existing
   modifier - status-badge--active, currency-badge--expired, the PE-018 booking
   states - because a lapsed qualification is a lapsed qualification whether the
   person reading it is the holder or the employer who paid for it, and those
   pairings have already cleared the axe contrast gate where they are used.

   `min-inline-size: 0` on every grid item, for the reason this file's layout
   note gives: a booking reference or an invoice number is one unbroken string,
   and a grid track defaults to min-content, so without it the whole page scrolls
   sideways at 360px.
   ========================================================================== */

.org-list {
  display: grid;
  gap: var(--irc-s4);
  list-style: none;
  margin: var(--irc-s3) 0 var(--irc-s6);
  padding: 0;
}

.org-list > li {
  min-inline-size: 0;
}

.org-card h3 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

.org-subheading {
  font-size: var(--irc-fs-300);
  letter-spacing: var(--irc-tracking-caps);
  margin: var(--irc-s4) 0 var(--irc-s2);
  text-transform: uppercase;
}

/* Wraps rather than scrolls - a badge beside a job title does not fit a 360px
   row on any type scale. */
.org-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  margin: 0 0 var(--irc-s3);
}

.org-detail {
  margin-block-end: var(--irc-s3);
}

.org-detail dd {
  overflow-wrap: anywhere;
}

.org-empty {
  color: var(--muted);
  margin: 0 0 var(--irc-s3);
}

.org-more {
  margin-block: var(--irc-s4) var(--irc-s6);
}

.qualification-list,
.attendee-list {
  display: grid;
  gap: var(--irc-s2);
  list-style: none;
  margin: 0 0 var(--irc-s3);
  padding: 0;
}

.qualification-list > li,
.attendee-list > li {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s2);
  min-inline-size: 0;
}

.qualification-course {
  font-weight: 700;
}

.qualification-expiry {
  color: var(--muted);
}

/* ---------- invoices ---------- */

.invoice-total {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  margin: 0 0 var(--irc-s3);
}

.invoice-lines {
  list-style: none;
  margin: 0 0 var(--irc-s3);
  padding: 0;
}

.invoice-lines > li {
  border-top: 1px solid var(--border);
  min-inline-size: 0;
  padding-block: var(--irc-s2);
}

.invoice-line-description {
  margin: 0;
}

.invoice-line-amount {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s3);
  margin: 0;
}

/* ---------- the proxy booking form ---------- */

.booking-form {
  margin-block-end: var(--irc-s6);
}

/* The card already provides the padding, so the fieldset inside it does not
   need a second frame around the same content. */
.booking-form fieldset {
  background: transparent;
  margin-block-end: var(--irc-s5);
  padding: var(--irc-s3) 0 0;
}

.employee-picker {
  display: grid;
  gap: var(--irc-s2);
}

/* ---------- notification centre (PE-017) ---------- */

/*
 * The shell badge.
 *
 * It sits in .irc-header__actions beside Sign out and the burger, and that row
 * has to fit 360px with the member's name already hidden - so the word
 * "Notifications" is dropped visually at the same breakpoint the burger appears
 * and the envelope carries the control on its own. The word stays in the
 * accessible name at every width: the rules below hide it, they do not remove
 * it, which is the difference between a compact header and one that reads as an
 * unlabelled icon.
 */
.irc-notify {
  align-items: center;
  border-radius: var(--irc-radius-pill);
  color: var(--fg);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-200);
  font-weight: 700;
  gap: var(--irc-s2);
  /* WCAG 2.2 2.5.8: comfortably past the 24px minimum, and the same height as
     the quiet button beside it. */
  min-height: 38px;
  padding: 0 var(--irc-s2);
  text-decoration: none;
}

.irc-notify:hover {
  background: var(--accent-subtle);
  color: var(--accent-text);
}

/* Decoration, and drawn rather than an asset for the same reason .brand is: an
   envelope in ::before content is invisible to assistive technology, so the
   label is read once rather than twice. */
.irc-notify::before {
  background: currentColor;
  clip-path: polygon(0 12%, 50% 55%, 100% 12%, 100% 88%, 0 88%);
  content: "";
  flex: none;
  height: 1.1rem;
  width: 1.35rem;
}

.irc-notify--unread::before {
  background: var(--accent);
}

/* The number. aria-hidden in the markup - the spoken form is a visually-hidden
   span, so the count is announced as words rather than as a bare digit next to
   a label. */
.irc-notify__count {
  background: var(--accent);
  border-radius: 999px;
  color: var(--accent-fg);
  font-size: var(--irc-fs-100);
  line-height: 1.6;
  min-width: 1.6rem;
  padding: 0 var(--irc-s1);
  text-align: center;
}

@media (max-width: 68rem) {
  .irc-notify__label {
    block-size: 1px;
    clip-path: inset(50%);
    inline-size: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
  }
}

/*
 * The inbox: list beside panel on a desktop, panel under list on a phone. The
 * stacked order is why opening a notification moves focus to the panel - on a
 * narrow screen the thing the member just opened is below the fold.
 */
.inbox {
  display: grid;
  gap: var(--irc-s5);
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

@media (max-width: 60rem) {
  .inbox {
    grid-template-columns: minmax(0, 1fr);
  }
}

.inbox__list h2,
.inbox__panel h2 {
  font-size: var(--irc-fs-500);
  margin-top: 0;
}

.inbox__items {
  display: flex;
  flex-direction: column;
  gap: var(--irc-s2);
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
 * A row is a button, so every global button rule has to be undone here: the
 * default is a red uppercase call to action, and forty of those in a column
 * would be unreadable. What is kept is the focus outline and the 44px target.
 */
.inbox__item {
  align-items: start;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius);
  color: var(--fg);
  display: grid;
  font-family: var(--irc-font-body);
  font-size: var(--irc-fs-300);
  font-weight: 400;
  gap: var(--irc-s1) var(--irc-s3);
  grid-template-columns: minmax(0, 1fr) auto;
  letter-spacing: normal;
  padding: var(--irc-s4);
  text-align: left;
  text-transform: none;
  width: 100%;
}

.inbox__item:hover:not(:disabled) {
  background: var(--accent-subtle);
  border-color: var(--border-strong);
}

.inbox__item--unread {
  border-left: 4px solid var(--accent-text);
}

.inbox__item--open {
  border-color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-text);
}

.inbox__item-subject {
  font-family: var(--irc-font-display);
  font-weight: 700;
  grid-column: 1;
  overflow-wrap: anywhere;
}

.inbox__item-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--irc-fs-200);
  gap: var(--irc-s2);
  grid-column: 1;
}

.inbox__item-state {
  grid-column: 2;
  grid-row: 1;
}

/* Reinforcement only. "Unread" is in the row as a word, so the dot is never the
   sole carrier of the state (WCAG 1.4.1). */
.inbox__unread-dot {
  background: var(--accent);
  border-radius: 999px;
  display: block;
  height: 0.7rem;
  width: 0.7rem;
}

.inbox__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius);
  padding: var(--irc-s5);
}

.inbox__panel-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--irc-fs-200);
  gap: var(--irc-s3);
  margin-top: 0;
}

/* Line breaks are the only formatting the contract allows in a body, and this
   is what keeps them without rendering the text as markup. */
.inbox__body {
  max-width: var(--measure);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

/* ---------- IRC-1828: priority and follow-up ----------
   Added beside the inbox rather than in a scoped .razor.css, because the rest of
   this component already lives here and splitting one screen's styles across two
   files is worse than one more block in site.css.

   Every badge below prints its own word, so the colour is the second signal and
   the text is the first (WCAG 1.4.1) - which is why the specs assert on text and
   on data attributes rather than on any shade. */

/* URGENT is the only priority that gets a badge. Information is the default and
   the majority, so tagging it would put one on nearly every row; Important is in
   the weekly digest, which is where its extra loudness happens. */
.badge-urgent {
  background: var(--error-subtle);
  border-color: var(--error);
  color: var(--error);
  font-weight: 700;
}

/* IRC-2557 - who is applying, on a branch officer's lists: a child application is
   highlighted because it brings a parent, consent and youth safeguarding with it;
   an adult one is the plain badge. A word as well as a colour (WCAG 1.4.1). */
.badge-child {
  background: var(--warning-subtle);
  border-color: var(--warning);
  color: var(--fg);
}

/* An outstanding action that is not yet late - a statement, not an alarm. */
.badge-action {
  background: var(--accent-subtle);
  border-color: var(--accent-text);
  color: var(--accent-text);
}

/* Overdue. AMBER rather than red, deliberately: red is urgent, and overdue is
   late - which is not the same thing. Two reds on one row would tell a member
   nothing about which to deal with first. */
.badge-overdue {
  background: var(--warning-subtle);
  border-color: var(--warning);
  color: var(--fg);
  font-weight: 700;
}

.inbox__followup {
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-inline-start: 5px solid var(--accent-text);
  border-radius: var(--irc-radius);
  margin-block: var(--irc-s4);
  padding: var(--irc-s4) var(--irc-s5);
}

.inbox__followup--overdue {
  background: var(--warning-subtle);
  border-color: var(--warning);
  border-inline-start-color: var(--warning);
}

.inbox__followup h3 {
  font-size: var(--irc-fs-400);
  margin-block: 0 var(--irc-s2);
}

.inbox__followup p {
  margin-block: 0 var(--irc-s3);
  max-width: var(--measure);
}

/* A completed follow-up has no controls, so its last line should not leave a gap
   where the buttons were. */
.inbox__followup[data-completed="true"] p:last-child {
  margin-block-end: 0;
}

.inbox__reply {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s5);
  padding-top: var(--irc-s4);
}

.inbox__reply h3 {
  margin-bottom: var(--irc-s3);
}

/* The heading focus moves to after a reply is sent. Visible, because a focus
   ring that only shows for keyboard users is exactly what a returning focus
   needs to show. */
.inbox__reply h3:focus-visible,
.inbox__panel h2:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

/* ---------- contact support (PE-023) ---------- */

/* One card per case the member raised. Same shape as the course and booking
   lists above rather than a table: a case has three facts and a title, and a
   table of four columns is the layout that overflows a 360px phone first. */
.case-list {
  display: grid;
  gap: var(--irc-s4);
  list-style: none;
  margin: var(--irc-s3) 0 var(--irc-s5);
  padding: 0;
}

.case-list > li {
  min-inline-size: 0;
}

.case-card h3 {
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-500);
  line-height: var(--irc-lh-snug);
  margin: 0 0 var(--irc-s2);
}

/* Wraps rather than scrolls, for the reason .course-meta gives: a status chip
   beside a type and a date does not fit a phone row on any type scale. */
.case-card__meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--irc-fs-200);
  gap: var(--irc-s3);
  margin: 0 0 var(--irc-s2);
}

/* ---------- required vs optional consent (IRC-1972 / IRC-1797) ---------- */

/*
 * The client reported that a mandatory consent read as optional, and they were
 * right: on the registration consent step the terms confirmation and the
 * mailing-list opt-in were rendered identically, so only the hint text
 * distinguished a condition of joining from a choice.
 *
 * Three signals rather than one, because this is compliance-relevant and colour
 * alone is not a signal:
 *
 *   1. THE WORD. "Required" and "Optional" are real text in the markup, not a
 *      ::before, so a screen reader reads them and they survive a stylesheet that
 *      does not load.
 *   2. WEIGHT AND COLOUR on the marker, so the difference is visible at a glance
 *      to somebody scanning rather than reading.
 *   3. A LEFT RULE on the required block, so the two fieldsets are different
 *      SHAPES. A member skimming sees two different things before reading either
 *      word - which is the failure mode the client actually described.
 */

.required-marker,
.optional-marker {
  border-radius: var(--irc-radius-sm);
  display: inline-block;
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-100);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-inline-start: var(--irc-s2);
  padding: 2px var(--irc-s2);
  text-transform: uppercase;
  vertical-align: middle;
}

/* --irc-red-50 and --irc-red-700 were never defined, so these rendered their
   light fallbacks in both schemes. The semantic aliases flip. */
.required-marker {
  background: var(--error-subtle);
  color: var(--error);
}

/*
 * Quieter on purpose. An optional marker as loud as the required one would be two
 * shouts, and the point is the CONTRAST between them - if both draw the eye
 * equally, neither has said anything.
 */
.optional-marker {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.consent-required {
  border-inline-start: 3px solid var(--error);
  padding-inline-start: var(--irc-s4);
}

/*
 * The preference centre's membership-operational banner is a .notice as well as
 * .consent-required, and .notice already draws a full border. A second rule down
 * its left edge would just thicken one side of a box, so the shape signal is left
 * to the border it already has and the marker does the work.
 */
.notice.consent-required {
  border-inline-start-width: 3px;
  padding-inline-start: var(--irc-s4);
}

/*
 * IRC-1901 / IRC-1271: the persistent "acting as" banner. Deliberately loud - a
 * screenshot without it is unattributable evidence, and an operator who forgets
 * they are someone else acts on the wrong account. Not colour alone: it names the
 * person and the kind of session in words, and carries the exit control.
 */
.delegated-banner {
  background: #fff4cc;
  border-bottom: 4px solid var(--irc-ink);
  color: var(--irc-ink);
  padding: var(--irc-s2) var(--irc-gutter);
}
.delegated-banner p {
  margin: 0 0 var(--irc-s1, 0.25rem) 0;
  max-width: none;
}
.delegated-banner form {
  display: inline;
}
/* The banner is yellow in both schemes, so its exit control is inked here
   rather than taking --fg, which in the dark scheme is near-white on yellow. */
.delegated-banner .button-quiet {
  color: var(--irc-ink);
}
.delegated-banner .button-quiet:hover:not(:disabled) {
  border-color: var(--irc-ink);
}
.delegated-notice {
  margin: 0;
  max-width: none;
  padding: var(--irc-s2) var(--irc-gutter);
  border-bottom: 1px solid var(--fg);
}


/* ---------- availability (PE-010) ---------- */

/*
 * Added by W2.7, appended as one block for the same reason PE-009's and PE-002's
 * are: several portal tasks edit this file at once and a block at the end
 * collides with nobody. Everything here is scoped to /volunteer/availability.
 *
 * No new colour tokens and no new utilities - the day grid uses PE-009's
 * .visually-hidden, and the panels use the existing surface, warning and border
 * variables, because a fourth definition of one shared idea is a rule only a
 * quarter of the site obeys.
 */

/* The three panels run the full twelve tracks rather than the half-width
   `main > .card` default. A day grid, a seven-day pattern and a reason picker
   are all wide content, and half a container puts them into a single narrow
   column on a desktop - which is the shape W0.3 set out to remove. */
main > .availability-panel {
  grid-column: 1 / -1;
}

/* ---------- paused banner ---------- */

/*
 * Warning-toned rather than the green `[role=status]` treatment: a pause is a
 * state to be aware of, not a success. The membership sentence carries its own
 * emphasis because it is the one line on the page that has to survive being
 * skim-read.
 */
.paused-banner {
  border-color: var(--warning);
  border-left: 5px solid var(--warning);
}

.paused-banner__membership {
  background: var(--surface);
  border-radius: var(--irc-radius-sm);
  margin-top: var(--irc-s4);
  padding: var(--irc-s4);
}

/* ---------- emergency panel ---------- */

.emergency-panel {
  border-color: var(--irc-red);
  border-left: 5px solid var(--irc-red);
}

.emergency-panel__flag {
  color: var(--irc-red-dark);
  font-family: var(--irc-font-display);
  font-size: var(--irc-fs-200);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.emergency-panel h2 {
  margin-top: var(--irc-s1);
}

.emergency-panel__meta {
  color: var(--muted);
  font-size: var(--irc-fs-200);
  margin-top: 0;
}

/* ---------- window list ---------- */

.window-list {
  display: grid;
  gap: var(--irc-s4);
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  list-style: none;
  margin: 0 0 var(--irc-s5);
  padding: 0;
}

.window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--irc-radius);
  padding: var(--irc-s4);
}

.window h3 {
  margin-top: 0;
}

.window__pattern {
  font-weight: 600;
  margin-top: 0;
}

.window[data-ended='true'] {
  border-style: dashed;
}

.window[data-ended='true'] h3,
.window[data-ended='true'] .window__pattern {
  color: var(--muted);
}

/* `.actions` styles anchors. These are buttons, so the arrow affordance and the
   link colour do not apply - the row still has to lay out. */
.actions--buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--irc-s3);
  list-style: none;
  margin: var(--irc-s4) 0 0;
  padding: 0;
}

.actions--buttons li {
  margin: 0;
}

/* ---------- window form ---------- */

.window-form {
  border-top: 1px solid var(--border);
  margin-top: var(--irc-s5);
  padding-top: var(--irc-s5);
}

.window-form h3 {
  margin-top: 0;
}

/* Two fields side by side where there is room, stacked on a phone. minmax with
   a zero floor so a date input cannot push the row past its container. */
.season-row {
  display: grid;
  gap: 0 var(--irc-s5);
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

/* IRC-2557: the photograph a card holds, on Membership photo. */
.member-photo {
  display: block;
  width: 8rem;
  height: auto;
  margin-bottom: var(--irc-s4);
  border-radius: var(--irc-radius);
}

/* IRC-2557: a parent's list of their children's applications - name, where it is, and when, each on its own line. */
/* IRC-2597: IRC's renewal message - a banner on every page while enforcement is off, and at the top of the renewal page. */
.renewal-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--irc-red);
    color: var(--fg);
}
.renewal-notice p { margin: 0; flex: 1 1 20rem; }
.renewal-notice-page {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--irc-red);
    color: var(--fg);
    font-weight: 600;
}

.children-applications {
  list-style: none;
  padding: 0;
}

.children-applications li {
  margin-bottom: var(--irc-s4);
}

.children-applications li > * {
  display: block;
}
