/*
 * Tomi — the public site.
 *
 * THE IDEA. The face is pixels. The page is not.
 *
 * Everything Tomi is made of lives on a grid of lit cells, and the previous version of
 * this page took that literally: monospace everywhere, hairline boxes, a terminal around
 * a terminal. It read as a debug console rather than as a product, and a page that looks
 * like the thing it is describing has nothing left to say about it.
 *
 * So the grid is kept where it is true — the face, the icons, the section marks, the
 * numerals — and everywhere else the page is set like a page: a wide geometric display
 * face for the headlines, a quiet humanist one for the reading, and the monospace demoted
 * to what monospace is actually for, which is labels, keys and numbers that have to line
 * up. The tension between the crisp letterform and the coarse cell IS the design; it is
 * spent in exactly two places, the headlines and the four big numerals, and everything
 * around those two is deliberately calm.
 *
 * THE PALETTE is not designed, it is borrowed. #000 is the app's canvas — the face only
 * reads as lit cells against real black, which is also why there is no light theme, for
 * the same reason the app has none. The surfaces above it are black with a trace of the
 * accent's own hue in them rather than neutral grey, so the page sits in the same light
 * as the face instead of beside it. --main, --acc, --gold and --violet are appended by
 * build.mjs straight out of portable/themes.json; not one colour on this site was picked
 * by eye.
 *
 * THE CELL IS THE BULLET. Every list marker on the site is one lit cell of the same grid
 * the face is drawn on, at the same 13px pitch. It is the only iconography here.
 *
 * THE SCREEN IS ON. The page sits on a faint 13px graph paper, the lit things bloom the
 * way phosphor blooms, and the panels carry scanlines and a vignette — because the product
 * is a creature inside an old monitor, and a page about it that reads as a flat document
 * has thrown away the one visual idea it was given for free. All of it is decoration in
 * exactly one sense: none of it is load-bearing, and all of it comes off under
 * prefers-reduced-motion or when a colour cannot be computed.
 *
 * The last block of this file is GENERATED and appended at build time.
 */

/* ---- type ----------------------------------------------------------------
 * Self-hosted, all four: the CSP is 'self', so there is no CDN to fall back on. Unbounded
 * and Onest are variable — one file per subset covering the whole weight axis, which is
 * why there is no -400/-700 pair for them the way there is for Plex.
 * The ranges are the standard Google Fonts subsets; without them the browser fetches all
 * three files for one family and uses only the last one declared.
 */

/* the display face: wide, geometric, and used only where it can be large */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/unbounded-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* the text face: humanist, quiet, and the only thing set at a reading size */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* the utility face: eyebrows, catalogue keys, hex values, step numbers. Nothing longer. */
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-ext-700.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-cyrillic-400.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-cyrillic-700.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* The one pixel face on the site, and it draws exactly four letters. Anything longer in
   it is unreadable, which is the whole reason it is scoped to the wordmark. */
@font-face {
  font-family: 'Pixel Mark';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/assets/fonts/press-start-2p-latin-400.woff2) format('woff2');
  unicode-range: U+0041-005A;
}

/* ---- tokens -------------------------------------------------------------- */

:root {
  /* the app's own canvas, and surfaces mixed towards its accent rather than towards grey */
  --void: #000;
  --surface: #070b0c;
  --surface-2: #0b1113;
  --line: rgba(196, 240, 233, .13);
  --line-soft: rgba(196, 240, 233, .07);

  /* not pure white: at 5rem in a heavy weight on true black, #fff blooms and buzzes */
  --ink: #f0f6f5;
  --ink-2: rgba(224, 240, 237, .68);
  --ink-3: rgba(224, 240, 237, .45);
  --ink-4: rgba(224, 240, 237, .26);

  /* --main, --acc, --gold, --violet and --face-ratio are appended by build.mjs */

  --display: 'Unbounded', 'Trebuchet MS', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Hiragino Sans', 'Noto Sans JP', 'Malgun Gothic', 'Microsoft YaHei', sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas,
    'Noto Sans Mono CJK JP', monospace;
  --mark: 'Pixel Mark', 'Plex Mono', monospace;

  /* type scale — six sizes, and everything on the site is one of them */
  --t-hero: clamp(2.35rem, 1.5rem + 3.5vw, 4.3rem);
  --t-h2: clamp(1.8rem, 1.15rem + 2.6vw, 3.05rem);
  --t-h3: clamp(1.05rem, .98rem + .34vw, 1.24rem);
  --t-lede: clamp(1.02rem, .95rem + .42vw, 1.24rem);
  --t-body: clamp(.95rem, .93rem + .16vw, 1.03rem);
  --t-small: .8125rem;
  --t-label: .6875rem;
  --t-stat: clamp(3.1rem, 1.1rem + 7.4vw, 6.6rem);

  /* spacing — a doubling scale, so nothing on the page is a number someone felt like */
  --s1: .25rem;
  --s2: .5rem;
  --s3: .875rem;
  --s4: 1.25rem;
  --s5: 2rem;
  --s6: 3rem;
  --s7: 4.5rem;

  /* section rhythm: three heights, assigned per section rather than one for all of them */
  --step-l: clamp(4.5rem, 2.5rem + 6.5vw, 8.5rem);
  --step-m: clamp(3.25rem, 2rem + 4.5vw, 6rem);
  --step-s: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);

  --cell: 13px;
  --gutter: clamp(1.25rem, .55rem + 2.6vw, 3.25rem);
  --page: 1240px;
  --measure: 62ch;
  --measure-tight: 46ch;
}

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

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 var(--t-body)/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--main); color: #000; }

