/* =====================================================================
   APSEA — STYLESHEET
   =====================================================================
   Visual identity notes
   ---------------------
   The palette is deliberately institutional rather than commercial:
   deep navy carries authority and solidarity, gold marks emphasis and
   member value, aviation blue provides a subtle nod to the industry our
   employer serves, and a restrained union red is reserved for urgency.
   Aviation cues (the wing mark, the horizon curves in the hero) are kept
   abstract so the site never reads as an airline or a pilots' association.

   TABLE OF CONTENTS
     01  Design tokens
     02  Reset & base elements
     03  Accessibility utilities
     04  Layout primitives
     05  Buttons & links
     06  Site header & navigation
     07  Hero
     08  Sections, headings & cards
     09  Public components (flow, officers, compare)
     10  Callouts, badges, alerts & tags
     11  Forms
     12  Login view
     13  Member portal shell & navigation
     14  Portal components (stats, lists, tables, calendar)
     15  Tabs & accordions
     16  Modals & toasts
     17  Footer
     18  Responsive breakpoints
     19  Motion & print preferences
     20  Administration (role & permission editor)
     21  The site's editable wording (notice banner, edit links, editor)
   ===================================================================== */


/* =====================================================================
   01  DESIGN TOKENS
   ===================================================================== */
:root {
  /* The one icon a stylesheet has to draw for itself: the padlock on a
     restricted navigation entry is a ::after, and content: cannot point
     at the <symbol> sprite the rest of the icons come from. Same shape
     as `lock` in tools/build-icons.py — change one, change the other. */
  --icon-lock: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" \
stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">\
<rect x="4.5" y="10.5" width="15" height="10" rx="2"/>\
<path d="M8 10.5V7.6a4 4 0 0 1 8 0v2.9"/>\
<circle cx="12" cy="15.5" r="1.3" fill="black" stroke="none"/></svg>');

  /* Brand palette */
  --navy-900: #081a33;
  --navy-800: #0d2646;
  --navy-700: #123157;
  --navy-600: #1a406e;
  --navy-500: #24528a;
  --blue-400: #3f7fbf;   /* aviation blue accent */
  --blue-200: #cfe0f2;
  --blue-100: #e8f0fa;

  /* The gold ramp, and which end of it is safe for what.
     Contrast against white, which is what most of this site is:

       gold-700  6.17:1   text, and anything that must be SEEN
       gold-600  3.81:1   borders and indicators only — fails text (4.5)
       gold-500  2.66:1   fills and decoration — fails indicators (3.0)
       gold-400  1.94:1   dark backgrounds only

     gold-400 is the brand gold and reads beautifully on navy (8.99:1),
     which is why it is everywhere in the header, the hero, the portal
     navigation and the footer. On white it is very nearly invisible, and
     that is not a matter of taste: a focus ring at 1.94:1 is a keyboard
     user unable to tell where they are on the page.

     The rule is the surface, not the component. Gold on navy: gold-400.
     Gold on white or a tint: gold-700 for text, gold-600 for a border. */
  --gold-700: #7d5c00;
  --gold-600: #a67c11;
  --gold-500: #c8971d;
  --gold-400: #e0b53c;
  --gold-100: #fbf1d8;

  --red-700: #96131f;
  --red-600: #b21f2b;
  --red-100: #fbe6e8;

  --green-700: #1c6b4a;
  --green-100: #e3f3ec;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f7f9fb;
  --gray-100: #eef2f6;
  --gray-200: #dde4ec;
  --gray-300: #c3cdd9;
  --gray-400: #97a4b3;
  --gray-500: #6b7889;
  --gray-600: #4d5866;
  --gray-700: #333c48;
  --gray-900: #171d26;

  /* Semantic roles.
     ---------------------------------------------------------------
     These are what the rest of the stylesheet reaches for, and they are
     the whole of what the dark theme at the bottom of this section
     redefines. Two habits keep that true:

       * a BACKGROUND uses a semantic token, never a raw one. --white
         and --gray-50 as a background are --color-surface and
         --color-bg-alt.
       * `color: var(--white)` is left alone, and is not the same thing.
         It means ink on a navy band — the header, the hero, the footer,
         the portal navigation — and those bands are dark in both
         themes, so their text stays white in both.

     That distinction is why the theme can be a dozen lines instead of a
     second stylesheet. Reaching for a raw neutral as a background is
     what breaks it. */
  --color-bg: var(--white);
  --color-bg-alt: var(--gray-50);
  --color-bg-subtle: var(--gray-100);
  --color-surface: var(--white);
  --color-text: var(--gray-900);

  /* Status tints, as a background and the ink that goes on it. Paired,
     because the two invert together: in dark mode the ground goes dark
     and the text goes light, and changing one without the other is how a
     warning ends up unreadable. Same overload as --white: --blue-100 is
     ALSO the body text colour of the navy sections, so the tint gets its
     own token rather than the raw one being flipped. */
  --color-tint-info:       var(--blue-100);
  --color-on-tint-info:    var(--navy-800);
  --color-tint-warn:       var(--gold-100);
  --color-tint-danger:     var(--red-100);
  --color-tint-success:    var(--green-100);

  --color-text-muted: var(--gray-600);
  --color-text-invert: var(--white);

  /* Navy as INK on a light surface: headings, table row labels, the
     outline and ghost buttons, a hovered link. The same overload as
     --white and --blue-100 — navy is also the BACKGROUND of every dark
     band on this site, so its ink uses need their own tokens to invert
     without dragging the bands along with them.

     Ink on a gold or white FILL keeps the raw token (.btn--accent,
     .btn--outline-light:hover): those fills are light in both themes, so
     their text is dark in both. */
  --color-heading: var(--navy-900);
  --color-ink-strong: var(--navy-800);
  --color-ink-mid: var(--navy-700);
  --color-border: var(--gray-200);
  --color-border-strong: var(--gray-300);
  --color-primary: var(--navy-800);
  --color-primary-hover: var(--navy-600);
  --color-accent: var(--gold-500);
  --color-accent-hover: var(--gold-400);
  --color-link: var(--navy-600);
  /* The focus ring on the light surfaces, which is most of the site. It
     used to be gold-400 — 1.94:1 against white, so a keyboard user could
     not see where they were. The navy sections override it back to
     gold-400 below, where that IS the readable choice; until this change
     the two were the same value and the override did nothing. */
  --color-focus: var(--gold-700);

  /* Typography */
  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.075rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-3xl: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --fs-hero: clamp(2.4rem, 1.4rem + 5vw, 4.5rem);
  --lh-tight: 1.2;
  --lh-base: 1.65;

  /* Space scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Radii, shadows, layout */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(8, 26, 51, 0.08), 0 1px 3px rgba(8, 26, 51, 0.06);
  --shadow: 0 2px 6px rgba(8, 26, 51, 0.08), 0 6px 18px rgba(8, 26, 51, 0.07);
  --shadow-lg: 0 10px 40px rgba(8, 26, 51, 0.18);
  --container: 1200px;
  --container-narrow: 820px;
  --header-h: 74px;
  --transition: 160ms ease;
}


/* ---------------------------------------------------------------------
   01b  DARK THEME
   ---------------------------------------------------------------------
   THREE STATES, not two: System, Light, Dark. System is the default and
   where most people should stay. The other two are for the reader whose
   machine says one thing and whose eyes want the other — a bright office
   on a laptop set to dark, most often.

   A two-state switch is a trap. Choose Light once and there is no way
   back to following the machine; the site is then stuck on whatever you
   picked at the moment you picked it, through every sunset thereafter.

   ONE BLOCK, because the inline script in the <head> of both pages
   resolves all three states down to a single attribute before the first
   paint:

     data-theme="dark"    this block applies
     data-theme="light"   nothing here matches; :root's light values win

   Resolving in script rather than in CSS is what avoids declaring every
   token twice — once under a media query for System and again under the
   attribute for an explicit choice, with no way to union the two because
   one of them IS a media query. The cost is that a reader with
   JavaScript disabled gets the light theme whatever their machine
   prefers. Accepted: light is the designed default and entirely legible,
   and the portal does not function without JavaScript anyway.

   js/shared/appearance.js keeps the attribute in step afterwards, including when the
   system setting changes underneath a reader who is on System.

   This is a re-tone, not a second design. The navy-and-gold identity is
   unchanged — the header, hero, navy sections, portal navigation and
   footer are dark bands in BOTH themes and are not touched here. What
   changes is everything that was white or near-white: the page behind
   those bands, the cards, the tables, the forms.

   A warm-neutral dark rather than a black. Pure black under white text
   produces halation, where the text appears to smear.

   THE NAVY BANDS DO NOT SEPARATE BY LIGHTNESS HERE, and there is no
   version of this palette where they do: navy-900 is very dark, and any
   page background dark enough to be a dark theme sits within about
   1.2:1 of it. Pretending otherwise would mean a washed-out page. So
   they are separated by a rule instead — see .section--navy at the foot
   of this block — which is honest about what is doing the work.

   WHAT IS NOT REDEFINED, and why. Three raw tokens carry two jobs each:

     --white       a surface, and ink on navy
     --blue-100    a tint background, and body text in the navy sections
     --blue-200    a tint border, and muted text in the footer

   Flipping any of them fixes one job and breaks the other — dark text on
   a navy hero, in the --blue-100 case. The surface and tint uses were
   given their own semantic tokens instead (--color-surface,
   --color-tint-*), and those are what move below. The raw tokens keep
   meaning what they mean on a navy band, in both themes.

   Everything here is a token. If a rule seems to need its own dark-mode
   treatment, the token it reaches for is usually the real problem. */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces. bg is the page, surface is a card lifted off it, subtle
     is the recessed strip inside one, alt is the tinted section band. */
  --color-bg: #1a222c;
  --color-bg-alt: #151c25;
  --color-bg-subtle: #202a36;
  --color-surface: #232d3a;

  /* Ink. Not pure white — slightly off is easier to read at length. */
  --color-text: #e7edf4;
  --color-text-muted: #a6b3c2;

  /* Navy ink, inverted. Headings go to the same near-white as body
     text and take their weight from the display face rather than from
     being darker than what surrounds them. The strong and mid inks —
     outline buttons, table row labels, stat values — keep a step of
     separation without going navy, which on this ground is unreadable
     (navy-800 on the card surface is 1.3:1). */
  --color-heading: #f2f6fa;
  --color-ink-strong: #cbd8e6;
  --color-ink-mid: #b3c2d3;

  --color-border: #33404f;
  --color-border-strong: #465565;

  /* navy-800 as a BUTTON on a near-navy page disappears. This lifts it
     far enough to read as a control while staying recognisably navy.
     The value is a compromise held from both sides: light enough that
     the fill separates from the card, dark enough that the white label
     on it clears 4.5:1. It lands at 2.7:1 against the card, so the
     border below carries the rest of the boundary. */
  --color-primary: #3670b3;
  --color-primary-hover: #4a89c9;

  /* navy-600 is barely a link on this background. */
  --color-link: #6ba8e0;
  --color-focus: var(--gold-400);

  /* The gold ramp turns over. --gold-700 is the token every "gold
     text" rule uses; #7d5c00 on this surface is 1.4:1, which is
     nothing. gold-400 is 7.2:1. --gold-600 does the same for the
     borders and indicators that use it. */
  --gold-700: var(--gold-400);
  --gold-600: var(--gold-500);

  /* Status tints: dark grounds with light ink, so a warning still
     reads as a warning rather than as a slightly tinted card. The 700s
     are the text on those grounds and invert with them. */
  --color-tint-info:    #1c3350;
  --color-on-tint-info: #cfe0f2;
  --color-tint-warn:    #3a2f14;
  --color-tint-danger:  #3d1f23;
  --color-tint-success: #163229;
  --red-700:   #ff9aa3;
  --green-700: #6fd3a8;

  /* The neutral ramp is borders, dividers and quiet fills. It ran
     light-to-dark; here it has to run the other way, or a divider
     meant to be subtle becomes the loudest thing on the card. */
  --gray-50:  #151c25;
  --gray-100: #202a36;
  --gray-200: #33404f;
  --gray-300: #465565;
  --gray-400: #6b7889;
  --gray-500: #8f9cac;
  --gray-600: #a6b3c2;
  --gray-700: #c6d0dc;
  --gray-900: #e7edf4;

  /* A shadow is a darker version of what is behind it, and on a dark
     page there is nothing darker to be. Stronger and tighter, so a
     card still lifts. */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow:    0 2px 6px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* The navy bands, given the edge that lightness cannot provide. Only
   the boundary is drawn; the bands themselves are untouched.

   gray-400 rather than --color-border-strong, because this one rule has
   to be visible against BOTH of the two things it sits between — the
   navy band on one side and the page on the other — and clears 3:1 on
   each. The border token is tuned for a card against a page and comes
   to 2:1 here, which is a line you have to look for. */
:root[data-theme="dark"] .section--navy { border-block: 1px solid var(--gray-400); }

/* The rest of the primary button's boundary. Its fill is held down by
   needing 4.5:1 under a white label, so the edge does the separating —
   3.6:1 against the card behind it. */
