/*
 * Church Know-How styles.
 *
 * Built on the same kit as openagriculturetechnology.com and Midway Supply
 * (chosen October 12, 2026): a clean sans-serif, a warm off-white
 * page, white cards, hairline rules, small all-caps labels, a sticky header
 * and a sticky "On this page" list beside long pages. The colors are Church
 * Know-How's own, as the Design Brief asks ("inherit the architecture, not
 * the appearance"). Every color and size is a token below, so the design
 * from Claude Design can replace them in one place.
 *
 * Phone first. No fonts are downloaded. Nothing depends on hover or on color
 * alone. Text colors keep a contrast of at least 7:1 on their backgrounds.
 * The header bar with the logo is white (the logo's lettering is dark); the
 * ribbon and title band below it are navy, as OAT's dark glass and Midway's
 * navy panels are; reading areas stay dark-on-light.
 */

/* Light and dark (October 13, 2026).
   The light colors below are the default; the dark ones follow the device's
   setting, or the reader's choice from the dark mode switch, which
   assets/theme.js saves as data-theme on the html element. */
:root {
  color-scheme: light;

  /* Brand: a calm navy and a warm sand. */
  --brand-navy: #1f3a5f;
  --brand-navy-deep: #142840;
  --brand-sand: #c8a96a;

  /* Neutrals: warm off-white to near-black. */
  --neutral-50: #efebe2;
  --neutral-100: #e6e1d5;
  --neutral-200: #d9d3c5;
  --neutral-600: #404855;
  --neutral-800: #1f2937;
  --neutral-900: #111827;

  --surface: var(--neutral-50);
  --surface-raised: #ffffff;
  --text-body: var(--neutral-800);
  --text-heading: var(--neutral-900);
  --text-muted: var(--neutral-600);
  --link: #1a4680;
  --link-visited: #5b2a86;       /* links already opened, in the reading area */
  --border: var(--neutral-200);
  --short-background: #dce6f2;
  --related-background: var(--neutral-100);  /* the strip after a page: more in its area, and search */
  --dated-background: #fbf6ea;
  --next-background: #ffffff;           /* "Where to go next" only (to-do doc-708): its box, used for nothing else */
  --next-edge: var(--brand-navy);
  --dated-edge: #9a7b3f;
  --dated-text: #5b4a1f;
  --footer-background: var(--brand-navy);
  --footer-text: #ffffff;
  --band-background: var(--brand-navy);
  --band-text: #ffffff;
  --band-muted: #d6dee8;
  --ribbon-background: #182f4d;
  --ribbon-logo-text: #f2f4f7;
  --ribbon-logo-mark: #6ea8ea;
  --mark-background: #fde68a;
  --draft-background: #fdecc8;
  --draft-text: #5c3d00;
  --field-border: #8a8f98;
  --error-background: #fbeaea;
  --error-edge: #a12a2a;
  --gradient-frame: linear-gradient(110deg, var(--brand-sand) 0%, #e3cfa3 45%, #7f9cc0 100%);
  --accent: var(--brand-navy);          /* edges of cards and blocks, the short version's label */
  --button-background: var(--brand-navy);
  --button-hover: var(--brand-navy-deep);
  --on-sand: #111827;                   /* text on sand buttons, in both schemes */
  --logo-text: #111111;
  --logo-mark: #1366b0;
  --kind-offer-background: #dcefe3;
  --kind-offer-text: #14532d;
  --kind-request-background: #e3e7f6;
  --kind-request-text: #1e2a6b;
  /* Charts in the back office (Visitors): three series and a five-step ramp,
     checked for colour blindness and contrast on the card colour, light and dark. */
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-3: #1baf7a;
  --viz-heat-1: #cde2fb;
  --viz-heat-2: #9ec5f4;
  --viz-heat-3: #5598e7;
  --viz-heat-4: #256abf;
  --viz-heat-5: #104281;
  --viz-up: #006300;
  --viz-down: #b42318;

  --font-reading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-label: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --size-body: 1.125rem; /* 18px reading size */
  --size-lead: clamp(1.15rem, 1.5vw, 1.3rem);
  --size-small: 0.9375rem; /* 15px */
  --size-tiny: 0.875rem; /* 14px, labels only (13px until October 13, 2026: older readers) */
  --size-h1: clamp(2rem, 3.2vw, 2.75rem);
  --size-h2: clamp(1.45rem, 2.2vw, 1.8rem);
  --size-h3: clamp(1.2rem, 1.6vw, 1.35rem);
  --tracking-label: 0.08em;

  --radius: 12px;
  --radius-small: 6px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.05), 0 1px 1px rgba(17, 24, 39, 0.03);
  --shadow-menu: 0 12px 24px rgba(17, 24, 39, 0.18);   /* the open Topics or Menu list */
  --button-sand-hover: #d6bc86;

  /* See-through white, for lines and fills on the navy bars (header, ribbon, footer, bands), in both schemes. */
  --on-dark-faint: rgba(255, 255, 255, 0.08);
  --on-dark-subtle: rgba(255, 255, 255, 0.1);
  --on-dark-soft: rgba(255, 255, 255, 0.12);
  --on-dark-hover: rgba(255, 255, 255, 0.18);
  --on-dark-divider: rgba(255, 255, 255, 0.2);
  --on-dark-line: rgba(255, 255, 255, 0.3);
  --on-dark-edge: rgba(255, 255, 255, 0.4);
  --on-dark-edge-strong: rgba(255, 255, 255, 0.45);
  --on-dark-strong: rgba(255, 255, 255, 0.6);
  --picture-view-background: rgba(17, 24, 39, 0.92);  /* behind a picture opened full size, in both schemes */

  --print-text: #000000;       /* a printed page is always black on white */
  --print-background: #ffffff;
  --print-size-body: 12pt;
  --print-size-link: 0.9em;    /* a printed link's address, after its words */
  --print-size-small: 9pt;
  --size-area-name: 1.15rem;   /* topic area names in lists */
  --size-tile-count: 2rem;     /* the numbers on the back office's Overview */
  --size-kpi: 2.25rem;         /* the headline numbers on Visitors */
  --size-panel: 1.0625rem;     /* a panel's title on Visitors */
  --size-close-mark: 1.75rem;  /* the X that closes a picture opened full size */
  --diagram-max: 32rem;        /* a diagram's widest, so its labels stay near reading size on wide screens */

  --wrap: 68rem;
  --office-wrap: none;  /* the back office uses the whole screen (October 20, 2026; 82rem before) */
  --measure: 40rem; /* about 70 characters a line at 18px (44rem until October 13, 2026) */
  --rail: 15rem;
  --head-height: 0rem;   /* the white header bar's height until October 28, 2026; the logo now sits in the ribbon */
  --ribbon-height: 3.5rem;
  /* How far below the top a jump link lands: clear of whatever stays on screen. */
  --sticky-offset: 4.75rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---------- Dark mode ---------- */
/* The same dark colors twice: for a device set to dark with no choice saved,
   and for a reader who chose dark. The build stops if the two differ. Screen
   only, so a printed page always uses the light colors.
   Buttons carry white text (--band-text): on --button-background #2c5992 that
   is 7.12:1 and on --button-hover #24497a 9.09:1 (November 24, 2026; the
   earlier #2d5b94 gave 6.92:1 and its hover #3a6aa6 only 5.54:1). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #10151c;
    --surface-raised: #19212c;
    --text-body: #dfe5ec;
    --text-heading: #f5f7fa;
    --text-muted: #a9b3bf;
    --link: #9cc2ff;
    --link-visited: #c9b3f5;
    --border: #2d3846;
    --short-background: #172a42;
    --related-background: #161d27;
    --dated-background: #2a2414;
    --next-background: #19212c;
    --next-edge: #7ea9dd;
    --dated-edge: #c9a45e;
    --dated-text: #ecd9a8;
    --footer-background: #0f1f33;
    --band-background: #142a45;
    --band-muted: #b9c6d6;
    --ribbon-background: #0e1d30;
    --mark-background: #6a5a12;
    --draft-background: #3b2d0e;
    --draft-text: #f5d891;
    --field-border: #6b7686;
    --error-background: #3a1717;
    --error-edge: #e07070;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.45);
    --accent: #7ea9dd;
    --button-background: #2c5992;
    --button-hover: #24497a;
    --logo-text: #f2f4f7;
    --logo-mark: #6ea8ea;
    --kind-offer-background: #163524;
    --kind-offer-text: #a7e3bd;
    --kind-request-background: #1d2547;
    --kind-request-text: #c3cbf5;
    --viz-1: #3987e5;
    --viz-2: #d95926;
    --viz-3: #199e70;
    --viz-heat-1: #184f95;
    --viz-heat-2: #1c5cab;
    --viz-heat-3: #2a78d6;
    --viz-heat-4: #5598e7;
    --viz-heat-5: #9ec5f4;
    --viz-up: #3fc23f;
    --viz-down: #f08080;
  }
}

@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --surface: #10151c;
    --surface-raised: #19212c;
    --text-body: #dfe5ec;
    --text-heading: #f5f7fa;
    --text-muted: #a9b3bf;
    --link: #9cc2ff;
    --link-visited: #c9b3f5;
    --border: #2d3846;
    --short-background: #172a42;
    --related-background: #161d27;
    --dated-background: #2a2414;
    --next-background: #19212c;
    --next-edge: #7ea9dd;
    --dated-edge: #c9a45e;
    --dated-text: #ecd9a8;
    --footer-background: #0f1f33;
    --band-background: #142a45;
    --band-muted: #b9c6d6;
    --ribbon-background: #0e1d30;
    --mark-background: #6a5a12;
    --draft-background: #3b2d0e;
    --draft-text: #f5d891;
    --field-border: #6b7686;
    --error-background: #3a1717;
    --error-edge: #e07070;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.45);
    --accent: #7ea9dd;
    --button-background: #2c5992;
    --button-hover: #24497a;
    --logo-text: #f2f4f7;
    --logo-mark: #6ea8ea;
    --kind-offer-background: #163524;
    --kind-offer-text: #a7e3bd;
    --kind-request-background: #1d2547;
    --kind-request-text: #c3cbf5;
    --viz-1: #3987e5;
    --viz-2: #d95926;
    --viz-3: #199e70;
    --viz-heat-1: #184f95;
    --viz-heat-2: #1c5cab;
    --viz-heat-3: #2a78d6;
    --viz-heat-4: #5598e7;
    --viz-heat-5: #9ec5f4;
    --viz-up: #3fc23f;
    --viz-down: #f08080;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Below a short page, the footer's color fills the rest of the window. */
@media screen {
  html {
    background: var(--footer-background);
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-reading);
  font-size: var(--size-body);
  line-height: 1.6;
}

/* Jump links and keyboard focus land below the sticky header and ribbon, not under them
   (WCAG 2.2, 2.4.11; technique C43). Set on the page's content and footer, never on the
   whole page (scroll-padding on html): browsers apply that to the ribbon's search box too,
   which is pinned above the line, so every letter typed scrolled the page up to "show" the
   box (reported October 22, 2026; reproduced in Chromium; a negative scroll-margin on the
   ribbon did not cancel it). */
main,
main *,
.page-foot,
.page-foot * {
  scroll-margin-top: var(--sticky-offset);
}

/* A long web address written out in the text (github.com/smartmontools/smartmontools) breaks
   where it must, so the page never gets wider than a 390 pixel phone (November 17, 2026, an
   outside review found two pages 23 and 33 pixels too wide). Ordinary words wrap as before. */
main p,
main li,
main dd {
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--surface-raised);
}

