/* The Prosperitas portal's shared stylesheet (brief Part 2, Phase 3 slice 1).
 *
 * Colours, spacing and type are the approved mockup's (Gabay-Projects
 * 03-ReserveYourSuccess/prosperitas-mockup, approved 1 October 2026), named
 * once below as tokens so a later screen uses --navy rather than retyping
 * #0E2240 and drifting. The mockup wins on look and layout; the brief on
 * behaviour and rules: body text 17px (at least 16, for a 55 to 70 audience),
 * tap targets at least 44px, gold never used for text on white, and at phone
 * width 16px side margins with nothing scrolling sideways.
 *
 * ONLY THE TOKENS AND THE SHARED PIECES LIVE HERE: the shell, and what ui.js,
 * parts.js and rep.js draw. A screen's own styles are in a file beside it
 * (screens/home.css, screens/campaign/registrants.css), added by the page when
 * the screen says `styles = true` (web/portal/extend.js), so slices built in
 * parallel never append to the same file (review of 1 October 2026).
 *
 * The fonts are files on this site, web/fonts/ (scripts/copy-fonts.mjs): the
 * site's policy allows fonts from itself only, so Google's would be refused.
 */

@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/source-serif-4-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Brand. Navy is the main colour, gold the accent (brief 2.16). */
  --navy: #0E2240;
  --navy-hover: #16315A;
  --gold: #C8A24A;
  --gold-soft: rgba(200, 162, 74, 0.18);   /* the current menu item */
  --gold-ring: rgba(200, 162, 74, 0.55);   /* the current step's ring */

  /* Page and text. */
  --page: #F4F6FA;
  --surface: #FFFFFF;
  --text: #1B2333;
  --muted: #4F596B;                        /* 7:1 on white; the quiet text */
  --line: #E3E7EF;                         /* card edges */
  --line-soft: #EEF1F6;                    /* rows inside a card */
  --fill: #E8ECF4;                         /* initials, done steps, notices */
  --fill-soft: #F1F4FA;                    /* hover, the chosen option */
  --head-fill: #F8F9FC;                    /* table header */
  --confirm-fill: #EEF2F8;
  --track: #E3E7EF;                        /* empty part of a bar */
  --outline: #9AA7BD;                      /* later steps, grey dots */
  --field-edge: #6B7588;
  --control-edge: #C9D0DC;
  --focus: #3D6BC4;

  /* The menu, on navy. */
  --menu-text: #D6DDEA;
  --menu-quiet: #B9C3D6;
  --menu-rule: rgba(255, 255, 255, 0.14);
  --menu-edge: rgba(255, 255, 255, 0.35);

  /* Only Approve and Request changes are green and red (brief 2.1). */
  --approve: #1E7B45;
  --changes: #B42318;
  --error: #B42318;
  --ok-fill: #E7F4EC; --ok-edge: #BFE0CB; --ok-text: #17603A;
  --warn-fill: #FFF4E0; --warn-edge: #E9B96A; --warn-text: #7A4A00;
  --asked: #8A4B00;                        /* "Cancellation requested" and the like */
  /* The mockup's note about a request to cancel (Event, the drawer's "You
     asked to cancel this booking"), paler than the warning above. */
  --asked-fill: #FFF6DB; --asked-edge: #EBD9A6; --asked-text: #5C4300;
  --scrim: rgba(14, 34, 64, 0.45);

  /* Type. */
  --font-text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --size-body: 17px;
  --size-small: 15px;                      /* labels under big numbers, never less */
  --size-h1: 40px;
  --size-h2: 22px;

  /* Shape. */
  --radius-card: 16px;
  --radius-control: 10px;
  --radius-tile: 14px;
  --shadow-lift: 0 12px 32px rgba(14, 34, 64, 0.12);
  --menu-width: 256px;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--navy); margin: 0; }
h1 { font-family: var(--font-head); font-weight: 700; font-size: var(--size-h1); line-height: 1.1; }
/* 1.5, as the mockup's h2s inherit it from the body: at 1.3 every card head
   came out 4 pixels shorter than the mockup's (65 against 69; review of the
   Part 2 foundations, 1 October 2026). */
