/* tykungames.com - the stylesheet. Look 5 "Blueprint arcade" (milestones/m1/reports/look2.md, Ruling; contract 4.5).
   The eleven colours are the custom properties below and nothing else is a colour but the page's grid, one SVG line colour
   (G47). Two families served by the site (contract 4.12): Tykun Pixel at 16 and 32 px only, Tykun Sans for reading.
   M0's layout rules stay until the blocks that rebuild their parts (M1-T40 to M1-T49); widths are max-width only. */

@font-face { font-family: 'Tykun Pixel'; src: url(fonts/tykun-pixel.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Tykun Sans'; src: url(fonts/tykun-sans-regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Tykun Sans'; src: url(fonts/tykun-sans-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Tykun Sans'; src: url(fonts/tykun-sans-bold.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --page: #0c0c10;
  --panel: #16161e;
  --deep: #08080b;
  --rule: #2e2e3a;
  --rule-strong: #4a4a5c;
  --head: #ffffff;
  --text: #ecebf2;
  --soft: #b9b8c6;
  --play: #b5784f;
  --cyan: #7cbcb8;
  --link: #7cbcb8;
  --px: 'Tykun Pixel', monospace;
  --read: 'Tykun Sans', sans-serif;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--read);
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: var(--consent-room, 0px); /* M1-D50 (C21): ads.js sets it to the ads band's height while the band shows, so the page's end scrolls clear of it */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M32 0H0V32' fill='none' stroke='%237cbcb8' stroke-opacity='.07'/%3E%3C/svg%3E");
}

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

a { color: var(--link); text-decoration: underline; }
strong { color: var(--head); }
code { font-size: 0.9em; color: var(--head); }

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

/* The page */

.frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

main {
  min-width: 0;
  max-width: 1380px;
  margin: 0;
  padding: 0 32px 32px;
}

h1, h2, h3 { color: var(--head); }
h1 { font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -0.3px; max-width: 1080px; margin: 36px 0 6px; }
/* a note's and a text page's heading: Tykun Pixel at 32 px, a rule under it (a panel's name, below, is Tykun Sans) */
h2 { font-family: var(--px); font-weight: 400; letter-spacing: 0; font-size: 32px; line-height: 32px; margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--rule); }
h3 { font-size: 19px; font-weight: 700; margin: 12px 0 4px; }
h1 em { font-style: normal; color: var(--cyan); }

.lede, .blurb, .tagline { font-size: 20px; }

/* The notice band, across the top (hidden until site.js shows it) */

#lang-notice {
  background: var(--deep);
  border-bottom: 2px solid var(--rule);
  color: var(--text);
  font-family: var(--px);
  font-size: 16px;
  margin: 0;
  padding: 8px 16px;
}

/* The rail: bronze, sticky, the wordmark, the blocks, the line (contract 4.6) */

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  background: var(--play);
  padding: 20px 16px;
  font-family: var(--px);
  color: var(--page);
}

.wordmark {
  display: block;
  margin-bottom: 20px;
  padding: 10px;
  border: 2px solid var(--page);
  color: var(--page);
  font-family: var(--px);
  font-size: 32px;
  line-height: 32px;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.rail nav { display: flex; flex-direction: column; gap: 6px; }

.rail nav .btn {
  display: flex; /* its text in the middle of its height when the phone's wrapping row stretches it (M1-D26), left-set as a block's */
  align-items: center;
  justify-content: flex-start;
  background: var(--page);
  border: 0;
  border-radius: 0;
  color: var(--head);
  padding: 9px 12px;
}

.rail nav .btn:hover { background: var(--deep); }
.rail nav .btn[data-lang] { background: none; border: 2px solid var(--page); color: var(--page); }
.rail nav .btn[data-lang]:hover { background: none; border-color: var(--head); color: var(--head); }

.rail-line { margin: 24px 0 0; font-family: var(--px); font-size: 16px; line-height: 1.25; text-transform: uppercase; color: var(--page); }

.rail :focus-visible { outline-color: var(--head); }

/* The footer, last in main: a bronze line over a row that wraps */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 28px;
  border-top: 4px solid var(--play);
  padding: 14px 0 0;
  font-family: var(--px);
  font-size: 16px;
  color: var(--soft);
}