.print-only {
  display: none;
}

/* ---------- The logo, at the start of the ribbon ---------- */
/* October 28, 2026, at the owner's request: the logo moved from a
   white header bar of its own into the navy ribbon, with light lettering and a lighter book
   (--ribbon-logo-*, 12:1 and 5.4:1 on the ribbon's navy). */

.site-name {
  display: block;
  flex: none;
  line-height: 0;
  margin-right: 0.25rem;
}

.site-name svg {
  display: block;
  width: auto;
  height: 1.75rem;
}

.ribbon .logo {
  --logo-text: var(--ribbon-logo-text);
  --logo-mark: var(--ribbon-logo-mark);
}

.ribbon .account-link {
  color: var(--band-text);
}

.logo .logo-text {
  fill: var(--logo-text);
}

.logo .logo-mark {
  fill: var(--logo-mark);
}

.logo .logo-mark-line {
  stroke: var(--logo-mark);
}

/* The dark mode switch, in the header beside the search box on every page (October 30, 2026; from
   October 14 it was in the footer and the Menu list): a small track whose knob shows a sun, or slides
   right and shows a moon when dark mode is on. Screen readers hear "Dark mode, switch, on/off". It
   needs the script (assets/theme.js), so it stays hidden until the script shows it. The button keeps a
   44-pixel-tall area to tap. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.head-theme {
  display: flex;
  flex: none;
  align-items: center;
  color: var(--band-text);
}

.head-theme .theme-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The header's search box is shorter (October 30, 2026), so it ends beside the dark mode switch. */
@media (min-width: 48rem) {
  .ribbon .search {
    flex: 0 1 16rem;
    margin-inline-start: auto;
  }
}

.theme-toggle[hidden] {
  display: none;
}

.theme-track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--surface);
}

.theme-thumb {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--text-heading);
  color: var(--surface-raised);
}

.theme-thumb svg {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
}

.theme-thumb .theme-moon,
.theme-toggle[aria-checked="true"] .theme-sun {
  display: none;
}

.theme-toggle[aria-checked="true"] .theme-moon {
  display: block;
}

.theme-toggle[aria-checked="true"] .theme-thumb {
  transform: translateX(1.25rem);
}

@media (prefers-reduced-motion: no-preference) {
  .theme-thumb {
    transition: transform 0.15s ease;
  }
}

.theme-toggle:hover .theme-track {
  border-color: var(--text-heading);
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle:focus-visible .theme-track {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Ribbon: the Topics button, topic groups, search, "Contents" ---------- */
/* Stays on screen the whole time, on one line. On phones and tablets it holds
   the Menu button, the search box and "Contents"; on wide screens the Menu
   button reads "Topics" and the group buttons join it (October 13, 2026). */

.ribbon {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.45rem var(--gutter);
  background: var(--ribbon-background);
  border-bottom: 1px solid var(--on-dark-faint);
}

/* The Menu button (Topics on wide screens): a plain disclosure, so it opens
   and closes with a click, a tap, or the Enter key, and needs no JavaScript.
   On phones and tablets it shows the three-line menu icon and the word "Menu";
   the icon becomes an X while the list is open. */
.topics-menu {
  flex: none;
}

.topics-menu > summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--on-dark-edge-strong);
  border-radius: 999px;
  background: var(--on-dark-faint);
  color: var(--band-text);
  font-size: var(--size-small);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.topics-menu > summary::-webkit-details-marker {
  display: none;
}

.menu-icon {
  display: block;
  flex: none;
}

.topics-menu[open] .menu-bars,
.topics-menu:not([open]) .menu-close,
.topics-word {
  display: none;
}

/* On wide screens: a small arrow that points down when closed and up when open. */
.topics-menu > summary::after {
  content: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.topics-menu[open] > summary {
  background: var(--band-text);
  color: var(--ribbon-background);
}

.topics-menu[open] > summary::after {
  margin-top: 0.2rem;
  transform: rotate(225deg);
}

.topics-menu > summary:hover {
  border-color: var(--band-text);
}

.topics-menu > summary:focus-visible {
  outline: 3px solid var(--band-text);
  outline-offset: 2px;
}

/* The open list: every group with its areas, below the ribbon. */
.topics-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100vh - var(--ribbon-height) - 1rem);
  padding: 1rem var(--gutter) 1.25rem;
  overflow-y: auto;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-menu);
}

.topics-panel > ul {
  display: grid;
  gap: 1rem 2rem;
  max-width: var(--wrap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topics-panel ul ul {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.topics-panel a {
  display: block;
  padding: 0.4rem 0;
  color: var(--text-body);
  text-decoration: none;
}

.topics-panel a:hover {
  color: var(--link);
  text-decoration: underline;
}

.topics-panel .menu-all > a,
.topics-panel .menu-group-name {
  color: var(--text-heading);
  font-weight: 650;
}

.topics-panel .menu-group-name {
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Start here and About, first in the Menu list on phones and tablets (on wide
   screens they are buttons in the ribbon). */
.topics-panel .menu-pages > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.topics-panel .menu-pages a {
  padding: 0.45rem 1rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  color: var(--text-heading);
  font-weight: 650;
}

/* The page being read: a sand bar and bold text, not color alone. */
.topics-panel a[aria-current] {
  padding-left: 0.6rem;
  border-left: 3px solid var(--brand-sand);
  font-weight: 650;
}

.topics-panel a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

/* The page buttons and the Sharing Board button: links that look like
   buttons. They show only on wide screens, in the one-row ribbon; on phones
   and tablets the Menu list holds them. */
.ribbon-pages,
.ribbon-topics {
  display: none;
  min-width: 0;
}

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-buttons li {
  margin: 0;
}

/* The Sharing Board button stands a little apart from the Topics button. */
.nav-buttons .nav-gap {
  margin-left: 0.35rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--on-dark-line);
}

/* Buttons in the ribbon are at least 44 pixels tall, easy to tap. */
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.38rem 0.9rem;
  border: 1px solid var(--on-dark-edge-strong);
  border-radius: 999px;
  background: var(--on-dark-faint);
  color: var(--band-text);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.nav-button:hover {
  border-color: var(--band-text);
  background: var(--on-dark-hover);
}

/* The group or page being read: filled white with a sand line, not color alone. */
.nav-button[aria-current] {
  border-color: var(--band-text);
  background: var(--band-text);
  box-shadow: inset 0 -3px 0 var(--brand-sand);
  color: var(--ribbon-background);
}

.nav-button:focus-visible {
  outline: 3px solid var(--band-text);
  outline-offset: 2px;
}

.search {
  display: flex;
  flex: 1 1 0;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--on-dark-edge);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-body);
  font: inherit;
  font-size: 1rem; /* 16px or more, or iPhones zoom in on a tap and stay zoomed */
}

.search input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.search button {
  flex: none;
  min-height: 2.75rem;
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-sand);
  color: var(--on-sand);
  font: inherit;
  font-size: var(--size-small);
  font-weight: 600;
  cursor: pointer;
}

/* On phones the ribbon's Search button is a magnifying glass, so the box has
   room; its word stays for screen readers. Wider screens show the word. */
.search-icon {
  display: none;
}

@media (max-width: 47.99rem) {
  /* With the logo in the ribbon (October 28, 2026), a little less space around each part, so the
     search box keeps room for its word on a 390-pixel phone. */
  .ribbon {
    gap: 0 0.5rem;
  }

  .ribbon .topics-menu > summary {
    padding-inline: 0.7rem;
  }

  .ribbon .search input {
    padding-inline: 0.75rem;
  }

  .ribbon .search button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.45rem 0.6rem;
  }

  .ribbon .search-icon {
    display: block;
  }

  .ribbon .search-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* "Contents" in plain letters, which take less room than spaced capitals. */
  .ribbon .head-toc {
    padding: 0.35rem 0.7rem;
    font-family: inherit;
    font-size: var(--size-tiny);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }
}

.toc-icon {
  display: none;
}