h2 { font-size: var(--size-h2); line-height: 1.5; }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0; }
h1:focus, h2:focus, main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
/* An element hidden by its attribute stays hidden whatever its class says:
   .flow-saved's inline-flex kept the empty "Saved as a draft" note in the
   flow's footer with its gap, which pushed Next under Back at 390 (review of
   the Part 2 foundations, 1 October 2026). */
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.booting { padding: 40px 16px; text-align: center; color: var(--muted); }
/* A link, Back or the redirect waiting, at most three seconds, for whether a
   release has gone live (router.js decided, release.js; the review of 27
   October 2026): the progress cursor everywhere, so the click is seen to
   have taken. The body is aria-busy meanwhile. */
html body[data-moving], html body[data-moving] * { cursor: progress; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--surface); padding: 10px 16px; border-radius: var(--radius-control); font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--menu-width) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--navy); color: #FFFFFF;
  display: flex; flex-direction: column;
}
.side-top { position: relative; }
/* The menu-header panel Joshua approved (brief 2.16): the menu's full width,
   top-aligned, its natural height (about 170 at 256 wide), as a background
   behind the logo, which sits centred on it at 200 wide, exactly as the
   mockup's Main screen draws it. shell.js sets the picture from images.js
   (ui.backdrop); this says where it sits. The link carries the name. */
