/* ===========================================================================
   RangeX brand stylesheet — RangeX Core (range-x.co.uk)
   Implements "RangeX Brand Guidelines V2 · 2026" (brand/RangeX Brand Guidelines.pdf)

   🔴 PRESENTATION ONLY. Nothing in this file changes behaviour. No class here
   is read by any route, service or query — it styles what the templates
   already render.

   Rules being followed, quoted from the guidelines:
     §01  "RangeX is the parent brand — a neutral, ink-on-bone identity with NO
           signature colour of its own." So this site uses ink/bone/surface and
           borrows a product hue only when naming that product.
     §03  "Colour is used sparingly — as an accent on the descriptor, the mark,
           key actions and status — never as a full background wash except on
           dark UI surfaces."
     §04  Space Grotesk = display / wordmarks / numerals. Instrument Sans = UI /
           body / labels.
     §05  "The standalone mark is reserved for app icons and social profile
           pictures — every other surface carries the full wordmark lockup."

   Fonts are SELF-HOSTED rather than pulled from Google. The guidelines suggest a
   <link> to fonts.googleapis.com, but this app's CSP is `default-src 'self'`,
   and loosening it to allow a third-party origin would be changing how the app
   works, not how it looks. Self-hosting keeps the CSP untouched.
   =========================================================================== */