/* The narrowest phones: "Contents" becomes a list icon; its word stays for screen readers. */
/* Phones (October 30, 2026, when the dark mode switch joined the ribbon; until then under 384 pixels): no
   room for a readable box, so the ribbon shows only the magnifying glass, which opens the search page and
   its own full-width box. */
@media (max-width: 47.99rem) {
  .ribbon .search {
    flex: none;
    margin-inline-start: auto;
  }

  .ribbon .search input {
    display: none;
  }
}

/* Under 360 pixels the logo, Menu, search and the dark mode switch need a little less room each, or the
   switch runs off a 320-pixel screen (November 8, 2026). Every button keeps its 44-pixel area. */
@media (max-width: 22.49rem) {
  .ribbon {
    gap: 0 0.375rem;
    padding-inline: 0.75rem;
  }

  .ribbon .site-name {
    margin-right: 0;
  }

  .ribbon .site-name svg {
    height: 1.5rem;
  }

  .ribbon .topics-menu > summary {
    padding-inline: 0.55rem;
  }
}

@media (max-width: 22.49rem) {
  .ribbon .head-toc {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.55rem;
  }

  .ribbon .toc-icon {
    display: block;
  }

  .ribbon .toc-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.search input:focus-visible,
.search button:focus-visible,
.head-toc:focus-visible {
  outline: 3px solid var(--band-text);
  outline-offset: 2px;
}

.head-toc {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--on-dark-edge);
  border-radius: 999px;
  background: var(--on-dark-faint);
  color: var(--band-text);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Page head: label, title, scope line ---------- */

.page-head {
  position: relative;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--band-background);
  color: var(--band-text);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--gradient-frame);
}

.page-head h1 {
  max-width: var(--measure);
  margin: 0.75rem 0 0.75rem;
  color: var(--band-text);
  font-size: var(--size-h1);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.page-head .lead {
  max-width: var(--measure);
  margin: 0;
  font-size: var(--size-lead);
}

.scope {
  max-width: var(--measure);
  margin: 0;
  color: var(--band-muted);
}

.lead + .scope {
  margin-top: 0.6rem;
}

.page-head a {
  color: var(--band-text);
}

/* The quiet label that tells an option page from a rule page. */
.page-kind {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  line-height: 1.4;
  text-transform: uppercase;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0;
}

/* "Home > Topic area", above the title: where the page sits. */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
  font-size: var(--size-small);
}

.crumbs li {
  margin: 0;
}

.crumbs li + li::before {
  content: "\203A" / "";
  margin-right: 0.4rem;
  color: var(--band-muted);
}

.page-head .crumbs a {
  color: var(--band-muted);
}

.page-head .crumbs a:hover {
  color: var(--band-text);
}

.page-head .page-kind {
  border-color: var(--on-dark-edge);
  background: var(--on-dark-faint);
  color: var(--band-text);
}

/* ---------- Page body ---------- */

.page-body {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
}

.page-body > * {
  max-width: var(--measure);
}

h2,
h3 {
  color: var(--text-heading);
  line-height: 1.25;
}

h2 {
  margin: 0 0 1rem;
  font-size: var(--size-h2);
  letter-spacing: -0.015em;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: var(--size-h3);
  letter-spacing: -0.01em;
}

p,
ul,
ol,
blockquote {
  margin: 0 0 1em;
}

li {
  margin-bottom: 0.5em;
}

/* Links already opened in the page's text change color, so a reader can see
   where they have been (Nielsen Norman Group: most useful to older readers). */
.page-body a:visited {
  color: var(--link-visited);
}

/* A Glossary term, linked where it is first used on a page (October 14, 2026):
   the text keeps its own color, with a light dotted underline, so the page
   does not look crowded with links. Solid on hover. */