:root[data-theme="dark"] .btn--primary { border-color: #6a9ed4; }

/* Photographs and the seal are authored against white and glare a
   little on a dark page. Eased off, and restored on hover so a member
   looking closely at a headshot sees it as taken. Not applied to SVG:
   the pinned-tab mark is a flat silhouette with nothing to dim. */
:root[data-theme="dark"] img:not([src$=".svg"]) { filter: brightness(0.94); }

:root[data-theme="dark"] img:not([src$=".svg"]):hover { filter: none; }

/* The headshot placeholder is a pale grey silhouette — on a dark card
   it is brighter than anybody's actual photograph, which is the wrong
   emphasis for a missing one. Taken down to sit below them, and left
   there on hover: there is no detail to reveal.

   Qualified with img rather than left as a bare class, because the rule
   above it is img:not([src$=".svg"]) — an element plus an attribute
   selector, which outweighs a lone class and would otherwise win. */
:root[data-theme="dark"] img.officer__photo--placeholder,
:root[data-theme="dark"] img.officer__photo--placeholder:hover {
  filter: brightness(0.6) contrast(0.95);
}



/* =====================================================================
   02  RESET & BASE ELEMENTS
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keeps anchored sections clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  /* Stops the page bouncing past its own end. On a phone a hard flick at
     the foot of the page scrolled well beyond the footer into empty
     canvas, which read as a slab of blank space rather than as
     overscroll. The trade is that pull-to-refresh at the top of the page
     goes with it — reloading is then the button in the browser chrome. */
  overscroll-behavior-y: none;
  /* Belt and braces for anything that still overscrolls: browsers older
     than overscroll-behavior, and the elastic scroll desktop Safari does
     at the end of a page. What shows through is the canvas, not the body
     box, and with no colour here the canvas takes body's white. Both ends
     of the page are navy — header above, footer below — so paint it navy
     and any remaining overscroll reads as part of them. */
  background: var(--navy-900);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  color: var(--color-heading);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p  { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li { margin-bottom: var(--sp-2); }

a { color: var(--color-link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-ink-strong); }

img, svg { max-width: 100%; }

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  font-size: 0.92em;
}

blockquote { margin: 0 0 var(--sp-4); }

address { font-style: normal; margin-bottom: var(--sp-4); }

hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--sp-6) 0; }

/* Global focus treatment — always visible, never removed */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.section--navy :focus-visible,
.hero :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.portal-nav :focus-visible { outline-color: var(--gold-400); }


/* =====================================================================
   03  ACCESSIBILITY UTILITIES
   ===================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -60px; left: var(--sp-4);
  z-index: 200;
  background: var(--gold-400);
  color: var(--color-heading);
  font-weight: 700;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

.is-hidden { display: none !important; }

/* The hidden ATTRIBUTE means hidden, whatever else a rule says about the
   element's display. The browser's own [hidden] rule is the weakest in
   the cascade, so any author `display` beats it: `.btn` is inline-flex,
   `.theme-toggle` is flex, and an element carrying both a class like that
   and `hidden` renders anyway.

   This was patched one selector at a time — .view, .form, .modal,
   .modal-root, .offline-banner, .nav-badge and the load-more buttons each
   had a [hidden] rule of its own — and the ones nobody had patched yet
   were live bugs. On a phone the appearance control js/shared/appearance.js hides stayed
   in the header, which made the public header 167px on a 390px screen; the
   "Add a committee" button rendered for members who cannot add one; the
   directory form showed a Cancel with nothing to cancel. One rule here
   ends the class of bug instead of the instance. `!important` for the
   same reason .is-hidden has it. */
[hidden] { display: none !important; }

/* Placeholder marking — an unverified organizational value, rendered with
   a subtle dotted underline so a reviewer can spot one.

   Nothing carries it now. The last was "Q4 2026" on the dashboard, which
   was never really unverified: the Bylaws require two meetings a year, in
   Q2 and Q4, and the line under it says so. What is unknown is the date,
   and a dotted gold underline is not how you say that to a member — this
   marker is for reviewers and it ships to everybody.

   Kept, because the convention is worth having the next time a figure
   genuinely is provisional. If you add one, take it off before launch. */
.placeholder {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--gold-600);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.placeholder a { color: inherit; }
/* Tables mark the caption/cells rather than every rule */
.placeholder td, .placeholder th { text-decoration: inherit; }


/* =====================================================================
   04  LAYOUT PRIMITIVES
   ===================================================================== */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2.5rem, var(--container-narrow)); }

/* The three top-level views are toggled with the [hidden] attribute,
   which the global [hidden] rule in section 03 enforces. */
.view { display: block; }

.section { padding: var(--sp-8) 0; }
.section--tint { background: var(--color-bg-alt); border-block: 1px solid var(--color-border); }
.section--navy {
  background:
    radial-gradient(1100px 420px at 15% -10%, var(--navy-600), transparent 60%),
    var(--navy-800);
  color: var(--blue-100);
}
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a { color: var(--gold-400); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mt { margin-top: var(--sp-6); }
.center { text-align: center; }
.muted { color: var(--color-text-muted); }
.small { font-size: var(--fs-sm); }
.grow { flex: 1 1 240px; }


/* =====================================================================
   05  BUTTONS & LINKS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Through the token, not raw navy. --color-primary existed and nothing
   used it, so in dark mode the main call to action rendered as raw
   navy-800 on a near-navy card — 1.5:1, a recessed slab rather than a
   button. The token is what dark mode lifts. */
.btn--primary { background: var(--color-primary); color: var(--white); border-color: var(--color-primary); }
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: var(--white); }

.btn--accent { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.btn--accent:hover { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-900); }

.btn--outline { background: transparent; color: var(--color-ink-strong); border-color: var(--navy-800); }
.btn--outline:hover { background: var(--navy-800); color: var(--white); }

.btn--outline-light { background: rgba(255,255,255,0.06); color: var(--white); border-color: rgba(255,255,255,0.6); }
/* Raw --white, not --color-surface: this button lives on a navy band, in
   both themes, and its hover is a white chip with navy on it. Following
   the surface token would fill it with the dark-theme card colour and
   leave navy text on a dark ground. */
.btn--outline-light:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }

/* .muted means "quieter than the text around it", and inside a filled
   button the text around it is the button's own colour — not the page's.
   Left to the page token it rendered grey on navy at 2.09:1. Opacity keeps
   the relationship without needing a variant per button colour. */
.btn .muted { color: inherit; opacity: 0.92; }

.btn--ghost { background: transparent; color: var(--color-ink-strong); border-color: transparent; text-decoration: underline; }
.btn--ghost:hover { background: var(--color-bg-subtle); text-decoration: none; }

.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.14); color: var(--white); }

/* The one red button. Red is the urgency colour throughout this
   stylesheet and is reserved for it; asking for a representative before
   a meeting is the case that earns it.

   --red-600 is used rather than a new token because it is one of the few
   reds that does NOT invert between themes — only --red-700 flips, being
   text on a tinted ground — so white on this reads the same light or
   dark, at 6.7:1. The hover is written out for that same reason: taking
   it from --red-700 would give a pale pink button in dark mode. */
.btn--urgent { background: var(--red-600); color: var(--white); border-color: var(--red-600); }
.btn--urgent:hover { background: #8f1922; border-color: #8f1922; color: var(--white); }

.btn--sm { padding: 0.5rem 0.9rem; font-size: var(--fs-sm); }
.btn--lg { padding: 0.95rem 1.8rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Text-style button used where a link would be semantically wrong */
.link-btn {
  display: inline-block;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--color-ink-strong); }

/* WCAG 2.2 asks for a target of at least 24 by 24 CSS pixels (2.5.8,
   level AA). These were 23 — not a size anybody chose, just the height
   of a line box of this font, one pixel short of the floor. There are
   about twenty-four of them: every "Copy a link to Art. 9" in the
   Agreement and the Bylaws, and the panel links that carry a member from
   one part of the portal to another.

   Not the ones marked inline. A target that is a word inside a sentence
   is excepted by the criterion, and padding one out would push the lines
   of that sentence apart to no purpose. */
.link-btn:not(.link-btn--inline) { min-height: 24px; }


/* =====================================================================
   06  SITE HEADER & NAVIGATION
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  color: var(--white);
  box-shadow: var(--shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--white);
  text-decoration: none;
  padding: var(--sp-2) 0;
  margin-right: auto;
}

/* The brand has to say white on hover, and this is not a style
   preference. `a:hover` up in the base rules recolours any link to
   --color-ink-strong, which is navy-800 in the light theme — so putting
   the cursor on the header made APSEA navy-on-navy and the union's own
   name vanished under the pointer. Dark theme was less dramatic and
   still wrong: a pale blue-grey where the brand should be white.
   Every other link on the navy chrome already pins its own hover colour
   for this reason (.primary-nav__list a, .site-footer a); this one was
   simply missed. The affordance moves to an underline on the name, which
   is what the footer's links do. */
.brand:hover,
.brand:focus-visible { color: var(--white); }
.brand:hover .brand__name,
.brand:focus-visible .brand__name { text-decoration: underline; }
/* The seal has a white centre, so it reads cleanly on the navy header
   without a plate behind it. Width and height attributes on the img
   reserve the space, so the header does not shift as it loads. */
.brand__logo {
  width: 48px;
  height: 48px;
  flex: none;
  display: block;
  object-fit: contain;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.02em; }
.brand__tag  { font-size: 0.68rem; color: var(--blue-200); letter-spacing: 0.03em; text-transform: uppercase; }

/* One header row on a desktop, where there used to be two at every
   width. The brand (335px with the full name on one line) and the nav
   (1,039px) could not share the 1,200px container, so the name sat alone
   on a row of its own with 850px of navy beside it, and the sticky header
   took 125px of every screen at work.

   Two changes, both only where the nav is at full size:
     * the full name sets as a two-line lockup beside the seal, which is
       how the seal itself carries it, taking the brand to about 230px;
     * the header's own row may run to 1,320px, wider than the page
       below it — a header spanning further than the text is ordinary,
       and the brand and the button still sit well inside the screen.
   Neither is a guarantee: fonts differ by machine. If the row still does
   not fit, flex-wrap puts the nav on a second row exactly as before, so
   the worst case is the old header. */
.brand__tag { max-width: 11rem; line-height: 1.2; margin-top: 2px; }
@media (min-width: 1181px) {
  .site-header .container { width: min(100% - 2.5rem, 1320px); }
}

/* The phone's "Log in", beside the menu button. Hidden everywhere else:
   on a desktop the header's own Staff Member Login is in the row. */
.header-login { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle__bars span {
  display: block; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { display: flex; align-items: center; gap: var(--sp-4); }
.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav__list li { margin: 0; }
.primary-nav__list a {
  display: block;
  padding: 0.55rem 0.7rem;
  color: var(--blue-100);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 3px solid transparent;
}
.primary-nav__list a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.primary-nav__list a.is-current { color: var(--white); border-bottom-color: var(--gold-400); }

.nav-session { display: flex; gap: var(--sp-2); align-items: center; }

/* Appearance control — a segmented group of three radios, in the header
   beside the sign-in button.
 *
 * It lives on the navy band in both themes, so it is styled for navy
 * only and takes no part in the light/dark switch: white-ish on
 * translucent white, with the selected cell lifted. That is also why the
 * numbers here are all against navy rather than against a page colour.
 *
 * The inputs are visually-hidden rather than opacity:0 or display:none —
 * they must stay focusable and stay a radio GROUP, which is what gives
 * arrow-key movement between the three for free. The label is the
 * visible control; :has() is not needed because the checked input is a
 * sibling that precedes its own label. */
.theme-toggle {
  display: flex;
  gap: 2px;
  margin: 0 var(--sp-1) 0 0;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.theme-toggle legend { display: none; }

.theme-toggle label {
  display: grid;
  place-items: center;
  width: 30px; height: 26px;
  border-radius: 999px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle label:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.theme-toggle .icon { width: 17px; height: 17px; }

/* The selected cell. Gold fill with navy on it — the same pairing as the
   accent button next to it, so the header reads as one thing. */
.theme-toggle input:checked + label {
  background: var(--gold-400);
  color: var(--navy-900);
}

/* Focus has to be visible on the LABEL, since the input it belongs to is
   visually hidden. Drawn inside the pill rather than around it so it does
   not collide with the neighbouring cell. */
.theme-toggle input:focus-visible + label {
  outline: 3px solid var(--gold-400);
  outline-offset: -3px;
}
.theme-toggle input:checked:focus-visible + label {
  outline-color: var(--navy-900);
}

/* No narrow-screen rules for .theme-toggle any more, and that is the
   change rather than an omission: the control is not rendered at all
   below 960px (SMALL_SCREEN in js/shared/appearance.js), so the block that used to
   stretch it full width across a phone's header could never match. */

/* Portal sub-bar */
.portal-bar { background: var(--navy-700); border-top: 1px solid rgba(255,255,255,0.12); }
.portal-bar__inner {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) 0; flex-wrap: wrap;
}
.portal-bar__title {
  margin: 0; font-weight: 700; color: var(--white);
  font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase;
}
.portal-bar__sep { color: var(--gold-400); margin: 0 0.35rem; }
.portal-bar__user { margin: 0 0 0 auto; font-size: var(--fs-sm); color: var(--blue-200); }
.portal-bar__user strong { color: var(--white); }
.lock { margin-right: 0.35rem; }
#btn-portal-nav { display: none; }

/* Search in the portal bar, above every panel (js/portal/search.js, initSearch).
   A field and a gold button on the navy band; the "/" hint sits inside
   the field and gives way once it has focus or text. Styled by id
   because the base input rule's chain of :not()s outweighs any class.
   The focus rings are gold because the base navy one vanishes on navy.
   Phones get the button alone: see the 720px block below. */
.portal-search {
  position: relative; display: flex; align-items: stretch;
  flex: 0 1 18rem; min-width: 0; margin: 0 0 0 auto;
}
.portal-search + .portal-bar__user { margin-left: 0; }
#bar-search {
  min-width: 0; height: 2.25rem; padding: 0 2.5rem 0 0.75rem;
  font-size: var(--fs-sm); border-color: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius) 0 0 var(--radius);
}
#bar-search:focus { outline: 2px solid var(--gold-400); outline-offset: 2px; }
/* The placeholder is the only visible label this field has, so it gets
   real text contrast rather than the browser's faint default. */
#bar-search::placeholder { color: var(--color-text-muted); opacity: 1; }
.portal-search__key {
  position: absolute; top: 50%; right: 3.1rem; transform: translateY(-50%);
  pointer-events: none; color: var(--color-text-muted); font-size: var(--fs-xs);
}
#bar-search:focus ~ .portal-search__key,
#bar-search:not(:placeholder-shown) ~ .portal-search__key { display: none; }
.portal-search__go {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.5rem; padding: 0; border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--gold-400); color: var(--navy-900); cursor: pointer;
}
.portal-search__go:hover { background: var(--gold-500); }
.portal-search__go:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }


/* =====================================================================
   07  HERO
   ===================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(900px 420px at 78% 0%, var(--navy-600), transparent 65%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--white);
  padding: var(--sp-9) 0 var(--sp-8);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: auto 0 0 0; z-index: -1; opacity: 0.5; }
.hero__bg svg { display: block; width: 100%; height: 260px; }
.hero__bg path { fill: rgba(63, 127, 191, 0.28); }
.hero__bg-2 { fill: rgba(224, 181, 60, 0.14) !important; }

/* Single column by default; the seal joins as a second column once
   there is room for it beside the copy rather than under it. */
.hero__inner { display: grid; gap: var(--sp-6); align-items: center; }
.hero__content { max-width: 920px; min-width: 0; }
.hero__mark { display: none; }

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) clamp(200px, 24vw, 320px);
    gap: var(--sp-8);
  }
  /* Declared inside the query so the file is only fetched on the screens
     that actually render it. */
  .hero__mark {
    display: block;
    aspect-ratio: 1 / 1;
    background: url('images/apsea-logo-lg.png') center / contain no-repeat;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
  }
}
.hero__eyebrow {
  font-size: var(--fs-sm); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-400); font-weight: 700; margin-bottom: var(--sp-3);
}
/* The full name is inside the <h1>, as a line of its own under
   "APSEA", so the page's one heading carries the name people search for.
   It looks as it did as a separate paragraph: display: table puts it on
   its own line while keeping the gold rule only as wide as the name. */
.hero__title {
  font-size: var(--fs-hero);
  letter-spacing: 0.02em;
  color: var(--white);
  margin: 0 0 var(--sp-5);
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.hero__fullname {
  display: table;
  position: relative;  /* painted over the h1's text-shadow, as a sibling was */
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: var(--blue-100);
  text-shadow: none;
  margin: 0;
  padding-top: var(--sp-3);
  border-top: 2px solid rgba(224, 181, 60, 0.5);
}
.hero__lede {
  font-size: clamp(1.1rem, 0.95rem + 0.9vw, 1.6rem);
  font-weight: 600;
  color: var(--gold-400);
  max-width: 46ch;
  margin-bottom: var(--sp-5);
}
.hero__explainer {
  font-size: var(--fs-md);
  color: var(--blue-100);
  max-width: 68ch;
  border-left: 4px solid var(--gold-500);
  padding-left: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.hero__explainer strong { color: var(--white); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.hero__note {
  font-size: var(--fs-sm);
  color: var(--blue-200);
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: var(--sp-4);
  max-width: 70ch;
  margin: 0;
}


/* =====================================================================
   08  SECTIONS, HEADINGS & CARDS
   ===================================================================== */
.section-head { max-width: 78ch; margin-bottom: var(--sp-6); }
.section-head--light { color: var(--blue-100); }
.section-head__sub { font-size: var(--fs-md); color: var(--color-text-muted); margin-bottom: 0; }
.section-head--light .section-head__sub { color: var(--blue-200); }

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold-700);
  margin-bottom: var(--sp-2);
}
.section--navy .eyebrow { color: var(--gold-400); }

.section-sub {
  font-size: var(--fs-xl);
  margin: var(--sp-7) 0 var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 3px solid var(--gold-500);
  display: inline-block;
}

/* A subheading with its action beside it, rather than the action living
   at the far end of whatever the section contains.

   NOT .section-head. That name was already taken by the public site's
   section headers above, seventeen of them, and giving it these rules
   turned every one into a space-between row: the eyebrow at the left
   margin and the heading adrift in the middle of the page. */
.subhead-row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--sp-3);
}
.subhead-row .section-sub { margin-bottom: var(--sp-2); }

.lead { font-size: var(--fs-md); }

/* Card grid */
.card-grid {
  display: grid;
  gap: var(--sp-4);
  list-style: none;
  padding: 0;
  margin: 0;
  /* min() so the track can fall below its ideal width on a narrow phone.
     A bare minmax(260px, 1fr) cannot shrink past 260px and pushes the card
     off the side of a 320px screen. */
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.card-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.card-grid li { margin: 0; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: var(--fs-lg); }
.card h3 { font-size: var(--fs-md); }

.card--icon { border-top: 4px solid var(--navy-700); }
.card--icon:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-200); }
/* =====================================================================
   ICONS
   =====================================================================
   One line drawing per icon, inlined as a <symbol> sprite by
   tools/build-icons.py and used as <svg class="icon"><use href="#i-…">.

   They take their colour from whatever they sit in, so the same drawing
   works in gold on navy in the portal navigation and in navy on white
   on a card. Sized in em so an icon tracks the text beside it.

   The sprite itself is markup that must never be drawn: `hidden` alone
   is not enough for an <svg> in every browser. */
.icon-sprite { display: none !important; }

.icon {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* Sits on the text baseline rather than below it. */
  vertical-align: -0.18em;
}

.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-tint-info); color: var(--color-on-tint-info);
  margin-bottom: var(--sp-3);
}
/* Bigger than a text-sized icon and squared up inside its circle. */
.card__icon .icon { width: 24px; height: 24px; vertical-align: 0; }
.card--link:hover { border-color: var(--navy-500); box-shadow: var(--shadow); }
.card--accent { border-left: 5px solid var(--gold-500); background: var(--color-tint-warn); }
.card--accent h2, .card--accent h3 { color: var(--color-heading); }
.card--outline { border: 2px solid var(--navy-700); background: var(--color-tint-info); }

.values .card { border-top: 3px solid var(--gold-500); }
.values .card p { margin-bottom: 0; font-size: var(--fs-sm); color: var(--color-text-muted); }

.check-list, .step-list { padding-left: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.75rem; }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--gold-500);
}
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 2.25rem; counter-increment: step; }
.step-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1em;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--navy-800); color: var(--white);
  font-size: var(--fs-sm); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.quote {
  border-left: 4px solid var(--gray-300);
  padding: var(--sp-2) var(--sp-4);
  color: var(--color-text-muted);
  font-style: italic;
}


/* =====================================================================
   09  PUBLIC COMPONENTS
   ===================================================================== */

/* --- Organizational flow diagram --- */
.flow {
  list-style: none;
  padding: 0;
  margin: 0 auto var(--sp-6);
  max-width: 820px;
  display: grid;
  gap: 0;
}
.flow__step { display: flex; flex-direction: column; align-items: stretch; margin: 0; }
.flow__card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  border-left: 5px solid var(--blue-400);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
}
.flow__step--highlight .flow__card {
  background: var(--color-surface);
  border-color: var(--gold-500);
  border-left-width: 6px;
  color: var(--gray-900);
  box-shadow: var(--shadow-lg);
}
.flow__step--highlight .flow__card p:not(.flow__label) { color: var(--gray-700); }
.flow__label {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 800; color: var(--gold-400); margin-bottom: var(--sp-1);
}
.flow__step--highlight .flow__label { color: var(--gold-700); }
.flow__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.flow__step--highlight .flow__title { color: var(--color-heading); }
/* The highlighted card is white, and gold-400 is the colour for gold on a
   dark ground — 1.93:1 here. gold-700 is the one the ramp notes at the top
   of this file mark as "text, and anything that must be SEEN". Caught by
   tools/check-a11y.js. */
.flow__step--highlight .compare__abbr { color: var(--gold-700); border-color: var(--gold-600); }
.flow__card p:last-child { margin-bottom: 0; }
/* Connector between flow cards: a hairline with the arrow riding on it */
.flow__arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-heading);
}
.flow__arrow::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(224, 181, 60, 0.45);
}
.flow__arrow-glyph {
  position: relative;          /* sits above the connector line */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-400);
  color: var(--color-heading);
  font-size: 1.15rem;
}
/* The management-to-APSEA link is a bargaining relationship between
   independent parties, not a line of authority — so it reads two-way. */
.flow__arrow--bargaining .flow__arrow-glyph {
  width: 38px; height: 38px;
  font-size: 1.3rem;
  background: var(--color-surface);
  border: 3px solid var(--gold-400);
  color: var(--color-heading);
}

.compare__abbr {
  display: inline-block;
  margin-left: var(--sp-2);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--gold-400);
  color: var(--gold-400);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

/* --- Side-by-side comparison --- */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.compare__col {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.compare__col--accent { border-color: var(--gold-500); background: rgba(224,181,60,0.1); }
.compare__col h3 { margin-bottom: var(--sp-3); }
.compare__col ul { list-style: none; padding: 0; margin: 0; }
.compare__col li { padding: var(--sp-2) 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.compare__col li:last-child { border-bottom: 0; }

/* --- Facts sidebar --- */
.fact-card {
  background: var(--navy-800);
  color: var(--blue-100);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.fact-card h3 { color: var(--white); }
.fact-list { margin: 0; }
.fact-list > div { padding: var(--sp-3) 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.fact-list > div:last-child { border-bottom: 0; }
.fact-list dt {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold-400); font-weight: 700; margin-bottom: 2px;
}
.fact-list dd { margin: 0; color: var(--white); font-size: var(--fs-sm); }

/* --- Privacy notice (privacy.html) ---
   A document to be read end to end, so a narrow column and a steady
   rhythm rather than cards. Each kind of record gets the same four rows
   (what, where, who can see it, how long) as a definition list, which a
   screen reader announces as term and definition and which stacks to one
   column on a phone instead of scrolling sideways the way .table does. */
.privacy .section-head { margin-bottom: var(--sp-5); }
.privacy__date { font-weight: 700; color: var(--color-text-muted); margin: 0; }
.privacy__toc {
  margin: var(--sp-6) 0;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}
.privacy__toc h2 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.privacy__toc ol { margin: 0; }
.privacy__toc li { margin-bottom: var(--sp-1); }
.privacy__part { margin-top: var(--sp-7); }
.privacy__part > h2 {
  padding-bottom: var(--sp-2);
  border-bottom: 3px solid var(--gold-500);
}
.privacy__part h3 { margin-top: var(--sp-6); }
.privacy__facts {
  margin: 0 0 var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.privacy__facts > div {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
}
.privacy__facts > div + div { border-top: 1px solid var(--color-border); }
.privacy__facts dt { font-weight: 700; color: var(--color-ink-strong); }
.privacy__facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .privacy__facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
}

/* The full Section 1.2 classification list — long, so it flows into
   columns on wider screens rather than running down the page. */
.class-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4);
  columns: 2;
  column-gap: var(--sp-5);
  font-size: var(--fs-sm);
}
.class-list li {
  break-inside: avoid;
  padding-left: 1rem;
  position: relative;
  margin-bottom: var(--sp-2);
  color: var(--color-text-muted);
}
.class-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-500);
}
@media (max-width: 720px) { .class-list { columns: 1; } }

.quote cite {
  display: block;
  margin-top: var(--sp-2);
  font-style: normal;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--gold-700);
}

.unit-detail .card h3 { margin-top: var(--sp-4); }
.unit-detail .card h3:first-child { margin-top: 0; }

/* --- Officers --- */
.officer { text-align: center; }
.officer__photo {
  width: 96px; height: 96px; margin: 0 auto var(--sp-3);
  display: block; border-radius: 50%; object-fit: cover;
  background: var(--color-tint-info);
}
/* Shown when nobody has supplied a photo for this person yet. The file is
   a plain grey silhouette and already reads as "no photo", so it needs no
   dimming on a light background — that only made it faint.

   On a dark one it is the brightest thing on the card, which is the wrong
   emphasis for an absence, so there it is taken down rather than up. */
.officer__photo--placeholder { opacity: 1; }

/* The profile's photo card: the picture beside what it is for and the
   two buttons that change it. Stacks and centres on a phone, where a
   96px circle beside a paragraph leaves the paragraph a word wide. */
.photo-card { display: flex; gap: var(--sp-5); align-items: flex-start; margin-bottom: var(--sp-5); }
.photo-card__preview { margin: 0; flex: none; }
.photo-card__body { flex: 1 1 auto; min-width: 0; }
.photo-card__body .section-sub { margin-top: 0; }
@media (max-width: 480px) {
  .photo-card { flex-direction: column; align-items: center; text-align: center; }
  .photo-card .btn-row { justify-content: center; }
}

/* The crop step before a photo is saved (#modal-photo-crop). The photo
   moves inside a square frame; the circle over it is what a card shows,
   and what falls outside it is dimmed rather than hidden, so the member
   can see what they are leaving out. touch-action: none hands a finger's
   drag to the script instead of scrolling the page behind the dialog.
   Sizes and position are set from js/portal/photo.js (photoCropper). */
.crop__frame {
  position: relative; overflow: hidden;
  width: min(18rem, 100%); aspect-ratio: 1 / 1; margin: 0 auto var(--sp-3);
  border-radius: var(--radius); background: var(--color-bg-subtle);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.crop__frame:active { cursor: grabbing; }
.crop__frame:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.crop__img {
  position: absolute; left: 0; top: 0; max-width: none;
  transform-origin: 0 0; pointer-events: none;
}
.crop__guide {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 100vmax rgba(8, 26, 51, 0.55);
}
.crop__help { text-align: center; }
.crop__zoom { max-width: 18rem; margin: var(--sp-3) auto 0; }
.crop__zoom input[type="range"] { width: 100%; }

.officer__name { margin-bottom: var(--sp-1); }
.officer__role {
  font-weight: 700; color: var(--gold-700); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: var(--fs-xs); margin-bottom: var(--sp-3);
}
.officer__chairs { margin-bottom: var(--sp-3); }
.officer__desc { font-size: var(--fs-sm); color: var(--color-text-muted); }
.officer__email { font-size: var(--fs-sm); margin-bottom: 0; word-break: break-word; }
.officer__meta { font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--sp-2); }
/* "Add to contacts", under the address it saves. */
.officer__actions { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }

/* "Who do I contact?" (js/shared/contact-helper.js): at the head of the public
   Contact section's routing column, and of the portal's Officers and
   Committees panel. The gold edge marks it as the place to start. */
