/* Design 1. Loaded after hero.css, which is the hero, the navbar and the
   page base copied from the current stylesheet. This file holds the tokens
   the hero reads, the fonts (relative paths, so the page opens from disk),
   and everything below the hero. */

/* THE THEME. The page wears one of two themes, the night's and the paper's, and a theme is one ground: the hero, every section, the bar and the footer stand on it
   (no third ground, no tinted band). theme-boot.js puts data-theme="light" or "dark" on <html> before the first paint (and it is dark where there is no script, as the
   hero is); every colour of the page that is not a pillar's is one of these tokens, or is made from them, so a component is written once and both themes follow. Custom
   properties cross a shadow root, which is how the sections read them (sections/sx.css). The names are the documentation's (--bg, --fg ... under a th- prefix), and the
   key it stores the choice under is the same, "drift-theme".
     --th-bg, --th-fg          the ground and the ink on it; -rgb for a wash of either: rgb(var(--th-fg-rgb) / .09)
     --th-fg-2, --th-fg-3      the second and third text tones; --th-hair, --th-hair-2: the two hairlines
     --th-surface, --th-surface-2   a card on the ground, and a card on a card; --th-foot-bg: the foot's ground */
:root {
  color-scheme: dark;
  --th-bg: #0b1224; --th-bg-rgb: 11 18 36;
  --th-fg: #ffffff; --th-fg-rgb: 255 255 255;
  --th-fg-2: rgb(255 255 255 / .74); --th-fg-3: rgb(255 255 255 / .46);
  --th-hair: rgb(255 255 255 / .2); --th-hair-2: rgb(255 255 255 / .1);
  --th-surface: #0f1830; --th-surface-2: #16213d;
  --th-foot-bg: #0b1224;
  /* the hero's map: the land's ink ("r,g,b", which hero-halftone.js reads as --hh-ink and reads again when the theme changes), how far the canvas is dimmed under the words in the two layouts,
     and the line that stays under "sovereign." (the ink's second tone as a solid colour, so that it covers the three coloured lines under it and does not fuse with the "g") */
  --th-hh-ink: 150,160,178; --th-hh-shade: .58; --th-hh-land: 1; --th-hh-colors: #f1a006,#8269eb,var(--th-canvas); --th-hh-dim-side: brightness(.87); --th-hh-dim-stacked: brightness(.7); --th-fg-2-solid: #c0c1c6;
  /* a pillar's name as a word: on the night the word may carry the pillar's colour; on paper it is the ink, underlined in the pillar's colour (a pillar's colour is for shapes,
     lines and dots, not for a word on paper) */
  /* the two prices in the open card's list: the provider's, in red, and Drift's, in green (the only red on the page, and a green that is not a pillar's) */
  --th-cost-prov: #f87171; --th-cost-drift: #34d399;
  --th-pw-a: #f1a006; --th-pw-b: #8269eb; --th-pw-c: #10b981; --th-pw-line: none;
  /* Canvas green as the ink of a figure (the grid's -47%) and as the map's third colour: the pillar's own on the night, and on paper the deeper green the map has (the pillar's own is 2.5 : 1 on
     white, which a figure cannot be) */
  --th-canvas: #10b981;
  /* the four plates of the jurisdiction, the top one the brightest: one ramp of greys, white at its head on the night and the ink at its head on paper */
  --th-plate-1: #ffffff; --th-plate-2: #a9b4d0; --th-plate-3: #74829f; --th-plate-4: #46536f;
  /* the chevron of a select (a picture cannot read a colour token, so there is one of each) */
  --th-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E");
}
:root[data-theme="light"] {
  color-scheme: light;
  --th-bg: #ffffff; --th-bg-rgb: 255 255 255;
  --th-fg: #1b2844; --th-fg-rgb: 27 40 68;
  --th-fg-2: #46536f; --th-fg-3: #66718a;
  --th-hair: rgb(27 40 68 / .22); --th-hair-2: rgb(27 40 68 / .1);
  --th-surface: #f3f4f8; --th-surface-2: #e7e9f0;
  --th-foot-bg: #f3f4f8;
  --th-hh-ink: 168,177,194; --th-hh-shade: .8; --th-hh-land: 1; --th-hh-colors: #d98600,#6b50dd,var(--th-canvas); --th-hh-dim-side: none; --th-hh-dim-stacked: none; --th-fg-2-solid: #46536f;
  --th-cost-prov: #b91c1c; --th-cost-drift: #047857;
  --th-pw-a: var(--th-fg); --th-pw-b: var(--th-fg); --th-pw-c: var(--th-fg); --th-pw-line: underline;
  --th-canvas: #08976a;
  --th-plate-1: #1b2844; --th-plate-2: #46536f; --th-plate-3: #74829f; --th-plate-4: #a9b4d0;
  --th-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%231b2844' stroke-width='1.2'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E");
}

