/*
 * Stoei Core — settings (design tokens) for websites.
 *
 * Every look value lives here, once. Components (base.css, web.css,
 * recipes/) only read these names; they never set a color, font, size,
 * corner or space of their own. To restyle a site, a developer overrides
 * these names in the site's theme file (e.g. site.css). Nothing else.
 *
 * Three levels ("tiers"):
 *   1. Scales:   raw steps (space, text size, corner rounding, font stacks).
 *   2. Meanings: what a value is for (text color, card corner, body text).
 *                They point at the scales. A theme mostly changes these.
 *   3. Component settings: a few per-component knobs (button height,
 *                field padding), set at the end of this file. Apps set
 *                them in their theme (see themes/app-starter.css).
 *
 * Light and dark: each color is written once as light-dark(light, dark).
 * The page follows the device until the visitor uses the switch, which sets
 * data-theme="light" or "dark" on <html>. A theme never touches that part.
 *
 * Full list with what each setting changes: docs/THEME-SETTINGS.md.
 */

/* ---------- Light and dark switching (do not override) ---------- */

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

:root {
  /* ---------- Tier 1: scales ---------- */

  /* Space: 4px grid. */
  --st-space-1: 0.25rem;  /*  4px */
  --st-space-2: 0.5rem;   /*  8px */
  --st-space-3: 0.75rem;  /* 12px */
  --st-space-4: 1rem;     /* 16px */
  --st-space-5: 1.25rem;  /* 20px */
  --st-space-6: 1.5rem;   /* 24px */
  --st-space-7: 2rem;     /* 32px */
  --st-space-8: 2.5rem;   /* 40px */
  --st-space-9: 3rem;     /* 48px */
  --st-space-10: 4rem;    /* 64px */
  --st-space-11: 5rem;    /* 80px */

  /* Text sizes. */
  --st-text-0: 0.625rem;    /* 10px: tiny labels in app sidebars only */
  --st-text-1: 0.75rem;     /* 12px */
  --st-text-2: 0.8125rem;   /* 13px */
  --st-text-3: 0.875rem;    /* 14px */
  --st-text-4: 0.9375rem;   /* 15px */
  --st-text-5: 1rem;        /* 16px */
  --st-text-6: 1.0625rem;   /* 17px */
  --st-text-7: 1.125rem;    /* 18px */
  --st-text-8: 1.25rem;     /* 20px */
  --st-text-9: 1.375rem;    /* 22px */
  --st-text-10: 1.5rem;     /* 24px */
  --st-text-11: 1.625rem;   /* 26px */
  --st-text-12: 1.75rem;    /* 28px */
  --st-text-13: 2rem;       /* 32px */
  --st-text-14: 2.375rem;   /* 38px */

  /* Corner rounding. */
  --st-radius-1: 4px;
  --st-radius-2: 6px;
  --st-radius-3: 8px;
  --st-radius-4: 10px;
  --st-radius-5: 12px;
  --st-radius-6: 14px;
  --st-radius-7: 18px;
  --st-radius-full: 999px;

  /* Shadows: small (buttons), medium (menus, cards that float), large (dialogs). */
  --st-shadow-1: 0 1px 2px light-dark(rgb(20 16 12 / 0.06), rgb(0 0 0 / 0.35));
  --st-shadow-2: 0 6px 20px light-dark(rgb(20 16 12 / 0.1), rgb(0 0 0 / 0.45));
  --st-shadow-3: 0 24px 60px light-dark(rgb(20 16 12 / 0.18), rgb(0 0 0 / 0.6));

  /* Font stacks. */
  --st-font-sans: system-ui, sans-serif;
  --st-font-serif: Georgia, serif;
  --st-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---------- Tier 2: meanings ---------- */

  /* Colors: light-dark(light mode, dark mode). Neutral defaults, so any
     page is readable before a theme exists. */
  --st-color-bg: light-dark(#FFFFFF, #141414);              /* page background */
  --st-color-surface: light-dark(#FFFFFF, #1D1D1D);         /* cards, boxes, fields */
  --st-color-sunk: light-dark(#F4F4F2, #242424);            /* sunken areas: callouts, tags, notes */
  --st-color-text: light-dark(#1A1A1A, #EDEDEA);            /* main text */
  --st-color-text-muted: light-dark(#5A5A5A, #AFAFAA);      /* secondary text */
  --st-color-line: light-dark(#DDDDDA, #363636);            /* borders and dividers */
  --st-color-accent: light-dark(#1F5FBF, #8DB4F0);          /* links, main buttons, highlights */
  --st-color-on-accent: light-dark(#FFFFFF, #141414);       /* text on the accent color */
  --st-color-accent-hover: color-mix(in srgb, var(--st-color-accent) 85%, #000);
  --st-color-accent-text: var(--st-color-accent);           /* accent-coloured TEXT and links. A theme whose accent fails contrast as text (amber on a light page) sets a darker one here and keeps the accent for fills and bars */
  --st-color-ok: light-dark(#2E6B3F, #7CC48F);              /* success, "open now" */
  --st-color-bad: light-dark(#A3271F, #F08A80);             /* errors, "closed" */
  --st-color-band: light-dark(#1E2A33, #1E2A33);            /* header, hero, footer background */
  --st-color-on-band: light-dark(#F2F2EF, #F2F2EF);         /* text on the band */
  --st-color-band-accent: light-dark(#E8A462, #E8A462);     /* highlights on the band; focus ring */
  --st-color-on-band-muted: color-mix(in srgb, var(--st-color-on-band) 70%, var(--st-color-band)); /* muted text on the band */
  --st-color-featured: light-dark(#FFF6EC, #2A2018);        /* featured card background */
  --st-banner-light: #FFFFFF;                                /* behind a banner set to Light (Stoei Promote), in either theme */
  --st-banner-dark: #14181C;                                 /* behind a banner set to Dark */
  --st-color-placeholder: light-dark(#E6E3DE, #2C2C2A);     /* empty photo or map box */
  --st-color-on-placeholder: light-dark(#5C5850, #B0ADA6);  /* text and icons on it */
  --st-color-focus: var(--st-color-accent);                 /* keyboard focus ring */

  /* More colors, mainly for apps (stoei.css, app-shell.css). Defaults are
     worked out from the colors above, so a site never has to set them. */
  --st-color-raised: var(--st-color-surface);               /* popovers, dialogs, fields */
  --st-color-line-strong: color-mix(in srgb, var(--st-color-line), var(--st-color-text) 25%); /* field borders, outline buttons */
  --st-color-text-soft: var(--st-color-text);               /* long body text in apps */
  --st-color-text-faint: color-mix(in srgb, var(--st-color-text-muted), var(--st-color-bg) 25%); /* disabled, done */
  --st-color-eyebrow: var(--st-color-text-muted);           /* small uppercase labels */
  --st-color-accent-tint: color-mix(in srgb, var(--st-color-accent) 12%, var(--st-color-surface)); /* soft accent background */
  --st-color-accent-fill: var(--st-color-accent);           /* solid buttons, active nav */
  --st-color-accent-fill-hover: var(--st-color-accent-hover);
  --st-color-warn: light-dark(#8A6317, #D4AA5C);            /* warnings */
  --st-color-info: light-dark(#3D5F7A, #8FB3CF);            /* notes, "for your information" */
  --st-color-bad-hover: color-mix(in srgb, var(--st-color-bad) 85%, var(--st-color-text));
  --st-color-on-bad: light-dark(#FFFFFF, #141414);          /* text on the bad color (a solid Delete button) */
  --st-color-ok-tint: color-mix(in srgb, var(--st-color-ok) 12%, var(--st-color-surface));
  --st-color-warn-tint: color-mix(in srgb, var(--st-color-warn) 12%, var(--st-color-surface));
  --st-color-bad-tint: color-mix(in srgb, var(--st-color-bad) 12%, var(--st-color-surface));
  --st-color-info-tint: color-mix(in srgb, var(--st-color-info) 12%, var(--st-color-surface));
  --st-color-ok-fill: var(--st-color-ok);                   /* solid status badges and banners */
  --st-color-warn-fill: var(--st-color-warn);
  --st-color-bad-fill: var(--st-color-bad);
  --st-color-info-fill: var(--st-color-info);
  --st-color-backdrop: light-dark(rgb(20 20 18 / 0.38), rgb(0 0 0 / 0.6)); /* behind a dialog */

  /* App sidebar (app-shell.css; the admin sets its own in admin-theme.css).
     Defaults follow the band (header) colors. "on-" means text on it. */
  --st-color-sidebar: var(--st-color-band);
  --st-color-on-sidebar: var(--st-color-on-band);
  --st-color-on-sidebar-strong: var(--st-color-on-band);       /* logo, headings */
  --st-color-on-sidebar-muted: color-mix(in srgb, var(--st-color-on-band) 70%, var(--st-color-band));
  --st-color-on-sidebar-accent: var(--st-color-band-accent);   /* accent text and icons */
  --st-color-on-sidebar-bad: light-dark(#F08A80, #F08A80);     /* sign out, delete */
  --st-color-sidebar-line: color-mix(in srgb, var(--st-color-on-band) 12%, var(--st-color-band));
  --st-color-sidebar-hover: color-mix(in srgb, var(--st-color-on-band) 8%, transparent);
  --st-color-sidebar-active: var(--st-color-accent-fill);
  --st-color-on-sidebar-active: var(--st-color-on-accent);

  /* Fonts. */
  --st-font-body: var(--st-font-sans);
  --st-font-display: var(--st-font-serif);     /* headings, logo, card titles */

  /* Text sizes by job. */
  --st-text-hero: clamp(2.375rem, 5.5vw, 4rem);     /* home page title */
  --st-text-h1: clamp(2.125rem, 4.5vw, 3.25rem);    /* page titles */
  --st-text-h2: var(--st-text-13);
  --st-text-h3: var(--st-text-9);
  --st-text-lead: 1.1875rem;                        /* intro under a title, 19px (approved mockups) */
  --st-text-body: var(--st-text-6);
  --st-text-prose: var(--st-text-lead);             /* article and page text */
  --st-text-small: var(--st-text-4);
  --st-text-caption: var(--st-text-3);              /* hints, captions, dates */
  --st-text-label: var(--st-text-2);                /* eyebrows, small capitals */
  --st-text-logo: clamp(1.25rem, 6vw, 1.625rem);
  --st-text-card-title: var(--st-text-9);
  --st-text-box-title: var(--st-text-11);           /* "Nothing found", "Sent" boxes */
  --st-text-code: 0.9em;                            /* code and tables inside text: a bit smaller than the text around */

  /* Line height, weight and letter spacing. */
  --st-leading-body: 1.55;
  --st-leading-prose: 1.7;
  --st-leading-heading: 1.15;
  --st-leading-title: 1.08;          /* h1 and page titles */
  --st-leading-tight: 1.2;           /* h3, card titles, buttons */
  --st-weight-heading: 600;
  --st-weight-strong: 600;           /* buttons, labels, links in lists */
  --st-tracking-heading: -0.01em;
  --st-tracking-title: -0.02em;
  --st-tracking-label: 0.08em;       /* eyebrows, small capitals */

  /* Shadows by job. */
  --st-shadow-raised: var(--st-shadow-2);          /* menus, sign-in card */
  --st-shadow-dialog: var(--st-shadow-3);          /* dialogs */
  --st-shadow-picked: inset 0 -3px 0 var(--st-color-accent); /* the picked choice in a .choice-bar */
  --st-ring-field: 0 0 0 3px color-mix(in srgb, var(--st-color-accent) 22%, transparent); /* field in use */

  /* Corners by job. */
  --st-radius-card: var(--st-radius-6);
  --st-radius-control: var(--st-radius-4);          /* buttons, fields */
  --st-radius-big: var(--st-radius-7);              /* callouts, wide photos */
  --st-radius-pill: var(--st-radius-full);
  --st-radius-focus: var(--st-radius-1);

  /* Layout and sizes. */
  --st-container: 75rem;           /* widest content, 1200px */
  --st-measure-wide: 56.25rem;     /* search results, 900px */
  --st-measure: 47.5rem;           /* narrow pages, article heads, 760px */
  --st-measure-reading: 42.5rem;   /* reading column, 680px */
  --st-gutter: var(--st-space-6);  /* side space of the page */
  --st-section-space: var(--st-space-10); /* above and below every page section, the same both ways (64px; 48px on phones) */

  /* Section kinds (page sections built from kinds: feature grid, steps, checklist...). A section is a
     full-width band with its own container; a theme sets these to get its own look. The kinds have
     their own rem-valued spacing steps, so Core's space scale stays as it is. */
  --st-k1: 0.25rem; --st-k2: 0.5rem; --st-k3: 0.75rem; --st-k4: 1rem; --st-k5: 1.5rem; --st-k6: 2rem; --st-k7: 3rem; --st-k8: 4rem; --st-k9: 6rem;
  --st-sec-pad: var(--st-k8);                 /* above and below a section */
  --st-sec-gap: var(--st-k7);                 /* between a section's head and its content */
  --st-sec-gap-tight: var(--st-k6);
  --st-sec-head-gap: var(--st-k4);            /* inside a section head */
  --st-sec-head-max: 48rem;                   /* widest a section head gets */
  --st-sec-rule: 0;                           /* line under a section: a border shorthand, or 0 */
  --st-grid-gap: var(--st-k6);
  --st-cell-pad: var(--st-k6);
  --st-title-size: var(--st-text-h2);         /* a section's heading */
  --st-title-weight: var(--st-weight-heading);
  --st-title-leading: var(--st-leading-heading);
  --st-title-stretch: 100%;                   /* font-stretch, for a variable font with a width axis */
  --st-item-title-size: var(--st-text-h3);    /* a block's heading inside a section */
  --st-item-title-weight: var(--st-weight-heading);
  --st-item-title-leading: var(--st-leading-heading);
  --st-item-title-stretch: 100%;
  --st-card-title-size: var(--st-text-12);    /* a card's or step's big title */
  --st-ticks-title-size: var(--st-text-8);    /* a Ticks card's title, smaller than a card's big title (0.69.0) */
  --st-card-title-stretch: 100%;
  --st-label-font: var(--st-font-sans);       /* eyebrows, codes, numbers, captions */
  --st-label-weight: var(--st-weight-strong);
  --st-label-tracking: var(--st-tracking-label);
  --st-label-case: uppercase;
  --st-bar: 0;                                /* thickness of the bar on top of a card or price tag */
  --st-bar-color: var(--st-color-line-strong);
  --st-bar-thin: 0;                           /* a thinner bar, on a box that stands alone (the checklist's ticked list) */
  --st-box-title-size: var(--st-text-10);     /* a boxed block's title (feature grid boxed cards, the ticked list) */
  --st-box-title-size-sm: var(--st-text-8);   /* and in small boxed cards */
  --st-box-title-leading: var(--st-leading-heading);
  --st-pricebeside-code-width: 5.5rem;         /* Prices, Layout = Beside: the code column beside each name (0.67.0) */
  --st-frame: 1px;                            /* outer frame of steps */
  --st-frame-heavy: 1px;                      /* frame of a tag row, a plate and an action box */
  --st-frame-color: var(--st-color-line-strong);
  --st-num-size: var(--st-text-14);           /* the big step number */
  --st-title-size-md: clamp(1.75rem, 3vw, 2.5rem);   /* a section heading one size down */
  --st-title-size-sm: clamp(1.75rem, 2.6vw, 2.25rem); /* and two sizes down */
  --st-hero-title-size: clamp(2.375rem, 5.5vw, 4rem);   /* a hero section's headline */
  --st-cta-btn-fill: var(--st-color-on-accent);       /* a Callout band's first button on the accent band (0.59.0) */
  --st-cta-btn-text: var(--st-color-accent-fill);     /* and its words */
  --st-cta-btn-line: var(--st-line-width);            /* the outline of its second button */
  --st-cta-head-max: 40rem;                           /* a stacked Callout band's words; --st-cta-head-max-wide with Text width Wider */
  --st-cta-head-max-wide: 44rem;
  --st-qa-gap: var(--st-k3);                          /* between boxed questions (Questions and answers, beside) */
  --st-qa-frame: var(--st-line-width) solid var(--st-color-line-strong);
  --st-qa-radius: var(--st-radius-3);
  --st-qa-title-size: var(--st-text-7);
  --st-qa-title-weight: var(--st-weight-strong);
  --st-qa-plus-size: var(--st-text-10);
  --st-eyebrow-num-fill: var(--st-color-accent-fill);  /* the number in a small box in front of a section's small label (0.59.0) */
  --st-eyebrow-num-text: var(--st-color-on-accent);
  --st-eyebrow-num-pad: 2px var(--st-space-2);
  --st-chip-on-fill: var(--st-color-accent-fill);     /* the chosen chip in a row of chip buttons (aria-pressed), its fill and words (0.61.0) */
  --st-chip-on-text: var(--st-color-on-accent);
  --st-wave-size: 20px;                               /* the height of a band's wavy edges; the band overlaps its neighbours by this much */
  --st-wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C20 0 60 0 80 10 S140 20 160 10 V20 H0Z'/%3E%3C/svg%3E") top left / 160px var(--st-wave-size) repeat-x, linear-gradient(#000, #000) center / 100% calc(100% - var(--st-wave-size) * 2 + 2px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C20 20 60 20 80 10 S140 0 160 10 V0 H0Z'/%3E%3C/svg%3E") bottom left / 160px var(--st-wave-size) repeat-x;
  --st-textblock-edge: 6px solid var(--st-color-accent);  /* the coloured left edge of a Text box, card and quote (0.60.0) */
  --st-textblock-body-size: var(--st-text-7);              /* Text beside its heading: the text */
  --st-textblock-card-size: var(--st-text-8);              /* Text in a card: its words (a quote, set large) */
  --st-textblock-box-size: 1.1875rem;                      /* Text in a box: its words */
  --st-textblock-box-max: 60rem;
  --st-textblock-link-weight: 700;                         /* links inside these texts */
  --st-textblock-note-weight: 400;                         /* the small line under a quote in a card */
  --st-speccard-title-size: var(--st-text-10);       /* a Hero's facts card: its title (0.62.0) */
  --st-speccard-title-weight: 800;
  --st-speccard-title-stretch: 85%;
  --st-speccard-rows-size: var(--st-text-4);         /* and its rows */
  --st-jump-code-min: 3.5rem;                         /* a Hero's jump list: the width kept for each code */
  --st-cue-nudge: 4px;                                /* how far a panel cell's arrow moves on hover */
  --st-notes-title-size: var(--st-text-6);           /* the Notes beside Text or a Hero: a note's bold line (0.63.0) */
  --st-notes-title-weight: 700;
  --st-notes-text-size: var(--st-text-5);            /* and its grey line */
  --st-notes-pairs-size: var(--st-text-4);           /* Notes shown as Facts (a small label beside its text) */
  --st-notes-box-title-size: var(--st-text-9);      /* the heading over Notes in a box (0.64.0) */
  --st-textex-alone-max: 52rem;                      /* Text with an example chosen that the site doesn't have: how wide the words get */
  --st-split-photo-turn: 0deg;                        /* Text with photo: the photo's frame turned (a tilt), its line and corners */
  --st-split-photo-frame: 0;
  --st-split-photo-radius: var(--st-radius-card);
  --st-hero-title-leading: 1.05;
  --st-hero-title-stretch: 100%;
  --st-hero-title-tracking: var(--st-tracking-title);
  /* Page head spacing (owner approved 19 Nov 2026). Ready to become site
     settings later, the same way Site width is. */
  --st-page-top: var(--st-space-7);        /* site header to the breadcrumb or page head (32px; 24px on phones) */
  --st-head-space: var(--st-space-7);      /* page head, or a listing's breadcrumb, to what comes next (32px; 24px on phones) */
  --st-crumb-space: var(--st-space-2);     /* breadcrumb to the page title inside a page head (8px) */
  --st-count-space: var(--st-space-3);     /* filter box to the results count (12px) */
  --st-count-to-results: var(--st-space-4); /* results count to the cards (16px) */
  --st-listing-space: var(--st-space-8);   /* between sections in a listing's main column (40px) */
  /* Text rhythm (owner approved 19 Nov 2026). Same: ready to become settings. */
  --st-search-space: var(--st-space-4);    /* search page: title to the search box, and the box to what follows (16px) */
  --st-search-head-width: 48rem;           /* Stoei CMS's search page: its head and its "nothing found" block (0.70.0) */
  --st-result-width: 52rem;                /* one search result on that page (0.70.0) */
  --st-search-joined-width: 40rem;         /* the joined search box (field and button touching) on the search and 404 pages (0.70.0) */
  /* A long page in parts (Stoei CMS's Text, Layout "A long page in parts": a privacy policy, terms), 0.71.0 */
  --st-parts-width: 56rem;                 /* the reading column of its parts (896px) */
  --st-parts-title-size: var(--st-text-13); /* a part's heading (32px) */
  --st-parts-title-weight: 800;
  --st-parts-title-stretch: 100%;          /* a site with a variable font can narrow it (stoei.co 80%) */
  --st-parts-title-leading: 1.05;
  --st-parts-small-size: var(--st-text-8); /* a small heading inside a part (20px) */
  --st-parts-small-stretch: 100%;
  --st-parts-text-size: var(--st-text-6);  /* its text and lists (17px) */
  --st-parts-text-leading: 1.6;
  --st-parts-link-weight: 700;              /* a link in its text */
  /* A ticked list in columns (.st-ticks--cols, 0.72.0): a listing's features, a property's Features */
  --st-ticks-col: 15rem;                   /* a column's smallest width: two columns from about 32rem, one on phones */
  --st-ticks-col-gap: var(--st-space-6);   /* between its columns (24px) */
  --st-flow-space: var(--st-space-3);      /* between lines of text in a block, e.g. two short paragraphs (12px) */
  --st-flow-to-actions: var(--st-space-5); /* text to a row of chips or buttons under it (20px) */
  --st-title-gap: var(--st-space-2);       /* a box's title to its intro line, a choice list to its note (8px) */
  --st-scroll-offset: 96px;        /* room above a section reached by a #link */
  --st-touch: 44px;                /* smallest tap target for a button or control */
  --st-touch-min: 24px;            /* smallest tap target for a link in a menu or list (WCAG 2.2 AA, 2.5.8) */
  --st-control-height: 48px;       /* buttons and fields */
  --st-control-height-sm: 36px;    /* tags, check boxes, small buttons */
  --st-control-height-lg: 52px;    /* the big search box */
  --st-line-width: 1px;            /* borders */
  --st-focus-width: 3px;
  --st-focus-offset: 2px;
  --st-focus-ring: var(--st-focus-width) solid var(--st-color-focus);
  --st-motion: 0.15s ease;         /* color changes on hover */
  --st-motion-spin: 0.8s;          /* one turn of a loading spinner */
  --st-opacity-disabled: 0.5;      /* buttons and fields that can't be used */
  --st-icon-stroke: 2px;           /* line width of the loading ring */
  --st-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); /* tick on a "Saved" button */
  --st-textarea-height: 7.5rem;    /* a text box's starting height, 120px */
  --st-color-line-hover: color-mix(in srgb, var(--st-color-line-strong), var(--st-color-text) 30%); /* field border on hover */
  --st-color-icon-line: color-mix(in srgb, currentColor 30%, transparent);  /* ring of round icon buttons and the light/dark switch */
  --st-color-icon-hover: color-mix(in srgb, currentColor 10%, transparent); /* their hover; both follow the text color around them */

  /* ---------- Tier 3: component settings ----------
     Buttons and fields (controls.css). Websites keep these defaults; the app
     starter theme sets the compact app sizes. Size classes (.st-btn--sm,
     .st-btn--lg) change the button ones on that button only. */
  --st-button-height: var(--st-control-height);
  --st-button-pad: var(--st-space-6);              /* space left and right of the words */
  --st-button-text: var(--st-text-body);
  --st-button-weight: var(--st-weight-strong);
  --st-button-wrap: nowrap;                        /* normal lets long words wrap to a second line (the admin) */
  --st-button-secondary-bg: var(--st-color-surface);
  --st-button-secondary-text: var(--st-color-text);
  --st-button-secondary-line: var(--st-color-line);
  --st-button-secondary-hover-bg: var(--st-color-surface);
  --st-field-height: var(--st-control-height);
  --st-field-pad: var(--st-space-4);
  --st-icon-btn-on-bg: var(--st-color-sunk);       /* a round icon button that is on or open (aria-pressed / aria-expanded "true") */
  /* Tags (.st-tag in controls.css): the small labels beside a title or in a
     table cell (a status, a type, a count). One part for websites, apps and
     the admin; the admin theme sets the compact admin size. */
  --st-tag-gap: var(--st-space-2);                 /* between tags in a .st-tags row (8px) */
  --st-tag-before: var(--st-space-1);              /* added to the word space before a tag in a line of text (4px + the space = about 8px) */
  --st-tag-text: var(--st-text-small);
  --st-tag-pad-y: var(--st-space-1);
  --st-tag-pad-x: var(--st-space-3);
  --st-tag-weight: var(--st-weight-strong);
  --st-tag-radius: var(--st-radius-pill);
  --st-tag-case: none;                             /* uppercase for a label look */
  --st-tag-tracking: normal;                       /* letter spacing, with uppercase */
  --st-tag-leading: var(--st-leading-tight);
  /* Counts (.st-count in controls.css): the number beside a tab or chip. */
  --st-count-color: var(--st-color-text-muted);
  --st-count-weight: 400;
  --st-count-on-fill: 0.85;                        /* on a filled current tab: its own text colour, a little lighter */
  /* Letter (.st-letter in controls.css): a written report or email shown as a
     white card on a warm band, the look of the weekly emails. */
  --st-letter-band: light-dark(#F5F1EA, #22201D);
  --st-letter-card: light-dark(#FFFFFF, #1C1A18);
  --st-letter-ink: light-dark(#16140F, #EEEAE4);
  --st-letter-muted: light-dark(#6B665C, #ADA69B);
  --st-letter-width: 560px;
  --st-letter-text: var(--st-text-body);
  --st-letter-leading: 1.55;
  --st-letter-pad: var(--st-space-6);
  --st-letter-band-pad: var(--st-space-5);
  --st-letter-radius: var(--st-radius-2);
  --st-letter-subject: var(--st-text-6);
  --st-letter-gap: var(--st-space-4);
  --st-link-btn-height: auto;                      /* link buttons (.st-link-btn): their least height; a row of them can set 28px to tap */
  /* Tables (.st-table in controls.css): one table part for website text,
     apps and the admin; the admin theme sets the admin look. */
  --st-table-text: var(--st-text-small);           /* cell text */
  --st-table-head-text: 1em;                       /* heading row text, 1em = same as the cells */
  --st-table-head-color: var(--st-color-text);     /* heading row text colour */
  --st-table-head-wrap: nowrap;                    /* heading row: normal lets long headings wrap */
  --st-table-pad-y: var(--st-space-3);             /* cell padding, top and bottom (12px) */
  --st-table-pad-x: var(--st-space-4);             /* cell padding, left and right (16px) */
  --st-table-cell-min: 8em;                        /* on phones the box scrolls before a cell gets too narrow to read */
  --st-table-bg: transparent;                      /* box background */
  --st-table-hover: transparent;                   /* row background under the pointer */
  --st-table-numbers: tabular-nums;                /* digits the same width, so columns line up */

  /* Code box (code-box.css, js/code-box.js, php/stoei-code-box.php): a
     command, path, key or snippet in a box with a Copy button. Every value
     is a name here, so each can become a site setting later. */
  --st-code-bg: var(--st-color-sunk);              /* box background */
  --st-code-line: var(--st-color-line);            /* box border */
  --st-code-color: var(--st-color-text);           /* the code itself */
  --st-code-font: var(--st-font-mono);
  --st-code-text: var(--st-text-3);                /* 14px */
  --st-code-leading: 1.6;
  --st-code-wrap: pre;                             /* pre: long lines scroll sideways in the box; pre-wrap: they wrap */
  --st-code-radius: var(--st-radius-control);
  --st-code-pad-y: var(--st-space-3);              /* 12px above and below the code */
  --st-code-pad-x: var(--st-space-4);              /* 16px left of the code */
  --st-code-gap: var(--st-space-1);                /* code to the Copy button, and the button's edge space */
  --st-code-space: var(--st-space-3);              /* above and below the box, the same both ways */
  --st-code-button-size: var(--st-touch);          /* the Copy button, 44px */
  --st-code-button-color: var(--st-color-text-muted);
  --st-code-done-color: var(--st-color-ok);        /* "Copied" */
  --st-code-max-height: 20rem;                     /* .st-code--tall (exports): taller text scrolls */
  --st-code-inline-bg: var(--st-color-sunk);       /* <code> inside a sentence */
  --st-code-inline-pad: 0.1em 0.35em;
  --st-code-inline-radius: var(--st-radius-1);

  /* Error page (error.css): "Page not found", "Something went wrong". */
  --st-error-width: var(--st-measure-reading);     /* widest the words get */
  --st-error-code-text: var(--st-text-hero);       /* the big 404 or 500 */
  --st-error-code-color: var(--st-color-accent);
  --st-error-title-text: var(--st-text-h2);
}
/* For people who ask for less motion, hover and state changes happen at once (app-shell, admin and parts all use this setting). */
@media (prefers-reduced-motion: reduce) { :root { --st-motion: 0s; } }


/* Site width (Stoei CMS Settings › Site width). Standard keeps the 1200px
   above; the CMS prints data-site-width on <html> for the other two. An
   attribute, not an inline style, so the site's Content-Security-Policy
   stays strict. Reading columns (--st-measure*) never change. */
:root[data-site-width="wide"] { --st-container: 90rem; }  /* 1440px */
:root[data-site-width="full"] { --st-container: 120rem; } /* fills the screen, up to 1920px */

@media (max-width: 480px) {
  :root { --st-gutter: var(--st-space-5); --st-text-h2: var(--st-text-12); --st-section-space: var(--st-space-9);
          --st-page-top: var(--st-space-6); --st-head-space: var(--st-space-6); }
}
