/* ==========================================================================
   CoA Website — Reusable Component Styles
   Built on the tokens in coa-tokens.css (load that file first). Patterns
   (data-theme toggle, focus-visible ring, skip-link, sticky header) mirror
   apps.carrieonaccessibility.com's style.css for continuity across the two
   sites, but every color reference here is a --coa token, never a raw hex.
   See ../internal-tools/coa-library/ (the CoA Design System) for a live preview of
   every component below.
   ========================================================================== */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* always leave room for the scrollbar, so a short page and a long one line
     up instead of the whole layout jumping sideways between them */
  scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Verdana for everything you READ - body copy, links, cards, buttons, labels.
   Its wide letters and tall x-height are far easier going than the system
   font at the same size. Headings keep the system font below, as a display
   face. Nothing on the site is set smaller than 16px, anywhere. */
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* sans-serif always, per request — same stack as body, no serif anywhere.
   Sizing/weight/spacing below is what carries the hierarchy instead. */
h1, h2, h3, h4 {
  /* the display face: headings only */
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-wrap: balance;
  color: var(--text);
  margin: 0;
}
/* The scale, her call 2026-09-24: h1 down 4, h2 up 2, h3 up 4, h4 up 2.
   It pulls the ends toward each other and opens the middle - h2 to h3
   used to be a 6px drop and is now 4, h3 to h4 was 2 and is now 4, so
   the levels that carry a page's structure are the ones that step
   clearly (h2 and h3 each took another 2px, her call the same day).
   Nothing goes under 16px. .eyebrow moves with h4 below,
   because it is h4's twin and promises the same type. */
h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
h2 { font-size: 28px; font-weight: 700; line-height: 1.25; }
h3 { font-size: 24px; font-weight: 700; line-height: 1.3; }
h4 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  /* the new pink-4 in dark, the wine step of the same family in light - her
     pick, 2026-09-23. The same --label the tools' section headings use. */
  color: var(--label);
}
/* .eyebrow is h4's non-heading twin: the same small uppercase label, for the
   places where it is NOT a heading - the kicker above a section heading on
   the website, the caption on each little card in the tracker. Using an h4
   there would either split the section's outline in two or skip a level for
   a purely visual effect. Same type as h4, its own colour. */
/* A link that IS a heading reads differently from a link in a sentence: the
   heading is already the loud thing, so the link colour only has to say "this
   one is clickable". Her picks, 2026-09-24. */
h2 a { color: var(--h2-link); }
h3 a { color: var(--h3-link); }
/* their own hover, not the body link's - see --h2-link-hover in the tokens */
h2 a:hover, h2 a:focus-visible { color: var(--h2-link-hover); }
h3 a:hover, h3 a:focus-visible { color: var(--h3-link-hover); }
/* the second small-label colour, for where the pink one is not wanted */
h4.alt, .eyebrow.alt { color: var(--label-alt); }
/* AN APPROVED DEVIATION, her call 2026-09-24 - see Deviations > Approved.
   A footer column's heading and a sidebar group's heading are h3 for the
   OUTLINE, so the levels do not skip, while looking like a small label
   rather than a 22px heading. Making them a real h3's size would turn a
   footer column and a sidebar section into headlines.
   It is one class used by both, so the two match by construction rather
   than by two people picking similar numbers - which is what they were
   doing before (16px/800/.06em in the footer, 16px/700/.07em in the
   sidebar, and different colours). */
h3.section-label {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label);
  margin: 0 0 var(--space-3);
}

.eyebrow {
  display: block;
  margin: 0 0 var(--space-3);
  font-size: 18px;   /* h4's twin - moves when h4 moves */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--eyebrow-text);
}

code, .mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--link); }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration-thickness: 2px; }
/* a link that opens in a new tab (her ask 2026-09-27): the "Opens in a new
   tab" icon after the words, in its own color (--newtab-icon: cream-1 dark,
   gold-4 light - her rule), and the same words in .sr-only for a screen
   reader. See Design > Links. */
.newtab-icon {
  width: 1em; height: 1em; margin-inline-start: var(--space-1); vertical-align: -0.125em;
  fill: none; stroke: var(--newtab-icon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@media (forced-colors: active) { .newtab-icon { stroke: LinkText; } }
/* APPROVED DEVIATION (2026-09-27, Deviations > Approved "newtab-on-button"):
   on a button the icon takes the button's own text color. Gold-4 on the
   wine primary button is 1.7:1 in light mode. */
.btn .newtab-icon { stroke: currentColor; }
@media (forced-colors: active) { .btn .newtab-icon { stroke: ButtonText; } }

*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   The gap between one block and the next

   Nothing should sit flush against the thing above it. A block that stands
   on its own - an alert, a table, a picture, a quote, a rule, a run of
   long-form text - carries its own gap, so no page has to remember to add
   one and no two pages end up with a different idea of how much.

   Two things keep it out of the way:

   - It only spaces a block that FOLLOWS something, so the first thing
     inside a panel still sits where the panel's own padding puts it.
   - It is written inside :where(), which counts for nothing at all in the
     cascade. Any rule further down - a grid's gap, a component's own
     margin, a page's layout - still wins, with no !important needed.
   --------------------------------------------------------------------- */
:where(* + .alert,
       * + .prose,
       * + table,
       * + figure,
       * + blockquote,
       * + pre,
       * + hr,
       /* a form's error summary is the form's first child, so it has no
          sibling above it - but whatever is just before the form (Contact's
          "Not switched on yet", a builder's About) still sits right on top
          of it (her catch 2026-09-26), and what comes after it sat flush
          under it (the builders, 2026-09-27) */
       * + form > .alert:first-child,
       form > .alert:first-child + *) { margin-top: var(--block-gap); }

/* Visible only when focused, so keyboard users can jump past the header */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  /* the accent fill with the text colour made for it: 12.6:1 dark, 8.3:1
     light. It was charcoal on --focus-ring, which is 2.3:1 in light mode -
     and a:focus-visible then won on specificity and turned the words the
     hover colour, the same as the fill (1.1:1). Found 2026-09-24. */
  background: var(--accent-strong);
  color: var(--accent-text);
  padding: var(--space-3) var(--space-5);
  font-weight: 700;
  z-index: 1000;
  border-radius: 0 0 var(--radius-control) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }
.skip-link:focus, .skip-link:focus-visible { color: var(--accent-text); outline-color: var(--text); }

/* ---------------------------------------------------------------------
   Header + theme toggle
   --------------------------------------------------------------------- */
/* The header is its own dark-teal band in BOTH themes - no border, because
   the colour change already separates it from the page, and a 2px rule on top
   of that read as far too heavy. Since the band stays dark in light mode, it
   scopes the dark theme's text and border tokens so everything inside it keeps
   its contrast. Same trick as the home page's hero band. */
/* a link to a heading (approved.html#dropdown-arrow) lands it BELOW the
   sticky bar, not under it: the bar's height plus a step of room */
html { scroll-padding-top: calc(72px + var(--space-4)); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  /* darkteal-3, her pick 2026-09-23 - one step deeper than the darkteal-4
     this used to be. One rule: the website and every internal tool take
     their title bar from here. */
  background-color: var(--darkteal-3);
  /* Invisible here - the same colour as the band itself. Windows High
     Contrast throws our colours away and repaints borders in the system
     colour, so this is what keeps the header separated from the page once
     the colour doing that job is gone. Same trick as the footer. */
  border-bottom: 2px solid var(--darkteal-3);
  --text: var(--true-white);
  --text-muted: var(--pink-8);
  --border: var(--gray-8);
  --link: var(--gold-11);
  --link-hover: var(--cream-1);
  --nav-accent: var(--teal-6);
  --accent-text: var(--true-black);
  --accent-strong: var(--gold-9);
  --focus-ring: var(--gold-11);
  --btn-secondary-text: var(--cream-1);
  --btn-secondary-border: var(--cream-1);
  /* surfaces as well as text: the theme toggle fills with --surface-2 on
     hover, and the light theme's near-white there put white text on white */
  --surface: var(--charcoal-1);
  --surface-2: var(--gray-1);
  color: var(--text);
}
.site-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  /* NOT inline-flex: that makes each word its own box, so hovering drew a
     separate underline under each one. Inline keeps the whole title a single
     run of text with one continuous underline. */
  display: inline-block;
  /* the title is a link home, but it reads as the site name: main text
     color (not the link color) and no underline until hover/focus */
  color: var(--text);
  text-decoration: none;
}
.site-title:hover, .site-title:focus-visible { color: var(--text); text-decoration: underline; }
/* the second word matches the first - it used to be italic, which made the
   title read as two things rather than one name */
.site-title .accent { font-style: normal; }
/* anything sitting beside the words (the site's gradient mark) lines up
   without turning the title into a flex row */
/* the circle logo beside the site's name */
.site-title .mark {
  vertical-align: middle; margin-right: var(--space-3);
  width: 34px; height: 34px; border-radius: 50%;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
}
.header-nav a {
  /* ice-3, her pick 2026-09-23: the unselected links sit a step back from the
     white site title without losing contrast on the header band. 10.2:1 on
     darkteal-3, so a link is still AAA before it is the current page. */
  color: var(--ice-3);
  text-decoration: none;
  padding: var(--space-1) 2px;
  /* every link reserves the SAME 4px underline, transparent until it is
     wanted - a thicker border on the current page used to make that one link
     taller and shift the whole row as you moved between pages */
  border-bottom: 4px solid transparent;
  transition: border-bottom-color 0.15s ease, filter 0.15s ease;
}
/* pointed at: a 2px line (her ask, 2026-09-26), thinner than the current
   page's 4px so the two never look the same. It sits at the TOP of the
   reserved 4px space, so it starts the same distance under the word as the
   current page's line (her call 2026-09-26: tops aligned, not bottoms);
   nothing moves, and the current page's own border paints over it. */
.header-nav a:hover, .header-nav a:focus-visible {
  background: linear-gradient(var(--nav-accent), var(--nav-accent)) no-repeat left 0 bottom 2px / 100% 2px;
  background-origin: border-box;
  filter: brightness(1.1);
}
/* current page: the underline is filled in and the text steps up to white,
   so it reads as "you are here" rather than as another hover state */
.header-nav a[aria-current="page"] {
  color: var(--true-white);
  border-bottom-color: var(--nav-accent);
}

/* ---- Windows High Contrast ----
   Every link reserves an underline so the row cannot shift, and High Contrast
   paints reserved borders too - which put a line under all five links. Here
   the unused ones are painted in the page's own background colour, so only
   the current page (and whatever you are on) shows a line. */
@media (forced-colors: active) {
  .header-nav a { border-bottom-color: Canvas; }
  .header-nav a[aria-current="page"],
  .header-nav a:hover,
  .header-nav a:focus-visible { border-bottom-color: CanvasText; }
}

.theme-toggle-group {
  display: flex;
  gap: var(--space-1);
  border: 2px solid var(--border);
  border-radius: var(--radius-control);
  padding: 3px;
  flex-shrink: 0;
}
.theme-toggle-btn {
  background-color: transparent;
  color: var(--text);
  border: none;
  border-radius: var(--radius-small);
  padding: var(--space-2) var(--space-4);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, filter 0.15s ease;
}
.theme-toggle-btn:hover { background-color: var(--surface-2); filter: brightness(1.05); }
/* the title bar's switch has its own fill - see --theme-toggle-on. Every
   other switch on the site still uses --toggle-on. */
.theme-toggle-btn[aria-checked="true"] {
  background-color: var(--theme-toggle-on);
  color: var(--toggle-on-text);
}

