/* Shared page frame: the ONE header, footer, column and type scale of every page.  12 October 2026.
   Loaded in <head> of every page, after /theme/course-theme.css:
     <link rel="stylesheet" href="/theme/site-frame.css">
   Colours only from the theme variables (--t-*). The header and footer are built by /theme/site-frame.js. */

:root {
  /* the version of this file: /theme/site-frame.js loads the current copy when a browser kept an older one (15 October
     2026). Raise it with site-frame.js's CSS_VERSION whenever a rule the script relies on is added. */
  --sf-css: 20261112d;
  /* the two column widths, both centred: reading pages, and lesson workspaces and apps (<html data-sf-width="wide">) */
  --sf-read: 1200px;
  --sf-wide: 1760px;
  --sf-gutter: clamp(16px, 3vw, 32px);
  --sf-col: 100%;   /* every page full width with the side gutter, as the walkthrough pages (28 October 2026) */
  /* spacing, radius and type scale (rem: they follow the reader's browser text size) */
  --sf-space-1: 4px; --sf-space-2: 8px; --sf-space-3: 12px; --sf-space-4: 16px; --sf-space-5: 24px; --sf-space-6: 32px; --sf-space-7: 48px;
  --sf-radius: var(--t-r, 12px); --sf-radius-lg: var(--t-r-lg, 16px);
  --sf-text-sm: 0.875rem; --sf-text: 1rem; --sf-text-lg: 1.125rem;
  --sf-h3: 1.25rem; --sf-h2: clamp(1.5rem, 1.2rem + 1vw, 2rem); --sf-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
  --sf-measure: 80ch;   /* body text lines stay under about 80 characters */
  --sf-narrow: 920px;   /* a centred intro or hero text block */
  --sf-prose: 1100px;   /* a wide text block, a table or a chat box */
  --sf-head-h: 64px;
  --sf-zoom: 1;
  /* the visible window in the page's own CSS px (viewport units grow with a CSS zoom on the root) */
  --sf-vh: calc(100vh / var(--sf-zoom, 1));
  --sf-vw: calc(100vw / var(--sf-zoom, 1));
}
html[data-sf-width="wide"] { --sf-col: var(--sf-wide); }
/* lesson pages and the case page that holds a lesson (26 October 2026): the full window width at any zoom, small side
   gutters only (a 70% zoom on a wide screen lays the page out far wider than any fixed column) */
html[data-sf-width="wide"], html:has(.cl-lesson) { --sf-col: 100%; }

/* the column: centred, the same gap left and right */
.sf-col { width: min(100% - 2 * var(--sf-gutter), var(--sf-col)); margin-inline: auto; }
/* a full-width band whose content sits in the column */
.sf-band { padding-inline: max(var(--sf-gutter), (100% - var(--sf-col)) / 2); }

/* shared card */
.sf-card { background: var(--t-card); border: 1px solid var(--t-border); border-radius: var(--sf-radius-lg); box-shadow: var(--t-shadow-sm); color: var(--t-text-2); }

/* ── Header: the same on every page ── */
/* The shared top bar is the site's highest layer. Menus it opens sit immediately below its own controls, but above
   page dialogs, tours, demo controls and the assistant. */
/* the header and the breadcrumb zoom with the page (30 October 2026, the owner's decision; they were held at 100% from
   28 October): the root's CSS zoom (/theme/site-settings.js: the zoom control and the screen's Fit) scales the menu,
   its buttons and the logo in step with the text. A narrow layout (data-sf-lw, the width after the zoom) folds the
   menu as before. */
.sf-head { position: sticky; top: 0; z-index: 2147483640; flex: none; background: var(--t-header); color: var(--t-header-text);
  backdrop-filter: blur(var(--t-glass-blur, 12px)); -webkit-backdrop-filter: blur(var(--t-glass-blur, 12px));
  border-bottom: 1px solid var(--t-border-soft); font: 400 16px/1.4 var(--t-font); }