.page-body a.gloss,
.page-body a.gloss:visited {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.page-body a.gloss:hover {
  text-decoration-style: solid;
}

li > ul {
  margin-top: 0.4rem;
}

blockquote {
  margin-left: 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-raised);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.section {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

.page-body > .section:first-child {
  margin-top: 0;
}

/* The short version: the most prominent block on the page. */
.page-body > .short-version {
  margin-top: 0;
  padding: 1.25rem 1.5rem 0.5rem;
  background: var(--short-background);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--size-lead);
}

.short-version h2 {
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Term lists, such as the Glossary. */
dl {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

dt {
  margin-top: 1.25rem;
  color: var(--text-heading);
  font-weight: 700;
}

dd {
  margin: 0.25rem 0 0;
}

/* ---------- "On this page" ---------- */

.toc {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem 0.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc-label {
  margin: 0 0 0.25rem;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  font-size: var(--size-small);
  line-height: 1.35;
  text-decoration: none;
}

.toc li:last-child > a {
  border-bottom: none;
}

.toc li li a {
  padding-left: 1rem;
  color: var(--text-muted);
}

.toc li li:last-child > a {
  border-bottom: 1px solid var(--border);
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--link);
  text-decoration: underline;
}

/* ---------- Options ---------- */

.disclaimer {
  color: var(--text-muted);
  font-size: var(--size-small);
}

/* Each path is the same repeated card. A short path is still a whole one. */
/* Narrower side padding on phones, so the text column inside the card is
   not squeezed (about 16px at 390px wide, 24px on wider screens). */
.path {
  margin: 0 0 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 1.5rem) 0.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Dated, volatile content: a label and a quiet edge, not a warning color. */
.dated {
  background: var(--dated-background);
  border-left: 3px dashed var(--dated-edge);
}

.field.dated {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem 0.1rem;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

section.dated {
  padding: 1.25rem 1.5rem 0.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.dated-label {
  margin: 0 0 0.25rem;
  color: var(--dated-text);
  font-size: var(--size-small);
  font-weight: 650;
}

/* ---------- Sources ---------- */
/* Folded shut behind one button; the browser's own <details>, no script. */

.sources-box {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.sources-box > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  color: var(--link);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.sources-box > summary::-webkit-details-marker {
  display: none;
}

/* A small chevron: points right when shut, down when open. */
.sources-box > summary::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.sources-box[open] > summary::before {
  transform: rotate(45deg);
}

.sources-box > summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.sources-box[open] .when-closed,
.sources-box:not([open]) .when-open {
  display: none;
}

.sources-box[open] > summary {
  border-bottom: 1px solid var(--border);
}

.sources {
  margin: 0;
  padding: 1rem 1.25rem 0.25rem;
  list-style: none;
  font-size: var(--size-small);
}

.sources li {
  padding-left: 2rem;
  text-indent: -2rem;
  overflow-wrap: anywhere;
}

/* ---------- Lists: home, topic areas, search ---------- */

.list-body {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
}

.page-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-list li {
  margin: 0;
}

.page-list a {
  display: block;
  height: 100%;
  padding: 1.25rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--text-heading);
  text-decoration: none;
}

.page-list a:hover .page-list-title,
.page-list a:focus-visible .page-list-title {
  color: var(--link);
  text-decoration: underline;
}

.page-list-title {
  display: block;
  margin-top: 0.6rem;
  font-size: var(--size-h3);
  font-weight: 650;
  line-height: 1.3;
}

/* A card's labels, above its title: draft, and option or rule page. */
.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* The one line under a card's title. */
.page-list-summary {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: var(--size-small);
  font-weight: 400;
  line-height: 1.5;
}

/* ---------- Home: the search box, the buttons and the group cards ---------- */

.home-start {
  max-width: var(--measure);
  margin: 0 0 2rem;
  font-size: var(--size-lead);
}

.home-share {
  max-width: var(--measure);
  margin: 0;
}

/* The landing page's head: two buttons. */
.search-label {
  flex: 1 1 100%;
  color: var(--band-text);
  font-size: var(--size-lead);
  font-weight: 650;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
}

.button-link.button-sand {
  background: var(--brand-sand);
  color: var(--on-sand);
}

.button-link.button-sand:hover {
  background: var(--button-sand-hover);
  color: var(--on-sand);
}

.button-link.button-ghost {
  border: 1px solid var(--on-dark-strong);
  background: transparent;
  color: var(--band-text);
}

.button-link.button-ghost:hover {
  border-color: var(--band-text);
  background: var(--on-dark-soft);
}

/* The landing page's head stays short, so today's option is on a phone's first screen. */
.page-head.home-head {
  padding-block: clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem);
}

.home-head h1 {
  margin-top: 0;
}

/* Today's option: the look of a page's short version. Only the day's tip shows. */
.home-tip {
  max-width: var(--measure);
  padding: 1rem 1.25rem 1.1rem;
  background: var(--short-background);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.home-tip h2 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.home-tip-text {
  margin: 0 0 0.5rem;
  font-size: var(--size-lead);
}

.home-tip-link {
  margin: 0;
  font-size: var(--size-small);
}

/* The pages added or updated most recently, then the "Last updated" line. */
.home-recent {
  max-width: var(--measure);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.home-recent li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}

.home-recent-date {
  display: block;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.home-updated {
  max-width: var(--measure);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--size-small);
}

/* One card for each topic group, with its areas and a button to see them all. */
.group-cards {
  display: grid;
  gap: 1rem;
}

.group-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.group-card h3 {
  margin: 0 0 0.35rem;
}

.group-card h3 a {
  color: var(--text-heading);
  text-decoration-thickness: 1px;
}

/* Body color, not muted (November 18, 2026, outside review: "small, light grey type"). */
.group-card-desc {
  margin: 0 0 0.9rem;
  color: var(--text-body);
  font-size: var(--size-small);
  line-height: 1.55;
}

.group-card-areas {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.group-card-areas li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.group-card-count {
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.group-card-more {
  margin: auto 0 0;
}

/* An outlined button on the group cards (November 18, 2026, outside review: six solid dark buttons in a row
   competed with "New here? Start here"), so each card's title and topics lead and the gold button stays first. */
.group-card-more .button-link {
  padding: calc(0.6rem - 2px) calc(1.2rem - 2px);
  border: 2px solid var(--button-background);
  background: transparent;
  color: var(--text-heading);
}

.group-card-more .button-link:hover {
  background: var(--button-background);
  color: var(--band-text);
}

@media (min-width: 64rem) {
  .group-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Three across only when that leaves no card alone on a row. */
  .group-cards:has(> :nth-child(5)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-section + .home-section {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

/* A topic group on the search page and in "Page not found": its name, one
   line, then its areas. */
.group-finder + .group-finder {
  margin-top: 1.75rem;
}

.group-name {
  margin: 0 0 0.25rem;
}

.group-name a,
.group-heading a {
  color: var(--text-heading);
  text-decoration-thickness: 1px;
}

.group-desc {
  max-width: var(--measure);
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.group-heading {
  margin: 2.25rem 0 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--brand-sand);
}

.area-group :is(h2, h3) {
  margin: 1.75rem 0 0.4rem;
}

.area-group :is(h2, h3) a {
  color: var(--text-heading);
  text-decoration-thickness: 1px;
}

.area-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.area-list li {
  margin: 0;
}

.area-list a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--text-body);
  text-decoration: none;
}

.area-name {
  color: var(--text-heading);
  font-size: var(--size-area-name);
  font-weight: 650;
  line-height: 1.3;
}

.area-list a:hover .area-name,
.area-list a:focus-visible .area-name {
  color: var(--link);
  text-decoration: underline;
}

.area-desc {
  color: var(--text-muted);
  font-size: var(--size-small);
  line-height: 1.5;
}

.area-count {
  margin-top: auto;
  padding-top: 0.3rem;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.area-group > p.area-desc {
  max-width: var(--measure);
  margin: 0 0 1rem;
  font-size: var(--size-body);
}

/* ---------- Where to go next (to-do doc-708, November 11, 2026) ----------
   The last thing on an options page: up to three related pages (render_where_next() in lib/layout.php).
   One fixed look, reserved for this block: a box with a full navy edge. No other part of the site uses
   the .where-next look or its two tokens, and nothing inside it is a card. */
.page-body > .where-next {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding: 1.25rem 1.5rem 0.5rem;
  background: var(--next-background);
  border: 2px solid var(--next-edge);
  border-radius: var(--radius);
}

.where-next h2 {
  margin-bottom: 0.75rem;
  font-size: var(--size-h3);
}

.where-next ul {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.where-next li {
  margin: 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.where-next a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

.where-next-summary {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: var(--size-small);
  line-height: 1.5;
}

/* ---------- After a page: more in its topic area ---------- */

.related {
  padding-block: clamp(2rem, 5vw, 3rem);
  background: var(--related-background);
  border-top: 1px solid var(--border);
}

.related-more {
  max-width: var(--measure);
  margin: 1.25rem 0 0;
}

/* Tools from this page that other pages also name (render_tools_elsewhere() in lib/layout.php). */
.tools-elsewhere {
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.tools-elsewhere li + li {
  margin-top: 0.5rem;
}

/* The Glossary's pages, after its terms: each page's number and letter range. */
.glossary-pager {
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}
.glossary-pager .pager-label {
  margin: 0 0 0.75rem;
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.glossary-pager ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.glossary-pager a,
.glossary-pager .pager-here {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}
.glossary-pager .pager-here {
  border-color: var(--accent);
  font-weight: 600;
  color: var(--text-heading);
}
.glossary-pager .pager-num {
  font-weight: 600;
}

/* A search box on a light background (after a page, and on "Page not found"). */
.search-inline .search {
  max-width: 32rem;
}

.search-inline .search input {
  flex: 1 1 auto;
  width: auto;
  padding: 0.6rem 1rem;
  border-color: var(--field-border);
  font-size: var(--size-body);
}

.search-inline .search button {
  padding: 0.6rem 1.2rem;
  font-size: var(--size-body);
}

.area-group + .area-group {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.search-note {
  max-width: var(--measure);
  font-size: var(--size-lead);
}

.results {
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0;
  padding: 0;
  list-style: none;
}

.result {
  margin: 0;
  padding: 1.1rem 1.5rem 0.4rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.result h2 {
  margin: 0.5rem 0 0.4rem;
  font-size: var(--size-h3);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0;
  font-size: var(--size-small);
}

.result-snippet {
  color: var(--text-body);
  font-size: var(--size-small);
}

mark {
  padding: 0 0.1em;
  background: var(--mark-background);
  color: var(--text-heading);
  border-radius: 2px;
}

/* ---------- Drafts ---------- */
/* Only in a preview build: a page not yet approved. Words, not color alone. */

.draft-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--draft-background);
  color: var(--draft-text);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.draft-banner {
  max-width: var(--measure);
  margin: 1rem 0 0;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-small);
  background: var(--draft-background);
  color: var(--draft-text);
  font-weight: 600;
}

/* The calm notice on a rule page whose source may have changed: a label, not an alarm. */
.rule-notice {
  max-width: var(--measure);
  margin: 1rem 0 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--brand-sand);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--on-dark-subtle);
  color: var(--band-text);
}

.rule-notice a {
  color: var(--band-text);
}

/* ---------- Report form ---------- */

.report-form {
  display: grid;
  gap: 0.35rem;
  max-width: var(--measure);
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.report-form label {
  margin-top: 0.9rem;
  color: var(--text-heading);
  font-weight: 600;
}

.report-form label:first-child {
  margin-top: 0;
}

.field-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.report-form input,
.report-form select,
.report-form textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-body);
  font: inherit;
}

.report-form textarea {
  resize: vertical;
}

.report-form input:focus-visible,
.report-form select:focus-visible,
.report-form textarea:focus-visible,
.report-form button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.report-form button {
  justify-self: start;
  margin-top: 1.25rem;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form-errors {
  max-width: var(--measure);
  padding: 0.75rem 1rem 0.25rem;
  border-left: 4px solid var(--error-edge);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--error-background);
  color: var(--text-heading);
}

.form-errors p {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* A plain notice after a form is sent: what happened, in a calm box. */
.form-notice {
  max-width: var(--measure);
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--short-background);
  color: var(--text-heading);
}

/* ---------- Accounts ---------- */

/* "Account", at the right of the header bar on every page. */
.account-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-left: auto;
  padding: 0 0.25rem;
  color: var(--text-heading);
  font-weight: 600;
}

/* On phones "Account" is in the Menu list instead (November 8, 2026): the ribbon has no room for it beside
   the logo, Menu, search and the dark mode switch, and it ran off the right edge of a 390-pixel phone. */
.topics-panel .menu-account {
  display: none;
}

@media (max-width: 47.99rem) {
  .ribbon .account-link {
    display: none;
  }

  .topics-panel .menu-account {
    display: block;
  }
}

.account-signout button {
  min-height: 2.75rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-heading);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.account-signout button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

/* An email shown on the page in the laptop's accounts preview. */
.mail-preview {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: var(--size-small);
}

/* "My listings" on the Church Sharing Board. */
.my-listings {
  max-width: var(--measure);
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.my-listings > li {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.my-listings h3 {
  margin: 0 0 0.5rem;
}

/* ---------- The private back office ---------- */
/* Its own frame (October 14, 2026, at the owner's request: "clean up the back office and make it
   look nicer"): a slim bar, a menu with counts (down the side on wide screens,
   one scrolling row on phones), and calm cards. */

.office-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface);
}

.office-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.office-bar {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}

.office-bar-inner,
.office-foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: var(--office-wrap);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
}

.office-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-heading);
  text-decoration: none;
}

.office-brand svg {
  display: block;
  width: auto;
  height: 2.1rem;
}

.office-tag {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--short-background);
  color: var(--text-heading);
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.office-viewsite {
  font-size: var(--size-small);
}

.office-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;   /* a short page never stretches the menu row */
  width: 100%;
  max-width: var(--office-wrap);
  margin: 0 auto;
}

.office-main {
  min-width: 0;
  padding: 1.5rem var(--gutter) 3rem;
}

.office-head h1 {
  margin: 0 0 0.35rem;
  font-size: var(--size-h2);
}

.office-intro,
.office-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.office-muted {
  color: var(--text-muted);
  font-size: var(--size-small);
  font-weight: 400;
}

/* The menu. On phones and tablets: one row that scrolls sideways, kept on screen. */
.office-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem var(--gutter);
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.office-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.office-nav li,
.office-rows > li {
  margin: 0;
}

.office-nav li > ul {
  margin-top: 0;
}

.office-nav-group {
  display: contents;
}

.office-nav-label {
  display: none;
}

.office-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-small);
  color: var(--text-body);
  font-size: var(--size-small);
  text-decoration: none;
  white-space: nowrap;
}

.office-nav a:hover {
  background: var(--related-background);
}

.office-nav a[aria-current] {
  background: var(--short-background);
  color: var(--text-heading);
  font-weight: 650;
}

.office-badge {
  min-width: 1.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-sand);
  color: var(--on-sand);
  font-size: var(--size-tiny);
  font-weight: 700;
  text-align: center;
}

.office-signout {
  margin: 0 0 0 auto;
}

.office-signout button {
  min-height: 2.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-heading);
  font: inherit;
  font-size: var(--size-small);
  white-space: nowrap;
  cursor: pointer;
}

/* Wide screens: the same menu across the top (October 23, 2026, at the owner's request),
   wrapping instead of scrolling, with a thin line between the groups. */
@media (min-width: 64rem) {
  .office-nav {
    align-items: flex-start;
    overflow: visible;
  }

  .office-nav > ul {
    flex: 1 1 0;
    flex-wrap: wrap;
    row-gap: 0.25rem;
    min-width: 0;
  }

  .office-nav li.office-nav-group {
    display: flex;
    align-items: center;
  }

  .office-nav li.office-nav-group + li.office-nav-group {
    margin-left: 0.25rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border);
  }

  .office-nav ul ul {
    gap: 0.1rem;
  }

  .office-nav a {
    padding: 0.35rem 0.6rem;
  }
}