.menu-head {
  display: block; padding: 34px 28px 22px;
  background-color: var(--navy); background-position: center top; background-size: 100% auto; background-repeat: no-repeat;
}
.menu-logo-img { display: block; width: 200px; height: auto; margin: 0 auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.menu-toggle { display: none; }
/* 28 between the panel and the first item, as the mockup's aside gap (its Home item starts at 185). */
.side-menu { display: flex; flex-direction: column; flex: 1; gap: 28px; padding: 28px 18px 24px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap);
  padding: 12px 14px; border-radius: var(--radius-control);
  color: var(--menu-text); text-decoration: none;
}
.nav-item:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.nav-item[aria-current="page"] { background: var(--gold-soft); color: #FFFFFF; font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
.nav-pic { width: 26px; height: 26px; flex: none; display: block; }
.nav-item:focus-visible, .menu-toggle:focus-visible, .side-foot :focus-visible { outline-color: var(--gold); }
.side-foot { margin-top: auto; border-top: 1px solid var(--menu-rule); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.foot-label { font-size: var(--size-small); color: var(--menu-quiet); }
.foot-name { font-weight: 700; }
.btn.btn-on-navy { background: transparent; color: #FFFFFF; border: 1px solid var(--menu-edge); font-size: var(--size-small); min-height: var(--tap); width: 100%; }
.btn.btn-on-navy:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.signout-link { align-self: flex-start; background: none; border: none; padding: 6px 0; min-height: var(--tap); color: var(--menu-quiet); font-size: var(--size-small); text-align: left; }
.signout-link:hover { color: #FFFFFF; text-decoration: underline; }

.main { min-width: 0; padding: 36px 40px 56px; }
/* A member of staff viewing as a client (shell.js; brief 2.3): the banner
   above every screen for as long as the view lasts, with Stop viewing. */
.main-col { min-width: 0; display: flex; flex-direction: column; }
.viewing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 12px 40px; background: var(--warn-fill); border-bottom: 1px solid var(--warn-edge); color: var(--warn-text); }
.viewing p { flex: 1 1 320px; margin: 0; }
.viewing .btn { flex: none; }
/* The practice client (shell.js; N24): "Practice data" in navy on the pale fill,
   at 16px or more, full width, above the screen under any viewing banner. */
.practice-band { padding: 10px 40px; background: var(--fill); border-bottom: 1px solid var(--line); color: var(--navy); font-size: 16px; font-weight: 700; }
.page { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.page-sections { display: flex; flex-direction: column; gap: 28px; }

/* ---------------------------------------------------------------- page parts */
.page-head { display: flex; flex-direction: column; gap: 14px; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-title-art { display: flex; align-items: center; gap: 18px; min-width: 0; }
/* The flow's picture (brief 2.16: "at the top of each step-by-step flow,
   above the step bubbles"), at 64 rather than its delivered 96: the mockup's
   NewCampaign has none there, and at 96 it pushed the title 114 to the right
   and the bubbles 21 down from where the mockup has them. At 64 it is no
   taller than the title and the line under it, so the bubbles stay put; the
   -2x file keeps it sharp (review of the Part 2 foundations, 1 October 2026). */
.flow-art { width: 64px; height: 64px; flex: none; }

/* Tabs (ui.tabBar): a campaign's, My account's. Each one a link. */
.tabs { border-bottom: 1px solid var(--line); }
.tab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.tab { display: inline-flex; align-items: center; min-height: var(--tap); padding: 10px 16px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; }
.tab:hover { color: var(--navy); }
.tab[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.page-sub { font-size: 18px; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 700; text-decoration: none; align-self: flex-start; }
.back-link:hover { text-decoration: underline; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
/* A card's heading and what sits beside it share a line while they fit, and
   the aside takes the next line, still at the right, when they do not. Until
   4 October 2026 they never wrapped, so at 375 the staff client page's
   Advisors card ("2 active" and Add an advisor) ran past its card, and the
   card, which clips, could be scrolled so that the "A" of "Advisors" was cut
   off instead (the Tester's pass 1, item 13). */
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
/* A card with a body and no rows has no rule under its heading: the mockup's
   "All campaigns so far" and "at a glance" (padding 22 24, gap 16). A card of
   rows keeps it ("Needs you", "Your next events"). */
.card-plain .card-head { border-bottom: none; padding-top: 22px; padding-bottom: 0; }
.card-plain .card-head + .card-body { padding-top: 16px; }
.card-aside { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.card-aside a { font-weight: 700; text-decoration: none; }
.card-aside a:hover { text-decoration: underline; }
.card-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.card-row { padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.card-row:last-child { border-bottom: none; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-gold { background: var(--gold); }
.dot-navy { background: var(--navy); }
.dot-grey { background: var(--outline); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 99px; background: var(--line-soft); color: var(--navy); font-size: 16px; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; }

/* The big numbers: Seats booked, Seats left, Wait list (brief 2.1). */
.figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figure-n { font-weight: 700; color: var(--navy); line-height: 1.2; }
.figure-large .figure-n { font-size: 30px; }
.figure-medium .figure-n { font-size: 26px; }
.figure-small .figure-n { font-size: 24px; }
.figure-of { font-size: 18px; font-weight: 400; color: var(--muted); }
.figure-l { color: var(--muted); font-size: var(--size-small); }
/* "+ 3 extra" under a date's seats (Overbook, ui.figure). */
.figure-extra { color: var(--muted); font-size: var(--size-small); font-weight: 700; }
.bar { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar-fill { height: 6px; background: var(--navy); }
/* The extra seats past a date's seats (Overbook): the end of the bar, marked
   in gold, which the booked seats fill into. */
.bar-has-extra { position: relative; }
.bar-extra { position: absolute; top: 0; right: 0; bottom: 0; border-left: 2px solid var(--surface); background: var(--gold-soft); }
.bar-has-extra .bar-fill { position: relative; z-index: 1; }

.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: var(--radius-tile); background: var(--navy); color: #FFFFFF; font-size: var(--size-small); line-height: 1.25; }
.date-tile strong { font-size: 30px; line-height: 1; }

/* An empty list (ui.emptyState): the picture centred at its delivered 480
   wide, narrower where the card is, above a short heading and one line; its
   -2x file is for sharp screens. Until the review of 1 October 2026 it was
   drawn at 240, so a sharp screen fetched the 960 file to fill 240 and the
   mailbox read as tiny inside its own 480 frame. */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 24px; }
.empty picture { display: block; line-height: 0; width: 100%; max-width: 480px; }
.empty-art { display: block; width: 100%; max-width: 480px; height: auto; }
.empty p { color: var(--muted); max-width: 36em; }

.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--fill); color: var(--navy); }
.notice .icon { flex: none; margin-top: 2px; }
.notice > div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.notice-title { display: block; }
.notice-ok { background: var(--ok-fill); border-color: var(--ok-edge); color: var(--ok-text); }
.notice-warn { background: var(--warn-fill); border-color: var(--warn-edge); color: var(--warn-text); }
/* A campaign's seats in all (campaign-kit.js seatTotalLines; 8 October 2026):
   how the dates share the total, and the amber line when they do not add up. */
.seat-total { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.seat-warn { margin: 0; padding: 10px 14px; gap: 10px; }
.loading { color: var(--muted); padding: 24px 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-control);
  font-weight: 700; text-decoration: none; border: 1.5px solid var(--navy);
  white-space: nowrap;
}
.btn-small { min-height: var(--tap); padding: 0 18px; }
.btn-primary { background: var(--navy); color: #FFFFFF; }
.btn-primary:hover { background: var(--navy-hover); color: #FFFFFF; }
.btn-secondary { background: var(--surface); color: var(--navy); }
.btn-secondary:hover { background: var(--fill-soft); color: var(--navy); }
.btn-approve { background: var(--approve); border-color: var(--approve); color: #FFFFFF; }
.btn-changes { background: var(--changes); border-color: var(--changes); color: #FFFFFF; }
.btn-link { background: none; border: none; padding: 0 8px; min-height: var(--tap); text-decoration: underline; text-underline-offset: 3px; color: var(--navy); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.icon { flex: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: var(--radius-control); border: 1.5px solid var(--control-edge); background: var(--surface); color: var(--navy); padding: 0; }

/* ---------------------------------------------------------------- forms */
.field-wrap { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 700; }
.field {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--field-edge); border-radius: var(--radius-control);
  background: var(--surface); color: var(--text); font-size: 18px;
}
.field:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold); }
.field[aria-invalid="true"] { border-color: var(--error); }
.field-area { min-height: 140px; resize: vertical; line-height: 1.5; }
.field-help { color: var(--muted); }
.field-error { color: var(--error); font-weight: 700; }
/* Under an email box, when its domain cannot receive mail (address-check.js;
   the email audit of 16 October 2026). A warning, never an error: it stops
   nothing. Empty, it takes no room. */
.field-warn { color: var(--warn-text); font-weight: 700; }
.field-warn:empty { display: none; }
/* A required field's star after its label, and the line at the top of the
   form that says what it means (ui.js needs(); Joshua's staging feedback of
   2 October 2026, item 3). The star is the error colour, 6:1 on white. */
.req-star { color: var(--error); font-weight: 700; }
.req-note { margin: 0; color: var(--muted); }
/* The line's own *, in the labels' red (review of 2 October 2026). */
.req-note-star { color: var(--error); font-weight: 700; }
.pw-wrap { position: relative; }
.field-pw { padding-right: 84px; }
.pw-toggle { position: absolute; top: 5px; right: 6px; min-height: var(--tap); padding: 0 8px; background: none; border: none; color: var(--navy); font-weight: 700; }
/* The number picker (ui.numberPicker, 2 October 2026): the box between a
   minus and a plus, each as tall as the box and wide enough to hit. The
   browser's own small arrows are hidden, since the two buttons do their job. */
.num-pick { display: flex; align-items: stretch; gap: 8px; width: 100%; max-width: 232px; }
.num-pick .num-pick-box { flex: 1; min-width: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.num-pick .num-pick-box::-webkit-outer-spin-button,
.num-pick .num-pick-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-pick-btn {
  flex: none; width: 52px; min-height: 48px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--control-edge); border-radius: var(--radius-control);
  background: var(--surface); color: var(--navy); cursor: pointer;
}
.num-pick-btn:hover { background: var(--fill-soft); }
.num-pick-btn:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold); }
.num-pick-btn[disabled] { opacity: 0.45; cursor: default; background: var(--surface); }
/* What a picker has beside it on its line (8 October 2026): "of 60" beside
   "Seats for this date", "Split evenly" beside "Total seats for this campaign". */
.num-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.num-pick-row > .num-pick { width: auto; flex: 0 1 232px; }
.num-pick-of { font-weight: 700; color: var(--navy); white-space: nowrap; }
/* Overbook and its extra seats (ui.overbookLine): Yes or No, then the box. */
.ob-line { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; }
.ob-line > .field-wrap { flex: 0 1 auto; }
.ob-segs { display: flex; gap: 8px; }
.ob-seg { min-height: var(--tap); min-width: 64px; padding: 0 18px; border-radius: var(--radius-control); border: 1.5px solid var(--field-edge); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.ob-seg:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold); }
.ob-seg-on, .ob-seg-on:hover { background: var(--navy); border-color: var(--navy); color: #FFFFFF; font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--head-fill); text-align: left; font-weight: 700; font-size: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 24px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table .num { text-align: right; }
.table tr:last-child td { border-bottom: none; }
/* Every table's own box (ui.js tableBox): a table wider than its card scrolls
   sideways inside it, and the page never does. Until 4 October 2026 the card's
   overflow hidden cut the last columns off at 768 and about 700, with no way
   to reach them (the Tester's pass 1, item 9: Registrants lost "Came", the
   owner's Reports lost Cost, Per attendee and Margin). On a phone the table
   stacks (below), so there is nothing to scroll. The ring is drawn inside the
   box, since the card would clip one outside it. */
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 10px; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 12px; background: var(--navy); color: #FFFFFF; box-shadow: var(--shadow-lift); }

/* ---------------------------------------------------------------- confirm, padlock, dialog */
.confirm { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border-radius: 12px; border: 1.5px solid var(--navy); background: var(--confirm-fill); }
.confirm-say { display: flex; align-items: flex-start; gap: 12px; color: var(--navy); }
.confirm-say h3 { margin: 0; }
.confirm-say p { margin-top: 4px; color: var(--text); }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* A printed, locked value (ui.padlock, N6): a field's label and box, the box
   greyed with the padlock inside it at the right where a typed value would
   end, and "Ask your rep to change this" under it as a link. */
.locked { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.locked-label { font-weight: 700; }
.locked-box {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--control-edge); border-radius: var(--radius-control);
  background: var(--fill-soft); color: var(--text); font-size: 18px;
}
.locked-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.locked-box .icon { color: var(--navy); }
.locked-ask { display: inline-flex; align-items: center; min-height: var(--tap); background: none; border: none; padding: 0; color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
.locked-note { color: var(--muted); font-size: 16px; }

.dialog { border: none; border-radius: var(--radius-card); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); color: var(--text); }
.dialog::backdrop { background: var(--scrim); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 24px 22px; }

/* A short action (ui.shortAction): the box, then the confirm step. */
.short { display: flex; flex-direction: column; gap: 12px; }
.short .dialog-actions { padding: 6px 0 0; }
.short-text { margin: 0; padding: 12px 16px; border-left: 4px solid var(--line); background: var(--fill-soft); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.short-confirm { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--confirm-fill); color: var(--navy); }
.short-confirm .icon { flex: none; margin-top: 2px; }
.short-confirm p { overflow-wrap: anywhere; }

/* "Your rep" (rep.js), on the menu's navy and on a white card. */
.rep { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rep-label { font-size: var(--size-small); }
.rep-name { font-weight: 700; }
.rep-phone { text-decoration: none; font-size: 16px; font-weight: 700; }
.rep-phone:hover { text-decoration: underline; }
.rep-navy { gap: 10px; align-items: stretch; }
.rep-navy .rep-label { color: var(--menu-quiet); }
/* The mockup's foot: the number in plain white at 16, the name bold at 17. */
.rep-navy .rep-phone, .rep-navy .rep-phone:hover { color: #FFFFFF; font-weight: 400; }
.rep-navy .rep-name { font-size: 17px; }
.rep-page .rep-label { color: var(--muted); }

/* ---------------------------------------------------------------- the step-by-step flow */
.flow { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.flow-steps { padding: 22px 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.step { position: relative; min-width: 0; }
.step-line { position: absolute; top: 24px; left: calc(50% + 26px); right: calc(-50% + 18px); height: 3px; border-radius: 2px; background: var(--line); }
.step-line-done { background: var(--navy); }
.step-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 4px; border: 0; background: none; border-radius: var(--radius-control); }
.step-btn[aria-disabled="true"] { cursor: default; }
.step-n { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; border: 2px solid var(--outline); background: var(--surface); color: var(--muted); }
.step-name { font-size: 16px; line-height: 1.3; text-align: center; color: var(--muted); }
/* Done steps as the approved mockup's NewCampaign, Emails and Event screens
   draw them (#E8ECF4 with a navy ring and a navy number), and Setup's inline
   strip below filled navy as the mockup's Setup draws it. The check of the
   merged build and its review (2 October 2026) asked for navy here too, so the
   two match; that changes the approved look, and is Joshua's to say. */
.step-done .step-n { background: var(--fill); border-color: var(--navy); color: var(--navy); }
.step-done .step-name { color: var(--navy); }
.step-current .step-n { background: var(--navy); border-color: var(--navy); color: #FFFFFF; box-shadow: 0 0 0 4px var(--gold-ring); }
.step-current .step-name { color: var(--navy); font-weight: 700; }
.flow-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 26px; }
.flow-step-head { display: flex; align-items: center; gap: 18px; }
.flow-step-head h2 { font-size: 26px; line-height: 1.25; }
.flow-of { color: var(--muted); }
.flow-locked { display: flex; flex-direction: column; gap: 20px; }
.flow-content { display: flex; flex-direction: column; gap: 24px; max-width: 660px; }
.flow-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.flow-nav-right { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-left: auto; }
.flow-saved { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; }
/* Ray's "Back to Review" under the forward button, as he drew it on every
   page of New campaign (6 October 2026; ui.js stepFlow's toReview). */
.flow-fwd { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
/* Back, the saved line and the forward button stay on one line, with Back
   to Review under the forward button only. */
.flow-nav:has(.flow-fwd), .flow-nav-right:has(> .flow-fwd) { align-items: flex-start; }
.flow-nav-right:has(> .flow-fwd) > .flow-saved { min-height: 48px; }
.review { display: flex; flex-direction: column; gap: 20px; max-width: none; }
.flow-content-review { max-width: none; }
.review-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.review-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
/* A review row's Change while its row shows an alert (Ray's answers, 16
   October 2026, to his page 7 of 14 October, where he wrote "Bold" at the
   Events row's Change and drew its outline over heavily: "ONLY WHEN THERE IS
   AN ALERT"; ui.js changeFollowsAlerts): a border twice as heavy, its word
   bold as every button's is. Every flow's review, the inline review's
   columns and the Setup tab's sections. */
.btn.review-change-bold { border-width: 3px; font-weight: 700; }
.review-list { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.review-list dt { font-weight: 700; }
.review-list dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* What Finish does, as the mockup's "When you publish" box: the page's own
   grey, a 20 heading, the sentence under it (review, 1 October 2026). */
.review-says { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border-radius: 12px; background: var(--page); }
.review-says h3 { font-size: 20px; }

/* The flow's inline layout (stepFlow layout 'inline'), as the mockup's Setup
   screen draws it: one card; "Step 1 of 3" and the bubbles in a strip at its
   top, each bubble 38 beside its name, joined by 3-pixel rules; the step's
   24 heading with the 10 gold dot; rows run the card's width; the foot with
   the cloud note; the review as columns of label and value rows (review of
   slice E, 2 October 2026). */
.flow-body.flow-inline { padding: 0; gap: 0; }
.flow-inline-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.flow-inline-of { margin: 0; font-weight: 700; font-size: 18px; color: var(--navy); white-space: nowrap; }
.steps-inline { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; list-style: none; margin: 0; padding: 0; }
.step-inline { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.step-inline:last-child { flex: 0 0 auto; }
.step-inline .step-btn { flex-direction: row; gap: 12px; width: auto; padding: 0 2px; }
.step-inline .step-n { width: 38px; height: 38px; flex: none; border-color: var(--field-edge); }
.step-inline .step-name { font-size: var(--size-body); text-align: left; white-space: nowrap; }
.step-inline.step-done .step-n { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.step-inline.step-current .step-n { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--gold); }
.step-inline-line { flex: 1 1 auto; min-width: 24px; height: 3px; border-radius: 99px; background: var(--line); }
.step-inline-line.step-line-done { background: var(--navy); }
.flow-inline-head { padding: 18px 24px 4px; }
.flow-inline-head h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; color: var(--navy); }
.flow-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.flow-inline .flow-content { max-width: none; gap: 0; padding: 0 24px; }
.flow-inline > .field-error { margin: 14px 24px 0; }
.flow-inline > .confirm { margin: 16px 24px 0; }
.flow-nav.flow-nav-inline { justify-content: flex-start; padding: 14px 24px; border-top: 0; }
.flow-nav.flow-nav-review { border-top: 1px solid var(--line); }
.flow-inline-note { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 220px; min-width: 0; color: var(--muted); }
.flow-inline-note .icon { flex: none; margin-top: 2px; }
.flow-nav-review .flow-inline-note { flex-basis: 300px; }
.review-inline { gap: 0; }
.review-grid { display: grid; gap: 40px; padding: 18px 0; }
.review-col { display: flex; flex-direction: column; min-width: 0; }
.review-col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.review-col-head h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; color: var(--navy); }
.review-pair { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.review-label { color: var(--muted); }
.review-value { min-width: 0; overflow-wrap: anywhere; }
.review-block { min-width: 0; }


/* ---------------------------------------------------------------- parts.js: an evening's row, a campaign's row */
.camp-name a { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--navy); }
.camp-name a:hover { text-decoration: underline; }
.evrow { display: grid; grid-template-columns: 96px minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) 120px; gap: 20px; align-items: center; }
.evrow-what strong { display: block; font-size: 18px; }
.evrow-what span { color: var(--muted); }
.evrow .btn { width: 100%; }
.camprow { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 0.75fr)) 120px; gap: 20px; align-items: center; }
.camp-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.camp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.camp-name p { color: var(--muted); }
.camp-client { color: var(--text) !important; font-weight: 700; }
.camprow .btn { width: 100%; }
.camp-note { grid-column: span 2; }
.moving { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .evrow { grid-template-columns: 88px minmax(0, 1fr) repeat(3, minmax(0, 0.8fr)); }
  .evrow .btn { grid-column: 2 / -1; justify-self: start; width: auto; }
}

/* Below 900 the menu folds into a bar across the top (brief 2.0): the logo
   small on navy, without the panel, and the Menu button. */
@media (max-width: 900px) {
  /* auto 1fr, as the mockup has it: with one row each, a page shorter than
     the screen shared its spare height with the bar, which grew to 285 on
     a short flow step (found on screen at 390, 1 October 2026). */
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; overflow: visible; }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
  .menu-head { padding: 0; background-image: none !important; }
  .menu-logo-img { width: 128px; margin: 0; filter: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px;
    border-radius: var(--radius-control); border: 1px solid var(--menu-edge); background: transparent;
    color: #FFFFFF; font-weight: 700;
  }
  .side-menu { display: none; padding: 4px 16px 20px; gap: 20px; }
  .side.open .side-menu { display: flex; }
  .main { padding: 24px 16px 40px; }
  .viewing { padding: 12px 16px; }
  .practice-band { padding: 10px 16px; }
  .page { gap: 22px; }
  h1 { font-size: 32px; }
  /* Three across under the tile and the words, so "46 of 60" never folds
     into the tile's narrow column (found on screen at 390, 1 October 2026). */
  .evrow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; column-gap: 12px; }
  .evrow-what { grid-column: 2 / -1; }
  .evrow .figure, .evrow .btn { grid-column: auto; }
  .evrow .btn { grid-column: 1 / -1; width: 100%; }
  .camprow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 14px; }
  .camp-name, .camp-note, .camprow .btn { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; row-gap: 16px; }
  .step-line { display: none; }
  .review-row { grid-template-columns: 1fr; gap: 10px; }
  .review-row > .btn { justify-self: start; }
  .review-list { grid-template-columns: 1fr; gap: 2px; }
  .review-list dd { margin-bottom: 10px; }
  .date-tile { width: 72px; height: 72px; }
  /* The inline layout below 900, as the mockup's Setup: the bubbles one
     under another without their rules, the review's columns one after
     another, each label over its value. */
  .flow-inline-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .steps-inline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .step-inline-line { display: none; }
  .review-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 28px; }
  .review-pair { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 600px) {
  .card-head, .card-body, .card-row { padding-left: 16px; padding-right: 16px; }
  .flow-body { padding: 20px 16px; }
  .flow-steps { padding: 18px 12px; }
  .flow-inline-top, .flow-inline-head, .flow-inline .flow-content, .flow-nav.flow-nav-inline { padding-left: 16px; padding-right: 16px; }
  .flow-inline > .field-error, .flow-inline > .confirm { margin-left: 16px; margin-right: 16px; }
  /* A flow's foot on a phone: "Saved as a draft at ..." on a line of its own
     above the buttons, then Back and Next on one row with Next at the right,
     in every flow. Until 2 October 2026 a flow with the note stacked Back, the
     note and Next, Next at the left under the note, while a flow without it
     kept them on one row (the check of the merged build). */
  .flow-nav:not(.flow-nav-inline) .flow-nav-right { display: contents; }
  .flow-nav:not(.flow-nav-inline) .flow-saved { order: -1; flex-basis: 100%; }
  .flow-nav:not(.flow-nav-inline) .flow-nav-right > .btn:last-child { margin-left: auto; }
  .flow-nav:not(.flow-nav-inline) .flow-nav-right > .flow-fwd { margin-left: auto; }
  /* An evening's three figures on a phone: at least 16 pixels between them,
     and "46 of 60" a size smaller, so it never runs into "14" beside it
     (Home's next events and the campaign's Event dates; the check of the
     merged build, 2 October 2026, measured them 9 apart). */
  .evrow { column-gap: 16px; }
  .evrow .figure-small .figure-n { font-size: 21px; }
  .evrow .figure-small .figure-of { font-size: 16px; }
  /* "Discard this draft" is a link whose words start on the 16 pixel margin. */
  .flow .page-head .page-actions > .btn-link:first-child { margin-left: -8px; }
  /* Tables stack: one block per row, each cell labelled by its column. */
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
  .table td { padding: 4px 0; border: none; text-align: left !important; }
  .table td::before { content: attr(data-label); display: block; font-weight: 700; font-size: var(--size-small); color: var(--muted); }
  /* A page's buttons and choices never run past the 16 pixel margin: each may
     shrink, and a dropdown takes the line (staff's Campaigns list scrolled
     sideways at 390, the check of the merged build, 2 October 2026). */
  .page-actions > * { min-width: 0; max-width: 100%; }
  /* A button's words fold onto a second line rather than run past the card
     on a phone. Until 4 October 2026 every .btn kept to one line (nowrap), so
     the Details tab's "Use a different phone for this campaign" ran 15 past
     its card at 375 and lost its right edge (the Tester's pass 1, item 13). A
     button that fits keeps its one line and its height. */
  .btn { white-space: normal; max-width: 100%; text-align: center; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; }
  .list-filter { flex-wrap: wrap; width: 100%; }
  .list-filter .list-filter-select { width: 100%; min-width: 0; flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- charts.js, advisor-choice.js (slice A)
   Charts in navy and gold (Home's registrations by day and "Your results",
   the Campaigns list's "How they found you"). The gold of a mark is a step
   darker than --gold so it stands 3:1 on white; the light --gold stays the
   accent and is never text on white. Checked for colour blindness with the
   dataviz validator: navy, chart gold and steel are 20 apart and more. Words
   in a chart wear the text colours, never a series colour, and every one is
   16 pixels at least (brief 2.1), as the page's body text is. */
:root {
  --chart-gold: #A8822C; --chart-steel: #5B7BB5;
  /* White words and figures on navy (Home's results band, a pressed filter). */
  --on-navy: #FFFFFF;
}
.chart { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart-plot { width: 100%; min-width: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-text); }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--control-edge); stroke-width: 1; }
.chart-tick, .chart-axis { fill: var(--muted); font-size: 16px; }
.chart-label { fill: var(--text); font-size: 16px; font-weight: 700; }
.chart-sub { fill: var(--muted); font-size: 16px; }
.chart-value { fill: var(--text); font-size: 16px; }
.chart-marker { stroke: var(--chart-gold); stroke-width: 2; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { stroke: var(--surface); stroke-width: 2; }
.chart-hit { fill: transparent; cursor: pointer; outline: none; }
/* A day or a row reached from the keyboard (charts.js): ringed in the focus colour. */
.chart-hit:focus-visible { fill: var(--gold-soft); stroke: var(--focus); stroke-width: 3; }
.chart-track { fill: var(--fill-soft); }
.chart-cap { stroke: var(--outline); stroke-width: 2; }
/* A date's extra seats past its seats (Overbook), after its track. */
.chart-track-extra { fill: var(--gold-soft); }
.chart-mark.t-navy, .chart-dot.t-navy { fill: var(--navy); }
.chart-mark.t-gold, .chart-dot.t-gold { fill: var(--chart-gold); }
.chart-mark.t-steel, .chart-dot.t-steel { fill: var(--chart-steel); }
.chart-mark.t-grey, .chart-dot.t-grey { fill: var(--outline); }
.l-navy { stroke: var(--navy); } .l-gold { stroke: var(--chart-gold); } .l-steel { stroke: var(--chart-steel); } .l-grey { stroke: var(--outline); }
.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 16px; }
.chart-legend li { display: inline-flex; align-items: center; gap: 8px; }
.chart-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: none; }
.chart-swatch.t-navy { background: var(--navy); } .chart-swatch.t-gold { background: var(--chart-gold); }
.chart-swatch.t-steel { background: var(--chart-steel); } .chart-swatch.t-grey { background: var(--outline); }
.chart-detail { font-size: 16px; color: var(--text); }
.chart-detail:empty { display: none; }
.chart-summary { font-size: 16px; color: var(--muted); }

/* The advisor choice (N23a) and staff's Client choice: the label in the normal
   font beside its dropdown. Classes of their own: they were `.choice`, which
   is also the radio card of the step-by-step flows (campaign-steps.css, width
   100%, a border and a 64 high box), and once that stylesheet had loaded the
   filter was drawn as a card and the Campaigns list scrolled sideways on a
   phone, depending on which page had been opened first (the check of the
   merged build, 2 October 2026). */
.list-filter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list-filter-label { color: var(--muted); }
.list-filter .list-filter-select { width: auto; min-width: 200px; min-height: var(--tap); padding: 6px 12px; font-size: 17px; font-weight: 700; color: var(--navy); border-color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
