/* #2718 — the public site's stylesheet. Tokens only (ADR 0040): every
   colour, radius and spacing is a --tokklr-* variable from tokens.css, so
   the site tracks the apps' palette in light AND dark for free. No
   framework, no CDN — the site promises "no third-party anything" and its
   own stylesheet keeps that promise first. */

* { box-sizing: border-box; }

body.site {
  margin: 0;
  background: var(--tokklr-color-background);
  color: var(--tokklr-color-text);
  font-family: "Geist", system-ui, sans-serif;
  line-height: 1.6;
}

/* Links. Both colours are measured against every ground the site paints behind
   running text, in both themes -- see tests/web/test_site_link_contrast.py.

   `primary-on-cream` now resolves per theme (it was the one token in its family
   with no dark value, so dark mode inherited the cream-ground red and measured
   2.14:1 on a card). Hover deliberately does NOT go to `primary-pressed`: that
   token is a BACKGROUND fill in admin.css, so retuning it for
   text would repaint buttons elsewhere, and at #A84A2D it measures 2.83:1 on
   dark anyway.

   Hover resolves to `text` instead, which is the same move the tier badge below
   already documents: a resolved light/dark pair that clears both ends without a
   theme block here. Reading it as "the link firms up to full text strength on
   hover" is also the honest description of what it looks like. Colour is not
   the only cue either -- prose links keep the browser's underline. */
.site a { color: var(--tokklr-color-primary-on-cream); }
.site a:hover { color: var(--tokklr-color-text); }

.site-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--tokklr-spacing-5);
}

/* --- header --- */
.site-header {
  border-bottom: 1px solid var(--tokklr-color-line);
  background: var(--tokklr-color-surface);
}
.site-header .site-wrap {
  display: flex;
  align-items: center;
  gap: var(--tokklr-spacing-5);
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: var(--tokklr-spacing-2);
  padding-bottom: var(--tokklr-spacing-2);
}
/* The wordmark. It carries NO `color`: it is an <a>, so `.site a` -- a class
   plus a type selector -- outranks this single class and paints it with the
   link colour regardless. The declaration that used to sit here named `text`
   and had never once taken effect, so the rule stated an intent the cascade
   refuses and the site has always rendered the mark in the brand colour.

   Removed rather than promoted to `.site a.site-logo`, which would work but
   would repaint the header. What the site looks like today is what has been
   reviewed; changing it is a design call, not a tidy-up. If the wordmark should
   read as `text`, raising the selector is the one-line way to do it.

   `text-decoration` DOES apply -- `.site a` sets only a colour, so nothing
   outranks it here. */
.site-logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: var(--tokklr-spacing-4);
  flex-wrap: wrap;
  margin-left: auto;
}
.site-nav a {
  text-decoration: none;
  color: var(--tokklr-color-text-muted);
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-2);
  border-radius: var(--tokklr-radius-sm);
}
.site-nav a[aria-current="page"] {
  color: var(--tokklr-color-text);
  background: var(--tokklr-color-primary-soft);
}
.site-nav a.site-signin {
  color: var(--tokklr-color-text);
  border: 1px solid var(--tokklr-color-line-strong);
  border-radius: var(--tokklr-radius-pill);
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-4);
}

/* --- hero --- */
.site-hero .site-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--tokklr-spacing-8);
  align-items: center;
  padding-top: var(--tokklr-spacing-9);
  padding-bottom: var(--tokklr-spacing-9);
}
.site-hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 var(--tokklr-spacing-4);
}
.site-hero p { font-size: 1.15rem; color: var(--tokklr-color-text-muted); }
.site-hero img {
  width: 100%;
  height: auto;
  border-radius: var(--tokklr-radius-xl);
}
.site-store-cta {
  display: inline-block;
  margin-top: var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-6);
  border-radius: var(--tokklr-radius-pill);
  background: var(--tokklr-color-primary);
  color: var(--tokklr-color-text-on-primary);
  text-decoration: none;
  font-weight: 600;
}
/* Raised only to outrank `.site a`, which would otherwise paint the label with
   the link colour. It must repeat the rule above rather than pick a new token:
   this said `surface`, which is #FBF7EE in light -- indistinguishable from
   `text-on-primary`, so it looked correct -- and #1E1A14 in dark, putting
   near-black on the terra fill at 3.38:1.

   Same shape as the link defect this change set is about: a token that flips
   with the theme standing in for one that does not. `text-on-primary` is
   #FBF7EE in both themes and reads 4.79:1 on the fill. */
.site a.site-store-cta { color: var(--tokklr-color-text-on-primary); }
.site-store-soon {
  display: inline-block;
  margin-top: var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-6);
  border-radius: var(--tokklr-radius-pill);
  border: 1px dashed var(--tokklr-color-line-strong);
  color: var(--tokklr-color-text-muted);
}

/* --- bands + cards --- */
.site-band { padding: var(--tokklr-spacing-9) 0; }
.site-band.alt { background: var(--tokklr-color-surface); }
/* The band heading. `h1` is in here because five of the six pages open with
   their page title inside a band rather than the hero, and that title was
   marked up as an `h2`: the document outline started at level 2 and a screen
   reader navigating by heading found no page title at all (WCAG 1.3.1). The
   level moved; the size deliberately did not, so this is a semantic fix with
   no visual change. The hero `h1` on the home page keeps its own larger rule. */
.site-band h1,
.site-band h2 {
  font-size: 1.8rem;
  margin: 0 0 var(--tokklr-spacing-3);
}
.site-band > .site-wrap > p.lede {
  max-width: 640px;
  color: var(--tokklr-color-text-muted);
  margin-top: 0;
}
.site-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tokklr-spacing-6);
  margin-top: var(--tokklr-spacing-6);
}
.site-card {
  background: var(--tokklr-color-surface-elevated);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-lg);
  padding: var(--tokklr-spacing-6);
}

/* --- the six-phase arc on /method (#2718 W10) ---
 *
 * An <ol>, because the order IS the claim: each step adds exactly one new
 * rhythmic or dynamic idea. The default list marker cannot be styled to sit
 * in a badge, so the number is drawn from a counter and the marker is
 * suppressed -- `list-style: none` on an <ol> keeps the semantics for
 * assistive tech while removing the visual marker, which is why the element
 * is still an <ol> rather than a <ul> with numbers typed into the copy. */
/* The arc opens a new section under the page's <h1>, so it is an <h2> by
 * document structure -- it was an <h3> under an <h2> title, and moved with it
 * when the title became the page's real heading. At the default size that put it at 18.7px between 17.6px
 * card headings above and 16.8px step headings below -- a 1.9px step where a
 * section divider should be, so it read as one more card title. Measured on the
 * rendered page. This restores a visible tier between the page heading and the
 * steps without changing the heading level, which stays correct. */
.site-band .site-arc-heading {
  font-size: 1.35rem;
  margin-top: var(--tokklr-spacing-8);
  /* Restores the UA `h3 { margin-block-end: 1em }` this element used to get
     for free. It was an <h3> matching one class rule that declared no
     bottom margin, so 1em (21.6px) fell through. As an <h2> it matches
     `.site-band h1, .site-band h2`, whose `margin` SHORTHAND sets all four
     sides -- and this rule wins font-size and margin-top on specificity but
     is silent on margin-bottom, so the band's 12px applied and the gap
     narrowed by 9.6px.

     Measured, not reasoned about: an adversarial review rendered both trees
     and read getComputedStyle, and every element below the arc heading on
     /method had moved up ~10px. `1em` rather than a literal 1.35rem so it
     stays tied to the font-size above if that is ever retuned. */
  margin-bottom: 1em;
}