.foot p { margin: 0; font-size: 16px; }
.foot p:nth-child(2) { display: flex; flex-wrap: wrap; gap: 6px; }
/* The four pills one height, stated: a pill alone on a wrapped line gets no stretch from a neighbour (M1-D47). A <button> does not take its parent's line-height, a link does: both take it, so the text sits on one line. */
.foot .btn { min-height: 32px; line-height: inherit; }

/* The slot (contract 4.14, A5): 300 px wide, last in the side column - beside the text from 1200 px, the last thing of the board below, centred.
   Hidden and empty until the band's accept un-hides it; its label's line and its unit's size are reserved from then, so nothing moves when an ad arrives.
   The frame and the label are drawn only around a filled unit (:has(), no script): a browser without it shows the ad bare.
   The frame is an inset outline (M1-D48): its outer edge is the box's edge, so it stands on the panels' edges and takes no room outside the box; the label is centred, 10 px in from the box's sides and 8 px under its top. */

.slot { display: none; }
.slot:not([hidden]) { display: block; width: 300px; max-width: 100%; margin: 0 auto; padding-top: 8px; }
.slot .slot-label { margin: 0; padding: 0 10px; text-align: center; font-family: var(--px); font-size: 16px; line-height: 22px; color: var(--soft); visibility: hidden; }
.slot .unit-side { display: block; width: 300px; max-width: 100%; height: 250px; }
.slot:has(ins[data-ad-status="filled"]) { background: var(--deep); outline: 2px dashed var(--rule-strong); outline-offset: -2px; }
.slot:has(ins[data-ad-status="filled"]) .slot-label { visibility: visible; }

@media (min-width: 1200px) {
  .slot:not([hidden]) { margin: 0; }
  .slot .unit-side { height: 600px; }
}

/* Pictures */


/* Small print: notes, dates, the needs line, the references, the privacy contact */

.note, .needs, .eta, .eta-joke, .eta-counted, .refs, .privacy-contact { color: var(--soft); font-size: 16px; }
.eta-joke, .eta-counted { font-style: italic; }
.revised { color: var(--soft); font-family: var(--px); font-size: 16px; }

/* Buttons: pills (contract 4.5). A link in running text is an underlined word in --link; no button is underlined.
   A flex box with its text in the middle (M1-D26): a row that stretches a pill to its tallest neighbour's height leaves the text centred; a wrapped two-line pill keeps its lines left-set. */

.btn, a.play, .needs-computer, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--px);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.btn, button { background: none; border: 2px solid var(--soft); color: var(--text); padding: 5px 15px; }
/* The pills' own `display` outranks the browser's `[hidden] { display: none }`: a hidden pill carries its own rule (M1-D44, the footer's button before `ads.js` shows it). */
.btn[hidden], button[hidden] { display: none; }
.btn.small { padding: 1px 12px; }

/* Play: the bronze pill */
a.play { background: var(--play); border: 2px solid var(--play); color: var(--page); padding: 7px 20px; }

/* the phone line (no link): shown on a phone by the touch rule of M1-T49a, nowhere else */
.needs-computer { display: none; border: 2px dashed var(--soft); color: var(--soft); padding: 5px 14px; }

#vv-reset { padding: 6px 16px; }

/* Tags and the "new" mark: Tykun Pixel on a flat ground, side by side */
.tag, .mark {
  background: var(--cyan);
  color: var(--page);
  font-family: var(--px);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0 6px;
}

.tag { display: inline-block; }
.tag + .tag, .tag + .mark { margin-left: 4px; }
.tag.live { background: var(--play); }
.tag.works { background: var(--soft); }
.panel > header .tag, .panel > header .mark { padding: 0 3px; }
.mark { margin-left: 8px; vertical-align: middle; }