/* Overview: one tile per thing that can wait for you. */
.office-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.office-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  color: var(--text-body);
  text-decoration: none;
}

.office-tile:hover {
  border-color: var(--field-border);
}

.office-tile.is-waiting {
  border-left: 4px solid var(--brand-sand);
}

.office-count {
  color: var(--text-heading);
  font-size: var(--size-tile-count);
  font-weight: 700;
  line-height: 1.1;
}

.office-tile-label {
  color: var(--text-heading);
  font-weight: 650;
}

.office-tile-hint {
  color: var(--text-muted);
  font-size: var(--size-small);
}

.office-columns {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 48rem) {
  .office-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.office-panel,
.office-card,
.office-item,
.office-row {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.office-panel h2 {
  margin: 0 0 0.5rem;
  font-size: var(--size-h3);
}

.office-links {
  margin: 0;
  padding-left: 1.1rem;
}

.office-links li {
  margin: 0 0 0.35rem;
}

/* The live back office (November 16, 2026; assets/office-live.js): the status in the bar,
   the offer of a newer page, and the Now panel on Overview. */
.office-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0 auto;
  color: var(--text-muted);
  font-size: var(--size-tiny);
}

.office-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--kind-offer-text);
  animation: office-live-pulse 2.4s ease-in-out infinite;
}

.office-live.is-off .office-live-dot {
  background: var(--text-muted);
  animation: none;
}

@keyframes office-live-pulse {
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .office-live-dot { animation: none; }
}

.office-live-offer {
  position: fixed;
  z-index: 20;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  box-shadow: var(--shadow-card);
}

.office-now {
  margin: 0 0 1.25rem;
}

.office-now-grid {
  display: grid;
  gap: 0.75rem 1.5rem;
}

@media (min-width: 48rem) {
  .office-now-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.office-now h3 {
  margin: 0 0 0.35rem;
  font-size: var(--size-body);
}

.office-now-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.office-now-list li {
  margin: 0 0 0.35rem;
}

/* Signing in, or a message: one card in the middle. */
.office-solo {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
}

/* The sign-in form sits in the card itself, not in a second box. */
.office-card .report-form {
  max-width: none;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.office-result {
  margin: 0 0 1rem;
}

.office-card h1 {
  margin: 0 0 1rem;
  font-size: var(--size-h2);
}

/* Filters over a list, such as Drafts. */
.office-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.office-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  color: var(--text-body);
  font-size: var(--size-small);
  text-decoration: none;
}

.office-chip span {
  font-weight: 700;
}

.office-chip[aria-current] {
  border-color: var(--button-background);
  background: var(--button-background);
  color: var(--band-text);
}

.office-empty {
  color: var(--text-muted);
}

/* Lists of drafts: grouped by topic area, one card each. */
.office-group h2 {
  margin: 1.5rem 0 0.6rem;
  font-size: var(--size-h3);
}

.office-rows,
.office-list,
.office-log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.office-rows > li.office-row,
.office-row,
.office-item {
  margin: 0 0 0.75rem;
}

.office-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.office-row-main {
  flex: 1 1 22rem;
  min-width: 0;
}

.office-row-title {
  font-weight: 650;
}

.office-meta {
  margin: 0.2rem 0 0.5rem;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.office-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.office-row-actions:has(details[open]) {
  flex-basis: 100%;
}

.office-pill {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: var(--size-tiny);
  font-weight: 650;
}

/* Questions from Claude (October 20, 2026). */
.office-question {
  margin: 0.25rem 0 0.75rem;
  font-size: var(--size-body);
  color: var(--text-heading);
}
.office-answer {
  display: grid;
  gap: 0.4rem;
  max-width: var(--measure);
}
.office-answer label {
  font-weight: 600;
}
.office-answer textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-body);
  font: inherit;
  font-size: 1rem;
}
.office-answer button {
  justify-self: start;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.office-answer button:hover {
  background: var(--button-hover);
}

/* Ideas (October 20, 2026): a search box, and Previous and Next between pages. */
.office-find {
  margin: 0 0 1rem;
}
.office-find label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.office-find-row {
  display: flex;
  gap: 0.5rem;
  max-width: 32rem;
}
.office-find-row input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-body);
  font-size: 1rem;
}
.office-find-row button {
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.office-find-row button:hover {
  background: var(--button-hover);
}
.office-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0;
}
.office-pager a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}
.office-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.office-pill-waiting {
  background: var(--draft-background);
  color: var(--draft-text);
}

.office-pill-approved {
  background: var(--kind-offer-background);
  color: var(--kind-offer-text);
}

.office-pill-changes {
  background: var(--kind-request-background);
  color: var(--kind-request-text);
}

.office-preread {
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--related-background);
}

.office-preread summary {
  color: var(--text-heading);
  font-weight: 600;
  cursor: pointer;
}

.office-preread p,
.office-preread ul {
  margin: 0.5rem 0 0;
}

.office-preread-label {
  color: var(--text-muted);
  font-size: var(--size-small);
  font-weight: 650;
}

.office-note {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--related-background);
  overflow-wrap: anywhere;
}

/* Buttons: navy for the main action, outlined for the others. */
.office-row-actions button,
.office-changes button {
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font: inherit;
  font-size: var(--size-small);
  font-weight: 600;
  cursor: pointer;
}

.office-row-actions button:hover,
.office-changes button:hover,
.manage-actions button:hover {
  background: var(--button-hover);
}

.office-secondary button,
.manage-actions .office-secondary button {
  border: 1px solid var(--field-border);
  background: transparent;
  color: var(--text-heading);
}

.office-secondary button:hover,
.manage-actions .office-secondary button:hover {
  background: var(--related-background);
}

.office-changes summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  color: var(--text-heading);
  font-size: var(--size-small);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.office-changes summary::-webkit-details-marker {
  display: none;
}

.office-changes[open] {
  flex-basis: 100%;
}

.office-changes form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
}

.office-changes label {
  color: var(--text-heading);
  font-weight: 600;
}

.office-changes textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-body);
  font: inherit;
  resize: vertical;
}

.office-row-actions :focus-visible,
.office-chip:focus-visible,
.office-nav a:focus-visible,
.office-tile:focus-visible,
.office-signout button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.office-log li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* What a visitor typed: set apart, so it reads as data, not as the site's words. */
.office-app .typed {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-left: 3px solid var(--dated-edge);
  background: var(--dated-background);
  color: var(--dated-text);
  overflow-wrap: anywhere;
}

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

.office-table table {
  border-collapse: collapse;
  font-size: var(--size-small);
}

.office-table th,
.office-table td {
  padding: 0.4rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.office-table th[scope="row"] {
  white-space: nowrap;
}

/* Visitors dashboard (October 20, 2026). Charts are SVG shapes styled here;
   readouts open on hover, keyboard focus or a tap, with no script. */
.viz-dash {
  display: grid;
  gap: 1rem;
}
.viz-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.viz-filters p {
  margin: 0;
}
.viz-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  list-style: none;
}
.viz-range a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-small);
  color: var(--text-body);
  font-size: var(--size-small);
  text-decoration: none;
}
.viz-range a:hover {
  background: var(--surface);
}
.viz-range a[aria-current] {
  background: var(--button-background);
  color: var(--band-text);
  font-weight: 600;
}
.viz-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.viz-tile {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}
.viz-tile-label {
  color: var(--text-muted);
  font-size: var(--size-small);
}
.viz-tile-value {
  color: var(--text-heading);
  font-size: var(--size-tile-count);
  font-weight: 700;
  line-height: 1.15;
}
.viz-tile-delta {
  min-height: 1.4em;
  font-size: var(--size-small);
}
.viz-delta {
  font-weight: 600;
  color: var(--text-muted);
}
.viz-delta.is-up {
  color: var(--viz-up);
}
.viz-delta.is-down {
  color: var(--viz-down);
}
.viz-delta-note {
  color: var(--text-muted);
}
.viz-spark {
  display: block;
  width: 100%;
  height: 2rem;
  margin-top: 0.35rem;
  overflow: visible;
}
.viz-panel {
  min-width: 0;
  margin: 0;
}
.viz-panel h2 {
  margin-bottom: 0.25rem;
}
.viz-pair {
  display: grid;
  gap: 1rem;
}
@media (min-width: 64rem) {
  .viz-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A timeline: y labels, the plot (gridlines, lines, hover columns), x labels. */
.viz-timeline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 14rem auto;
  gap: 0.35rem 0.5rem;
  margin: 1rem 0 0;
}
.viz-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: -0.5em 0;
  color: var(--text-muted);
  font-size: var(--size-tiny);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.viz-plot {
  position: relative;
}
.viz-grid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.viz-grid span {
  border-top: 1px solid var(--border);
}
.viz-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.viz-line {
  fill: none;
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.viz-wash {
  stroke: none;
  opacity: 0.12;
}
.viz-line.viz-s1 { stroke: var(--viz-1); }
.viz-line.viz-s2 { stroke: var(--viz-2); }
.viz-line.viz-s3 { stroke: var(--viz-3); }
.viz-wash.viz-s1,
.viz-s1-fill { fill: var(--viz-1); }
.viz-cols {
  position: absolute;
  inset: 0;
  display: flex;
}
.viz-col {
  position: relative;
  flex: 1;
  outline: none;
}
.viz-col:hover::after,
.viz-col:focus::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid var(--text-muted);
}
.viz-col:focus-visible {
  box-shadow: inset 0 0 0 2px var(--link);
}
.viz-x {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: var(--size-tiny);
}

