/* Layered on top of Bootstrap 5.
   Base type is deliberately larger than Bootstrap's default with generous
   line-height: the Society's members are largely OCS alumni, who skew older,
   and readability matters more here than density. Page background stays white. */

:root {
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --rule: #ddd8cf;
  --accent: #14532d;       /* deep green */
  --accent-dark: #0e3a20;
  --gold: #b08d3f;
  --measure: 40rem;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4 { color: var(--accent); line-height: 1.25; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 2000;
  background: #fff; padding: .5rem 1rem; border: 2px solid var(--accent);
}

/* ---- Navbar ---------------------------------------------------------- */

.site-nav { box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.navbar-brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; padding-block: .25rem; }
/* Height-constrained so the crest sets the navbar height predictably; width
   follows its own aspect ratio. The crest carries its own "ARMY / HERITAGE
   SOCIETY" lettering, but at this size that lettering is not readable, so the
   wordmark beside it is doing the actual work of naming the Society. */
.brand-logo { height: 76px; width: auto; display: block; }
.brand-text { color: #000; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.005em; }

@media (max-width: 575.98px) {
  .brand-logo { height: 54px; }
  .brand-text { font-size: 1.15rem; }
}
/* Two-row bar from lg up: the brand keeps the first line, the links get the
   second. The container is allowed to wrap and the collapse is forced to a full
   line, which is what pushes it below the brand -- Bootstrap otherwise lays the
   collapse out beside it and the two fight over the width.

   Why this rather than the alternatives: see the comment in templates/base.html.
   Short version -- dropdowns hide sections, a smaller font undoes a deliberate
   sizing decision, and an earlier hamburger hides everything. */
@media (min-width: 992px) {
  .site-nav > .container-fluid { flex-wrap: wrap; }
  .site-nav .navbar-collapse {
    flex: 0 0 100%;
    /* The links sit under the brand, so the row needs a hairline above it and a
       little breathing room -- without it the two rows read as one crowded block. */
    border-top: 1px solid #efece4;
    margin-top: .35rem;
    padding-top: .1rem;
  }
  /* Both lists share the row: sections from the left, actions pushed right. */
  .site-nav .navbar-collapse { display: flex; align-items: center; flex-wrap: wrap; }
  .site-nav .nav-sections { flex: 0 1 auto; flex-wrap: wrap; row-gap: .15rem; }
  /* Wrapping is deliberate. Just above the lg breakpoint the ten items and the
     Donate button are a close fit, and the width depends on the visitor's font.
     Allowed to wrap, a tight window gets a second line of links; forbidden, it
     gets a horizontal scrollbar or items pushed off the edge. */

  /* The bar is sticky, so two rows must not eat the viewport. The brand row
     carries the height, and its padding comes down to pay for the second. */
  .site-nav .navbar-brand { padding-block: .1rem; }
  .site-nav { padding-block: .25rem; }
}

.site-nav .nav-link {
  color: var(--ink); font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.15rem; padding-inline: .5rem;
  border-bottom: 2px solid transparent;
}
/* Align the first section with the crest above it rather than sitting .5rem in. */
@media (min-width: 992px) {
  .site-nav .nav-sections > .nav-item:first-child .nav-link { padding-inline-start: 0; }
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus {
  color: var(--accent); border-bottom-color: var(--accent);
}
/* Donate reads as a button, not a nav link: it is the one action on the bar
   and needs to look different from navigation. Gold picks up the hero's call
   to action so the two read as the same kind of thing. */
.nav-donate-item { margin-left: .4rem; }
.nav-donate {
  display: inline-block;
  background: var(--gold);
  color: #1a1a1a;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .42rem 1.05rem;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-donate:hover, .nav-donate:focus { background: #c79c46; color: #1a1a1a; }

/* In the collapsed menu it sits on its own row, so give it breathing room
   rather than letting it hug the links above it. */
@media (max-width: 1199.98px) {
  .nav-donate-item { margin: .5rem 0 .25rem; }
  .nav-donate { display: block; text-align: center; }
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  background-image: linear-gradient(rgba(12,17,12,.58), rgba(12,17,12,.78)), var(--hero-img);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: clamp(3.5rem, 11vw, 8rem) 0;
}
/* Home hero: a photograph under a green-tinted scrim, set as light as the
   contrast budget allows so the collage still reads.

   Measured properly — by compositing the scrim over the image in Pillow rather
   than sampling the rendered page, which only picks up the anti-aliased halo
   around the white glyphs and reports nonsense. Worst-case contrast against
   white across the whole photograph at this strength is 7.4:1, clearing WCAG
   AAA, not merely AA. The tint keeps it in the site's palette rather than
   going flat grey. */
.hero-photo {
  background-image:
    linear-gradient(rgba(22,30,19,.74), rgba(16,23,14,.80)),
    var(--hero-img);
  background-size: cover;
  background-position: center;
}

/* No max-width of its own: the Bootstrap .container it also carries sets the
   width, so the lockup spans the full section rather than a narrower column. */
.hero-inner { max-width: none; }

/* Home hero: a crest at each edge with the wordmark centred between them.
   space-between pushes the marks to the outside and lets the text block take
   the middle, so the three fill the section's width. */
.hero-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  /* Inset each edge by 15% of the section width, so the marks sit inboard of
     the container edges rather than hard against them. space-between then
     distributes within the inset box. Removed below md, where the row wraps
     and the inset would only squeeze the wordmark. */
  padding-inline: 15%;
}
.hero-logo {
  height: clamp(158px, 20.2vw, 274px);
  width: auto;
  flex: none;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.5));
}
.hero-brand-text {
  flex: 1 1 auto;
  max-width: 40rem;
  text-align: center;
  margin-inline: auto;
}
.hero-roundel {
  height: clamp(138px, 15.8vw, 245px);
  width: auto;
  flex: none;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.5));
}

/* Below md the two marks sit side by side on one row with the wordmark on its
   own row beneath, all centred. Stacking all three in a single column would
   push the text most of a screen down, and setting them side by side with the
   text would leave the title in a column a few words wide. */