:root {
  --brand-1: #f1a006;
  --brand-2: #8269eb;
  --brand-3: #10b981;
  --ink: var(--th-fg);
  --ink-darker: #131d30;
  --ink-darkerer: #0e1625;
  --ink-darkererer: rgb(14, 23, 39);
  --ink-darkest: #070c15;
  --on-brand: #1b2844;
  --on-brand-muted: #1b2844de;
  --toy-edge: var(--ink);
  --ink-subtle: #1b284476;
  --rule: var(--th-hair);
  --body: "Inter", "Inter Fallback", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: var(--th-bg);
  --panel: var(--th-bg);
  --muted: var(--th-fg-2);
  --display: "Mozilla Text", "Mozilla Text Fallback", "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 4px 4px 0 var(--toy-edge);
  --page-max: 1600px;
  --padding: max(10vw, (100vw - var(--page-max)) / 2);  /* The consoles' own colours. */
  --con: #1b2844;
  --con-bar: #131d30;
  --con-rule: #2d3f66;
  --con-label: #9db0d3;
  --con-text: #e6edf7;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-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: 'Mozilla Text';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/mozilla-text-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: 'Tinos';
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url('fonts/tinos-italic-700-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;
}

.tone-a { --tone: var(--brand-1); --tone-ink: var(--on-brand); }
.tone-b { --tone: var(--brand-2); --tone-ink: #ffffff; }
.tone-c { --tone: var(--brand-3); --tone-ink: var(--on-brand); }
.tone-d { --tone: var(--ink);     --tone-ink: #ffffff; }
.tone-e { --tone: var(--panel);   --tone-ink: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.dark :focus-visible, .band-dark :focus-visible { outline-color: #fff; }

/* No scrollbar anywhere on the site, on the page and on anything that scrolls (the front page and the changelog both load this file; a section's shadow
   root has the same two lines in sections/sx.css, since a page rule does not reach into it). What scrolls still scrolls: by the wheel, the keys, a swipe
   and the pager. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

.container { padding: 0 var(--padding); width: 100%; }
.band { padding: 56px 0 64px; border-bottom: 2px solid var(--ink); }
.band-desk { background: var(--bg); }
.band-white { background: var(--panel); }
.band-dark { background: var(--ink-darker); color: #fff; }
.band-darkest { background: var(--ink-darkest); color: #fff; }

.band h2 {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 500;
  margin: 0 0 12px;
}
.band-dark h2, .band-darkest h2 { color: #fff; }
.lead { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0; max-width: 46ch; }
.band-dark .lead { color: #c3cde2; }

/* ---------- Section 1: write, apply, live ---------- */
.how-head { margin-bottom: 36px; }
.triptych {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 28px minmax(0, 1fr) 28px minmax(0, .9fr);
  align-items: stretch;
  gap: 0 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tri-arrow {
  align-self: center;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}
.tri-cell { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tri-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0;
  letter-spacing: -.02em;
}
.tri-n {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font-size: 15px; font-weight: 800; background: var(--tone, var(--brand-1)); color: var(--tone-ink, var(--on-brand));
}
.tri-note { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }

/* A console: the consoles' dark panel on three stepped plates. */
.console {
  position: relative;
  background: var(--con);
  color: var(--con-text);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--brand-3), 12px 12px 0 var(--brand-2), 18px 18px 0 var(--brand-1);
  margin-right: 18px; margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  min-width: 0;
}
.console-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--con-bar);
  border-bottom: 2px solid var(--con-rule);
  font-size: 12px; color: var(--con-label);
}
.console-bar b { color: var(--con-text); font-weight: 700; }
.console pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: inherit; white-space: pre; }
.console .kw { color: #f6b73c; font-weight: 600; }
.console .str { color: #6ee7b7; }
.console .cmt { color: var(--con-label); font-style: italic; }
.console .dim { color: var(--con-label); }
.console .ok { color: #6ee7b7; }
.console .add { color: #6ee7b7; }

.grp { display: block; border-left: 3px solid transparent; padding-left: 8px; margin-left: -11px; transition: background .12s ease, border-color .12s ease; }
.grp.tone-a.is-hot { background: rgb(241 160 6 / .16); border-left-color: var(--brand-1); }
.grp.tone-b.is-hot { background: rgb(130 105 235 / .26); border-left-color: var(--brand-2); }
.grp.tone-c.is-hot { background: rgb(16 185 129 / .18); border-left-color: var(--brand-3); }

.term-line { display: block; min-height: 1.65em; }
.js .term-line { visibility: hidden; }
.js .term-line.is-on { visibility: visible; }

/* The live card: a browser with the slice's address and what answers there. */
.live {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  margin-right: 6px; margin-bottom: 18px;
}
.live-bar {
  padding: 9px 14px; border-bottom: 2px solid var(--ink); background: #f3f3f3;
  font-family: var(--mono); font-size: 12px; color: var(--ink); overflow-wrap: anywhere;
}
.live-body { padding: 16px; display: grid; gap: 10px; }
.live-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border: 2px solid var(--ink); background: var(--panel);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.live-tile .tile {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  background: var(--tone); color: var(--tone-ink); border: 2px solid var(--ink);
}
.live-tile .tile svg { width: 20px; height: 20px; }
.live-tile.is-hot { background: var(--tone); color: var(--tone-ink); box-shadow: 3px 3px 0 var(--ink); transform: translate(-2px, -2px); }
.live-tile.is-hot .tile { background: var(--panel); color: var(--ink); }
.live-foot { margin: 0; padding: 0 16px 14px; font-size: 13px; color: var(--muted); }
.js .live-tile, .js .live-foot { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.js .live.is-on .live-tile, .js .live.is-on .live-foot { opacity: 1; transform: none; }
.js .live.is-on .live-tile:nth-child(2) { transition-delay: .12s; }
.js .live.is-on .live-tile:nth-child(3) { transition-delay: .24s; }
.js .live.is-on .live-foot { transition-delay: .36s; }
.js .live.is-on .live-tile.is-hot { transform: translate(-2px, -2px); }

.replay {
  align-self: flex-start;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background: none; border: 0; border-bottom: 2px solid var(--brand-1); padding: 2px 0; cursor: pointer;
}
.replay[hidden] { display: none; }

/* ---------- Section 2: the calculator ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.presets { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 8px; }
.preset {
  width: 100%;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 14px; text-align: left;
  font: inherit; font-size: 15px; color: #fff;
  background: var(--ink-darkerer); border: 2px solid var(--con-rule);
  cursor: default;
}
.preset b { font-family: var(--display); font-size: 17px; white-space: nowrap; }
.js .preset { cursor: pointer; }
.js .preset:hover { border-color: #fff; }
.preset[aria-pressed="true"] { background: var(--brand-1); color: var(--on-brand); border-color: var(--ink); box-shadow: 3px 3px 0 #fff; }
.calc {
  background: var(--panel); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--brand-3), 12px 12px 0 var(--brand-2), 18px 18px 0 var(--brand-1);
  margin: 0 18px 18px 0;
  padding: 24px 26px;
}
.calc[hidden] { display: none; }
.calc-rows { display: grid; gap: 18px; }
.calc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.calc-row label { font-weight: 600; font-size: 15px; }
.calc-row .val { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.calc-row input { grid-column: 1 / -1; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track { height: 6px; background: var(--ink); border: 0; }
input[type=range]::-moz-range-track { height: 6px; background: var(--ink); border: 0; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px;
  background: var(--tone, var(--brand-1)); border: 2px solid var(--ink); border-radius: 0; box-shadow: 2px 2px 0 var(--ink);
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; background: var(--tone, var(--brand-1)); border: 2px solid var(--ink); border-radius: 0; box-shadow: 2px 2px 0 var(--ink);
}
.calc-out {
  margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap;
}
.calc-total { font-family: var(--display); font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.calc-total small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.receipt { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink); min-width: 220px; }
.receipt li { display: flex; justify-content: space-between; gap: 14px; }
.calc-foot { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.calc-foot code { font-family: var(--mono); color: var(--ink); font-weight: 600; }

/* ---------- Section 3: the bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none; margin: 32px 0 0; padding: 0;
}
.tile-card {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px 18px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  min-height: 200px;
}
.tile-card.span2 { grid-column: span 2; }
.tile-card.tone-a { background: var(--brand-1); }
.tile-card.tone-b { background: #6a50d8; color: #fff; }
.tile-card.tone-c { background: var(--brand-3); }
.tile-card.tone-d { background: var(--ink); color: #fff; }
.tile-card.tone-b .t-text, .tile-card.tone-d .t-text { color: #e6edf7; }
.t-fig { font-family: var(--display); font-size: clamp(48px, 5vw, 72px); font-weight: 700; letter-spacing: -.06em; line-height: .95; }
.t-fig.sm { font-size: clamp(34px, 3.4vw, 48px); }
.t-head { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.t-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--on-brand-muted); }
.tile-card:not([class*="tone-"]) .t-text { color: var(--muted); }
.t-link {
  margin-top: auto; padding-top: 8px;
  font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px;
  color: inherit; align-self: flex-start;
}
.t-link:hover { text-decoration-color: var(--brand-1); }
.tile-card.tone-a .t-link:hover, .tile-card.tone-c .t-link:hover { text-decoration-color: var(--ink); }
.langs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.langs li { font-family: var(--mono); font-size: 12px; padding: 1px 7px; border: 2px solid var(--ink); background: rgb(255 255 255 / .85); color: var(--ink); }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.versus .vl { display: block; margin: 0 0 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--con-label); }
.versus ul { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.6; }
.versus .no li { text-decoration: line-through; text-decoration-color: var(--brand-1); text-decoration-thickness: 2px; color: #c3cde2; }
.versus .yes li::before { content: "+ "; color: #6ee7b7; font-family: var(--mono); }

/* ---------- Section 4: the bang ---------- */
.bang { text-align: left; }
.bang-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.bang h2 { font-size: clamp(40px, 5.6vw, 80px); line-height: .92; letter-spacing: -.07em; margin-bottom: 0; }
.bang h2 span { display: block; }
.bang h2 .t1 { color: var(--brand-1); }
.bang h2 .t2 { color: #b3a3ff; }
.bang h2 .t3 { color: var(--brand-3); }
.bang h2 .t4 { color: #fff; }
.cmd {
  display: flex; align-items: center; gap: 10px;
  background: var(--con); border: 2px solid var(--con-rule);
  box-shadow: 6px 6px 0 var(--brand-3);
  padding: 12px 14px; margin: 0 6px 6px 0;
  font-family: var(--mono); font-size: 14px; color: var(--con-text);
}
.cmd + .cmd { margin-top: 18px; }
.cmd .p { color: var(--brand-1); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: inherit; }
.copy {
  font: inherit; font-family: var(--body); font-size: 12px; font-weight: 700;
  padding: 4px 10px; background: var(--panel); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--brand-1); cursor: pointer;
}
.copy:active { transform: translate(2px, 2px); box-shadow: none; }
.cmd-label { margin: 22px 0 8px; font-size: 14px; color: #c3cde2; }
.cmd-label:first-child { margin-top: 0; }
.bang .actions { margin-top: 30px; }
.bang .button { transform: none; }
.bang .secondary { background: transparent; color: #fff; border-color: #fff; box-shadow: 0 4px 0 #fff; }
.bang .primary { border-color: #fff; box-shadow: 0 4px 0 #fff; }
.bang .button:hover { transform: translateY(-2px); }
.bang .button:active { transform: translateY(4px); box-shadow: none; }
.alpha-note { margin: 22px 0 0; font-size: 14px; color: #c3cde2; }
.alpha-note b { color: #fff; }

/* ---------- Footer ---------- */
.foot { background: var(--th-foot-bg); color: var(--th-fg-2); }
.foot-accent { display: flex; height: 6px; }
.foot-accent span { flex: 1; }
.foot-accent span:nth-child(1) { background: var(--brand-1); }
.foot-accent span:nth-child(2) { background: var(--brand-2); }
.foot-accent span:nth-child(3) { background: var(--brand-3); }
.foot-inner { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 32px; padding: 40px var(--padding) 28px; }
.foot-logo { font-family: 'Tinos', serif; font-weight: 700; font-style: italic; font-size: 2.2rem; line-height: 1; color: var(--th-fg); display: inline-block; }
.foot-logo .lg { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 3px; }
.foot-logo .lg-1 { text-decoration-color: var(--brand-1); }
.foot-logo .lg-2 { text-decoration-color: var(--brand-2); }
.foot-logo .lg-3 { text-decoration-color: var(--brand-3); }
.foot-logo .lg-4, .foot-logo .lg-5 { text-decoration-color: var(--th-fg); }
.foot p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.foot .foot-h { font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--th-fg); margin: 0 0 10px; }
.foot nav a { display: block; padding: 3px 0; font-size: 14px; color: var(--th-fg-2); }
.foot nav a:hover { color: var(--th-fg); text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px var(--padding) 24px; border-top: 1px solid var(--th-hair); font-size: 13px; }
.alpha-tag { padding: 1px 7px; border: 1px solid var(--brand-1); color: var(--brand-1); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .triptych { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tri-arrow { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-grid, .bang-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .foot-inner { grid-template-columns: repeat(2, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
  .band { padding: 40px 0 48px; }
  .bento { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tile-card.span2 { grid-column: auto; }
  .tile-card { min-height: 0; }
  .versus { grid-template-columns: 1fr; gap: 10px; }
  .calc { padding: 18px 16px; margin-right: 12px; }
  .console { box-shadow: 4px 4px 0 var(--brand-3), 8px 8px 0 var(--brand-2), 12px 12px 0 var(--brand-1); margin-right: 12px; margin-bottom: 12px; }
  .console pre { font-size: 12px; }
  .bang .actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .js .term-line { visibility: visible; }
  .js .live-tile, .js .live-foot { opacity: 1; transform: none; transition: none; }
  .live-tile, .grp { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- THE THEME'S SWITCH (theme.js) ---------- */
/* One icon, a sun on the light theme and a moon on the dark one, in two places: the hero's foot, to the left of "Learn more", and the right end of the bar. It is a plain drawing like the
   rest of the page: no pill, no shadow. The two glyphs are one drawing that changes (data-mode on the button): the sun's disc grows and goes while the moon, a crescent, turns in in its place,
   and the rays turn and go in; going back, the moon turns out, the disc comes back and the rays turn out. Every part is a plain shape that turns and fades: there is no mask in it. */
.tsw-wrap { position: relative; display: inline-flex; flex: none; }
.tsw { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; background: none; color: var(--th-fg); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: opacity .6s ease, transform 1s cubic-bezier(.3, 1.4, .5, 1); }
.tsw:focus-visible { outline: 1px solid var(--th-fg-2); outline-offset: 1px; }
.tsw svg { display: block; width: 22px; height: 22px; overflow: visible; transition: transform .35s cubic-bezier(.22, .8, .24, 1); }
.tsw:hover svg { transform: scale(1.1); }
.tsw:active svg { transform: scale(.86); transition-duration: .1s; }
/* each part turns and grows about the middle of its own box (the disc and the rays are centred on the drawing's middle, and the crescent is near it) */
.tsw-core, .tsw-rays, .tsw-moon { transform-box: fill-box; transform-origin: center; }
.tsw-core { fill: currentColor; transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .45s ease; }
.tsw-rays { fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .4s ease; }
.tsw-moon { fill: currentColor; opacity: 0; transform: rotate(-70deg) scale(.55); transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .45s ease; }
.tsw:hover .tsw-rays { transform: rotate(22.5deg); }
/* the moon: the disc grown and gone, the crescent turned in in its place, the rays turned in */
.tsw[data-mode="dark"] .tsw-core { transform: scale(1.7); opacity: 0; }
.tsw[data-mode="dark"] .tsw-rays { transform: rotate(90deg) scale(.3); opacity: 0; }
.tsw[data-mode="dark"] .tsw-moon { opacity: 1; transform: none; }
/* it comes in: in the hero with the foot that holds it (the foot is disclosed once the line has been typed), in the bar with the bar (which is clear while the hero is on), after the
   words of the navigation have reeled in; it turns up out of nothing and settles */
html.js-reel .hero:not(.is-typed) .tsw { opacity: 0; transform: scale(.4) rotate(-140deg); transition: none; }
.hero .tsw { transition-delay: .8s; }
html.hdr-clear .site-header .tsw { opacity: 0; transform: scale(.4) rotate(-140deg); transition: none; }
.site-header .tsw { transition-delay: .55s; }
/* the name of the state it has gone to, for a second: above the icon in the hero, under it in the bar and ending where it ends */
.tsw-tip { position: absolute; left: 50%; bottom: calc(100% + 6px); padding: 6px 10px; font: 500 12px/1 var(--mono); letter-spacing: .06em; white-space: nowrap; color: var(--th-fg); background: var(--th-bg);
  border: 1px solid var(--th-hair); opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .18s ease, transform .22s cubic-bezier(.22, .8, .24, 1); }
.tsw-tip.show { opacity: 1; transform: translate(-50%, 0); }
.site-header .tsw-tip { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; transform: translate(0, -4px); }
.site-header .tsw-tip.show { transform: none; }
@media (max-width: 580px) {
  .site-header .tsw { width: 32px; height: 32px; }
  .site-header .tsw svg { width: 20px; height: 20px; }
}
/* on a phone (narrow, or held sideways) the hero has no switch: the bar's is the one, and it comes in with the first scroll */
@media (max-width: 580px), (max-height: 480px) and (pointer: coarse) {
  .hero .tsw-wrap { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tsw, .tsw *, .tsw-tip { transition-duration: .01s !important; transition-delay: 0s !important; }
  html.js-reel .hero:not(.is-typed) .tsw, html.hdr-clear .site-header .tsw { transform: none; }
}
/* the change of theme: every colour changes in one frame, so for that frame nothing transitions (theme.js), and the new page is revealed in a circle from the button over the old one */
:root[data-theme-switching] *, :root[data-theme-switching] *::before, :root[data-theme-switching] *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