/* The readout: values first, a short line key for each series. */
.viz-tip {
  display: none;
  position: absolute;
  z-index: 3;
  top: 0;
  left: 60%;
  min-width: 11rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  box-shadow: var(--shadow-menu);
  color: var(--text-body);
  font-size: var(--size-small);
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
.viz-tip-left {
  left: auto;
  right: 60%;
}
.viz-col:hover .viz-tip,
.viz-col:focus .viz-tip,
.viz-heat-cell:hover .viz-tip,
.viz-heat-cell:focus .viz-tip {
  display: block;
}
.viz-tip-day {
  margin: 0 0 0.25rem;
  color: var(--text-muted);
}
.viz-tip ul,
.viz-legend {
  margin: 0;
  padding: 0;
  list-style: none;
}
.viz-tip strong {
  color: var(--text-heading);
}
.viz-key {
  display: inline-block;
  width: 0.9rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  border-top: 2px solid var(--viz-1);
}
.viz-key.viz-s2 { border-top-color: var(--viz-2); }
.viz-key.viz-s3 { border-top-color: var(--viz-3); }
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--text-body);
  font-size: var(--size-small);
}

/* When pages are read: 7 days by 24 hours. */
.viz-heat {
  display: grid;
  grid-template-columns: auto repeat(24, minmax(0, 1fr));
  gap: 2px;
  margin-top: 1rem;
  font-size: var(--size-tiny);
}
.viz-heat-hour {
  grid-column: span 6;
  color: var(--text-muted);
}
.viz-heat-day {
  padding-right: 0.4rem;
  color: var(--text-muted);
}
.viz-heat-cell {
  position: relative;
  aspect-ratio: 1;
  min-height: 0.75rem;
  border-radius: 2px;
  background: var(--surface);
  outline: none;
}
.viz-heat-cell:hover,
.viz-heat-cell:focus {
  box-shadow: 0 0 0 2px var(--text-heading);
}
.viz-heat-cell .viz-tip {
  top: 120%;
  left: 0;
}
.viz-heat-cell .viz-tip-left {
  left: auto;
  right: 0;
}
.viz-heat-1 { background: var(--viz-heat-1); }
.viz-heat-2 { background: var(--viz-heat-2); }
.viz-heat-3 { background: var(--viz-heat-3); }
.viz-heat-4 { background: var(--viz-heat-4); }
.viz-heat-5 { background: var(--viz-heat-5); }

/* Ranked lists with a bar each. */
.viz-map {
  margin: 0;
  min-width: 0;
}
.viz-map-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-small);
  background: var(--surface);
}
.viz-map svg {
  display: block;
  width: 100%;
  height: clamp(15rem, 40vw, 30rem);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.viz-map svg.is-zoomed {
  touch-action: none;
}
.viz-map svg.is-moving {
  cursor: grabbing;
}
.viz-map svg:focus {
  outline: none;
}
.viz-map svg:focus-visible {
  outline: 2px solid var(--viz-1);
  outline-offset: -2px;
}
.viz-map-land {
  fill: var(--border);
}
.viz-map-line,
.viz-map-state {
  fill: none;
  stroke: var(--surface-raised);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.viz-map-state {
  stroke-width: 0.5;
}
.viz-dot {
  cursor: pointer;
  outline: none;
}
.viz-dot-hit {
  fill: transparent;
}
.viz-dot-mark {
  fill: var(--viz-1);
  fill-opacity: 0.8;
  stroke: var(--surface-raised);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.viz-dot:hover .viz-dot-mark,
.viz-dot:focus-visible .viz-dot-mark,
.viz-dot.is-open .viz-dot-mark {
  fill-opacity: 1;
  stroke: var(--text-heading);
}
.viz-map-tools {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.viz-map-tools[hidden] {
  display: none;
}
.viz-map-tools button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-heading);
  font-size: var(--size-small);
  font-weight: 600;
  cursor: pointer;
}
.viz-map-tools button:disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.6;
}
.viz-map-tip {
  position: absolute;
  z-index: 3;
  max-width: 85%;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  box-shadow: var(--shadow-menu);
  color: var(--text-heading);
  font-size: var(--size-small);
  font-weight: 600;
  pointer-events: none;
}
.viz-dash > * {
  min-width: 0;
}
.viz-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}
.viz-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-width: 0;
  border-bottom: 1px solid var(--border);
}
.viz-top .viz-range {
  flex-wrap: nowrap;
  max-width: 100%;
  margin: 0 0 0.5rem;
  overflow-x: auto;
}
.viz-top .viz-range a {
  min-height: 2rem;
  white-space: nowrap;
}
.viz-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0;
  font-size: var(--size-small);
}
.viz-dates label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.viz-who {
  margin-bottom: 0.75rem;
}
.viz-jump {
  display: flex;
  gap: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  font-size: var(--size-small);
  font-weight: 600;
}
.viz-jump a {
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.viz-jump a:hover {
  border-bottom-color: var(--viz-1);
  color: var(--text-heading);
}
.viz-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--border);
}
.viz-kpis .viz-tile {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.viz-kpis .viz-tile-label {
  font-size: var(--size-tiny);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.viz-kpis .viz-tile-value {
  font-size: var(--size-kpi);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.viz-kpis .viz-tile-delta {
  font-size: var(--size-tiny);
}
.viz-dash .viz-panel {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-small);
  box-shadow: none;
}
.viz-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.viz-panel-head h2 {
  margin: 0;
  font-size: var(--size-panel);
}
.viz-panel-note,
.viz-foot {
  color: var(--text-muted);
  font-size: var(--size-tiny);
}
.viz-foot {
  margin: 0.5rem 0 0;
}
.viz-dash > .viz-foot {
  margin: -0.5rem 0 0;
}
.viz-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--size-small);
}
.viz-where {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.viz-places {
  display: grid;
  gap: 0;
  max-height: 27rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.viz-place {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 2.75rem;
  gap: 0.15rem 0.75rem;
  align-items: baseline;
  width: 100%;
  padding: 0.5rem 0.35rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-body);
  font: inherit;
  font-size: var(--size-small);
  text-align: left;
}
button.viz-place {
  cursor: pointer;
}
button.viz-place:hover,
button.viz-place[aria-pressed="true"] {
  background: var(--surface);
}
.viz-place-name {
  min-width: 0;
  color: var(--text-heading);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.viz-place-sub {
  display: block;
  color: var(--text-muted);
  font-size: var(--size-tiny);
  font-weight: 400;
}
.viz-place-count {
  color: var(--text-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.viz-place-share {
  color: var(--text-muted);
  font-size: var(--size-tiny);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.viz-place .viz-bar {
  grid-column: 1 / -1;
  height: 0.25rem;
  margin: 0.15rem 0 0;
}
.viz-dash .viz-bars {
  gap: 0.5rem;
  margin-top: 0;
}
.viz-dash .viz-bar-sub {
  display: none;
}
.viz-dash .viz-bar {
  height: 0.25rem;
}
.viz-dash .viz-timeline {
  grid-template-rows: 11rem auto;
  margin-top: 0.5rem;
}
.viz-map-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  box-shadow: var(--shadow-menu);
  color: var(--text-heading);
  font-size: var(--size-small);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s;
}
.viz-map-notice.is-on {
  opacity: 1;
}
@media (min-width: 48rem) {
  .viz-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 64rem) {
  .viz-where {
    grid-template-columns: minmax(0, 2.6fr) minmax(17rem, 1fr);
  }
}
#where,
#reading,
#when,
#programs {
  scroll-margin-top: 7rem;
}
.viz-more {
  margin-top: 0.75rem;
}
details.viz-panel > summary,
.viz-more > summary {
  cursor: pointer;
  font-weight: 600;
}
details.viz-panel[open] > summary {
  margin-bottom: 0.75rem;
}
details.viz-panel h3 {
  margin-top: 1.25rem;
}
.viz-bars {
  display: grid;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.viz-bar-text {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--size-small);
}
.viz-bar-name {
  min-width: 0;
  color: var(--text-body);
  overflow-wrap: anywhere;
}
.viz-bar-sub {
  display: block;
  color: var(--text-muted);
  font-size: var(--size-tiny);
}
.viz-bar-count {
  color: var(--text-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.viz-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-top: 0.2rem;
  border-radius: 999px;
}
.viz-bar-track {
  fill: var(--surface);
}
details.viz-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.office-close {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.office-foot {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--size-small);
}

.office-foot p {
  margin: 0;
}

/* ---------- Church Sharing Board ---------- */

.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin: 1rem 0 0;
}

.button-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover {
  background: var(--button-hover);
  color: var(--band-text);
}

.share-filters {
  display: grid;
  gap: 0.75rem 1rem;
  margin: 0 0 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-field {
  display: grid;
  gap: 0.25rem;
}

.filter-field label {
  color: var(--text-heading);
  font-size: var(--size-small);
  font-weight: 600;
}

.share-filters select,
.share-filters input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--text-body);
  font: inherit;
  font-size: 1rem;
}

.filter-submit {
  align-content: end;
}

.share-filters button,
.manage-actions button {
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--button-background);
  color: var(--band-text);
  font: inherit;
  font-size: var(--size-small);
  font-weight: 600;
  cursor: pointer;
}

.share-filters :focus-visible,
.manage-actions button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.share-note,
.share-count {
  max-width: var(--measure);
}

.share-note {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--short-background);
}

/* Offered or wanted: said in words; the colors only repeat it. */
.kind-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: var(--size-tiny);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  line-height: 1.4;
  text-transform: uppercase;
}

.kind-offer {
  background: var(--kind-offer-background);
  color: var(--kind-offer-text);
}