.site-arc {
  list-style: none;
  counter-reset: site-arc;
  margin: var(--tokklr-spacing-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--tokklr-spacing-4);
}
.site-arc li {
  counter-increment: site-arc;
  position: relative;
  padding: var(--tokklr-spacing-5) var(--tokklr-spacing-6) var(--tokklr-spacing-5)
    calc(var(--tokklr-spacing-6) * 2 + 1rem);
  background: var(--tokklr-color-surface-elevated);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-lg);
}
.site-arc li::before {
  content: counter(site-arc);
  position: absolute;
  left: var(--tokklr-spacing-5);
  top: var(--tokklr-spacing-5);
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tokklr-color-primary);
  color: var(--tokklr-color-text-on-primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.site-arc h3,
.site-arc h4 { margin: 0 0 var(--tokklr-spacing-2); font-size: 1.05rem; }
.site-arc p { margin: 0; color: var(--tokklr-color-text-muted); }
/* --- block badges (#2718 W11) ---
 *
 * Steven, 2026-08-28: "every little block should have a visual badge in it as
 * well." One per content block, from `contract/graphics/siteBadges`.
 *
 * Sized in rem rather than by the intrinsic pixels: the served PNG is 256px so
 * it stays crisp on a 2x display, and the width/height attributes in the markup
 * are there to reserve the box before it loads, not to size it. Without both,
 * the card reflows as each badge arrives.
 *
 * The panels are transparent with ink linework, which reads on the white card
 * and does NOT read on the dark one, so every badge has a dark twin (cream
 * linework, the dark tokens; #6011), swapped in by the "site art" rules below. */
.site-card-badge {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 var(--tokklr-spacing-4);
}

/* The band variant leads a full-width section rather than a card, so it sits
 * slightly larger and keeps the heading's own top margin. */
.site-band-badge {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 0 var(--tokklr-spacing-3);
}

.site-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: var(--tokklr-radius-md);
  margin-bottom: var(--tokklr-spacing-3);
}

/* The spot above the heading of the sign-in page (the door) and of its check-your-inbox page (the
 * envelope), #6689. An opaque panel on the app's ground, drawn at 160 px (the files are built at
 * twice that), centred over the heading, never wider than the column. The page's card is a raised
 * surface, 8 to 25 levels off the panel's ground, so the panel is clipped to the card's own corner
 * radius instead of left a hard-cornered tile. Like every picture here it is in the markup twice
 * and the "site art" rules below hide the twin that does not apply. */
.site-signin-spot,
.site-spot {
  display: block;
  width: 160px;
  height: 160px;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--tokklr-radius-lg);
  margin: 0 auto var(--tokklr-spacing-4);
}

/* #6711: the same spot, in the same box, is worn by the other `/web` chrome pages: above the
 * heading of the refusal card, the checkout page and the app-pair page (`.site-spot` as a
 * sibling of the heading, like the sign-in ones), and above the one sentence of the four teacher
 * empty states. An empty state is a block of its own (the spot, then the sentence, both centred)
 * so the picture does not float over a left-aligned line; the sentence keeps a reading measure. */
.site-empty { text-align: center; }
.site-empty > p {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- site art: the light and the dark twin (#6011) ---
 *
 * Every picture is in the markup twice (templates/web/_site_art.html). The twin that does not
 * apply is hidden; a lazy image with no box is not fetched, so a visitor should download one set.
 * The choice follows tokens.css exactly: the dark twin shows under a dark system scheme unless
 * an ancestor forces `[data-theme="light"]`, and under an explicit `[data-theme="dark"]`, which
 * beats a light system. These rules only HIDE, so the twin that stays keeps the `display` its
 * own class gives it (`block` for the badges, the default for a card image). */
:root[data-theme="light"] .site-art-dark,
:root[data-theme="dark"] .site-art-light {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-art-light {
    display: none;
  }
}
@media not all and (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) .site-art-dark {
    display: none;
  }
}

/* The hero is the one eager image, so it is a <picture> (the system scheme costs one early
 * request) and the two lazy twins after it exist for an explicit `data-theme` only. `contents`
 * keeps the <picture> out of the grid, so the <img> inside it is the grid item it always was.
 * An explicit theme hides the <picture> and shows the twin that matches it. */
.site-art-os { display: contents; }
.site-art-forced { display: none; }
:root[data-theme="light"] .site-art-os,
:root[data-theme="dark"] .site-art-os {
  display: none;
}
:root[data-theme="light"] .site-art-forced.site-art-light,
:root[data-theme="dark"] .site-art-forced.site-art-dark {
  display: block;
}
/* Card heading. Both levels, one size: the home page's cards sit under an
   h2 section heading and stay h3, while the pages whose title moved to h1
   promoted theirs to h2. The level follows the outline, the size does not. */
.site-card h2,
.site-card h3 { margin: 0 0 var(--tokklr-spacing-2); font-size: 1.1rem; }
.site-card p { margin: 0; color: var(--tokklr-color-text-muted); }

/* --- the two tier tables share one column grid (#2718 W9) ---
 *
 * The price table and the comparison below it are read as ONE grid: you look
 * down a tier's column to see what that money buys. Both were `width: 100%`
 * already and STILL did not line up, because `table-layout` defaults to `auto`
 * and each table sized its own columns to its own content -- the price table's
 * label column is "Solo / 1 seat" and the comparison's is a feature sentence,
 * so the tier columns started at different x positions in each.
 *
 * `table-layout: fixed` plus one shared column grid is the fix, and the widths
 * live HERE rather than on either table so changing one cannot desynchronise
 * them. The four widths must total 100%. */
.site-tiertable { width: 100%; table-layout: fixed; }
.site-tiertable-label { width: 34%; }
.site-tiertable-tier { width: 22%; }

/* Each tier table sits in a `.site-table-scroll` region (#4159). On a phone the
 * released grid below still needs more than the screen (the comparison's minimum
 * is 435px in English and 516px in German), and a table that nothing scrolls sets
 * the width of the whole page: at 390px the Complete column ran 125 to 142px past
 * the edge in German, Dutch and French.
 *
 * The region takes over the table's top margin and gives up the bottom margin the
 * shared rule gives it, so at desktop width the page lays out as it did when the
 * table stood alone: same gap above the table, same gap to the offer line under
 * it. The compound selector is for source order, since `.site-table-scroll` comes
 * 700 lines further down and a single class would lose to it. */
.site-table-scroll.site-tiertable-scroll { margin: var(--tokklr-spacing-6) 0 0; }
.site-tiertable-scroll > .site-tiertable { margin-top: 0; }

/* --- pricing table --- */
.site-pricing {
  border-collapse: collapse;
  margin-top: var(--tokklr-spacing-6);
  background: var(--tokklr-color-surface-elevated);
  border-radius: var(--tokklr-radius-lg);
  overflow: hidden;
}
.site-pricing th, .site-pricing td {
  padding: var(--tokklr-spacing-4);
  text-align: left;
  border-bottom: 1px solid var(--tokklr-color-line);
}
.site-pricing th { background: var(--tokklr-color-surface); }
.site-pricing td.price { font-weight: 600; white-space: nowrap; }

/* --- the two cadences in one cell (#2836 slice 3) ---
 *
 * The monthly price leads and the yearly one sits under it, because a reader
 * scanning the table is comparing plans at one cadence, not cadences within a
 * plan. `display: block` on both so the cell stacks without a <br> the screen
 * reader would announce as nothing.
 *
 * The offer sentence is NOT in the cell. It is the fixed line, not a computed
 * per-month equivalent -- there is no such figure anywhere on this page -- and
 * it is said once under the whole table (#3558's ruling, carried to the web),
 * where it can wrap as the sentence it is instead of nine times inside a 22%
 * column. */
.site-pricing .price-month,
.site-pricing .price-year { display: block; }
.site-pricing .price-year { color: var(--tokklr-color-text-muted); }
.site-pricing-yearly-note {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--tokklr-color-text-muted);
}