/* ---- Windows High Contrast ----
   In High Contrast the browser replaces every background and text colour with
   the user's own, so a selected state shown ONLY by a fill disappears: both
   theme buttons looked identical. These rules use the system's own selection
   colours, which High Contrast keeps, plus a border on each button so they
   are still telling apart. */
@media (forced-colors: active) {
  .theme-toggle-group { border-color: ButtonBorder; }
  .theme-toggle-btn {
    border: 2px solid ButtonBorder;
    forced-color-adjust: none;
    background-color: ButtonFace;
    color: ButtonText;
  }
  .theme-toggle-btn[aria-checked="true"] {
    background-color: Highlight;
    color: HighlightText;
    border-color: HighlightText;
  }
  .theme-toggle-btn:focus-visible { outline: 3px solid CanvasText; outline-offset: 2px; }
}

/* Hamburger toggle for .header-nav, shown on narrow viewports. Hidden by
   default; only shown (via the media query below) once JS has actually
   added the .has-nav-toggle class, so a no-JS page just keeps showing the
   full inline nav instead of a hamburger with nothing to open it. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 2px solid var(--nav-accent);
  border-radius: var(--radius-control);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  background-color: color-mix(in srgb, var(--nav-accent) 15%, transparent);
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background-color: var(--text);
  transition: transform 0.15s ease, opacity 0.15s ease, top 0.15s ease;
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .site-header.has-nav-toggle .nav-toggle { display: inline-flex; }
  .site-header.has-nav-toggle .header-nav,
  .site-header.has-nav-toggle .theme-toggle-group { display: none; }
  /* keep the title and hamburger on one row instead of wrapping, and drop
     the "component library" half of the title so the short "CoA Website"
     that's left comfortably fits alongside it */
  .site-header.has-nav-toggle { flex-wrap: nowrap; }
  .site-header.has-nav-toggle .site-title { min-width: 0; overflow: hidden; }
  .site-header.has-nav-toggle .site-title .accent { display: none; }
}

/* ---------------------------------------------------------------------
   The content column, and the head of a page

   .wrap is the column everything sits in: capped on a desktop so lines do
   not run the full width of a wide screen, full width below that, where a
   percentage would only waste space. The title bar is NOT bound by it - it
   spans the window. Set --page-width to change it for a whole surface.
   --------------------------------------------------------------------- */
.wrap { max-width: var(--page-width); margin: 0 auto; padding-inline: var(--space-6); }

/* ---- the way back to the thing this sits inside ----

     <p class="crumb"><a href="./">&larr; All pages</a></p>

   NOT the same as the back arrow in the title bar. The arrow leaves the tool
   altogether - it means "out of here". This means "up one level, still inside
   this tool": out of a page and back to the list of them. Two different
   journeys, so two different controls; the tracker wanted one of these too.
   It sits first inside .page-head, above the heading. */
.crumb { margin: 0 0 var(--space-3); font-size: 16px; }
.crumb a { font-weight: 700; }

.page-head { margin-bottom: var(--space-7); }
/* .h1 is for anything that should look like the page title without
   being a second one - a sample of it in the CoA Design System, say */
.page-head h1, .page-head .h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; }
.page-head .standfirst { font-size: 18px; margin: var(--space-4) 0 0; }
.page-head .updated { color: var(--text-muted); margin: var(--space-3) 0 0; }

/* cards laid out as many across as will fit */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-5); }
/* at most two across, one when a card would be under 240px. Her rule
   (2026-09-27): how many go across depends on the content - small compact
   cards (video cards) 3, cards with a lot of text 2 at most. */
.card-grid.two-across { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(240px, calc((100% - var(--space-5)) / 2))), 1fr)); }
/* a card that takes the whole row, in any card grid */
.card-grid > .full-width { grid-column: 1 / -1; }

/* ---------------------------------------------------------------------
   Title bar of an inside page - a tool or the CoA Design System.

     [back] [icon] Name                                  [Settings]

   The back button is the menu button's twin: same square, same border, so
   the two read as a pair when both are showing. The gap belongs between
   the button and the tool, not inside the tool's own name, so its icon
   sits close to the words it belongs to.
   --------------------------------------------------------------------- */
.header-left { display: inline-flex; align-items: center; gap: var(--space-4); min-width: 0; }
/* the nav stands off the title by more than the 18px that spaces the little
   cluster of buttons beside it: 18 + 14 = 32px. The website and the tools had
   drifted apart here - the tools' sheet added 10px of its own and the website
   had none - so it is one rule in one place now. */
.header-left .header-nav { margin-left: var(--space-4); }
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* the same height as the Light/Dark switch beside it, measured: 40px */
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--teal-6);
  border-radius: var(--radius-control);
  cursor: pointer;
  text-decoration: none;
}
.back-btn:hover, .back-btn:focus-visible {
  background: var(--teal-hover);
  color: var(--text);
}
.tool-mark { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-title .tool-mark { margin-right: var(--space-2); vertical-align: middle; }

/* a plain button that lives in the title bar, like Settings */
.header-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius-control);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}
.header-link:hover, .header-link:focus-visible {
  background: var(--teal-hover);
  border-color: var(--teal-6);
}
/* cream-2, her pick 2026-09-24 - the gear sits a step back from the word
   beside it rather than competing with it. 14.9:1 on the title bar. */
.header-link .gear { font-size: 16px; line-height: 1; color: var(--cream-2); }

/* ---- "Saving…" / "Saved" in the title bar ---- */
.top-actions { display: inline-flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
/* The width is reserved so that "Saving…" appearing does not shove the
   buttons beside it sideways. When there is nothing to say it reserves
   nothing, or every title bar carries eight characters of empty air between
   the theme switch and Settings. */
.save-state { color: var(--text-muted); min-width: 8ch; }
/* display:none, not min-width:0 - an empty flex item still takes its share
   of the row's gap, which left 20px on one side of it and 10px on the other.
   It comes back the moment it has something to say, because :empty stops
   matching. */
.save-state:empty { display: none; }
.save-state.dirty { color: var(--accent); font-weight: 700; }

/* ---- LIGHT MODE TITLE BAR (her call 2026-09-25, website and tools) ----
   In light mode the bar is ice-3 and takes the page's own light colors
   instead of the dark ones set above. Things typed as dark-bar colors get
   light-mode ones: nav links darkteal-4 (8.1:1), the current page black,
   the back button and hover borders teal-1, the gear darkteal-4, and the
   tools' marks teal-1 / gold-3 (5.7 / 6.3:1; the light blue was 1.5:1). */
:root[data-theme="light"] .site-header:not(.theme-dark *),
.theme-light .site-header { background-color: var(--ice-3); border-bottom-color: var(--ice-3); --text: inherit; --text-muted: inherit; --border: inherit; --link: inherit; --link-hover: inherit; --nav-accent: inherit; --accent-text: inherit; --accent-strong: inherit; --focus-ring: inherit; --btn-secondary-text: inherit; --btn-secondary-border: inherit; --surface: inherit; --surface-2: inherit; }
:root[data-theme="light"] .site-header .header-nav a:not(.theme-dark *),
.theme-light .site-header .header-nav a { color: var(--darkteal-4); }
:root[data-theme="light"] .site-header .header-nav a[aria-current="page"]:not(.theme-dark *),
.theme-light .site-header .header-nav a[aria-current="page"] { color: var(--true-black); }
:root[data-theme="light"] .site-header .back-btn:not(.theme-dark *),
.theme-light .site-header .back-btn { border-color: var(--teal-1); }
:root[data-theme="light"] .site-header .header-link:hover:not(.theme-dark *),
.theme-light .site-header .header-link:hover { border-color: var(--teal-1); }
:root[data-theme="light"] .site-header .header-link:focus-visible:not(.theme-dark *),
.theme-light .site-header .header-link:focus-visible { border-color: var(--teal-1); }
:root[data-theme="light"] .site-header .header-link .gear:not(.theme-dark *),
.theme-light .site-header .header-link .gear { color: var(--darkteal-4); }
:root[data-theme="light"] .site-header .tool-mark svg[stroke="#4fc3f7"]:not(.theme-dark *),
.theme-light .site-header .tool-mark svg[stroke="#4fc3f7"] { stroke: var(--teal-1); }
:root[data-theme="light"] .site-header .tool-mark svg[stroke="#ffc233"]:not(.theme-dark *),
.theme-light .site-header .tool-mark svg[stroke="#ffc233"] { stroke: var(--gold-3); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-header:not(.theme-dark *) { background-color: var(--ice-3); border-bottom-color: var(--ice-3); --text: inherit; --text-muted: inherit; --border: inherit; --link: inherit; --link-hover: inherit; --nav-accent: inherit; --accent-text: inherit; --accent-strong: inherit; --focus-ring: inherit; --btn-secondary-text: inherit; --btn-secondary-border: inherit; --surface: inherit; --surface-2: inherit; }
  :root:not([data-theme="dark"]) .site-header .header-nav a:not(.theme-dark *) { color: var(--darkteal-4); }
  :root:not([data-theme="dark"]) .site-header .header-nav a[aria-current="page"]:not(.theme-dark *) { color: var(--true-black); }
  :root:not([data-theme="dark"]) .site-header .back-btn:not(.theme-dark *) { border-color: var(--teal-1); }
  :root:not([data-theme="dark"]) .site-header .header-link:hover:not(.theme-dark *) { border-color: var(--teal-1); }
  :root:not([data-theme="dark"]) .site-header .header-link:focus-visible:not(.theme-dark *) { border-color: var(--teal-1); }
  :root:not([data-theme="dark"]) .site-header .header-link .gear:not(.theme-dark *) { color: var(--darkteal-4); }
  :root:not([data-theme="dark"]) .site-header .tool-mark svg[stroke="#4fc3f7"]:not(.theme-dark *) { stroke: var(--teal-1); }
  :root:not([data-theme="dark"]) .site-header .tool-mark svg[stroke="#ffc233"]:not(.theme-dark *) { stroke: var(--gold-3); }
}

/* ---------------------------------------------------------------------
   Tabs - a row of choices drawn as one control (Design > Tabs).

     <nav class="tabs"><a href="palette.html" aria-current="page">…</a></nav>
     <div class="tabs" role="tablist"><button role="tab" aria-selected="true">…

   Two kinds, one look: LINK tabs (each tab its own page, aria-current) and
   tabs on ONE page (role="tab", aria-selected; js/coa-library.js wires
   them). They live in pages now, not in the title bar - the title bar has
   .header-nav (2026-09-25: the title-bar-only rules were removed).
   --------------------------------------------------------------------- */
.tabs {
  /* inline, so it ends where its last tab ends. As a block it stretched to
     whatever it sat in, which on a page (rather than in the title bar) left a
     long empty run of black to the right of the last tab. Her catch. */
  /* flex + fit-content rather than inline-flex (2026-09-24, her note about
     "double the gap everywhere"): an INLINE box's margins never merge with
     its neighbours', so its 22px below was being added to the next thing's
     36px on top. A block that shrinks to fit ends in the same place and lets
     the margins merge the way every other block's do. */
  display: flex;
  width: fit-content;
  /* her pick 2026-09-26 (Playground tabs version 13): no box and no line
     under the row; the tabs touch, each on the panel color with its own thin
     underline, and the chosen one is gold. */
  border: none;
  border-radius: 0;
  padding: 0;
  gap: 0;
  margin: 0;
  background-color: transparent;
}
.tabs a, .tabs button {
  display: block;
  font: inherit;
  /* a tab not chosen: the panel color, with a 2px gray-3 underline */
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--gray-3);
  border: none;
  cursor: pointer;
  /* 16px at the sides, her pick 2026-09-26 (between the old 12 and a 22 she tried) */
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-control) var(--radius-control) 0 0;
  /* --text again (2026-09-24). It was white because the box was black in
     both themes; since the box went transparent, white sat on the cream page
     in light mode and the unselected tabs vanished. The title bar sets --text
     to white itself, so the switch there is unchanged. */
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
/* hover: gold 3 at the teal hover's opacity (--gold-hover), to match the
   gold chosen tab - her ask 2026-09-26 */