@media (max-width: 767.98px) {
  .hero-brand { flex-wrap: wrap; text-align: center; gap: 1.25rem; padding-inline: 0; }
  .hero-logo { order: 1; height: 150px; }
  .hero-roundel { order: 2; height: 138px; }
  .hero-brand-text { order: 3; flex: 0 0 100%; max-width: none; }
  .hero-lede { margin-inline: auto; }

  /* A banner is not the home page. Those heights are the opening statement of
     the site; on a phone, in a page banner, two marks that size push the heading
     most of a screen down before a word is read. */
  .hero-brand-compact { gap: .9rem; }
  .hero-brand-compact .hero-logo { height: 92px; }
  .hero-brand-compact .hero-roundel { height: 84px; }
}
.hero-eyebrow {
  font-family: system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .16em; font-size: .8rem; color: #e8e2d4; margin-bottom: 1rem;
}
.hero-title { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3.1rem); margin-bottom: 1rem; }
.hero-lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: #f1ece1; max-width: 36rem; margin: 0 auto 1.75rem; }
/* The single most arresting fact the Society has, given the room it deserves
   instead of sitting in body copy below the fold. */
.hero-stat {
  margin: 0 auto 1.75rem;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}
.hero-stat-figure {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -.01em;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.hero-stat-label {
  /* balance stops the last word orphaning onto a line of its own when the
     label does wrap at narrower widths. */
  text-wrap: balance;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(.72rem, 1.05vw, .82rem);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #e8e2d4;
  line-height: 1.5;
}

.btn-hero {
  background: var(--gold); color: #1a1a1a; border: none; font-weight: 700;
  font-family: system-ui, sans-serif; letter-spacing: .04em; padding: .85rem 2rem;
}
.btn-hero:hover, .btn-hero:focus { background: #c79c46; color: #1a1a1a; }

/* Interior pages get a shorter banner than the home hero: it announces the
   page without pushing the content below the fold. */
.hero-compact { padding: clamp(2.25rem, 6vw, 4.25rem) 0; }

/* Smoke: charcoal to near-black with two soft hazes, for a banner that carries
   the Society's marks instead of a photograph. No image, so nothing to load and
   nothing to go stale.

   MEASURED, not guessed -- the same discipline as the photo scrim above, and the
   same trap to avoid (sampling a screenshot inside a text block reads the
   anti-aliased halo around the glyphs and reports nonsense). Composited in
   Python instead: worst case is both haze layers stacked on the lightest stop of
   the base gradient, giving #434645. Against that:

       white #fff        9.54:1
       .hero-lede        8.10:1
       .hero-eyebrow     7.39:1   <- the binding constraint

   All three clear WCAG AAA (7:1). The eyebrow is the one that binds, which is
   why the base is this dark: at #3c3f3d, an obvious first choice, the eyebrow
   came out at 5.06:1 -- fine for AA, below the standard the rest of this site
   holds. Lighten the base or strengthen the hazes and that figure is what breaks
   first, so re-measure rather than eyeball it. */
.hero-smoke {
  background-color: #0b0c0d;
  background-image:
    radial-gradient(120% 85% at 18% 18%, rgba(255,255,255,.07), rgba(255,255,255,0) 60%),
    radial-gradient(95% 70% at 84% 88%, rgba(255,255,255,.05), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, #2a2d2c 0%, #1b1e1f 45%, #0b0c0d 100%);
}

/* The home hero's lockup at banner scale. The marks are roughly half the height
   they are on the home page: there they ARE the page's opening, here they flank
   one line of heading on a band a third the depth, and at home-page size they
   would dwarf the wording they are meant to frame.

   The shield stays the larger of the two, in the same proportion as the home
   hero -- they are not the same shape and matching their heights makes the
   roundel look oversized. */
.hero-brand-compact {
  /* Far less inset than the home hero's 15%: this band is shorter, so the marks
     sit nearer the text rather than stranded at the container edges. */
  padding-inline: clamp(0rem, 4vw, 3rem);
  gap: clamp(1rem, 4vw, 3rem);
}
.hero-brand-compact .hero-logo { height: clamp(84px, 11vw, 150px); }
.hero-brand-compact .hero-roundel { height: clamp(76px, 9.8vw, 134px); }
/* The lede is centred between two marks here, not running the full width. */
.hero-brand-compact .hero-brand-text { max-width: 44rem; }
.hero-compact .hero-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .75rem; }
.hero-compact .hero-lede { margin: 0 auto; font-size: clamp(1rem, 1.5vw, 1.15rem); }

/* A page with a hero already has its title; its prose starts with an h2, so it
   does not need the large top margin an h1-less page would want. */
.hero + main .prose > h2:first-child { margin-top: 0; }

/* ---- Alternating image / text bands ---------------------------------- */

.band { display: grid; grid-template-columns: 1fr; }
.band-media {
  /* --band-bg fills the letterbox when a band uses --band-size: contain. Set it
     to the image's own ground colour and the fit is invisible. */
  background-color: var(--band-bg, transparent);
  background-image: var(--band-img);
  /* --band-size lets a band zoom past `cover`. Needed when the subject occupies
     one corner of a photograph: at `cover` the crop is whatever the aspect
     mismatch happens to leave, which may not be the part worth showing. */
  background-size: var(--band-size, cover);
  background-position: var(--band-pos, center);
  background-repeat: no-repeat;
  min-height: 15rem;
}
.band-body { background: #fff; display: flex; align-items: center; }
.band-copy { padding: clamp(2rem, 5vw, 4rem); max-width: 34rem; }
.band-eyebrow {
  font-family: system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .14em; font-size: .75rem; color: var(--gold); margin-bottom: .5rem;
}
.band-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .75rem; }
.band + .band { border-top: 1px solid var(--rule); }

@media (min-width: 992px) {
  .band { grid-template-columns: 1fr 1fr; min-height: 26rem; }
  .band-media { min-height: 100%; }
  /* Flip only on wide screens. On phones the image always comes first so the
     reading order stays image-then-text throughout. */
  .band-reverse .band-media { grid-column: 2; grid-row: 1; }
  .band-reverse .band-body { grid-column: 1; grid-row: 1; justify-content: flex-end; }
}

/* A band whose TEXT half goes dark instead of white. Keeps the half-width
   image layout while giving the section the contrast a full-bleed photographic
   band had. Used sparingly — one or two per page, or it stops being emphasis
   and the page simply becomes dark. */

.band-dark .band-body { background: #141a14; }
.band-dark .band-copy h2 {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.band-dark .band-copy p { color: #e9e4d8; font-weight: 600; }
.band-dark .band-eyebrow { color: #d8bf80; }
.band-dark .btn-accent { background: var(--gold); color: #16200f; }
.band-dark .btn-accent:hover, .band-dark .btn-accent:focus { background: #c79c46; color: #16200f; }

.btn-accent {
  background: var(--accent); color: #fff; border: none; font-weight: 600;
  font-family: system-ui, sans-serif; padding: .6rem 1.4rem;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); color: #fff; }

/* ---- Prose ----------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose.mx-auto { margin-inline: auto; }
.prose h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.25rem; margin-bottom: .6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.lede, .lead-statement { font-size: 1.2rem; color: var(--muted); }
.lead-statement { color: var(--ink); }
.note { color: var(--muted); font-size: .95rem; }

/* ---- Explore cards --------------------------------------------------- */

/* Warm paper fill rather than white-on-white, with the border warmed to match.
   A gold rule under each heading ties them to the site's accent without adding
   another box. Kept flat and quiet: six cards with heavy shadows or gradients
   would look like a marketing page, which is not the register of this site. */
.explore-card {
  display: block;
  height: 100%;
  padding: 1.15rem 1.3rem 1.25rem;
  background: #faf8f3;
  border: 1px solid #e2dccf;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s ease, border-color .15s ease,
              box-shadow .15s ease, transform .15s ease;
}
.explore-card:hover, .explore-card:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(20, 83, 45, .10);
  transform: translateY(-2px);
  color: var(--ink);
}
.explore-card strong {
  display: block;
  color: var(--accent);
  margin-bottom: .45rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--gold);
}
.explore-card span {
  font-size: .95rem;
  color: var(--muted);
  /* The contact card holds an email address — one unbroken string with no
     natural break opportunity, which ran past the card's edge. */
  overflow-wrap: anywhere;
}

/* The lift is decorative; honour a reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .explore-card { transition: none; }
  .explore-card:hover, .explore-card:focus { transform: none; }
}

/* ---- Inline figures -------------------------------------------------- */

.inline-figure { margin: 1.75rem 0; max-width: 100%; }
.inline-figure img {
  display: block;
  width: 100%;
  max-width: 28rem;   /* never scaled past its own 445px, so it stays sharp */
  height: auto;
  border-radius: 3px;
  /* Centred in the text column: capped well below the measure, it would
     otherwise sit hard against the left margin. */
  margin-inline: auto;
}
.inline-figure figcaption {
  margin-top: .5rem;
  font-size: .92rem;
  color: var(--muted);
  text-align: center;
}

/* ---- Branch schools -------------------------------------------------- */

/* Each school is a <details> card, closed until asked. Native disclosure
   rather than a scripted accordion: keyboard, screen reader, find-in-page and
   print all work without us, and this site ships no accordion JavaScript.
   What has to be styled is the marker, which is replaced below with a
   rotating caret so the closed and open states read at a glance. */

.branch-cards { margin: 0 0 2rem; }

.branch-card {
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin-bottom: .5rem;
  background: #fff;
}
.branch-card + .branch-card { margin-top: -1px; }   /* one shared rule between cards */
.branch-card[open] {
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.branch-card > summary {
  cursor: pointer;
  padding: .7rem 1rem .7rem 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  align-items: baseline;
  position: relative;
  list-style: none;                 /* Firefox */
}
.branch-card > summary::-webkit-details-marker { display: none; }
/* The caret is drawn rather than a character, so it cannot be read aloud as
   punctuation by a screen reader -- the open/closed state is already announced
   by the element itself. */
.branch-card > summary::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: .45rem; height: .45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.branch-card[open] > summary::before { transform: rotate(45deg); top: 1.1rem; }
.branch-card > summary:hover { background: #f8f6f1; }
.branch-card > summary:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.branch-name { font-weight: 700; color: var(--accent); }
.branch-years { color: var(--muted); font-size: .92rem; }

.branch-code {
  flex: none;
  min-width: 4.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .03em;
}

.branch-card-body { padding: 0 1rem 1rem 2.1rem; }
.branch-blurb { margin-top: 0; }
.branch-sub { font-size: 1rem; margin: 1rem 0 .35rem; }

.branch-facts { margin: 0 0 .5rem; }
.branch-facts dt {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 700;
  margin-top: .6rem;
}
.branch-facts dd { margin: 0; }

.branch-materials { list-style: none; padding: 0; margin: 0; }
.branch-materials li { padding: .35rem 0; border-bottom: 1px solid #ece8e0; }
.branch-materials li:last-child { border-bottom: 0; }
.material-meta, .material-note { display: block; font-size: .88rem; color: var(--muted); }

/* "sign-in needed" is a statement of fact, not a warning: the OCS Database is
   @login_required almost throughout, so saying so beside the link is the
   difference between a gate and an apparently broken link. */
.needs-signin {
  display: inline-block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7a5c14;
  background: #fdf6e3;
  border: 1px solid #e8d9a8;
  border-radius: 2px;
  padding: 0 .35rem;
  white-space: nowrap;
}
.branch-empty { color: var(--muted); margin: 0; }
.branch-actions { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }


/* ---- Events ---------------------------------------------------------- */

.event-list { list-style: none; padding: 0; }
.event-list li { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.event-list .event-when { display: block; color: var(--muted); font-size: .95rem; }
.event-list.past a { color: var(--muted); }
/* Label/value pairs. Named twice because events had it first and the member
   portal needs the same thing: one rule, not two that drift apart. */
.event-detail dt, .detail-list dt { font-weight: 700; margin-top: .75rem; color: var(--accent); }
.event-detail dd, .detail-list dd { margin: 0; }

/* Quiet callout -- paper fill, gold rule down the left. Same reasoning: the
   "this event has passed" notice and the "your alumni status is unconfirmed"
   notice are the same object, so they share one definition. */
.event-past-notice, .callout {
  background: #f6f3ec; border-left: 4px solid var(--gold);
  padding: .75rem 1rem; margin-bottom: 1rem;
}
.button { /* legacy hook kept for event templates */
  display: inline-block; background: var(--accent); color: #fff;
  padding: .6rem 1.3rem; border-radius: 3px; text-decoration: none;
  font-family: system-ui, sans-serif; font-weight: 600;
}
.button:hover, .button:focus { background: var(--accent-dark); color: #fff; }

/* A SECOND button beside a first, for a related place that is not the thing
   somebody came for: "Browse the calendar" next to "Today's remembrance".
   An outline rather than a second solid block, because two identical buttons
   side by side give neither of them a priority. Declared AFTER .button and
   relying on source order, not on a heavier selector -- both are one class, so
   an !important here would only be a note that the order was not understood.
   Inset box-shadow rather than a border, so the two buttons stay the same
   height without a compensating padding value to keep in step. */
.button-quiet {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.button-quiet:hover, .button-quiet:focus { background: var(--accent); color: #fff; }

/* Buttons on one line that wrap on a narrow screen. Same shape as
   .branch-actions; a second name rather than one shared rule because the two
   are in unrelated places and a change wanted in one is rarely wanted in both. */
.remembrance-actions {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
}

/* ---- Footer ---------------------------------------------------------- */

.site-footer { background: #fbfaf7; color: var(--muted); font-size: .95rem; text-align: center; }
.site-footer strong { color: var(--ink); }
/* Cap the 501(c)(3) line to a readable measure so it wraps rather than running
   the full width of a wide screen, then centre the block. */
.site-footer p { max-width: 46rem; margin-inline: auto; }

/* ─────────────────────────────────────────────────────────────────────────
   Sign-in page (templates/account/login.html)

   Two panels: the flag on the left, the form on the right. Below 48rem the
   aside collapses to a short band above the form rather than disappearing —
   on a phone it is the only thing identifying whose sign-in page this is.
   ───────────────────────────────────────────────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 12rem);
}
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  /* Lifted off near-black, exactly as the home hero was: with the flag
     deliberately faint there is nothing else carrying light in this panel, and
     a darker ground read as a flat slab. */
  background-image: linear-gradient(160deg, #35432f 0%, #263120 55%, #2e3a28 100%);
}
.auth-aside-inner { position: relative; z-index: 1; text-align: center; max-width: 26rem; }
.auth-mark { width: 148px; height: auto; margin-bottom: 1.25rem; }
.auth-eyebrow {
  color: #d8d2c4; font-size: .82rem; letter-spacing: .14em;
  text-transform: uppercase; margin: 0;
}
.auth-motto { color: #fff; font-size: 1.75rem; line-height: 1.2; margin: .25rem 0 1rem; }
.auth-blurb { color: #cfd6c6; font-size: .98rem; line-height: 1.65; margin: 0; }

/* The flag. Inherited wholesale from the home hero it was built for — the
   blend is the part that took the work, so it is reproduced rather than
   re-derived. Desaturated and blended INTO the ground, not laid over it:
   soft-light lets its light areas lift the green and its dark areas deepen it,
   so it reads as tonal relief instead of a picture sitting on top. Opacity
   alone only ever produces a faded flag. */
/* The class is still .hero-flag: the partial was built for the home hero and
   the sign-in page is now its only caller. Renamed nothing, so the commit
   history for this artwork stays findable under one name. */
.hero-flag {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: grayscale(1) contrast(.45);
  mix-blend-mode: soft-light;
  opacity: .22;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
/* The wave is an SVG filter, so the cloth ripples rather than sliding. DO NOT
   swap the inline <svg> for an <img>: a browser renders an <img>-loaded SVG as
   a static image and never starts its SMIL animation. That was verified — two
   frames six seconds apart were pixel-identical via <img>, and differ inline. */
.hero-flag .cloth { filter: url(#wave); }
/* Under prefers-reduced-motion the animated filter is swapped for an identical
   static one: it still reads as cloth, but nothing moves. Continuous
   background motion is a vestibular trigger and this membership skews older.
   Do not remove this media query. */
@media (prefers-reduced-motion: reduce) {
  .hero-flag .cloth { filter: url(#wave-still); }
}

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: 100%; max-width: 24rem; }
.auth-title { margin: 0 0 .35rem; font-size: 1.9rem; }
.auth-sub { color: var(--muted); margin: 0 0 1.5rem; font-size: .98rem; }

.auth-field { margin-bottom: 1rem; }
.auth-field label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.auth-field input {
  width: 100%; padding: .6rem .7rem;
  border: 1px solid var(--rule); border-radius: 4px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.auth-field input:focus {
  outline: 3px solid rgba(20, 83, 45, .35);
  outline-offset: 1px;
  border-color: var(--accent);
}
/* The eye beside a password box. Both the wrapper and the button are built by
   password_reveal.js, so these rules can only reach elements that file made.
   They are not scoped to .auth-field: allauth's own screens carry a password
   box too and get the same button, which is the point of building it in the
   script rather than in a template.

   Which eye is drawn comes from aria-pressed, not a class of its own: the
   script sets that one attribute and the state a screen reader announces
   cannot then disagree with the state the icon shows. */
.password-field { position: relative; }
/* Room for the button, so a long password does not run underneath it. */
.password-field input { padding-right: 2.75rem; }
/* Every rule below is scoped under .password-field, which is always the
   button's parent, so it reads as 0,2,0 and beats `.auth-card-allauth button`
   at 0,1,1. Unscoped, the eye on allauth's own screens was repainted as a
   full-width green submit button -- found in a browser, not in the CSS. */
.password-field .password-toggle {
  position: absolute; top: 0; right: 0;
  width: 2.75rem; height: 100%;
  display: flex; align-items: center; justify-content: center;
  /* margin:0 is load-bearing. `.auth-card-allauth button` carries
     margin-top:.25rem for the submit button, and on an absolutely positioned
     element that pushes it 4px below `top:0` -- the eye sat low on allauth's
     own screens until this was measured. */
  margin: 0; padding: 0; border: 0; background: transparent;
  color: var(--muted); cursor: pointer;
}
.password-field .password-toggle:hover { color: var(--ink); }
.password-field .password-toggle:focus-visible {
  outline: 3px solid rgba(20, 83, 45, .35);
  outline-offset: -2px;
  border-radius: 4px;
}
.password-field .pw-icon { width: 20px; height: 20px; display: block; }
.password-field .password-toggle .pw-icon-off,
.password-field .password-toggle[aria-pressed="true"] .pw-icon-on { display: none; }
.password-field .password-toggle[aria-pressed="true"] .pw-icon-off { display: block; }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1.25rem;
}
.auth-check { display: flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--muted); margin: 0; }
.auth-check input { width: auto; }
.auth-link, .auth-foot a { color: var(--accent); }
.auth-submit {
  width: 100%; padding: .7rem 1rem;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent-dark); border-radius: 4px;
  font-family: inherit; font-size: 1rem; cursor: pointer;
}
.auth-submit:hover { background: var(--accent-dark); }
.auth-submit:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.auth-foot { margin: 1.25rem 0 0; font-size: .95rem; color: var(--muted); }

/* ---- the composer ---------------------------------------------------
   One column since 2026-10-23, when the live preview pane beside it went.
   A form that fills a 1600px window gives a line length nobody can read a
   paragraph in. col-lg-8 and a cap: wide enough on a laptop that the page
   does not look half-empty where the preview used to be, and capped on a
   large monitor so a paragraph box stays a readable width. */
.compose-column { max-width: 56rem; }

/* WHAT STILL NEEDS SOMETHING, said on the box itself.

   This replaced the bulleted list of missing fields under the Next button:
   a writer who has just filled a box should not have to scroll to the foot
   of the page to learn whether it counted. The class is put there by the
   SERVER on every render, from `CampaignForm.unfinished`, and kept honest
   between renders by composer.js -- so with no JavaScript the borders are
   still right, they simply stop moving until the next save.

   The border is 2px and the ring is faint: 1px against this site's own
   --rule grey is not a difference anybody notices in a column of ten boxes,
   and a heavy ring on every empty box of a new draft reads as an error
   message rather than as work to do. */
.compose-field.is-unfinished .form-control,
.compose-field.is-unfinished input,
.compose-field.is-unfinished textarea {
  border: 2px solid #b02a37;
  box-shadow: 0 0 0 .15rem rgba(176, 42, 55, .10);
}
/* The focus ring must still win while the box is being typed into, or the
   red outline reads as "this is wrong" about the very keystrokes meant to
   fix it. */
.compose-field.is-unfinished .form-control:focus,
.compose-field.is-unfinished input:focus,
.compose-field.is-unfinished textarea:focus {
  border-color: var(--accent);
  box-shadow: none;
  outline: 3px solid rgba(20, 83, 45, .35);
  outline-offset: 1px;
}


/* ---- the message viewer --------------------------------------------
   `/staff/campaigns/<pk>/preview/`, which is a document of its own and not
   a page of the admin: *"when you click Preview the Message you should just
   be previewing the message. as it stands now, it looks the same as if
   you're on Step3."*

   The dark stage is doing most of the work. On a white admin page the
   message is a panel among panels; on this it is a lit sheet of paper, which
   is the whole difference between reading a message and looking at a page
   about one. Everything else here is in service of that: nothing else on the
   screen, and the sheet casts a shadow so it reads as an object. */
.viewer-body {
  /* How tall the message area is: the window less the bar and the footnote.
     Named once because the frame, the phone view's scaled frame and the
     plain-text pane must agree, and three copies of a calc() is how one of
     them comes to disagree. */
  --stage-height: calc(100vh - 11rem);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #23271f;
  color: #e9e4d8;
  font-family: var(--sans, system-ui, sans-serif);
}

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: .75rem 1.25rem;
  background: #1a1d16;
  border-bottom: 1px solid #343a2c;
}
.viewer-exit {
  color: #e9e4d8;
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
}
.viewer-exit:hover, .viewer-exit:focus { color: #fff; text-decoration: underline; }
.viewer-name {
  font-weight: 600;
  margin-right: auto;
  /* The name may be long and the controls either side must not be pushed off
     a narrow screen; it is the one thing here that can afford to be cut. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewer-kind {
  display: block;
  font-weight: 400;
  font-size: .8rem;
  color: #a9b09c;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.viewer-modes { display: flex; gap: .25rem; }
.viewer-mode {
  color: #cfd6c6;
  text-decoration: none;
  font-size: .9rem;
  padding: .35rem .8rem;
  border: 1px solid #3c432f;
  border-radius: 999px;
}
.viewer-mode:hover { color: #fff; border-color: #5a6447; }
.viewer-mode.is-on { background: var(--accent, #14532d); color: #fff; border-color: var(--accent, #14532d); }
.viewer-mode:focus-visible { outline: 3px solid var(--gold, #c79c46); outline-offset: 2px; }

/* Gold rather than Bootstrap's amber: this is the Society's warning colour,
   and it is the one thing on this screen that must out-read the message. */
.viewer-warning {
  margin: 0;
  padding: .7rem 1.25rem;
  background: #4a3c17;
  color: #f4e6c3;
  font-size: .92rem;
  border-bottom: 1px solid #5f4d1e;
}

.viewer-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem 1.5rem;
}
/* 700, not 600. The message itself is a 600px table inside a full-width band
   of its own grey -- which is what a desktop client shows, the message
   centred on the client's background. A sheet cut to exactly 600 crops that
   band away and makes the preview tighter than the thing it previews. */
.viewer-sheet {
  width: 100%;
  max-width: 700px;
  background: #fff;
  color: var(--ink, #1d1f1a);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .45);
}
/* The honest widths. A phone preview that is merely narrower than the window
   proves nothing; 375px is the width the message is actually read at, and
   the message's own `max-width:100%` makes its 600px table shrink to it. */
.viewer-sheet.is-phone { max-width: 375px; }
.viewer-sheet.is-text { max-width: 720px; }

.viewer-inbox {
  padding: .9rem 1.1rem;
  background: #f4f2ea;
  border-bottom: 1px solid #ddd8cf;
  font-size: .9rem;
}
.viewer-inbox-row { display: flex; gap: .6rem; margin-bottom: .25rem; }
.viewer-inbox-row:last-child { margin-bottom: 0; }
.viewer-label {
  color: #6b705f;
  min-width: 4.2rem;
  flex: none;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
  padding-top: .15rem;
}
.viewer-subject { font-weight: 600; }
.viewer-preheader { color: #6b705f; }

/* THE PHONE VIEW IS SCALED, NOT NARROWED, and that is not a shortcut.

   Measured: given a 375px frame the message still lays out at 600px -- its
   table carries width="600" and cells with fixed padding, so `max-width:100%`
   cannot shrink it below its own minimum. A 375px frame therefore CROPS the
   message, which is the one thing a phone does not do: a phone widens its
   layout viewport and zooms out.

   So the frame is rendered at the width the message really occupies and
   scaled to the width the reader holds. `--phone-scale` is 375/600; the
   frame is made taller by the same factor so that, scaled, it still reaches
   the bottom of the stage. */
.viewer-screen { overflow: hidden; }
.viewer-sheet.is-phone { --phone-scale: .625; }
.viewer-sheet.is-phone .viewer-screen { height: var(--stage-height); }
.viewer-sheet.is-phone .viewer-frame {
  width: 600px;
  height: calc(var(--stage-height) / var(--phone-scale));
  transform: scale(var(--phone-scale));
  transform-origin: top left;
}

/* TALL ENOUGH TO REACH THE BOTTOM OF THE STAGE. The message scrolls inside
   it, which is what a mail client's reading pane does -- and the alternative
   is impossible here rather than merely rejected: growing the frame to its
   content needs the parent to measure it, and the frame is sandboxed without
   `allow-same-origin`, so its document is opaque to this page by design.

   A short frame on a tall screen is what makes a preview read as a widget:
   a small box with its own scrollbar, floating in the middle of nothing. */
.viewer-frame {
  display: block;
  width: 100%;
  height: var(--stage-height);
  border: 0;
  background: #fff;
}
.viewer-text {
  margin: 0;
  padding: 1.25rem;
  white-space: pre-wrap;
  font-size: .85rem;
  line-height: 1.5;
  max-height: var(--stage-height);
  overflow: auto;
}

.viewer-foot {
  padding: .9rem 1.25rem 1.5rem;
  text-align: center;
  color: #a9b09c;
  font-size: .85rem;
}

/* ---- allauth's own markup, inside our card ---------------------------
   templates/allauth/layouts/base.html puts every allauth page in .auth-card, but
   the pages themselves ship plain markup: a bare <h1>, labels wrapped in <p>, an
   unstyled <button>. Rather than write a leaf template for each one just to add
   classes, these rules make that markup inherit the same look as the hand-written
   auth screens.

   This is the SAFETY NET, and the reason it exists rather than only leaf
   overrides: allauth has pages this project has never thought about --
   reauthenticate, email confirmation, sign-up-closed variants, anything a future
   upgrade adds -- and every one of them lands here looking like the site instead
   of like a bug report. Leaf templates are for pages whose WORDING matters; this
   is for the rest.

   Scoped to .auth-card-allauth so it cannot reach the hand-written screens, whose
   markup already carries the real classes. */
.auth-card-allauth h1 { margin: 0 0 .35rem; font-size: 1.9rem; }
.auth-card-allauth h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; }
.auth-card-allauth > p { color: var(--muted); margin: 0 0 1.25rem; font-size: .98rem; }
.auth-card-allauth form p { margin-bottom: 1rem; }
.auth-card-allauth label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.auth-card-allauth input[type="text"],
.auth-card-allauth input[type="email"],
.auth-card-allauth input[type="password"] {
  width: 100%; padding: .6rem .7rem;
  border: 1px solid var(--rule); border-radius: 4px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.auth-card-allauth input:focus {
  outline: 3px solid rgba(20, 83, 45, .35);
  outline-offset: 1px;
  border-color: var(--accent);
}
/* A checkbox must not stretch to the full width of the card. */
.auth-card-allauth input[type="checkbox"],
.auth-card-allauth input[type="radio"] { width: auto; }
.auth-card-allauth button,
.auth-card-allauth input[type="submit"] {
  width: 100%; padding: .7rem 1rem; margin-top: .25rem;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent-dark); border-radius: 4px;
  font-family: inherit; font-size: 1rem; cursor: pointer;
}
.auth-card-allauth button:hover,
.auth-card-allauth input[type="submit"]:hover { background: var(--accent-dark); }
.auth-card-allauth button:focus-visible,
.auth-card-allauth input[type="submit"]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
/* Secondary buttons -- allauth marks destructive or lesser actions this way. */
.auth-card-allauth button[type="submit"][name^="action_remove"],
.auth-card-allauth button.secondaryAction {
  background: #fff; color: var(--accent); border-color: var(--rule);
}
.auth-card-allauth a { color: var(--accent); }
/* Field errors, which allauth renders as a bare <ul class="errorlist">. */
.auth-card-allauth .errorlist {
  list-style: none; padding: .6rem .8rem; margin: 0 0 1rem;
  border-left: 4px solid #8a1c1c; background: #fdf3f3;
  color: #6b1414; font-size: .95rem;
}
/* Email-management lists the addresses on the account. */
.auth-card-allauth form ul:not(.errorlist) { list-style: none; padding: 0; }
.auth-card-allauth form ul:not(.errorlist) > li { margin-bottom: .5rem; }
/* The card is wider here than the hand-written screens: some of these pages carry
   two forms and a list of addresses, which 24rem crushes. */
.auth-card-allauth { max-width: 30rem; }

/* Cloudflare's widget is a fixed-size box of its own; it only needs room around
   it, and to be allowed to shrink on a narrow phone rather than overflow the card. */
.turnstile-field { margin: 0 0 1rem; max-width: 100%; overflow: hidden; }

.auth-alert {
  border: 1px solid #b44; border-left-width: 4px;
  background: #fdf5f5; color: #7a2020;
  padding: .7rem .8rem; border-radius: 4px; margin-bottom: 1.25rem; font-size: .95rem;
}

@media (max-width: 48rem) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { padding: 2rem 1.5rem; min-height: 13rem; }
  .auth-mark { width: 96px; margin-bottom: .75rem; }
  .auth-motto { font-size: 1.4rem; }
  .auth-blurb { display: none; }   /* the mark and the name are what matter here */
  .auth-panel { padding: 2rem 1.25rem 3rem; }
}

/* ---- Member portal --------------------------------------------------- */

/* The portal is a short page: a notice, some details, and what to do next. It
   needs spacing rules, not a look of its own -- it uses .callout, .detail-list
   and .button like the rest of the site.

   The actions sit in a flex row with a wrap, so two buttons sit side by side on
   a desktop and stack on a phone without either stretching to full width. */
.member-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e7e2d6;
}
/* Sign out is deliberately a link, not a second button: it is the one action on
   this page nobody comes here to do, and two buttons of equal weight would make
   leaving look as inviting as searching the record. */
.member-actions .signout { font-family: system-ui, sans-serif; font-size: .95rem; }

/* Empty-state line, for an account with no OCS details recorded yet. Muted and
   in prose, because three rows reading "--" look like a page that failed to
   load rather than a profile nobody has filled in. */
.member-empty { color: var(--muted); }

/* ---------------------------------------------------------------- staff area
   The staff section and the campaign parts strip use Bootstrap's nav-pills,
   whose active state is Bootstrap blue -- a colour that appears nowhere else
   on this site. These two rules put it back on the Society's green. Scoped to
   nav-pills so nothing on a public page moves. */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--accent);
}

.nav-pills .nav-link {
  color: var(--accent);
}

/* The numbers in the parts strip are a label, not a heading: quieter than the
   word they number, and quieter still when the part is the current one. */
.campaign-parts { list-style: none; padding-left: 0; }
.campaign-parts .nav-link.active .text-muted { color: rgba(255, 255, 255, .7) !important; }

/* ------------------------------------------------------- the three steps
   The Newsletter page is three boxes, and they have to READ as three boxes:
   "step 1, step 2, step 3", not three paragraphs that happen to sit in a row.
   A 1px hairline round each was not enough to say that -- on a wide screen
   they ran together as one band of text.

   So: a muted gradient away from the page's own warm white, a solid rule in
   the Society's green along the top of each, and the step number set large
   enough to be read as a label rather than as small print. The gradient is
   deliberately shallow -- it defines the box without tinting the words inside
   it, which on a serif face at this size starts to look like a highlight. */
.step-card,
.decision-card {
  border: 1px solid var(--rule);
  border-top: 5px solid var(--accent);
  border-radius: .5rem;
  background: linear-gradient(180deg, #f1efe7 0%, #fbfaf7 45%, #fff 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

/* ------------------------------------------------- a decision on a screen
   One definition, two names. A `.decision-card` is the same box as a step
   card and for the same reason -- "these are two separate things to decide",
   not two paragraphs that happen to sit one above the other. The name differs
   because it is NOT one of the three numbered steps: the Recipients screen
   holds two decisions inside step 3, and calling them steps would make a
   nonsense of the strip at the top of the page.

   The lesson above is the whole reason this exists. Those two panels were a
   1px hairline each, and on a wide screen they read as one undifferentiated
   band of controls -- which is exactly what the step cards were changed away
   from, in this same file, for this same reason. */
.decision-title,
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

/* ------------------------------------------------- the send's progress bar
   A striped, animated bar means "this is happening". It was left striped when
   the send FINISHED -- Bootstrap's animation was removed and the stripes were
   not -- so a bar at 100% went on looking like a bar in motion, and the only
   thing saying otherwise was a sentence underneath it.

   So a settled bar is SOLID, and its colour says which ending it was: green
   for everybody sent, gold for a send that stopped with people still to go
   (a refusal, a dropped connection, or failures among the sent). Bootstrap's
   own `bg-success` green is off this site's palette -- the same reason the
   nav-pills rules above exist -- so these use the Society's own.

   The bar IN MOTION is deliberately left as Bootstrap's blue. The change of
   hue is doing the work: motion and blue means "happening", solid green means
   "done". Greening both would leave striped-against-solid as the only
   difference, which is the distinction that was too quiet in the first place.

   `settle()` in sender.js is the only thing that adds either class, which is
   what keeps the finish, the refusal and the dropped connection from drifting
   apart. */
.progress-bar.progress-complete {
  background-color: var(--accent);
}

.progress-bar.progress-partial {
  background-color: var(--gold);
  color: #1a1a1a;
}

/* ----------------------------------------------------- bands on a report
   The campaign report is six sections of headings, prose and wide tables, and
   it ran together as one column of text: an <h2> with `mt-4` is not a section
   break, and a table butting up against the next heading belongs to neither.

   A box round each would fight the tables -- a bordered card holding a
   bordered table is two frames for one thing. So a report section is a RULE
   and air: a hairline across the full width, generous space above it, and the
   heading in the same uppercase green the decision cards use, so the staff
   area reads as one system rather than two.

   The first section has no rule: it sits directly under the steps strip,
   which is already a horizontal band, and two rules an inch apart read as a
   mistake. */
.report-section {
  border-top: 1px solid var(--rule);
  margin-top: 2.25rem;
  padding-top: 1.5rem;
}

/* The band that LEADS a page carries no rule: it sits directly under the
   steps strip or the page heading, which is already a horizontal band, and
   two rules an inch apart read as a mistake.

   Asked for by name rather than by `:first-of-type`. Positional was wrong the
   moment a page wanted a single band in the MIDDLE of it -- the campaign
   steps page, where the numbers follow three cards and the rule is the whole
   point of the band being there. A template now says which case it is. */
.report-section--first {
  border-top: 0;
  margin-top: 1rem;
  padding-top: 0;
}

/* A table is the content of its section, so the air belongs between sections
   and not inside them -- Bootstrap's own 1rem bottom margin on the last table
   would otherwise sit on top of the next rule's 1.5rem and read as a drift. */
.report-section > :last-child {
  margin-bottom: 0;
}

/* The divider between "read it as a recipient" and "send it to everybody".
   They are one card because they are one act in two moves, and the rule is
   what keeps the second from reading as a footnote to the first. */
.decision-card .decision-split {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

/* The number is the point of the card, so it is a heading's size and the
   Society's green -- not the grey 12px all-caps it was, which is the size
   this site uses for things it is apologising for. Asked for larger twice;
   it is now the largest thing on the card, above its own title, because
   "which step am I on" is the question the page exists to answer. */
.step-card .step-number {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .15rem;
}

.step-card .step-title {
  font-size: 1.3rem;
  line-height: 1.25;
  margin-bottom: .6rem;
}

/* The action at the foot of a step card. `mt-auto` on the block does the
   pushing; this adds the air above it, so a button never sits tight against
   the sentence that happens to end the card's body. */
.step-card .step-action { padding-top: 1rem; }

/* ------------------------------------------------- done, current, not yet
   Three cards with three identical green buttons is a MENU, and a menu asks
   a question the last click already answered: somebody who has just picked a
   template does not want to be asked whether they would like to pick one.

   So the states are drawn differently. CURRENT keeps the full card and gets
   a deeper rule and a full-size button -- it is the one thing to do next.
   DONE keeps its colour (it is finished, not unavailable) but flattens, and
   its button drops to a quiet outline, because going back to look is allowed
   and should not compete with going on. LOCKED greys entirely, below. */
.step-card--current {
  border-top-width: 7px;
  box-shadow: 0 2px 10px rgba(20, 83, 45, .13);
}

.step-card--done {
  background: #fff;
  box-shadow: none;
}

/* "done" beside the step number, and the tick beside the template's name.
   Small caps rather than a badge: a badge in the Society's green next to a
   heading in the Society's green is two greens arguing. */
.step-card .step-done {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: none;
  margin-left: .35rem;
}

/* What step 1 decided, said at the top of the card rather than buried in a
   sentence: at a glance, the answer is the thing wanted from a settled step. */
.step-card .step-chosen {
  font-size: 1.05rem;
  margin-bottom: .4rem;
}

.step-card .step-check {
  color: var(--accent);
  font-weight: 700;
  margin-right: .2rem;
}

/* A step that is not this person's turn yet.
   Greyed as a WHOLE card, not just its button: a fully-coloured card with one
   dead button in it reads as a card that works and a button that is broken.
   The green rule along the top goes to the page's own hairline, the gradient
   flattens, and the words drop to the muted grey -- still well above the
   contrast floor, because this membership skews older and "unavailable" must
   not mean "unreadable". */
.step-card--locked {
  border-top-color: var(--rule);
  background: #f4f2ec;
  box-shadow: none;
}

.step-card--locked .step-number,
.step-card--locked .step-title {
  color: var(--muted);
}

/* The locked card keeps its flat grey even though it is also "not done". */
.step-card--locked { background: #f4f2ec; }

/* The dead button inside a locked card goes grey with it. Bootstrap renders a
   disabled .btn-success as faded GREEN, which left the brightest thing on a
   greyed-out card being the one control that does nothing -- the eye goes
   straight to it. Grey says "later" without having to be read. */
.step-card--locked .btn-success:disabled,
.step-card--locked .btn-success.disabled {
  background-color: #c9c4b6;
  border-color: #c9c4b6;
  color: #fff;
  opacity: 1;
}

/* -------------------------------------------------- the composer's panels
   The writing form is three different jobs in one column: what the reader
   sees in their INBOX, the message ITSELF, and internal bookkeeping. It used
   to say so with two small grey captions, and a caption is not a container --
   scrolling past "The message itself" tells you nothing about whether you are
   still inside it forty boxes later.

   Same language as the three step cards on purpose: a green rule along the
   top, a shallow gradient in the head, a hairline round the rest. A box you
   can see the edges of is a box you can tell you are inside. */
.compose-group {
  border: 1px solid var(--rule);
  border-top: 5px solid var(--accent);
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.compose-group .compose-head {
  background: linear-gradient(180deg, #f1efe7 0%, #fbfaf7 100%);
  border-bottom: 1px solid var(--rule);
  border-radius: .45rem .45rem 0 0;
  padding: .75rem 1rem;
}

.compose-group .compose-title {
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--accent);
  margin: 0 0 .15rem;
}

.compose-group .compose-note {
  font-size: .875rem;
  color: var(--muted);
}

.compose-group .compose-body { padding: 1rem; }

/* The caption over the run of sections. Smaller than a panel head and larger
   than a field label, because it governs several boxes but not the panel. */
.compose-sub {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1.25rem 0 .25rem;
}

/* One section slot. Tinted away from the panel's white so that a section
   reads as a part of the message rather than as four more fields, and
   indented with a rule on the left so the run of them is visible as a run. */
.section-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: .375rem;
  background: #fbfaf7;
}

.section-card .section-legend {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* The way to a second section, kept WITH the sections. It used to sit below
   the closing paragraph in the site's quietest grey, which is how somebody
   writes an issue believing there is only ever a Section 1. */
.sections-foot {
  border-top: 1px dashed var(--rule);
  padding-top: .75rem;
}

/* The caret that rolls a campaign's messages up on the campaigns table.

   NOTHING HERE HIDES ANYTHING. The rows are hidden by rollup.js on start and
   only ever through the `hidden` attribute, so a page with no JavaScript is
   the full table it has always been. A `display: none` rule in this file
   would apply whether or not that script loaded, which turns a failed script
   into a table with half its contents unreachable. Same arrangement, and same
   reason, as the reveal panels on the Recipients screen. */
.rollup-caret {
  background: none;
  border: 0;
  padding: 0 .35rem 0 0;
  line-height: 1;
  color: var(--ink-soft, #6c757d);
}
.rollup-caret:hover,
.rollup-caret:focus-visible {
  color: var(--accent);
}
.rollup-chevron {
  display: inline-block;
  /* Points right while the campaign is rolled up, down while it is open. The
     glyph itself is the down-pointing one, so closed is the rotated state. */
  transform: rotate(-90deg);
  transition: transform .12s ease-in-out;
}
.rollup-caret.is-open .rollup-chevron {
  transform: rotate(0deg);
}

/* A number that has just changed under the reader's eye.
   -------------------------------------------------------------------------
   The report page refreshes its figures in place while a campaign drains, and
   a number that silently swaps from 225 to 240 is a change nobody sees. This
   is the smallest possible "that moved": a brief tint, no motion, gone in two
   seconds.

   `prefers-reduced-motion` is honoured by having no motion to reduce -- a
   colour fade is not vestibular -- but the transition is still dropped for
   anybody who asked for less, because they asked. */
.just-changed {
  background-color: rgba(255, 213, 79, 0.45);
  border-radius: 0.2rem;
  transition: background-color 1.5s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .just-changed { transition: none; }
}

/* "Is it going, and is it going well" -- the band above the report figures.
   -------------------------------------------------------------------------
   Colour carries the verdict, and a border rather than a filled panel: a
   solid red or green block over a page of figures reads as an alert about the
   whole page. The left edge is the signal, the text is the detail.

   NOT COLOUR ALONE. `progress()` writes the verdict in words inside this box
   -- "Healthy: 0 complaints, 7 bounces (2.5%)" -- so a reader who cannot
   distinguish the border still gets the judgement. Colour is the glance; the
   sentence is the answer. */
.send-health {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-left: 4px solid #6c757d;
  border-radius: 0.375rem;
  padding: 0.85rem 1rem;
}
.send-health[data-health="good"]  { border-left-color: #198754; }
.send-health[data-health="watch"] { border-left-color: #fd7e14; }
.send-health[data-health="bad"]   { border-left-color: #dc3545; }

/* A send in flight gets a live edge, so "running" and "waiting for the next
   wave" are distinguishable without reading the sentence. */
.send-health[data-phase="running"] { border-left-color: #0d6efd; }
.send-health[data-phase="finished"] { border-left-style: double; }

/* A folded report section.
   -------------------------------------------------------------------------
   "Who it went to" is seven hundred rows and "Events" is sixty, on a page
   somebody opens to read six numbers. Both are the browser's own <details>
   rather than a script: no JavaScript to fail, and find-in-page opens a
   closed fold to reach a match inside it -- which is the whole point on a
   list whose purpose is "did Mr Deason get it".

   The marker is kept and the summary styled as a heading, so a shut fold
   still reads as the section it is. */
.report-fold > summary {
  cursor: pointer;
  list-style-position: outside;
}
.report-fold > summary .section-title {
  /* An <h2>, inlined. It stays a heading for the document outline -- a
     screen reader's heading list is how a page of six sections is navigated
     -- and `display:inline` lets the count sit beside it. */
  display: inline;
  margin: 0;
}
.report-fold > summary:hover .section-title {
  text-decoration: underline;
}
.report-fold[open] > summary {
  margin-bottom: 0.5rem;
}