/* --- free of charge, for everyone (#2718 W9) ---
 *
 * Rendered ABOVE the tier table and outside it. The tuner, the metronome and
 * the starter lessons cost nothing to anybody, and a tick in a tier column is
 * a claim about what a subscription buys -- so these must not live in that
 * table at all. */
.site-free {
  list-style: none;
  /* The bottom margin is load-bearing, not rhythm: with `0` the cards sat
   * flush against the next <h2>, measured at exactly 0px against 58px of
   * clearance everywhere else on the page, so the free block read as a
   * heading for the tier table rather than as its own section. */
  margin: var(--tokklr-spacing-6) 0 var(--tokklr-spacing-8);
  padding: 0;
  display: grid;
  gap: var(--tokklr-spacing-3);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
/* The badge sits beside the text rather than above it: these items are one
 * short line each, and a stacked badge would make three tall boxes out of
 * three short ones for no gain. `align-items: center` keeps the pairing level
 * when a translation wraps to two lines. */
.site-free li {
  display: flex;
  align-items: center;
  gap: var(--tokklr-spacing-4);
  padding: var(--tokklr-spacing-4);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-md);
  background: var(--tokklr-color-surface-elevated);
  font-weight: 600;
}

/* --- the feature comparison (#2718 W6/W7) ---
 *
 * These three classes shipped in W6 with NO RULE ANYWHERE, which an
 * adversarial pass caught by looking at the rendered page rather than its
 * markup. The consequences were all invisible to the suite:
 *   - `.site-visually-hidden` did nothing, so the screen-reader label beside
 *     each mark printed on screen: every cell read "checkmark Included";
 *   - the <caption>, meant for assistive tech only, rendered as visible
 *     centred text above the table;
 *   - the table itself had no chrome at all, sitting unstyled directly under
 *     the fully styled price table above it.
 * The comparison reuses the price table's proven chrome rather than inventing
 * its own, so the two read as siblings. */
.site-compare {
  border-collapse: collapse;
  margin-top: var(--tokklr-spacing-6);
  background: var(--tokklr-color-surface-elevated);
  border-radius: var(--tokklr-radius-lg);
  overflow: hidden;
}
.site-compare th, .site-compare td {
  padding: var(--tokklr-spacing-4);
  text-align: left;
  border-bottom: 1px solid var(--tokklr-color-line);
  vertical-align: top;
}
.site-compare thead th { background: var(--tokklr-color-surface); }
/* The ticks sit LEFT, under their left-aligned column headers.
 *
 * This rule used to say `text-align: center` and never once did it: `.site-compare td`
 * is a two-part selector and outranks this single class, so every tick has
 * always rendered left. Measured rather than assumed -- computed `text-align`
 * on a tick cell reads `left`.
 *
 * Left is also the right answer now that the column grid is fixed and the
 * course row carries sentences: a centred tick under a left-aligned header,
 * beside left-aligned copy, is the one that would look misplaced. So the
 * declaration is removed rather than given the specificity to win. */
.site-compare-cell {
  font-weight: 600;
  white-space: nowrap;
}

/* The course-depth row (#2718 W9). It is the row the table exists for -- the
 * course is SPLIT across the tiers -- so it leads the table and carries real
 * copy per tier instead of a tick. Text cells must undo two things the tick
 * cells set: `white-space: nowrap`, which would force a sentence onto one
 * line and blow the fixed column grid apart, and the centring, which makes
 * multi-line copy hard to scan. */
.site-compare-text {
  /* `white-space` is the one that matters: it must beat the tick cells'
   * `nowrap`, and does so on source order at equal specificity, because the
   * text cells carry both classes. Without it a sentence stays on one line and
   * bursts the fixed column grid. */
  white-space: normal;
  font-weight: 400;
}
.site-compare-depth th[scope="row"], .site-compare-depth .site-compare-text {
  background: var(--tokklr-color-surface);
}
.site-compare-depth th[scope="row"] { font-weight: 700; }

/* The canonical clip-rect pattern: removed from the visual flow without being
 * removed from the accessibility tree, which `display: none` would do. */
.site-free-badge {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
}

/* `.tokklr-visually-hidden` is the Studio stylesheet's name for the same thing, and
 * three teacher tables carry it on a column header (#3989). It stays in the
 * markup because the Studio renders it too; on this chrome it gets this rule. */
.site-visually-hidden,
.site-app .tokklr-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- footer --- */
.site-footer {
  border-top: 1px solid var(--tokklr-color-line);
  padding: var(--tokklr-spacing-7) 0;
  color: var(--tokklr-color-text-muted);
  font-size: 0.95rem;
}
.site-footer .site-wrap {
  display: flex;
  gap: var(--tokklr-spacing-5);
  flex-wrap: wrap;
  justify-content: space-between;
}
/* `flex-wrap` here is not tidiness, it is the fix for a live defect.
 *
 * The footer carries the locale switcher: seven links, one per supported
 * locale. As a non-wrapping flex row that is 521px of content, so on a 375px
 * phone it pushed the document to 521px and EVERY page on the site scrolled
 * sideways -- the header nav already wrapped, so nothing else gave it away.
 * Measured on the rendered page at the mobile preset; `test_site_stylesheet_
 * covers_its_markup.py` pins it. Adding an eighth locale must not reintroduce
 * this, which is why the rule is on the container rather than a media query
 * tuned to seven. */
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--tokklr-spacing-4); }

/* #2853 — the locale picker is a disclosure, so the footer carries ONE control
 * instead of seven links. That is what actually retires the 521px overflow the
 * rule above was written for; the rule stays because the legal nav beside it is
 * still a wrapping row.
 *
 * `position: relative` on the details and `absolute` on the panel keep the open
 * panel out of flow, so opening it cannot reflow the footer or push the page. */
.site-langpicker { position: relative; }
.site-langpicker > summary {
  cursor: pointer;
  list-style: none;
  color: var(--tokklr-color-text-muted);
}
.site-langpicker > summary::-webkit-details-marker { display: none; }
.site-langpicker > summary::after { content: " \25BE"; }
.site-langpicker[open] > summary::after { content: " \25B4"; }
.site-langpicker-panel {
  position: absolute;
  bottom: 100%;
  inset-inline-start: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--tokklr-spacing-2);
  padding: var(--tokklr-spacing-4);
  margin-block-end: var(--tokklr-spacing-2);
  background: var(--tokklr-color-surface);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-md);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .site-hero .site-wrap { grid-template-columns: 1fr; }
  .site-cols { grid-template-columns: 1fr; }

  /* The shared column grid is a DESKTOP device, and on a phone it was actively
   * harmful. `table-layout: fixed` with 22% tier columns gives each one about
   * 74px at 375px wide, and `td.price` carries `white-space: nowrap`, so
   * "10.99 per month" could not fit: the three prices overlapped each other and
   * the Complete column was clipped away entirely. Introduced by the W9 change
   * that aligned the two tables, and invisible to every structural test.
   *
   * Aligning the two tables cannot work at this width anyway, so the fixed grid
   * is released and the content sizes the columns again. */
  .site-tiertable { table-layout: auto; }
  .site-pricing td.price { white-space: normal; }
  .site-pricing th, .site-pricing td,
  .site-compare th, .site-compare td { padding: var(--tokklr-spacing-3); }

  /* 15rem is wider than a 375px viewport can give a grid track once the wrap's
   * padding is taken, so `auto-fit` could not fall back to one column and the
   * page scrolled sideways. */
  .site-free { grid-template-columns: 1fr; }
}