.tabs a:hover, .tabs a:focus-visible,
.tabs button:hover, .tabs button:focus-visible { background: var(--gold-hover); }
/* the chosen tab: gold 3 with white text (8.6:1, AAA) and a 4px gold 9
   underline, in both themes (her pick 2026-09-26; it was --selected-bg, the
   dark teal that echoed the title bar's nav). Real tabs (role="tab",
   switching panels on one page) say which is chosen with aria-selected. */
.tabs a[aria-current="page"],
.tabs button[aria-pressed="true"],
.tabs button[aria-selected="true"] {
  background: var(--gold-3);
  color: var(--true-white);
  box-shadow: inset 0 -4px 0 var(--gold-9);
}
/* High Contrast replaces every fill with the user's own colours, so a
   selected tab shown only by a fill disappears - the same problem the theme
   toggle had. System selection colours survive; a border keeps the three
   tabs telling apart. */
@media (forced-colors: active) {
  .tabs { border-color: ButtonBorder; }
  .tabs a, .tabs button { border: 2px solid ButtonBorder; }
  .tabs a[aria-current="page"], .tabs button[aria-pressed="true"],
  .tabs button[aria-selected="true"],
  .tabs a:hover, .tabs a:focus-visible,
  .tabs button:hover, .tabs button:focus-visible {
    forced-color-adjust: none;
    background-color: Highlight;
    color: HighlightText;
  }
}

@media (max-width: 760px) {
  .header-left { gap: var(--space-3); }
  .back-btn, .nav-toggle { width: 36px; height: 36px; }
}
@media (forced-colors: active) {
  .back-btn, .header-link, .nav-toggle { border-color: ButtonBorder; }
  .back-btn:hover, .back-btn:focus-visible,
  .header-link:hover, .header-link:focus-visible {
    forced-color-adjust: none;
    background-color: Highlight;
    color: HighlightText;
  }
}

/* ---------------------------------------------------------------------
   Dialogs - ONE set of rules for every modal, on the website and in the
   internal tools, which load this file across from preview. A modal is:

     <dialog class="coa-dialog">
       <div class="dlg-head"><h2>Title</h2>
         <button class="close-x" aria-label="Close">&times;</button></div>
       <div class="dlg-body"> ... </div>
       <div class="dlg-foot"> ... </div>          (optional)
     </dialog>

   What one dialog needs differently - its width, how its body is laid out -
   goes in that surface's own stylesheet as a short override. Never a second
   copy of these rules: they used to live in five files, and a change to the
   close button meant five edits.
   --------------------------------------------------------------------- */
.coa-dialog {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-box);
  /* literal fallbacks: the internal tools read this file across from
     preview, and an undefined colour renders transparent */
  background-color: var(--bg);
  color: var(--text);
  width: min(360px, calc(100% - 48px));
  max-height: 85vh;
  overflow: hidden;
}
/* the looks hang on the class, so a plain <div> can carry them as a
   sample; a real dialog still stays hidden until it is opened */
dialog.coa-dialog:not([open]) { display: none; }
dialog.coa-dialog::backdrop { background: var(--backdrop); }

.dlg-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  /* thin: a title bar holding one word should not take a quarter of the
     dialog, least of all at 400% zoom */
  padding: var(--space-3) var(--space-5);
  border-bottom: 2px solid var(--border);
  background-color: var(--bg);
}
/* no size of their own: a dialog heading is an h2 or an h3 and takes the
   scale, her call 2026-09-24. They were pinned at 19px. */
.dlg-head h2, .dlg-head h3 { margin: 0; }

/* no circle around the X - the glyph carries it on its own, drawn bigger so
   it stays an easy target, and coloured so it reads as the way out */
.close-x {
  /* centred by the box, not by the element being a <button>. A button centres
     its own text; a <span> wearing this class does not, which is why the X in
     the Modal page's preview sat low while every real one looked right. Saying
     it here makes the component independent of what it is drawn on. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.7em;
  height: 1.7em;
  background: transparent;
  border: none;
  border-radius: var(--radius-control);
  color: var(--close-x);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.close-x:hover, .close-x:focus-visible {
  /* a tint of the X's own colour, not the grey surface - grey dropped the
     pink from 10.8:1 to 5.5:1 */
  background-color: color-mix(in srgb, var(--close-x) 18%, transparent);
}

.dlg-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.dlg-body p { margin: 0; }
/* the buttons sit on the LEFT, her call 2026-09-24, with Cancel first and the
   one that does the thing second - so the order you read them in is the order
   of least to most consequence, and your eye lands on the way out before the
   way on. It was flush right. */
.dlg-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-start;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-5);
}

@media (max-width: 560px) {
  .dlg-head { padding: var(--space-2) var(--space-4); }
  .dlg-body { padding: var(--space-4); }
  .dlg-foot { padding: 0 var(--space-4) var(--space-4); }
}
/* Windows High Contrast paints its own colours, so the X loses the tint that
   marks it as a control - there it gets a plain outline back. Nowhere else. */
@media (forced-colors: active) {
  .close-x { border: 1px solid ButtonBorder; border-radius: var(--radius-control); }
}

/* The mobile nav menu is a coa-dialog. Only these differ. */
dialog.nav-modal { width: min(320px, calc(100% - 48px)); }
.nav-modal .dlg-body { gap: var(--space-5); }
.nav-modal .theme-toggle-group { align-self: flex-start; }
/* same .menu-list styling as the Profile/Favorites/Log out dropdown -
   bordered box, divider between every link, full modal width instead of
   the dropdown's normal 240px cap */
.nav-modal .menu-list { max-width: none; width: 100%; }
.nav-modal .menu-list a { padding: var(--space-3) var(--space-4); font-size: 17px; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  /* works on <a> as well as <button>: no underline, sits inline like a button */
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-control);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
              filter 0.15s ease;
}
/* ONE effect for every button, her call 2026-09-24: it brightens slightly.
   Primary used to do this by naming a second colour, secondary and danger
   swapped to a named fill, and ghost did nothing at all - four variants,
   three ideas. A filter does it to whatever colours a button happens to
   have, which is what lets a button built in the Builder hover correctly
   without anyone choosing a second set of colours for it.

   A transparent button has little to brighten, so those still gain a fill as
   well - that IS their version of the same idea. */