/* ---- §04 Typography. Both are VARIABLE fonts: one file covers every weight -- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/static/fonts/instrument-sans-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---- §03 Palette — copied verbatim from the guidelines ------------------- */
:root {
  --rx-ink:     #15191C;
  --rx-bone:    #EFEBE2;
  --rx-surface: #FBF9F4;
  --rx-slate:   #4A5058;
  --rx-muted:   #767B80;
  /* Product colours, Brand Guidelines V3 (2026-11-04). RangePay is gold now;
     RangeBook took the old green. RangeTrain is retired (it became RangeCoach). */
  --rx-pay:     #C98A12;   --rx-pay-deep:   #2B1F08;   --rx-pay-bright:   #F2C14E;
  --rx-coach:   #2E7D8A;   --rx-coach-deep: #0D262C;   --rx-coach-bright: #7FD0DE;
  --rx-shift:   #2C6FF0;   --rx-shift-deep: #0B2350;   --rx-shift-bright: #7FB2FF;
  --rx-book:    #14A06A;   --rx-book-deep:  #0E3A2A;   --rx-book-bright:  #3FD08C;
  --rx-epos:    #5550C8;   --rx-epos-deep:  #17153A;   --rx-epos-bright:  #B0ABFF;
  /* RangeClub, added 2026-11-10. Read off its own wordmark SVG rather than
     guessed: brand/rangeclub-wordmark.svg uses #A88400, the light variant
     #FFD447. The -deep tone follows the same recipe as its siblings. */
  --rx-club:    #A88400;   --rx-club-deep:  #2A2008;   --rx-club-bright:  #FFD447;

  /* 🔴 THE SAME HUES, DARKENED UNTIL THEY ARE READABLE AS TEXT ON A LIGHT
     BAND. The brand colours above are WORDMARK colours — chosen to sit on
     dark, where they are fine. Used as text on bone (#EFEBE2) they measure
     2.48:1 (pay), 2.82:1 (book), 2.96:1 (club) and 3.80:1 (shift), all under
     the 4.5:1 minimum, and on a phone in daylight the gold effectively
     vanished. Craig reported it; these are computed to 4.6:1 against the
     DARKER of the two light bands, not eyeballed. RangeEPOS already passed at
     5.24:1 and is unchanged. */
  --rx-shift-text: #2763D6;
  --rx-pay-text:   #8D610D;
  --rx-book-text:  #0F784F;
  --rx-epos-text:  #5550C8;
  --rx-club-text:  #816600;

  --rx-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --rx-body:    'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ---- Semantic tokens. LIGHT is the default (Craig, 2026-08-07) -----------
   Guidelines: "Bone #EFEBE2 · background", "Surface #FBF9F4 · cards".        */
/* 🎨 2026-11 VISUAL REDESIGN (ported from RangeShift's workspace shell). The
   content palette moved from warm bone/surface to a cool operational grey so
   the console reads as a work tool. The guidelines' bone and surface survive
   where the BRAND speaks: on-accent text, the sidebar's active mark, and the
   whole dark theme. Previous light values, for an easy revert:
     bg #EFEBE2 · panel #FBF9F4 · body-fg #4A5058 · muted-fg #585C60 ·
     line #DED8CC · line-soft #E7E1D6 · line-control #B9B1A2 · line-frame #A79E8D
   Every TEXT pair below was re-measured (scratch script, 2026-11-03) — the
   numbers are in the comments. */
:root,
:root[data-theme="light"] {
  /* 🎨 2026-11-10: BACK TO BONE. Craig: "this looks very white … can we tidy
     it up to look more like the rangex theme". The cool grey of the 2026-11-03
     port read as somebody else's product next to the public site, whose light
     bands are bone #EFEBE2 and surface #FBF9F4. So the signed-in pages now
     sit on the same two colours, with ink text — one brand, both sides of the
     sign-in. The cool values, if anyone wants them back:
       bg #F2F4F7 · panel #FFFFFF · fg #172230 · body-fg #334155 ·
       muted-fg #536275 · line #D8E0E9 · line-soft #E4E9EF ·
       line-control #ABB5C2 · line-frame #9AA5B4 · field #F7F9FB ·
       field2 #EDF1F6 · hover #E9EFF6
     Every TEXT pair re-measured 2026-11-10 (WCAG, scratch script):
       fg     14.86 on bg · 16.80 on a card · 14.35 on --field2
       body    8.82 on bg ·  9.97 on a card ·  8.51 on --field2
       muted   5.42 on bg ·  6.13 on a card ·  5.23 on --field2   */
  --bg:        var(--rx-bone);
  --panel:     var(--rx-surface);
  --fg:        var(--rx-ink);
  --body-fg:   #3A4046;
  --muted-fg:  #5A5F64;
  --line:      #DDD6C8;
  --line-soft: #E7E1D6;
  --line-control: #A9A091;     /* 2.17:1 on bg, 2.46 on a card */
  --line-frame: #9C927F;       /* 2.58:1 on bg, 2.92 on a card */
  --field:     #F5F2EB;
  --field2:    #ECE7DD;
  --hover:     #F0ECE3;
  --accent:    var(--rx-ink);      /* §01 the PARENT brand has no hue */
  --on-accent: var(--rx-surface);  /* 16.80:1 on ink */
  --shadow:    0 1px 2px rgba(21,25,28,.04), 0 8px 24px rgba(21,25,28,.05);
  --shadow-sm: 0 1px 2px rgba(21,25,28,.04), 0 4px 14px rgba(21,25,28,.045);
}

/* ---- Dark. §03: RangeX's deep surface is INK — confirmed against
   brand/splash/rangex-splash.svg, whose background rect is #15191C.
   Card/line tones are translucent overlays of the palette, NOT invented
   hexes, so nothing outside the brand is introduced.                        */
:root[data-theme="dark"] {
  --bg:        var(--rx-ink);
  --panel:     #1C2125;
  --fg:        var(--rx-surface);
  --body-fg:   #C6C9CC;
  /* Was #8E9398, which was 4.17:1 inside a <code> chip on a card. 6.63 on
     bg, 6.08 on a card, 5.29 on a hovered row, 4.84 in a code chip. */
  --muted-fg:  #9A9FA4;
  --line:      #2A3036;
  --line-soft: #23282D;
  --line-control: #4E565E;
  /* Same 1.25× step over --line-control that the light theme takes (2.95:1 on
     ink vs 2.37), so a frame outranks a control edge in both themes. On a dark
     surface "stronger" means LIGHTER, which is why this rises where the light
     value fell. 🔴 Derived from the light value, not judged on screen — worth a
     look if anyone actually runs the console dark. */
  --line-frame: #5C646E;
  --accent:    var(--rx-surface);
  --on-accent: var(--rx-ink);
  --field:     #181D21;
  --field2:    #22282D;
  --hover:     #262C31;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--rx-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--body-fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* §04 numerals are a DISPLAY use — Space Grotesk, and tabular so columns line up */
.num, td.num, .stat { font-family: var(--rx-display); font-variant-numeric: tabular-nums; }

h1, h2, h3 {
  font-family: var(--rx-display);
  color: var(--fg);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 .5rem;
}
h1 { font-size: 1.65rem; font-weight: 600; }
h2 { font-size: 1.15rem; font-weight: 600; }

a { color: var(--fg); text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

.muted { color: var(--muted-fg); }

/* ---- layout ------------------------------------------------------------- */
.wrap { max-width: 52rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.wrap.wide, .wide { max-width: 76rem; }
.spacer { flex: 1; }

header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
header .wrap {
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

/* The bar is one row of unrelated chips, so it must never break a chip in the
   middle of a phrase ("Eagle Approach · owner" over three lines). Each chip
   stays whole; the bar wraps between chips instead. */
header .wrap > * { white-space: nowrap; }
header .hdr-chip { font-size: .9rem; }
header .hdr-console { text-decoration: none; }

/* The email is the first thing to give up room — it truncates rather than
   pushing Sign out off the bar. Nothing is hidden outright: the full address
   is still the element's text, so it stays selectable and readable to a
   screen reader. */
header .hdr-email {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
  min-width: 0;   /* flex items default to min-width:auto and refuse to shrink */
}

/* Below this the bar simply has no room for a second row of chrome. The
   lockup, the console link, Sign out and the theme switch all survive; the
   company name is already shown on the page itself. */
@media (max-width: 46rem) {
  header .wrap { gap: .6rem; }
  header .hdr-email { max-width: 12ch; }
}
@media (max-width: 34rem) {
  header .hdr-email { display: none; }
}

/* ---- §02/§05 the wordmark lockup. Shipped SVG, never re-typed ------------
   Clear space = the height of the ball on all sides (§02). The ball is r=14 on
   a 200-tall viewBox, so at 26px tall that is ~3.6px — 8px is comfortably
   above the minimum. Wordmark minimum width is 110px; at height 26 these
   render ~120px wide.                                                        */
.brand-lockup { display: inline-flex; align-items: center; padding: 8px; }
.brand-lockup img { height: 26px; width: auto; display: block; }
.brand-lockup .on-light { display: block; }
.brand-lockup .on-dark  { display: none; }
:root[data-theme="dark"] .brand-lockup .on-light { display: none; }
:root[data-theme="dark"] .brand-lockup .on-dark  { display: block; }

/* ---- forms -------------------------------------------------------------- */
label { display: block; font-weight: 600; color: var(--fg); margin: 1rem 0 .3rem; font-size: .93rem; }

input[type=email], input[type=password], input[type=text], select, textarea {
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* 🔴 PLACEHOLDERS MUST NOT READ AS VALUES. With no rule at all they inherit the
   browser default, which is dark enough that "Eagle Approach Golf Ltd" sitting
   in an empty Legal name box looks like a company that has already been typed
   in — on a form whose whole job is creating a NEW one. Lighter, and italic, so
   the difference is visible at a glance and not only on close inspection.
   Deliberately below body-text contrast: this is a hint, not content. */
::placeholder { color: var(--muted-fg); opacity: .6; font-style: italic; }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--rx-shift);
  outline-offset: 2px;
}

button {
  font: inherit;
  font-weight: 600;
  padding: .68rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
button:hover { filter: brightness(1.12); }
/* The SECOND level of button. It has to look like a control you can press —
   transparent-on-bone with a hairline border did not, so every secondary action
   in the console ("Make superadmin", "Reset password", "Assign", "Add site")
   disappeared into the paragraph next to it. A panel fill lifts it off the page
   and --line-control gives it an edge. */
button.ghost {
  background: var(--panel);
  color: var(--fg);
  border-color: var(--line-control);
}
button.ghost:hover { background: var(--bg); filter: none; }
/* §03 colour on "key actions and status" — destructive actions earn a hue */
button.danger { background: #B42318; color: #fff; }
button.link {
  background: none;
  border: none;
  padding: .2rem;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line);
  font-weight: 500;
}

/* ---- cards, tables, tags ------------------------------------------------ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: .6rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; margin: .5rem 0 1.5rem; font-size: .94rem; }
th, td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  font-family: var(--rx-display);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-fg);
}

.tag {
  display: inline-block;
  font-family: var(--rx-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: .14rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted-fg);
}
/* V3 §03/§05: statuses are soft chips in the SEMANTIC tones, never a product
   colour (RangePay's old green is RangeBook's colour now, and RangeTrain's
   magenta is retired). Text values all clear AA as 12px labels. */
.tag.on     { color: #15703F; border-color: #15703F; background: #E3F0E8; }
.tag.off    { color: #B42318; border-color: #B42318; background: #FBEDEC; }
.tag.vendor { color: #3C4A5C; border-color: #3C4A5C; background: #EEF1F4; }
:root[data-theme="dark"] .tag.on     { color: #7FD8A4; border-color: #7FD8A4; background: none; }
:root[data-theme="dark"] .tag.vendor { color: #C6D2E2; border-color: #C6D2E2; background: none; }
:root[data-theme="dark"] .tag.off    { color: #FF9C93; border-color: #FF9C93; background: none; }

/* ---- messages ----------------------------------------------------------- */
.ok, .warn, .err, .note { border-radius: 10px; padding: .75rem .95rem; margin: 1rem 0; }
.ok   { background: rgba(20,160,106,.10); color: #0A5C27; border: 1px solid rgba(20,160,106,.35); }
.warn { background: rgba(196,120,0,.10);  color: #7A4D00; border: 1px solid rgba(196,120,0,.30); }
.err  { background: rgba(180,35,24,.09);  color: #8A1C1C; border: 1px solid rgba(180,35,24,.28); }
.note { background: none; border: none; border-left: 3px solid var(--line); border-radius: 0;
        padding: .2rem 0 .2rem .9rem; color: var(--muted-fg); font-size: .92rem; }
:root[data-theme="dark"] .ok   { color: #7FD8A4;                border-color: rgba(127,216,164,.3); }
:root[data-theme="dark"] .warn { color: #F2D492;                border-color: rgba(242,212,146,.28); }
:root[data-theme="dark"] .err  { color: #FF9C93;                border-color: rgba(255,156,147,.3); }

/* ---- console bits ------------------------------------------------------- */
nav.admin { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; }
nav.admin a {
  padding: .35rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  color: var(--body-fg);
}
nav.admin a:hover { border-color: var(--fg); color: var(--fg); }
nav.admin a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* --line-frame, not --line: #DED8CC on bone is a 1.19:1 hairline that reads as a
   smudge rather than a boundary. */
fieldset { border: 1px solid var(--line-frame); border-radius: 14px; padding: .4rem 1.1rem 1.1rem; margin: 1.5rem 0; }
legend { font-family: var(--rx-display); font-weight: 600; color: var(--fg); padding: 0 .4rem; }

.tick { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .1rem; border-bottom: 1px solid var(--line-soft); }
.tick input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--rx-shift); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 44rem) { .grid2 { grid-template-columns: 1fr; } }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  padding: .12rem .38rem;
  border-radius: 6px;
}

.scroll { overflow-x: auto; }

/* ---- grouped listings, and the filter above them ------------------------- */
/* Who-is-where used to repeat the company name on every row. One block per
   company instead, framed the same way a <fieldset> is so the page reads as
   sections rather than one long table. */
.company-block {
  border: 1px solid var(--line-frame);
  border-radius: 14px;
  padding: .5rem 1.1rem .2rem;
  margin: 1rem 0;
}
.company-block > h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .5rem 0 0;
}
/* The head count sits hard right, away from the tags, so scanning down the page
   gives a column of numbers rather than text of varying length. */
.company-block > h2 > .muted:last-child { margin-left: auto; font-size: .85rem; }
/* The company block already frames the rows; a bottom rule under the last one
   would double the line. */
.company-block table { margin-bottom: .5rem; }
.company-block tr:last-child td { border-bottom: none; }

.filterbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.filterbar label { font-family: var(--rx-display); font-size: .82rem; font-weight: 600; }
.filterbar select { width: auto; min-width: 14rem; margin: 0; }

/* ---- the light/dark switch ---------------------------------------------
   Craig asked for light by default with the option to flick between the two.
   Purely client-side: the choice lives in localStorage. No cookie, no route,
   no server involvement.                                                    */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .55rem;
  line-height: 1;
  cursor: pointer;
  color: var(--body-fg);
  font-size: .95rem;
}
.theme-toggle:hover { border-color: var(--fg); color: var(--fg); }
.theme-toggle .icon-dark  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark  { display: inline; }

/* ---- sign-in ------------------------------------------------------------ */
.signin { max-width: 24rem; margin: 3rem auto 0; }
.signin-mark { padding: 0; margin-bottom: 2rem; }
.signin-mark img { height: 40px; }

/* ---- hub product cards --------------------------------------------------
   §05 each product is its own wordmark lockup. The card stays neutral — §03
   forbids a full colour wash — so the product's hue arrives only through its
   own wordmark, which is exactly where the guidelines want it.              */
.product-grid { display: grid; gap: .75rem; margin-top: 1.5rem; }
.product-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "mark go" "desc go";
  align-items: center;
  gap: .3rem 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .12s ease, transform .12s ease;
}
.product-card:hover { border-color: var(--fg); transform: translateY(-1px); }
.product-mark { grid-area: mark; display: flex; align-items: center; }
.product-mark img { display: block; height: 30px; width: auto; }
.product-mark .on-dark { display: none; }
:root[data-theme="dark"] .product-mark .on-light { display: none; }
:root[data-theme="dark"] .product-mark .on-dark  { display: block; }
.product-desc { grid-area: desc; font-size: .9rem; }
.product-go { grid-area: go; font-weight: 600; color: var(--fg); white-space: nowrap; }


/* ===========================================================================
   2026-11 WORKSPACE SHELL · presentation only
   Ported from RangeShift's redesign (rangeshift 2658608..be69754): a fixed
   deep sidebar, a slim sticky topbar, and a calmer console system. Same
   routes, same forms, same links — only where they sit and how they look.

   🔴 §01 STILL HOLDS: the sidebar is RangeX INK, not RangeShift's navy, and
   its accent is BONE, not blue. Core has no hue; product colour arrives only
   through a product's own wordmark on the hub.

   🔴 FILL ≠ TEXT, as everywhere else in this file. --side-accent is the fill
   of the active mark; --side-accent-text is the colour of the active sub-link.
   They happen to share a value today. Do not merge them.
   =========================================================================== */
:root {
  /* One fixed set used in BOTH themes (the sidebar is dark either way).
     Text pairs, measured on --side-bg #15191C:
       --side-ink 15.67 · --side-link 10.37 · --side-sub 7.70 ·
       --side-muted 6.49 · --side-on on --side-hover 14.55, on --side-active 12.54
       --side-accent-text on its 13% tint 10.54
     Non-text (WCAG 1.4.11, 3:1): --side-mark 3.79 · --side-accent 11.09 on active */
  --side-bg:     #15191C;   /* = --rx-ink */
  --side-line:   #2A3035;
  --side-hover:  #20262A;
  --side-active: #2A3136;
  --side-ink:    #F4F1EA;
  --side-on:     #FBF9F4;   /* = --rx-surface */
  --side-link:   #C9C6BF;
  --side-sub:    #ADABA5;
  --side-muted:  #9A9DA0;
  --side-mark:   #6F757A;
  --side-accent:      var(--rx-bone);
  --side-accent-text: var(--rx-bone);
  --line-strong: color-mix(in srgb, var(--line) 70%, var(--muted-fg));
  --ink-soft:    color-mix(in srgb, var(--fg) 80%, var(--muted-fg));
}
/* In dark the PAGE is already ink, so an ink sidebar would dissolve into it.
   One step deeper keeps the edge; every text pair above gets slightly MORE
   contrast here (link 11.02, sub 8.19, muted 6.90), never less. */
:root[data-theme="dark"] {
  --side-bg:   #0F1214;
  --side-line: #23292D;
}

body { font-size: 15px; line-height: 1.5; }
h1 { font-size: clamp(1.6rem, 2.2vw, 1.95rem); letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }

/* ---- sidebar ------------------------------------------------------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 252px;
  display: flex; flex-direction: column; padding: 25px 16px 18px;
  color: var(--side-ink); background: var(--side-bg);
  border-right: 1px solid var(--side-line);
}
.sidebar a { text-decoration: none; }
.sidebar-brand { padding: 2px 10px 22px; }
/* Always the -light wordmark: the sidebar is dark in both themes (§05). */
.sidebar-brand img { height: 27px; width: auto; display: block; }
.sidebar-caption {
  padding: 12px 11px 9px; color: var(--side-muted);
  font-family: var(--rx-display); font-size: .65rem; font-weight: 700; letter-spacing: .14em;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; overflow: auto; scrollbar-width: thin; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 11px;
  border-radius: 9px; color: var(--side-link); font-size: .9rem; font-weight: 550;
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover { background: var(--side-hover); color: var(--side-on); }
.sidebar-link.on { background: var(--side-active); color: var(--side-on); }
.sidebar-mark { width: 7px; height: 7px; border: 1.5px solid var(--side-mark); border-radius: 2px; flex: none; }
.sidebar-link.on .sidebar-mark {
  background: var(--side-accent); border-color: var(--side-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--side-accent) 18%, transparent);
}
.sidebar-subnav {
  display: flex; flex-direction: column; gap: 2px;
  margin: 4px 0 8px 30px; padding-left: 12px; border-left: 1px solid var(--side-line);
}
.sidebar-sublink { display: block; padding: 7px 9px; border-radius: 7px; color: var(--side-sub); font-size: .83rem; }
.sidebar-sublink:hover { background: var(--side-hover); color: var(--side-on); }
.sidebar-sublink.on {
  color: var(--side-accent-text); font-weight: 600;
  background: color-mix(in srgb, var(--side-accent) 13%, transparent);
}
.sidebar-footer {
  display: flex; flex-direction: column; gap: 4px; margin-top: auto;
  padding: 15px 10px 0; border-top: 1px solid var(--side-line);
}
.sidebar-footer a { color: var(--side-muted); font-size: .75rem; }
.sidebar-footer a:hover { color: var(--side-on); }
/* The global focus ring is shift blue; on ink it needs to be light to show. */
.sidebar a:focus-visible { outline-color: var(--side-accent); }

/* ---- topbar -------------------------------------------------------------- */
/* 🔴 `.sidebar ~`, NOT `.sidebar +`: the drawer's backdrop <button> sits
   between the <aside> and the <header>, so an adjacent-sibling selector
   silently stops matching and the bar slides under the sidebar. RangeShift
   shipped exactly that (fixed in rangeshift b7d05ba). */
.sidebar ~ header.topbar {
  position: sticky; top: 0; z-index: 10; min-height: 64px; margin-left: 252px;
  display: flex; align-items: center;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(17,39,67,.035);
  backdrop-filter: blur(12px);
}
.topbar-tools {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; gap: .4rem .65rem;
}
.topbar-tools > * { white-space: nowrap; }
.topbar .hdr-chip { font-size: .86rem; padding: .42rem .6rem; border-radius: 8px; }
.topbar .hdr-user { margin-right: auto; color: var(--muted-fg); }
.topbar .hdr-user strong { color: var(--fg); font-weight: 600; }
.topbar .hdr-email { overflow: hidden; text-overflow: ellipsis; max-width: 26ch; min-width: 0; }
.topbar form { display: inline; margin: 0; }
.topbar button.link { padding: .42rem .6rem; border-radius: 8px; text-decoration: none; font-size: .86rem; font-weight: 600; }
.topbar button.link:hover { background: var(--field2); }
.theme-toggle { width: 38px; height: 38px; padding: 0; }

.app-content { min-height: calc(100vh - 64px); margin-left: 252px; }
.app-content > .wrap { max-width: 60rem; padding: 1.6rem clamp(1.25rem, 3vw, 2.6rem) 4rem; }
.app-content > .wrap.wide { max-width: 88rem; }

/* The pill row is superseded by the sidebar's sub-nav (admin/_nav.html is now
   a no-op), but keep it styled in case a page still renders one. */
nav.admin a { border-radius: 9px; }

/* ---- signed out: no sidebar, an auth card -------------------------------- */
header.signed-out { background: transparent; border-bottom: 0; }
/* The card carries the big wordmark, so the bar does not repeat it. */
body:has(.signin) header.signed-out .brand-lockup { visibility: hidden; }
.signin {
  max-width: 27rem; margin: 2rem auto 0; padding: 2rem 2rem 1.6rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(20,41,69,.08);
}
:root[data-theme="dark"] .signin { box-shadow: 0 16px 48px rgba(0,0,0,.45); }

/* ---- surfaces ------------------------------------------------------------ */
.card, .product-card { border-radius: 12px; box-shadow: var(--shadow-sm); }
.card { padding: 1.25rem 1.4rem; margin: 14px 0; }
fieldset, .company-block { border-color: var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-sm); }
.product-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.ok, .warn, .err { box-shadow: 0 2px 8px rgba(17,32,52,.04); }

/* ---- forms --------------------------------------------------------------- */
label { font-size: .88rem; color: var(--ink-soft); }
input[type=email], input[type=password], input[type=text], select, textarea {
  min-height: 42px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--field); color: var(--fg);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* ---- buttons: the three levels are unchanged, only their geometry -------- */
button:not(.link):not(.theme-toggle):not(.mobile-nav-backdrop):not(.mobile-menu-toggle) {
  min-height: 40px; border-radius: 9px;
  box-shadow: 0 1px 1px rgba(17,32,52,.035);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease, filter .14s ease;
}
button:not(.link):not(.theme-toggle):not(.mobile-nav-backdrop):not(.mobile-menu-toggle):hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(17,32,52,.09); }
button:not(.link):not(.theme-toggle):not(.mobile-nav-backdrop):not(.mobile-menu-toggle):active { transform: translateY(0); }
.theme-toggle { border-color: var(--line-strong); }

/* ---- tables: a rounded frame, small uppercase heads on --field2 ----------- */
table {
  border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel);
}
th, td { border-bottom-color: var(--line); padding: .7rem .85rem; }
th { background: var(--field2); color: var(--ink-soft); font-size: .74rem; letter-spacing: .045em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--field); }
.scroll { border-radius: 10px; }
/* Inside a framed block the table is already framed — do not double it. */
.company-block table, fieldset table { border: 0; border-radius: 0; background: transparent; }

/* ---- the RangeX services list (ported from RangeShift v1.82.0) -----------
   A <details> by the wordmark, in two places: the sidebar (expands INLINE
   under the logo, on ink) and the phone top bar (a pop-up CARD).
   🔴 The card is LIGHT IN BOTH THEMES — fixed --menu-* tokens, not the theme
   tokens — because the dark-ink product wordmarks are drawn for a light
   ground. The sidebar copy uses the -light artwork instead (base.html).
   Contrast on --menu-bg: ink 16.06, muted 6.23; on --menu-hover 14.81 / 5.75. */
:root {
  /* Surface, not white, since 2026-11-10 — the card is a RangeX surface.
     ink 16.80 · muted 6.13 on --menu-bg. */
  --menu-bg: #FBF9F4; --menu-ink: #15191C; --menu-muted: #5A5F64;
  --menu-line: #E7E1D6; --menu-hover: #F0ECE3;
}
.service-switcher { position: relative; flex: none; }
.service-switcher summary {
  list-style: none; display: grid; place-items: center; width: 28px; height: 30px;
  padding: 0; border-radius: 7px; cursor: pointer;
  color: var(--side-muted); transition: background .15s ease, color .15s ease;
}
.service-switcher summary::-webkit-details-marker { display: none; }
.service-switcher summary:hover, .service-switcher[open] summary { background: var(--side-hover); color: var(--side-on); }
.service-switcher summary:focus-visible { outline: 2px solid var(--side-accent); outline-offset: 1px; }
.service-chevron { display: block; width: 17px; height: 17px; transition: transform .16s ease; }
.service-switcher[open] .service-chevron { transform: rotate(180deg); }
.service-menu-title {
  margin: 0 0 4px; font-family: var(--rx-display); font-size: .65rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.service-option {
  display: flex; align-items: center; min-height: 36px; padding: 5px 8px; margin: 1px 0;
  border-radius: 7px; text-decoration: none; transition: background .14s ease;
}
.service-logo { display: block; height: 20px; width: auto; max-width: 100%; }
.service-hub { font-size: .82rem; font-weight: 600; }

/* Sidebar copy: logo row stays put; the list opens on a second grid row.
   ⚠️ display:contents on <details> is what lets its summary and menu join the
   row's grid. Fine in current Chrome/Safari; if an older iPhone Safari ever
   misbehaves here, this is the first place to look (RangeShift DESIGN_NOTES). */
.sidebar .service-brand-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center;
  gap: 2px; padding: 2px 7px 18px;
}
.sidebar .service-brand-row > .sidebar-brand { grid-column: 1; grid-row: 1; min-width: 0; padding: 0; }
.sidebar .service-brand-row > .service-switcher { display: contents; }
.sidebar .service-brand-row > .service-switcher > summary { grid-column: 2; grid-row: 1; justify-self: end; }
.sidebar .service-menu {
  grid-column: 1 / -1; grid-row: 2; min-width: 0;
  margin: 8px 0 4px 3px; padding: 4px 0 5px 12px; border-left: 1px solid var(--side-line);
  max-height: min(46vh, 360px); overflow-y: auto; scrollbar-width: thin;
}
.sidebar .service-menu-title { padding-left: 8px; color: var(--side-muted); }
.sidebar .service-option:hover { background: var(--side-hover); }
.sidebar .service-hub { color: var(--side-link); }
.sidebar .service-hub:hover { color: var(--side-on); }

/* Phone copy: a pop-up card under the top bar's wordmark. */
.mobile-brand-row, .mobile-nav-backdrop { display: none; }
.mobile-service-switcher summary { color: var(--muted-fg); }
.mobile-service-switcher summary:hover, .mobile-service-switcher[open] summary { background: var(--hover); color: var(--fg); }
.mobile-service-switcher summary:focus-visible { outline-color: var(--rx-shift); }
.mobile-service-switcher .service-menu {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 60;
  width: min(252px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto;
  padding: 7px; border: 1px solid var(--menu-line); border-radius: 12px;
  background: var(--menu-bg); color: var(--menu-ink);
  box-shadow: 0 12px 30px rgba(13,30,51,.16);
}
.mobile-service-switcher .service-menu-title { margin: 3px 8px 5px; color: var(--menu-muted); }
.mobile-service-switcher .service-option { min-height: 40px; }
.mobile-service-switcher .service-option + .service-option { border-top: 1px solid var(--menu-line); }
.mobile-service-switcher .service-option:hover { background: var(--menu-hover); }
.mobile-service-switcher .service-hub { color: var(--menu-ink); }

/* ---- phones: the sidebar becomes an off-canvas drawer ----------------------
   ☰ in the top bar opens it; backdrop, Escape, choosing a page or widening
   past 760px close it — all in static/nav.js. Keep 760 in step with nav.js. */
@media (max-width: 760px) {
  body.mobile-nav-open { overflow: hidden; }
  .sidebar {
    z-index: 40; width: min(86vw, 330px); height: 100dvh;
    padding: 17px 15px 16px; border-radius: 0 16px 16px 0;
    box-shadow: 18px 0 48px rgba(7,20,36,.24);
    transform: translateX(-105%); visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }
  body.mobile-nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar .service-brand-row { padding: 2px 6px 16px; }
  .sidebar .service-menu { max-height: 40vh; }
  .sidebar-link { min-height: 46px; padding: 0 12px; font-size: .93rem; }
  .sidebar-sublink { padding: 8px 10px; font-size: .88rem; }
  .mobile-nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35; width: 100%; height: 100%;
    min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
    background: rgba(8,14,18,.54); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .mobile-nav-backdrop:hover { transform: none; box-shadow: none; filter: none; }
  body.mobile-nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }

  /* The bar becomes a brand row over a tools row. */
  .sidebar ~ header.topbar {
    z-index: 30; margin: 0; min-height: 0; display: grid;
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "tools";
    padding: 8px 12px 9px; box-shadow: 0 2px 10px rgba(15,34,58,.05);
  }
  .mobile-brand-row { grid-area: brand; display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 43px; }
  .mobile-brand { flex: none; padding: 0; }
  .mobile-brand img { height: 21px; max-width: 150px; }
  .mobile-menu-toggle {
    flex: none; margin-left: auto; width: 40px; height: 40px; min-height: 0; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 10px;
    background: var(--side-bg); color: var(--side-on);
    box-shadow: 0 2px 5px rgba(16,36,61,.14); font-size: 1.18rem; font-weight: 500; line-height: 1;
  }
  .mobile-menu-toggle:hover { background: var(--side-hover); filter: none; }
  .topbar-tools {
    grid-area: tools; justify-content: flex-start; flex-wrap: nowrap; gap: 4px;
    min-height: 36px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line);
  }
  .topbar .hdr-user { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
  .topbar .hdr-chip, .topbar button.link { font-size: .78rem; padding: .4rem .48rem; }
  .topbar .hdr-email { max-width: 14ch; }
  .theme-toggle { flex: none; width: 34px; height: 34px; }
  .app-content { margin-left: 0; min-height: 0; }
  .app-content > .wrap { padding: 15px 13px 30px; }
  table { font-size: .88rem; }
  th, td { padding: .55rem .6rem; }
  /* 16px stops iOS zooming the page on focus. */
  input[type=email], input[type=password], input[type=text], select, textarea { font-size: 16px; }
  .signin { padding: 1.4rem 1.2rem 1.2rem; margin-top: 1rem; }
}
@media (max-width: 430px) {
  .topbar .hdr-email { display: none; }
}
@media (max-width: 390px) {
  .sidebar ~ header.topbar { padding-inline: 9px; }
  .mobile-brand-row { gap: 3px; }
  .mobile-brand img { height: 19px; max-width: 132px; }
  .mobile-menu-toggle { width: 38px; height: 38px; }
  .mobile-service-switcher .service-menu { width: min(238px, calc(100vw - 18px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  button:hover, .product-card:hover { transform: none !important; }
  .sidebar, .mobile-nav-backdrop, .service-chevron { transition: none; }
}

/* ===========================================================================
   2026-11-10 SIGNED-IN TIDY · presentation only
   Craig: "this looks very white, boxes all out of sync". Three causes, three
   fixes, and nothing a route reads:

   1. THE COLUMN FLOATED. Content was a 60rem column centred in whatever was
      left of the window, so its left edge never lined up with the top bar's
      company name — on a laptop it drifted ~150px right of it. It now starts
      on the same left edge as the top bar, with the same gutter.
   2. SECTION TITLES SAT ON THE BORDER. A <legend> is drawn notched into the
      fieldset's top edge, so every box had a title half outside it and the
      boxes' content started at different depths. The legend is now floated
      INTO the box as a proper header row with a rule under it — the one known
      way to do that without changing a single template's markup, so the
      vendor console's forms get the fix too.
   3. NOTES LOOKED LIKE QUOTES. The left-bar treatment indented every hint
      under its own heading. They are plain supporting text now.
   =========================================================================== */
.app-content > .wrap {
  margin: 0;
  max-width: 66rem;
  padding: 2rem clamp(1rem, 3vw, 2rem) 4rem;   /* = the topbar's gutter */
}
.app-content > .wrap.wide { max-width: 92rem; }

/* ---- page heading: eyebrow, title, one line of what this page is for ---- */
.page-head { margin: 0 0 1.75rem; }
.eyebrow {
  display: block; margin: 0 0 .45rem;
  font-family: var(--rx-display); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted-fg);
}
.page-head h1 { margin: 0 0 .4rem; }
.lede { margin: 0; color: var(--muted-fg); max-width: 62ch; font-size: .97rem; }
.section-title {
  font-family: var(--rx-display); font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted-fg);
  margin: 2.25rem 0 .8rem;
}

/* ---- fieldsets are cards, with the legend as a header row inside ------- */
fieldset {
  min-width: 0;                         /* or a wide table blows the card out */
  margin: 0 0 1.25rem;
  padding: 0 1.4rem 1.4rem;
}
legend {
  float: left; width: 100%;             /* float = drawn INSIDE the box */
  /* Small, because the first field's label brings its own 1rem above it. */
  margin: 0 0 .4rem; padding: 1.05rem 0 .9rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.02rem; letter-spacing: -.01em;
}
legend + * { clear: both; }
fieldset > :last-child { margin-bottom: 0; }
/* The header row's own explanation, set directly under the legend. */
.legend-note { margin: .75rem 0 .2rem; color: var(--muted-fg); font-size: .9rem; }
/* Content that is not a form field (a table, a list of facts) gets the
   breathing room a label would otherwise have given it. */
legend + .scroll, legend + .facts, legend + p, legend + .tick, legend + table { margin-top: .9rem; }

/* ---- notes: supporting text, not a block quote --------------------------- */
.note { border-left: 0; padding: 0; color: var(--muted-fg); font-size: .9rem; }
fieldset .note { margin: .9rem 0; }

/* A read-only form should look read-only, not broken. */
input:disabled, select:disabled, textarea:disabled {
  background: transparent; color: var(--body-fg); border-style: dashed; opacity: 1;
}

/* A card's buttons sit on one line along its foot. */
.actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin: 1.4rem -1.4rem -1.4rem; padding: 1rem 1.4rem;
  border-top: 1px solid var(--line-soft); background: var(--field);
  border-radius: 0 0 12px 12px;
}
.actions .note { margin: 0; }
/* A long form's save button, kept in reach: it sticks to the bottom of the
   window while the form scrolls past, then settles under the last card. */
.page-actions-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: flex-end; gap: .6rem;
  margin: 0 0 1.25rem; padding: .8rem 1rem;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}

/* ---- the hub ------------------------------------------------------------- */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 14px; margin-top: 0;
}
.product-card { min-height: 7.25rem; align-content: center; }
.tile-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.tile {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.1rem 1.25rem 1.15rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--body-fg);
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile strong { font-family: var(--rx-display); font-size: 1.02rem; color: var(--fg); letter-spacing: -.01em; }
.tile span { font-size: .88rem; color: var(--muted-fg); }
.tile em { margin-top: auto; padding-top: .4rem; font-style: normal; font-weight: 600; font-size: .86rem; color: var(--fg); }

.switcher { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .9rem; }
.switcher form { margin: 0; }
.switcher button.ghost { min-height: 34px; padding: .35rem .8rem; font-size: .86rem; }

/* ---- key/value rows (read-only facts in a card) -------------------------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted-fg); font-size: .88rem; }
.facts dd { margin: 0; color: var(--fg); }

/* ---- the team list: one line per person, Edit opens the fields ------------
   🔴 Not a table, and nothing in here has a minimum width: every row must fit
   the narrowest window without the PAGE scrolling sideways (the first
   version's ~800px editable table did exactly that). */
.staff-list { display: flex; flex-direction: column; margin-top: .9rem; }
.staff-row { border-top: 1px solid var(--line-soft); }
.staff-row:first-child { border-top: 0; }
.staff-row > summary, div.staff-row {
  display: flex; align-items: center; gap: .75rem; padding: .7rem 0; min-width: 0;
}
.staff-row > summary { list-style: none; cursor: pointer; border-radius: 8px; }
.staff-row > summary::-webkit-details-marker { display: none; }
.staff-row > summary:hover .staff-edit { background: var(--hover); }
.staff-row > summary:focus-visible { outline: 2px solid var(--rx-shift); outline-offset: 2px; }
.staff-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.staff-main strong { color: var(--fg); font-weight: 600; overflow-wrap: anywhere; }
.staff-meta { color: var(--muted-fg); font-size: .86rem; overflow-wrap: anywhere; }
.staff-edit {
  flex: none; padding: .35rem .8rem; border: 1px solid var(--line-control); border-radius: 8px;
  font-weight: 600; font-size: .86rem; color: var(--fg); background: var(--panel);
}
.staff-row[open] .staff-edit { background: var(--field2); }
.staff-edit .when-open, .staff-row[open] .staff-edit .when-closed { display: none; }
.staff-row[open] .staff-edit .when-open { display: inline; }
.staff-row.left .staff-main strong, .staff-row.left .avatar { opacity: .6; }
.staff-panel {
  margin: 0 0 .9rem; padding: .2rem 1rem .9rem; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line-soft);
}
.staff-fields {
  display: grid; gap: 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.staff-fields > div { min-width: 0; }
/* Save on the left, the rarer "Mark as left" on the right of the same line. */
.staff-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; margin-top: 1rem;
}
.staff-foot form { margin: 0; }
.person { display: flex; align-items: center; gap: .65rem; }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--rx-display); font-weight: 600; font-size: .78rem;
  background: var(--field2); color: var(--fg); border: 1px solid var(--line);
}
.count { font-family: var(--rx-display); font-variant-numeric: tabular-nums; color: var(--muted-fg); font-weight: 500; }
fieldset .scroll { margin: 0 -1.4rem; max-width: calc(100% + 2.8rem); }
fieldset .scroll table { margin: 0; }
fieldset .scroll th:first-child, fieldset .scroll td:first-child { padding-left: 1.4rem; }
fieldset .scroll th:last-child, fieldset .scroll td:last-child { padding-right: 1.4rem; }

/* ---- Logins & access ------------------------------------------------------ */
.field-head {
  margin: 1.2rem 0 .5rem; font-weight: 600; font-size: .88rem; color: var(--ink-soft);
}
/* The roles are cards you pick one of: a radio, a name, one line of meaning. */
.access-roles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
}
.role-option {
  display: flex; gap: .6rem; align-items: flex-start; margin: 0; cursor: pointer;
  padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--field); font-weight: 400;
  transition: border-color .12s ease, background .12s ease;
}
.role-option:hover { border-color: var(--line-strong); }
.role-option:has(input:checked) {
  border-color: var(--accent); background: var(--panel);
  box-shadow: 0 0 0 1px var(--accent);
}
.role-option input { margin-top: .25rem; accent-color: var(--rx-ink); flex: none; }
:root[data-theme="dark"] .role-option input { accent-color: var(--rx-surface); }
.role-option strong { display: block; color: var(--fg); font-size: .93rem; }
.role-option small { display: block; color: var(--muted-fg); font-size: .82rem; line-height: 1.4; margin-top: .15rem; }
.access-detail { margin-top: .4rem; }
.access-detail .tick { border-bottom: 0; padding: .4rem .1rem; margin: 0; font-weight: 400; }
.access-detail .tick strong { color: var(--fg); font-weight: 600; }
.access-detail .tick input:disabled + span { opacity: .55; }
.access-detail input { accent-color: var(--rx-ink); }
:root[data-theme="dark"] .access-detail input { accent-color: var(--rx-surface); }
.product-ticks { margin-left: 1.7rem; }
.access-table td { vertical-align: middle; }
/* On a phone the five columns become one card per person — never a table you
   have to scroll sideways. Each cell keeps its own line; the Change button
   sits under them. */