/* The tier badge on a feature card. Offline downloads are entitled to the
   Complete tier alone; every other card in that list is on every plan, so a
   flat list read as though this one was too.

   The wash carries the hue and `text` carries the words, and that pairing is
   measured rather than chosen: `text` is a resolved light/dark pair and clears
   both ends (about 15:1 light, 10.9:1 dark) with no theme block needed here.

   This note used to add that `primary-on-cream` measured 2.48:1 here in dark
   mode -- true, and the exact defect #1793 spent a sweep removing. But the fix
   landed on this one badge while `.site a` kept the same token for every link
   on the site, so the note read as a closed defect while the general case went
   on shipping. The token now carries a dark value of its own, and the guard in
   tests/web/test_site_link_contrast.py measures every ground rather than the
   page background alone. That is the part that makes the next fix general
   instead of local. */
.site-tier-badge {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--tokklr-color-primary-soft);
  color: var(--tokklr-color-text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- the contact form + page CTAs (#2718 W6/W7) ---
 *
 * Every class below was referenced by markup that shipped with NO RULE. The
 * consequences ranged from cosmetic to a silent data loss:
 *
 *   .site-hp is the HONEYPOT. Unstyled it renders as a visible "Website" input
 *   on a public contact form, and the server treats a filled honeypot as a bot
 *   and discards the message while answering exactly like success. A real
 *   visitor who filled it would have been told their message was on its way and
 *   it would have gone nowhere. That is the whole defect class this block
 *   exists to close, and it is why the guard beside it scans templates for
 *   classes no stylesheet defines. */
.site-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-narrow { max-width: 46rem; }
/* The teacher portal's column (#3989). Reading width is right for a form and a
 * paragraph and wrong for a roster of six columns, two of them forms. 72rem is
 * the width at which that table fits at 1200px with no scrollbar; narrower
 * screens fall back to the table's own scroll wrapper, never to the page's. */
.site-wide { max-width: 72rem; }

/* The contact form is a PANEL, not loose inputs on the page ground (#2718 W9).
 *
 * It previously rendered as unbordered fields floating directly on the body
 * background with no focus treatment beyond the browser default -- the only
 * form on the site, and the one surface where a visitor is asked to type. It
 * now sits in the same elevated card the tables use, so the page reads as one
 * design system rather than a styled marketing site with a plain form stapled
 * to the end of it. */
.site-form {
  display: grid;
  gap: var(--tokklr-spacing-2);
  margin-top: var(--tokklr-spacing-6);
  padding: var(--tokklr-spacing-6);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-lg);
  background: var(--tokklr-color-surface-elevated);
}
.site-form label {
  font-weight: 600;
  margin-top: var(--tokklr-spacing-4);
}
/* The first label would otherwise push a gap between the card's top padding
 * and its own content, doubling the space above the first field only. */
.site-form label:first-of-type { margin-top: 0; }
.site-form input, .site-form textarea {
  width: 100%;
  padding: var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line-strong);
  border-radius: var(--tokklr-radius-md);
  background: var(--tokklr-color-surface);
  color: var(--tokklr-color-text);
  font: inherit;
}
.site-form textarea { resize: vertical; min-height: 9rem; }
/* A visible, token-coloured focus ring on every control. The browser default
 * is the accessibility floor, not a design, and on a dark surface it is close
 * to invisible. `:focus-visible` so a mouse click does not draw one. */
.site-form input:focus-visible, .site-form textarea:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
  border-color: var(--tokklr-color-primary);
}
.site-form > p:last-child {
  margin: var(--tokklr-spacing-5) 0 0;
  color: var(--tokklr-color-text-muted);
}

.site-cta {
  justify-self: start;
  margin-top: var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-6);
  border: 0;
  border-radius: var(--tokklr-radius-pill);
  background: var(--tokklr-color-primary);
  color: var(--tokklr-color-text-on-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.site-cta:hover { filter: brightness(1.08); }
.site-cta:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 3px;
}

.site-note {
  margin-top: var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-4);
  border-radius: var(--tokklr-radius-md);
  border-left: 4px solid var(--tokklr-color-line-strong);
  background: var(--tokklr-color-surface-elevated);
}
.site-note-ok { border-left-color: var(--tokklr-color-primary); }
.site-note-warn { border-left-color: var(--tokklr-color-danger); }

.site-mail-line { margin-top: var(--tokklr-spacing-6); }
.site-mail { font-weight: 600; }

.site-pricing-cta { margin-top: var(--tokklr-spacing-6); }
.site-teacher-ctas { display: flex; flex-wrap: wrap; gap: var(--tokklr-spacing-4); align-items: center; }
.site-teacher-contact { color: var(--tokklr-color-primary); font-weight: 600; }

/* --- the pages that used to wear Pico (#3475) ---
 *
 * Steven, 2026-09-06: *"privacy, legal and the sign in page all have different
 * layouts and styling than the actual primary website, and i want that to be
 * fixed, the primary site has the proper styling. the administrative backend is
 * different, and thats good, its currently fine as it is, but the marketing
 * theme should be visible on all frontend accessible pages."*
 *
 * The six marketing pages write their own markup against the classes above.
 * The pages that moved here do not: they are forms, cards, definition lists and
 * rendered Markdown, and every one of those elements was styled by PicoCSS,
 * which is class-less and styles bare tags. So this section does the same job
 * for the elements those pages actually use, in the site's tokens.
 *
 * EVERYTHING IS SCOPED TO `.site-app`, which only `site_app_base.html` and
 * `site_doc_base.html` set. That is deliberate: the six marketing pages must
 * render byte-identically after this block as before it, and a bare `input` or
 * `article` rule in this file could not promise that. It also means the two
 * chromes cannot drift into styling the same element two ways.
 *
 * SPECIFICITY. `.site a` is (0,1,1) and outranks any single-class rule, which
 * the links section above already documents. Every link rule below therefore
 * carries `.site-app` as well, or it would lose to a rule 600 lines up.
 */

/* The footer sits at the BOTTOM on a short page. The six marketing pages are
 * all taller than a viewport, so the site never needed this and does not get it
 * here either -- the rule is scoped to `.site-app`, whose pages are mostly
 * short. Measured in headless Chromium at 1200x900 on `/legal` with one
 * document published: the card ended at row 302, the footer's top border landed
 * at row 360, its last ink at row 413, and 486 of the window's 900 pixels were
 * empty ground below it. A bordered footer floating in the middle of the window
 * reads as a page that failed to finish loading, on the page a store reviewer
 * is handed. With this rule the same page puts that border at row 811. `flex: 1 0 auto` on <main> so it grows into the slack and never
 * shrinks below its content. */
body.site-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.site-app > main { flex: 1 0 auto; }

/* The page panel. Every moved template's content is one `<article>` -- the card
 * idiom they inherited from Pico -- and it lands inside
 * `.site-band > .site-wrap.site-narrow`, so this is the elevated surface the
 * marketing cards and tables already use, at reading width. */
.site-app main article {
  background: var(--tokklr-color-surface-elevated);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-lg);
  padding: var(--tokklr-spacing-7);
  /* A word longer than the line breaks instead of widening the page (#4159). The
   * legal documents are the pages that need it: at 320px the German title word
   * "Datenschutzerklärung" ended at 357px, the Belgian authority's name in the
   * other six policies at 322px, and each bare address in the terms at 552px,
   * and an address has no space to break at. `break-word` rather than `anywhere`:
   * a long word still moves to its own line first, and the panel is a block with a
   * definite width, so the min-content size `anywhere` would also change is not in
   * play. */
  overflow-wrap: break-word;
}
/* Pico gave `article > header` a sunk band; the site's vocabulary for "this is
 * the title block" is a rule, not a second surface. */