.btn:hover { filter: brightness(1.12); }
.btn:disabled:hover, .btn[disabled]:hover { filter: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* These are buttons, not links: when one is an <a>, the a/a:hover colours must
   not take over. In light mode --link-hover is a very dark gold, which landed
   at 1.9:1 on the primary button's fill. Each variant states its own colour
   for every state instead. */
a.btn:hover, a.btn:focus-visible { text-decoration: none; }
.btn-primary, a.btn-primary:hover, a.btn-primary:focus-visible { color: var(--cta-text); }
.btn-secondary, a.btn-secondary:hover, a.btn-secondary:focus-visible { color: var(--btn-secondary-text); }

.btn-primary {
  background-color: var(--cta-bg);
  color: var(--cta-text);
  /* --cta-bg (#771e44) is the same dark wine in both themes, so in dark
     mode it sits on an even darker page background with very little
     separation on its own (~1.8:1) - the border is what keeps the button
     readable as a button there, not just a light-mode nicety like before.
     Its own colour since her note 2026-09-24, rather than the page's
     --border, so the ring is the same in both themes like the fill. */
  border-color: var(--cta-border);
}
/* no movement, no shadow - the shared brighten above lightens the fill in
   place, so this no longer names a second colour of its own */
.btn-secondary {
  background-color: transparent;
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}
/* dark mode: text/border stay put, only the fill changes to gold-2 */
/* hover only changes the fill - text and border stay put. ONE rule now: the
   fill is a token, so light mode is handled in the tokens file rather than by
   two more copies of this rule here. Those copies missed .theme-light, which
   is how the light demos ended up hovering to a dark olive. */
.btn-secondary:hover {
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
  background-color: var(--btn-secondary-hover-bg);
}
/* ---- a button built in the Builder ----
   Its three colours arrive as custom properties on the element, so one class
   draws any of them and the shared brighten above handles hover for free:

     <button class="btn btn-custom"
             style="--b-text:#fff; --b-bg:#771e44; --b-border:#cccccc">

   --b-bg may be `transparent`, which is why the fill is a separate property
   rather than baked into the class. A button with no fill gains a faint one
   of its own border colour on hover, the way the secondary button does, so
   there is still something to see when there is nothing to brighten. */
.btn-custom {
  color: var(--b-text, var(--cta-text));
  background-color: var(--b-bg, var(--cta-bg));
  border-color: var(--b-border, var(--border));
}
a.btn-custom:hover, a.btn-custom:focus-visible { color: var(--b-text, var(--cta-text)); }
.btn-custom[data-fill="none"]:hover {
  background-color: color-mix(in srgb, var(--b-border, var(--border)) 18%, transparent);
}
/* a button that names its own hover colours uses them instead of brightening */
.btn-custom[data-hover="custom"]:hover {
  filter: none;
  color: var(--b-text-h, var(--b-text, var(--cta-text)));
  background-color: var(--b-bg-h, var(--b-bg, var(--cta-bg)));
  border-color: var(--b-border-h, var(--b-border, var(--border)));
}

/* ---------------------------------------------------------------------
   A LINK BUILT IN THE LINK BUILDER

   Its colours arrive as custom properties on the element, so one class draws
   any of them - the same shape .btn-custom has:

     <a class="link-custom" style="--l:#f5b4c0; --l-h:#eac0ca">…</a>

   Four values, because a link has to work on both themes: --l / --l-h for
   dark, --l-lt / --l-lt-h for light. A page in light mode picks up the light
   pair; everything else falls back to the ordinary --link.

   The UNDERLINE IS NOT OPTIONAL. Colour alone is not a way of saying "this
   is a link" - anyone who cannot separate the two colours has nothing left.
   That is why this class sets no text-decoration at all: it inherits the
   underline every link on the site has, and there is no switch to lose it.
   --------------------------------------------------------------------- */
/* How each value is worked out lives in ONE place, site-editor/link-look.js
   (2026-09-28): the Link Builder, the Card Builder and the website's
   coa-cards.css all ask it, so they agree. --l-h / --l-lt-h are always set
   (a link that keeps its color on hover gets its own color there).
   data-hover / data-hover-lt="brighten" = pointed at, the same color a touch
   brighter (the same filter the buttons use) - dark and light each have
   their own, since a link can have a next step in one mode and not the other. */
.link-custom { color: var(--l, var(--link)); }
.link-custom:hover, .link-custom:focus-visible { color: var(--l-h, var(--link-hover)); filter: none; }
.link-custom[data-hover="brighten"]:hover,
.link-custom[data-hover="brighten"]:focus-visible { filter: brightness(1.12); }
:root[data-theme="light"] .link-custom, .theme-light .link-custom { color: var(--l-lt, var(--link)); }
:root[data-theme="light"] .link-custom:hover, .theme-light .link-custom:hover,
:root[data-theme="light"] .link-custom:focus-visible, .theme-light .link-custom:focus-visible {
  color: var(--l-lt-h, var(--link-hover)); filter: none;
}
:root[data-theme="light"] .link-custom[data-hover-lt="brighten"]:hover,
:root[data-theme="light"] .link-custom[data-hover-lt="brighten"]:focus-visible,
.theme-light .link-custom[data-hover-lt="brighten"]:hover,
.theme-light .link-custom[data-hover-lt="brighten"]:focus-visible { filter: brightness(1.12); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .link-custom { color: var(--l-lt, var(--link)); }
  :root:not([data-theme="dark"]) .link-custom:hover,
  :root:not([data-theme="dark"]) .link-custom:focus-visible { color: var(--l-lt-h, var(--link-hover)); filter: none; }
  :root:not([data-theme="dark"]) .link-custom[data-hover-lt="brighten"]:hover,
  :root:not([data-theme="dark"]) .link-custom[data-hover-lt="brighten"]:focus-visible { filter: brightness(1.12); }
}
/* a .theme-dark box on a light page (the Card Builder's dark sample, a card
   saved "same in both modes") keeps the DARK values - without these the
   page's light rules above won and the dark sample showed the light color */
:root .theme-dark .link-custom { color: var(--l, var(--link)); }
:root .theme-dark .link-custom.link-custom:hover,
:root .theme-dark .link-custom.link-custom:focus-visible { color: var(--l-h, var(--link-hover)); filter: none; }
:root .theme-dark .link-custom.link-custom[data-hover="brighten"]:hover,
:root .theme-dark .link-custom.link-custom[data-hover="brighten"]:focus-visible { filter: brightness(1.12); }

/* .btn-ghost is GONE, 2026-09-24. It was a transparent, borderless, underlined
   button - which is a link with a button's padding. A link goes somewhere and a
   button does something; a screen reader says which, and the look should agree.
   It was used on no page of either site, only on the Buttons page demonstrating
   itself. If a quiet third button is ever wanted, it gets designed then, with
   its button cues intact. */
/* her saved "Delete" button (2026-09-26, updated the same evening): white
   on the deepest red, danger-0, with a danger-2 border, the same in both
   themes; it brightens when pointed at, like every .btn. White on danger-0 is
   11.80:1; the fill finds the button on a white page, the border (4.4:1) on
   a dark one. */
.btn-danger {
  background-color: var(--danger-0);
  color: var(--true-white);
  border-color: var(--danger-2);
}
a.btn-danger:hover, a.btn-danger:focus-visible { color: var(--true-white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: 16px; }

/* ---------------------------------------------------------------------
   Form fields
   --------------------------------------------------------------------- */
/* a form is a stack of fields, with room between them */
.form-grid { display: flex; flex-direction: column; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
/* Stacked form fields. Inside a dialog .dlg-body's own gap already does this,
   but on a page, a panel or a demo there was nothing, so fields sat flush
   against one another - her note, 2026-09-24, about two rows with no air
   between them. 14px, the same figure .dlg-body uses, so a form is spaced
   the same wherever it is standing.

   Deliberately NOT `.field + .field { margin-top }`: inside a dialog that
   margin would land on top of the gap that is already there and space those
   fields twice, which would undo every settings panel at once. A container
   gives the gap; the field never carries its own. */
.form-stack { display: flex; flex-direction: column; gap: var(--space-4); }
/* a button in the stack keeps its own width. Fields want the full width -
   that is what a column of them is for - but a stretched button reads as a
   banner, and "Add as editor" is not one. */
.form-stack > .btn { align-self: flex-start; }
.field label { font-size: 16px; font-weight: 700; }
.field .hint { font-size: 16px; color: var(--text-muted); }
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="search"],
.field input[type="date"],
.field textarea,
.field select {
  /* every form field fills with --surface, her call 2026-09-25 */
  background-color: var(--surface);
  /* literal white (dark theme) / black (light theme) via --field-text —
     deliberately not --text (cream-4/charcoal-1), per explicit request;
     border keeps using --border, unaffected */
  color: var(--field-text);
  border: 2px solid var(--border);
  border-radius: var(--radius-control);
  padding: var(--space-3) var(--space-4);
  font-size: 16px;
  font-family: inherit;
}
.field select { padding-right: var(--space-7); }
.field textarea { resize: vertical; min-height: 8rem; }

/* ---- the date field ----
   The same box as every other field. The only extra is the little calendar
   the browser puts on the right: its own drawing is a flat glyph belonging
   to no theme, so it is replaced with one in --chevron, the same gold as the
   dropdown arrow, by the same method - a data-URI cannot read a custom
   property, so the hex is baked in per theme. */
.field input[type="date"] { padding-right: var(--space-3); }
.field input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: var(--space-2);
  opacity: 1;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%23d5cb63' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3.2' width='12' height='11' rx='1.6'/%3E%3Cpath d='M2 6.6h12M5.4 1.8v2.6M10.6 1.8v2.6'/%3E%3C/g%3E%3C/svg%3E");
  border-radius: var(--radius-small);
}
.field input[type="date"]::-webkit-calendar-picker-indicator:hover { background-color: var(--surface-2); }
.field input[type="date"]::-webkit-calendar-picker-indicator:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
:root[data-theme="light"] .field input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%237f761a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3.2' width='12' height='11' rx='1.6'/%3E%3Cpath d='M2 6.6h12M5.4 1.8v2.6M10.6 1.8v2.6'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .field input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%237f761a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3.2' width='12' height='11' rx='1.6'/%3E%3Cpath d='M2 6.6h12M5.4 1.8v2.6M10.6 1.8v2.6'/%3E%3C/g%3E%3C/svg%3E");
  }
}
/* High Contrast throws the drawing away with every other colour, so the
   button needs an edge of its own to stay findable */
@media (forced-colors: active) {
  .field input[type="date"]::-webkit-calendar-picker-indicator { border: 1px solid ButtonBorder; }
}

/* custom chevron replaces the native one so its position/weight is
   actually controllable — browsers give no CSS hook into the built-in
   arrow itself. Stroke color is --chevron's value baked in as a literal
   hex per theme — a data-URI can't reference a CSS custom property */
/* ---- THE chevron ----
   One shape, drawn once. It used to be a data-URI with the stroke colour
   typed into it, repeated three times because a data-URI cannot read a
   custom property - so the arrow was the one thing on the site whose colour
   was written out rather than named, and --chevron could be changed without
   the dropdowns following.

   As a MASK it has no colour of its own: the mask says what shape to paint
   and background-color says what to paint it with, which can be the token.
   One definition, and anything that wants this arrow wears .chevron or
   copies these four lines - the sidebar's fold marker and the swatch
   combobox both do. 2026-09-24. ---- */
:root {
  --chevron-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2 7 9.2 11 5.2' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chevron {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background-color: var(--chevron);
  -webkit-mask: var(--chevron-mark) no-repeat center / 13px 13px;
  mask: var(--chevron-mark) no-repeat center / 13px 13px;
}
/* A <select> cannot hold a pseudo-element and its background cannot be
   masked separately from the box, so this one still paints the shape as a
   background-image with the colour baked in, twice. Same path, same weight,
   same size - it IS the same arrow - but it is the one copy left. Unifying
   it needs the chevron moved onto .field with :has(select), which is a
   positioning job of its own. On Deviations > Pending. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2 7 9.2 11 5.2' fill='none' stroke='%23d5cb63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .field select, :root[data-theme="light"] .coa-select,
.theme-light .field select, .theme-light .coa-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2 7 9.2 11 5.2' fill='none' stroke='%237f761a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .field select, :root:not([data-theme="dark"]) .coa-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2 7 9.2 11 5.2' fill='none' stroke='%237f761a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
/* browsers dim placeholders to ~55-65% opacity by default, which would
   silently undercut the AAA value --placeholder-text was chosen for —
   force full opacity so the computed contrast actually matches the token */
.field input::placeholder,
.field textarea::placeholder {
  color: var(--placeholder-text);
  opacity: 1;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.field.has-error .combo-btn { border-color: var(--danger-border); }
.field .error-msg { font-size: 16px; font-weight: 700; color: var(--danger-text); }
.required-note { color: var(--text-muted); }
.req { color: var(--danger-text); font-weight: 700; }

/* Her call, 2026-09-24: the values every page was ACTUALLY getting are the
   right ones, so the shared sheet says them and editor.css no longer
   overrides. Top-aligned rather than centred, because a label that runs to
   two lines should start level with its box, not float beside the middle. */
.check-row { display: flex; align-items: flex-start; gap: var(--space-2); }
.check-row label { font-weight: 400; }
/* A RUN of tick rows is a list, not a label sitting on its box, so the field
   holding them opens up to the list step. Her call 2026-09-24: the roomier
   spacing is the one to keep. It is the CONTAINER's gap and not a margin on
   the row, so it cannot land on top of a gap that is already there - the
   same rule .form-stack follows. It used to be a margin in editor.css, which
   reached every Design page as well and stacked on the field's own gap. */
.field:has(.check-row) { gap: var(--space-4); }
/* appearance:none + hand-drawn check — the only way to guarantee the same
   border color/thickness as text fields, since native checkbox chrome
   ignores `border` in most browsers otherwise */
.check-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  background-color: var(--surface);
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.check-row input:checked {
  background-color: var(--control-on);
  border-color: var(--control-on);
}
/* POINTED AT, the three things you tick brighten by the same amount a button
   does - her ask 2026-09-24. One number for "pointed at" everywhere, rather
   than each control inventing its own. The filter lifts the border and the
   fill together, which is what makes it visible on an empty box as well as a
   ticked one: an unticked box is mostly its border. */
.check-row input:hover:not(:disabled),
.switch input:hover:not(:disabled) + .switch-track { filter: brightness(1.12); }
.check-row input, .switch-track { transition: filter 0.15s ease, background-color 0.15s ease; }
.check-row input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--control-on-mark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* A RADIO in the same row. .check-row input draws a square with a tick, which
   is a checkbox - and a checkbox says "any of these", where a radio says
   "one of these". Drawing them alike tells the eye the wrong thing, so a
   radio is round with a dot. Added 2026-09-24, when the Button Builder
   needed the first radios on the site. */
.check-row input[type="radio"] { border-radius: 50%; }
/* The dot is the input's own fill, with a ring of page colour laid over its
   edge by an inset shadow - not a separate ::after circle. The shadow is drawn
   from the same circle as the border, so the dot stays centred at any zoom;
   the ::after version was snapped to pixels on its own and drifted off
   centre at 110-150% (her note, 2026-09-25). */
.check-row input[type="radio"]:checked {
  background-color: var(--control-on);
  border-color: var(--control-on);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.check-row input[type="radio"]:checked::after { content: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.switch-track {
  width: 42px; height: 24px; border-radius: var(--radius-round);
  background-color: var(--switch-off); position: relative; flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background-color: var(--bg);
  transition: transform 0.15s ease;
}
/* an X in the knob when off, a check when on (her ask, 2026-09-24), so the
   state never rests on colour or position alone. Masks, like the chevron,
   riding with the knob. Painted in --text, her follow-up the same day: the
   track's own colour was too faint to see. White on the dark knob 18.7:1,
   black on the light one 20.3:1. */
:root {
  --switch-off-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M4 4 10 10M10 4 4 10' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --switch-on-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4 5.8 10.2 11 4.2' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.switch-track::before {
  content: ""; position: absolute; top: 2px; left: 2px; z-index: 1;
  width: 20px; height: 20px;
  background-color: var(--text);
  -webkit-mask: var(--switch-off-mark) no-repeat center / 14px 14px;
  mask: var(--switch-off-mark) no-repeat center / 14px 14px;
  transition: transform 0.15s ease;
}
/* ON is the checked checkbox's colour (her call, 2026-09-24): the two say
   the same thing, so they look the same - now through --control-on, which
   both read. The title bar's switch and the section switch keep their own
   colours.

   LIGHT MODE LIGHTENED, her note 2026-09-24. The fill was gold-3, dark
   enough to read as a hole rather than a lit control, and the OFF track was
   gray-1, a dark slab. Now gold-6 and gray-3. What that buys and costs:
   the ON track is 4.0:1 against the page and the near-white knob (was 8.3),
   the OFF track 4.2:1 (was 9.1) - both still past the 3:1 a non-text control
   needs, and gold-6 is as light as the track can go before it stops being
   findable at all (gold-7 is 2.6:1). The tick is white on it, her note the
   same day - 4.2:1, past the 3:1 a mark needs. It went cream -> black ->
   white over that hour; cream was the one that could not survive the
   lighter fill at all. */
.switch input:checked + .switch-track { background-color: var(--control-on); }
.switch input:checked + .switch-track::after,
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch input:checked + .switch-track::before {
  -webkit-mask-image: var(--switch-on-mark);
  mask-image: var(--switch-on-mark);
}
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .switch-track::before, .switch-track::after { transition: none; }
  .check-row input, .switch-track { transition: none; }
}
@media (forced-colors: active) {
  .switch-track::before { forced-color-adjust: none; background-color: CanvasText; }
  /* high contrast repaints the fill and drops the shadow, which took the dot */
  .check-row input[type="radio"]:checked { forced-color-adjust: none; background-color: CanvasText; border-color: CanvasText; box-shadow: inset 0 0 0 3px Canvas; }
}

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card {
  background-color: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-box);
  padding: var(--space-5);
}
.card h3 { margin: 0 0 var(--space-2); }
.card p { margin: 0; font-size: 16px; }
.card .btn { margin-top: var(--space-4); }

.product-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5);
}
.product-card-media {
  /* --pink-2 directly, not var(--cta-bg) — the button's CTA color moved to
     wine-5, but this gradient should stay teal→pink regardless */
  /* shrinks rather than forcing the row wider than a small screen */
  width: min(140px, 40vw); height: 90px; border-radius: var(--radius-control); flex-shrink: 0;
  background: linear-gradient(135deg, var(--nav-accent), var(--pink-2));
}
.product-card-body { flex: 1 1 200px; }

