/* ─────────────────────────────────────────────────────────────────────────
   theme-screen.css — THE one sample screen, and the only place it is styled.

   The brief, in the owner's words: "Just take one sample screen. Don't work
   on the screen: one single sample screen where you can display a color
   across different components — elevation, layout, hierarchy, designs,
   cards, graphic, text, banners, headers, scroll navigation bars. One fixed
   screen, and then color that screen with different theme colours."

   So this file is written once and never again. Ninety-six themes link it,
   each one alongside its own role tokens, and the screen comes out in that
   theme. Two forms off the same markup: data-form="web" and "mobile".

   THE RULE THIS FILE KEEPS. Not one colour literal anywhere below. Every
   paint is a Material role token — var(--primary), var(--surface-container-
   high) — which is what makes a theme a drop-in file rather than a
   stylesheet somebody has to edit. A hex here would be a colour no theme
   can move, and it would be invisible until the day it clashed.

   Regions it exercises, which is the list the brief asked for: app bar ·
   scrolling nav · cards at two elevations · primary button · tonal button ·
   tertiary badge · body text · muted caption · banner · list with dividers ·
   bar chart · dialog on a scrim · text field · divider · inverse footer ·
   bottom nav and a floating action button in the mobile form.
   ───────────────────────────────────────────────────────────────────────── */

:where(*, *::before, *::after) { box-sizing: border-box; }
:where(h1, h2, h3, p, figure, ul, ol, dl) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }

:root {
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;  --r-xl: 28px;
  --sp: 16px;
  --ink: var(--on-surface);
  --mute: var(--on-surface-variant);
  --e1: 0 1px 2px color-mix(in oklab, var(--shadow) 14%, transparent),
        0 1px 3px 1px color-mix(in oklab, var(--shadow) 8%, transparent);
  --e2: 0 1px 2px color-mix(in oklab, var(--shadow) 16%, transparent),
        0 2px 6px 2px color-mix(in oklab, var(--shadow) 10%, transparent);
  --e3: 0 4px 8px 3px color-mix(in oklab, var(--shadow) 12%, transparent),
        0 1px 3px color-mix(in oklab, var(--shadow) 18%, transparent);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.55 Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── the page chrome around the specimen ────────────────────────────────── */

/* THE PAGE IS WIDER THAN A READING COLUMN, and that is the measurement
   talking. A 1180px column on a 1440px screen spends a fifth of every
   screenshot on page margin - background, which is by definition not colour.
   The headline here is a colour sheet, not prose, so the column is as wide as
   the screen allows and only the paragraphs are held to a reading measure. */
.page { max-width: 1640px; margin: 0 auto; padding: 20px 16px 64px; }
.sect > p, .fold > p, .note { max-width: 78ch; }

.bar {
  position: sticky; top: 0; z-index: 9;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 16px; margin: 0 0 24px;
  background: var(--surface-container);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--e2);
}
.bar h1 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.bar .seed {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); box-shadow: var(--e1);
}
.bar .sp { flex: 1 1 24px; }

.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; white-space: nowrap;
  background: var(--primary); color: var(--on-primary);
  box-shadow: var(--e1);
  transition: box-shadow .18s ease, filter .18s ease;
}
.btn:hover { box-shadow: var(--e2); filter: brightness(1.06); }
.btn:active { box-shadow: none; }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); box-shadow: none; }
.btn.tonal:hover { box-shadow: var(--e1); }
.btn.quiet {
  background: transparent; color: var(--primary); box-shadow: none;
  border: 1px solid var(--outline);
}
.btn.quiet:hover { background: color-mix(in oklab, var(--primary) 8%, transparent); }
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px;
}

.seg {
  display: inline-flex; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--outline);
}
.seg button {
  font: inherit; font-size: 13px; font-weight: 600;
  min-height: 44px; padding: 0 16px; border: 0; cursor: pointer;
  background: transparent; color: var(--on-surface-variant);
}
.seg button[aria-pressed="true"] { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ── the specimen frame: the ONE screen, in one of two forms ─────────────── */

.frame {
  margin: 0 auto;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--e3);
  overflow: hidden;
  container-type: inline-size;
}
[data-form="web"] .frame { max-width: 1100px; }
[data-form="mobile"] .frame { max-width: 390px; }