html[data-sf-width="wide"] .sf-head { position: relative; }   /* workspaces: the header scrolls away, the workspace keeps the screen */
.sf-head-in { width: min(100% - 2 * var(--sf-gutter), var(--sf-col)); min-height: var(--sf-head-h); margin-inline: auto;
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: nowrap; }
.sf-brand { display: inline-flex; align-items: center; gap: 12px; flex: none; color: var(--t-text); font-size: 17px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.sf-brand-mark { flex: none; width: 38px; height: 38px; padding: 2px; border-radius: var(--t-r, 12px); background: var(--t-grad-brand); box-shadow: var(--t-glow-violet); }
.sf-brand-mark span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 10px; background: var(--t-page); color: var(--t-on-text); }
.sf-brand-mark svg { width: 18px; height: 18px; }
.sf-brand-text { background: var(--t-grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sf-platform-switch { flex: 0 1 250px; min-width: 130px; }
.sf-platform-switch select { width: 100%; min-height: 36px; padding: 6px 32px 6px 10px; border: 1px solid var(--t-border); border-radius: var(--t-r-sm, 8px); background: var(--t-surface); color: var(--t-text); font: 600 13px/1.2 var(--t-font); cursor: pointer; }
.sf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sf-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; margin-left: auto; min-width: 0; }
.sf-nav a { padding: 8px 12px; border-radius: var(--t-r-sm, 8px); color: var(--t-header-text); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sf-nav a:hover, .sf-nav a:focus-visible { color: var(--t-on-text); background: var(--t-cyan-soft); }
.sf-nav a[aria-current] { color: var(--t-on-text); box-shadow: inset 0 -2px 0 var(--t-on); }
.sf-nav-off { padding: 8px 12px; color: var(--t-muted); font-size: 15px; font-weight: 500; white-space: nowrap; cursor: default; opacity: .6; pointer-events: none; user-select: none; }   /* a menu entry of a platform in development: not a link, no hover */
.sf-nav-tag { align-self: center; margin-left: 4px; min-height: 20px; padding: 1px 8px; font-size: 11px; color: var(--t-muted); cursor: default; }
/* a door of a platform in development (10 November 2026): muted, no hover, not a link; its tag says In development */
.sf-choice[aria-disabled="true"] { cursor: default; border-style: dashed; box-shadow: none; background: transparent; }
.sf-choice[aria-disabled="true"] .sf-choice-t, .sf-choice[aria-disabled="true"] .sf-choice-d { color: var(--t-muted); opacity: .75; }
.sf-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.sf-head :focus-visible { outline: none; box-shadow: var(--t-focus); }
.am-panel, .ct-cz { z-index: 2147483639 !important; }

/* the zoom control: minus, percentage, plus, back to the fit */
.sf-zoom { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--t-neutral-border); border-radius: 999px; overflow: hidden; }
.sf-zoom button { min-width: 36px; height: 100%; padding: 0 8px; border: 0; background: transparent; color: var(--t-text); font: 700 16px/1 var(--t-font); cursor: pointer; }
/* the header is the same on every page (28 October 2026): a page's own button rule (the lesson player's
   ".lt-page button { font: inherit }") does not reach the AI model and Theme buttons */
.sf-head .am-btn, .sf-head .ct-btn { font: 600 13px/1 var(--t-font, system-ui); }
.sf-zoom button:hover:not(:disabled) { background: var(--t-surface-3); }
.sf-zoom button:disabled { color: var(--t-faint); cursor: default; }
.sf-zoom .sf-zfit { font-size: 13px; padding: 0 12px; border-left: 1px solid var(--t-border); }
.sf-zval { min-width: 50px; text-align: center; color: var(--t-text); font: 700 13px/1 var(--t-font); font-variant-numeric: tabular-nums; cursor: pointer; }   /* (click: the default zoom) */

/* ── Footer ── */
.sf-foot { flex: none; border-top: 1px solid var(--t-border); background: var(--t-surface-2); color: var(--t-muted); font: 400 14px/1.5 var(--t-font); }
.sf-foot-in { width: min(100% - 2 * var(--sf-gutter), var(--sf-col)); margin-inline: auto; min-height: 48px; padding: 10px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.sf-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sf-foot a { color: var(--t-muted); text-decoration: none; font-weight: 600; }
.sf-foot a:hover, .sf-foot a:focus-visible { color: var(--t-on-text); text-decoration: underline; }
html[data-sf-width="wide"] .sf-foot-in { min-height: 36px; padding: 4px 0; }

/* ── Old pages (<html data-sf-legacy>, wired in by tools/site_convert.js): the same column and bands ── */
html[data-sf-legacy] body { background: var(--t-page); color: var(--t-text-2); }
html[data-sf-legacy] #scrollDoc > .sec { width: min(100% - 2 * var(--sf-gutter), var(--sf-col)); margin-inline: auto; }
html[data-sf-legacy] .topbar, html[data-sf-legacy] .mod-bar { padding-inline: max(var(--sf-gutter), (100% - var(--sf-col)) / 2) !important; }
html[data-sf-legacy] .sec-text p, html[data-sf-legacy] .sec-text li { max-width: var(--sf-measure); }
/* SVG text an old page draws without a colour is black by default: the theme's text colour instead */
html[data-sf-legacy] svg:not([fill]) { fill: var(--t-text); }

/* an old copy of the course header left in a page's own markup: the shared header replaces it */
body > header.site-head:not([data-site-frame]) { display: none !important; }

/* an embedded page (a lesson inside another page): the parent page shows the frame */
html[data-sf-embedded] .sf-head, html[data-sf-embedded] .sf-foot { display: none !important; }

/* ── Fonts (Customise > Fonts): heading size, weight and line height, on every page ── */
html[data-sf-heading] :is(h1, h2, h3, h4) { zoom: var(--sf-heading, 1); }
html[data-sf-weight] body, html[data-sf-weight] :is(p, li, dd, td, blockquote) { font-weight: var(--sf-weight, 400); }
html[data-sf-lh] :is(p, li, dd, td, blockquote) { line-height: var(--sf-lh, 1.6) !important; }

/* ── Narrow layouts, phones and tablets: reflow, never shrink; nothing hidden in a menu ──
   html[data-sf-lw] is the width the page is laid out at (set by /theme/site-settings.js): the window width divided by
   the zoom, so the header reflows at 150 % zoom on a laptop as it does on a tablet (media queries do not see the zoom). */
html:is([data-sf-lw="narrow"], [data-sf-lw="tablet"], [data-sf-lw="phone"]) .sf-head-in { flex-wrap: wrap; padding: 8px 0; }
html:is([data-sf-lw="narrow"], [data-sf-lw="tablet"], [data-sf-lw="phone"]) .sf-nav { order: 3; flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
html:is([data-sf-lw="narrow"], [data-sf-lw="tablet"], [data-sf-lw="phone"]) .sf-tools { margin-left: auto; }
html[data-sf-lw="phone"] .sf-brand { font-size: 16px; gap: 8px; }
html[data-sf-lw="phone"] .sf-brand-mark { width: 32px; height: 32px; }
html[data-sf-lw="phone"] .sf-brand-text { display: none; }
html[data-sf-lw="phone"] .sf-platform-switch { flex: 1 1 180px; }
html[data-sf-lw="phone"] .sf-nav { gap: 0; }
html[data-sf-lw="phone"] .sf-nav a { padding: 8px 8px; font-size: 16px; }
html[data-sf-lw="phone"] .sf-zoom button { min-width: 32px; padding: 0 6px; }
html[data-sf-lw="phone"] .sf-zval { min-width: 44px; }
html[data-sf-lw="phone"] .sf-foot { font-size: 16px; }
html[data-sf-lw="phone"] .sf-zoom .sf-zfit, html[data-sf-lw="phone"] .sf-zval { font-size: 16px; }
/* body text never below 16 px on a phone (elements marked by /theme/site-frame.js) */
html[data-sf-lw="phone"] [data-sf-min] { font-size: 16px !important; }
@media (prefers-reduced-motion: reduce) { .sf-head *, .sf-foot * { transition: none !important; } }
@media print { .sf-head, .sf-foot { display: none !important; } }

/* ── A page's own bar (13 October 2026). A page that has its own toolbar (Back, a title, step buttons, app controls)
   marks it data-sf-pagebar: the frame shows it as a slim band under the shared header, in the column, in the theme.
   data-sf-pagebar="app" (an app's menu or toolbar) keeps the app's own spacing and gets only the theme colours.
   data-sf-dup hides what repeats the shared header: a second site menu or a second logo. ── */
[data-sf-pagebar] { box-sizing: border-box; min-height: 44px; background: var(--t-surface) !important; color: var(--t-text) !important;
  border-bottom: 1px solid var(--t-border-soft) !important; box-shadow: none !important; font-family: var(--t-font); }
[data-sf-pagebar]:not([data-sf-pagebar="app"]) { padding-inline: max(var(--sf-gutter), (100% - var(--sf-col)) / 2) !important; }
[data-sf-dup] { display: none !important; }
/* on a narrow screen a page bar and its groups of buttons wrap onto more lines instead of running off the side */
[data-sf-pagebar]:not([data-sf-pagebar="app"]), [data-sf-pagebar]:not([data-sf-pagebar="app"]) > * { flex-wrap: wrap; min-width: 0; max-width: 100%; }

/* ── The one card style for every page that offers choices (15 October 2026; SiteFrame.cards in site-frame.js) ──
   A short introduction on the page, then rectangular cards in a grid: title, one or two lines, then the action word.
   The whole card is the one link (or button): on hover it lifts slightly and its border takes the accent as text
   (--t-on-text, fitted to 4.6:1 on every ground, also for a customised accent); keyboard focus shows a ring in the accent as text (4.6:1 on every ground).
   The action word is the accent as text. A card that is not ready shows Coming soon and is not a link. */
.sf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--sf-space-3, 16px); margin: 0; padding: 0; }
.sf-choice { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px; border: 1px solid var(--t-border); border-radius: var(--sf-radius-lg, 16px);
  background: var(--t-card, var(--t-surface)); color: var(--t-text-2); box-shadow: var(--t-shadow-sm, none); text-align: left; text-decoration: none; font: inherit;
  transition: transform .15s, border-color .15s, box-shadow .15s; }
a.sf-choice, button.sf-choice { cursor: pointer; }
a.sf-choice:hover, button.sf-choice:hover { transform: translateY(-2px); border-color: var(--t-border-hover, var(--t-on-text)); box-shadow: var(--t-shadow, var(--t-shadow-sm, none)); }
a.sf-choice:focus-visible, button.sf-choice:focus-visible { outline: 3px solid var(--t-on-text, currentColor); outline-offset: 3px; border-color: var(--t-on-text); }
.sf-choice.is-soon { border-style: dashed; box-shadow: none; }
.sf-choice.is-info { box-shadow: none; background: var(--t-surface-2, var(--t-card)); }   /* a statement, not a link */
.sf-choice-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sf-choice-ico { font-size: 22px; line-height: 1; }
.sf-choice-t { display: block; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--t-heading, var(--t-text)); }
.sf-choice-d { display: block; margin: 0; font-size: 15px; line-height: 1.5; color: var(--t-text-2); }
.sf-go { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 15px; color: var(--t-on-text); }
@media (prefers-reduced-motion: reduce) { .sf-choice { transition: none; } a.sf-choice:hover, button.sf-choice:hover { transform: none; } }
.sf-tag, .sf-soon { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: var(--t-r-pill, 999px); font: 600 12px/1.2 var(--t-mono, monospace);
  background: var(--t-surface-3); border: 1px solid var(--t-border-strong, var(--t-border)); color: var(--t-text-2); }