/* A few alternate gradient pairings — all token-based, so they follow the
   theme automatically. See the CoA Design System's Cards page ("Gradient options")
   for a clickable, copy-to-clipboard preview of each. */
/* Gold → Pink:        linear-gradient(135deg, var(--accent-strong), var(--pink-2)) */
/* Wine → Gold:        linear-gradient(135deg, var(--wine-4), var(--gold-8)) */
/* Teal → Gold:        linear-gradient(135deg, var(--teal-4), var(--gold-8)) */
/* Pink → Wine:        linear-gradient(135deg, var(--pink-2), var(--wine-5)) */
/* Ice → Teal:         linear-gradient(135deg, var(--ice-1), var(--teal-2)) */
/* Dark Teal → Wine:   linear-gradient(135deg, var(--darkteal-2), var(--wine-4)) */
/* Charcoal → Wine:    linear-gradient(135deg, var(--charcoal-1), var(--wine-5)) */
/* Wine → Charcoal:    linear-gradient(135deg, var(--wine-3), var(--charcoal-2)) */
/* Dark Teal → Gold:   linear-gradient(135deg, var(--darkteal-3), var(--gold-2)) */
/* Slate → Dark Teal:  linear-gradient(135deg, var(--gray-1), var(--darkteal-4)) */
/* For light backgrounds (black text, links and muted text AAA on both ends):
   Ice → Pink:         linear-gradient(135deg, var(--ice-2), var(--pink-7))  (links and muted text AA here, 6.4:1)
   Cream → Ice:        linear-gradient(135deg, var(--cream-4), var(--ice-4))
   Gray → Ice:         linear-gradient(135deg, var(--gray-10), var(--ice-3))
   Ice → Gray:         linear-gradient(135deg, var(--ice-5), var(--gray-9))
   Cream → Gold:       linear-gradient(135deg, var(--cream-4), var(--gold-11))
   Pink → Gold:        linear-gradient(135deg, var(--pink-8), var(--gold-11))
   Cream 3 → Ice 3:    linear-gradient(135deg, var(--cream-3), var(--ice-3))
   Pink 7 → Gray 8:    linear-gradient(135deg, var(--pink-7), var(--gray-8))  (links and muted text AA, 6.6:1)
   Gray 8 → Ice 2:     linear-gradient(135deg, var(--gray-8), var(--ice-2))  (links and muted text AA, 6.4:1)
   Cream → Ice → Pink: linear-gradient(135deg, var(--cream-2), var(--ice-3), var(--pink-6))  (links and muted text AA, 6.3:1) */

/* ---------------------------------------------------------------------
   VIDEO CARD (her picks 2026-09-27, tried on the Playground first)

     <li class="card video-card">
       <img class="video-card-thumb" … alt="">
       <h3><a href="…" target="_blank" rel="noopener">Title …new-tab icon + words…</a></h3>
       <p class="video-card-meta"><time …>3 weeks ago</time>
         <span class="video-card-length"><span aria-hidden="true">&middot;</span> 37 minutes</span></p>
     </li>

   A .card holding a video's picture, its title and its age and length.
   The title is an h3 LINK AT 18px (her call), opening YouTube in a new tab.
   Its link stretches over the whole card, so the picture is clickable too,
   but Tab and a screen reader meet it once. The picture has empty alt: the
   title beside it already says what it is. See Design > Content > Video card.
   --------------------------------------------------------------------- */
.video-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.video-card[hidden] { display: none; }
.video-card h3 { margin: 0; font-size: 18px; }
.video-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-box); }
.video-card-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-control);
}
.video-card:hover .video-card-thumb { filter: brightness(1.12); }
.video-card-meta { margin: 0; }
.video-card-length { white-space: nowrap; }

/* ---------------------------------------------------------------------
   LATEST VIDEOS - the section of Video cards (parts/latest-videos.php):
   three in a row, one on a phone. Under them, on the left, Show more (adds
   a row; js/coa-videos.js) and then See more on YouTube, a primary button.
   --------------------------------------------------------------------- */
.video-grid { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } }
.video-actions { margin: var(--space-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-4); }
.video-actions [hidden] { display: none; }

/* ---------------------------------------------------------------------
   Navigation / menu
   --------------------------------------------------------------------- */
.menu-list {
  list-style: none; margin: 0; padding: var(--space-2);
  border: 2px solid var(--border); border-radius: var(--radius-box);
  background-color: var(--surface);
  max-width: 240px;
}
.menu-list button,
.menu-list a {
  display: block;
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  text-decoration: none; box-sizing: border-box;
  font: inherit; font-size: 16px; font-weight: 600; padding: var(--space-3) var(--space-3); border-radius: var(--radius-small); cursor: pointer;
  transition: background-color 0.15s ease, filter 0.15s ease;
}
.menu-list button:hover,
.menu-list a:hover { background-color: var(--surface-2); filter: brightness(1.1); }
.menu-list hr { border: none; border-top: 1px solid var(--border); margin: var(--space-2) 0; }
/* the divider right before a sign-out/exit-style item — one pixel thicker
   and a higher-contrast color than the regular between-item dividers */
.menu-list hr.menu-list-divider-strong { border-top-width: 2px; border-top-color: var(--text); }

/* ---------------------------------------------------------------------
   Alerts / status
   --------------------------------------------------------------------- */
/* --alert-bar is the stripe's colour, and the fill is that same colour at
   --alert-tint - her asks 2026-09-24 (a tenth first, then 15%, then 20% in
   dark only) - so the tint can never drift from the stripe. Text on it is
   13.7:1 or better in every kind and both themes. The stripe went from 12px
   to 6px that day.

   The STRENGTH is a token rather than a light-mode override written here,
   which is what --alert-info-bar below used to be: an override in this file
   reaches :root[data-theme="light"] and the media query but quietly misses
   every .theme-light box, and that is exactly how the info stripe broke. The
   tokens file already has all four blocks spelled out, so it cannot. */
/* ---------------------------------------------------------------------
   BOXED NOTES - .callout and .alert share ONE shape.

   They were drawn twice and differed by four arbitrary pixels: 12px corners
   against 8px, 18/20 padding against 14/16. Nobody decided that; it is two
   people reaching for a number on different days (her question, 2026-09-24:
   "shouldn't the callout be by alerts? It looks very similar").

   They stay TWO CLASSES because the difference is meaning, not looks:
     .alert  is about STATE - "message sent", "something went wrong". Often
             generated, often needs role="status" so it is announced, and its
             colour carries the meaning.
     .callout is EDITORIAL - a paragraph the writer pulled out of the prose.
             Static, no colour meaning; a coloured one would be claiming a
             status it does not have.
   The same relationship h4 and .eyebrow have. Both are on Alerts & Notes.
   --------------------------------------------------------------------- */
.callout, .alert {
  border: 2px solid var(--border);
  /* 8px for every boxed note - alert, note, tip, quote (her ask 2026-09-26) */
  border-left-width: 8px;
  border-radius: var(--radius-box);
  padding: var(--space-4) var(--space-5);
}
/* THE ALERT (her picks 2026-09-26, from the Playground): the whole border
   in the alert's own colour with an 8px left edge, the title an h3 so the
   H key finds it, and a 40px icon centered top to bottom, 22px of tint on
   both sides of it. Markup:
     <div class="alert success"><div><h3>Title</h3><p>Words.</p></div></div>
   The icon is drawn by the alert itself (::before), so nothing extra goes
   in the markup. Each icon is ONE shape with its mark cut out as a MASK, so
   it takes --alert-bar and the cut-out shows the alert's own tint: every
   one clears 3:1 in both themes (the lowest, the light warning, 3.34:1). */
:root {
  --alert-icon-success: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Ccircle cx='12' cy='12' r='11' fill='white'/%3E%3Cpath d='M7 12.4l3.3 3.3L17.2 8.8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url(%23m)'/%3E%3C/svg%3E");
  --alert-icon-danger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Ccircle cx='12' cy='12' r='11' fill='white'/%3E%3Cpath d='M12 6.8v6.4' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='16.9' r='1.4' fill='black'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url(%23m)'/%3E%3C/svg%3E");
  --alert-icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Cpath d='M10.81 3.88Q12 1.8 13.19 3.88L21.81 18.92Q23 21 20.60 21.00L3.40 21.00Q1 21 2.19 18.92z' fill='white'/%3E%3Cpath d='M12 8.6v5.2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='17.3' r='1.35' fill='black'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url(%23m)'/%3E%3C/svg%3E");
  --callout-icon-tip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Cpath d='M4.5 3h15A2.5 2.5 0 0 1 22 5.5v10a2.5 2.5 0 0 1-2.5 2.5H12l-5.5 4.2V18h-2A2.5 2.5 0 0 1 2 15.5v-10A2.5 2.5 0 0 1 4.5 3z' fill='white'/%3E%3Ccircle cx='12' cy='6.6' r='1.35' fill='black'/%3E%3Cpath d='M12 9.8v5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url%28%23m%29'/%3E%3C/svg%3E");
  --callout-icon-quote: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Cpath d='M3 19v-5.5C3 9.4 5.2 6.4 8.8 5l.9 1.8C7.6 7.9 6.6 9.6 6.5 11.5H10V19zM14 19v-5.5C14 9.4 16.2 6.4 19.8 5l.9 1.8c-2.1 1.1-3.1 2.8-3.2 4.7H21V19z' fill='white'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url%28%23m%29'/%3E%3C/svg%3E");
}
.alert, .callout.tip, .callout.quote {
  --alert-bar: var(--border);
  display: flex; gap: var(--space-5); align-items: center;
  border-color: var(--alert-bar);
  background-color: color-mix(in srgb, var(--alert-bar) var(--alert-tint), transparent);
}
.alert.success::before, .alert.danger::before, .alert.info::before,
.callout.tip::before, .callout.quote::before {
  content: "";
  flex: none;
  width: 40px; height: 40px;
  background-color: var(--alert-bar);
  -webkit-mask: var(--alert-icon) no-repeat center / contain;
  mask: var(--alert-icon) no-repeat center / contain;
}
.alert h3, .callout h3 { margin: 0 0 var(--space-1); }
.alert p, .callout p { margin: 0; }
.alert p + p, .callout p + p { margin-top: var(--space-2); }
/* a list inside an alert - the form error summary lists each problem */
/* the bullets line up with the title, not indented under it (her ask
   2026-09-26): 1.1em is the marker's own width, measured - the dot's left
   edge lands on the h3's first letter */