:focus-visible { outline: 2px solid var(--main); outline-offset: 3px; }

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
  /* Unbounded is a wide face and eleven of the twelve languages are set in it without
     anyone reading them first, so a single long word — "expressions", «Поговорите» — can
     be wider than the column it is in. The type scale is sized so that does not happen at
     any breakpoint; hyphenation is the recovery if it ever does, and the hard break is the
     last resort under it. A word split with no hyphen is the worst of the three.
     The limit is here because `hyphens: auto` alone is not a last resort — with
     `text-wrap: balance` the browser will take a hyphen it does not need, and the Russian
     hero came out as «Томи подни-мает взгляд» on a line that had room for the whole word.
     Twelve characters is past every word the headlines actually use and short of the ones
     that genuinely do not fit. */
  hyphens: auto;
  -webkit-hyphenate-limit-before: 6;
  -webkit-hyphenate-limit-after: 4;
  hyphenate-limit-chars: 12 6 4;
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--t-hero);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.035em;
}
h2 {
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -.03em;
}
h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.02em;
}
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* the <defs> carrier for the face cells; it must exist in the box tree, not be display:none */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: .5rem; top: -5rem; z-index: 60;
  padding: .7rem 1.1rem; background: var(--main); color: #000;
  font: 700 var(--t-small)/1 var(--mono); text-decoration: none;
  transition: top .15s;
}
.skip:focus { top: .5rem; }

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

/* ---- the cell, as a mark ------------------------------------------------- */
/* Four cells before a section label. It is the same rounded square the face is drawn
   from, at the same 0.82-of-its-slot proportion, which is the only reason it is there. */

.eyebrow {
  display: flex;
  align-items: center;
  gap: .8em;
  margin: 0 0 var(--s4);
  color: var(--main);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  flex: none;
  width: calc(var(--cell) * 4);
  height: calc(var(--cell) * .82);
  background-image: repeating-linear-gradient(90deg,
      currentColor 0 calc(var(--cell) * .82),
      transparent calc(var(--cell) * .82) var(--cell));
  border-radius: 2px;
}
.eyebrow a { color: inherit; text-underline-offset: 3px; }

/* ---- header -------------------------------------------------------------- */

.bar {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 2rem);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line-soft);
}

.mark {
  display: grid;
  gap: .35rem;
  margin-right: auto;
  text-decoration: none;
}
.mark-word {
  font: 400 .8125rem/1 var(--mark);
  letter-spacing: .06em;
  color: var(--ink);
}
.mark-sub {
  font: 400 .625rem/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mark:hover .mark-word { color: var(--main); }

/* A phone cannot hold the wordmark, two links and a language name on one line. Rather
   than shrink any of them, the nav drops to a row of its own and the switcher stays up
   beside the mark, where a reader looks for it. */
@media (max-width: 40rem) {
  .bar { flex-wrap: wrap; row-gap: .9rem; }
  .mark { flex: 1 1 auto; margin-right: 0; }
  .lang { order: 2; }
  .bar-nav { order: 3; flex: 1 1 100%; }
}

.bar-nav { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.5rem); }
.bar-link {
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
}
.bar-link:hover { color: var(--ink); }
.bar-link[aria-current] { color: var(--main); }
.bar-link.is-cta {
  padding: .6rem .95rem;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color .18s, color .18s;
}
.bar-link.is-cta:hover { border-color: var(--main); color: var(--main); }

/* language switcher: a <details>, so it needs no script of its own */
.lang { position: relative; }
.lang summary {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .6rem;
  border: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
  font: 400 var(--t-label)/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { border-color: var(--ink-3); color: var(--ink); }
.lang[open] summary { border-color: var(--main); color: var(--main); }
.lang-glyph { color: var(--ink-3); font-size: .75rem; }
.lang[open] .lang-glyph { color: var(--main); }
/* an endonym is a proper name — uppercasing Українська only makes it harder to read */
.lang-now { text-transform: none; letter-spacing: .03em; font-family: var(--text); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}
.lang-menu a {
  display: block;
  padding: .6rem .75rem;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .8125rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--ink); }
.lang-menu a[aria-current] { color: var(--main); }

/* ---- the untranslated notice --------------------------------------------- */

.i18n-note {
  margin: var(--s4) 0 0;
  padding: .75rem 1rem;
  border-left: 2px solid var(--gold);
  background: rgba(255, 210, 77, .06);
  color: var(--ink-2);
  font-size: var(--t-small);
}

/* ---- shared blocks ------------------------------------------------------- */

main > section { padding: var(--step-m) 0; }

/* The heading wants a short measure and the lede a long one, so the constraint is on the
   heading rather than on the box around it. Putting it on `.head` was the bug that squeezed
   every lede on the site into a 28-character column. */
.head { max-width: var(--measure); }
.head h2 { margin-bottom: var(--s3); max-width: 19ch; }

.lede {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: var(--t-lede);
  line-height: 1.55;
  letter-spacing: -.005em;
}
.fineprint {
  margin-top: var(--s4);
  max-width: var(--measure);
  color: var(--ink-3);
  font-size: var(--t-small);
  line-height: 1.55;
}

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--s5); }

/* Prose on the left, the thing it is about on the right. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.split > * { min-width: 0; }
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .split > div > :first-child { margin-top: 0; }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .95rem 1.5rem;
  font: 700 var(--t-small)/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 0;
}
/* The chamfer is the app's own: its command field cuts the same two corners at the same
   10px. It is painted on a pseudo-element rather than clipping the link itself, because
   clip-path would take the focus outline with it. */
.btn-go { color: #000; }
.btn-go::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--main);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .18s;
}
.btn-go:hover::before { background: var(--ink); }
.btn-quiet { border: 1px solid var(--line); color: var(--ink); transition: border-color .18s, color .18s; }
.btn-quiet:hover { border-color: var(--main); color: var(--main); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .32rem .6rem;
  border: 1px solid currentColor;
  font: 700 .625rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 2px; }