.contact-helper {
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.contact-helper--panel { margin-bottom: var(--sp-5); }
.contact-helper h2, .contact-helper h3 { font-size: var(--fs-lg); margin-top: 0; }
.contact-helper .field { max-width: 28rem; margin-bottom: var(--sp-3); }
.contact-helper__answer > :last-child { margin-bottom: 0; }
.contact-helper__to { font-weight: 700; margin-bottom: var(--sp-2); }
.contact-helper__people { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.contact-helper__people li { margin-bottom: var(--sp-2); overflow-wrap: anywhere; }
.contact-helper__note { color: var(--color-text-muted); }
.officer-grid { margin-bottom: var(--sp-5); }
/* The roster's empty state spans the grid rather than sitting in one
   280px column of it. */
.officer-grid > .empty-state { grid-column: 1 / -1; }

/* Votes. One card per question, stacked — this is a short list by
   nature, and a question the membership is being asked deserves the
   width to be read in. */
.vote-list { display: grid; gap: var(--sp-4); list-style: none; margin: 0 0 var(--sp-5); padding: 0; }
.vote-list > li { margin: 0; }
.vote__meta {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-muted); font-weight: 700;
}
.vote__question { white-space: pre-line; }   /* an officer's paragraphing survives */
.vote--open { border-left: 3px solid var(--color-accent); }
.vote--closed { opacity: 0.9; }
/* Withdrawn or archived: dimmed and dashed, the same language the rest
   of the portal uses for something kept but no longer current. */
.vote--archived { opacity: 0.82; border-style: dashed; }
.vote-choices { margin-bottom: var(--sp-2); }
.vote-done { font-weight: 700; color: var(--gold-700); }

/* The result. Big numerals because the count is the thing being read,
   and wrapping so three columns become one on a phone. */
.vote-tally {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  list-style: none; margin: var(--sp-4) 0 var(--sp-3); padding: var(--sp-4) 0 0;
  border-top: 1px solid var(--color-border);
}
.vote-tally > li { margin: 0; min-width: 5rem; }
.vote-tally__n { display: block; font-size: var(--fs-xl); font-weight: 800; line-height: 1.1; }
.vote-tally__label {
  display: block; font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 700;
}
.vote-named > summary { cursor: pointer; font-weight: 700; }
.vote-named > summary:hover { color: var(--gold-700); }

/* Quick surveys borrow the vote card's frame, so the two read as
   related, and carry their own tag so they never read as the same
   thing. The bars are decoration (aria-hidden); the count beside each
   answer is what carries the result. */
.survey-answer .radio-set { margin-bottom: var(--sp-3); }
.survey-answer .radio-set legend { font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.survey-answer__status { margin-top: var(--sp-2); }
.survey-results { list-style: none; margin: var(--sp-3) 0 var(--sp-2); padding: 0; display: grid; gap: var(--sp-3); }
.survey-results > li {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  gap: var(--sp-1) var(--sp-3); margin: 0; font-size: var(--fs-sm);
}
.survey-results__label { min-width: 0; overflow-wrap: anywhere; }
.survey-results__n { font-weight: 700; font-variant-numeric: tabular-nums; }
.survey-results__bar {
  grid-column: 1 / -1; height: 0.5rem; border-radius: 999px;
  background: var(--color-bg-subtle); overflow: hidden;
}
.survey-results__bar > span { display: block; height: 100%; width: 0; background: var(--color-primary); }
.survey-results .is-yours .survey-results__bar > span { background: var(--gold-600); }
.survey-live { border-top: 1px solid var(--color-border); margin-top: var(--sp-4); padding-top: var(--sp-3); }
.survey-live__title { font-size: var(--fs-sm); margin: 0 0 var(--sp-1); }
.survey-manage { margin-top: var(--sp-3); }

/* APSEA Directory: a list of people.
   ------------------------------------------------------------------
   One row per member, A to Z, showing a photograph, a name and a
   designation. Everything else — department, location, office days,
   committee interests, contact details — waits inside the row until the
   name is opened. The rows are joined by a single hairline rather than
   being separate cards: at seventy-five members a page of bordered
   boxes is a page of boxes, and what a member came for is a name. */
.dir-list {
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;           /* keeps the first and last rows inside the corners */
}
.dir-list > li + li { border-top: 1px solid var(--color-border); }

.dir-person > details > summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  position: relative;
  cursor: pointer;
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-4);
}
.dir-person > details > summary::-webkit-details-marker { display: none; }
.dir-person > details > summary:hover { background: var(--color-bg-alt); }
.dir-person > details > summary::after {
  content: "+";
  position: absolute;
  right: var(--sp-4);
  font-size: 1.25em;
  line-height: 1;
  color: var(--color-text-muted);
}
.dir-person > details[open] > summary { background: var(--color-bg-alt); }
.dir-person > details[open] > summary::after { content: "\2013"; }

/* The grid card centred a 96px portrait above the name. In a row it sits
   beside it, at a size that lets a member recognise a face without the
   photographs setting the height of the list. */
.dir-person .officer__photo {
  width: 40px; height: 40px;
  margin: 0;
  flex: 0 0 auto;
}
.dir-person__id { min-width: 0; }
.dir-person .officer__name {
  margin: 0;
  font-size: var(--fs-base);
  overflow-wrap: anywhere;    /* a long name wraps rather than pushing the marker off */
}
.dir-person .officer__role {
  display: block;
  margin: 0;
}
.dir-person__entry {
  padding: 0 var(--sp-5) var(--sp-4) calc(var(--sp-4) + 40px + var(--sp-3));
}
.dir-person__entry > :last-child { margin-bottom: 0; }

/* On a phone the entry loses the indent: forty pixels of alignment is not
   worth the column width it costs at 360px. */
@media (max-width: 560px) {
  .dir-person__entry { padding-left: var(--sp-4); }
}


/* =====================================================================
   10  CALLOUTS, BADGES, ALERTS & TAGS
   ===================================================================== */
.callout {
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin: var(--sp-5) 0;
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--navy-700);
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.callout.compact { padding: var(--sp-4); font-size: var(--fs-sm); }

.callout--info { border-left-color: var(--blue-400); background: var(--color-tint-info); }
.callout--warn { border-left-color: var(--gold-500); background: var(--color-tint-warn); }
.callout--urgent { border-left-color: var(--red-600); background: var(--color-tint-danger); }

.classification {
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.classification--member { background: var(--color-tint-info); color: var(--color-on-tint-info); border: 1px solid var(--blue-200); }
.classification--confidential { background: var(--color-tint-warn); color: var(--gold-700); border: 1px solid var(--gold-400); }
.classification--restricted { background: var(--color-tint-danger); color: var(--red-700); border: 1px solid var(--red-600); }
/* The calendar is the one panel behind the sign-in whose contents are not
   members-only: an embedded Google Calendar is readable by anyone holding
   its address. Warn-coloured rather than info-coloured on purpose — it is
   telling a member to be careful about what goes on it. */
.classification--public { background: var(--color-tint-warn); color: var(--gold-700); border: 1px solid var(--gold-400); }

/* --- Your rights in a meeting (the Weingarten card) ---
   On the public page and in the portal's Grievances panel. Made to be
   screenshotted and read aloud under pressure, so it is the one card on
   the site built for a phone screen first: the whole of it fits a 390 by
   844 screen under the header, the statement is in large type, and every
   colour on it is about 9:1 or better against its ground (gold-400 on
   navy is the lowest, at 8.99:1).

   Navy in BOTH themes, like the header: a member who saved it in the
   dark theme and one who saved it in the light have the same picture.
   The gold edge is what separates it from the page in the dark theme,
   where navy on the dark ground is barely 1.2:1.

   On a wider screen it grows, type and all, rather than sitting in the
   middle of the page as a phone-sized box: from 700px it is up to 46rem
   wide with the statement at 1.5rem. Below that nothing changes, so the
   phone screenshot is the same. */
.rights-card {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--sp-5);
  background: var(--navy-900);
  color: var(--blue-100);
  border: 2px solid var(--gold-400);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
/* In the portal it sits in a column of left-aligned content. */
.rights-card--panel { margin: var(--sp-5) 0; }
.rights-card__eyebrow {
  font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 800; color: var(--gold-400); margin-bottom: var(--sp-2);
}
.rights-card__title { color: var(--white); font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.rights-card__statement {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-3);
  border-left: 4px solid var(--gold-400);
}
/* The words to say out loud: the largest and heaviest type on the card.
   Sized against the space a phone browser leaves under its own toolbars
   and the site header (about 600 pixels on a 390-wide phone), not
   against the whole screen, because that visible area is what a
   screenshot has to hold. */
.rights-card__statement p {
  margin: 0;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
}
.rights-card__notes { list-style: none; padding: 0; margin: 0 0 var(--sp-3); font-size: 0.9375rem; }
.rights-card__notes li { position: relative; padding-left: 1.1rem; margin-bottom: var(--sp-2); line-height: 1.45; }
.rights-card__notes li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-400);
}
.rights-card__foot { margin: 0; font-size: var(--fs-xs); color: var(--blue-200); font-weight: 700; letter-spacing: 0.04em; }
@media (max-width: 480px) {
  .rights-card { padding: var(--sp-4); }
}
@media (min-width: 700px) {
  .rights-card { padding: var(--sp-6) var(--sp-7); border-width: 3px; }
  .rights-card__eyebrow { font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
  .rights-card__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-5); }
  .rights-card__statement { margin-bottom: var(--sp-5); padding-left: var(--sp-5); border-left-width: 6px; }
  .rights-card__statement p { font-size: 1.5rem; line-height: 1.4; }
  .rights-card__notes { font-size: 1.125rem; margin-bottom: var(--sp-5); }
  .rights-card__notes li { padding-left: 1.4rem; margin-bottom: var(--sp-3); }
  .rights-card__notes li::before { width: 9px; height: 9px; }
  .rights-card__foot { font-size: var(--fs-sm); }
}

.tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  color: var(--gray-700);
  border: 1px solid var(--color-border);
}
.tag--urgent { background: var(--color-tint-danger); color: var(--red-700); border-color: var(--red-600); }
.tag--open { background: var(--color-tint-success); color: var(--green-700); border-color: var(--green-700); }
.tag--priority { background: var(--color-tint-warn); color: var(--gold-700); border-color: var(--gold-400); }
.tag--chair { background: var(--color-tint-info); color: var(--color-on-tint-info); border-color: var(--blue-200); }
.tag--survey { background: var(--color-tint-info); color: var(--color-on-tint-info); border-color: var(--blue-200); }
.tag--serving { background: var(--color-bg-subtle); color: var(--gray-700); border-color: var(--color-border); }
/* An announcement an officer pinned above newer ones. Info blue, so it
   reads apart from the gold of Priority and New beside it. */
.tag--pinned { background: var(--color-tint-info); color: var(--color-on-tint-info); border-color: var(--blue-200); }
.officer__chairs .tag { margin: 0 var(--sp-1) var(--sp-1) 0; }
.warn-text { color: var(--red-700); font-weight: 600; }

/* Portal alert */

/* Sample-content warning at the top of a list not yet backed by the live
   adapter. Sits inside the list as its first item, so it cannot be
   scrolled away from the rows it is warning about, and takes the urgent
   red rather than the gold: this is not a tip, it is "do not act on
   what follows". list-style is cleared because the lists it goes into
   are role="list" grids and cards, not bulleted text. */
.sample-notice {
  grid-column: 1 / -1;
  list-style: none;
  background: var(--color-tint-danger);
  border-left: 4px solid var(--red-600);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--red-700);
}
.sample-notice strong { color: var(--red-700); }

/* "Show more" under a windowed list. Centred and set apart from the last
   row, so it reads as the end of the list rather than another item in
   it. The wrapper keeps its space when the button is hidden — a list
   that shifts up as you reach the bottom of it is disorienting. */
.load-more {
  display: flex; justify-content: center;
  margin-top: var(--sp-5);
  min-height: 2.25rem;
}

/* Offline banner. Injected at the top of <body> by initConnectionWatch()
   and shown only while the machine has no network. Sticky rather than
   fixed so it takes up its own space and never covers the header, and
   loud rather than subtle: on the grievance form, being offline is the
   difference between filing and not filing. */
.offline-banner {
  position: sticky; top: 0; z-index: 60;
  padding: var(--sp-3) var(--sp-5);
  background: var(--red-700); color: var(--white);
  font-size: 0.95rem; font-weight: 600; text-align: center;
}


/* =====================================================================
   11  FORMS
   ===================================================================== */
.form { display: block; }
.form--wide { max-width: none; }
.form__note { font-size: var(--fs-sm); color: var(--color-text-muted); }

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  margin: 0 0 var(--sp-5);
}
legend {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink-strong);
  padding: 0 var(--sp-2);
}

.field { margin-bottom: var(--sp-4); }
.field label,
.radio-set legend {
  display: block;
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-2);
  color: var(--gray-700);
}
.field__help { font-size: var(--fs-xs); color: var(--color-text-muted); margin: var(--sp-2) 0 0; }
.field__error {
  font-size: var(--fs-sm); color: var(--red-700); font-weight: 600;
  margin: var(--sp-2) 0 0; min-height: 0;
}
.field__error:empty { display: none; }
.req { color: var(--red-600); }

/* Written as an EXCLUSION, not a list of the types to style.

   It used to be a list, and the list was missing datetime-local. The two
   fields it left out were Opens and Closes on the officer's vote form —
   the two that decide when a vote starts and when it becomes final — and
   they sat in the middle of a styled form as raw browser controls:
   21 pixels tall against 48, a grey 2px default border, no padding, a
   fixed width that ignored the column, and in dark mode a white box.

   Nothing announced it. A list like that is silent in exactly the
   direction that hurts: add a field of a type nobody thought of, and it
   is simply unstyled. Excluding the types that MUST stay native — the
   ones with their own painted control, which this box model would
   destroy — means the next input type anyone reaches for is styled
   because it was not excluded, rather than unstyled because it was not
   remembered. It also catches an <input> with no type at all, which is
   a text field and was getting nothing.

   Chained :not() rather than a selector list inside one, which is newer
   than some of the browsers on an APA desk. */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),
select, textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:hover, select:hover, textarea:hover { border-color: var(--gray-400); }
input:focus, select:focus, textarea:focus {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(36, 82, 138, 0.18);
}
input:disabled, select:disabled, textarea:disabled { background: var(--color-bg-subtle); color: var(--gray-500); cursor: not-allowed; }
textarea { resize: vertical; min-height: 6rem; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gray-600) 50%), linear-gradient(135deg, var(--gray-600) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.25rem; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(178,31,43,0.14); }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.field-row > .field { margin-bottom: var(--sp-4); }