/* app bar */
.appbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--surface-container);
  box-shadow: var(--e1);
}
.appbar .mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.appbar .t { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.appbar .grow { flex: 1 1 10px; }
.field {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-container-high); color: var(--mute);
  border: 1px solid var(--outline-variant);
  font-size: 14px;
}
.appbar .field { flex: 0 1 320px; }
[data-form="mobile"] .appbar .field { display: none; }
.icon {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 0; cursor: pointer; font: inherit; font-size: 15px;
  background: transparent; color: var(--on-surface-variant);
  display: grid; place-items: center;
}
.icon:hover { background: color-mix(in oklab, var(--on-surface) 8%, transparent); }
.av {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--tertiary-container); color: var(--on-tertiary-container);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}

/* the scrolling nav */
.navscroll {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 10px 16px; background: var(--surface-container-low);
  border-bottom: 1px solid var(--outline-variant);
  scrollbar-width: thin;
}
.navscroll a {
  scroll-snap-align: start; flex: none; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--on-surface-variant);
  border: 1px solid var(--outline-variant);
}
.navscroll a[aria-current] {
  background: var(--secondary-container); color: var(--on-secondary-container);
  border-color: transparent;
}

/* the screen body */
.screen { padding: 18px; display: grid; gap: 18px; }
[data-form="web"] .screen { grid-template-columns: 1fr 332px; align-items: start; }
.col { display: grid; gap: 18px; min-width: 0; }

/* banner */
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--error-container); color: var(--on-error-container);
}
.banner .dot {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--error); color: var(--on-error);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.banner b { display: block; font-size: 14px; }
.banner p { font-size: 13px; }
.banner button {
  margin-left: auto; align-self: center; flex: none;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  background: color-mix(in oklab, var(--on-error-container) 10%, transparent);
  color: var(--on-error-container);
}

/* cards at two elevations */
.card {
  padding: 18px; border-radius: var(--r-lg);
  background: var(--surface-container-low);
  box-shadow: var(--e1);
}
.card.up { background: var(--surface-container-high); box-shadow: var(--e2); }
.card h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.card h3 { font-size: 14px; font-weight: 650; }
.card p { font-size: 14px; color: var(--ink); }
.cap { font-size: 12.5px; color: var(--mute); }
.hr { height: 1px; border: 0; margin: 14px 0; background: var(--outline-variant); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  background: var(--tertiary-container); color: var(--on-tertiary-container);
}
.pill.solid { background: var(--tertiary); color: var(--on-tertiary); }

/* the chart */
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 132px; }
.chart div { border-radius: 6px 6px 2px 2px; background: var(--primary); }
.chart div:nth-child(3n+2) { background: var(--secondary); }
.chart div:nth-child(3n) { background: var(--tertiary); }
.xaxis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 8px; }
.xaxis span { font-size: 11px; color: var(--mute); text-align: center; }

/* the list */
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.list li + li { border-top: 1px solid var(--outline-variant); }
.list .lead {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--primary-container); color: var(--on-primary-container);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.list .who { flex: 1 1 10px; min-width: 0; }
.list .who b { display: block; font-size: 14px; font-weight: 600; }

/* the form card */
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: var(--r-sm); font: inherit; font-size: 16px;
  background: var(--surface-container-lowest); color: var(--ink);
  border: 1px solid var(--outline);
}
.input::placeholder { color: var(--mute); }
.label { display: block; font-size: 12.5px; font-weight: 650; color: var(--mute); margin-bottom: 6px; }
.switch {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 44px;
}
/* 56 x 44 is the TARGET; the visible pill is the content box, 32px tall,
   painted by background-clip. Material's switch is a 32px graphic inside a
   48px touch area, and shrinking the element to the graphic is how a control
   that looks right fails the hit floor. */
.switch .track {
  width: 56px; height: 44px; border-radius: 999px; flex: none; cursor: pointer;
  border: 0; padding: 6px 3px; background: var(--primary); background-clip: content-box;
  display: flex; align-items: center; justify-content: flex-end;
}
.switch .track span { width: 26px; height: 26px; border-radius: 50%; background: var(--on-primary); }
.switch .track[aria-pressed="false"] { background: var(--surface-container-highest); background-clip: content-box; justify-content: flex-start; }
.switch .track[aria-pressed="false"] span { background: var(--outline); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles div { padding: 12px; border-radius: var(--r-md); }
.tiles div:nth-child(1) { background: var(--primary-container); color: var(--on-primary-container); }
.tiles div:nth-child(2) { background: var(--secondary-container); color: var(--on-secondary-container); }
.tiles div:nth-child(3) { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.tiles b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.tiles span { font-size: 11.5px; opacity: .85; }

/* the dialog, on its scrim. A specimen, not a modal: it is always on screen
   so a person can see what a dialog looks like in this theme without having
   to open one, and so the gate can measure its text. */
.plate {
  padding: 22px 16px; border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--scrim) 42%, transparent);
}
.dialog {
  max-width: 420px; margin: 0 auto; padding: 20px;
  border-radius: var(--r-xl);
  background: var(--surface-container-highest);
  box-shadow: var(--e3);
}
.dialog h3 { font-size: 17px; font-weight: 650; margin-bottom: 6px; }
.dialog p { font-size: 13.5px; color: var(--mute); }
.dialog .row { justify-content: flex-end; margin-top: 16px; }