.site-app main article > header {
  margin: 0 0 var(--tokklr-spacing-6);
  padding-bottom: var(--tokklr-spacing-5);
  border-bottom: 1px solid var(--tokklr-color-line);
}
.site-app main article > header > :last-child { margin-bottom: 0; }
.site-app main article > footer {
  margin-top: var(--tokklr-spacing-7);
  padding-top: var(--tokklr-spacing-5);
  border-top: 1px solid var(--tokklr-color-line);
  color: var(--tokklr-color-text-muted);
}
/* The legal document page wraps its prose in an `<article>` and its version /
 * language footer OUTSIDE it, so that the alias and the canonical URL compare
 * equal (see legal_document.html). Give that footer the same treatment. */
.site-app main > .site-band > .site-wrap > div > footer,
.site-app main section > footer {
  margin-top: var(--tokklr-spacing-6);
  color: var(--tokklr-color-text-muted);
}
.site-app main article > *:first-child { margin-top: 0; }
.site-app main article > *:last-child { margin-bottom: 0; }

/* A heading step inside the panel. `.site-band h1, .site-band h2` sets BOTH to
 * 1.8rem, which is right for a marketing band whose h2 is the page title and
 * wrong here, where the h1 is the page title and the h2s below it open
 * subsections. Two classes beat that rule's one. */
.site-app main article h2 {
  font-size: 1.25rem;
  margin: var(--tokklr-spacing-7) 0 var(--tokklr-spacing-3);
}
.site-app main article h3 {
  font-size: 1.05rem;
  margin: var(--tokklr-spacing-6) 0 var(--tokklr-spacing-2);
}
.site-app main article section { margin-top: var(--tokklr-spacing-6); }

/* ---- forms.
 *
 * These pages type credentials, one-time codes and promo codes into bare
 * `<input>`s wrapped in `<label>`s -- the class-less shape Pico styled. The
 * declarations mirror `.site-form` above property for property, so the contact
 * form and the sign-in form are the same control, not two that look alike. */
.site-app form { margin: 0 0 var(--tokklr-spacing-5); }
.site-app label {
  display: block;
  font-weight: 600;
  margin-top: var(--tokklr-spacing-4);
}
.site-app form > label:first-of-type,
.site-app fieldset > label:first-of-type { margin-top: 0; }
.site-app input[type="text"],
.site-app input[type="email"],
.site-app input[type="password"],
.site-app input[type="number"],
.site-app input[type="tel"],
.site-app input[type="url"],
.site-app input[type="search"],
.site-app select,
.site-app textarea {
  width: 100%;
  margin-top: var(--tokklr-spacing-2);
  padding: var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line-strong);
  border-radius: var(--tokklr-radius-md);
  background: var(--tokklr-color-surface);
  color: var(--tokklr-color-text);
  font: inherit;
}
.site-app textarea { resize: vertical; min-height: 9rem; }
/* A checkbox or a radio is not a text field: `width: 100%` and 12px of padding
 * on one is a stretched grey slab with a tick lost in the middle of it. The
 * sign-up page's consent box and the checkout page's plan radios are both this
 * shape. */
.site-app input[type="checkbox"],
.site-app input[type="radio"] {
  width: auto;
  margin: 0 var(--tokklr-spacing-2) 0 0;
  accent-color: var(--tokklr-color-primary);
}
.site-app label:has(> input[type="checkbox"]),
.site-app label:has(> input[type="radio"]) { font-weight: 400; }
/* A visible, token-coloured focus ring on every control. The browser default is
 * the accessibility floor, not a design, and on a dark surface it is close to
 * invisible. `:focus-visible` so a mouse click does not draw one. */
.site-app input:focus-visible,
.site-app select:focus-visible,
.site-app textarea:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
  border-color: var(--tokklr-color-primary);
}
.site-app fieldset {
  margin: 0 0 var(--tokklr-spacing-5);
  padding: 0;
  border: 0;
}
.site-app legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: var(--tokklr-spacing-2);
}
/* The field hint under an input -- `<small>` after the control, which Pico
 * blockified and muted. */
.site-app form small { display: block; color: var(--tokklr-color-text-muted); }

/* ---- buttons.
 *
 * `.site-cta` is the marketing button and these are the same control, so the
 * declarations are its. `a[role="button"]` is in the list because three moved
 * pages use that shape for a primary action, and it has to beat `.site a`. */
.site-app button,
.site-app input[type="submit"],
.site-app a[role="button"] {
  display: inline-block;
  margin-top: var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-6);
  border: 1px solid transparent;
  border-radius: var(--tokklr-radius-pill);
  background: var(--tokklr-color-primary);
  color: var(--tokklr-color-text-on-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.site-app button:hover,
.site-app input[type="submit"]:hover,
.site-app a[role="button"]:hover {
  filter: brightness(1.08);
  color: var(--tokklr-color-text-on-primary);
}
.site-app button:focus-visible,
.site-app input[type="submit"]:focus-visible,
.site-app a[role="button"]:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 3px;
}
/* `secondary` and `outline` are Pico's class names and four moved templates
 * carry them on the actions that are NOT the page's primary one -- cancel,
 * delete, sign out. They must stay visually secondary now that Pico is gone,
 * or a delete button reads as the thing to press. Both are drawn from the text
 * tokens rather than a fill, so neither needs a text-on-* pair. */
.site-app button.secondary,
.site-app button.outline {
  background: transparent;
  border-color: var(--tokklr-color-line-strong);
  color: var(--tokklr-color-text);
}
.site-app button.secondary:hover,
.site-app button.outline:hover {
  background: var(--tokklr-color-surface-sunk);
  color: var(--tokklr-color-text);
  filter: none;
}

/* ---- notices.
 *
 * Twenty-seven `role="alert"` / `role="status"` / `role="note"` paragraphs
 * across the moved pages: soft-fail messages, confirmations and the QR panel's
 * live region. They reuse `.site-note`'s shape so a notice looks the same
 * wherever a reader meets one. */
.site-app main p[role="alert"],
.site-app main p[role="status"],
.site-app main p[role="note"] {
  padding: var(--tokklr-spacing-4);
  border-radius: var(--tokklr-radius-md);
  border-left: 4px solid var(--tokklr-color-line-strong);
  background: var(--tokklr-color-surface);
}
.site-app main p[role="alert"] { border-left-color: var(--tokklr-color-danger); }
.site-app main p[role="status"] { border-left-color: var(--tokklr-color-primary); }
/* The QR panel's status line is a live region that is EMPTY until the poll
 * says something. An empty bordered box on first paint is a rendering artefact,
 * not a notice. */
.site-app main p[role="alert"]:empty,
.site-app main p[role="status"]:empty { display: none; }
/* The one class-based error box the moved pages use, ported from admin.css so
 * it does not resolve to nothing here. */
.site-app .tokklr-form-errors {
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-4);
  border-radius: var(--tokklr-radius-sm);
  border-left: 4px solid var(--tokklr-color-danger);
  background: var(--tokklr-color-surface);
}
.site-app .tokklr-form-errors ul { margin: var(--tokklr-spacing-1) 0 0; }
.site-app .tokklr-muted { color: var(--tokklr-color-text-muted); }
/* `.tokklr-authform` is the credential form, and it is the reason this whole
 * block exists rather than a rename: the class is asserted by
 * `test_auth_form_styling.py` and its declarations lived in `style.css`, which
 * these pages no longer load. The field rules above already cover its inputs;
 * this is the spacing the class itself carried. */