.field--inline { display: flex; flex-direction: column; margin-bottom: 0; }
.field--inline label { margin-bottom: var(--sp-1); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; }

.field__with-button { display: flex; gap: var(--sp-2); }
.pw-toggle {
  flex: none;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  padding: 0 0.9rem;
  font: inherit; font-size: var(--fs-sm); font-weight: 700;
  color: var(--color-ink-strong);
  cursor: pointer;
}
.pw-toggle:hover { background: var(--gray-200); }

/* min-height for the same reason as .link-btn above: the label is the
   target — the native box is 13px and clicking the words beside it is
   how anyone actually ticks these — and the label was 23px tall. Two
   dozen of them are the communication preferences and committee
   interests on Member Profile, which is a form members fill in on a
   phone. */
.checkbox, .radio { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 400; font-size: var(--fs-sm); cursor: pointer; min-height: 24px; }
.checkbox input, .radio input { width: auto; margin-top: 0.25rem; flex: none; }
.checkbox--block { margin-bottom: var(--sp-4); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.radio-set { border: 0; padding: 0; margin-bottom: var(--sp-4); }
.radio-set legend { padding: 0; }
.radio-set .radio { margin-bottom: var(--sp-2); }

.form__status {
  margin: var(--sp-4) 0 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  font-weight: 600;
  display: none;
}
.form__status.is-success { display: block; background: var(--color-tint-success); color: var(--green-700); border-left: 4px solid var(--green-700); }
.form__status.is-error   { display: block; background: var(--color-tint-danger);  color: var(--red-700);  border-left: 4px solid var(--red-600); }

/* Toolbars for filters/search */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: flex-end;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.result-count { font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--sp-3); }
.empty-state {
  padding: var(--sp-6);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
}


/* =====================================================================
   12  LOGIN VIEW
   ===================================================================== */
.login {
  padding: var(--sp-8) 0;
  background:
    radial-gradient(800px 400px at 50% -10%, var(--navy-700), transparent 60%),
    var(--navy-900);
  min-height: 70vh;
}
.login__card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-7);
  box-shadow: var(--shadow-lg);
}
.login__eyebrow {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 800; color: var(--gold-700); margin-bottom: var(--sp-2);
}
.login__card h1 { font-size: var(--fs-2xl); text-transform: uppercase; }
.login__sub { font-weight: 700; color: var(--color-text-muted); }
.login__row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.login__back { margin-top: var(--sp-4); }
.login__alt {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* --- request portal access --- */
.register__how {
  margin-bottom: var(--sp-6);
  padding: var(--sp-5);
  background: var(--color-bg-subtle);
  border-radius: var(--radius);
}
.register__how h2 { font-size: var(--fs-md); margin-bottom: var(--sp-3); }
.register__how .small { margin-bottom: 0; }

/* Numbered so the sequence is carried by the list itself and not only by
   the visual weight of the leading phrase. */
.steps { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
.steps li { margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.steps li:last-child { margin-bottom: 0; }

.register__done {
  padding: var(--sp-5);
  border-left: 4px solid var(--green-700);
  background: var(--color-tint-success);
  border-radius: var(--radius);
}
/* A focus ring, so it follows the focus token rather than picking its own
   gold — gold-600 is a border colour and this has to be seen. */
.register__done:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }


/* =====================================================================
   13  MEMBER PORTAL SHELL & NAVIGATION
   ===================================================================== */
.portal {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  align-items: start;
  min-height: 60vh;
  background: var(--color-bg-alt);
}
/* The sidebar scrolls on its own, independently of the panel beside it.
   It was sticky already, but with min-height and no overflow: the column
   stuck to the viewport and any item past the fold was simply
   unreachable — you could not scroll the nav, and scrolling the page
   moved the panel while the nav stayed put with its lower entries off
   screen.

   height rather than min-height is what makes overflow mean anything: a
   box has to have a size before it can have more content than fits.

   overscroll-behavior: contain stops the scroll chaining onward to the
   page when the nav reaches its end, so flicking through the sidebar on
   a trackpad does not throw the panel beside it up or down. */
.portal-nav {
  position: sticky;
  top: calc(var(--header-h) + 44px);
  align-self: start;
  background: var(--navy-800);
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
  height: calc(100vh - var(--header-h) - 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.portal-nav__heading {
  font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-400); font-weight: 800; padding: 0 var(--sp-3); margin-bottom: var(--sp-3);
}
.portal-nav ul { list-style: none; margin: 0; padding: 0; }
/* Each group of the navigation under its own small heading, with room
   between them so the list reads as a few short ones. */
.portal-nav__group + .portal-nav__group { margin-top: var(--sp-4); }
.portal-nav__group .portal-nav__heading { margin-bottom: var(--sp-1); }
.portal-nav li { margin: 0; }
.portal-nav__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--blue-100);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.6rem var(--sp-3);
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.portal-nav__link span { opacity: 0.75; font-size: 0.85em; }
/* The icon leads the label, a shade quieter than it until the entry is
   the one you are on. */
.portal-nav__link .icon { width: 18px; height: 18px; opacity: 0.7; vertical-align: 0; }
.portal-nav__link:hover .icon,
.portal-nav__link.is-active .icon { opacity: 1; }
.portal-nav__link.is-active .icon { color: var(--gold-400); }
.portal-nav__link:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.portal-nav__link.is-active {
  background: rgba(224,181,60,0.16);
  border-left-color: var(--gold-400);
  color: var(--white);
}
.portal-nav__link--logout { margin-top: var(--sp-4); color: var(--gold-400); border-top: 1px solid rgba(255,255,255,0.16); border-radius: 0; padding-top: var(--sp-4); }
/* Beside the page the whole list should fit a laptop screen, headings
   and all, so the rows are a touch tighter there than in the phone
   drawer, where each one is a finger's target. Log Out keeps the room
   above its rule. */
@media (min-width: 901px) {
  .portal-nav__link:not(.portal-nav__link--logout) { padding-top: 0.45rem; padding-bottom: 0.45rem; }
}

.portal-content { padding: var(--sp-6) var(--sp-5) var(--sp-8); min-width: 0; }
/* A row a deep link just jumped to. It fades on its own after a couple of
   seconds — long enough to catch the eye, short enough not to become
   decoration the reader has to dismiss. */
.is-linked {
  animation: linked-flash 2.5s ease-out;
  scroll-margin-top: var(--sp-6);
}
@keyframes linked-flash {
  0%, 40% { background: var(--color-bg-subtle); box-shadow: inset 3px 0 0 var(--color-accent); }
  100%    { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}
/* Reduced motion means no animation at all, not a faster one — but the
   reader still needs to see which row was meant, so the mark stays until
   it is removed. */
@media (prefers-reduced-motion: reduce) {
  .is-linked { animation: none; background: var(--color-bg-subtle); box-shadow: inset 3px 0 0 var(--color-accent); }
}

/* A tracked grievance. The stage dates sit in a grid so a representative
   can see the whole clock at once rather than scrolling a form. */
.case-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-3) 0;
}
.case-stages .field { margin-bottom: 0; }

/* A deadline that is close but not yet missed. Amber sits between the
   error red and the success green already defined for form status. */
.form__status.is-warn { color: var(--gold-700); font-weight: 600; }

/* The representation queue on the Grievances panel (initRequestQueue in
   js/portal/requests.js). A request is a .doc row with no button column, so its text
   takes the width; under what the member wrote sit the triage controls
   on one line, and the reviewers' notes fold away below them. Named
   rep-request because .request is the access-request card. */
.rep-request .detail-list { margin: var(--sp-2) 0 0; }
.rep-request__triage {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border);
}
.rep-request__triage .form__status { flex-basis: 100%; margin: 0; }
.rep-request__notes { margin-top: var(--sp-3); }
.rep-request__notes > summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); }
.rep-request__note-list { list-style: none; margin: var(--sp-3) 0; padding: 0; display: grid; gap: var(--sp-2); }
.rep-request__note-list > li { margin: 0; padding: var(--sp-2) var(--sp-3); background: var(--color-bg-alt); border-radius: var(--radius); }

/* The publishing preview: the member's view of a post, inside the form
   that writes it. Set apart so nobody mistakes it for another field. */
.preview {
  margin: var(--sp-4) 0;
  padding: var(--sp-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
}
.preview > .section-sub { margin-top: 0; }

/* ---------------------------------------------------------------------
   Reading preferences
   ---------------------------------------------------------------------
   Two settings a member sets once and forgets, applied before first paint
   by the inline script in each page's head.

   TEXT SIZE scales the root, and everything downstream is in rem or
   clamp(), so the whole page grows together — spacing, controls and
   tables included. That is the difference between this and browser zoom,
   which also magnifies the layout until tables overflow sideways: here a
   member who needs bigger words gets bigger words in the same layout.

   HIGH CONTRAST is not a third theme. It works on top of whichever theme
   is in force, and only pushes the tokens that carry text and edges: the
   muted greys the design uses for secondary text are the first thing to
   go for a reader with low vision, and hairline borders are the second. */
:root[data-text="large"]  { font-size: 112.5%; }
:root[data-text="larger"] { font-size: 125%; }

:root[data-contrast="high"] {
  --color-text-muted: var(--color-text);
  --color-border: var(--color-border-strong);
  --color-link: var(--color-ink-strong);
}
:root[data-contrast="high"] .muted,
:root[data-contrast="high"] .small.muted,
:root[data-contrast="high"] .doc__meta,
:root[data-contrast="high"] .stack-list__meta { color: var(--color-text); }
/* Links stop relying on colour alone. */
:root[data-contrast="high"] a { text-decoration: underline; text-decoration-thickness: 2px; }
:root[data-contrast="high"] .card,
:root[data-contrast="high"] .callout,
:root[data-contrast="high"] .doc,
:root[data-contrast="high"] input,
:root[data-contrast="high"] select,
:root[data-contrast="high"] textarea { border-width: 2px; }
:root[data-contrast="high"] .btn { border-width: 2px; }

/* On a phone the header carried a full-width appearance control and a
   full-width Log Out, and between them and the portal bar a third of the
   screen was gone before a member read anything.

   The appearance control is hidden by js/shared/appearance.js below this width, where
   the device decides instead. Log Out goes too, but only in the portal:
   the drawer has one and so does the quick bar, and the public page has
   neither — a signed-in visitor there still needs a way out. */
@media (max-width: 720px) {
  /* IN THE PORTAL ONLY. Measured on a 390px screen, signed in: the header
     and the portal bar took 276px — a third of the phone — before a member
     read one word, and 64px of that was a row whose contents were all
     hidden.

     What goes, and where it went instead:
       the appearance control   the device decides on a phone (appearance.js)
       Log Out                  the drawer and the quick bar both have one
       Portal Menu              the quick bar's Menu opens the same drawer

     The public page keeps all of it: it has no drawer and no quick bar,
     and a signed-in visitor there still needs a way out. */
  /* Everything in this row goes EXCEPT the representation button. It is
     the one control here that is not duplicated in the drawer or the
     quick bar, and a member who needs a representative is often on a
     phone, in a corridor, minutes from a meeting — precisely the moment
     it must not be the thing that got tidied away. One small button
     costs a fraction of the row this rule was written to reclaim. */
  body[data-page="portal"] .nav-session > :not(#btn-representation) { display: none; }
  body[data-page="portal"] #btn-portal-nav { display: none; }
  /* With the session controls gone the nav would be an empty flex row
     that still wraps onto its own line, so its list goes too — but the
     nav itself has to stay, because the representation button lives
     inside it. Hiding the nav wholesale, which is what this rule used to
     do, took that button with it: exactly the control that must survive
     on a phone. */
  body[data-page="portal"] .primary-nav:not(.is-open) .primary-nav__list { display: none; }

  /* The bar itself: three stacked lines become two tight ones. Who is
     signed in still matters on a shared phone, so it stays — just not at
     the cost of a line of its own. */
  body[data-page="portal"] .portal-bar__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sp-2) var(--sp-3);
    padding: var(--sp-2) 0;
  }
  body[data-page="portal"] .portal-bar__user { font-size: var(--fs-xs); }

  /* The bar's search collapses to its button, on the line with who is
     signed in: a search field would cost a row of the phone, and the
     quick bar carries Search as well. The button opens the Search panel
     with the cursor in its box. */
  body[data-page="portal"] #bar-search,
  body[data-page="portal"] .portal-search__key { display: none; }
  body[data-page="portal"] .portal-search { flex: none; margin: 0; align-self: center; }
  body[data-page="portal"] .portal-search__go {
    width: 2.25rem; height: 2.25rem; border-radius: var(--radius);
  }
}

/* ---------------------------------------------------------------------
   The phone quick bar
   ---------------------------------------------------------------------
   Hidden above 720px, where the drawer is one click away and the screen
   has room for it. Fixed to the bottom because that is where a thumb is,
   and given a safe-area inset so it clears the home indicator on a phone
   rather than sitting under it. */
.portal-tabbar { display: none; }

@media (max-width: 720px) {
  .portal-tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .portal-tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.55rem 0.25rem;
    font: inherit;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-top: 3px solid transparent;
    cursor: pointer;
  }
  .portal-tabbar__link .icon { width: 22px; height: 22px; }
  .portal-tabbar__link.is-active {
    color: var(--color-ink-strong);
    border-top-color: var(--color-accent);
  }
  /* The bar sits over the page, so the page has to end above it: a link
     under a fixed bar is a link nobody can press. What ends the page is
     the footer, whose bottom line carries the privacy notice and "Report
     a problem with this page", so that is what makes room.

     This was `.view:not([hidden]) #main-content`, which never matched
     anything: the views are inside <main>, not around it. The bar is
     there only while a member is signed in, which is-member-session
     marks, and only in the portal. */
  body[data-page="portal"].is-member-session .site-footer__bar {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
  /* And a message rises above the bar instead of landing on it: the
     "Welcome" toast on sign-in sat over Search, Calendar and Menu for
     its whole life, and a tap there landed on the toast. */
  body[data-page="portal"].is-member-session .toast-region {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* The inline editor inside a published row. Inset and ruled off, so it
   reads as "you are changing this one" rather than as a new form. */
.edit-form {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--color-border);
  width: 100%;
}
.edit-form .field { margin-bottom: var(--sp-3); }

/* Posted since the member last looked. A left edge rather than a
   background wash: it has to read as "this one is new" at a glance while
   the row is still the same row, and it has to survive both themes. */
.is-new { box-shadow: inset 3px 0 0 var(--color-accent); }
.tag--new {
  background: var(--color-accent);
  color: var(--navy-900);
  font-weight: 700;
}

/* Recent searches, and the keyboard hint above them. */
.recent-searches { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); }
kbd {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
}