.kind-request {
  background: var(--kind-request-background);
  color: var(--kind-request-text);
}

.listing-distance {
  display: block;
  color: var(--text-heading);
  font-weight: 600;
}

.crumb-back {
  margin: 0 0 1rem;
  font-size: var(--size-small);
}

.listing {
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.listing-title {
  margin: 0.5rem 0 0.75rem;
}

/* On a phone each label sits above its value; on wider screens, beside it. */
.listing-facts {
  display: grid;
  gap: 0.1rem;
  margin: 1rem 0;
}

.listing-facts dt {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: var(--size-small);
  font-weight: 600;
}

.listing-facts dt:first-child {
  margin-top: 0;
}

.listing-category {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.share-body .home-section {
  margin-top: 2rem;
}

.listing-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.share-caution {
  padding: 0.6rem 0.9rem;
  border-left: 4px solid var(--dated-edge);
  background: var(--dated-background);
  color: var(--dated-text);
  font-size: var(--size-small);
}

.share-report {
  max-width: var(--measure);
}

.share-form fieldset,
.report-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.share-form legend,
.report-form legend {
  margin-bottom: 0.4rem;
  color: var(--text-heading);
  font-weight: 600;
}

.report-form label.choice,
.choice {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-top: 0.4rem;
  font-weight: 400;
}

.report-form .choice input {
  width: auto;
}

.report-form label.confirm {
  margin-top: 1.25rem;
}

.manage-key {
  max-width: var(--measure);
  padding: 1rem 1.25rem;
  border: 2px solid var(--brand-sand);
  border-radius: var(--radius);
  background: var(--dated-background);
}

.manage-key p {
  margin: 0.25rem 0;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

/* The back office's Reports view (October 14, 2026): a report's tables scroll sideways on a phone instead of widening the page. */
.paper {
  max-width: var(--measure);
  overflow-wrap: anywhere;
}

.paper table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.paper th,
.paper td {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

.share-license {
  max-width: var(--measure);
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.inline-form {
  margin: 0;
}

@media (min-width: 40rem) {
  .share-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listing-facts {
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: 0.5rem 1.25rem;
  }

  .listing-facts dt {
    margin-top: 0;
    font-size: inherit;
  }
}

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

.page-foot {
  padding-block: 2rem 2.5rem;
  background: var(--footer-background);
  color: var(--footer-text);
  font-size: var(--size-small);
}

.page-foot p {
  max-width: var(--measure);
}

.page-foot a {
  color: var(--footer-text);
  overflow-wrap: anywhere;
}

.page-foot a:focus-visible {
  outline-color: var(--footer-text);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  max-width: var(--measure);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--on-dark-divider);
}

/* Footer links get room above and below, so each is easy to tap. */
.foot-links a {
  padding-block: 0.4rem;
}

/* Pictures in pages (November 2, 2026): a screenshot fills the reading width, with a thin frame and a small caption. */
.shot {
  margin: 1rem 0 1.25rem;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.shot figcaption,
.diagram figcaption {
  margin-top: 0.4rem;
  font-size: var(--size-small);
  color: var(--text-muted);
}

/* Diagrams the site draws (November 8, 2026): inline SVG, colored only by these classes, so they follow
   dark mode. Its text is the reading font at the small size, which is about 15px on a 390px phone.
   lib/content.php, render_diagram(). */
.diagram {
  margin: 1rem 0 1.25rem;
}

.diagram svg {
  display: block;
  width: 100%;
  max-width: var(--diagram-max);
  height: auto;
  margin-inline: auto;
}

.dg-label {
  fill: var(--text-body);
  font-family: var(--font-reading);
  font-size: var(--size-small);
  text-anchor: middle;
}

.dg-heading {
  fill: var(--text-heading);
  font-weight: 700;
}

.dg-node {
  fill: var(--surface-raised);
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.dg-link {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
}

.dg-zone {
  stroke-width: 2;
}

.dg-zone-office {
  fill: var(--short-background);
  stroke: var(--accent);
}

/* The guest side has a dashed edge, so the two sides differ by more than color. */
.dg-zone-guest {
  fill: var(--dated-background);
  stroke: var(--dated-edge);
  stroke-dasharray: 6 4;
}

.dg-block {
  fill: none;
  stroke: var(--error-edge);
  stroke-width: 4;
  stroke-linecap: round;
}

.dg-block-mark {
  fill: var(--surface-raised);
  stroke: var(--error-edge);
  stroke-width: 2;
}

/* A picture opened full size (November 5, 2026): it closes with a tap outside it or its X, not only the back button.
   The dialog itself fills the screen, so a tap anywhere but the picture lands on it and closes it. assets/theme.js. */
.shot-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 3.5rem 0.75rem 0.75rem;
  border: 0;
  background: var(--picture-view-background);
}

.shot-view[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

html:has(.shot-view[open]) {
  overflow: hidden;   /* the page behind stays still */
}

.shot-view::backdrop {
  background: transparent;
}

.shot-view img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-small);
}

.shot-view-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--on-dark-edge);
  border-radius: 50%;
  background: var(--on-dark-soft);
  color: var(--band-text);
  font: inherit;
  font-size: var(--size-close-mark);
  line-height: 1;
  cursor: pointer;
}

.shot-view-close:hover {
  background: var(--on-dark-hover);
}

.shot-view-close:focus-visible {
  outline: 3px solid var(--band-text);
  outline-offset: 2px;
}

/* The blog's RSS line, below the list of notes (November 2, 2026). */
.blog-follow {
  margin-top: 1.5rem;
}

/* Social media icons: each a 44 pixel target (WCAG 2.5.5). Never name this class foot-social or similar: ad blockers' lists hide those (LESSONS 170). */
.foot-follow ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.75rem 0 0 -0.625rem;
  padding: 0;
  list-style: none;
}

.foot-follow a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.foot-follow svg {
  display: block;
}

/* Wide screens: the footer in two columns that fill the same width as the
   page above it, the same on every page: the disclaimer and license on the
   left at the reading width, the links and the dark mode switch on the right
   (October 29, 2026). Phones and tablets keep one column. */
@media (min-width: 64rem) {
  .page-foot > .wrap {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .page-foot .foot-text > :first-child,
  .page-foot .foot-nav > :first-child {
    margin-top: 0;
  }

  .page-foot .foot-nav .foot-links {
    margin-top: 1rem;
  }
}

/* ---------- Wider screens ---------- */

/* Tablets: the open Topics list in columns. */
@media (min-width: 48rem) {
  .topics-panel > ul {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    margin-inline: auto;
  }

  .topics-panel .menu-all {
    grid-column: 1 / -1;
  }
}

/* Wide screens: the header bar stays too, and the ribbon is one row under it:
   Start here, About, Topics and Sharing Board, then search on the right. From 80rem (1280 pixels), the narrowest width where that row
   fits without wrapping; below it, the Menu bar (October 13, 2026). */
/* Below 80rem there is no side column for "On this page", so an article's
   heading, text and the strip after it are centered at the reading width
   instead of sitting at the left of a wider frame (iPads held sideways are
   1024 to 1194 pixels wide; October 20, 2026, from the ideas doc). */
@media (max-width: 79.99rem) {
  .page-head > .wrap,
  .page-body.wrap,
  .related > .wrap {
    max-width: calc(var(--measure) + 2 * var(--gutter));
  }
}

@media (min-width: 80rem) {
  :root {
    --sticky-offset: calc(var(--head-height) + var(--ribbon-height) + 1rem);
  }

  .site-name svg {
    height: 2.25rem;
  }

  .menu-icon,
  .menu-word,
  .topics-panel .menu-pages {
    display: none;
  }

  .topics-word {
    display: inline;
  }

  .topics-menu > summary::after {
    content: "";
  }

  .ribbon {
    top: var(--head-height);
    gap: 0 0.45rem;
    height: var(--ribbon-height);
    padding-block: 0;
  }

  .ribbon-topics {
    display: block;
    flex: 1 1 auto;
  }

  /* Start here and About come first, set apart by a thin line. */
  .ribbon-pages {
    display: block;
    flex: none;
    margin-right: 0.35rem;
    padding-right: 0.8rem;
    border-right: 1px solid var(--on-dark-line);
  }

  .search {
    flex: 0 0 auto;
  }

  .search input {
    flex: none;
    width: 12rem;
  }

  .topics-panel {
    max-height: calc(100vh - var(--head-height) - var(--ribbon-height) - 1rem);
  }
}

@media (min-width: 80rem) {
  /* Narrower on smaller laptops, so the ribbon's one row keeps some room. */
  .search input {
    width: clamp(10rem, 18vw - 4rem, 15rem);
  }
}

@media (min-width: 40rem) {
  .page-list,
  .area-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .page-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .area-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* The list of sections moves beside the page and stays in view. */
@media (min-width: 80rem) {
  .head-toc {
    display: none;
  }

  .page-body.has-toc {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, var(--measure));
    column-gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  .page-body.has-toc > * {
    grid-column: 2;
  }

  .page-body.has-toc > .toc {
    grid-column: 1;
    grid-row: 1 / span 40;
    position: sticky;
    top: calc(var(--head-height) + var(--ribbon-height) + 1.5rem);
    max-height: calc(100vh - var(--head-height) - var(--ribbon-height) - 3rem);
    overflow-y: auto;
    margin: 0;
    padding: 1rem 0 0;
    background: none;
    border: 0;
    border-top: 2px solid var(--text-heading);
    border-radius: 0;
  }
}

/* ---------- Print ---------- */
/* The page, its dated blocks, the disclaimer and its web address; no navigation. */

@media print {
  body {
    background: var(--print-background);
    font-size: var(--print-size-body);
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  a.ext::after {
    content: none;
  }

  /* On paper, a link to another page shows its address. */
  .page-body a[href^="/"]::after {
    content: " (churchknowhow.org" attr(href) ")";
    font-size: var(--print-size-link);
  }

  /* Not for Glossary terms: the printed page explains each term itself. */
  .page-body a.gloss::after {
    content: none;
  }

  .skip,
  .head-toc,
  .theme-toggle,
  .crumbs,
  .related,
  .where-next,
  .toc,
  .ribbon > :not(.site-name):not(.print-only),
  .search,
  .page-head::before {
    display: none;
  }

  .site-head {
    position: static;
    display: block;
    height: auto;
    padding-block: 0.5rem;
    background: none;
    border-bottom: 1px solid var(--print-text);
  }

  .site-head .logo {
    --logo-text: var(--print-text);
    --logo-mark: var(--print-text);
  }

  .site-head .print-only {
    display: block;
    font-size: var(--print-size-small);
  }

  .page-head {
    padding-block: 1rem;
    background: none;
  }

  .site-name,
  .page-head,
  .page-head h1,
  .page-head .page-kind,
  .scope {
    color: var(--print-text);
  }

  .page-body {
    display: block;
  }

  a,
  .page-foot,
  .page-foot a {
    color: var(--print-text);
  }

  .page-foot {
    background: none;
    border-top: 1px solid var(--print-text);
  }

  .path {
    box-shadow: none;
  }

  .short-version,
  .dated,
  .path {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .field,
  h2,
  h3 {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }
}

/* Print the sources only if the reader opened them. A shut list leaves the
   whole Sources part off the paper; an open one prints without its button. */
@media print {
  .sources-box > summary {
    display: none;
  }

  .sources-box {
    border: 0;
    box-shadow: none;
  }

  .sources {
    padding-inline: 0;
  }

  #sources:has(.sources-box:not([open])) {
    display: none;
  }
}

/* The options at a glance (October 26, 2026): one row per option at the top of "Your options"
   (render_glance_table() in lib/content.php). On a phone each row stacks into a small card. */
.glance {
  margin: 1.5rem 0 2rem;
}

.glance-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  font-size: var(--size-small);
}

.glance-table caption {
  padding: 0 0 0.5rem;
  text-align: left;
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.glance-table th,
.glance-table td {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.glance-table thead th {
  border-top: 0;
  font-family: var(--font-label);
  font-size: var(--size-tiny);
  color: var(--text-muted);
}

@media (max-width: 40rem) {
  .glance-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .glance-table,
  .glance-table tbody,
  .glance-table tr,
  .glance-table th,
  .glance-table td {
    display: block;
  }

  .glance-table caption {
    display: block;
    padding: 0.75rem 0.9rem 0.25rem;
  }

  .glance-table tr {
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
  }

  .glance-table tbody tr:first-child {
    border-top: 0;
  }

  .glance-table th,
  .glance-table td {
    padding: 0.15rem 0.9rem;
    border-top: 0;
  }

  .glance-table td::before {
    content: attr(data-label) ": ";
    color: var(--text-muted);
  }
}

/* Each option's details fold under "What it is" (October 26, 2026); the same chevron button as Sources. */
.path-glance {
  margin: -0.25rem 0 0.75rem;
  color: var(--text-body);
  font-size: var(--size-body);
}

.path-glance > div {
  margin: 0 0 0.25rem;
}

/* A link to another website opens in a new tab; the arrow says so, and the words are for screen readers (October 30, 2026). */
a.ext::after {
  content: "\2197";
  content: "\2197" / "";
  margin-inline-start: 0.1em;
}

/* What a church could do with an option; it stays outside the fold (October 30, 2026). */
.path-uses {
  margin: 0 0 0.75rem;
}

.path-uses p,
.path-uses ul {
  margin-block: 0 0.25rem;
}

.path-glance dt {
  display: inline;
  font-weight: 600;
}

.path-glance dt::after {
  content: ": ";
}

.path-glance dd {
  display: inline;
  margin: 0;
}

/* "Works on" (November 19, 2026): each computer or phone a program runs on, a small drawn device beside its word.
   The word always shows, so nothing is told by the drawing alone. */
.platforms {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  vertical-align: top;
}

.platforms li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  white-space: nowrap;
}

.platform-icon {
  flex: none;
  color: var(--text-heading);
}

.glance-table .platforms {
  display: flex;
}

/* The "Works on" filter (November 22, 2026): buttons the script adds above "The options at a glance" on an options page
   whose options list what they work on (assets/theme.js). Without the script it is not there and every option shows. */
.works-filter {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.works-filter-label {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--text-heading);
}

.works-filter-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.works-filter-choice,
.works-filter-all {
  min-height: 2.75rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text-body);
  font: inherit;
  cursor: pointer;
}

.works-filter-choice[aria-pressed="true"] {
  border-color: var(--button-background);
  background: var(--button-background);
  color: var(--band-text);
}

.works-filter-choice:hover,
.works-filter-all:hover {
  border-color: var(--button-background);
}

.works-filter-choice:focus-visible,
.works-filter-all:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.works-filter-status {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.works-filter-status:empty {
  display: none;
}

.works-filter-all {
  display: block;
  margin-top: 0.5rem;
}

@media print {
  .works-filter-choices,
  .works-filter-all {
    display: none;
  }
}

.glance-note {
  display: block;
  color: var(--text-muted);
  font-size: var(--size-small);
}

.path-more {
  margin: 0 0 0.75rem;
  border-top: 1px solid var(--border);
}

.path-more > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0;
  color: var(--link);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.path-more > summary::-webkit-details-marker {
  display: none;
}

.path-more > summary::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.path-more[open] > summary::before {
  transform: rotate(45deg);
}

.path-more > summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: var(--radius-small);
}

.path-more[open] > summary {
  margin-bottom: 0.5rem;
}

/* Folded sections and questions (October 26, 2026): the heading is the button. */
.section-fold > summary,
.faq-item > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
}

.section-fold > summary::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker {
  display: none;
}

.section-fold > summary h2,
.faq-item > summary h3 {
  margin: 0;
}

.section-fold > summary::after,
.faq-item > summary::after {
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  margin-left: auto;
  border-right: 2px solid var(--link);
  border-bottom: 2px solid var(--link);
  transform: rotate(45deg);
}

.section-fold[open] > summary::after,
.faq-item[open] > summary::after {
  transform: rotate(-135deg);
}

.section-fold > summary:focus-visible,
.faq-item > summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: var(--radius-small);
}

.section-fold[open] > summary {
  margin-bottom: 0.75rem;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 0.25rem 0;
}

.faq-item[open] > summary {
  margin-bottom: 0.5rem;
}

/* On phones and tablets the folded page is its own list of contents. */
@media (max-width: 79.99rem) {
  .page-body .toc,
  .ribbon .head-toc {
    display: none;
  }
}

/* On a phone each option card already shows its cost, effort and coverage, so the table is left out there. */
@media (max-width: 40rem) {
  .glance {
    display: none;
  }
}

.related-all {
  margin: 1rem 0 0;
}

/* "Show this page with every section open" (October 27, 2026): a plain link to the page's all/ copy. */
.open-all {
  margin: 0.5rem 0 1rem;
  font-size: var(--size-small);
}

/* ---------- The coming soon page (October 29, 2026) ---------- */
/* The public front door while the site is dark: one card in the middle of the page, the logo, and two lines.
   No ribbon, search or links; the rest of the site sits behind the password (render_coming_soon()). */
.coming-soon-main {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--gutter);
}