/* the inverse footer — the three inverse roles, which nothing else uses */
.inv {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 16px 18px;
  background: var(--inverse-surface); color: var(--inverse-on-surface);
  font-size: 13.5px;
}
/* a flex item, not a word inside a sentence, so it owes the full 44px target */
.inv a {
  color: var(--inverse-primary); font-weight: 650;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px;
}

/* mobile-only chrome */
.fab {
  position: absolute; right: 16px; bottom: 78px;
  width: 56px; height: 56px; border-radius: 18px; border: 0; cursor: pointer;
  background: var(--primary-container); color: var(--on-primary-container);
  box-shadow: var(--e3); font-size: 22px; font-weight: 400;
}
.botnav {
  display: flex; background: var(--surface-container);
  box-shadow: var(--e2); padding: 6px 4px;
}
.botnav a {
  flex: 1; text-decoration: none; text-align: center;
  display: grid; gap: 2px; padding: 8px 0 10px; border-radius: var(--r-md);
  font-size: 11px; font-weight: 650; color: var(--on-surface-variant);
}
.botnav a i { font-style: normal; font-size: 17px; }
.botnav a[aria-current] { background: var(--secondary-container); color: var(--on-secondary-container); }
.phonewrap { position: relative; }
[data-form="web"] .fab, [data-form="web"] .botnav { display: none; }
[data-form="mobile"] .screen { grid-template-columns: 1fr; padding-bottom: 24px; }
[data-form="mobile"] .tiles { grid-template-columns: repeat(3, 1fr); }
[data-form="mobile"] .chart { height: 108px; }

/* a narrow viewport collapses the web form too, so the page has no sideways
   scroll on a phone whichever form is selected */
@container (max-width: 760px) {
  .screen { grid-template-columns: 1fr !important; }
}

/* ── the values, which is what a person came for ─────────────────────────── */

.sect { margin: 32px 0 0; }
.sect > h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.sect > p { font-size: 14px; color: var(--mute); max-width: 68ch; margin-top: 4px; }

.vals { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.vals caption { text-align: left; font-size: 12.5px; color: var(--mute); padding-bottom: 8px; }
.vals th { text-align: left; font-weight: 650; font-size: 11.5px; color: var(--mute);
           padding: 8px 10px; border-bottom: 1px solid var(--outline); white-space: nowrap; }
.vals td { padding: 7px 10px; border-bottom: 1px solid var(--outline-variant); vertical-align: middle; }
.vals tr:hover td { background: var(--surface-container-low); }
.vals .sw { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--e1); display: block; }
.vals .nm { font-weight: 600; white-space: nowrap; }
.vals .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; white-space: nowrap; }
.vals button.copy {
  font: inherit; font-size: 12px; font-family: ui-monospace, Consolas, monospace;
  border: 0; background: transparent; color: var(--ink); cursor: copy;
  padding: 6px 8px; border-radius: 6px; min-height: 44px; text-align: left; white-space: nowrap;
}
.vals button.copy:hover { background: var(--secondary-container); color: var(--on-secondary-container); }
.vals .grp td { background: var(--surface-container); font-weight: 700; font-size: 11.5px;
                letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.wrapx { overflow-x: auto; }


/* ══ THE FIRST SCREEN ═══════════════════════════════════════════════════
   His list, in his order: a navigation bar in a strong accent role, buttons,
   cards on the container roles, and several shades of the one colour.

   THE ONE RULE THAT MAKES THE MEASUREMENT. Every row is FULL-BLEED and every
   row is a FILLED ROLE. Nothing between them is page background, because page
   background is by definition not colour - it was 60% of the first screen
   when the role sheet was the headline, and the sheet could not get past 40%
   however it was laid out. Gaps are 3px. The only neutral pixels left are the
   glyphs, and those are the on-colours proving their own pairings.

   It breaks the page's column on purpose: `.page` is a centred max-width box
   with 16px of padding, so a negative inline margin of exactly that puts the
   hero edge to edge without a single vw unit. (100vw includes the scrollbar
   and overflows; that was tried, and it made the document wider than the
   window.) */
.hero {
  margin: 0 -16px 36px;
  display: grid; gap: 3px;
  background: var(--outline-variant);   /* shows only in the 3px gaps */
}

/* 1 · the navigation bar */
.h-nav {
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; min-height: 76px; font-size: 15px;
}
.h-nav > b { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.h-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--on-primary); flex: none; }
.h-links { display: flex; gap: 22px; margin-left: 14px; }
.h-links i { font-style: normal; font-size: 14.5px; font-weight: 550; }
.h-sp { flex: 1; }
.h-pill {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
  background: var(--primary-container); color: var(--on-primary-container);
}
.h-av { width: 38px; height: 38px; border-radius: 999px; background: var(--tertiary); flex: none; }