.pill-live { color: var(--main); }
.pill-live::before { background: currentColor; }
.pill-dev { color: var(--ink-3); }
.pill-dev::before { box-shadow: inset 0 0 0 1px currentColor; }

/* ---- lists: lit means it exists, unlit means it does not ------------------ */

.lit-list, .unlit-list {
  display: grid;
  gap: var(--s3);
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}
.lit-list li, .unlit-list li {
  display: grid;
  grid-template-columns: calc(var(--cell) * .82) 1fr;
  gap: .9rem;
  align-items: baseline;
  color: var(--ink-2);
}
.lit-list li::before, .unlit-list li::before {
  content: '';
  width: calc(var(--cell) * .82);
  height: calc(var(--cell) * .82);
  border-radius: 3px;
  transform: translateY(.15em);
}
.lit-list li::before { background: var(--main); }
.unlit-list li::before { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* ---- the face ------------------------------------------------------------ */

.face { width: 100%; height: auto; }
.cm { fill: var(--main); }
.ca { fill: var(--acc); }
.cg { fill: var(--gold); }
.ci { fill: #fff; }
/* the unlit structure in an illustration: brightness is carried by the per-cell alpha
   the build writes, so this is a solid colour and never a translucent one */
.cd { fill: #dceeeb; }

.panel {
  position: relative;
  margin: 0;
  padding: clamp(.75rem, 2.4vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  isolation: isolate;
}
/* the panel's own light, tinted by whatever the face is feeling: face.js writes --glow
   on the stage every time the expression changes */
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(58% 62% at 50% 44%, var(--glow, var(--main)), transparent 72%);
  opacity: .14;
  transition: background .5s, opacity .5s;
  pointer-events: none;
}
/* The HUD corner ticks are lifted from the app's input dock, 8px and all. */
.hud { position: absolute; width: 8px; height: 8px; color: var(--ink-3); }
.hud.tl { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.hud.tr { top: -1px; right: -1px; border-top: 1px solid; border-right: 1px solid; }
.hud.bl { bottom: -1px; left: -1px; border-bottom: 1px solid; border-left: 1px solid; }
.hud.br { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }
.panel:hover .hud { color: var(--main); }

/*
 * Two faces in one box, and exactly one is ever visible. The SVG is rasterised at build
 * time and is what a visitor with no JavaScript keeps; the canvas is the app's own render
 * loop and takes over the moment face.js marks the stage live.
 */
.face-live { width: 100%; aspect-ratio: var(--face-ratio); }
[data-face-stage] .face-live { display: none; }
[data-face-stage].is-live .face-live { display: block; }
[data-face-stage].is-live .face-still { display: none; }

/* The still hero face cycles, because the product changes expression and a frozen one
   would be the only dishonest picture on the page. The keyframes, the duration and the
   per-pose delays are all generated at the end of this file: every number in them is a
   function of how many poses the build decided to ship, and a copy here would be a second
   place to change it. */

.panel-cap {
  display: none;
  align-items: center;
  gap: .6rem;
  margin-top: .75rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line-soft);
  font: 400 var(--t-label)/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
[data-face-stage].is-live .panel-cap { display: flex; }
.panel-live { display: flex; align-items: center; gap: .45em; color: var(--main); }
.panel-live::before {
  content: '';
  width: 6px; height: 6px; border-radius: 2px;
  background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.panel-now { margin-left: auto; }
.panel-readout { color: var(--main); font-weight: 700; letter-spacing: .1em; }

/* ---- hero ---------------------------------------------------------------- */

main > section.hero {
  display: grid;
  /* minmax(0,…) rather than a bare 1fr, everywhere on this page a grid is declared: the
     default implicit track is sized to its widest child's max-content, and the chip rail
     under the face does not shrink. Without this the hero is 814px wide on a 390px phone
     and takes the rest of the document with it. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 var(--step-m);
}
.hero h1 { margin: 0 0 var(--s4); }
.hero .lede { max-width: 40ch; }
.hero-cap {
  max-width: 64ch;
  color: var(--ink-3);
  font-size: var(--t-small);
  line-height: 1.55;
}

@media (min-width: 64rem) {
  main > section.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-copy { order: 1; }
  .hero-stage { order: 2; }
  .hero-cap { order: 3; grid-column: 1; margin-top: calc(var(--s5) * -1); }
}

/* ---- the rail under the live face ---------------------------------------- */

.rail { margin-top: var(--s4); }
.rail-label {
  margin: 0 0 .7rem;
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.rail-hint, .rail-note {
  margin-top: .85rem;
  color: var(--ink-3);
  font-size: var(--t-small);
  line-height: 1.5;
}
.rail-note { color: var(--ink-4); }
/* the hint describes a thing only the script can do */
/* Every line here describes something only the script can do — following a cursor, a
   canvas, a line typed at the speed of a mouth. With the script off they would each be a
   small lie, so they are not in the page at all until the stage says it is live. */
[data-face-stage] .rail-hint,
[data-face-stage] .say-row,
[data-face-stage] .rail-note,
.hero .hero-cap { display: none; }
[data-face-stage].is-live .rail-hint,
[data-face-stage].is-live .rail-note,
.hero.is-live .hero-cap { display: block; }
[data-face-stage].is-live .say-row { display: flex; }

/* A scrolling rail on a phone, where ten chips cannot fit and a horizontal swipe is the
   expected gesture; a wrapped grid on anything wider, where a scrollbar under the face
   would be a scrollbar nobody asked for. */
.chips {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
@media (min-width: 40rem) {
  /* five across, twice — a ragged wrap under a face that is itself perfectly gridded is
     the one place on this page where an uneven row would be noticed */
  .chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow-x: visible; padding-bottom: 0; }
  .chip { width: auto; }
}
.chip {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  width: 4.75rem;
  padding: .4rem .35rem .3rem;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  scroll-snap-align: start;
  transition: border-color .16s, background .16s;
}
.chip span {
  display: block;
  font: 700 .5rem/1.2 var(--mono);
  letter-spacing: .06em;
  text-align: center;
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip .face { opacity: .72; transition: opacity .16s; }
.chip.is-live { cursor: pointer; }
.chip.is-live:hover, .chip.is-live:focus-visible { border-color: var(--main); background: var(--surface-2); }
.chip.is-live:hover .face, .chip.is-on .face { opacity: 1; }
.chip.is-on { border-color: var(--main); background: var(--surface-2); }
.chip.is-on span { color: var(--main); }

.say-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: var(--s4);
}
.say-btn {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1rem;
  border: 1px solid var(--line);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .18s, color .18s;
}
.say-btn:hover, .say-btn:focus-visible { border-color: var(--main); color: var(--main); }
.say-out {
  flex: 1 1 12rem;
  min-width: 0;
  color: var(--ink);
  font-size: var(--t-small);
  line-height: 1.45;
}
.say-out::after {
  content: '';
  display: inline-block;
  width: .5em; height: 1em;
  margin-left: .15em;
  background: var(--main);
  vertical-align: -.15em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---- the band of counted numbers ----------------------------------------- */
/*
 * The one place besides the headlines where the display face is allowed to be loud, and
 * the only place on the site where the two materials are laid on top of each other: the
 * numerals are Unbounded, masked by the same grid of cells the face is drawn on. It is
 * the page saying the thing it has been saying in words — these numbers came out of the
 * app — in a form you read before you read the caption.
 *
 * Below 48rem the mask comes off. At that size the cells are wider than the strokes and
 * the numeral stops being a numeral, and a clever effect that costs legibility is not a
 * clever effect.
 */

main > section.band {
  padding: var(--step-s) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5) var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 56rem) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stat { display: grid; gap: .5rem; align-content: start; }
.stat-n {
  font: 800 var(--t-stat)/.82 var(--display);
  letter-spacing: -.055em;
  color: var(--main);
  font-variant-numeric: lining-nums tabular-nums;
}
@media (min-width: 48rem) {
  .stat-n {
    --pitch: calc(var(--t-stat) * .062);
    --lit: calc(var(--pitch) * .8);
    color: transparent;
    background: var(--main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-mask-image:
      repeating-linear-gradient(to right, #000 0 var(--lit), transparent var(--lit) var(--pitch)),
      repeating-linear-gradient(to bottom, #000 0 var(--lit), transparent var(--lit) var(--pitch));
    mask-image:
      repeating-linear-gradient(to right, #000 0 var(--lit), transparent var(--lit) var(--pitch)),
      repeating-linear-gradient(to bottom, #000 0 var(--lit), transparent var(--lit) var(--pitch));
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}
.stat-l {
  max-width: 18ch;
  color: var(--ink-3);
  font: 400 var(--t-label)/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.band-note {
  margin-top: var(--s5);
  max-width: var(--measure);
  color: var(--ink-4);
  font-size: var(--t-small);
  line-height: 1.5;
}

/* ---- memory -------------------------------------------------------------- */
/*
 * The one section that changes colour, and it earns it: memory is the only claim on this
 * page that is not about the face, so it is the only thing not lit in the face's own hue.
 * --violet is the VIOLET theme's own main colour out of portable/themes.json, so even the
 * exception is borrowed rather than picked.
 */

main > section.memory {
  --main: var(--violet);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: var(--step-l) 0;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 62rem) {
  main > section.memory { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.memory h2 { max-width: 15ch; }

.fig-memory {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: clamp(1.35rem, 3.4vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--line);
}
.fig-title {
  margin-bottom: .35rem;
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--main);
}
.fig-axis {
  display: flex;
  align-items: center;
  gap: .75rem;
  font: 400 .625rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.fig-axis i {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg,
      var(--ink-4) 0 3px, transparent 3px 7px);
}

.fact { display: grid; gap: .45rem; }
.fact-said {
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.45;
}
/*
 * The bars are drawn in cells, at one pitch, so the two of them line up under each other
 * and the page's own vocabulary carries the meaning: a solid run is the window the fact
 * was true in, and a thinned run is the same fact still on file after something else
 * replaced it. A hairline outline was the first attempt and it read as an empty box —
 * which is the one thing this diagram must not say.
 */
.fact-bar { display: flex; height: 14px; }
.fact-bar i { display: block; }
/* the shares are the story: the old fact was true for two fifths of the window and is
   still on file for the other three */
.bar-live, .bar-now { background-image: repeating-linear-gradient(90deg, var(--main) 0 8px, transparent 8px 11px); }
.bar-past { background-image: repeating-linear-gradient(90deg, var(--main) 0 8px, transparent 8px 11px); opacity: .26; }
.bar-void { background-image: repeating-linear-gradient(90deg, var(--ink-4) 0 2px, transparent 2px 11px); }
.bar-live, .bar-void { flex: 4; }
.bar-past, .bar-now { flex: 6; }
.fact-key {
  font: 700 var(--t-small)/1.3 var(--mono);
  letter-spacing: .04em;
  color: var(--ink);
}
.fact-tag {
  font: 400 .625rem/1.3 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.fact-tag.is-on { color: var(--main); }

.fig-arrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem 0;
  font: 700 .625rem/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--main);
}
.arrow-glyph {
  width: 10px; height: 14px;
  background: var(--main);
  clip-path: polygon(40% 0, 60% 0, 60% 60%, 100% 60%, 50% 100%, 0 60%, 40% 60%);
}
.fig-note {
  margin-top: .35rem;
  color: var(--ink-4);
  font-size: .75rem;
  line-height: 1.5;
}

/* ---- the three things it does that are not talking ------------------------ */

main > section.does { padding: var(--step-l) 0; border-top: 1px solid var(--line-soft); }
.does > .head h2 { max-width: 22ch; }

.feat-grid {
  display: grid;
  gap: var(--s5) clamp(1.5rem, 4vw, 3rem);
  margin-top: var(--step-s);
}
@media (min-width: 52rem) { .feat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.feat { display: grid; gap: .7rem; align-content: start; }
.ico { width: calc(var(--cell) * 4.6); height: auto; margin-bottom: .35rem; }
.feat-label {
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--main);
}
.feat p:last-child { color: var(--ink-2); font-size: var(--t-small); line-height: 1.65; }

/* one quiet mono line under the three cards, the way a spec line sits under a product */
.does-note {
  margin-top: var(--step-s);
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
  max-width: var(--measure);
  color: var(--ink-3);
  font: 400 var(--t-small)/1.6 var(--mono);
  letter-spacing: .04em;
}

/* ---- make it yours ------------------------------------------------------- */
/*
 * The only full-bleed section on the page, and the only one on a lifted surface. It is
 * lifted because it is the one block a visitor is meant to touch: the palette row under
 * the face really does retint everything in here, the face included, because the section
 * is its own face stage and assets/face.js writes --main and --acc onto the stage it
 * belongs to. Every colour below is therefore var(--main) or var(--acc) rather than a
 * literal, or tapping SAKURA would recolour the face and leave the furniture teal.
 */

/*
 * Full-bleed without 100vw. `calc(50% - 50vw)` is the usual trick and it is wrong on any
 * page tall enough to have a scrollbar: 100vw counts the scrollbar, the section ends up a
 * scrollbar's width too wide, and the page grows a horizontal one of its own. Clipping
 * that away at the root looked like a fix and quietly broke vertical scrolling instead —
 * `overflow-x` on <html> moves the scrolling box to <body> and the page stopped halfway.
 *
 * So the background is a ring of shadow instead: no layout box, nothing to overflow, and
 * the clip-path trims it to the section's own height so it does not paint over the
 * sections above and below.
 */
main > section.looks {
  position: relative;
  padding: var(--step-l) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
  box-shadow: 0 0 0 100vmax var(--surface-2);
  clip-path: inset(0 -100vmax);
}
.looks-head h2 { max-width: 17ch; }

.looks-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: var(--s6);
  align-items: start;
}
@media (min-width: 60rem) {
  .looks-body { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); }
}

.looks-side { position: sticky; top: var(--s4); }
.panel-looks { max-width: 22rem; }
@media (max-width: 59.99rem) { .looks-side { position: static; } .panel-looks { max-width: 17rem; } }

.swatches { margin-top: var(--s4); }
.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sw {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.sw-m { position: absolute; inset: 0; background: var(--m); }
/* the accent is the second hue the face borrows — it gets the corner, not half the chip */
.sw-a { position: absolute; inset: 0; background: var(--a); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.sw-n {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  padding: .2rem .35rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font: 700 .5625rem/1 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s;
}
.sw.is-live { cursor: pointer; }
.sw.is-live:hover, .sw.is-live:focus-visible {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 0 18px -4px var(--m);
}
.sw.is-live:hover .sw-n, .sw.is-live:focus-visible .sw-n { opacity: 1; }
.sw.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink), 0 0 22px -6px var(--m); }

/* ---- the head shells, as a catalogue ------------------------------------- */
/*
 * Names, not pictures, and that is a decision rather than a shortfall. Each shell's shape
 * lives in head-shells.json as a taper between two widths, two independent corner insets,
 * ears, hems and a keep-out window; the app samples that outline at runtime. A silhouette
 * drawn here from a reading of that table would be a shape nobody has checked against the
 * renderer — and a page that shows a face the app cannot make is the one thing this folder
 * exists to avoid. So the section shows the catalogue the way the app names it, grouped
 * the way the app groups it, and the face beside it stays the real one.
 */

.shells { display: grid; gap: var(--s4); }
.shell-group { display: grid; gap: .6rem; }
.shell-group-n {
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.shell-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shell {
  padding: .5rem .7rem;
  background: var(--void);
  /* darker than the strip it sits on, which is the opposite of everywhere else on the
     site — a chip on a lifted surface reads as a hole, not as a card */
  border: 1px solid var(--line);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .14em;
  color: var(--ink-2);
  transition: color .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.shell:hover {
  transform: translateY(-2px);
  color: var(--main);
  border-color: var(--main);
  box-shadow: 0 0 20px -8px var(--main);
}

/* ---- the questions ------------------------------------------------------- */
/* <details>, so the answers are in the document for a reader, a crawler and an answer
   engine whether or not anything runs. The marker is the site's own cell: outlined while
   the answer is folded away, solid once it is on the page. */

main > section.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding: var(--step-l) 0;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 62rem) {
  main > section.faq { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: start; }
  .faq > .head { position: sticky; top: var(--s5); }
}
.qa { display: grid; }
.q { border-top: 1px solid var(--line-soft); }
.q:last-child { border-bottom: 1px solid var(--line-soft); }
.q summary {
  display: grid;
  grid-template-columns: calc(var(--cell) * .82) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.15rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.q summary::-webkit-details-marker { display: none; }
.q summary::before {
  content: '';
  width: calc(var(--cell) * .82);
  height: calc(var(--cell) * .82);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--ink-3);
  transform: translateY(.1em);
  transition: background .18s, box-shadow .18s;
}
.q[open] summary::before { background: var(--main); box-shadow: none; }
.q summary:hover { color: var(--main); }
.q[open] summary { color: var(--main); }
.q > p {
  max-width: 64ch;
  margin: 0 0 1.35rem calc(var(--cell) * .82 + 1rem);
  color: var(--ink-2);
  line-height: 1.65;
}

/* ---- close --------------------------------------------------------------- */

main > section.close {
  padding: var(--step-l) 0 var(--step-m);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.close h2 {
  margin: 0 auto var(--s4);
  max-width: 18ch;
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.8rem);
}
.close .lede { margin: 0 auto; max-width: 42ch; }
.close .cta-row { justify-content: center; }

/* ---- the platforms pages ------------------------------------------------- */

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.25rem);
  align-items: center;
  padding-top: clamp(2rem, 4vw, 3.5rem);
}
.page-head h1 { margin-bottom: var(--s4); }
.page-head h1 { max-width: 15ch; }
@media (min-width: 58rem) {
  .page-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.art { width: 100%; height: auto; }
.art-device { filter: drop-shadow(0 0 26px rgba(53, 242, 211, .12)); }
.page-art { min-width: 0; }
.page-face { padding: clamp(.75rem, 2.5vw, 1.4rem); }

.web-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--s3);
}
.web-top .feat-label { margin: 0; }
main > section.web, main > section.status { padding: var(--step-m) 0; border-top: 1px solid var(--line-soft); }
.web h2, .status h2 { margin-bottom: var(--s3); max-width: 22ch; }

/* Four cards, and the same rule as the wall: a row that does not fill leaves a lit gap
   where a fifth platform would be, and there is no fifth platform. */
main > section.native { padding: var(--step-m) 0; border-top: 1px solid var(--line-soft); }
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: var(--s6) 0 var(--s5);
  padding: 0;
  list-style: none;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
@media (min-width: 34rem) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: grid;
  gap: .8rem;
  height: 100%;
  padding: 1.5rem;
  background: var(--void);
  text-decoration: none;
  transition: background .16s;
}
.card:hover { background: var(--surface); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-name { font-family: var(--display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.card-short { color: var(--ink-3); font-size: var(--t-small); line-height: 1.5; }
.card-go {
  margin-top: auto;
  color: var(--main);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.card-go::after { content: ' →'; }

/* ---- install: the steps, and a picture of where to press ----------------- */

main > section.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: var(--step-m) 0;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 62rem) {
  main > section.install {
    grid-template-columns: minmax(0, 1fr) minmax(0, 15rem) minmax(0, 1fr);
    align-items: start;
  }
  .install-head { grid-column: 1; }
  .install-art { grid-column: 2; }
  .install-steps { grid-column: 3; }
}
.install h2 { margin-bottom: var(--s3); max-width: 20ch; }
.install-art { display: grid; place-items: center; }
.art-ios, .art-android { max-width: 13rem; }
.art-windows, .art-mac { max-width: 24rem; }

.steps {
  counter-reset: step;
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: .9rem;
  align-items: baseline;
  color: var(--ink-2);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--main);
  font: 700 var(--t-small)/1.5 var(--mono);
  letter-spacing: .08em;
}

/* ---- notify -------------------------------------------------------------- */

main > section.notify { padding: var(--step-m) 0; border-top: 1px solid var(--line-soft); }
.notify-h { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: .8rem; }
.notify-body { max-width: var(--measure); color: var(--ink-2); }

/* Without the script there is no form at all, only a line explaining why. notify.js
   flips the two by putting .js on <html> before first paint. */
.needs-js { display: none; }
.js .needs-js { display: block; }
.no-js { max-width: var(--measure); color: var(--ink-3); font-size: var(--t-small); }
.js .no-js { display: none; }

.notify-form { max-width: 26rem; }
.field { display: grid; gap: .5rem; }
.field label {
  color: var(--ink-3);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.notify-form input {
  width: 100%;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  /* 16px: below that iOS Safari zooms the page on focus and does not zoom back out */
  font: 400 1rem/1.2 var(--text);
}
.notify-form input::placeholder { color: var(--ink-4); }
.notify-form input:focus { border-color: var(--main); outline: none; }
.notify-form input[aria-invalid='true'] { border-color: var(--acc); }
.notify-form button {
  margin-top: 1rem;
  padding: .95rem 1.5rem;
  background: var(--main);
  border: 0;
  border-radius: 0;
  color: #000;
  font: 700 var(--t-small)/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.notify-form button:hover:enabled { background: var(--ink); }
.notify-form button:disabled { background: var(--ink-4); color: rgba(0, 0, 0, .6); cursor: default; }
.notify-msg:empty { display: none; }
.notify-msg { margin-top: 1rem; font-size: var(--t-small); color: var(--ink-2); }
.notify-msg.is-ok { color: var(--main); }
.notify-msg.is-bad { color: var(--acc); }
.notify-privacy { margin-top: 1rem; color: var(--ink-4); font-size: .75rem; line-height: 1.5; }
/* the whole form is replaced by the confirmation; nothing says "saved" before a 204 */
.notify-form.is-done .field,
.notify-form.is-done button,
.notify-form.is-done .notify-privacy { display: none; }

/* ---- siblings, footer ---------------------------------------------------- */

/* a <nav>, not a section — the `main > section` rules above do not reach it */
.siblings { padding: var(--step-s) 0; border-top: 1px solid var(--line-soft); }
.siblings ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}
.siblings a {
  display: block;
  padding: .9rem 1.4rem;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font: 700 var(--t-small)/1 var(--mono);
  letter-spacing: .06em;
  text-decoration: none;
  transition: border-color .18s, color .18s;
}
.siblings a:hover { border-color: var(--main); color: var(--main); }

.foot {
  display: grid;
  gap: var(--s4);
  padding: var(--s6) 0 var(--s7);
  border-top: 1px solid var(--line);
}
.foot-rule { max-width: var(--measure); color: var(--ink-3); font-size: var(--t-small); line-height: 1.55; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot-nav a {
  color: var(--ink-2);
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
}
.foot-nav a:hover { color: var(--main); }
.foot-made { color: var(--ink-4); font-size: var(--t-small); }

/* ---- motion -------------------------------------------------------------- */
/*
 * The face is the one thing on this page that moves, and it is the one thing here that
 * would be worst to force on somebody. face.js handles its own half of this: with reduced
 * motion it snaps every spring to its target and renders exactly one frame, so the face
 * is still and CORRECT rather than still and half-way between two expressions. Clicking
 * an expression still works; it arrives instead of travelling.
 *
 * What is left here is the CSS half: the fallback face stops on its first pose, the live
 * pulse stops pulsing, and no transition runs.
 */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .face-cycle .pose { animation: none !important; opacity: 0; }
  .face-cycle .pose-0 { opacity: 1; }
  .panel-live::before { animation: none; }
  .say-out::after { display: none; }
}


/* ==========================================================================
 * THE SCREEN IS ON
 *
 * Everything below is the CRT the app lives in, applied to the page around it: the graph
 * paper, the phosphor bloom, the scanlines, and the four blocks that came with the new
 * page — the boot strip, the catalogue ticker, the living-mode vignettes and the three
 * steps. Every colour in here is var(--main) / var(--acc) rather than a literal, so a
 * section that retints itself takes its furniture with it.
 * ========================================================================== */

/* ---- the graph paper ----------------------------------------------------- */
/*
 * 13px, which is --cell, which is the pitch the face is sampled at. Fixed rather than
 * scrolling: the page moves over it the way a window moves over a desk, and a grid that
 * scrolled with the text would read as a texture on the text instead of a surface under
 * it. Masked towards the edges so it never competes with anything being read.
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(196, 240, 233, .045) 0 1px, transparent 1px var(--cell)),
    repeating-linear-gradient(0deg, rgba(196, 240, 233, .045) 0 1px, transparent 1px var(--cell));
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, rgba(0, 0, 0, .35) 75%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 10%, rgba(0, 0, 0, .35) 75%, transparent 100%);
}
.wrap { position: relative; z-index: 1; }

/* ---- the boot strip ------------------------------------------------------ */
/*
 * A machine saying what it loaded, above everything else on the page. The numbers in it
 * are the same counted ones the band shows, so it is not set dressing: it is the page's
 * own first claim, in the smallest type on the site.
 */
.boot {
  display: flex;
  align-items: center;
  gap: .4em;
  margin: 0;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line-soft);
  font: 400 .625rem/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--main) 55%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boot-cur {
  flex: none;
  width: .5em;
  height: 1em;
  background: var(--main);
  animation: boot-blink 1.1s steps(1) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }

/* ---- phosphor ------------------------------------------------------------ */
/*
 * A lit thing emits light. Three strengths, and they are used in exactly three places:
 * the four numerals, the accent half of a heading, and the primary button. Anywhere else
 * and the page stops having a brightest point.
 */
.stat-n { text-shadow: 0 0 .32em color-mix(in srgb, var(--main) 45%, transparent); }
.eyebrow { color: var(--main); }
.eyebrow::before { box-shadow: 0 0 10px color-mix(in srgb, currentColor 70%, transparent); }

h1 em, h2 em {
  font-style: normal;
  color: var(--main);
  text-shadow: 0 0 .5em color-mix(in srgb, var(--main) 38%, transparent);
}

.btn-go {
  box-shadow: 0 0 34px -10px var(--main);
  transition: box-shadow .18s, background .18s, color .18s;
}
.btn-go:hover, .btn-go:focus-visible { box-shadow: 0 0 44px -6px var(--main); }

.panel { box-shadow: 0 0 60px -26px color-mix(in srgb, var(--main) 70%, transparent); }

.lit-list > li::before { box-shadow: 0 0 9px color-mix(in srgb, var(--main) 80%, transparent); }

/* ---- the glass ----------------------------------------------------------- */
/*
 * Scanlines and a vignette, on the two panels that are meant to read as a screen and on
 * the closing block. 3px pitch, which is fine enough to be texture rather than stripes,
 * and it sits above the face because a scanline that the face drew over would be a
 * pattern on a picture instead of the surface of a tube.
 */
.crt { position: relative; }
.crt::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 45%, transparent 52%, rgba(0, 0, 0, .5) 100%);
}

/* ---- the catalogue ticker ------------------------------------------------ */
/*
 * Two identical lanes, and the pair is translated by exactly half its own width — which
 * is one lane — so the seam never arrives. Full-bleed, because a marquee that stops at a
 * gutter reads as a broken table rather than as something running past.
 */
.ticker {
  position: relative;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(2rem, 8vw, 7rem);
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--void), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--void), transparent); }

.ticker-run { display: flex; width: max-content; animation: ticker-run 64s linear infinite; }
.ticker-lane { display: flex; align-items: center; flex: none; }
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tick {
  padding: 0 .9rem;
  font: 400 var(--t-label)/1 var(--mono);
  letter-spacing: .26em;
  color: var(--ink-4);
  white-space: nowrap;
}
.tick.is-lit { color: var(--main); text-shadow: 0 0 .7em color-mix(in srgb, var(--main) 40%, transparent); }
.tick-dot {
  flex: none;
  width: 3px;
  height: 3px;
  background: var(--ink-4);
  border-radius: 1px;
}

/* ---- living mode --------------------------------------------------------- */

main > section.alive {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  padding: var(--step-l) 0;
  align-items: start;
}
@media (min-width: 62rem) {
  main > section.alive { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); }
}
.alive h2 { max-width: 15ch; }
.alive .lit-list { margin-top: var(--s5); max-width: var(--measure); }

/* Four faces out of four real acts. They overlap the copy column's baseline rather than
   lining up with it, because a 2x2 of equal boxes beside a paragraph is the shape the
   rest of this page is trying not to be. */
.scenes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.6rem, 1.6vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 62rem) {
  .scenes > li:nth-child(even) { transform: translateY(clamp(1rem, 3vw, 2.25rem)); }
}
.scene figure {
  position: relative;
  margin: 0;
  padding: .9rem .75rem .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color .18s, box-shadow .18s;
}
.scene figure:hover { border-color: var(--main); box-shadow: 0 0 30px -14px var(--main); }
.scene .face { opacity: .92; }
.scene figcaption { display: grid; gap: .25rem; margin-top: .55rem; text-align: center; }
.scene-n {
  font: 700 var(--t-label)/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--main);
}
.scene-c { color: var(--ink-4); font-size: .75rem; line-height: 1.4; }

/* ---- the three steps ----------------------------------------------------- */
/*
 * The numeral sits on its own line above the title rather than behind it. Behind it was
 * the first thing tried and it collided in every language that is not English — a big
 * numeral is a shape, not a watermark, and "Поздоровайтесь" is wider than "Say hi".
 */
/* `.steps` is taken: it is the numbered install list on the four platform pages, and it
   carries counters and its own list-style. A second meaning for the same word put both
   numerals in the same box and broke every title onto one word a line. */
main > section.how { padding: var(--step-l) 0; border-top: 1px solid var(--line-soft); }
.how > .head h2 { max-width: 20ch; }
.how-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 50rem) { .how-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how-step {
  display: grid;
  gap: .5rem;
  align-content: start;
  padding: var(--s4) clamp(1rem, 3vw, 2rem) var(--s5) 0;
  border-top: 1px solid var(--line-soft);
}
@media (min-width: 50rem) {
  .how-step { border-top: 0; border-left: 1px solid var(--line-soft); padding-left: clamp(1rem, 2.5vw, 1.75rem); }
  .how-step:first-child { border-left: 0; padding-left: 0; }
}
.how-n {
  font: 700 clamp(1.6rem, 1rem + 2vw, 2.4rem)/1 var(--mono);
  letter-spacing: .04em;
  color: color-mix(in srgb, var(--main) 38%, transparent);
  font-variant-numeric: tabular-nums;
}
.how-step h3 { margin: 0; }
.how-b { color: var(--ink-2); font-size: var(--t-small); line-height: 1.6; max-width: 34ch; }

/* ---- what you get, on a platform page ------------------------------------ */

main > section.get { padding: var(--step-m) 0; border-top: 1px solid var(--line-soft); }
.pick-note {
  margin-top: var(--s5);
  max-width: var(--measure);
  color: var(--ink-4);
  font-size: var(--t-small);
  line-height: 1.55;
}

/* ---- the close ----------------------------------------------------------- */
/* It is a screen too, so it gets the glass. The vignette has to sit under the button or
   the one thing the section exists for would be the dimmest thing in it. */
main > section.close { position: relative; }
main > section.close .cta-row { position: relative; z-index: 4; }

/* ---- motion, once more --------------------------------------------------- */
/*
 * The block at the top of this file already stops the face and the pose cycle. These are
 * the four that arrived with the new page, and every one of them is decoration: stopping
 * them costs a reader nothing, and leaving them running costs somebody with vestibular
 * trouble a page they cannot use.
 */
@media (prefers-reduced-motion: reduce) {
  .ticker-run { animation: none; }
  .boot-cur { animation: none; }
  .scene figure { transition: none; }
  .sw.is-live:hover, .sw.is-live:focus-visible { transform: none; }
}

/* ---- GENERATED by build.mjs from tomi-app/portable/themes.json — do not edit ---- */

:root {
  --main: #35f2d3;
  --acc: #ff6b9d;
  --gold: #ffd24d;
  --violet: #b06bff;
  --face-ratio: 356 / 200;
}

.sw-NEON { --m: #35f2d3; --a: #ff6b9d; }
.sw-AMBER { --m: #ffb648; --a: #ff6a4d; }
.sw-MATRIX { --m: #45ff70; --a: #b9ffce; }
.sw-ICE { --m: #d8edf6; --a: #6fb7ff; }
.sw-SAKURA { --m: #ff8fb3; --a: #35f2d3; }
.sw-COBALT { --m: #4d7dff; --a: #9dd6ff; }
.sw-CRIMSON { --m: #ff3355; --a: #ffd24d; }
.sw-SKY { --m: #4dd2ff; --a: #ff6b9d; }
.sw-VIOLET { --m: #b06bff; --a: #35f2d3; }

/* 4 poses over 21s: HAPPY → LOVE → THINKING → SLEEPY */
@keyframes pose-turn {
  0% { opacity: 0; }
  1.00% { opacity: 1; }
  24.00% { opacity: 1; }
  25.00% { opacity: 0; }
  100% { opacity: 0; }
}
.face-cycle .pose { opacity: 0; animation: pose-turn 21s linear infinite backwards; }
.face-cycle .pose-0 { animation-delay: 0s; }
.face-cycle .pose-1 { animation-delay: 5.25s; }
.face-cycle .pose-2 { animation-delay: 10.5s; }
.face-cycle .pose-3 { animation-delay: 15.75s; }
