/*
 * erXos landing page.
 *
 * One ink, one paper, one signal colour. Thin rules frame the panels, as on
 * a technical drawing; small monospace labels number the sections, as on a
 * front panel. The only motif is the status-light panel in the hero, drawn
 * with CSS.
 */

:root {
  --paper: #efede6;
  --panel: #f7f6f1;
  --ink: #121211;
  --muted: #55534d;
  --rule: #121211;
  --hair: #c9c6bc;
  --signal: #e2471a;
  --signal-dim: #e9d9cf;
  --led-off: #d9d5ca;
  --code-bg: #121211;
  --code-ink: #e9e6dd;
  --code-dim: #8f8b80;
  --code-prompt: #ff6a3d;

  /* The console's case: see Terminal below. */
  --case: #d8d3c4;
  --case-hi: #ebe7da;
  --case-lo: #b9b3a2;
  --case-edge: #a49d8a;
  --case-shadow: rgba(0, 0, 0, 0.18);
  --plate-ink: #3b3a35;
  --case-text: #23221f;
  --case-muted: #55534d;
  --case-alert: #9a2d0b;
  --lamp-off: #9e9886;
  --progress-groove: #f1eee6;
  --glass: #1b1b19;
  --glass-rim: #0c0c0b;
  --key: #ece8dc;
  --key-ink: #121211;
  --key-edge: #9d9784;
  --key-go-ink: #121211;
  --key-go-edge: #9e3010;
  --key-crash-ink: #9a2d0b;
  --grille: #c7c1b0;
  --grille-slot: #b3ad9b;

  --sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --gutter: 16px;
  --max: 1180px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f0f0e;
    --panel: #161614;
    --ink: #ece9e1;
    --muted: #a19d92;
    --rule: #ece9e1;
    --hair: #34322e;
    --signal: #ff5a2a;
    --signal-dim: #3a1f15;
    --led-off: #262522;
    --code-bg: #050505;
    --code-ink: #e9e6dd;
    --code-dim: #858176;
    --case: #3a3935;
    --case-hi: #4a4944;
    --case-lo: #2a2926;
    --case-edge: #1f1e1c;
    --case-shadow: rgba(0, 0, 0, 0.5);
    --plate-ink: #d6d2c6;
    --case-text: #ece9e1;
    --case-muted: #b3aea2;
    --case-alert: #ff8a65;
    --lamp-off: #23221f;
    --progress-groove: #23221f;
    --glass: #121211;
    --glass-rim: #050505;
    --key: #55534d;
    --key-ink: #ece9e1;
    --key-edge: #23221f;
    --key-go-ink: #121211;
    --key-go-edge: #9e3010;
    --key-crash-ink: #ffc2ad;
    --grille: #34332f;
    --grille-slot: #262522;
  }
}

:root[data-theme="dark"] {
  --paper: #0f0f0e;
  --panel: #161614;
  --ink: #ece9e1;
  --muted: #a19d92;
  --rule: #ece9e1;
  --hair: #34322e;
  --signal: #ff5a2a;
  --signal-dim: #3a1f15;
  --led-off: #262522;
  --code-bg: #050505;
  --code-ink: #e9e6dd;
  --code-dim: #858176;
  --case: #3a3935;
  --case-hi: #4a4944;
  --case-lo: #2a2926;
  --case-edge: #1f1e1c;
  --case-shadow: rgba(0, 0, 0, 0.5);
  --plate-ink: #d6d2c6;
  --case-text: #ece9e1;
  --case-muted: #b3aea2;
  --case-alert: #ff8a65;
  --lamp-off: #23221f;
  --progress-groove: #23221f;
  --glass: #121211;
  --glass-rim: #050505;
  --key: #55534d;
  --key-ink: #ece9e1;
  --key-edge: #23221f;
  --key-go-ink: #121211;
  --key-go-edge: #9e3010;
  --key-crash-ink: #ffc2ad;
  --grille: #34332f;
  --grille-slot: #262522;
}

/* ---- Base -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--signal);
}

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: var(--gutter);
  background: var(--ink);
  color: var(--paper);
  padding: 6px 10px;
  z-index: 10;
}

/* ---- Frame ------------------------------------------------------------- */

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

.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.label b {
  color: var(--signal);
  font-weight: 500;
}

/* The top bar reads like the strip above a front panel. */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.bar nav a {
  text-decoration: none;
}

/* ---- Hero -------------------------------------------------------------- */