.alert ul { margin: var(--space-2) 0 0; padding-left: 1.1em; }
.alert li + li { margin-top: var(--space-1); }
.alert.success { --alert-bar: var(--success-text); --alert-icon: var(--alert-icon-success); }
.alert.danger { --alert-bar: var(--danger-text); --alert-icon: var(--alert-icon-danger);
  /* its links: her saved "Error link" (tokens) */
  --link: var(--alert-danger-link); --link-hover: var(--alert-danger-link-hover); }
/* the warning (class "info", as it always was): --alert-info-bar is a token
   (coa-tokens.css), gold-9 dark and gold-6 light (her pick 2026-09-26) */
.alert.info { --alert-bar: var(--alert-info-bar); --alert-icon: var(--alert-icon-warning); }
/* TIP and QUOTE (her picks 2026-09-26, from the Playground): callouts -
   writing, not state - drawn like the alerts: same border, tint and 40px
   icon. Tip = the teal speech bubble, only for tips and extra information.
   Quote = quotation marks in pink and wine, only for quotations; the name
   sits right under the words, after an em dash. Markup:
     <div class="callout tip"><div><h3>Tip</h3><p>Words.</p></div></div>
     <figure class="callout quote"><div><blockquote><p>Words.</p></blockquote>
       <figcaption>&mdash; Name</figcaption></div></figure> */
.callout.tip { --alert-bar: var(--tip-bar); --alert-icon: var(--callout-icon-tip); }
.callout.quote { --alert-bar: var(--quote-bar); --alert-icon: var(--callout-icon-quote); }
/* the quote is the callout: a .prose blockquote's own bar and tint stay out */
.callout.quote blockquote { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.callout.quote figcaption { font-weight: 700; }
/* High Contrast repaints backgrounds, so the icon is drawn in the text colour */
@media (forced-colors: active) {
  .alert.success::before, .alert.danger::before, .alert.info::before,
  .callout.tip::before, .callout.quote::before {
    forced-color-adjust: none; background-color: CanvasText;
  }
}

.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 16px; font-weight: 700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-round);
  border: 2px solid currentColor;
}
.badge.success { color: var(--success-text); }
.badge.danger { color: var(--danger-text); }
.badge.info { color: var(--accent-strong); }

/* ---------------------------------------------------------------------
   TOOLTIPS (her picks 2026-09-27, from the Playground). Two kinds, one
   script: js/coa-tooltips.js. Both open after resting the pointer (0.25 s for a button tooltip, 0.5 s for a toggletip),
   hide 1 s after it leaves (moving onto the bubble keeps it), open at once
   on keyboard focus, and close at once on Esc, focus leaving, or a click
   elsewhere.

   WHERE THEY SHOW (her ask 2026-09-28): both bubbles are position: fixed,
   placed by the script at --tip-x / --tip-y, so they stay inside the window
   and a scrolling panel cannot cut them off.

   BUTTON TOOLTIP - a small name above an icon button, with a pointer at it.
   No shadow. Flips below when there is no room above; slides sideways to
   stay in the window (the pointer still aims at the button). The tip IS
   the button's name, for a screen reader:
     <span class="tooltip-host"><button class="icon-btn" aria-labelledby="t1">icon</button>
       <span class="tooltip" id="t1" role="tooltip" hidden>Edit</span></span>

   INFO TOGGLETIP - a pink / wine circle-i with a bubble of extra
   information. It floats, so it has --float-shadow. A click pins it open
   until its X, Esc, or a click elsewhere. The text is the button's
   description, so it is read with the button:
     <span class="toggletip"><button class="toggletip-btn" aria-expanded="false"
         aria-controls="b1" aria-describedby="b1-text" aria-label="More about ..."></button>
       <span class="toggletip-box" id="b1" hidden><span id="b1-text">The tip.</span>
         <button class="close-x" aria-label="Close">&times;</button></span></span>
   --------------------------------------------------------------------- */
:root { --toggletip-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Ccircle cx='12' cy='12' r='11' fill='white'/%3E%3Ccircle cx='12' cy='7.3' r='1.4' fill='black'/%3E%3Cpath d='M12 10.8v6.6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/mask%3E%3Crect width='24' height='24' fill='white' mask='url%28%23m%29'/%3E%3C/svg%3E"); }
.tooltip-host { position: relative; display: inline-flex; }
.tooltip {
  position: fixed; left: var(--tip-x, 0); top: var(--tip-y, 0);
  z-index: 20; white-space: nowrap;
  padding: var(--space-2) var(--space-3);
  background: var(--surface); color: var(--text);
  border: 2px solid var(--border-soft); border-radius: var(--radius-box);
}
.tooltip[hidden] { display: none; }
/* the pointer hangs off the BUTTON, so it aims at the button's middle
   whatever the button's size and however the bubble lines up: a small
   turned square in the bubble's color, the soft border on its outer sides,
   covering the bubble's edge so the two read as one shape */
.tooltip-host:has(> .tooltip:not([hidden]))::after {
  content: ""; position: absolute; z-index: 21; left: 50%; bottom: calc(100% + 6px);
  width: 12px; height: 12px; margin-left: -6px;
  background: var(--surface);
  border-right: 2px solid var(--border-soft); border-bottom: 2px solid var(--border-soft);
  transform: rotate(45deg);
}
.tooltip-host.tip-below:has(> .tooltip:not([hidden]))::after {
  bottom: auto; top: calc(100% + 6px);
  border-right: 0; border-bottom: 0;
  border-left: 2px solid var(--border-soft); border-top: 2px solid var(--border-soft);
}
.toggletip { position: relative; display: inline-block; vertical-align: middle; margin-left: var(--space-1); }
.toggletip-btn {
  display: inline-flex; padding: var(--space-1); margin: 0;
  border: 0; border-radius: var(--radius-round); background: transparent; cursor: pointer;
}
.toggletip-btn::before {
  content: ""; width: 24px; height: 24px;
  background-color: var(--toggletip-color);
  -webkit-mask: var(--toggletip-icon) no-repeat center / contain;
  mask: var(--toggletip-icon) no-repeat center / contain;
}
.toggletip-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.toggletip-box {
  position: fixed; left: var(--tip-x, 0); top: var(--tip-y, 0); z-index: 20;
  display: flex; align-items: flex-start; gap: var(--space-2);
  width: max-content; max-width: min(320px, 80vw);
  padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4);
  background: var(--surface); color: var(--text);
  border: 2px solid var(--border-soft); border-radius: var(--radius-box);
  box-shadow: var(--float-shadow);
  font-weight: 400;
}
.toggletip-box[hidden] { display: none; }
/* in the top layer (coa-tooltips.js): undo the browser's popover box - it
   centres the bubble in the window and adds its own frame - so the placing
   above and the look here are all that apply */
.tooltip[popover], .toggletip-box[popover] { right: auto; bottom: auto; margin: 0; overflow: visible; }
@media (forced-colors: active) {
  .tooltip-host:has(> .tooltip:not([hidden]))::after { background: Canvas; border-color: CanvasText; }
  .toggletip-btn::before { forced-color-adjust: none; background-color: CanvasText; }
}

/* ---------------------------------------------------------------------
   Long-form text

   Wrap a run of writing in .prose and its headings, paragraphs, lists and
   quotes space themselves. It fills whatever column it is in - what keeps
   lines readable is the column, not this.
   --------------------------------------------------------------------- */
.prose { max-width: none; }
/* only the spacing: size and weight come from h2, her call 2026-09-24. It
   used to restate 26px, which was right on the day and would have gone
   stale the next time the scale moved. */
.prose h2 { margin: var(--space-7) 0 var(--space-3); padding-top: var(--space-2); }
.prose h3 { margin: var(--space-6) 0 var(--space-2); }
.prose p { margin: 0 0 var(--space-4); }
.prose ul, .prose ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
  border-left: 4px solid var(--accent);
  /* the same colour as the rule beside it, at a tenth - her ask 2026-09-24.
     Written as a mix of --accent so the tint can never drift from the bar.
     Its words are full text (a quote is read, not skipped - 2026-09-25);
     the bar and the tint are what set it apart. */
  background-color: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}
.prose a { text-underline-offset: 3px; }

/* a pulled-out note inside a page. Put a heading in it and the heading
   loses its top margin so it sits flush with the top of the box. */
.callout {
  /* the same gap as an alert, above AND below, so the writing after it
     never sits flush (her ask 2026-09-26: the alerts' spacing rules) */
  margin: var(--block-gap) 0;
  background: var(--callout-bg);
}
.callout h2 { margin-top: 0; }
@media (max-width: 560px) {
  .prose h2 { margin-top: var(--space-6); }
}

/* ---------------------------------------------------------------------
   A divided list - rows with a rule between them

     <ul class="row-list">
       <li> … </li>
       <li> … </li>
     </ul>

   The Pages list and the tracker's to-do list were each drawing this
   themselves, with their own padding - 16px in one, 20px in the other - so
   the same idea looked different in two screens of the same tool. One rule
   now, with the air she asked for on each side of the line, and the last row
   without a rule under it because there is nothing after it to divide from.

   A row keeps its own layout: .page-row is a two-column grid, .item is a
   checkbox and its label. This only owns the spacing and the line.
   --------------------------------------------------------------------- */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list > li {
  padding: var(--space-5) var(--space-2);
  border-bottom: 1px solid var(--border-soft);
}
.row-list > li:last-child { border-bottom: none; }

/* ---------------------------------------------------------------------
   Status pill - a filled chip saying what state a thing is in.

     <span class="pill done">Done</span>

   Its cousin .badge above is an outline chip for a label; this one is a
   fill, for a state that changes. Every fill/text pair here is 7:1 or
   better. The tracker called it .badge, which collided with .badge, and
   the Site Editor called the same thing .state.
   --------------------------------------------------------------------- */
.pill {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-round);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.pill.todo        { background: var(--pill-todo-bg); color: var(--text); }
.pill.in-progress { background: var(--darkteal-5); color: var(--ice-5); }
.pill.waiting     { background: var(--gold-2); color: var(--pill-waiting-text); }
/* white on success-1, her note 2026-09-24. 7.9:1, so it clears the 7:1 this
   block holds every pair to. The BORDER is doing a real job, the same one
   teal-6 did before it: success-1 is only 2.4:1 against the dark page, so
   without a ring the chip has no edge - success-4 gives 10.2:1 there. In
   light mode that ring is near-invisible and does not need to be anything
   else: the fill itself is 7.7:1 on the page, so the shape is already plain.
   .published rides along because it is the same idea - this one is finished
   - and the two have never looked different. Say if published should stay
   teal and they will be split. */