.site-app .tokklr-authform { margin-bottom: var(--tokklr-spacing-6); }

/* ---- structured content: definition lists, tables, code, rules.
 *
 * The subscription panel is a `<dl>`, the legal prose is rendered Markdown that
 * may contain a table at any time, and the recovery codes, the TOTP manual key
 * and the pairing code are all `<code>`. Pico styled every one of these. */
.site-app dl { margin: 0; }
.site-app dt { font-weight: 600; color: var(--tokklr-color-text-muted); }
.site-app dd { margin: 0 0 var(--tokklr-spacing-3); }
.site-app main table { width: 100%; border-collapse: collapse; }
.site-app main th,
.site-app main td {
  padding: var(--tokklr-spacing-3);
  border-bottom: 1px solid var(--tokklr-color-line);
  text-align: start;
}
.site-app main thead th { background: var(--tokklr-color-surface); }
.site-app main code {
  padding: 0 var(--tokklr-spacing-1);
  border-radius: var(--tokklr-radius-xs);
  background: var(--tokklr-color-surface-sunk);
  color: var(--tokklr-color-text);
  font-family: ui-monospace, "SFMono-Regular", "Geist Mono", Menlo, monospace;
  font-size: 0.9em;
}
.site-app main hr {
  border: 0;
  border-top: 1px solid var(--tokklr-color-line);
  margin: var(--tokklr-spacing-6) 0;
}
.site-app main blockquote {
  margin: var(--tokklr-spacing-5) 0;
  padding-inline-start: var(--tokklr-spacing-5);
  border-inline-start: 4px solid var(--tokklr-color-line-strong);
  color: var(--tokklr-color-text-muted);
}
/* The `<details>` behind the sign-in page's user-id + PIN fields. It is not the
 * footer's language picker, so it gets the ordinary disclosure treatment rather
 * than that one's absolute panel. */
.site-app main details {
  margin: var(--tokklr-spacing-4) 0;
  padding: var(--tokklr-spacing-4);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-md);
  background: var(--tokklr-color-surface);
}
.site-app main details > summary { cursor: pointer; font-weight: 600; }

/* ---- the QR panels (ADR 0156 / Q91, and the TOTP enrolment QR).
 *
 * `.tokklr-qr` is set by `qr_code.py` on the SVG it renders, and it is that
 * SVG's ONLY size constraint: without it a fixed-width symbol overflows a
 * phone. `[data-qr-code]` is the same code in text, always shown beside the
 * picture for a reader with no camera. Both were in `style.css`. */
.site-app .tokklr-qr {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--tokklr-radius-md);
}
.site-app [data-qr-code] {
  font-family: ui-monospace, "SFMono-Regular", "Geist Mono", Menlo, monospace;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: var(--tokklr-spacing-2) 0;
}
.site-app [data-qr-code]:empty { display: none; }

/* ---- the /web footer's two switcher forms.
 *
 * The marketing footer's language control is a disclosure of links, because
 * there the locale is in the path. On /web it is a cookie, so the control has
 * to POST -- and a `<select>` in a footer must not inherit the full-width field
 * treatment the page body's controls get. */
.site-app .site-switchers { display: flex; flex-wrap: wrap; gap: var(--tokklr-spacing-4); }
.site-app .site-switchers form { display: flex; align-items: center; margin: 0; }
.site-app .site-switchers select {
  width: auto;
  margin: 0;
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-2);
  font-size: 0.95rem;
}
/* #4141 -- the button is what applies the select, and nothing else does: an arrow key
 * on a closed select fires `change`, so a select that posted on change failed WCAG
 * 3.2.2. It is a secondary control in the footer, so it is drawn like the select it
 * sits beside (outlined, the same height) and not as the primary pill every other
 * button on the page is. `color` is set again on :hover because the rule for a
 * button's hover would otherwise paint white text on this transparent fill. */
.site-app .site-switchers button {
  margin: 0 0 0 var(--tokklr-spacing-2);
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-3);
  font-size: 0.95rem;
  background: transparent;
  border-color: var(--tokklr-color-line-strong);
  color: var(--tokklr-color-text);
}
.site-app .site-switchers button:hover {
  background: var(--tokklr-color-surface-sunk);
  color: var(--tokklr-color-text);
  filter: none;
}

/* ---- the teacher portal (#3989).
 *
 * Steven, 2026-09-24: *"all the pages that are accessible from the dashboard
 * backend should receive the frontend marketing layout except for the authoring
 * studio, which has its own."*
 *
 * Three groups below: the sub-navigation the portal adds, the scroll wrapper that
 * keeps a table from widening a phone, and the classes the pages brought with them
 * from Pico. Those last lived in `admin.css` and `style.css`, which this chrome
 * does not load, so on the first render of a moved page the cards, chips and
 * links they style were bare. Each keeps its NAME, because the Authoring Studio
 * renders several of them from the same macros and partials, and gets a rule
 * scoped to `.site-app`, which the Studio never loads: the Studio is unchanged.
 *
 * Every colour is a token. No raw value is declared, so dark mode, forced or
 * from the system, cannot meet a white panel.
 */

/* The sub-navigation. A wrapping row, so nine entries and a button become a
 * taller bar on a phone and never a wider page. */
.site-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tokklr-spacing-3) var(--tokklr-spacing-5);
  margin: 0 0 var(--tokklr-spacing-6);
  padding-bottom: var(--tokklr-spacing-4);
  border-bottom: 1px solid var(--tokklr-color-line);
}
.site-subnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tokklr-spacing-1) var(--tokklr-spacing-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The header nav's treatment: muted until it is the page you are on. `.site a`
 * is (0,1,1) and this is too, so source order, which puts this later, decides. */
.site-subnav a {
  display: inline-block;
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-3);
  border-radius: var(--tokklr-radius-sm);
  color: var(--tokklr-color-text-muted);
  text-decoration: none;
}
.site-subnav a:hover { color: var(--tokklr-color-text); }
/* Weight as well as tint: the current page must not rest on colour alone. */
.site-subnav a[aria-current="page"] {
  color: var(--tokklr-color-text);
  background: var(--tokklr-color-primary-soft);
  font-weight: 600;
}
.site-subnav a:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
}
.site-app .site-subnav form { margin: 0; }
.site-app .site-subnav button {
  margin: 0;
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-4);
  font-size: 0.95rem;
}

/* A phone scrolls the table, not the page. The marketing stylesheet gives a table
 * `width: 100%` and no overflow rule, and the roster's has six columns, so at 375px
 * it was 603px wide and the whole document panned, header included. The wrapper is
 * the only element that scrolls; the table keeps its natural width inside it. */
.site-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 var(--tokklr-spacing-4);
  /* The containing block for the visually hidden column headers inside. Those are
   * `position: absolute`, and an absolute box is clipped only by an ancestor that is
   * its containing block, which an overflow container that is not positioned is not:
   * the Clear header on the pinned page sat at the far end of the scrolled table and
   * widened the whole page to 402px at 375, with every other wrapper working. */
  position: relative;
}
/* A region a keyboard can land on has to show it has (#4159). The browser's own ring is
 * the accessibility floor, not a design, and on the dark surface it is close to
 * invisible, which is the reason the controls above each draw theirs. `:focus-visible`,
 * so a click or a touch does not draw one. */