/*
 * The hero is split: the pitch on the left, the live console on the right,
 * both above the fold on a desktop screen.
 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border-bottom: 1px solid var(--rule);
}

.hero-main {
  padding: 48px 40px 40px 0;
  border-right: 1px solid var(--rule);
}

.logo {
  display: block;
  width: min(100%, 420px);
  height: auto;
  color: var(--ink);
  margin: 0 0 32px -1.5%;
}

.hero h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  max-width: 17ch;
  margin-bottom: 20px;
}

.hero .lede {
  font-size: 17px;
  max-width: 34em;
  color: var(--ink);
}

.hero-side {
  padding: 48px 0 40px 40px;
}

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  border-top: 1px solid var(--hair);
}

.spec dt,
.spec dd {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}

.spec dt {
  padding-right: 20px;
}

.spec dd {
  font: 14px/1.4 var(--mono);
}

/* ---- Status lights ----------------------------------------------------- */

/*
 * A front panel of 16 x 8 lights, in the spirit of the Connection Machine.
 * Which lights burn, and how they blink, is chosen by nth-child patterns, so
 * the panel needs no script. Without motion the lit pattern stands still.
 */
.lights {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 7px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--rule);
}

.lights span {
  aspect-ratio: 1;
  background: var(--led-off);
}

.lights span:nth-child(7n + 3),
.lights span:nth-child(13n + 5),
.lights span:nth-child(19n + 11) {
  background: var(--signal);
}

.lights-caption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

@media (prefers-reduced-motion: no-preference) {
  .lights span:nth-child(5n + 2) {
    animation: blink 3.1s steps(1, end) infinite;
  }

  .lights span:nth-child(11n + 4) {
    animation: blink 1.9s steps(1, end) infinite 0.4s;
  }

  .lights span:nth-child(17n + 9) {
    animation: blink 4.3s steps(1, end) infinite 1.1s;
  }

  .lights span:nth-child(23n + 1) {
    animation: blink 2.6s steps(1, end) infinite 0.7s;
  }
}

@keyframes blink {
  0% {
    background: var(--signal);
  }
  50% {
    background: var(--led-off);
  }
}

/* ---- Sections ---------------------------------------------------------- */

.section {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 0 40px;
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.section > header {
  padding-top: 4px;
}

.section h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-top: 10px;
}

.prose {
  max-width: 40em;
  font-size: 18px;
}

.prose .big {
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.9em;
}

.pull {
  margin: 28px 0 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--signal);
  font-size: 18px;
}

/* A grid of numbered cells with hairlines between them. */
.cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin-top: 36px;
}

.cells > div {
  padding: 20px 22px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}

.cells h3 {
  font-size: 19px;
  font-weight: 750;
  margin: 10px 0 8px;
}

.cells p {
  font-size: 15.5px;
  color: var(--muted);
}

.prose + .cells {
  margin-top: 36px;
}

/* ---- Architecture sketch ----------------------------------------------- */

.stack {
  margin: 36px 0 0;
  display: grid;
  gap: 10px;
  max-width: 760px;
  font: 13px/1.35 var(--mono);
}

.layer {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.layer > .label {
  align-self: center;
}

.box {
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 10px 12px;
}

.box strong {
  display: block;
  font: 700 15px/1.3 var(--sans);
  margin-bottom: 2px;
}

.boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.box.domain {
  border-width: 2px;
}

.box.kernel {
  background: var(--ink);
  color: var(--paper);
}

.box.kernel .label {
  color: var(--paper);
  opacity: 0.7;
}

.box.accent {
  border-color: var(--signal);
  box-shadow: inset 4px 0 0 var(--signal);
}

.dash {
  border-style: dashed;
}

.stack .mode {
  border-top: 1px dashed var(--muted);
  margin: 4px 0;
  padding-top: 4px;
  text-align: right;
}

/* ---- Status ------------------------------------------------------------ */

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}