.game-link { color: var(--soft); font-size: 16px; }

/* The home page (contract 4.7 as M2-D14 overrides it): a grid of game panels 14 px apart, one column at every width.
   The panels of a row are as tall as its tallest, so a panel without a picture never reads short beside one with it (M2-D9);
   the big panel keeps its own height. */

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; align-items: stretch; }
.grid > .panel.big { align-self: start; }
.grid > .panel { display: flex; flex-direction: column; }
.grid > .panel > .body { flex: 1; }
.grid .panel .pic img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 6; object-fit: cover; }
.grid .panel h2 { margin: 12px 0 4px; padding: 0; border: 0; font-family: var(--read); font-size: 19px; line-height: 1.6; font-weight: 700; color: var(--head); }
.grid .panel p { margin: 4px 0; font-size: 15.5px; line-height: 1.45; }
.grid .panel .warn { margin-top: 6px; font-size: 14px; color: var(--soft); }
.grid .panel .actions { margin: 12px 0 0; }
/* a panel's buttons wrap inside it, never run out of a narrow column (contract 0.14 item 7) */
.grid .actions a, .grid .actions a.play { white-space: normal; max-width: 100%; box-sizing: border-box; }
.panel > header .tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 3px; }
.panel > header .tags > * { margin-left: 0; }

/* the big panel: a flex column, its picture 176 px tall (the 16:6 crop from 721 px, M2-D14), its name in Tykun Pixel 32 px */
.panel.big { display: flex; flex-direction: column; }
/* Tykun Circuits' lamp picture has its bulb in the top fifth: its 16:6 crop starts at the top, not the middle (M2-D2) */
.grid .panel .pic img[src*="tykun-circuits-lamp-"] { object-position: 50% 0%; }
/* the big picture is its whole 1400×788 file at every width, scaled to the panel's width and never cropped: Space Tykun's `ascent`, the game's
   whole screen with its HUD (the lead at M2-TV4, M2-D24, C78; it replaces M2-D21's 176 px floor and the 16:6 crop, C75), anchored at the top */
.panel.big .pic img { height: auto; aspect-ratio: 1400 / 788; min-height: 0; object-fit: cover; object-position: 50% 0; }
.grid .panel.big h2 { margin: 4px 0 8px; font-family: var(--px); font-size: 32px; line-height: 32px; font-weight: 400; }

/* the home's side column: the log panel, then the slot, 14 px apart */
.side .panel.journal .all { margin: 12px 0 0; }

/* an actions row (contract 4.6): a flex row that wraps, 8 px apart, 12 px above; Play first and its line, then the buttons */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

.works-line { color: var(--soft); font-size: 14px; }

/* M2-D14 (the lead at M2-TV2: « larger and go down the page instead of looking like a mosaique »): from 721 px the grid stays one column, each
   panel the main column's width, one under another; the big panel's picture is its whole file (M2-D24, C78; the others keep the 16:6 crop),
   and a pill keeps its words on one line - a row too narrow for its pills breaks between them, never inside one. The phone is not touched. */
@media (min-width: 721px) {
  .grid .panel.big .pic img { height: auto; aspect-ratio: 1400 / 788; min-height: 0; }
  .grid .actions a, .grid .actions a.play { white-space: nowrap; }
}

/* The sheet head (contract 4.6): the sheet label, the h1, a line, an actions row; a 2 px rule under it */

.sheet { padding: 20px 0 16px; border-bottom: 2px solid var(--rule); }
.sheet-label { margin: 0 0 8px; font-family: var(--px); font-size: 16px; text-transform: uppercase; color: var(--play); }
.sheet h1 { margin: 0 0 10px; }
/* an actions row right under the h1 (a note's head, M1-D27, contract C14): 16 px, as in the status box */
.sheet h1 + .actions { margin-top: 16px; }
.sheet .line { margin: 0; color: var(--soft); }