.site-table-scroll:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
}
/* Controls inside a cell are table furniture, not page furniture: the field and
 * button rules above give them a full-width box and a 20px lead-in, which turns a
 * row of text into a row of forms. A text field cannot be compressed to nothing by
 * the table, so it carries a floor, and the table scrolls before the field collapses. */
.site-table-scroll td form,
.site-table-scroll th form { margin: 0; }
.site-table-scroll td label { margin-top: 0; }
.site-table-scroll td input[type="text"],
.site-table-scroll td input[type="number"],
.site-table-scroll td select {
  min-width: 8rem;
  margin-top: 0;
  padding: var(--tokklr-spacing-2) var(--tokklr-spacing-3);
}
.site-table-scroll td button {
  margin-top: var(--tokklr-spacing-2);
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-4);
  font-size: 0.9rem;
  white-space: nowrap;
}
/* A date that wraps to three lines ("12 / September / 2026") is a row three lines
 * tall for the sake of one cell; the table scrolls before the date breaks. */
.site-table-scroll time { white-space: nowrap; }
/* An email address has no space to break at, and a school's are long
 * ("firstname.lastname@students.some-conservatory.example" is 55 characters), so it
 * was the cell that decided whether the roster fitted at 1200px. It may break
 * anywhere, but only down to a floor: with none the table, once it overflows,
 * gives the column its smallest width, which for text that can break anywhere is
 * one character, and a phone would scroll a column of single letters. */
.site-table-scroll .site-table-email {
  min-width: 12rem;
  overflow-wrap: anywhere;
}
.site-table-scroll td ul { margin: 0; padding-inline-start: var(--tokklr-spacing-5); }

/* The roster's seat marker (Epic 35 slice 3, S8): a small outlined label beside a student's
 * name that names the plan a seat of the class gives them, and nothing more. It is a note on
 * the row, not a status, so it is drawn muted and never in a warning colour. */
.tokklr-seat-marker {
  display: inline-block;
  margin-inline-start: var(--tokklr-spacing-3);
  padding: 0 var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-pill);
  color: var(--tokklr-color-text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* A form on a wide page is not a wide form: 100% of 72rem is a text box a
 * thousand pixels across. Forms in a table cell are the table's to size. */
.site-wide article form { max-width: 36rem; }
.site-wide article td form,
.site-wide article th form { max-width: none; }

/* The back link, `_backlink.html` (#2853): one small link at the top left of
 * every page. Defined in no stylesheet before this one, on any chrome. */
.site-app .tokklr-backlink {
  margin: 0 0 var(--tokklr-spacing-4);
  font-size: 0.95rem;
}
.site-app .tokklr-backlink a { text-decoration: none; }
.site-app .tokklr-backlink a:hover { text-decoration: underline; }

/* A page that wears `.lead` is telling the reader what it is for. */
.site-app .lead {
  color: var(--tokklr-color-text-muted);
  font-size: 1.1rem;
}

/* The accompaniment page's panels: a card inside the page's own card, so it takes
 * the quieter ground. */
.site-app .tokklr-card {
  margin: var(--tokklr-spacing-4) 0;
  padding: var(--tokklr-spacing-5);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-md);
  background: var(--tokklr-color-surface);
}
.site-app .tokklr-card > header { margin: 0 0 var(--tokklr-spacing-3); }
.site-app .tokklr-card > header > * { margin-top: 0; margin-bottom: 0; }
.site-app .tokklr-card > :last-child { margin-bottom: 0; }

/* A note name in a measure. */
.site-app .tokklr-chip {
  display: inline-block;
  margin: 0 var(--tokklr-spacing-1) var(--tokklr-spacing-1) 0;
  padding: 2px var(--tokklr-spacing-3);
  border-radius: var(--tokklr-radius-pill);
  background: var(--tokklr-color-primary-soft);
  color: var(--tokklr-color-text);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* A row's primary link, the class name on the classes list. It has an explicit
 * focus ring because it had one (`admin.css`) and the browser default is the
 * floor, not a design, on a dark ground. */
.site-app .tokklr-table-link {
  font-weight: 600;
  text-decoration: none;
}
.site-app .tokklr-table-link:hover { text-decoration: underline; }
.site-app .tokklr-table-link:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
  border-radius: var(--tokklr-radius-xs);
}

/* The Stop control beside a listed class code (#3973) and the Clear on a pin's row
 * (#3991): a small outlined button on the line of the thing it acts on, so a row of
 * codes stays a list of codes and not a column of full-width buttons. */
.site-app .tokklr-code-stop,
.site-app .tokklr-pin-clear {
  display: inline;
  margin: 0;
}
.site-app .tokklr-code-stop button {
  margin: 0 0 0 var(--tokklr-spacing-4);
  padding: 2px var(--tokklr-spacing-3);
  font-size: 0.8rem;
}
.site-app .tokklr-pin-clear button {
  margin: 0;
  padding: 2px var(--tokklr-spacing-3);
  font-size: 0.8rem;
}

/* Text a person typed. An announcement keeps the line breaks the teacher put in
 * (#4260); a message keeps them too and lets a long word wrap instead of widening
 * the page (#3993). */
.site-app .tokklr-announcement-body {
  white-space: pre-line;
  margin-bottom: var(--tokklr-spacing-2);
}
.site-app .tokklr-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

@media (max-width: 720px) {
  .site-app main article { padding: var(--tokklr-spacing-5); }
}

/* ------------------------------------------------------------------------------------
 * #3969 (E56.F3): the social media control center, on the wide console chrome.
 * ------------------------------------------------------------------------------------ */

/* A post's status, as a labelled pill. The WORD is the signal and the tint a second
 * cue, so a reader who cannot tell the colours apart loses nothing. */
.site-chip {
  display: inline-block;
  padding: 2px var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line-strong);
  border-radius: var(--tokklr-radius-pill);
  background: var(--tokklr-color-surface);
  color: var(--tokklr-color-text);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.site-chip-approved,
.site-chip-scheduled {
  border-color: var(--tokklr-color-primary);
  background: var(--tokklr-color-primary-soft);
}
.site-chip-in_review,
.site-chip-publishing { border-color: var(--tokklr-color-warning); }
.site-chip-published { border-color: var(--tokklr-color-success); }
.site-chip-failed { border-color: var(--tokklr-color-danger); }
.site-chip-archived {
  border-style: dashed;
  color: var(--tokklr-color-text-muted);
}
/* #3974: a connected account's status, on the same pill. */
.site-chip-connected { border-color: var(--tokklr-color-success); }
.site-chip-expiring { border-color: var(--tokklr-color-warning); }
.site-chip-needs_reconnect { border-color: var(--tokklr-color-danger); }
.site-chip-disconnected {
  border-style: dashed;
  color: var(--tokklr-color-text-muted);
}
/* #3974: a post that goes out through an account that needs a person. The pill's words are the
 * signal, the warning border a second cue. Unlike a status word it is a short sentence, and a
 * calendar cell is about 7rem wide, so it wraps (and is a rounded box, not a pill, when it
 * does) instead of running into the next day. The list under it says which accounts, in
 * sentences that wrap too, because a network's name for an account can be long. */