.sf-soon { align-self: flex-start; margin-top: auto; }
.sf-tag.live { color: var(--t-emerald-text, var(--t-text)); }
.sf-tag.review { color: var(--t-amber-text, var(--t-text)); }   /* a case or industry under review (22 October 2026) */
.sf-cards-intro { max-width: var(--sf-measure, 72ch); margin: 0 0 var(--sf-space-3, 16px); color: var(--t-text-2); }
.sf-cards-group { margin-block: var(--sf-space-5, 32px) 0; }
/* ONE grid for every list of use cases, on every platform (owner's rule, 11 November 2026): the case picker (Learn's use
   cases, industry pages, the Run, Codeless and Code pickers, My cases) and the site's Industries page. Four across on a
   wide screen, three on a laptop, two on a tablet, one on a phone (also when a group holds one case). */
/* (the grid rules are in ONE CARD FAMILY, at the end of this file) */
.sf-cards-group > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }

/* a page's own controls in the header (SiteFrame.headerSlot) and the menu folded into a button when the header is too
   narrow for its parts (data-sf-compact, set by site-frame.js; 15 October 2026) */
.sf-head-slot { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.sf-menu-btn { display: none; align-items: center; margin-left: auto; padding: 7px 12px; border: 1px solid var(--t-border);
  border-radius: var(--t-r-sm, 8px); background: transparent; color: var(--t-header-text); font: inherit; font-size: 15px;
  font-weight: 600; white-space: nowrap; cursor: pointer; }
.sf-menu-btn:hover { color: var(--t-on-text); background: var(--t-cyan-soft); }
.sf-head[data-sf-compact] .sf-menu-btn { display: inline-flex; }
.sf-head[data-sf-compact] .sf-nav { display: none; }
.sf-head[data-sf-compact][data-sf-menu-open] .sf-nav { display: flex; position: absolute; top: 100%; right: var(--sf-gutter, 16px); z-index: 50;
  flex-direction: column; align-items: stretch; margin: 0; padding: 6px; background: var(--t-surface); border: 1px solid var(--t-border);
  border-radius: var(--t-r-sm, 8px); box-shadow: var(--t-shadow); }

/* ── The breadcrumb (16 October 2026, SiteFrame.setTrail): one thin line under the header, never wrapping ── */
/* (18 November 2026, queue R-22) It takes the panel colour, as the header above it does. It was transparent, so on a
   light theme it showed the page through and left a white band between the header and the work area, which was part
   of why the light themes read as one white sheet. --t-header is the panel colour the header itself uses. */
.sf-trail { background: var(--t-header, var(--t-surface)); border-top: 1px solid var(--t-border-soft); font: 500 14px/1.3 var(--t-font); }
.sf-trail-in { width: min(100% - 2 * var(--sf-gutter), var(--sf-col)); min-height: 32px; margin-inline: auto;
  display: flex; align-items: center; gap: 16px; white-space: nowrap; overflow: hidden; }
.sf-trail-list { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.sf-trail-list li { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.sf-trail-list li:last-child { flex: 0 100 auto; }   /* the current page gives way first */
.sf-trail-list li[hidden] { display: none; }   /* folded into the "…" item (site-frame.js fitTrail, QC-003) */
.sf-trail-list li + li::before { content: "›" / ""; flex: none; margin: 0 6px; color: var(--t-header-text); opacity: .75; }
.sf-trail a, .sf-trail button { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 3px 6px;
  border: 0; border-radius: var(--t-r-sm, 8px); background: transparent; color: var(--t-header-text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.sf-trail-list li:first-child a, .sf-trail-list li:first-child button { padding-left: 0; }
.sf-trail a:hover, .sf-trail button:hover { color: var(--t-on-text); background: var(--t-cyan-soft); text-decoration: underline; }
.sf-trail a:focus-visible, .sf-trail button:focus-visible { color: var(--t-on-text); background: var(--t-cyan-soft); outline: 2px solid var(--t-on-text); outline-offset: 1px; }
.sf-trail .sf-trail-now a, .sf-trail .sf-trail-now button { color: var(--t-text); font-weight: 700; }   /* a current page the page made clickable */
.sf-trail [aria-current] span { display: block; overflow: hidden; text-overflow: ellipsis; padding: 3px 6px; color: var(--t-text); font-weight: 700; }
.sf-trail-up { display: none !important; }
.sf-trail-case { flex: none; margin-left: auto; }
.sf-trail-short { display: none; }
/* a phone or tablet layout (data-sf-lw, from /theme/site-settings.js: the width after the zoom, so a high zoom counts
   too): "‹ <parent>" and "About this case →", one line. Without site-settings, a width under 900 px does the same. */
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-list { display: none; }
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-list.sf-trail-solo { display: flex; }   /* nothing above this page (Home): its own name */
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-up { display: inline-block !important; flex: 0 1 auto; padding-left: 0; }
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-long { display: none; }
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-short { display: inline; }
/* (24 November 2026, audit2 P3 and P7) the row wraps instead of cutting: a long "‹ <parent>" (the four longest platform
   names) takes a second line, and on a phone a module's player controls (Previous, Next, Voice, Subtitles; lesson.js
   puts them in this row) go on their own line below the back link, and the Guide pane's title above its buttons */
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-in { flex-wrap: wrap; row-gap: 4px; }
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-up { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
html:is([data-sf-lw="phone"], [data-sf-lw="tablet"]) .sf-trail-in .lt-nav { flex: 0 1 auto; flex-wrap: wrap; row-gap: 6px; }
html[data-sf-lw="phone"] .sf-trail-in:has(.lt-nav) .sf-trail-up { flex: 1 1 100%; }
html[data-sf-lw="phone"] .sf-trail-in .lt-nav { flex: 1 1 100%; margin-left: 0; }
html[data-sf-lw="phone"] .lt-win-head { flex-wrap: wrap; row-gap: 6px; }
html[data-sf-lw="phone"] .lt-win-head .lt-win-title { flex: 1 1 100%; }
@media (max-width: 900px) {
  html:not([data-sf-lw]) .sf-trail-list { display: none; }
  html:not([data-sf-lw]) .sf-trail-list.sf-trail-solo { display: flex; }
  html:not([data-sf-lw]) .sf-trail-up { display: inline-block !important; flex: 0 1 auto; padding-left: 0; }
  html:not([data-sf-lw]) .sf-trail-long { display: none; }
  html:not([data-sf-lw]) .sf-trail-short { display: inline; }
}

/* ── Every native drop-down list is readable in every theme (30 October 2026, relay id 43 item 5h) ──
   A select whose own background is transparent (Codeless's Pipelines menu) opened its list in the browser's default
   white with the theme's light text: white on white in the dark themes. Each list now takes the theme's panel and text
   colours and the chosen row the accent, on every page (the list's frame and scroll bars follow the theme's
   color-scheme, set by /theme/themes.js). */
select option, select optgroup { background-color: var(--t-surface, Canvas); color: var(--t-text, CanvasText); }
select optgroup { color: var(--t-text-2, var(--t-text, CanvasText)); font-weight: 700; }
select option:checked { background-color: var(--t-on, Highlight); color: var(--t-on-accent, HighlightText); }
select option:disabled { color: var(--t-muted, GrayText); }
select { border-color: var(--t-border, currentColor); }

/* ===== ONE CARD FAMILY (owner's rule, 11 November 2026) ===============================================================
   Every card on the site (section cards, Your own data, My projects, App builder entries, module cards, use case
   cards, the case pickers, Industries, the hubs and My projects) is the one card below: the /learn/ hub's section card
   (20px padding, 18px title, 15px text, 16px corners), the icon and the tags above the title, equal heights in a row,
   the buttons pinned to the bottom. One stylesheet: the shared components (section-cards.js, site-hubs.js,
   site-directory.js, case-picker.js, projects-page.js) carry no card or grid styles of their own.
   Grids: long lists are four across on a wide screen, three on a laptop, two on a tablet, one on a phone, with one gap. A small set (up to five:
   a platform's Learn sections, Your own data with My projects) fills one row with equal columns.
   Visual hierarchy, from the theme's own variables so every theme (light, dark, neon) keeps its contrast:
   --t-heading (titles), --t-text (card titles), --t-text-2 (descriptions), --t-muted (unavailable), --t-on (the accent
   fill) with --t-on-accent (text on it), --t-on-text (the accent as text, fitted to 4.6:1 on every ground by
   themes.js), --t-border and --t-border-strong, --t-surface-2 and --t-surface-3 (muted grounds), --t-card,
   --t-shadow-sm and --t-shadow. */
:root { --sf-card-gap: 16px; --sf-card-edge: color-mix(in srgb, var(--t-on-text) 24%, var(--t-border)); }

/* grids */
/* ONE grid everywhere (owner's rule, 12 November 2026): four across on a wide screen (1500 px and up), three on a laptop,
   two on a tablet, one on a phone; equal heights; one gap. data-sf-lw (site-settings.js) is the width after the zoom. */
.sf-cards, .sc-grid, .pj-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sf-card-gap); margin: 0; padding: 0; align-items: stretch; }
.sc-grid, [data-hub-top] { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }   /* a small set: one row */
@media (max-width: 1499px) {
  .sf-cards, .pj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sf-cards, .sc-grid, .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-grid, [data-hub-top] { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) { .sf-cards, .sc-grid, .pj-grid, [data-hub-top] { grid-template-columns: 1fr; } }
html:is([data-sf-lw="narrow"], [data-sf-lw="tablet"]) :is(.sf-cards, .sc-grid, .pj-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html:is([data-sf-lw="narrow"], [data-sf-lw="tablet"]) :is(.sc-grid, [data-hub-top]) { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-sf-lw="phone"] .sf-cards, html[data-sf-lw="phone"] .sc-grid, html[data-sf-lw="phone"] .pj-grid, html[data-sf-lw="phone"] [data-hub-top] { grid-template-columns: 1fr; grid-auto-flow: row; }

/* the card */
.sf-choice, .pj-card { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; min-width: 0; height: 100%; box-sizing: border-box;
  padding: 20px; border: 1px solid var(--sf-card-edge); border-radius: var(--sf-radius-lg, 16px); background: var(--t-card, var(--t-surface));
  color: var(--t-text-2); box-shadow: var(--t-shadow-sm, none); text-align: left; text-decoration: none; font: inherit; }
a.sf-choice:hover, button.sf-choice:hover, .hub-card:hover, .dir-card:hover, .pj-card:hover {
  border-color: var(--t-on-text); box-shadow: 0 0 0 1px var(--t-on-text), var(--t-shadow, var(--t-shadow-sm, none)); }
.sf-choice-t, .pj-card h3 { display: block; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--t-text); }
.sf-choice-d, .pj-meta { display: block; margin: 0; font-size: 15px; line-height: 1.5; color: var(--t-text-2); }
.sc-card .sc-ico { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--t-surface-2); color: var(--t-on-text); font-size: 22px; line-height: 1; flex: none; }
.sc-card .sc-ico svg { width: 24px; height: 24px; }
.sf-go { margin-top: auto; }

/* tags: small, a muted ground, no border, not clickable */
.sf-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border: 0; border-radius: var(--t-r-pill, 999px);
  background: var(--t-surface-3); color: var(--t-text-2); font: 600 12px/1.2 var(--t-mono, monospace); cursor: default; pointer-events: none; }

/* buttons on a card: one row at the bottom, the first filled, the others outlined in the accent; when their full names
   do not fit, they stack full width in the same order */
.hub-act, .dir-act, .pj-acts { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.hub-act > *, .dir-act > *, .pj-acts > * { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px;
  box-sizing: border-box; padding: 7px 12px; border: 1.5px solid var(--t-on-text); border-radius: 10px; background: transparent;
  color: var(--t-on-text); font: 700 13px/1.2 var(--t-font); text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; }
.hub-act > :first-child, .dir-act > :first-child, .pj-acts > :first-child { background: var(--t-on); border-color: var(--t-on); color: var(--t-on-accent); }
.hub-act > a:hover, .dir-act > :is(a, button):hover, .pj-acts > :is(a, button, label):hover { background: color-mix(in srgb, var(--t-on-text) 14%, transparent); }
.hub-act > a:first-child:hover, .dir-act > :is(a, button):first-child:hover, .pj-acts > :is(a, button):first-child:hover { background: var(--t-on); filter: brightness(1.08); }
.hub-act > :focus-visible, .dir-act > :focus-visible, .pj-acts > :focus-visible { outline: 3px solid var(--t-on-text); outline-offset: 2px; }
/* (20 November 2026, queue item R-58) A CHIP IS NEVER PRINTED OUTSIDE ITS OWN CARD. The row was flex-wrap: nowrap
   with items at flex 1 1 0, and a flex item's min-width defaults to its content, so an Under review chip whose text
   cannot break ("Run in code: Under review", 207px) made the row wider than the card and printed across the next
   card's button. It showed only at the owner's 150% zoom, where the cards are narrow but still above the 380px the
   stacking rule below waits for. Now the row may wrap, an item may shrink, and only the disabled chips break their
   text: the live buttons keep their one-line labels. */
.hub-act, .dir-act, .pj-acts { flex-wrap: wrap; }
.hub-act > *, .dir-act > *, .pj-acts > * { min-width: 0; }
.hub-act > .hub-off, .dir-act > .dir-off, .pj-acts > .pj-off { white-space: normal; overflow-wrap: anywhere; }
@container (max-width: 380px) { .hub-act, .dir-act, .pj-acts { flex-direction: column; } .hub-act > *, .dir-act > *, .pj-acts > * { flex: none; width: 100%; } }

/* Under review: the same size as a live button, a dashed border, faded, a small clock, clearly not available
   (an unavailable control is outside WCAG's text contrast rule; its words stay readable) */
.hub-act > .hub-off, .dir-act > .dir-off, .sf-soon {
  border: 1.5px dashed var(--t-border-strong, var(--t-border)) !important; background: transparent !important; color: var(--t-muted, var(--t-text-2)) !important;
  opacity: .8; cursor: not-allowed; filter: none !important; }
.hub-act > .hub-off::before, .dir-act > .dir-off::before, .sf-soon::before {
  content: ""; width: 12px; height: 12px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.sf-soon { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border-radius: 10px; font: 700 12px/1.2 var(--t-font); align-self: flex-start; margin-top: auto; }
.sf-choice.is-soon { border-style: dashed; box-shadow: none; }

/* text levels */
.page-hero h1 { color: var(--t-heading, var(--t-on-text)); }
.hub-sec > h2, .dir-sec > h2, .sf-cards-group > h2, .cp-group > h2, .pj-platform { font-size: 22px; font-weight: 800; color: var(--t-heading, var(--t-text)); margin: 0 0 12px; }
.hub-sec > h2 a { color: inherit; text-decoration: none; }
.hub-sec > h2 small, .dir-sec > h2 small { font-size: 14px; font-weight: 500; color: var(--t-text-2); }
.hub-sec > h3 { margin: 22px 0 10px; font-size: 18px; font-weight: 800; color: var(--t-heading, var(--t-text)); }
.hub-sec, .dir-sec { margin-block: var(--sf-space-5, 32px) 0; scroll-margin-top: calc(var(--sf-head-top, 0px) + 16px); border-radius: var(--t-r-md, 12px); }
.hub-sec.is-here, .dir-sec.is-here { outline: 2px solid var(--t-on-text); outline-offset: 10px; }

/* platform chips and filters: pills, quieter than buttons; the current one filled */
.hub-toc, .dir-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.hub-toc a, .dir-filters button { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--t-border-strong, var(--t-border)); background: transparent; color: var(--t-text-2); font: 600 13px/1.2 var(--t-font); text-decoration: none; cursor: pointer; }
.hub-toc a:hover, .dir-filters button:hover { color: var(--t-text); border-color: var(--t-on-text); }
.hub-toc a[aria-current], .dir-filters button[aria-pressed="true"] { background: var(--t-on); border-color: var(--t-on); color: var(--t-on-accent); }
.hub-toc a:focus-visible, .dir-filters button:focus-visible { outline: 3px solid var(--t-on-text); outline-offset: 2px; }
.dir-filters button span { opacity: .8; font-weight: 500; margin-left: 4px; }

/* ===== TEXT LEVELS (owner's rule, 12 November 2026): five clearly different colours, all from the theme's own variables =====
   1 page title        the theme's main accent as text      --t-on-text      (4.6:1 on every ground)
   2 section headings  the theme's second accent, bolder    --t-lvl2-text    (themes.js; Neon: violet text)
   3 card titles       the strongest text colour            --t-text
   4 descriptions      the muted text colour, dimmer        --t-muted
   5 labels, counts    muted, small, no border              --t-muted on --t-surface-3
   6 buttons           filled accent; outline in the accent with accent text, never white (.hub-act, .dir-act, .pj-acts, .sf-go)
   Platform chips are a quieter pill (muted text, a border), the current one filled. */
.page-hero h1, .landing .page > h1, main.landing h1, .choice-page h1, #case-root h1, .cl-head h1 { color: var(--t-on-text); font-weight: 800; }
.hub-sec > h2, .dir-sec > h2, .sf-cards-group > h2, .cp-group > h2, .pj-platform, .hub-sec > h3, .mr-section-head h2, .home-sec > h2, .cl-card h2, .cl-hub-section h2 {
  color: var(--t-lvl2-text, var(--t-violet-text, var(--t-on-text))); font-weight: 800; }
.hub-sec > h2 a { color: inherit; }
.hub-sec > h2 small, .dir-sec > h2 small { color: var(--t-muted); }
.sf-choice-t, .pj-card h3 { color: var(--t-text); }
.sf-choice-d, .sf-cards-intro, .page-hero p, .hub-build-lead, .pj-meta, .dir-count { color: var(--t-muted); }
.sf-tag { background: var(--t-surface-3); border: 0; color: var(--t-muted); font-size: 12px; font-weight: 600; }
.sf-tag.live { color: var(--t-emerald-text, var(--t-muted)); }
.sf-tag.review { color: var(--t-amber-text, var(--t-muted)); }
.hub-toc a, .dir-filters button { color: var(--t-muted); }
.hub-toc a:hover, .dir-filters button:hover { color: var(--t-on-text); }
.hub-toc a[aria-current], .dir-filters button[aria-pressed="true"] { color: var(--t-on-accent); }

/* The same text levels in the lesson player and the module pages (owner's rule, 12 November 2026): the slide heading is the page
   title (the accent), the headings inside a slide and in the Interactive and Code panes are section headings (the second
   accent), bold words are the strongest text, and body text is muted. "html" in front beats the lesson stylesheet's own colours. */
html .lt-prose h2 { color: var(--t-on-text); font-weight: 800; }
html .lt-prose h3, html .lt-code-part h3, html .lt-example h3, html .lt-lab-title, html .lt-chat-title { color: var(--t-lvl2-text, var(--t-violet-text, var(--t-on-text))); font-weight: 800; }
html .hk-title, html .hk-cur-h, html .lt-example summary b, html .ll-group-label { color: var(--t-lvl2-text, var(--t-violet-text, var(--t-on-text))); }
html .ll-row label, html .hk-tile-l { color: var(--t-muted); }
html .hk-tile-t, html .ll-row select, html .lt-lab select, html .lt-opt { color: var(--t-text); }   /* values and the chosen option: the strongest text */
html .lt-prose strong, html .lt-prose th { color: var(--t-text); }
html .lt-prose p, html .lt-prose li, html .lt-prose td, html .lt-example p, html .lt-lab-help, html .lt-code-mapping { color: var(--t-muted); }