.pill.done,
.pill.published   { background: var(--success-1); color: var(--true-white); border-color: var(--success-4); }
.pill.draft       { background: var(--gold-3); color: var(--cream-3); border-color: var(--cream-3); }
.pill.parked,
.pill.archived    { background: transparent; color: var(--text-muted); border-color: var(--gray-2); }
.pill.owner       { background: var(--wine-2); color: var(--pink-5); }
@media (forced-colors: active) { .pill { border: 1px solid CanvasText; } }

/* ---------------------------------------------------------------------
   Dropdown - a <select> that looks the same in every browser.

   The browser's own arrow is a different shape and colour in each one and
   ignores the theme, so this draws its own. Use it where a select stands
   on its own; inside a .field, .field select already does this.
   --------------------------------------------------------------------- */
/* its arrow is the baked copy of --chevron (the approved deviation), dark
   here and light with .field select above - the light one was missing, so
   a light page showed the pale arrow at 1.48:1 (found 2026-09-26) */
.coa-select {
  font: inherit;
  background-color: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius-control);
  padding: var(--space-2) var(--space-7) var(--space-2) var(--space-3);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2 7 9.2 11 5.2' fill='none' stroke='%23d5cb63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  cursor: pointer;
}
.coa-select:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (forced-colors: active) {
  .coa-select { border-color: ButtonBorder; background-image: none; padding-right: var(--space-3); }
}

/* ---------------------------------------------------------------------
   Dropdown list - .combo

   The look of the color dropdown, shared by every dropdown built from a
   button and a list: the one-line dropdown (js/coa-combo.js, from any
   <select data-combo>) and the color dropdown (swatchCombo on the Design
   tab, which adds its dots and two-line rows in coa-library.css). One
   definition, so the two cannot drift (her ask, 2026-09-25).
   --------------------------------------------------------------------- */
.combo { position: relative; }
.combo-btn {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  font: inherit; text-align: left; cursor: pointer;
  background-color: var(--surface); color: var(--field-text);
  border: 2px solid var(--border); border-radius: var(--radius-control);
  padding: var(--space-3);
}
/* THE dropdown chevron - the same mask every other one uses */
.combo-btn::after {
  content: "";
  margin-left: auto;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background-color: var(--chevron);
  -webkit-mask: var(--chevron-mark) no-repeat center / 13px 13px;
  mask: var(--chevron-mark) no-repeat center / 13px 13px;
}
.combo-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.combo-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
/* open, the button and its list are ONE shape: the list starts on the
   button's bottom border and the corners where they meet go square */
.combo-btn[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.combo-list {
  position: absolute; z-index: 20; top: calc(100% - 2px); left: 0; right: 0;
  max-height: 340px; overflow-y: auto; margin: 0; padding: var(--space-1);
  list-style: none;
  background-color: var(--surface); border: 2px solid var(--border);
  border-radius: 0 0 var(--radius-control) var(--radius-control);
  box-shadow: var(--float-shadow);
}
.combo-list [role="option"] {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-small); cursor: pointer;
}
.combo-list [role="option"]:hover,
.combo-list [role="option"].here { background-color: var(--teal-hover); }
.combo-list [role="option"][aria-selected="true"] { background-color: var(--toggle-on); color: var(--toggle-on-text); }
.combo-list [role="option"][aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
/* a group's name inside the list - the same small label as everywhere */
.combo-group {
  margin: 0; padding: var(--space-3) var(--space-3) var(--space-1);
  font-size: 16px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--eyebrow-text);
}
/* the real select, once a desktop has swapped the list in */
.combo-hidden { display: none; }
/* on a touch device the select stays: closed, it wears the same box */
select[data-combo] { background-color: var(--surface); padding: var(--space-3) var(--space-7) var(--space-3) var(--space-3); line-height: 1.6; }
@media (forced-colors: active) {
  .combo-btn::after { background-color: ButtonText; }
  .combo-btn, .combo-list { border: 2px solid ButtonBorder; }
  .combo-list [role="option"][aria-selected="true"],
  .combo-list [role="option"].here { forced-color-adjust: none; background-color: Highlight; color: HighlightText; }
}

/* ---------------------------------------------------------------------
   Small shared utilities
   --------------------------------------------------------------------- */
/* A line of help. Ordinary text colour - her rule, 2026-09-25: muted is
   ONLY for what you could skip and lose nothing. So the one place a hint
   goes quiet is under a form field, which is .field .hint above; a .hint
   anywhere else (an empty list, a line of explanation) reads normally. */
.hint { font-size: 16px; margin: 0; }
/* read by a screen reader, not shown - off-screen rather than
   display:none, which would take it out of the reading order too */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Page sidebar, and the drawer it becomes on a phone.

   A page with a sidebar is:

     <div class="layout">
       <nav class="side"> <h2>Heading</h2> <ul> … </ul> </nav>
       <main> … </main>
     </div>

   Mark the link you are on with class="current" or aria-current="page" -
   both are styled. Below 900px the sidebar hides and the menu button in the
   title bar opens <dialog class="nav-drawer"> holding the same links.

   This lives here because the CoA Design System, the tracker and the Site Editor
   each had their own copy, and they had already drifted: three column
   widths, two names for the current link, and one of them styled no drawer
   at all, so its phone menu opened as a box in the middle of the screen.
   --------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--side-width, 220px) minmax(0, 1fr);
  /* 40px between the sidebar (its scrollbar is its right edge) and the
     page - her rule, 2026-09-25, every tool with a sidebar */
  gap: 0 var(--space-7);
  max-width: 1400px;
  margin: 0;
  padding: 0 var(--space-5) 0 var(--space-4);
}
.layout > main { min-width: 0; padding: var(--space-5) 0 var(--space-8); }
.side {
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  /* never a sideways scrollbar (her rule, 2026-09-29) */
  overflow-x: hidden;
  /* the right-hand 8px keeps a highlighted row off the scrollbar */
  padding: var(--space-5) var(--space-2) var(--space-5) 0;
}
/* .side h2 used to be here, sized and tracked by hand. Nothing in any tool
   ever rendered one - every sidebar heading is an h3.side-group - so it was
   a second opinion about a component, reachable by nobody. Removed
   2026-09-24 while making the two label headings match. */
.side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-small);
  border-left: 3px solid transparent;
}
/* the 60% teal she picked, used for every sidebar and drawer link.
   .hovered is for a style guide showing this state on a sample that cannot
   be hovered - one extra selector, rather than a second copy of the values */
/* no left border on hover, her ask 2026-09-24 - the fill is enough to say the
   pointer is here, and the bar made a hovered row look half-selected. The
   selected row keeps its border; that is what the border is for. */
.side a:hover, .side a:focus-visible, .side a.hovered {
  background: var(--teal-hover);
}
/* the same fill as a selected tab, her ask 2026-09-24 - "you are here" should
   look the same whichever control is saying it. NOTE: white on --toggle-on is
   5.5:1, where darkteal-4 was 11.1:1. Still AA, below the AAA she usually
   holds to; it matches the selected tab, which has always been 5.5:1. */
.side a.current, .side a[aria-current="page"] {
  background: var(--selected-bg);
  border-left-color: var(--teal-6);
  color: var(--true-white);
  font-weight: 700;
}
.side .count { color: var(--text-muted); margin-left: var(--space-2); }
/* once the row is filled in, the muted tier is too quiet against it - on a
   light-mode hover the count was landing at 3.8:1. It takes the link's own
   colour instead, which is 6.9:1 there and 11.7:1 in dark. */
.side a:hover .count, .side a:focus-visible .count, .side a.hovered .count,
.side a.current .count, .side a[aria-current="page"] .count { color: inherit; }

.nav-drawer {
  display: flex;
  flex-direction: column;
  margin: 0 auto 0 0;
  padding: 0;
  height: 100dvh;
  max-height: none;
  width: min(330px, 86vw);
  border: 2px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-large) var(--radius-large) 0;
  background-color: var(--bg);
  color: var(--text);
}
dialog.nav-drawer:not([open]) { display: none; }
dialog.nav-drawer::backdrop { background: var(--backdrop); }
/* the links sit either straight in the drawer or inside a .drawer-body */
.nav-drawer .drawer-body, .nav-drawer > ul { padding: var(--space-3); overflow-y: auto; }
.nav-drawer .drawer-body ul { padding: 0; }
.nav-drawer ul { list-style: none; margin: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.nav-drawer a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: var(--space-3);
  border-radius: var(--radius-control);
  border-left: 3px solid transparent;
}
.nav-drawer a:hover, .nav-drawer a:focus-visible, .nav-drawer a.hovered {
  background: var(--drawer-hover);
  border-left-color: var(--teal-6);
}
/* the drawer holds the same links as the sidebar, so it says which one you
   are on the same way. It had no current state at all, which meant the phone
   menu - and every zoomed-in reader, who gets the same menu - could not tell. */
.nav-drawer a.current, .nav-drawer a[aria-current="page"] {
  background: var(--darkteal-4);
  border-left-color: var(--teal-6);
  color: var(--true-white);
  font-weight: 700;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding-inline: var(--space-4); }
  .side { display: none; }
}
@media (max-width: 760px) {
  .layout { padding-inline: var(--space-3); }
  .layout > main { padding-block: var(--space-4) var(--space-8); }
}
@media (forced-colors: active) {
  /* Windows throws our colours away and repaints every border in a system
     colour - including a TRANSPARENT one. So the 3px bar we keep in reserve
     for the selected row was being drawn on every row, and the sidebar read
     as though everything was selected (her note and screenshot, 2026-09-24).
     Each bar takes the colour of whatever it sits on instead, so it vanishes
     without the rows shifting 3px sideways, and the selected row is still
     obvious from its fill. */
  .side a, .nav-drawer a { border-left-color: Canvas; }
  .side a.current, .side a[aria-current="page"],
  .side a:hover, .side a:focus-visible,
  .nav-drawer a.current, .nav-drawer a[aria-current="page"],
  .nav-drawer a:hover, .nav-drawer a:focus-visible {
    forced-color-adjust: none;
    background-color: Highlight;
    color: HighlightText;
    border-left-color: Highlight;
  }
}

/* The CoA Design System's demo modal is a plain coa-dialog - see Dialogs above.
   It needs no rules of its own, which is the point. */

/* ==========================================================================
   HERO BAND - shared component (her call 2026-09-25: "should this be a
   specific component?" - yes). Moved from home.css unchanged; the home page
   is its first user and the Site Editor's page blocks can use it too.
   ========================================================================== */
/* A full-width band under the header, Dark Teal -> Wine gradient (one of
   the shared gradient options) in dark mode; Ice-2 to Pink-7 in light mode
   (the LIGHT MODE HERO BAND block below). Markup:
     <section class="hero"><div class="hero-inner">
       <div> h1, p, <div class="hero-actions"> buttons </div> </div>
       <div> the page's own picture </div>
     </div></section>

   THE HERO BAND'S OWN RULES - part of the component, not deviations (her
   call 2026-09-26). Each is tagged "HERO BAND (n)" below and listed on
   Design > Layout > Hero Band.
     1. It sets the dark theme's text, muted-text, secondary-button, border and
        focus-ring tokens; in light mode it hands them back to the page.
     2. The secondary button's hover fill is the dark theme's.
     3. Its paragraph is 18px and runs up to 60ch.
     4. Its bottom border is transparent: invisible normally, drawn as a
        line in Windows High Contrast so the band still has an edge there.
     5. The picture on the right belongs to each page (the home page's is
        in home.css), and must be aria-hidden.
     6. On a phone the picture goes above the words - visual order only, so
        a screen reader and Tab still start at the h1. */