.coming-soon-card {
  max-width: 34rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.coming-soon-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}

.coming-soon-logo svg {
  width: auto;
  height: 3rem;
}

.coming-soon-card h1 {
  margin: 0 0 1rem;
  color: var(--text-heading);
  font-size: var(--size-h1);
}

.coming-soon-card .lead {
  font-size: var(--size-lead);
}

/* The Tool Index (lib/toolindex.php, November 11, 2026): a dense list, a row of letter links, one entry per tool. */
.tool-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.tool-letters a {
  display: inline-block;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  text-align: center;
}

.tool-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.tool-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.tool-list p {
  margin: 0 0 0.25rem;
}

.tool-list .tool-name {
  font-weight: 600;
}

.tool-list .tool-page {
  color: var(--text-muted);
  font-size: var(--size-small);
}

/* A paid tool's option and the free or no extra cost options on the same page (lib/toolindex.php, November 24, 2026). */
.tool-list .tool-free {
  font-size: var(--size-small);
  padding-left: 0.75rem;
  border-left: 3px solid var(--border);
}

/* ---------- "Send this page to someone" (innovation run, November 22, 2026) ---------- */
/* Added under a page's title by assets/theme.js (the phone's share list, or the address copied, or a new email).
   It sits on the dark page header, so it takes the header's own colors. Not printed. */
.send-page {
  margin: 0.75rem 0 0;
  font-size: var(--size-small);
}

.send-page-button {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--band-text);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--band-text);
  font: inherit;
  cursor: pointer;
}

.send-page-button:hover {
  text-decoration: underline;
}

.send-page-button:focus-visible {
  outline: 3px solid var(--band-text);
  outline-offset: 2px;
}

.send-page-status {
  color: var(--band-text);
}

@media print {
  .send-page {
    display: none;
  }
}

/* The giving fee calculator (innovation run, November 23, 2026): a box the script adds before the options on the
   online giving page (assets/theme.js). It reuses the filter box look; without the script it is not there. */
.fee-calc-field {
  margin: 0 0 0.5rem;
}

.fee-calc-field input {
  min-height: 2.75rem;
  width: 8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text-body);
  font: inherit;
}

.fee-calc-field input:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.fee-calc-table {
  overflow-x: auto;
}

.fee-calc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-small);
}

.fee-calc-table th,
.fee-calc-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