.checks li {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

.checks .tag {
  font: 500 12px/1.9 var(--mono);
  letter-spacing: 0.08em;
}

.checks .on {
  color: var(--signal);
}

.checks .off {
  color: var(--muted);
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 36px;
}

.two h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

/* ---- Status: one short card per area ----------------------------------- */

.status-head {
  font-size: 15px;
  margin: 32px 0 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-grid .box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.status-tag {
  float: right;
  margin-left: 8px;
  font: 500 11px/1.7 var(--mono);
  letter-spacing: 0.08em;
}

.status-tag.on {
  color: var(--signal);
}

.status-tag.next {
  color: var(--muted);
}

@media (max-width: 900px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .status-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Terminal ---------------------------------------------------------- */

/*
 * The console, drawn as a stylised VT100: a putty case (graphite in the
 * dark theme), dark curved glass around the screen, and a chin below the
 * screen with the name plate, the lamp, the readout and the keys, then a
 * vent grille. Every control and status line terminal.js shows sits on the
 * case, and only the guest's output is on the screen, so the two never
 * share a colour.
 *
 * The screen, #erx-terminal, holds a recorded session until the visitor
 * boots erXos; terminal.js then puts an xterm.js terminal in it (see
 * site/README.md). It keeps one height in both states. On a desktop that
 * is room for the terminal's 80 by 24 cells at 11px, 396px tall in Plex
 * Mono, plus the .xterm-host inset of 12px above and below and 4px to spare for
 * screens and fonts that round the cells taller; a smaller screen gets a
 * smaller font (terminal.js, fit_terminal). The
 * readout reserves its status line and the progress bar's room, and the
 * lamp's label its longest text, so booting moves neither the page nor
 * the readout. The case's lamp and status colour follow its data-erx-phase,
 * which terminal.js sets to booting, live or stopped. The case's own look
 * is set on .terminal:not(.xterm): xterm.js gives its terminal's element
 * the class terminal too, and that element takes none of the case's
 * padding, background or shadow.
 */
.terminal:not(.xterm) {
  padding: 22px 22px 0;
  border-radius: 14px 14px 6px 6px;
  background: var(--case);
  box-shadow: inset 0 2px 0 var(--case-hi), inset 0 -3px 0 var(--case-lo),
    0 2px 0 var(--case-edge), 0 14px 30px var(--case-shadow);
}

.terminal-glass {
  padding: 10px;
  border-radius: 18px / 14px;
  background: var(--glass);
  box-shadow: inset 0 0 0 2px var(--glass-rim), inset 0 6px 18px rgba(0, 0, 0, 0.8);
}

#erx-terminal {
  position: relative;
  height: 424px;
  overflow: hidden;
  border-radius: 12px / 9px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.terminal pre {
  height: 100%;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  font: 13px/1.5 var(--mono);
  /* Long lines wrap, as they do on a terminal of this width. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.xterm-host {
  position: absolute;
  inset: 12px 4px 12px 14px;
}

.terminal .c {
  color: var(--code-dim);
}

.terminal .p {
  color: var(--code-prompt);
}

/* The chin: plate, lamp, then the readout and keys, wrapping on a phone. */
.terminal-chin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  min-height: 68px;
  padding: 12px 4px 14px;
  color: var(--case-text);
}

.terminal-plate {
  font: 800 15px/1 var(--sans);
  font-stretch: 125%;
  letter-spacing: 0.04em;
  color: var(--plate-ink);
}

/* Wide enough for "Recorded session": 16 characters of 0.7em, the lamp and the gap. */
.terminal-lamp {
  min-width: calc(11.2em + 16px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--case-muted);
}

.terminal-lamp .led {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lamp-off);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.35);
}

.terminal[data-erx-phase="booting"] .led,
.terminal[data-erx-phase="live"] .led {
  background: var(--signal);
}

.terminal[data-erx-phase="live"] .led {
  box-shadow: 0 0 6px var(--signal);
}

/* Stopped is a hollow ring, so it differs from a lit lamp by shape too. */
.terminal[data-erx-phase="stopped"] .led {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--case-alert);
}

@media (prefers-reduced-motion: no-preference) {
  .terminal[data-erx-phase="booting"] .led {
    animation: lamp-blink 1s steps(1) infinite;
  }
}

@keyframes lamp-blink {
  50% {
    opacity: 0.25;
  }
}

.terminal-controls {
  flex: 1 1 18em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
}

.terminal-controls[hidden],
.terminal-controls [hidden],
.terminal-hint[hidden] {
  display: none;
}

/* Status above the machine line; the progress groove sits under both. */
.terminal-readout {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-bottom: 9px;
}

.terminal-readout .status {
  min-height: 1.35em;
  font: 12px/1.35 var(--mono);
  color: var(--case-text);
}

.terminal[data-erx-phase="stopped"] .status {
  color: var(--case-alert);
}

.terminal-readout .machine {
  font: 500 10.5px/1.35 var(--mono);
  letter-spacing: 0.04em;
  color: var(--case-muted);
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--progress-groove);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
}

@media (prefers-reduced-motion: no-preference) {
  .progress span {
    transition: width 0.2s linear;
  }
}

.terminal-keys {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.key {
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--key);
  color: var(--key-ink);
  box-shadow: 0 3px 0 var(--key-edge), 0 4px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.key.boot {
  background: var(--signal);
  color: var(--key-go-ink);
  box-shadow: 0 3px 0 var(--key-go-edge), 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Inject is a plain key with alert ink: a fault may end the machine, so it reads apart from Boot's go. */
.key.crash {
  color: var(--key-crash-ink);
}

/* The fault menu: a native select drawn as a key, beside Inject. Its
   closed width is fixed; the open list shows each entry's whole label,
   with the reason an entry is unavailable. */
.faults {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.fault-select {
  width: 12em;
  max-width: 100%;
  text-transform: none;
  letter-spacing: 0.02em;
}

.fault-select optgroup,
.fault-select option {
  background: var(--key);
  color: var(--key-ink);
}

.key:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--key-edge);
}

.key.boot:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--key-go-edge);
}