/* 2 · the band, and the three button shapes on it */
.h-band {
  background: var(--primary-container); color: var(--on-primary-container);
  padding: 44px 24px 46px; display: grid; gap: 10px; align-content: center; min-height: 300px;
}
.h-eye { font: 700 12px/1 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; opacity: 0.75; }
.h-title { font-size: clamp(30px, 4.2vw, 50px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }
.h-sub { font-size: 16.5px; max-width: 54ch; }
.h-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.hb {
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 650 16px/1 inherit; font-family: inherit;
}
.hb-fill  { background: var(--primary); color: var(--on-primary); }
/* THE TONAL BUTTON NEEDS AN EDGE, and the reason is a real property of the
   system rather than a styling preference. It is `secondary-container` and it
   sits on `primary-container` - two tone-90 values whose hues are the same
   hue. In a theme like Lavender they land four thousandths of OKLab apart and
   the button simply is not there. The hairline is its own on-colour at 22%,
   so it is still the theme painting it. */
.hb-tonal { background: var(--secondary-container); color: var(--on-secondary-container);
            box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--on-secondary-container) 22%, transparent); }
.hb-out   { background: transparent; color: var(--on-primary-container);
            box-shadow: inset 0 0 0 2px currentColor; }
.hb:focus-visible { outline: 3px solid var(--on-primary-container); outline-offset: 3px; }

/* 3 · one card per container role */
.h-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.hc { padding: 26px 24px; display: grid; align-content: start; gap: 9px; min-height: 250px; }
.hc > b { font-size: 18px; font-weight: 680; letter-spacing: -0.01em; }
.hc > p { font-size: 15px; max-width: 34ch; }
.hc > em { font: 500 12.5px/1 ui-monospace, Consolas, monospace; font-style: normal; opacity: 0.8; align-self: end; }
.hc-p { background: var(--primary-container);   color: var(--on-primary-container); }
.hc-s { background: var(--secondary-container); color: var(--on-secondary-container); }
.hc-t { background: var(--tertiary-container);  color: var(--on-tertiary-container); }

/* 4 · several shades of the one colour */
.h-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; }
.h-strip button {
  border: 0; cursor: copy; min-height: 150px; padding: 0;
  font: 650 13px/1 ui-monospace, Consolas, monospace; display: grid; place-items: center;
}
.h-strip button:focus-visible { outline: 3px solid var(--primary); outline-offset: -4px; }

@media (max-width: 760px) {
  .h-links { display: none; }
  .h-cards { grid-template-columns: 1fr; }
  .hc { min-height: 150px; }
  .h-strip { grid-template-columns: repeat(4, 1fr); }
  .h-strip button { min-height: 92px; }
  .h-band { min-height: 240px; padding: 32px 18px; }
}

/* ── THE ROLE SHEET ──────────────────────────────────────────────────────
   The page's headline. Every role a large block of its own colour, labelled
   in its own on-colour, so each block proves its own pairing on sight.

   THE SIZES ARE THE POINT, not styling. The first edition of this page opened
   with a simulated app and measured 0.7% colour by painted area, its biggest
   block of the theme's own colour a 714x72 banner. A sheet of 132px-tall
   blocks at four or five across is the opposite shape: almost the whole of
   the page's ink is the theme, which is what a person is choosing.

   The minimum block is 180x132. That is the smallest a block can be and
   still carry "Surface Container Highest" on two lines at 13px without
   clipping, which is the real constraint - the longest role name in the set
   sets the width of every block in it. */