/* The "copy a link to this article" row under each article. */
.cite { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); }

.panel { display: none; }
.panel.is-active { display: block; }
.panel:focus { outline: none; }

.panel-head {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 3px solid var(--navy-800);
}
.panel-head h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.panel-head__sub { color: var(--color-text-muted); margin-bottom: 0; max-width: 70ch; }


/* =====================================================================
   14  PORTAL COMPONENTS
   ===================================================================== */

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  list-style: none; padding: 0; margin: 0 0 var(--sp-5);
}
.stat {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.stat__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); font-weight: 700; margin-bottom: var(--sp-1); }
.stat__value { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: var(--color-ink-strong); margin-bottom: var(--sp-1); }
.stat__meta { font-size: var(--fs-xs); color: var(--color-text-muted); margin: 0; }

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-4);
}
.dash-grid .card { display: flex; flex-direction: column; }
.dash-grid .card > .link-btn { margin-top: auto; padding-top: var(--sp-3); align-self: flex-start; }

/* The new-member welcome at the top of the dashboard. The round mark is
   decoration (aria-hidden); the "Done" tag beside an item is what says
   so, in words. */
.welcome { margin-bottom: var(--sp-5); }
.welcome > h2 { margin-top: 0; }
.welcome__list { list-style: none; margin: var(--sp-4) 0; padding: 0; }
.welcome__item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start;
  gap: var(--sp-1) var(--sp-3); margin: 0; padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.welcome__item:last-child { border-bottom: 0; }
.welcome__body p { margin: 0; }
.welcome__mark {
  position: relative; width: 1.25rem; height: 1.25rem; margin-top: 0.15rem;
  border: 2px solid var(--gray-500); border-radius: 50%;
}
.welcome__item.is-done .welcome__mark { background: var(--green-700); border-color: var(--green-700); }
.welcome__item.is-done .welcome__mark::after {
  content: ''; position: absolute; left: 0.32rem; top: 0.1rem; width: 0.32rem; height: 0.62rem;
  border: solid var(--color-surface); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.welcome__go { align-self: center; white-space: nowrap; }
@media (max-width: 600px) {
  .welcome__item { grid-template-columns: auto 1fr; }
  .welcome__go { grid-column: 2; justify-self: start; white-space: normal; }
}

/* Stacked mini-lists */
.stack-list { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.stack-list li { padding: var(--sp-3) 0; border-bottom: 1px solid var(--color-border); margin: 0; }
.stack-list li:last-child { border-bottom: 0; }
.stack-list p { margin: 0; font-size: var(--fs-sm); }
.stack-list__meta {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gold-700); font-weight: 700; margin-bottom: 2px !important;
}
/* Dashboard cards list everything they have rather than a first few, so
   the list scrolls inside the card once there is more than fits. The
   card keeps its shape and nothing is unreachable. */
.stack-list--capped { max-height: 20rem; overflow-y: auto; }

.quick-links { list-style: none; padding: 0; margin: 0; }
.quick-links li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--color-border); }
.quick-links li:last-child { border-bottom: 0; }

/* Tables */
/* The agreement's own wording, folded away under each article. */
.article-text { margin-top: var(--sp-3); }
.article-text > summary {
  cursor: pointer; font-weight: 700; color: var(--color-ink-mid);
  padding: var(--sp-2) 0; font-size: var(--fs-sm);
}
.article-text > summary:hover { color: var(--gold-700); }
.article-text__body {
  border-left: 3px solid var(--color-border);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  margin-top: var(--sp-2);
  max-height: 32rem; overflow-y: auto;
}
.article-text__body h4 {
  font-size: var(--fs-sm); margin: var(--sp-4) 0 var(--sp-2);
  color: var(--color-ink-strong);
}
.article-text__body h4:first-child { margin-top: 0; }
.article-text__body p {
  font-size: var(--fs-sm); color: var(--color-text-muted);
  margin: 0 0 var(--sp-2);
}

.table-wrap { overflow-x: auto; }

/* A long table capped to a few rows, so what follows it stays on screen.
   The header row stays put while the body scrolls under it — a list of
   names with the column headings scrolled away is a list of nothing. */
.table-scroll { overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.table-scroll .table { margin-bottom: 0; }
.table-scroll thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--color-surface);
  box-shadow: inset 0 -1px 0 var(--color-border);
}
/* Three body rows plus the header. Admin rows carry a name over an
   email address, so each runs to about two lines — measured at roughly
   72px a row against a 44px header. */
.table-scroll--3 { max-height: 16.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 540px; }
.table th, .table td { padding: var(--sp-3); text-align: left; border-bottom: 1px solid var(--color-border); }
.table thead th { background: var(--navy-800); color: var(--white); font-family: var(--font-display); }
.table tbody th { font-weight: 700; color: var(--color-ink-strong); }
.table tbody tr:nth-child(even) { background: var(--color-bg-alt); }

/* Document & minutes list */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.doc {
  display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--navy-700);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.doc h3 { font-size: var(--fs-md); margin-bottom: var(--sp-1); }
.doc p { margin: 0; }
.doc__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
.doc__desc { font-size: var(--fs-sm); margin-top: var(--sp-2) !important; }
.doc > div:first-child { flex: 1 1 340px; }

/* Article list (contract search results) */
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.article-list li {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius);
}
.article-list h3 { font-size: var(--fs-base); margin-bottom: var(--sp-1); }
.article-list p { margin: 0; font-size: var(--fs-sm); color: var(--color-text-muted); }


/* Forms & documents: the union's Google Drive, one folder at a time.
   The tab list itself is the shared component in section 15; everything
   here is what goes inside a panel. */

/* The link-sharing notice. Quiet rather than a full callout — it is a
   standing fact about these folders, not a warning about today, and a
   red box over every visit stops being read by the second one. */
.drive-note {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  border-left: 3px solid var(--gold-600);
  background: var(--color-bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
.drive-note .icon { margin-top: 0.15em; color: var(--gold-700); }
.drive-note strong { color: var(--color-ink-strong); }

.drive-blurb { margin: 0 0 var(--sp-3); color: var(--color-text-muted); font-size: var(--fs-sm); }

/* One frame instead of three, so it can afford the height a file listing
   actually wants. Only rendered at MIN_EMBED_WIDTH and above — see
   initDocuments in js/portal/documents.js for why a phone gets a card instead. */
.drive-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 520px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
/* Not a nicety: a browser or extension that blocks third-party frames
   renders nothing above, and this is then the only way in. */
.drive-out { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }

/* The phone layout. One target, big enough to hit without aiming, with
   the folder name first because that is what the member is choosing. */
.drive-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  min-height: 72px;
}
.drive-card:hover { border-color: var(--color-link); background: var(--color-bg-subtle); }
.drive-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.drive-card__icon {
  width: 1.9rem; height: 1.9rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  color: var(--color-link);
}
.drive-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drive-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-base);
  color: var(--color-heading);
}
.drive-card__meta { font-size: var(--fs-xs); color: var(--color-text-muted); }
.drive-card__go { margin-left: auto; color: var(--color-link); font-weight: 700; }

/* Membership Surveys: one drive-card per open survey, stacked. */
.survey-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }

/* Calendar
   One iframe. The month grid, the day cells, the category chips and the
   upcoming list that used to live here went when the calendar became an
   embedded Google Calendar — everything inside the frame is Google's to
   style, and nothing outside it needs much.

   The height is fixed rather than an aspect-ratio box: a month grid does
   not get more useful as it gets wider, and Google's own layout wants
   roughly this much room before it starts hiding entries behind "more". */
.calendar-embed { margin-bottom: var(--sp-5); }
.calendar-embed__frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 640px;
  border: 1px solid var(--color-border);
  /* --radius, not --radius-md: there is no --radius-md in this file, and
     an undefined custom property makes the whole declaration invalid, so
     this frame was shipping with square corners. */
  border-radius: var(--radius);
  background: var(--color-surface);
}
@media (max-width: 640px) {
  /* Shorter on a phone, where 640px of calendar is most of the screen and
     the page below it stops being discoverable. */
  .calendar-embed__frame { height: 480px; }
}
/* Subscribing to it from the member's own calendar app. The address field
   is read-only and shown in full, rather than tucked behind the copy
   button, so a member whose browser refuses the clipboard can still
   select it by hand. */
.calendar-subscribe { margin-top: var(--sp-5); }
.calendar-subscribe__field { margin: var(--sp-4) 0 0; }
.calendar-subscribe__field input { font-size: var(--fs-sm); text-overflow: ellipsis; }

/* Announcement cards */
.announce__meta { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 700; }
.announce h2 { font-size: var(--fs-md); }
/* An announcement keeps the shape its officer typed: returns, blank
   lines between paragraphs, indents. pre-wrap still wraps a long line to
   the card; overflow-wrap breaks a pasted link that has no spaces in it
   rather than letting it run off the edge of a phone. See
   announcementText in js/portal/announcements.js. */
.announce__body { white-space: pre-wrap; overflow-wrap: anywhere; }
/* The document an officer attached, as a button under the text. */
.announce__link { margin: var(--sp-3) 0 0; }

/* Announcements stack, one to a row, rather than sitting two abreast.
   They are read newest first, and in two columns the second-newest sits
   level with the newest: nothing in the layout says which to read
   first. One column has an order, and it is the right one. */
.announce-list {
  display: grid;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.announce-list > li { margin: 0; }

/* Everything behind the newest folds to its title. The marker matches
   .accordion__trigger, a plus that becomes a dash, so the two collapsing
   things in the portal behave alike. */
.announce__fold > summary {
  display: block;          /* also removes the default disclosure triangle */
  position: relative;
  cursor: pointer;
  padding-right: var(--sp-5);
}
.announce__fold > summary::-webkit-details-marker { display: none; }
.announce__fold > summary::after {
  content: "+";
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.25em;
  line-height: 1.2;
  color: var(--color-text-muted);
}
.announce__fold[open] > summary::after { content: "\2013"; }
.announce__fold > summary h2 { margin: var(--sp-1) 0 0; }
.announce__fold > summary:hover h2 { color: var(--gold-700); }
.announce__fold > :not(summary) { margin-top: var(--sp-4); }
.announce__fold > :last-child { margin-bottom: 0; }

/* Detail modal definition lists */
.detail-list { margin: 0 0 var(--sp-4); }
.detail-list > div { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--color-border); }
.detail-list dt { font-weight: 700; font-size: var(--fs-sm); color: var(--gray-700); }
.detail-list dd { margin: 0; font-size: var(--fs-sm); }


/* ---------------------------------------------------------------------
   Async states: loading skeletons, load errors, role gating
   Every list in the portal goes loading -> ready | error. See
   js/shared/async.js.
   --------------------------------------------------------------------- */
.skeleton {
  display: grid;
  gap: var(--sp-3);
  grid-column: 1 / -1;
  width: 100%;
  padding: var(--sp-2) 0;
}
.skeleton__bar {
  display: block;
  height: 54px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}
.skeleton__bar:nth-child(even) { opacity: 0.72; }
@keyframes skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.load-error {
  grid-column: 1 / -1;
  padding: var(--sp-5);
  border: 1px solid var(--red-600);
  border-left: 6px solid var(--red-600);
  border-radius: var(--radius);
  background: var(--color-tint-danger);
  color: var(--red-700);
}
.load-error p { margin-bottom: var(--sp-2); }
.load-error .btn { margin-top: var(--sp-2); }

/* Role gating — a visible affordance, never an access control */
.portal-nav__link.is-locked { opacity: 0.62; }
/* The padlock on a locked entry. This was the emoji U+1F512, which the
   sweep that replaced the other emoji did not catch: it lives in a CSS
   escape rather than in markup, so nothing looking at the HTML found
   it. Drawn instead, as a mask so it takes the entry's own colour.
   The shape is the `lock` icon from tools/build-icons.py; a `content:`
   rule cannot reference the sprite, so it is repeated here — change one
   and change the other. */
.portal-nav__link.is-locked::after {
  content: "";
  margin-left: auto;
  width: 0.95em;
  height: 0.95em;
  flex: none;
  background: currentColor;
  opacity: 0.9;
  -webkit-mask: var(--icon-lock) center / contain no-repeat;
  mask: var(--icon-lock) center / contain no-repeat;
}

.role-chip {
  display: inline-block;
  margin-left: var(--sp-2);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgba(224, 181, 60, 0.2);
  border: 1px solid var(--gold-400);
  color: var(--gold-400);
  font-size: var(--fs-xs);
  font-weight: 700;
}



/* =====================================================================
   15  TABS & ACCORDIONS
   ===================================================================== */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--sp-5);
}
.tabs__tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}
.tabs__tab:hover { color: var(--color-ink-strong); background: var(--color-bg-subtle); }
/* The underline is the only thing distinguishing the selected tab, so it
   is an indicator and owes 3:1 — gold-500 gave 2.66:1 against the white
   behind it. gold-600 clears it without changing the colour's character. */
.tabs__tab[aria-selected="true"] { color: var(--color-heading); border-bottom-color: var(--gold-600); }
.tabs__panel > .card { margin-bottom: var(--sp-4); }