.key:disabled {
  opacity: 0.6;
  cursor: default;
}

.key:focus-visible {
  outline: 2px solid var(--case-text);
  outline-offset: 3px;
}

.terminal-grille {
  height: 10px;
  margin: 0 -22px;
  border-radius: 0 0 6px 6px;
  background: repeating-linear-gradient(90deg, var(--grille) 0 3px, var(--grille-slot) 3px 5px);
}

/* The hint is page text below the case. */
.terminal-hint {
  margin: 14px 0 0;
  font: 12px/1.5 var(--mono);
  color: var(--muted);
}

.terminal-hint code {
  background: none;
  padding: 0;
  color: var(--ink);
}

/* "Try it": what runs, beside the front panel of lights. */
.try {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 40px;
  margin-bottom: 36px;
}

.try .spec {
  margin-top: 24px;
}

/* ---- Downloads --------------------------------------------------------- */

/* A download link is the console's Boot key, flat, as page text. */
.btn {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 4px;
  background: var(--signal);
  color: var(--key-go-ink);
  box-shadow: 0 2px 0 var(--key-go-edge);
}

.btn:hover {
  color: var(--key-go-ink);
  filter: brightness(1.06);
}

.bar nav a.nav-download {
  margin: -4px 0;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--signal);
  color: var(--key-go-ink);
  font-weight: 600;
}

/*
 * One row per platform, with hairlines like the cells: what it is and the
 * download on the left, how to use it and its digest on the right.
 */
.downloads {
  border: 1px solid var(--rule);
  border-bottom: 0;
}

.download {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 18px 32px;
  padding: 20px 22px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
  font-size: 15.5px;
}

.download-main,
.download-more {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download h3 {
  font-size: 18px;
  font-weight: 750;
  font-stretch: 125%;
  margin: -4px 0 0;
}

.download p {
  margin: 0;
}

.download-get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.download pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--code-ink);
  font: 12px/1.55 var(--mono);
}

.download pre code {
  font-size: inherit;
}

/* SHA-256 and source: quiet facts at the foot of each panel. */
.download-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
  text-transform: none;
  letter-spacing: 0.02em;
}

.download-facts dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.download-facts dd {
  margin: 0;
  color: var(--ink);
}

/* Digests are long words; they wrap rather than widen the page. */
.download-facts code {
  overflow-wrap: anywhere;
  font-size: 1em;
}

.download-note {
  margin: 14px 0 0;
  font: 12px/1.5 var(--mono);
  color: var(--muted);
}

.download-note a {
  color: var(--ink);
}

/* ---- Footer ------------------------------------------------------------ */

.foot {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 24px 40px;
  padding: 40px 0 56px;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.foot p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Narrow screens ---------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-main {
    padding: 40px 0 36px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .hero-side {
    padding: 28px 0 40px;
  }

  .try {
    grid-template-columns: minmax(0, 1fr);
  }

  .section,
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 48px 0;
  }

  .section h2 {
    margin-bottom: 24px;
  }

  .two {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .download {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .bar nav a:not(.nav-download) {
    display: none;
  }

  .lights {
    gap: 5px;
    padding: 12px;
  }

  .layer {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .boxes {
    grid-template-columns: minmax(0, 1fr);
  }

  .terminal pre {
    font-size: 11px;
    padding: 12px;
  }

  #erx-terminal {
    height: 340px;
  }

  .terminal:not(.xterm) {
    padding: 10px 10px 0;
    border-radius: 10px 10px 5px 5px;
  }

  .terminal-glass {
    padding: 6px;
    border-radius: 14px / 11px;
  }

  .terminal-chin {
    gap: 8px 14px;
    padding: 10px 2px 12px;
  }

  .terminal-readout .status {
    font-size: 11px;
  }

  .terminal-readout .machine {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .key {
    padding: 9px 12px;
  }

  .terminal-grille {
    margin: 0 -10px;
    border-radius: 0 0 5px 5px;
  }

  .xterm-host {
    inset: 10px 2px 10px 10px;
  }
}

/* ---- Wide cut ---------------------------------------------------------- */

/* Headings use Archivo's widest cut, which echoes the wordmark. */
h1,
h2,
.cells h3,
.box strong {
  font-stretch: 125%;
}

.cells h3 {
  font-size: 18px;
}

/* The name keeps its spelling inside uppercase labels. */
.label .name {
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink);
}