.hero {
  /* HERO BAND (1): dark-theme tokens inside the band (light mode hands
     them back - see LIGHT MODE HERO BAND) */
  --text: var(--true-white);
  --text-muted: var(--pink-8);
  --btn-secondary-text: var(--cream-1);
  --btn-secondary-border: var(--cream-1);
  --border: var(--gray-8);
  --focus-ring: var(--gold-11);
  /* HERO BAND (2): the secondary button's hover fill is the dark
     theme's too - the light one is cream-1, this band's button text.
     A token, not a rule, so anything that puts the band in light
     colors gets the light hover back with it. */
  --btn-secondary-hover-bg: var(--gold-2);
  /* ...and the band's own text uses them. Without this the paragraph kept
     the page's color, which in light mode is black on this dark band (her
     catch 2026-09-25); the heading only looked right because h1 sets its own. */
  color: var(--text);
  background: linear-gradient(135deg, var(--darkteal-2), var(--wine-4));
  padding: var(--space-8) 0 var(--space-8);
  /* HERO BAND (4): invisible edge; High Contrast draws it (her ask
     2026-09-25; it was a visible gray-8 line) */
  border-bottom: 2px solid transparent;
}
/* main itself is full width so the hero band can run edge to edge; the
   hero's content and every section after it sit in the same column */
/* .wrap is shared; the hero's inner column is the same measure */
.hero-inner { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--space-6); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  /* 28px between text and art (was 64) - her ask: less space between them */
  gap: var(--space-6);
  align-items: center;
}
@media (max-width: 800px) {
  .hero { padding-top: var(--space-7); }
  .hero-inner { grid-template-columns: 1fr; }
  /* HERO BAND (6): the picture above the words (her ask 2026-09-26) */
  .hero-inner > :last-child { order: -1; }
}
/* THE HERO'S HEADING IS JUST AN H1 NOW - her call, 2026-09-24, to make
   every pinned size follow the scale. It was 52px with its own tighter
   tracking and line height, which made it the one heading on the site
   that answered to nothing. This is the most visible single change of
   that round: the front page's opening line goes 52px -> 36px. Only the
   space under it is still ours. */
.hero h1 { margin-bottom: var(--space-4); }
/* HERO BAND (3): 18px and up to 60ch */
.hero p { font-size: 18px; max-width: 60ch; margin: 0 0 var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* zoomed in far, or on a phone */
@media (max-width: 560px) {
  .hero { padding: var(--space-6) 0 var(--space-6); }
  .hero-inner { padding: 0 var(--space-3); }
}

/* ---- LIGHT MODE HERO BAND (her call 2026-09-25) ----
   Ice-2 to pink-7 with the page's own light colors: black text 13.1:1+,
   muted/links wine-5 6.4:1+, the secondary button gold-3 5.4:1+. */
:root[data-theme="light"] .hero:not(.theme-dark *),
.theme-light .hero { --text: inherit; --text-muted: inherit; --btn-secondary-text: inherit; --btn-secondary-border: inherit; --border: inherit; --focus-ring: inherit; --btn-secondary-hover-bg: inherit; background: linear-gradient(135deg, var(--ice-2), var(--pink-7)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero:not(.theme-dark *) { --text: inherit; --text-muted: inherit; --btn-secondary-text: inherit; --btn-secondary-border: inherit; --border: inherit; --focus-ring: inherit; --btn-secondary-hover-bg: inherit; background: linear-gradient(135deg, var(--ice-2), var(--pink-7)); }
}

/* ==========================================================================
   FOOTER - shared, so every page's footer matches the home page's.
   It used to live in the home page's own CSS, which is why other pages got a
   plain fallback instead.
   ========================================================================== */
/* The footer is its own block of colour - no rule above it, because the
   colour change already separates it from the page.

   The borders below are the SAME colour as what they sit on, so they are
   invisible here. That is deliberate: in Windows High Contrast the browser
   throws our colours away and repaints borders in the system colour, so a
   same-colour border is the only thing that keeps these divisions visible
   when the colour that was doing the work disappears. */
footer.site-footer {
  margin-top: var(--space-5);
  background-color: var(--gray-1);
  border-top: 2px solid var(--gray-1);
}
.footer-inner {
  max-width: var(--page-width); margin: 0 auto; padding: var(--space-7) var(--space-6);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-5);
}
/* the footer's column headings are h3.section-label above - her call
   2026-09-24. They were h2 dressed small by a rule of their own here. */
/* The band is dark in DARK mode, so its contents borrow the dark theme's
   colours - the same trick the header band and the hero use. The LINKS are
   not listed here: they come from the theme, like every other link on the
   site (her note, 2026-09-24). What used to be here set gold-11 / cream-1,
   which is word for word what the dark theme's :root already says - so it
   bought nothing in dark mode and was the very thing overriding light. */
footer.site-footer {
  --text: var(--true-white);
  --text-muted: var(--pink-8);
  --border: var(--gray-8);
  color: var(--text);
}
/* In LIGHT mode the band is light too - her call, 2026-09-24 - so it stops
   borrowing and uses the light theme's own colours: black text is 13.6:1 on
   the gray-8 band, muted wine-4 7.5:1.

   The links are set nowhere in here on purpose. They are the design system's
   ordinary light-mode link, gold-3 (her note, 2026-09-24).

   The band went gray-7 -> gray-8 -> gray-9 over that day, the last step her
   note after seeing the ordinary link on it. That step is what buys the
   contrast back: gold-3 is 6.9:1 on gray-9, where it was 5.6:1 on gray-8.
   6.9 is a whisker under the 7:1 she holds text to - cream-3 would give 8.0
   - but it is the last stop that still reads as a grey band rather than a
   cream one. Black text 16.9:1, muted wine-4 9.3:1, hover gold-2 10.0:1. */
:root[data-theme="light"] footer.site-footer,
.theme-light footer.site-footer {
  background-color: var(--gray-9);
  border-top-color: var(--gray-9);
  --text: var(--true-black);
  --text-muted: var(--wine-5);
  --border: var(--gray-1);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) footer.site-footer {
    background-color: var(--gray-9);
    border-top-color: var(--gray-9);
    --text: var(--true-black);
    --text-muted: var(--wine-5);
    --border: var(--gray-1);
  }
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 16px; }
/* the links are the link colour, the way they are everywhere else - it reads
   as a list of links rather than a block of plain text */
/* underlined, because they are links and every other link on the site is
   (her note, 2026-09-24). This used to switch the underline off and hand
   it back on hover, which made them look like plain text until you
   happened to point at one - and gave a keyboard or touch user nothing.
   Nothing is declared here now: `a` carries the colour and the browser
   carries the underline, so the footer cannot drift from the rest. */
.footer-links a { display: inline-flex; align-items: center; gap: var(--space-2); }
/* the icons take the text color: white on the dark footer, black on the
   light one (her ask 2026-09-26). Only home.css gave them a fill before, so
   off the home page they were drawn black */
.footer-links .social-icon { width: 14px; height: 14px; fill: var(--text); }
.footer-bottom {
  border-top: 2px solid var(--gray-1);   /* invisible here, a line in High Contrast */
  padding: var(--space-4) var(--space-6); text-align: center;
  font-size: 16px; color: var(--text-muted); max-width: var(--page-width); margin: 0 auto;
}


/* ==========================================================================
   ZOOMED IN, OR ON A PHONE

   Zooming to 400% leaves about 320px of width in the terms CSS thinks in, so
   these are the same rules a phone gets. Without them the header alone ate
   two thirds of the screen: a 22px title wrapping onto three lines, a 34px
   logo and a 44px button, all inside 28px of padding.
   ========================================================================== */
@media (max-width: 900px) {
  .site-header { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .site-title { font-size: 19px; }
  .site-title .mark { width: 28px; height: 28px; margin-right: var(--space-2); }
  .nav-toggle { width: 40px; height: 40px; }
}
/* Under 440px the title bar is the icon and the buttons: the name comes off
   the screen but NOT out of the page. The title link's only other content is
   a decorative icon, so display:none would leave it with no accessible name
   at all - a screen reader would announce it as "link" and nothing more.
   These are .sr-only's declarations, applied only at this width.
   440 is the number because the tools carry two more buttons than the website
   (Claude and Settings, plus the back arrow) and their bar runs out of room
   just under 400. The website's own bar survives to 360. */
@media (max-width: 440px) {
  .site-header .wordmark {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  /* the icon carried a gap meant for the words beside it */
  .site-title .mark, .site-title .tool-mark { margin-right: 0; }
}

@media (max-width: 560px) {
  .site-header { padding: var(--space-2) var(--space-3); gap: var(--space-3); }
  /* the name wraps rather than being cut, but at a size that leaves room for
     the page underneath it */
  .site-title { font-size: 17px; line-height: 1.25; }
  .site-title .mark { width: 24px; height: 24px; margin-right: var(--space-2); }
  .nav-toggle { width: 38px; height: 38px; }
  .footer-inner { padding: var(--space-5) var(--space-3); gap: var(--space-4); }
  .footer-bottom { padding: var(--space-4) var(--space-3); }
  .wrap { padding-inline: var(--space-3); }
}

/* ---------------------------------------------------------------------
   Drawer, and a block of markup

     <details class="drop"><summary>About</summary>
       <div class="drop-body">…</div>
     </details>

   A drawer that starts shut and says what is inside before you open it.
   Moved here from the Design tab's own sheet on 2026-09-23: the page editor
   uses the same drawer to show the markup of a block it keeps as it is, and
   anything on more than one surface belongs in the shared sheet.
   --------------------------------------------------------------------- */
.drops { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.drops > .drop[open] { flex: 1 1 100%; }

/* a drawer: shut by default, and it says what is inside before you open it */
.drop { margin-top: 0; }
.drop > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  width: auto;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-3);
  border: 2px solid var(--border-soft, var(--border));
  border-radius: var(--radius-control);
  font-size: 16px;
  font-weight: 700;
  list-style: none;
}
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::before {
  content: "";
  width: 9px; height: 9px;
  border-right: 2.4px solid var(--chevron);
  border-bottom: 2.4px solid var(--chevron);
  transform: rotate(-45deg);
  margin-left: 2px;
  transition: transform .15s ease;
}
.drop[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
.drop > summary:hover, .drop > summary:focus-visible {
  color: var(--text);
  border-color: var(--teal-6);
  background: var(--teal-hover);
}
.drop-body { padding: var(--space-3) 2px 2px; max-width: 74ch; }
.drop-body > :first-child { margin-top: 0; }
.drop-body > :last-child { margin-bottom: 0; }
.drop-body p { margin: 0 0 var(--space-3); }

@media (forced-colors: active) {
  .drop > summary { border-color: ButtonBorder; }
  .drop > summary:hover, .drop > summary:focus-visible {
    forced-color-adjust: none; background-color: Highlight; color: HighlightText;
  }
}

.code-sample {
  margin: 0;
  padding: var(--space-4) var(--space-4);
  background: var(--true-black);
  border: 2px solid var(--border);
  border-radius: var(--radius-box);
  overflow-x: auto;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre;
}
.code-sample code { color: var(--text); }

/* Saved cards (.card-teal, .card-gold ...) are NOT here: css/coa-cards.css is
   written from Design > Cards by site-editor/cards-css.js (tracker d739). */