.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}
.accordion__item + .accordion__item { border-top: 1px solid var(--color-border); }
.accordion h3 { margin: 0; font-size: var(--fs-base); }
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: var(--sp-4) var(--sp-5);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-ink-strong);
  cursor: pointer;
}
.accordion__trigger:hover { background: var(--color-bg-alt); }
.accordion__trigger::after {
  content: "+";
  flex: none;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold-700);
}
.accordion__trigger[aria-expanded="true"] { background: var(--color-bg-alt); }
.accordion__trigger[aria-expanded="true"]::after { content: "\2013"; }
.accordion__panel { padding: 0 var(--sp-5) var(--sp-4); }
.accordion__panel > :last-child { margin-bottom: 0; }


/* =====================================================================
   16  MODALS & TOASTS
   ===================================================================== */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 26, 51, 0.65); }

.modal {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(100%, 620px);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal--wide { width: min(100%, 800px); }
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  border-bottom: 1px solid var(--color-border);
}
.modal__head h2 { margin: 0; font-size: var(--fs-lg); }
.modal__close {
  flex: none;
  background: transparent; border: 0; font-size: 1.6rem; line-height: 1;
  color: var(--gray-500); cursor: pointer; padding: 0 0.25rem;
}
.modal__close:hover { color: var(--color-heading); }
.modal__body { padding: var(--sp-5); overflow-y: auto; }
.modal__body > :last-child { margin-bottom: 0; }

/* A dialog that answers more than one question needs headings, but
   .section-sub is scaled for a full panel and shouts inside a modal.
   Same gold rule, quieter. */
.modal__section {
  font-size: var(--fs-md);
  margin: var(--sp-6) 0 var(--sp-3);
  padding-bottom: var(--sp-1);
  border-bottom: 2px solid var(--gold-500);
  display: inline-block;
}
.modal__body > .modal__section:first-child { margin-top: 0; }
.modal__foot { padding: var(--sp-3) var(--sp-5) var(--sp-5); border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: var(--sp-3); }
body.has-modal { overflow: hidden; }

.toast-region {
  position: fixed;
  right: var(--sp-4); bottom: var(--sp-4);
  z-index: 400;
  display: flex; flex-direction: column; gap: var(--sp-2);
  max-width: min(92vw, 380px);
}
.toast {
  background: var(--navy-800);
  color: var(--white);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* The signed-in member's name across the portal (js/portal/watermark.js,
   which says why each of these is what it is). The words are the mask,
   set from script; this is the colour showing through it. Above the
   dialogs and toasts, so a screenshot of one carries the name too, and
   transparent to every click, tap and selection. */
.portal-watermark {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background-color: var(--color-text);
  opacity: 0.1;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  /* Printed even with the print dialog's background graphics off. */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
/* Pale text on a dark page shows more for the same strength. */
:root[data-theme="dark"] .portal-watermark { opacity: 0.08; }
@media print {
  /* Paper is white in both themes (the print block's token reset), so
     the light strength applies. */
  :root[data-theme="dark"] .portal-watermark { opacity: 0.1; }
}


/* =====================================================================
   17  FOOTER
   ===================================================================== */
.site-footer { background: var(--navy-900); color: var(--blue-200); margin-top: auto; }
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-7) 0 var(--sp-6);
}
.site-footer h2 {
  font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold-400); margin-bottom: var(--sp-3);
}
.site-footer a { color: var(--blue-100); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.site-footer .link-btn { color: var(--blue-100); font-weight: 600; }
.site-footer .link-btn:hover { color: var(--white); }
.brand__logo--footer { width: 56px; height: 56px; margin-bottom: var(--sp-3); }
.site-footer__name { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--white); margin-bottom: var(--sp-1); }
.site-footer__fullname { font-size: var(--fs-sm); color: var(--gold-400); font-weight: 600; margin-bottom: var(--sp-3); }
.site-footer__tag { font-size: var(--fs-sm); max-width: 42ch; }
.site-footer__address { font-size: var(--fs-sm); }
.site-footer__disclaimer { font-size: var(--fs-xs); line-height: 1.6; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.25); }
.site-footer__bar-inner {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  justify-content: space-between; padding: var(--sp-4) 0;
}
.site-footer__bar p { margin: 0; font-size: var(--fs-xs); }
/* The privacy notice's link, which every page carries. Underlined here
   although footer links are not elsewhere: in a line of small print it
   is the one thing that goes somewhere, and it should look like it. */
.site-footer__links a { text-decoration: underline; text-underline-offset: 2px; }
/* Side by side, wrapping on a phone, spaced by the gap rather than by a
   separator character a screen reader would read out. */
.site-footer__bar .site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); }
/* The report button is a button, but in this line it reads as a link
   beside a link, so it takes the same weight. */
.site-footer__links .link-btn { font-weight: inherit; }

/* reCAPTCHA, App Check's provider. Google's floating badge sits over the
   bottom-right corner of every page, on a phone included, so it is hidden
   and the attribution Google requires in its place is a line in the
   footer instead (policies.google.com, "reCAPTCHA FAQ": the badge may be
   hidden when that text is visible in the user flow).

   The badge is taken out of the flow as well as hidden. reCAPTCHA
   positions it with inline styles, and if this site's CSP ever refuses
   them the badge would otherwise land as an invisible 60px block below
   the footer. visibility rather than display: display:none on the badge
   is the one form Google says can stop it scoring.

   The footer line shows only once backend-adapter.js has activated App
   Check and set .has-recaptcha on <html>; until then there is no
   reCAPTCHA on the page and the line would not be true. */
.grecaptcha-badge {
  visibility: hidden;
  position: fixed !important;
  bottom: 0 !important;
  right: 0 !important;
}
.g-recaptcha-response { display: none !important; }
.recaptcha-note { display: none; }
.has-recaptcha .recaptcha-note { display: block; }
/* Links inside a sentence, unlike the footer's link lists: the only
   thing setting them apart from the words around them is a shade of
   blue at 1.17:1, which is no difference at all to a reader who can't
   see it (WCAG 1.4.1; axe, link-in-text-block). */
.recaptcha-note a { text-decoration: underline; }


/* =====================================================================
   18  RESPONSIVE BREAKPOINTS
   ===================================================================== */

/* Large desktop → small desktop */
@media (max-width: 1180px) {
  .primary-nav__list a { padding: 0.5rem 0.5rem; font-size: 0.86rem; }
  .portal { grid-template-columns: 220px minmax(0, 1fr); }
}
/* The same tighter nav on a 1280-ish laptop. With the two-line brand
   (section 06) the header fits one row from 1366px up; here it was about
   45px short, and this nav is 80px narrower. Below 1180 the rule above
   already applies; the header wraps to two rows there, as it always has. */
@media (min-width: 1181px) and (max-width: 1365px) {
  .primary-nav__list a { padding: 0.5rem 0.5rem; font-size: 0.86rem; }
}

/* Tablet */
@media (max-width: 1000px) {
  .split, .split--even { grid-template-columns: minmax(0, 1fr); }
  .fact-card { position: static; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile navigation + portal nav collapse */
@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: inline-flex; }

  /* The session button stays on a visible second row so "Staff Member
     Login" is never buried behind the hamburger; only the link list
     collapses. */
  .primary-nav {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--sp-3);
    padding: 0 0 var(--sp-3);
  }
  .primary-nav__list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.16);
  }
  .primary-nav.is-open .primary-nav__list { display: flex; }
  .primary-nav__list.is-hidden { display: none !important; }
  .primary-nav__list a {
    padding: 0.8rem var(--sp-2);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    border-radius: 0;
  }
  .primary-nav__list a.is-current { border-bottom-color: var(--gold-400); }
  .nav-session { flex-direction: column; width: 100%; }
  .nav-session .btn { width: 100%; }

  /* THE PUBLIC PAGE, SIGNED OUT. The row under the brand held one
     full-width "Staff Member Login" and nothing else, so the sticky
     header was 127px on a 390px phone. The login moves up beside the menu
     button as "Log in" (.header-login, index.html), which keeps it on
     screen rather than behind the hamburger — the reason it had a row of
     its own — and the empty row goes. The nav comes back when the menu
     opens. Signed in, the row holds Representation and Log Out and stays.
     Not the portal: its header is arranged by the portal rules below. */
  body:not([data-page="portal"]):not(.is-member-session) .header-login { display: inline-flex; }
  body:not([data-page="portal"]):not(.is-member-session) #btn-open-login { display: none; }
  body:not([data-page="portal"]):not(.is-member-session) .primary-nav:not(.is-open) { display: none; }
  /* Signed in, that row holds Representation and Log Out. Side by side
     rather than stacked full-width: one row of the phone instead of two. */
  body:not([data-page="portal"]).is-member-session .nav-session { flex-direction: row; }
  body:not([data-page="portal"]).is-member-session .nav-session .btn { flex: 1 1 0; }

  /* The header behaves the same signed in or out. It used to drop the
     hamburger inside the portal, on the reasoning that the public links
     were unavailable there — they are not, and hiding the one control
     that opens them on a phone left the whole site unreachable from
     inside the portal. Costs a row of header height; worth it. */
  body.is-member-session .portal-bar__user { flex-basis: auto; order: 0; margin-left: auto; }

  /* Portal: sidebar becomes a collapsible drawer */
  .portal { grid-template-columns: minmax(0, 1fr); }
  /* As a drawer it is part of the page again, so the desktop rules that
     made it its own scroll container have to come back off: a fixed
     height and an inner scrollbar inside an already-scrolling page is
     two scrollbars and a trap. */
  .portal-nav {
    display: none;
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: var(--sp-4) var(--sp-3);
  }
  .portal-nav.is-open { display: block; }
  #btn-portal-nav { display: inline-flex; }
  .portal-bar__user { margin-left: 0; flex-basis: 100%; order: 3; }
  .portal-content { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
}

/* Small tablet / large phone */
@media (max-width: 720px) {
  .section { padding: var(--sp-7) 0; }
  .hero { padding: var(--sp-7) 0 var(--sp-6); }
  .hero__actions .btn { width: 100%; }
  .login__card { padding: var(--sp-5); }

  .panel-head { flex-direction: column; }
  .doc { flex-direction: column; align-items: flex-start; }
  /* Same trap as .toolbar .grow below: the 340px basis that sets the
     text column's width beside the buttons became its HEIGHT once the
     row stacked, so every minutes, search and document row on a phone
     was a card with a tall empty gap under a few lines of text. */
  .doc > div:first-child { flex: 0 0 auto; }
  .toolbar { flex-direction: column; align-items: stretch; }
  /* In a column flex container flex-basis sizes the HEIGHT, so the
     grow modifier must be neutralised when the toolbar stacks. */
  .toolbar .grow { flex: 0 0 auto; }
  .detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
}