.sheet { display: grid; gap: 22px; margin-top: 18px; }
.sgrp > h3 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 8px;
}
/* auto-FIT, not auto-fill, and the difference is the whole measurement. With
   auto-fill a 1,371px row holds seven 188px tracks whether or not there are
   seven blocks to put in them, so the Primary group drew two blocks and five
   columns of page background - and page background is, by definition, not
   colour. auto-fit collapses the empty tracks and the group's blocks take the
   whole row. Nothing else changed and the share of the page that is the
   theme's own colour went from 21% to the figure in COLOUR-THEMES.md 8.1. */
.sblocks {
  display: grid; gap: 3px;
  grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
}
.sblk {
  position: relative; display: grid; align-content: space-between;
  min-height: 150px; padding: 13px 14px; gap: 6px;
  border: 0; border-radius: var(--r-sm); cursor: copy; text-align: left;
  font: inherit;
}
/* the only non-token paint on the sheet, and it is a hairline, not a fill:
   Surface Container Lowest in light mode is tone 100 on a tone-98 page, and a
   block the page cannot be told from is a block that is not shown. */
.sblk { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--outline-variant) 60%, transparent); }
.sblk .sname { font-size: 13.5px; font-weight: 650; line-height: 1.25; letter-spacing: -0.005em; }
.sblk .shex  { font: 500 11px/1 ui-monospace, Consolas, monospace; opacity: 0.86; }
.sblk .srat  {
  position: absolute; top: 11px; right: 12px;
  font: 600 10px/1 ui-monospace, Consolas, monospace; opacity: 0.7;
}
.sblk:hover { box-shadow: inset 0 0 0 2px currentColor; }
.sblk:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 560px) {
  .sblocks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .sblk { min-height: 116px; }
}

/* ── the tonal palettes ──────────────────────────────────────────────────
   Five rows, fourteen tones, large enough that a ramp reads AS a ramp. The
   first edition drew them at 52px tall with a 10px number; at that size the
   five rows are a legend, not a palette. */
.tonal { display: grid; gap: 10px; margin-top: 16px; }
.tonal .trow { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: center; }
.tonal .trow > b { font-size: 13.5px; font-weight: 650; }
.tonal .ramp { display: grid; grid-template-columns: repeat(14, 1fr); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--e1); }
.tonal .ramp button {
  border: 0; cursor: copy; padding: 0; height: 84px;
  font: 650 12px/1 ui-monospace, Consolas, monospace;
  display: grid; place-items: center;
}
.tonal .ramp button:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.tonal .legend { display: grid; grid-template-columns: 132px 1fr; gap: 12px; margin-top: 2px; }
.tonal .legend div { display: grid; grid-template-columns: repeat(14, 1fr); }
.tonal .legend span { font-size: 10.5px; color: var(--mute); text-align: center; }
@media (max-width: 560px) {
  .tonal .trow, .tonal .legend { grid-template-columns: 1fr; gap: 4px; }
  .tonal .ramp button { height: 56px; font-size: 10px; }
}

.sect.first { margin-top: 10px; }

/* ── the two folded sections ─────────────────────────────────────────────
   The specimen screen and the values table. Both are useful and neither is
   the headline, so both arrive closed: the page a person lands on is the
   scheme, and one click is the whole cost of the rest. */
.fold > summary {
  display: flex; align-items: baseline; gap: 10px; cursor: pointer;
  list-style: none; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-container); min-height: 44px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: "+"; margin-left: auto; font: 500 20px/1 ui-monospace, Consolas, monospace;
  color: var(--mute);
}
.fold[open] > summary::after { content: "\2212"; }
.fold > summary:hover { background: var(--surface-container-high); }
.fold > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.fold > summary > h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.fold > summary > span { font-size: 13.5px; color: var(--mute); }
.fold > p { margin-top: 12px; }