.site-chip-attention {
  border-color: var(--tokklr-color-warning);
  border-radius: var(--tokklr-radius-sm);
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
/* #3980: a planned slot whose post is still a draft or in review. The words are the signal and
 * the dashed border a second cue, the same pair a status chip uses for an archived post. */
.site-chip-unapproved {
  border-style: dashed;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.site-console-problems {
  margin: var(--tokklr-spacing-2) 0 0;
  padding-inline-start: var(--tokklr-spacing-5);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* #3974: the banner across the console while an account needs a person, and one connection's
 * card on the accounts page. The banner's border is a second cue beside its words. */
.site-console-banner {
  margin: 0 0 var(--tokklr-spacing-4);
  padding: var(--tokklr-spacing-3) var(--tokklr-spacing-4);
  border: 1px solid var(--tokklr-color-warning);
  border-inline-start-width: 4px;
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface);
}
.site-console-banner ul { margin: var(--tokklr-spacing-2) 0; padding-inline-start: var(--tokklr-spacing-5); }
.site-console-account {
  margin: 0 0 var(--tokklr-spacing-5);
  padding: var(--tokklr-spacing-4);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-sm);
}
.site-console-account form { margin: 0; }
.site-console-account ul { margin: 0; padding-inline-start: var(--tokklr-spacing-5); }

/* The filter bar: fields in a row that wraps, so a phone gets a column of them. */
.site-wide article .site-console-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--tokklr-spacing-3) var(--tokklr-spacing-4);
  max-width: none;
}
.site-console-filters label { margin: 0; }
.site-console-filters input,
.site-console-filters select { margin-top: var(--tokklr-spacing-1); }
.site-console-filters button { margin: 0; }

/* One line of controls above a calendar or a table: a row that wraps. */
.site-console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tokklr-spacing-2) var(--tokklr-spacing-4);
  margin: 0 0 var(--tokklr-spacing-4);
}
.site-console-bar a {
  padding: var(--tokklr-spacing-1) var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-sm);
  text-decoration: none;
}
.site-console-bar a[aria-current="page"] {
  background: var(--tokklr-color-primary-soft);
  font-weight: 600;
}
.site-console-bar a:focus-visible,
.site-console-entry:focus-visible {
  outline: 2px solid var(--tokklr-color-primary);
  outline-offset: 2px;
}
.site-console-bar h2 { margin: 0; font-size: 1.1rem; }

.site-console-summary { color: var(--tokklr-color-text-muted); }
/* The UTC time beside a local one: smaller, never the only time on the page. */
.site-console-utc {
  display: block;
  color: var(--tokklr-color-text-muted);
  font-size: 0.85rem;
}

/* The calendar. A table, so the structure is read as one; the region around it scrolls
 * on a phone and the table keeps a width a week of columns can be read at. */
.site-calendar {
  width: 100%;
  min-width: 56rem;
  table-layout: fixed;
  border-collapse: collapse;
}
.site-calendar caption {
  padding-bottom: var(--tokklr-spacing-3);
  text-align: start;
  font-weight: 600;
}
.site-calendar th,
.site-calendar td {
  padding: var(--tokklr-spacing-2);
  border: 1px solid var(--tokklr-color-line);
  vertical-align: top;
  font-size: 0.85rem;
}
.site-calendar th { background: var(--tokklr-color-surface); font-weight: 600; }
.site-calendar-month td { height: 7rem; }
.site-calendar-week td { height: 2.5rem; }
.site-calendar-week th[scope="row"] { width: 4.5rem; text-align: end; }
.site-calendar .is-outside {
  background: var(--tokklr-color-surface-sunk);
  color: var(--tokklr-color-text-muted);
}
/* Today is the heavier border AND a word a screen reader reads, never the border alone. */
.site-calendar .is-today { outline: 3px solid var(--tokklr-color-primary); outline-offset: -3px; }
.site-calendar-daynum { margin: 0 0 var(--tokklr-spacing-2); font-weight: 600; }
.site-calendar ul {
  display: grid;
  gap: var(--tokklr-spacing-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-calendar li {
  padding-inline-start: var(--tokklr-spacing-2);
  border-inline-start: 3px solid var(--tokklr-color-primary);
}
.site-console-entry {
  display: block;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-console-entry:hover { text-decoration: underline; }
.site-console-entry-title { display: block; font-weight: 600; }

.site-console-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--tokklr-spacing-2) var(--tokklr-spacing-5);
  margin: var(--tokklr-spacing-4) 0;
}
.site-console-facts dt { color: var(--tokklr-color-text-muted); }
.site-console-facts dd { margin: 0; overflow-wrap: anywhere; }
.site-console-note { white-space: pre-wrap; }

/* #3970 -- the media library: an upload form, and a grid of cards. */
.site-media-upload {
  display: grid;
  gap: var(--tokklr-spacing-3);
  max-width: 40rem;
}
.site-media-upload progress { width: 100%; }
.site-media-upload [data-upload-status] { margin: 0; min-height: 1.5em; }
.site-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--tokklr-spacing-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-media-card {
  display: grid;
  align-content: start;
  gap: var(--tokklr-spacing-2);
  padding: var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface);
}
.site-media-card p { margin: 0; }
.site-media-title { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.site-media-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface-sunk);
  overflow: hidden;
}
.site-media-thumb img,
.site-media-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.site-media-fits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tokklr-spacing-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The verdict is a WORD first; the border colour is a second cue, never the only one. */
.site-media-fit-fits { border-color: var(--tokklr-color-success); }
.site-media-fit-notfit { border-color: var(--tokklr-color-warning); }
.site-media-fit-none { border-style: dashed; color: var(--tokklr-color-text-muted); }
.site-media-preview { margin: var(--tokklr-spacing-4) 0; }
.site-media-preview img,
.site-media-preview video {
  display: block;
  max-width: 100%;
  max-height: 32rem;
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface-sunk);
}
.site-media-network { margin: var(--tokklr-spacing-4) 0; }
.site-media-network h4 { margin: var(--tokklr-spacing-3) 0 var(--tokklr-spacing-1); }

/* #3972 (E56.F6): the social composer. A card per network, its files in order, and a preview of
   the feed card with the safe area dotted. Tokens only; the safe area is placed by the page
   script from `data-safe` (percent of the frame), so the markup carries no inline style. */
.site-composer-card {
  margin: var(--tokklr-spacing-4) 0;
  padding: var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line-strong);
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface);
}
.site-composer-card textarea,
.site-composer-card input[type="text"] { width: 100%; }
.site-composer-files { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--tokklr-spacing-2); }
.site-composer-files li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--tokklr-spacing-3);
  padding: var(--tokklr-spacing-2);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface-sunk);
  cursor: grab;
}
.site-composer-files img { width: 96px; height: auto; border-radius: var(--tokklr-radius-sm); }
.site-composer-actions { display: flex; flex-wrap: wrap; gap: var(--tokklr-spacing-2); }
.site-composer-preview { margin-top: var(--tokklr-spacing-4); }
.site-composer-feed {
  max-width: 28rem;
  padding: var(--tokklr-spacing-3);
  border: 1px solid var(--tokklr-color-line);
  border-radius: var(--tokklr-radius-sm);
  background: var(--tokklr-color-surface-elevated);
}
.site-composer-frame { position: relative; margin: 0 0 var(--tokklr-spacing-2); overflow: hidden; }
.site-composer-frame img { display: block; width: 100%; height: auto; }
.site-composer-safe {
  position: absolute;
  border: 2px dotted var(--tokklr-color-primary);
  pointer-events: none;
}
.site-composer-caption { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 var(--tokklr-spacing-2); }
.site-composer-library { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--tokklr-spacing-2); }
.site-composer-library li {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: var(--tokklr-spacing-3);
}
.site-composer-library img { width: 96px; height: auto; border-radius: var(--tokklr-radius-sm); }
[data-composer-findings] { margin: 0 0 var(--tokklr-spacing-2); padding-inline-start: var(--tokklr-spacing-5); }
[data-composer-findings] [data-verdict="blocks_publish"] strong { color: var(--tokklr-color-danger); }
[data-composer-findings] [data-verdict="advice"] strong { color: var(--tokklr-color-text-muted); }