/* A game page (contract 4.7): the lede, then a grid of two columns 14 px apart (one at the fold); the figures and the theory panel are as wide as the grid
   where the contract says so; a figure fills its panel with its caption under it */

.sheet.game .line { max-width: 760px; font-size: 20px; color: var(--text); }
/* a row's panels keep their own height (M1-D30: no stretched empty bottom); from 900 px of window (M2-T58, C64, TW-W11: one column of every panel the grid's
   width below, as at the fold) the input panel spans two rows beside figures 2 and 3, stacked, so no figure stands alone in a row - the fourth row,
   figure 3's, takes what the table needs past figure 2 */
.gamegrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; align-items: start; }
.gamegrid > .panel { min-width: 0; }
.panel.fig figure { margin: 0; }
.panel.fig img { width: 100%; height: auto; }
.panel.fig figcaption { color: var(--soft); font-family: var(--px); font-size: 16px; padding: 4px 12px 6px; }
.gamegrid .panel p:not([class]), .gamegrid .panel li { font-size: 15.5px; line-height: 1.45; margin: 6px 0; }
.gamegrid .panel li { margin: 5px 0; }
.panel .body ul, .panel .body ol { margin: 6px 0; padding-left: 22px; }
.gamegrid .panel > .body > :first-child { margin-top: 0; }
.gamegrid .game-link { margin: 14px 0 0; }
.controls { width: 100%; }
.controls th { font-family: var(--px); color: var(--play); }
.controls td:first-child { font-family: var(--read); font-size: 15px; color: var(--text); overflow-wrap: break-word; }
.controls td:last-child { font-family: var(--px); font-size: 16px; color: var(--cyan); }
.controls tbody tr { border-top: 1px solid var(--rule); }

@media (min-width: 900px) {
  .gamegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamegrid > .panel.wide { grid-column: span 2; }
  .gamegrid:has(> .fig + .fig) { grid-template-rows: auto auto auto 1fr auto; }
  .gamegrid > .panel:has(+ .fig + .fig) { grid-row: span 2; }
  /* M2-D3 (from 900 px with the two columns, C64): a procedure whose list runs to fifteen items (Tykun Circuits' twenty examples) takes the right column down to the theory, and spec, input
     and figures 2 and 3 stack on the left beside it - the fifth row, figure 3's, takes what the list needs past them; a list of ten keeps the rows above */
  .gamegrid:has(> .panel > .body > ol > li:nth-child(15)) { grid-template-rows: auto auto auto auto 1fr auto; }
  .gamegrid:has(> .panel > .body > ol > li:nth-child(15)) > .panel:not(.wide) { grid-column: 1; grid-row: auto; }
  .gamegrid:has(> .panel > .body > ol > li:nth-child(15)) > .panel:has(> .body > ol > li:nth-child(15)) { grid-column: 2; grid-row: 2 / span 4; }
}

/* The board: one column; from 1200 px a side column of 300 px where the page has one */

.board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.board > *, .panel > * { min-width: 0; }
.side { display: flex; flex-direction: column; gap: 14px; }

/* Below 1 200 px a game page's side column holds the slot alone, so what stands over it is the board's 20 px gap: it draws 14 (contract 4.14, the slot).
   Only while the slot is shown, so a page with no ad keeps its length; the home page and the notes keep the side column's own 14 between their children. */
@media not all and (min-width: 1200px) {
  .board > .side:has(> .slot:only-child:not([hidden])) { margin-top: -6px; }
}