.note {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-container); font-size: 13px; color: var(--ink);
}
.note b { font-weight: 650; }
.note code { font-family: ui-monospace, Consolas, monospace; font-size: 12px;
             background: var(--surface-container-highest); padding: 1px 5px; border-radius: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 999px; z-index: 50;
  background: var(--inverse-surface); color: var(--inverse-on-surface);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--e3);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.toast[data-on] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── THE TWO SCREENS, SIDE BY SIDE ────────────────────────────────────────

   His brief, 2026-10-25: "have the mobile version also — how it would look on
   mobile… it would just have certain standard components on a mobile screen
   and fill it with those colours. Don't make it too complicated."

   WHY A ROW AND NOT A TOGGLE. The phone layout already existed and nobody saw
   it: behind a shut fold, and then behind a second click on a Web / Mobile
   segment, so the page could only ever show one of the two things a person
   wants to compare. Two screens on one row cost one section of page and need
   no instruction. The toggle is gone.

   THE COLUMN WIDTHS ARE MEASURED, not chosen. The phone is a fixed 390,
   because that is the width it is a design FOR, plus 28 of bezel. The desktop
   column takes what is left and never drops under 560, which is the width at
   which its own container query stops laying the body out in two columns —
   under that it is not a desktop screen any more and the row is dishonest. So
   under 1010px of page the two stack, and the PHONE GOES FIRST: at that width
   the reader is on a phone, and the thing they came to see is how this colour
   looks on one. */

.screens {
  display: grid; gap: 22px; margin-top: 16px;
  grid-template-columns: minmax(560px, 1fr) 418px;
  align-items: start;
}
.scw, .scp, .spec { min-width: 0; }
.sccap {
  margin: 0 0 8px 2px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute);
}

/* THE BEZEL. A phone layout standing on a page with no device around it reads
   as a narrow website, which is the one thing it is not. */
.device {
  width: 418px; padding: 14px;
  border-radius: 40px;
  background: var(--surface-container-highest);
  box-shadow: var(--e3), inset 0 0 0 1px var(--outline-variant);
}

/* A PHONE IS A FIXED HEIGHT, and a phone screen 2,400px tall is a document.
   So the device holds 760px of screen with the chrome pinned: the app bar and
   the section rail at the top, the bottom nav at the bottom, and only the body
   between them scrolls — which is what these components do on a real phone. */
.device .frame {
  border-radius: 28px; box-shadow: none;
  height: 760px; display: flex; flex-direction: column;
}
.device .phonewrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.device .appbar, .device .navscroll, .device .botnav { flex: none; }
.device .screen { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }

@media (max-width: 1010px) {
  /* the page becomes a column, so the screens section can be pulled to the top */
  .page { display: flex; flex-direction: column; }
  #applied { order: -1; margin-top: 10px; }
  .screens { grid-template-columns: 1fr; }
  .scp { order: -1; }
  .device { width: 100%; max-width: 418px; }
}

@media (max-width: 460px) {
  /* INSIDE THE LIBRARY'S OWN PHONE FRAME there is already a device around this
     page, so a second bezel is a bezel inside a bezel. The phone layout takes
     the full width instead, it scrolls with the page rather than inside
     itself, and the desktop screen — which cannot be read at 390 — steps
     aside rather than being shrunk into illegibility. */
  .device {
    width: auto; max-width: none; padding: 0;
    border-radius: var(--r-lg); background: none; box-shadow: none;
  }
  .device .frame {
    height: auto; display: block;
    border-radius: var(--r-lg); box-shadow: var(--e2);
  }
  .device .phonewrap { display: block; }
  .device .screen { overflow: visible; }
  .scw, .sccap { display: none; }
}

/* ── INSIDE THE LIBRARY'S PHONE FRAME, THIS PAGE IS THE PHONE SCREEN ──────
   data-embed is set by theme-screen.js when the page is in an iframe. At 390
   that iframe is the library's own device, which already draws a phone around
   this page: its bar, its headings and its reference sections cost the top
   third of the device and pushed the screen a person came to see off the
   bottom. Embedded AND narrow, the page is the screen and nothing else.
   Embedded and WIDE is the desktop gallery, where the whole page belongs, so
   this is scoped to the width as well as to the frame. */
@media (max-width: 460px) {
  :root[data-embed] body { background: var(--surface); }
  :root[data-embed] .bar,
  :root[data-embed] .page > .sect:not(#applied),
  :root[data-embed] .page > details,
  :root[data-embed] #hero,
  :root[data-embed] #applied > h2,
  :root[data-embed] #applied > p,
  :root[data-embed] .toast { display: none; }
  :root[data-embed] .page { padding: 0; }
  :root[data-embed] #applied { margin: 0; }
  :root[data-embed] .screens { gap: 0; margin: 0; }
  :root[data-embed] .device .frame { border-radius: 0; box-shadow: none; }
}