@media (max-width: 40rem) {
  .access-table, .access-table tbody, .access-table tr, .access-table td { display: block; width: 100%; }
  .access-table thead { display: none; }
  .access-table tr { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
  .access-table tr:last-child { border-bottom: 0; }
  .access-table td { padding: .15rem 0 !important; border: 0; }
  .access-table td.col-btn { padding-top: .5rem !important; }
  .access-table tbody tr:hover td { background: none; }
}
.access-table small { font-size: .8rem; }

/* Links that do a button's job (navigation, so they stay <a>). */
a.btn-ghost {
  display: inline-flex; align-items: center; min-height: 36px; padding: .4rem .9rem;
  border: 1px solid var(--line-control); border-radius: 9px; background: var(--panel);
  color: var(--fg); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
a.btn-ghost:hover { background: var(--hover); }
a.btn-link { font-weight: 600; font-size: .92rem; }
.eyebrow a { color: inherit; }

.danger-zone { border-color: color-mix(in srgb, #B42318 35%, var(--line)); }
.danger-zone legend { color: #B42318; }
:root[data-theme="dark"] .danger-zone legend { color: #FF9C93; }

/* ---- the sidebar's group labels ------------------------------------------ */
.sidebar-label {
  padding: 14px 11px 4px; color: var(--side-muted);
  font-family: var(--rx-display); font-size: .62rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .app-content > .wrap { padding: 18px 13px 32px; }
  fieldset { padding: 0 1rem 1rem; }
  .actions { margin: 1.2rem -1rem -1rem; padding: .9rem 1rem; }
  fieldset .scroll { margin: 0 -1rem; }
  fieldset .scroll th:first-child, fieldset .scroll td:first-child { padding-left: 1rem; }
  fieldset .scroll th:last-child, fieldset .scroll td:last-child { padding-right: 1rem; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .6rem; }
}

/* ---- the public site (§3.5) ---------------------------------------------
   🔴 NO SCRIPT, ANYWHERE ON THESE PAGES. Core sends `default-src 'self'` with
   no script-src exception because it is the identity service for the whole
   suite — the worst place in the estate to relax a content policy. That rules
   out analytics, embeds, CDN fonts and cookie banners. It is a constraint on
   the marketing, not an oversight; if any of those become genuinely wanted, the
   public site moves to its own service rather than the policy moving here.

   🔴 THIS PAGE SETS ITS OWN COLOURS AND DOES NOT FOLLOW THE THEME TOGGLE.
   Everywhere else in RangeX honours light/dark, because it is a tool somebody
   works in all day. This is a brochure: the art direction IS the message, and
   it is lifted from Sales/RangeX-Brochure.pdf — dark cover, cream story page,
   dark product grid with each product in its own colour. A sales page that
   inverts itself depending on a visitor's OS setting is not a sales page.
   Hence literal hex here rather than the --bg/--panel tokens.             */

/* 🔴 The shell's .wrap caps content at 52rem and pads it. A brochure page has
   full-bleed colour bands, so it opts out entirely rather than fighting it. */
.wrap.bleed { max-width: none; padding: 0; }
.marketing { margin: 0; }

/* The marketing page's own top bar — it replaces the shell's signed-out header
   (see base.html), so the wordmark is not drawn twice. */
.m-nav { position: sticky; top: 0; z-index: 20; background: rgba(14,17,20,.92);
         backdrop-filter: saturate(140%) blur(10px);
         border-bottom: 1px solid rgba(255,255,255,.1); }
.m-nav .m-wrap { display: flex; align-items: center; gap: 1rem;
                 padding-top: .85rem; padding-bottom: .85rem; }
.m-nav img { height: 24px; width: auto; }
.m-nav a.m-navlink { color: rgba(255,255,255,.78); text-decoration: none;
                     font-size: .94rem; }
.m-nav a.m-navlink:hover { color: #fff; }
.m-nav .m-cta { padding: .55rem 1.1rem; font-size: .92rem; }
.m-nav-spacer { flex: 1; }
@media (max-width: 560px) { .m-nav a.m-navlink { display: none; } }
.m-wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---- the cover ---- */
.m-hero {
  background: #0E1114; color: #fff; padding: 5rem 0 3.5rem; position: relative;
  overflow: hidden;
}
/* The brochure's faint grid and sweeping arc, in CSS so no image is fetched.
   The arc is a very large circle with only its border showing. */
.m-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 78%);
}
.m-hero::after {
  content: ""; position: absolute; width: 90rem; height: 90rem; right: -34rem; top: -26rem;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
}
.m-hero .m-wrap { position: relative; }
.m-eyebrow {
  font-family: var(--rx-display); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.62);
  margin: 0 0 1.1rem;
}
.m-hero h1 {
  font-family: var(--rx-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.3rem, 6.4vw, 4.1rem); line-height: 1.04;
  margin: 0 0 1.4rem; max-width: 14ch; color: #fff;
}
.m-lede { font-size: clamp(1rem, 1.9vw, 1.18rem); line-height: 1.6;
          color: rgba(255,255,255,.76); max-width: 42ch; margin: 0 0 2rem; }
.m-hero-logo { margin: 0 0 3.5rem; display: block; }
.m-hero-logo img { height: 42px; width: auto; }

/* Buttons: real <a>s styled as buttons. A <button> inside an <a> is invalid
   HTML and behaves differently across browsers. */
.m-cta { display: inline-flex; align-items: center; gap: .5rem;
         font-family: var(--rx-display); font-weight: 600; font-size: 1rem;
         padding: .85rem 1.6rem; border-radius: 10px; text-decoration: none;
         transition: transform .12s ease, box-shadow .12s ease; }
.m-cta:hover { transform: translateY(-1px); }
.m-cta-primary { background: #fff; color: #0E1114;
                 box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.m-cta-primary:hover { box-shadow: 0 14px 38px rgba(0,0,0,.45); }
.m-cta-ghost { border: 1px solid rgba(255,255,255,.34); color: #fff; }
.m-cta-ghost:hover { border-color: #fff; background: rgba(255,255,255,.07); }
.m-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* The cover's row of product wordmarks. */
.m-strip { display: flex; gap: 2.4rem; align-items: center; flex-wrap: wrap;
           margin-top: 4rem; padding-top: 2rem;
           border-top: 1px solid rgba(255,255,255,.12); }
.m-strip img { height: 21px; width: auto; opacity: .95; }

/* ---- the cream story band ---- */
.m-story { background: #EFEBE2; color: #15191C; padding: 4.5rem 0; }
.m-grid2 { display: grid; gap: 3rem; grid-template-columns: 1.1fr .9fr; align-items: start; }
@media (max-width: 860px) { .m-grid2 { grid-template-columns: 1fr; gap: 2rem; } }
.m-story h2, .m-dark h2 {
  font-family: var(--rx-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 1.2rem;
  max-width: 18ch;
}
.m-story p { line-height: 1.65; margin: 0 0 1rem; color: #3A4046; max-width: 52ch; }
.m-eyebrow-ink { color: #767B80; }
.m-believe { background: #FBF9F4; border-radius: 16px; padding: 1.75rem; }
.m-believe h3 { font-family: var(--rx-display); font-size: 1rem; margin: 0 0 .3rem; }
.m-believe p { font-size: .92rem; color: #4A5058; margin: 0 0 1.25rem; line-height: 1.55; }
.m-believe > :last-child { margin-bottom: 0; }

/* Three across. As a wrapping flex row the third one dropped to its own line
   inside the narrower text column and left a hole. */
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
           margin-top: 2.5rem; padding-top: 2rem;
           border-top: 1px solid rgba(21,25,28,.14); }
@media (max-width: 480px) { .m-stats { grid-template-columns: 1fr 1fr; } }
.m-stat strong { font-family: var(--rx-display); font-size: 2.1rem; font-weight: 700;
                 display: block; line-height: 1; margin-bottom: .45rem; }
.m-stat span { font-size: .88rem; color: #5A6068; display: block; max-width: 16ch; }

/* ---- the dark product grid ---- */
.m-dark { background: #0E1114; color: #fff; padding: 4.5rem 0; }
.m-dark h2 { color: #fff; }
.m-dark > .m-wrap > p { color: rgba(255,255,255,.7); max-width: 54ch; line-height: 1.6; }
/* Five across on a wide screen, like the brochure's suite page — `auto-fit`
   left RangeClub stranded alone on a second row. Steps down rather than
   squeezing: 5 -> 3 -> 2 -> 1. */
.m-products { display: grid; gap: 1rem; margin-top: 2.5rem;
              grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1150px) { .m-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .m-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .m-products { grid-template-columns: 1fr; } }
.m-product { border-radius: 14px; padding: 1.5rem 1.35rem; display: flex;
             flex-direction: column; gap: .7rem;
             border: 1px solid rgba(255,255,255,.09); }
.m-product img { height: 23px; width: auto; align-self: flex-start; }
.m-product h3 { font-family: var(--rx-display); font-size: 1.06rem; margin: .35rem 0 0;
                color: #fff; }
.m-product p { font-size: .9rem; line-height: 1.55; color: rgba(255,255,255,.72); margin: 0; }
/* One colour per product, straight from the Brand Guidelines V3 tokens the rest
   of the suite already uses — so the public face and the signed-in face agree. */
.m-product.shift { background: var(--rx-shift-deep); }
.m-product.pay   { background: var(--rx-pay-deep); }
.m-product.book  { background: var(--rx-book-deep); }
.m-product.epos  { background: var(--rx-epos-deep); }
.m-product.club  { background: var(--rx-club-deep); }

/* RangeClub has no wordmark SVG yet, so its lockup is set in type. Matched to
   the others rather than left looking like a mistake. */
.m-wordmark-text { font-family: var(--rx-display); font-weight: 700; font-size: 1.32rem;
                   letter-spacing: -.01em; color: #fff; align-self: flex-start; }
.m-wordmark-text em { font-style: normal; color: #E5C04A; }

/* ---- a feature row ---- */
.m-feature { padding: 4.5rem 0; background: #FBF9F4; color: #15191C; }
.m-feature + .m-feature { border-top: 1px solid rgba(21,25,28,.1); }
.m-feature:nth-of-type(even) { background: #EFEBE2; }
.m-feature h2 { font-family: var(--rx-display); font-weight: 700; letter-spacing: -.02em;
                font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.12;
                margin: .6rem 0 1rem; max-width: 20ch; }
.m-feature p.m-sub { color: #4A5058; line-height: 1.65; max-width: 52ch; margin: 0 0 1.75rem; }
/* Three benefits per product now, so three columns — two left an orphan. */
.m-bullets { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .m-bullets { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .m-bullets { grid-template-columns: 1fr; } }
.m-bullet h4 { font-family: var(--rx-display); font-size: .97rem; margin: 0 0 .3rem;
               display: flex; align-items: center; gap: .5rem; }
.m-bullet h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
                       background: currentColor; flex: none; }
.m-bullet p { font-size: .9rem; color: #4A5058; line-height: 1.55; margin: 0; }
.m-feature img.m-logo { height: 26px; width: auto; }
/* 🔴 The -text variants, not the wordmark colours — see the token block. */
.tint-shift h4 { color: var(--rx-shift-text); }
.tint-pay   h4 { color: var(--rx-pay-text); }
.tint-book  h4 { color: var(--rx-book-text); }
.tint-epos  h4 { color: var(--rx-epos-text); }
.tint-club  h4 { color: var(--rx-club-text); }

/* ---- closing call to action ---- */
.m-close { background: #0E1114; color: #fff; padding: 4.5rem 0; text-align: center; }
.m-close h2 { font-family: var(--rx-display); font-weight: 700; color: #fff;
              font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 auto 1rem; max-width: 20ch;
              letter-spacing: -.02em; }
.m-close p { color: rgba(255,255,255,.72); max-width: 44ch; margin: 0 auto 2rem;
             line-height: 1.6; }
.m-close .m-actions { justify-content: center; }
.m-foot { background: #0E1114; color: rgba(255,255,255,.55); padding: 0 0 3rem;
          font-size: .88rem; }
.m-foot .m-wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center;
                  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem; }
.m-foot a { color: rgba(255,255,255,.8); }

/* ---- motion (§3.5) -------------------------------------------------------
   🔴 ALL OF THIS IS CSS. Core sends `default-src 'self'` with no script-src
   exception, so there is no JavaScript on the public page and there cannot be —
   no scroll library, no animation framework. Keyframes, transitions and
   `animation-timeline: view()` do the lot, and the last one is behind
   @supports so a browser without it simply shows the content.

   🔴 AND ALL OF IT STOPS FOR `prefers-reduced-motion`. A moving page is a
   migraine or a vestibular problem for some readers, and this one moves a lot.
   The guard is at the bottom of this block and it is not optional.           */

/* The hero grid drifts, very slowly — enough to read as alive, not enough to
   distract while someone reads the headline. */
@keyframes m-drift { from { background-position: 0 0, 0 0; }
                     to   { background-position: 72px 72px, 72px 72px; } }
.m-hero::before { animation: m-drift 24s linear infinite; }

/* The arc rotates about its own centre, far off-screen, so the visible edge
   sweeps rather than spins. */
@keyframes m-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.m-hero::after { animation: m-sweep 150s linear infinite; }

/* A slow glow behind the headline. */
.m-hero .m-wrap::before {
  content: ""; position: absolute; left: -12rem; top: -6rem;
  width: 42rem; height: 32rem; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side,
              rgba(44,111,240,.30), rgba(44,111,240,0) 70%);
  animation: m-glow 11s ease-in-out infinite;
}
@keyframes m-glow { 0%,100% { opacity: .55; transform: scale(1); }
                    50%     { opacity: 1;   transform: scale(1.12); } }

/* Entrance. Staggered by nth-child so the hero assembles rather than appears. */
@keyframes m-rise { from { opacity: 0; transform: translateY(14px); }
                    to   { opacity: 1; transform: none; } }
.m-hero .m-eyebrow,
.m-hero h1,
.m-hero .m-lede,
.m-hero .m-actions,
.m-hero .m-strip { animation: m-rise .7s cubic-bezier(.2,.7,.3,1) backwards; }
.m-hero h1        { animation-delay: .08s; }
.m-hero .m-lede   { animation-delay: .16s; }
.m-hero .m-actions{ animation-delay: .24s; }
.m-hero .m-strip  { animation-delay: .32s; }

/* Scroll reveal, where the browser supports scroll-driven animations. Behind
   @supports so everything stays visible without it — a reveal that never fires
   is a blank page, which is the usual way this trick goes wrong.

   🔴 IT MOVES. IT DOES NOT FADE. DO NOT PUT OPACITY BACK IN.
   This used `m-rise`, which animates opacity 0 -> 1 on a view() timeline. The
   trouble is that a scroll-driven range is measured in fractions of the
   ELEMENT, not of the screen: `entry 0% cover 28%` completes quickly for a
   short element on a tall viewport, and slowly for a TALL element on a short
   one. A phone is the second case — one column, so every section is tall —
   and sections were measured on screen, mid-read, at **opacity 0.721**.

   At 0.72 a heading composites toward the band behind it: #0F784F on bone
   drops from 4.62:1 to roughly 2.6:1, and fainter still earlier in the range.
   That is exactly the "white text on white and bone" Craig reported twice, and
   the second report came after a contrast audit said the page was clean —
   because the audit disabled animations before measuring and never saw it.

   Animating transform alone cannot do this. A half-arrived element is still
   fully legible; it is just a few pixels low. The movement survives, the
   legibility is no longer a function of scroll position, and the whole class
   of bug goes with it. */
@keyframes m-slide { from { transform: translateY(14px); }
                     to   { transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .m-reveal { animation: m-slide .8s cubic-bezier(.2,.7,.3,1) both;
                animation-timeline: view(); animation-range: entry 0% cover 28%; }
  }
}

/* Cards lift and take on their own colour when pointed at. */
.m-product { transition: transform .22s cubic-bezier(.2,.7,.3,1),
                         box-shadow .22s ease, border-color .22s ease; }
.m-product:hover { transform: translateY(-4px); }
.m-product.shift:hover { border-color: var(--rx-shift-bright);
                         box-shadow: 0 18px 46px rgba(44,111,240,.30); }
.m-product.pay:hover   { border-color: var(--rx-pay-bright);
                         box-shadow: 0 18px 46px rgba(242,193,78,.26); }
.m-product.book:hover  { border-color: var(--rx-book-bright);
                         box-shadow: 0 18px 46px rgba(63,208,140,.26); }
.m-product.epos:hover  { border-color: var(--rx-epos-bright);
                         box-shadow: 0 18px 46px rgba(176,171,255,.26); }
.m-product.club:hover  { border-color: var(--rx-club-bright);
                         box-shadow: 0 18px 46px rgba(255,212,71,.26); }

/* ---- "one sign-in" diagram ----
   The claim the whole suite rests on, drawn rather than asserted: one account
   at the top, five products below, and a pulse travelling down each line. */
.m-flow { margin: 3rem 0 0; }
.m-flow-top { display: flex; justify-content: center; position: relative;
              padding-bottom: .9rem; }
/* A stem down from the node, so the account visibly feeds the rail below. */
.m-flow-top::after { content: ""; position: absolute; left: 50%; bottom: 0;
                     width: 1px; height: .9rem;
                     background: rgba(255,255,255,.28); }
.m-flow-node {
  font-family: var(--rx-display); font-weight: 700; font-size: .95rem;
  color: #fff; padding: .7rem 1.4rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.05);
}
.m-flow-lines { display: grid; grid-template-columns: repeat(5, 1fr);
                gap: 1rem; height: 3.25rem; position: relative; }
/* The horizontal rail joining the five wires. Spans centre-of-first to
   centre-of-last: with five equal columns that is 10% to 90%. Without it the
   diagram read as five loose lines under an unrelated pill. */
.m-flow-lines::before { content: ""; position: absolute; top: 0; left: 10%;
                        right: 10%; height: 1px;
                        background: rgba(255,255,255,.28); }
.m-flow-line { position: relative; }
.m-flow-line::before {                 /* the wire */
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.08));
}
.m-flow-line::after {                  /* the pulse travelling down it */
  content: ""; position: absolute; left: 50%; width: 5px; height: 5px;
  margin-left: -2px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 10px 2px currentColor;
  animation: m-pulse 2.6s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes m-pulse { 0% { top: -2px; opacity: 0; } 12% { opacity: 1; }
                     80% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
/* Staggered, so it reads as traffic rather than a drumbeat. */
.m-flow-line:nth-child(1) { color: var(--rx-shift-bright); }
.m-flow-line:nth-child(2) { color: var(--rx-pay-bright);   }
.m-flow-line:nth-child(3) { color: var(--rx-book-bright);  }
.m-flow-line:nth-child(4) { color: var(--rx-epos-bright);  }
.m-flow-line:nth-child(5) { color: var(--rx-club-bright);  }
.m-flow-line:nth-child(2)::after { animation-delay: .5s; }
.m-flow-line:nth-child(3)::after { animation-delay: 1s; }
.m-flow-line:nth-child(4)::after { animation-delay: 1.5s; }
.m-flow-line:nth-child(5)::after { animation-delay: 2s; }
@media (max-width: 540px) { .m-flow { display: none; } }

/* Buttons get a sheen on hover. */
.m-cta-primary { position: relative; overflow: hidden; }
.m-cta-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgba(0,0,0,.09), transparent);
}
.m-cta-primary:hover::after { animation: m-sheen .8s ease; }
@keyframes m-sheen { to { transform: translateX(120%); } }

/* 🔴 EVERYTHING ABOVE STOPS HERE IF THE READER HAS ASKED IT TO. */
@media (prefers-reduced-motion: reduce) {
  .m-hero::before, .m-hero::after, .m-hero .m-wrap::before,
  .m-hero .m-eyebrow, .m-hero h1, .m-hero .m-lede, .m-hero .m-actions,
  .m-hero .m-strip, .m-flow-line::after, .m-reveal, .m-cta-primary::after {
    animation: none !important;
  }
  .m-product { transition: none; }
  .m-product:hover { transform: none; }
  .m-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- the cover, centred -------------------------------------------------
   Craig, 2026-11-10, relaying a reader: "on first loading page I'd centralise
   all text. It's pushing everything to left hand side like it was in a book."
   Scoped to .m-hero on purpose — the story and suite bands below stay ragged-
   left, because those are READ, and centred body copy is genuinely harder to
   read once it runs past a couple of lines. A cover is looked at, not read. */
.m-hero .m-wrap { text-align: center; }
.m-hero h1,
.m-hero .m-lede { margin-left: auto; margin-right: auto; }
.m-hero .m-actions,
.m-hero .m-strip { justify-content: center; }

/* ---- device mockups -----------------------------------------------------
   🔴 NOT SCREENSHOTS, AND DELIBERATELY SO. Craig chose mockups over the real
   screens in RangeX/Sales/source/full/img, consistent with the 2026-11-09
   brief "dont give too much away that someone could copy and paste into ai to
   copy". These are INVENTED layouts, not the product's actual UI.

   🔴 BUT THEY CARRY REAL TYPE AND REAL CONTENT, and that is the whole point.
   The first version was grey bars and coloured blocks. Craig, 2026-11-10:
   "dont like those generic blocky bits" — correct, and predictable: a wireframe
   of placeholder rectangles reads as *unfinished*, which on a sales page is
   worse than no picture at all. What makes a mockup read as software is
   legible words and numbers doing a recognisable job. Shapes alone never do.

   So: sample figures, sample names, real labels. Clearly illustrative, nothing
   claimed, and no implementation detail — see the leak-word list in the tests
   before adding any text here.

   All CSS. Nothing is fetched, so none of this touches img-src, and there is
   nothing to keep in sync as the real products move. */
.m-mock {
  --mk: #fff;
  background: #15191C; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 24px 60px rgba(21,25,28,.22);
  width: 100%; max-width: 27rem; margin-inline: auto;
  color: #fff; text-align: left;
}
.m-mock-shift { --mk: #5B8DEF; }
.m-mock-pay   { --mk: #F2C14E; }
.m-mock-book  { --mk: #3FD08C; }
.m-mock-epos  { --mk: #B0ABFF; }
.m-mock-club  { --mk: #FFD447; }

/* A titled header beats three dots: it says what you are looking at. */
.m-mock-bar { display: flex; align-items: center; gap: .5rem;
              padding: .7rem .95rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.m-mock-bar b { font-family: var(--rx-display); font-size: .82rem; font-weight: 700;
                color: #fff; letter-spacing: -.01em; }
.m-mock-bar em { font-style: normal; font-size: .72rem; color: rgba(255,255,255,.5);
                 margin-left: auto; }
.m-mock-pill { font-size: .62rem; font-weight: 700; letter-spacing: .08em;
               text-transform: uppercase; color: var(--mk);
               border: 1px solid color-mix(in srgb, var(--mk) 45%, transparent);
               border-radius: 999px; padding: .15rem .45rem; }
.m-mock-body { padding: .95rem; display: grid; gap: .7rem; align-content: start; }

/* Shared bits. */
.mk-label { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
            color: rgba(255,255,255,.52); font-weight: 600; }
.mk-big { font-family: var(--rx-display); font-weight: 700; font-size: 1.85rem;
          letter-spacing: -.025em; line-height: 1; color: #fff; }
.mk-up { font-size: .72rem; color: #5BD69B; }

/* RangeBook — a tee sheet. */
.mk-sheet { display: grid; gap: .3rem; }
.mk-slot { display: flex; align-items: center; gap: .6rem; padding: .4rem .55rem;
           border-radius: 8px; background: rgba(255,255,255,.045); font-size: .76rem; }
.mk-slot time { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.9);
                font-weight: 600; min-width: 3.1rem; }
.mk-slot span { color: rgba(255,255,255,.62); }
.mk-slot u { text-decoration: none; margin-left: auto; font-size: .66rem;
             font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
             color: var(--mk); }
.mk-slot.free { background: none; border: 1px dashed rgba(255,255,255,.14); }
.mk-slot.free u { color: rgba(255,255,255,.62); }

/* RangeClub — a leaderboard. */
.mk-lb { display: grid; gap: .25rem; }
.mk-lb div { display: flex; align-items: center; gap: .6rem; font-size: .78rem;
             padding: .33rem .55rem; border-radius: 7px; }
.mk-lb div:first-child { background: color-mix(in srgb, var(--mk) 14%, transparent); }
.mk-lb i { font-style: normal; font-size: .68rem; font-weight: 700; width: 1rem;
           color: rgba(255,255,255,.62); }
.mk-lb div:first-child i { color: var(--mk); }
.mk-lb span { color: rgba(255,255,255,.88); }
.mk-lb b { margin-left: auto; font-variant-numeric: tabular-nums;
           font-family: var(--rx-display); color: #fff; }

/* RangePay — the dispenser screen. */
.mk-pay { display: grid; gap: .75rem; justify-items: center; text-align: center; }
.mk-wave { position: relative; width: 46px; height: 42px; }
.mk-wave i { position: absolute; top: 50%; left: 6px; translate: 0 -50%;
             border: 2.5px solid var(--mk); border-radius: 50%;
             border-color: transparent var(--mk) transparent transparent; }
.mk-wave i:nth-child(1) { width: 13px; height: 13px; opacity: .45; }
.mk-wave i:nth-child(2) { width: 25px; height: 25px; opacity: .7; }
.mk-wave i:nth-child(3) { width: 37px; height: 37px; }
.mk-baskets { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem;
              width: 100%; }
.mk-baskets div { border-radius: 9px; padding: .5rem .3rem; text-align: center;
                  background: rgba(255,255,255,.05);
                  border: 1px solid rgba(255,255,255,.1); }
.mk-baskets div.on { border-color: var(--mk);
                     background: color-mix(in srgb, var(--mk) 16%, transparent); }
.mk-baskets b { display: block; font-family: var(--rx-display); font-size: .92rem;
                color: #fff; }
.mk-baskets span { font-size: .64rem; color: rgba(255,255,255,.55); }
.mk-baskets div.on span { color: var(--mk); }

/* RangeEPOS — a till: keys beside a running receipt. */
.mk-till { display: grid; grid-template-columns: 1fr 7.4rem; gap: .55rem; }
.mk-keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; }
.mk-keys span { border-radius: 7px; padding: .45rem .4rem; font-size: .68rem;
                line-height: 1.25; color: rgba(255,255,255,.82);
                background: color-mix(in srgb, var(--mk) 13%, transparent);
                border: 1px solid rgba(255,255,255,.08); }
.mk-receipt { border-radius: 8px; padding: .5rem; background: rgba(255,255,255,.05);
              display: grid; gap: .22rem; align-content: start; font-size: .66rem; }
.mk-receipt p { display: flex; gap: .4rem; margin: 0; color: rgba(255,255,255,.66); }
.mk-receipt p b { margin-left: auto; color: rgba(255,255,255,.85); font-weight: 500;
                  font-variant-numeric: tabular-nums; }
.mk-receipt p.tot { margin-top: .3rem; padding-top: .3rem;
                    border-top: 1px solid rgba(255,255,255,.14);
                    color: #fff; font-weight: 700; }
.mk-receipt p.tot b { color: var(--mk); font-weight: 700; }

/* RangeShift — a week of shifts.
   🔴 The time labels sit on a SOLID tint, not a translucent one. At 60% over
   ink they measured 3.05:1 against dark text — unreadable at 9px, which is
   precisely the complaint that started this whole thread. */
.mk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.mk-week > div { display: grid; gap: .25rem; align-content: start; }
.mk-dow { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em;
          color: rgba(255,255,255,.62); text-align: center; font-weight: 700; }
.mk-shift { border-radius: 5px; padding: .3rem .12rem; text-align: center;
            font-size: .56rem; font-weight: 700; line-height: 1.15;
            background: var(--mk); color: #0B0E11; }
.mk-shift.alt { background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
.mk-tot { display: flex; font-size: .68rem; color: rgba(255,255,255,.6);
          padding-top: .5rem; border-top: 1px solid rgba(255,255,255,.1); }
.mk-tot b { margin-left: auto; color: #fff; font-family: var(--rx-display); }

/* ---- the hero's own mockup ---- */
.m-hero-mock { position: relative; margin: 3rem auto 0; max-width: 31rem; }
.m-hero-mock .m-mock { max-width: none; }
.mk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.mk-tiles div { padding: .55rem .5rem; border-radius: 9px;
                background: rgba(255,255,255,.05); }
.mk-tiles b { display: block; font-family: var(--rx-display); font-size: 1rem;
              color: #fff; letter-spacing: -.02em; }
.mk-tiles span { font-size: .6rem; color: rgba(255,255,255,.5); }
.mk-chart { display: flex; align-items: flex-end; gap: .35rem; height: 3.4rem; }
.mk-chart s { display: block; flex: 1; border-radius: 4px 4px 0 0;
              background: color-mix(in srgb, var(--mk) 55%, transparent); }
.mk-chart s.tall { background: var(--mk); }
.mk-axis { display: flex; gap: .35rem; font-size: .56rem;
           color: rgba(255,255,255,.62); }
.mk-axis span { flex: 1; text-align: center; }
.m-hero-phone {
  position: absolute; right: -.75rem; bottom: -1.75rem; width: 104px;
  background: #0A0D0F; border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px; padding: .5rem .45rem; display: grid; gap: .3rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.5); text-align: left;
}
.m-hero-phone .mk-label { font-size: .5rem; }
.m-hero-phone p { margin: 0; font-size: .6rem; display: flex; gap: .3rem;
                  color: rgba(255,255,255,.72); }
.m-hero-phone p b { margin-left: auto; color: #fff; font-weight: 600; }
.m-hero-phone p.on b { color: var(--rx-shift-bright); }
@media (max-width: 600px) { .m-hero-phone { display: none; } }

/* ---- feature row: text beside the mockup ---- */
.m-feature-top { display: grid; grid-template-columns: 1.05fr .95fr;
                 gap: 3rem; align-items: center; margin-bottom: 2.5rem; }
@media (max-width: 760px) {
  .m-feature-top { grid-template-columns: 1fr; gap: 2rem; }
  /* Picture first on a phone: it is the thing that stops the scroll. */
  .m-feature-top .m-mock { order: -1; }
}
.m-feature .m-feature-intro p.m-sub { margin-bottom: 0; }

/* ---- motion, all of it optional ---- */
@media (prefers-reduced-motion: no-preference) {
  .mk-wave i { animation: mk-ping 2.4s ease-out infinite; }
  .mk-wave i:nth-child(2) { animation-delay: .18s; }
  .mk-wave i:nth-child(3) { animation-delay: .36s; }
  @keyframes mk-ping { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
  .mk-chart s { animation: mk-grow 3.2s ease-in-out infinite alternate;
                transform-origin: bottom; }
  .mk-chart s:nth-child(2) { animation-delay: .25s; }
  .mk-chart s:nth-child(3) { animation-delay: .5s; }
  .mk-chart s:nth-child(4) { animation-delay: .75s; }
  .mk-chart s:nth-child(5) { animation-delay: 1s; }
  .mk-chart s:nth-child(6) { animation-delay: 1.25s; }
  @keyframes mk-grow { from { transform: scaleY(.76); } to { transform: scaleY(1); } }
}

/* ---------- Colours (templates/_look_form.html, static/look.js) — 2026-11-25 ----------
   The preview's own colours are the company's, set inline; nothing here may
   set a colour on it, or the preview would lie. */
.look-colour { display: flex; gap: .5rem; align-items: center; }
.look-colour input[type=color] { width: 2.6rem; height: 2.4rem; padding: 2px; flex: none;
  border: 1px solid var(--line-control); border-radius: 8px; background: none; cursor: pointer; }
.look-colour input[type=text] { flex: 1; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.look .label { display: block; font-weight: 600; margin: 1rem 0 .3rem; font-size: .88rem; }
.look-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 340px; }
.look-bar { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; font-size: .95rem; }
.look-bar span { opacity: .85; font-size: .8rem; }
.look-body { padding: .9rem 1rem 1.1rem; font-size: .9rem; }
.look-body p { margin: 0 0 .6rem; }
.look-h { font-weight: 700; font-size: 1.15rem; }
.look-button { display: inline-block; padding: .55rem 1rem; border-radius: 999px; font-weight: 600; margin-right: .4rem; }
.look-chip { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.look-link { margin-top: .8rem !important; font-weight: 600; text-decoration: underline; }

/* The Preprod marker (RANGEX_ENV=preprod): a soft chip with a word, on every
   page of the test system and never on live. */
.env-chip { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .78rem;
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: #7A4D00; background: rgba(196,120,0,.12); border: 1px solid rgba(196,120,0,.35); }
:root[data-theme="dark"] .env-chip { color: #F2D492; background: none; border-color: rgba(242,212,146,.4); }