@media (min-width: 1200px) {
  .board:has(> .side) { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* M2-T57 (contract 4.14 *A note's index before the note, below 1 200 px*, C62, TW-W13): where the board is one column, a note's side column (its index panel, a `nav`, then the slot) gives its children to the
   board, and the index is ordered first: the index, the text, then the slot when it shows. The index stands open (no fold, no script, no second copy); the markup is M1's, so the keyboard meets the text's links first. From 1 200 px
   nothing moves: M1's side column. The slot keeps the 14 px over it the board's 20 px gap leaves 6 short of (as a game page's, above). The home page's log panel (a `section`) is not matched. */
@media not all and (min-width: 1200px) {
  .board > .side:has(> nav.panel) { display: contents; }
  .board > .side > nav.panel { order: -1; }
  .board > .side:has(> nav.panel) > .slot:not([hidden]) { margin-top: -6px; }
}

/* M2-T56 (contract 4.14 *The board gives the side column's width back*, C61, TW-W16): a side column that holds the slot alone, while the slot is not shown (a game's page; the slot's markup is
   M1's, hidden and empty), takes no room at any width and the main part is the board's width. The rules read the slot's own `hidden`, so « Accept » (which un-hides it) brings M1's
   `minmax(0, 1fr) 300px` back in place; the home page's and a note's side columns hold a panel beside the slot and keep their room. */
.board > .side:has(> .slot[hidden]:only-child) { display: none; }
.board:has(> .side > .slot[hidden]:only-child) { grid-template-columns: minmax(0, 1fr); }

/* A panel: a label bar (a label, then an h2 or the tags at the right), a picture, a body */

.panel { background: var(--panel); border: 2px solid var(--rule); overflow-wrap: anywhere; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 6px; background: var(--deep); border-bottom: 2px solid var(--rule); font-family: var(--px); font-size: 16px; }
.panel > header .label { color: var(--play); flex-shrink: 0; }
.panel > header .label, .panel > header h2 { text-transform: uppercase; }
.panel > header h2 { margin: 0; padding: 0; border: 0; font-size: 16px; line-height: inherit; color: var(--soft); }
.panel > .pic { border-bottom: 2px solid var(--rule); }
.panel .body { padding: 10px 14px 14px; }

/* the text panel (a text page, a note): no label bar, at most 880 px; its words' paragraphs 17.5 px (the small print keeps its class's 16 px) */
.panel.text { max-width: 880px; }
.panel.text > .body { padding: 6px 32px 24px; }
.panel.text > .body > p:not([class]), .works-box p:not([class]) { font-size: 17.5px; line-height: 1.45; }
.panel.text > .body > p:not([class]) { margin: 10px 0; }
.panel.text li { font-size: 15.5px; line-height: 1.45; margin: 5px 0; }

/* the note's index (contract 4.5): blocks with no frame, square, --cyan, padding 4 px 0, 4 px apart, one to a line, the number and its heading left-set (the two spaces after the number stay) */
.panel .btn.toc { display: block; margin: 0 0 4px; padding: 4px 0; border: 0; border-radius: 0; color: var(--cyan); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The log panel's entries, on the home page and the news page: the date in bronze, the words, a small button, a dashed line under each */

.log { list-style: none; margin: 0; padding: 0; }
.log li { border-bottom: 2px dashed var(--rule); padding: 10px 0; }
.log p { margin: 4px 0; font-size: 14.5px; line-height: 1.45; }
.log time { color: var(--play); font-family: var(--px); font-size: 16px; }
.entry-link { margin-top: 6px; }

/* A note's work-in-progress box and the ETA lines */

.works-box { border: 2px solid var(--rule); background: var(--deep); margin: 20px 0; }
.works-box > header { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 6px; background: var(--page); border-bottom: 2px solid var(--rule); font-family: var(--px); font-size: 16px; }
.works-box > header .label { color: var(--play); flex-shrink: 0; }
.works-box > header .label, .works-box > header h2 { text-transform: uppercase; }
.works-box > header h2 { margin: 0; padding: 0; border: 0; font-size: 16px; line-height: inherit; color: var(--soft); }
.works-box > .body { padding: 10px 20px 16px; }
.works-box p { margin: 6px 0; }
/* its actions row (M1-D27, contract C14): 16 px over the button, the contract's 12 and 4 more, so the box reads as text, then an action */
.works-box > .body > .actions { margin-top: 16px; }
.works-box > .body > :first-child { margin-top: 0; }
.works-box > .body > :last-child { margin-bottom: 0; }

/* Tables: a game's keys, the notes' tables */

table { border-collapse: collapse; font-size: 15px; max-width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 3px 18px 3px 0; }
/* a table's cell breaks between words, never inside one: `.panel`'s overflow-wrap: anywhere counts every letter as a break in the column's min-content and shrinks it to one (M1-D28) */
.panel th, .panel td { overflow-wrap: normal; word-break: normal; }
th { color: var(--play); font-family: var(--px); font-size: 16px; font-weight: 400; }
tbody tr { border-top: 1px solid var(--rule); }

/* Equations, left-set, no rule beside them: Temml's display MathML carries an inline display:block math, so the rule wins with !important */

math { color: var(--head); }

math[display=block], math.tml-display {
  display: block !important;
  margin: 12px 0 !important;
  padding: 4px 0 !important;
  text-align: left !important;
  font-size: 1.15em;
}

/* The equations' boxes (contract 4.8, the build's step 3): a display one a left-set block, an inline one an inline block, each scrolling sideways inside the
   screen when it is wider - Chrome lays a display:block math out without honouring overflow-x, so the box carries it */

.eq { display: block; margin: 14px 0; max-width: 100%; overflow-x: auto; text-align: left; }
.eq-i { display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: middle; }

/* the cue that a box scrolls (M2-D10): a touch screen's scrollbar is an overlay, drawn only while a finger moves, so a box wider than the column looked cut.
   A copper shade marks each edge the equation continues past; the panel-coloured covers scroll with the equation and hide the shade at an edge it ends at,
   so a box that fits shows nothing. Every box sits on a panel (var(--panel)). The shades stand 1 px in from the right, the top and the bottom: a cover's
   edge is the scrolled size, a whole pixel, where the box's own may be a fraction past it, and a hairline of shade showed at the box's edge. */
.eq, .eq-i {
  background:
    linear-gradient(to right, var(--panel) 50%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(to left, var(--panel) 50%, transparent) right / 28px 100% no-repeat local,
    linear-gradient(to right, color-mix(in srgb, var(--play) 70%, transparent), transparent) left center / 10px calc(100% - 2px) no-repeat scroll,
    linear-gradient(to left, color-mix(in srgb, var(--play) 70%, transparent), transparent) right 1px center / 10px calc(100% - 2px) no-repeat scroll;
}

/* an inline equation and the punctuation after it, on one line (M2-D10): the build wraps the pair in `.eq-n` (section 2.7 step 3) */
.eq-n { white-space: nowrap; }

/* The calculator (#orbit) and the equation explorer (#vv) */

/* each a frame reaching 12 px past the text on each side (contract 4.7, The tools) */
#orbit, #vv { border: 2px solid var(--play); background: var(--deep); font-size: 16px; padding: 4px 20px 18px; margin: 22px -12px; }
#orbit label, #vv label { color: var(--soft); }
#orbit p, #vv p { margin: 10px 0; font-size: 16px; }
/* C66, the explorer's range line: the caption's size, 4 px under the r field's paragraph (its 10 px margin and this one's -6 px collapse to 4), wrapping inside the frame */
#vv .vv-note { margin: -6px 0 10px; font-size: 14px; color: var(--soft); }
#orbit > h2, #vv > h3:first-child { font-family: var(--px); font-weight: 400; font-size: 32px; line-height: 32px; color: var(--play); margin: 18px 0 8px; padding: 0; border: 0; }
#orbit h3:not(:first-child) { font-family: var(--px); font-size: 16px; font-weight: 400; color: var(--cyan); }

output { color: var(--head); font-family: var(--px); font-size: 16px; font-variant-numeric: tabular-nums; }

input[type=range] { accent-color: var(--play); width: 100%; max-width: 420px; vertical-align: middle; }

input[type=number] {
  appearance: none;
  background: var(--panel);
  border: 2px solid var(--rule-strong);
  color: var(--text);
  font: inherit;
  padding: 3px 8px;
  width: 7em;
}

/* the explorer's fields: the slider fills what is left of its box's row, onto the next only when 120 px no longer fit (M0-D40) */
#vv > p:has(> input[type=range]) { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
#vv > p:has(> input[type=range]) > label { margin-right: 0.3em; }
#vv input[type=range] { flex: 1 1 0; min-width: 120px; max-width: 280px; margin-left: 0.6em; }

[aria-invalid=true] { outline: 2px solid var(--play); outline-offset: 1px; }

button { appearance: none; }

.btn:hover, button:hover { border-color: var(--link); }

.orbit-readouts { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 12px 0; }
.orbit-readouts dt { margin-top: 8px; }
.orbit-readouts dd { margin: 0; }

/* the label takes what is left and wraps, the value's column as wide as its widest value: a French label beside its value at 768 px must not push the page wide (M1-T49b) */
@media (min-width: 721px) {
  .orbit-readouts { grid-template-columns: minmax(0, 1fr) minmax(7em, max-content); }
  .orbit-readouts dt { margin-top: 0; }
  .orbit-readouts dd { text-align: right; }
}

.orbit-fate { font-size: 16px; margin: 14px 0; }

#orbit-draw {
  display: block;
  height: auto;
  width: 100%;
  max-width: 400px;
  margin: 16px 0;
  background: var(--deep);
  border: 2px solid var(--rule);
}

#orbit-draw text { fill: var(--soft); font-family: var(--read); font-size: 13px; }

/* the explorer's read-outs: one column under 720 px (contract 4.15), from 720 px each sentence beside its value inside the text
   column; each bar under its line and as wide (the dd's box dropped, so its output and its track are the grid's own items) (M0-D40) */
.vv-terms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; align-items: baseline; margin: 12px 0; }
.vv-terms dt { margin-top: 8px; }
.vv-terms dd { display: contents; }

@media (min-width: 721px) {
  .vv-terms { grid-template-columns: minmax(0, 1fr) minmax(9em, max-content); }
  .vv-terms dt { grid-column: 1; }
  .vv-terms output { grid-column: 2; text-align: right; }
}

/* the explorer's orbit (contract 4.9): in the flow its svg in a 2 px frame (the svg's own, so the picture is as wide as its column) as wide as the column up to 400 px; from 1 400 px the explorer is two columns,
   the figure in the second (280 px) from the heading's row down, every other child in the first */
#vv-figure { margin: 16px 0; max-width: 400px; }
#vv-draw { display: block; width: 100%; height: auto; background: var(--deep); border: 2px solid var(--rule); }
#vv-draw text { fill: var(--soft); font-family: var(--read); font-size: 18px; }
#vv-figure figcaption { font-size: 14px; color: var(--soft); margin-top: 6px; }

@media (min-width: 1400px) {
  #vv { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 20px; align-items: start; }
  #vv > * { grid-column: 1; }
  #vv > #vv-figure { grid-column: 2; grid-row: 1 / span 9; margin: 18px 0 0; }
}

.vv-line { margin: 14px 0; }
.vv-track { grid-column: 1 / -1; display: block; height: 8px; margin-top: 4px; background: var(--rule); }
.vv-bar { display: block; height: 100%; width: 0; background: var(--play); }
.vv-bar.vv-neg { background: var(--soft); }

/* The fold (contract 4.8, M1-T49b): at 720 px or less, on any screen - a narrow window of a computer too - the frame is one column, the rail a band
   (the wordmark, the nav's blocks in a row that wraps, no line), every grid one column, the tools' frames and the note's body narrower.
   The computer layout starts at 721 px (the grids' and the read-outs' min-width rules above). */

@media (max-width: 720px) {
  .frame { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .rail { position: static; min-height: 0; padding: 12px 16px; }
  .wordmark { display: inline-block; margin-bottom: 10px; }
  .rail nav { flex-direction: row; flex-wrap: wrap; }
  .rail-line { display: none; }
  main { padding: 0 16px 24px; }
  #lang-notice { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 16px; line-height: 1.4; }

  .board, .grid, .gamegrid { grid-template-columns: minmax(0, 1fr); }
  .grid > .panel.big, .gamegrid > .panel.wide { grid-column: auto; }
  .panel.text > .body { padding: 4px 16px 18px; }
  #orbit, #vv { padding: 4px 12px 14px; margin: 22px -8px; }
  #orbit > h2, #vv > h3:first-child { font-size: 16px; line-height: 1.4; }
  .orbit-readouts, .vv-terms { grid-template-columns: minmax(0, 1fr); }
  .orbit-readouts dt, .vv-terms dt { grid-column: auto; margin-top: 8px; }
  .vv-terms output { grid-column: auto; text-align: left; }
  .controls { font-size: 15px; }

  /* every button's text may wrap inside its box, never run out of the screen */
  .btn, a.play, .needs-computer, button { white-space: normal; max-width: 100%; }

  /* By touch (contract 4.8): a finger's targets - the ranges 44 px tall and as wide as their frame, the number fields 44 px with 18 px text,
     the reset 44 px; every other button is at least 24 px tall already (its padding and its line) - and both drawings as wide as their frame, up to 400 px */
  #orbit input[type=range], #vv input[type=range] { display: block; height: 44px; width: 100%; max-width: none; margin: 0; }
  #vv > p:has(> input[type=range]) > input[type=range] { flex: 1 1 100%; }
  input[type=number] { min-height: 44px; font-size: 18px; }
  #vv-reset { min-height: 44px; }
  #orbit-draw, #vv-draw { display: block; width: 100%; max-width: 400px; height: auto; }
}

/* « A phone » (contract 4.8, M1-T49a): a touch-only screen - a phone or a tablet, whatever its width, never a width - has no Play and no
   early version to open; each shows its line (a span, no link) in its place. A computer, a touchscreen laptop included, keeps Play.
   The one exit (m2 contract 0.43, C104): a game whose own project ships for phones - its data file says "phones": true - gets the
   class `phones` on its Play and no line after it, so that Play stays shown here. */

@media (hover: none) and (pointer: coarse) {
  a.play:not(.phones) { display: none; }
  .needs-computer { display: inline-flex; }
}

/* The ads band (contract 4.14 *Its look*, M1-T73): fixed to the bottom of the window, above everything, not a blocking dialog.
   Its two buttons are the look's pill and nothing more - one rule for both, none names a data-consent value. */

.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--deep);
  border-top: 4px solid var(--play);
  padding: 14px 16px;
}
.consent[hidden] { display: none; }
.consent-in { max-width: 880px; margin: 0 auto; }
.consent p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--text); }
.consent-in > :first-child { margin-top: 0; }
.consent .consent-title { font-family: var(--px); font-size: 16px; color: var(--play); text-transform: uppercase; } /* two classes: `.consent p` (a class and an element) would outrank one */
.consent .consent-note { font-size: 14px; color: var(--soft); }
.consent-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-content: start; gap: 8px; } /* M1-D46, C22 (M1-D53): a block grid is as wide as the band's row, so on a computer the two choices are two equal columns of half the row each (436 px of the band's 880); the words' width is the 480 px rule's */
@media (max-width: 480px) { .consent-actions { grid-auto-flow: row; grid-auto-columns: max-content; } } /* one under the other where French's pair (218 + 8 + 218 px) no longer fits: the column takes the wider word's width (114 px in English, 218 px in French) */
.consent-more { display: flex; flex-wrap: wrap; gap: 8px; }

@media (hover: none) and (pointer: coarse) {
  .consent .btn { min-height: 44px; }
}