/* Phone */
@media (max-width: 480px) {
  .container, .container--narrow { width: min(100% - 1.5rem, var(--container)); }
  .brand__tag { display: none; }
  /* Under 360px the brand, "Log in" and the menu button only share a row
     if the button drops its word. The bars carry it visually and the word
     is still read out, so the button's name does not change. */
  @media (max-width: 359px) {
    .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  .card { padding: var(--sp-4); }
  fieldset { padding: var(--sp-4) var(--sp-3); }
  .modal__head, .modal__body, .modal__foot { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .stat__value { font-size: var(--fs-lg); }
}


/* =====================================================================
   19  MOTION & PRINT PREFERENCES
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .card--icon:hover { transform: none; }
}

@media print {
  /* Paper is white in both themes. `prefers-color-scheme: dark` still
     matches while printing, so without this a member on a dark-themed
     machine prints the minutes as dark grey cards with pale text —
     legible on screen, and a waste of toner and unreadable on paper.
     Resetting the tokens is enough: everything downstream follows them,
     which is the same property that made the dark theme short. */
  :root {
    color-scheme: light;
    --color-bg: #fff;
    --color-bg-alt: #fff;
    --color-bg-subtle: #fff;
    --color-surface: #fff;
    --color-text: #000;
    --color-text-muted: #333;
    --color-border: #999;
    --color-border-strong: #666;
    --color-link: #000;
    --color-tint-info: #fff;
    --color-on-tint-info: #000;
    --color-tint-warn: #fff;
    --color-tint-danger: #fff;
    --color-tint-success: #fff;
    --gold-700: #6b4f00;
    --gold-600: #6b4f00;
    --red-700: #8a0f19;
    --green-700: #10513a;
    --gray-500: #555;
    --gray-600: #444;
    --gray-700: #222;
    --gray-900: #000;
  }
  .site-header, .site-footer__bar, .nav-toggle, .primary-nav,
  .portal-nav, .modal-root, .toast-region { display: none !important; }
  /* The root carries a navy so overscroll on a phone reads as part of
     the header and footer rather than as bare canvas. The root's
     background is the one that paints the canvas, so body's white never
     reaches the paper: a member who turns Background graphics on to get
     the logo got a navy sheet with it. */
  html { background: #fff !important; }
  body { color: #000; background: #fff; }

  /* The portal is a two-column grid, and hiding the sidebar above does
     not take its column with it: a hidden element generates no box, so
     the panel is auto-placed into the 258px column the nav vacated and
     every printed page came out as a ribbon down the left margin, a
     fifth of the paper wide, with the rest blank. Block layout, and the
     panel has the page. */
  .portal { display: block !important; }

  /* The footer is navy with pale text, from a palette colour rather than
     one of the tokens reset above, so it survived as a solid block of
     ink at the foot of every sheet. Its two link columns are navigation
     and do nothing on paper; the identity and the APA disclaimer are
     worth carrying on a printed document and stay. */
  .site-footer { background: #fff !important; color: #000 !important; }
  .site-footer h2, .site-footer__name, .site-footer__fullname,
  .site-footer a { color: #000 !important; }
  .site-footer nav { display: none !important; }
  /* The dark theme dims photographs; on paper that is just a grey print. */
  img { filter: none !important; }
  .card, .callout { box-shadow: none; border: 1px solid #999; }

  /* The rights card is navy with white type from palette colours, which
     none of the token resets above reach. Printers drop backgrounds by
     default, so it would come out as white type on white paper: blank,
     on the one card a member is most likely to print for a wallet. */
  .rights-card { background: #fff !important; box-shadow: none; border-color: #000; }
  .rights-card, .rights-card__eyebrow, .rights-card__title,
  .rights-card__statement p, .rights-card__foot { color: #000 !important; }
  .rights-card__statement { border-left-color: #000; }
  .rights-card__notes li::before { background: #000; }

  /* Print the panel the member is LOOKING AT, and never a hidden view.
     This used to force every panel visible, so printing the minutes
     printed the whole portal — sixteen panels, most of them empty, and
     the one wanted page somewhere in the middle. */
  .view[hidden] { display: none !important; }
  .view:not([hidden]) .panel.is-active { display: block !important; }
  .view:not([hidden]) .panel:not(.is-active) { display: none !important; }

  /* Controls do nothing on paper. Search boxes, filters, buttons, the
     copy-a-link row, the publishing preview and the "show more" — all of
     it is furniture around the thing being printed. */
  .toolbar, .btn-row, .load-more, .cite, .recent-searches, .preview,
  .portal-tabbar, .result-count, [data-panel-link], .link-btn,
  .tabs__list, .nav-badge, .skeleton { display: none !important; }
  .btn { display: none !important; }

  /* Except the ones written into a sentence. A button is a control, so
     the rule above is right about nearly all of them, but three of these
     are words in the middle of a paragraph and hiding them left the
     sentence to end "or change that choice, under ." on the page. Marked
     in the markup rather than guessed at here: :only-child cannot tell
     them apart, because the full stop after the button is a text node
     and does not count as a sibling. */
  .link-btn--inline { display: inline !important; text-decoration: none; }

  /* A tabbed panel prints the open tab, which the markup already says. */
  .tabs__panel[hidden] { display: none !important; }

  /* Rows and cards belong on one page. A set of minutes split across a
     page break at the wrong line is what makes people photograph the
     screen instead. */
  .card, .doc, .announce, .case, .stack-list li,
  .request { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }

  /* Details are collapsed on screen and have to be open on paper: an
     Agreement article printed without its text is a heading. These two
     rules are not what opens them — a closed <details> hides its content
     in the user agent, where no stylesheet reaches, and for as long as
     these rules have existed they have not worked. initPrint() in
     js/shared/tabs.js opens every one of them on beforeprint and closes again
     after. This stays as the layout half of that, and as what a browser
     firing neither event still gets. */
  details { display: block !important; }
  details > *:not(summary) { display: block !important; }

  /* The summary STAYS. On most of this site it is not a control, it is
     the heading: an announcement's date, source and title, a member's
     name and designation in the directory. This rule used to hide every
     one of them, which printed the directory as an unlabelled run of
     departments and phone numbers, and the announcements as anonymous
     paragraphs. Both are pages members actually print.

     Only furniture is hidden. "Read the language of Art. 5" is a control
     for a reader who already has "Art. 5 — Title" as the heading above
     it, and a blank case form is not a document at all. */
  .article-text > summary { display: none !important; }
  .disclosure { display: none !important; }

  /* The open/closed glyph is a state a sheet of paper does not have. */
  .announce__fold > summary::after,
  .dir-person > details > summary::after { content: none !important; }
}

@page { margin: 18mm; }

/* Contact form caution — plain emphasis rather than a boxed callout,
   so the guidance survives without a coloured panel. */
.contact-warning {
  border-left: 3px solid var(--red-600);
  padding-left: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
.contact-warning strong { color: var(--red-700); }

/* =====================================================================
   20  ADMINISTRATION (role & permission editor)
   ===================================================================== */
.role-legend { margin-bottom: var(--sp-4); }
.role-card { border-top: 4px solid var(--gray-300); }
.role-card--3 { border-top-color: var(--gold-500); }
.role-card--2 { border-top-color: var(--blue-400); }
.role-card--1 { border-top-color: var(--gray-400); }
.role-card h3 { margin-bottom: var(--sp-1); }
.role-card p { font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: 0; }
.role-card__level {
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold-700) !important; margin-bottom: var(--sp-2) !important;
}

.admin-table { min-width: 640px; }

/* Directory ordering: the row's number, and the arrows that move it.
   The number column is fixed so the arrows do not shift sideways as the
   list passes ten entries. */
.order-cell {
  display: flex; align-items: center; gap: var(--sp-2); white-space: nowrap;
}
.order-cell__n {
  min-width: 1.75rem; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--gray-500);
}
.order-cell__btns { display: inline-flex; gap: 2px; }

/* Roster picker: the directory as checkboxes. Scrolls rather than
   pushing the rest of the form off the screen once there are more than
   a handful of people. */
.roster-picker {
  max-height: 15rem; overflow-y: auto;
  margin: 0; padding: var(--sp-3);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-bg-alt);
  display: grid; gap: var(--sp-2);
}
.roster-picker .checkbox { margin: 0; }
/* Square, so a row of one arrow lines up with a row of two. */
.btn--icon {
  padding: 0; width: 1.9rem; height: 1.9rem;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; font-size: 0.7rem;
}
.admin-table th[scope="row"] { font-weight: 700; vertical-align: top; }
.admin-table td { vertical-align: middle; }
.admin-table select { min-width: 12rem; }

.admin-matrix { min-width: 760px; }
/* `.table tbody th` also sets a colour, so this needs to outrank it —
   otherwise the label renders navy-on-navy and the bar looks empty. */
.admin-matrix tbody tr.admin-matrix__group th {
  background: var(--navy-800);
  color: var(--gold-400);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
}
.admin-matrix tbody tr:nth-child(even) { background: transparent; }
.admin-matrix tbody tr:hover { background: var(--color-bg-alt); }

.role-head { display: flex; flex-direction: column; gap: 2px; }
.role-head__level {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--blue-200);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-cell { text-align: center; white-space: nowrap; }
.admin-toggle { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.admin-toggle input { width: 20px; height: 20px; cursor: pointer; }
.admin-toggle input:disabled { cursor: not-allowed; }
.admin-lock { margin-left: 0.35rem; font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 720px) {
  .admin-table select { min-width: 9rem; }
}


/* ---------------------------------------------------------------------
   Portal access requests
   ---------------------------------------------------------------------
   The queue a registration lands in, shown identically in the
   Representative Center and in Administration. Red is the urgency
   colour throughout this stylesheet and is reserved for it; a waiting
   request is somebody locked out of the portal, so it earns it. */
.request-alert { margin-bottom: var(--sp-4); }
.request-alert .callout__title { margin-bottom: var(--sp-2); }

.request-list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); display: grid; gap: var(--sp-4); }
.request {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--red-600);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: var(--sp-4);
  margin: 0;
}
/* Decided requests step back: the colour belongs to what still needs a
   person's attention. */
.request--decided { border-left-color: var(--green-700); background: var(--color-bg-alt); }

.request__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-1);
}
.request__name { font-size: var(--fs-md); margin: 0; }
.request__meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0 0 var(--sp-3);
}
.request .detail-list { margin-bottom: var(--sp-3); }

.request__notes {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.request__notes p { margin: 0; font-size: var(--fs-sm); }
.request__notes-label {
  font-size: var(--fs-xs) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-1) !important;
}

.request__status:empty { display: none; }
.request__status { margin-top: var(--sp-3); margin-bottom: 0; }

/* Both decisions are irreversible from the browser, so each button asks
   once and turns red while it is armed. */
.btn.is-armed {
  background: var(--red-600);
  border-color: var(--red-600);
  color: var(--white);
  text-decoration: none;
}
.btn.is-armed:hover { background: var(--red-700); border-color: var(--red-700); color: var(--white); }

/* Count of waiting requests, on the two navigation entries and on the
   Administration tab that lead to the queue. */
.nav-badge {
  display: inline-block;
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 1.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--red-600);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}
/* Outranks `.portal-nav__link span`, which dims every span in the nav. */
.portal-nav__link .nav-badge { opacity: 1; font-size: var(--fs-xs); }
.nav-badge--tab { margin-left: var(--sp-2); }

/* "Show archived" toggles sit alongside the other filters */
.archive-toggle {
  align-self: center;
  white-space: nowrap;
  font-weight: 600;
  color: var(--color-text-muted);
}
.tag--archived { background: var(--gray-200); color: var(--gray-700); border-color: var(--gray-400); }
.is-archived { opacity: 0.82; border-style: dashed; }

/* =====================================================================
   21  THE SITE'S EDITABLE WORDING
   =====================================================================
   The notice banner an officer turns on, the "Edit" links an editor
   sees on each section, and the editor under Administration, Website
   content (js/shared/content.js, js/portal/site-editor.js). Semantic
   tokens throughout, so the dark theme needs nothing of its own. */

/* --- The notice banner ---------------------------------------------- */
.site-notice {
  background: var(--color-tint-info);
  color: var(--color-on-tint-info);
  border-top: 4px solid var(--blue-400);
  border-bottom: 1px solid var(--color-border);
}
.site-notice--urgent {
  background: var(--color-tint-danger);
  color: var(--color-text);
  border-top-color: var(--red-600);
}
.site-notice__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
}
.site-notice__words { flex: 1 1 24rem; }
.site-notice__title { font-weight: 800; margin: 0; }
.site-notice__text { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); }
.site-notice__text:empty { display: none; }
.site-notice__link { flex: none; }

/* --- "Edit" on each section, for whoever holds site.edit ------------- */
.has-content-edit { position: relative; }
.content-edit {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 5;
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--gold-400);
  color: var(--navy-900);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.content-edit:hover { background: var(--white); color: var(--navy-900); }
.content-edit:focus-visible { outline: 3px solid var(--navy-900); outline-offset: 2px; }
/* A portal panel has its MEMBERS ONLY chip in that corner, so there the
   link sits under the panel instead. */
.panel.has-content-edit > .content-edit { position: static; margin-top: var(--sp-5); }
/* A tab of a panel puts it under the tab's contents too: its top corner
   is where the tab's first card begins. */
.tabs__panel.has-content-edit > .content-edit { position: static; margin-top: var(--sp-4); }

/* Cards in the New member center and on Elections & voting wrap their
   words so the editor can hold them as one field (as does the red box on
   Grievances, in .callout__text); the last paragraph keeps the card's own
   spacing. */
.card > .card__text:last-child > :last-child { margin-bottom: 0; }

/* --- "On this tab:" at the top of a long Administration tab ---------- */
.tab-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
  margin-bottom: var(--sp-5);
  font-size: var(--fs-sm);
}
.tab-jump__label { margin: 0; font-weight: 700; color: var(--color-text-muted); }
.tab-jump ul { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); list-style: none; margin: 0; padding: 0; }
.tab-jump li { margin: 0; }
/* What those buttons, and the Overview's, scroll to: clear of the portal
   bar, which sits under the header the page's scroll-padding allows for. */
.tabs__panel [tabindex="-1"] { scroll-margin-top: 3rem; }

/* --- Administration, Website content -------------------------------- */
.site-editor__find { max-width: 34rem; margin-bottom: var(--sp-2); }
.site-editor__group { margin-top: var(--sp-6); }
.site-editor__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.site-editor__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.site-editor__what { flex: 1 1 20rem; }
.site-editor__what h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-md); }
.site-editor__what p { margin: 0; font-size: var(--fs-sm); color: var(--color-text-muted); }
.site-editor__what .tag { margin-top: var(--sp-2); }
.tag--edited { background: var(--color-tint-info); color: var(--color-on-tint-info); border-color: var(--blue-200); }

.content-form__head { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: baseline; justify-content: space-between; }
.content-form__head h2 { margin: 0; }
.content-form .field textarea { min-height: 5.5rem; }
.content-form .field textarea[data-kind="rich"] { min-height: 9rem; }
.content-form fieldset > .field:last-child { margin-bottom: 0; }
.format-help { margin: 0 0 var(--sp-4); }
.format-help summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); }
.content-history-wrap { margin-top: var(--sp-5); }
.content-history-wrap summary { cursor: pointer; font-weight: 700; }

/* The formatting toolbar over a text box. Buttons rather than a
   contenteditable, so what is typed stays plain text and the marks stay
   visible and correctable. */
.format-bar { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.format-bar button {
  min-height: 32px;
  min-width: 32px;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink-strong);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.format-bar button:hover { background: var(--color-bg-subtle); }
.format-bar button:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 1px; }

/* One item of a list: a card, a question, a status box. */
.content-items { list-style: none; padding: 0; margin: 0 0 var(--sp-3); display: grid; gap: var(--sp-3); }
.content-item {
  padding: var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}
.content-item__head { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.content-item__head h3 { margin: 0; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }
.content-item .field:last-child { margin-bottom: 0; }

/* The section as it will look, drawn from the page's own markup and
   styles. Not interactive: it is a picture of the page, not the page.
   Full height rather than a box that scrolls on its own: a scrolling
   region inside a scrolling page is one a keyboard cannot reach, and the
   form has a "Jump to the preview" button for the long sections. */
.content-preview {
  margin: var(--sp-4) 0;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}
.content-preview__label {
  margin: 0;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}
.content-preview .accordion__panel[hidden] { display: block !important; }

.content-history { list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.content-history li {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

/* --- Administration, People: a photo for a directory entry ----------- */
.entry-photo__label { font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--sp-2); color: var(--gray-700); }
.entry-photo__row { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }
.entry-photo__row .officer__photo { margin: 0; flex: none; }
.entry-photo__row .field__help { margin-top: var(--sp-2); }

/* --- Administration, Publish content: meeting minutes ----------------- */
.minutes-upload { margin-top: var(--sp-6); }
.minutes-github { margin: var(--sp-5) 0 var(--sp-3); }
.minutes-github summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); }

/* --- Administration, Overview: "What would you like to do?" --------- */
.admin-tasks { list-style: none; padding: 0; margin: 0 0 var(--sp-6); display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.admin-task {
  display: block;
  width: 100%;
  height: 100%;
  text-align: left;
  padding: var(--sp-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}
.admin-task:hover { background: var(--color-bg-subtle); }
.admin-task:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.admin-task strong { display: block; color: var(--color-heading); margin-bottom: var(--sp-1); }
.admin-task span { display: block; font-size: var(--fs-sm); color: var(--color-text-muted); }

@media print {
  .content-edit, .site-notice { display: none !important; }
}
