/* pinghue.com
   A near-black developer page with the real TUI as the hero. Inside the
   terminal windows the text and state colors are the product's own
   (src/pinghue/ui.py, and the Textual cursor in app.py); the window ground is
   the page's. Outside them the page stays neutral so the table is the only
   thing in color. Desktop sizes are measured off the approved comp (1672 px
   wide) and scale with the viewport through --u, with px floors so nothing
   shrinks below reading size; narrow screens freeze --u at its 1100 px value. */

@font-face {
  font-family: "Zalando Sans";
  src: url("fonts/zalando-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Sans Mono";
  src: url("fonts/ubuntu-sans-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #08090a;
  --fg: #f7f8f8;
  --fg-2: #b4bac4;
  --muted: #8a8f98;
  --line: #23252a;
  --line-2: #30343c;
  --chip: rgb(14 16 18 / 0.86);
  --r-control: 10px;
  --r-surface: 12px;

  /* the type scale outside the comp-measured hero */
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-md: 15px;
  --fs-body: 17px;

  /* terminal windows: product text and state colors on the page's ground */
  --tui-bg: #0d1014;
  --tui-bar: #11151a;
  --tui-text: #e6edf3;
  --tui-muted: #8ea0b8;
  --tui-line: #232a33;
  --green: #7ee787;
  --amber: #f2cc60;
  --red: #ff7b72;
  --blue: #58a6ff;

  --sans: "Zalando Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Ubuntu Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* one comp pixel, so desktop lands where the comp drew it */
  --u: calc(min(100cqw, 1840px) / 1672);
}

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

html {
  background: var(--bg);
  scrollbar-color: var(--line-2) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  container-type: inline-size;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(88 166 255 / 0.32);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li,
dd,
figcaption {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

code,
kbd {
  font-family: var(--mono);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 0.2s ease-out;
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

/* ------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  background: var(--chip);
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s ease-out, background-color 0.2s ease-out;
}

.btn:hover {
  border-color: #4a505a;
  background: rgb(26 29 33 / 0.92);
}

.btn .icon {
  font-size: 1.32em;
}

/* ------------------------------------------------ nav */

.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  height: max(60px, calc(76 * var(--u)));
  padding: 0 max(20px, calc(65 * var(--u)));
  border-bottom: 1px solid rgb(35 37 42 / 0.7);
  background: rgb(8 9 10 / 0.94);
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  border-radius: 4px;
}

.brand img {
  display: block;
  width: max(120px, calc(163 * var(--u)));
  height: auto;
}

.nav-links {
  display: flex;
  gap: calc(31 * var(--u));
  padding-right: calc(29 * var(--u));
  margin-right: calc(29 * var(--u));
  border-right: 1px solid var(--line-2);
  font-size: max(14px, calc(17 * var(--u)));
  line-height: calc(24 * var(--u));
}

.nav-links a {
  color: var(--fg-2);
  transition: color 0.2s ease-out;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-gh {
  gap: max(8px, calc(14 * var(--u)));
  height: max(40px, calc(48 * var(--u)));
  padding: 0 max(14px, calc(26 * var(--u))) 0 max(12px, calc(22 * var(--u)));
  border-radius: var(--r-control);
  font-size: max(14px, calc(18 * var(--u)));
}

.nav-gh .icon {
  font-size: 1.45em;
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding-top: max(104px, calc(145 * var(--u)));
  text-align: center;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(to bottom, rgb(8 9 10 / 0), var(--bg));
}

.still,
.backdrop video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.backdrop video {
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-playing .backdrop video {
  opacity: 1;
}

/* the footage stays visible; only the text block and the table get shade */
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 34% 22% at 50% 24%, rgb(8 9 10 / 0.5), rgb(8 9 10 / 0)),
    linear-gradient(to bottom, rgb(8 9 10 / 0.3) 0%, rgb(8 9 10 / 0.05) 26%, rgb(8 9 10 / 0.2) 46%, rgb(8 9 10 / 0.8) 72%, var(--bg) 100%);
}

.hero-copy {
  position: relative;
  padding: 0 24px;
}

.hero h1 {
  margin: 0 auto;
  font-size: max(40px, calc(78 * var(--u)));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: max(34em, calc(790 * var(--u)));
  margin: max(14px, calc(16 * var(--u))) auto 0;
  color: var(--fg-2);
  font-size: max(16px, calc(27 * var(--u)));
  font-weight: 300;
  line-height: max(24px, calc(34 * var(--u)));
  letter-spacing: -0.038em;
}

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: max(14px, calc(24 * var(--u)));
  margin-top: max(24px, calc(27 * var(--u)));
}

.cmd {
  display: inline-flex;
  align-items: center;
  height: max(52px, calc(62 * var(--u)));
  padding: 0 max(6px, calc(10 * var(--u))) 0 max(16px, calc(18 * var(--u)));
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  background: var(--chip);
  font-family: var(--mono);
  font-size: max(15px, calc(20.5 * var(--u)));
  white-space: nowrap;
}

.cmd-prompt {
  margin-right: 0.55em;
  color: var(--muted);
}

.cmd code {
  color: var(--fg);
}

.copy-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: max(10px, calc(24 * var(--u)));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.copy-btn:hover {
  background: rgb(255 255 255 / 0.06);
  color: var(--fg);
}

.copy-btn .icon {
  grid-area: 1 / 1;
}

.copy-btn .i-check,
.copy-btn.copied .i-copy {
  visibility: hidden;
}

.copy-btn.copied .i-check {
  visibility: visible;
  color: var(--green);
}

.copy-btn.failed {
  color: var(--red);
}

.actions .btn {
  height: max(48px, calc(56 * var(--u)));
  padding: 0 max(20px, calc(28 * var(--u))) 0 max(16px, calc(22 * var(--u)));
  border-radius: var(--r-control);
  font-size: max(15px, calc(18 * var(--u)));
}

/* ------------------------------------------------ the terminal */

.term {
  position: relative;
  width: calc(1472 * var(--u));
  margin: calc(34 * var(--u)) auto 0;
  text-align: left;
}

.term-bar,
.term-body,
.term-search,
.term-keys {
  background: var(--tui-bg);
  border-inline: 1px solid var(--tui-line);
}

.term-bar {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  height: max(40px, calc(47 * var(--u)));
  padding: 0 max(12px, calc(20 * var(--u))) 0 max(14px, calc(21 * var(--u)));
  border-top: 1px solid var(--tui-line);
  border-bottom: 1px solid var(--tui-line);
  border-radius: calc(14 * var(--u)) calc(14 * var(--u)) 0 0;
  background: var(--tui-bar);
  color: var(--tui-text);
  font-family: var(--mono);
  font-size: max(13px, calc(17 * var(--u)));
}

.dots {
  display: flex;
  gap: max(8px, calc(13 * var(--u)));
}

.dots i {
  width: max(11px, calc(14 * var(--u)));
  height: max(11px, calc(14 * var(--u)));
  border-radius: 50%;
  background: #ff5f57;
}

.dots i:nth-child(2) {
  background: #febc2e;
}

.dots i:nth-child(3) {
  background: #28c840;
}

/* The fleet summary follows the title like the TUI header's. Healthy, the
   bulk of most fleets, comes last, so a bar too narrow for all of it drops it
   first; below 800px the bar keeps only the title. */
.term-head {
  min-width: 0;
  overflow: hidden;
  white-space: pre;
}

.term-summary {
  margin-left: 2ch;
  color: var(--tui-muted);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 800px) {
  .term-bar {
    column-gap: 2ch;
  }
}

@media (max-width: 799px) {
  .term-summary {
    display: none;
  }

  /* keeps the title off the dots and the clock */
  .term-bar {
    column-gap: 1ch;
  }
}

/* the smallest phones: the clock gives way so the title keeps its room */
@media (max-width: 379px) {
  .term-clock {
    display: none;
  }
}

.term-end {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: max(6px, calc(10 * var(--u)));
}

.term-clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.term-pause {
  display: grid;
  place-items: center;
  width: max(28px, calc(30 * var(--u)));
  height: max(28px, calc(30 * var(--u)));
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: max(13px, calc(15 * var(--u)));
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.term-pause[hidden] {
  display: none;
}

.term-pause:hover {
  background: rgb(255 255 255 / 0.07);
  color: var(--fg);
}

.term-pause .icon {
  grid-area: 1 / 1;
}

.term-pause .i-play,
.term-pause.is-paused .i-pause {
  visibility: hidden;
}

.term-pause.is-paused .i-play {
  visibility: visible;
}

.term-window {
  border-radius: calc(14 * var(--u)) calc(14 * var(--u)) 0 0;
}

.term-window:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* the real DataTable cursor: #58a6ff at 22% */
.term-window.is-engaged .tui tbody tr {
  cursor: pointer;
}

.tui tbody tr.is-cursor > * {
  background: rgb(88 166 255 / 0.22);
}

.s-pending {
  color: var(--tui-muted);
}

.term-note {
  margin: 0;
  color: var(--tui-muted);
  font-family: var(--mono);
  font-size: max(13px, calc(17 * var(--u)));
}

.term-note:not(:empty) {
  padding-top: calc(12 * var(--u));
}

.term-body {
  padding: max(4px, calc(10 * var(--u))) calc(22 * var(--u)) max(16px, calc(24 * var(--u))) calc(23 * var(--u));
}

.tui {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--tui-text);
  font-family: var(--mono);
  font-size: max(14px, calc(20 * var(--u)));
  line-height: max(20px, calc(26 * var(--u)));
  font-variant-numeric: tabular-nums;
}

.tui th,
.tui td {
  height: max(32px, calc(39.6 * var(--u)));
  padding: 0;
  overflow: hidden;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.tui thead th {
  height: max(36px, calc(41 * var(--u)));
  border-bottom: 1px solid var(--tui-line);
  color: var(--tui-muted);
}

/* the script makes the sortable headers buttons; a click sorts, as in the TUI */
.tui thead .sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: pre;
  cursor: pointer;
}

.tui thead .sort:hover {
  color: var(--tui-text);
}

/* the cell clips its text, so it stops clipping while its button has focus */
.tui thead th:has(.sort:focus-visible) {
  overflow: visible;
}

.tui tbody tr:first-child > * {
  height: max(40px, calc(49.6 * var(--u)));
  padding-top: max(8px, calc(10 * var(--u)));
}

.term .tui th:nth-child(1) { width: calc(185 * var(--u)); }
.term .tui th:nth-child(2) { width: calc(176 * var(--u)); }
.term .tui th:nth-child(3) { width: calc(177 * var(--u)); }
.term .tui th:nth-child(4) { width: calc(107 * var(--u)); }
.term .tui th:nth-child(5) { width: calc(102 * var(--u)); }
.term .tui th:nth-child(6) { width: calc(101 * var(--u)); }
.term .tui th:nth-child(7) { width: calc(95 * var(--u)); }
.term .tui th:nth-child(8) { width: calc(119 * var(--u)); }
.term .tui th:nth-child(9) { width: calc(105 * var(--u)); }
.term .tui th:nth-child(10) { width: calc(103 * var(--u)); }

/* ui.py: host and address print green; state, slow and lossy cells take their tone */
.tui tbody th,
.tui tbody td:nth-child(2):not([class]) {
  color: var(--green);
}

.s-healthy { color: var(--green); }
.s-intermittent { color: var(--amber); }
.s-down { color: var(--red); }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }
.t-red { color: var(--red); }

/* history: one bar per probe, in eighths of a glyph cell like ▁ to █ */
.bars {
  display: flex;
  align-items: flex-end;
  gap: calc(5.6 * var(--u));
  height: max(22px, calc(32 * var(--u)));
  margin-left: calc(3 * var(--u));
  transform: translateY(calc(-6 * var(--u)));
}

.bars i {
  width: calc(8 * var(--u));
  height: 0;
  border-radius: 1px;
}

.bars .ok { background: var(--green); }
.bars .slow { background: var(--amber); }

.bars .fail {
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  margin-bottom: calc(4 * var(--u));
  border-radius: 50%;
  background: var(--red);
}

.bars .h1 { height: 12.5%; }
.bars .h2 { height: 25%; }
.bars .h3 { height: 37.5%; }
.bars .h4 { height: 50%; }
.bars .h5 { height: 62.5%; }
.bars .h6 { height: 75%; }
.bars .h7 { height: 87.5%; }
.bars .h8 { height: 100%; }

/* the TUI's search line (app.py #search-bar): "/", the query, "N of M" */
.term-search {
  display: flex;
  align-items: center;
  gap: max(8px, calc(12 * var(--u)));
  padding: 0 calc(22 * var(--u)) max(14px, calc(18 * var(--u))) calc(23 * var(--u));
  color: var(--tui-muted);
  font-family: var(--mono);
  font-size: max(14px, calc(20 * var(--u)));
  line-height: max(20px, calc(26 * var(--u)));
}

.term-search[hidden],
.key[hidden] {
  display: none;
}

.term-search-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tui-text);
  font: inherit;
  caret-color: var(--blue);
}

/* a terminal line, not a form field: a rule under the query, not a ring */
.term-search-input:focus-visible {
  outline: none;
  border-radius: 0;
  box-shadow: 0 1px 0 var(--blue);
}

.term-search:focus-within > [aria-hidden] {
  color: var(--blue);
}

.term-search-input::placeholder {
  color: var(--tui-muted);
  opacity: 1;
}

.term-search-count {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.term-keys {
  display: flex;
  flex-wrap: wrap;
  gap: max(8px, calc(10 * var(--u))) max(20px, calc(43 * var(--u)));
  margin: 0;
  padding: max(14px, calc(17 * var(--u))) calc(23 * var(--u)) max(32px, calc(44 * var(--u)));
  border-top: 0;
  background-image: linear-gradient(var(--tui-line), var(--tui-line));
  background-position: 50% 0;
  background-size: calc(100% - 45 * var(--u)) 1px;
  background-repeat: no-repeat;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: max(13px, calc(17 * var(--u)));
  line-height: max(26px, calc(30 * var(--u)));
  /* fade only the padding under the last row, however many rows the keys wrap to */
  -webkit-mask-image: linear-gradient(to bottom, #000 max(62%, calc(100% - max(32px, calc(44 * var(--u))))), transparent);
  mask-image: linear-gradient(to bottom, #000 max(62%, calc(100% - max(32px, calc(44 * var(--u))))), transparent);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: max(8px, calc(17 * var(--u)));
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* without the script the keys are the TUI footer, not controls */
.key:disabled {
  color: inherit;
  cursor: default;
}

.key:hover kbd {
  border-color: #4a525d;
  background: #1c222a;
}

.key.is-active kbd {
  border-color: var(--blue);
  background: rgb(88 166 255 / 0.22);
}

.term-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: max(26px, calc(34 * var(--u)));
  height: max(24px, calc(30 * var(--u)));
  padding: 0 max(6px, calc(8 * var(--u)));
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #151a20;
  color: var(--tui-text);
  font-size: max(13px, calc(17 * var(--u)));
}

.term figcaption {
  margin: max(6px, calc(6 * var(--u))) 0 0;
  padding: 0 calc(23 * var(--u)) max(32px, calc(40 * var(--u)));
  color: var(--muted);
  font-size: max(13px, calc(15 * var(--u)));
  text-wrap: balance;
}

/* ------------------------------------------------ sections */

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.c-green { color: var(--green); }
.c-amber { color: var(--amber); }
.c-red { color: var(--red); }

.wrap {
  width: min(calc(100% - 40px), calc(1240 * var(--u)));
  margin-inline: auto;
}

.section {
  padding-block: calc(150 * var(--u));
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0;
  font-size: max(30px, calc(54 * var(--u)));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.section-lede {
  max-width: 34em;
  margin: calc(22 * var(--u)) 0 0;
  color: var(--fg-2);
  font-size: max(17px, calc(21 * var(--u)));
  line-height: 1.55;
}

.section code,
.section kbd {
  font-size: 0.88em;
}

.section p code {
  color: var(--fg-2);
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: #151a20;
  color: var(--tui-text);
  line-height: 1.35;
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: calc(80 * var(--u));
  align-items: start;
}

/* terminal windows outside the hero */

.window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tui-line);
  border-radius: var(--r-surface);
  background: var(--tui-bg);
  box-shadow: 0 32px 64px -28px rgb(0 0 0 / 0.75);
}

.window-bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--tui-line);
  background: var(--tui-bar);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.window-bar .dots {
  gap: 8px;
}

.window-bar .dots i {
  width: 11px;
  height: 11px;
}

.window-title {
  flex: 1;
  margin-right: 49px;
  padding-left: 12px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-body {
  margin: 0;
  padding: 14px 18px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

pre.window-body {
  color: var(--tui-text);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.7;
  white-space: pre;
}

pre.window-body code {
  font-size: inherit;
}

.prompt { color: var(--muted); }
.out { color: var(--tui-text); }
.jp { color: var(--tui-muted); }
.jk { color: var(--tui-muted); }
.js { color: var(--tui-text); }
.jn { color: var(--blue); }
.jc { color: var(--tui-muted); }

/* the mini TUI tables in the modes panes */

/* fits without scrolling from 700 px up; phones scroll it at 660 px */
.tui.tui-mini {
  min-width: 620px;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.3;
}

.tui-mini th,
.tui-mini td {
  height: 30px;
}

.tui-mini thead th {
  height: 32px;
}

.tui-mini tbody tr:first-child > * {
  height: 36px;
  padding-top: 6px;
}

.tui.tui-mini th:nth-child(1) { width: 12%; }
.tui.tui-mini th:nth-child(2) { width: 12%; }
.tui.tui-mini th:nth-child(3) { width: 9.5%; }
.tui.tui-mini th:nth-child(4),
.tui.tui-mini th:nth-child(5),
.tui.tui-mini th:nth-child(6),
.tui.tui-mini th:nth-child(7),
.tui.tui-mini th:nth-child(8) { width: 8.3%; }
.tui.tui-mini th:nth-child(9) { width: 9.5%; }
.tui.tui-mini th:nth-child(10) { width: 6%; }

.tui-mini .bars {
  gap: 3px;
  height: 18px;
  margin: 0;
  transform: translateY(-2px);
}

.tui-mini .bars i {
  width: 5px;
}

.tui-mini .bars .fail {
  width: 5px;
  height: 5px;
  margin-bottom: 4px;
}

.bars .refused {
  width: auto;
  height: auto;
  background: none;
  color: var(--amber);
  font-family: var(--mono);
  line-height: 1;
}

.bars .refused::before {
  content: "!";
}

/* modes: one window, three runs */

.tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-surface);
  background: var(--chip);
}

.tab {
  min-height: 40px;
  padding: 0 18px;
  white-space: nowrap;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-md);
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.tab:hover {
  color: var(--fg);
}

.tab[aria-selected="true"] {
  background: #1b1f25;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--fg);
}

html:not(.js) .tabs {
  display: none;
}

html:not(.js) .pane + .pane {
  margin-top: 40px;
}

.pane[hidden] {
  display: none;
}

.panes {
  margin-top: max(32px, calc(48 * var(--u)));
}

.pane-note {
  max-width: 44em;
  margin: 16px 0 0;
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.55;
}

.pane-note strong {
  color: var(--fg);
  font-weight: 600;
}

.lines .out {
  color: var(--tui-text);
}

/* scale: the eight glyphs and the two marks */

.ruler {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin: calc(56 * var(--u)) 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(14 * var(--u));
  list-style: none;
}

.ruler li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 18px 20px;
  border-right: 1px solid var(--line);
}

.ruler li:last-child {
  border-right: 0;
}

.ruler-mark {
  background: #0c0d0f;
}

.ruler .bars {
  height: 44px;
  margin: 0;
  transform: none;
}

.ruler .bars i {
  width: 18px;
}

.ruler .bars .fail {
  width: 9px;
  height: 9px;
  margin: 0 4px 6px;
}

.ruler .bars .refused {
  font-size: 30px;
}

.band {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.lab {
  display: grid;
  gap: 14px;
  max-width: calc(820 * var(--u));
  margin-top: calc(48 * var(--u));
}

.lab-label {
  color: var(--fg-2);
  font-size: 15px;
  font-weight: 500;
}

.lab-row {
  display: flex;
  align-items: center;
  gap: 32px;
}

.lab-slider {
  --fill: 50%;
  flex: 1;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.lab-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--fg-2) var(--fill), #2a2f37 var(--fill));
}

.lab-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--fg-2) var(--fill), #2a2f37 var(--fill));
}

.lab-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 0;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.6);
  -webkit-appearance: none;
  appearance: none;
}

.lab-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.6);
}

.lab-slider:focus-visible {
  outline-offset: 6px;
}

.lab-readout {
  display: inline-flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 300px;
  font-family: var(--mono);
}

.lab-bar {
  height: 44px;
  margin: 0;
  transform: none;
}

.lab-bar i {
  width: 18px;
}

.lab-ms {
  min-width: 6ch;
  color: var(--fg);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lab-band {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.4;
}

.note {
  max-width: 46em;
  margin: calc(40 * var(--u)) 0 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* evidence */

.facts {
  display: grid;
  gap: 22px;
  margin: calc(40 * var(--u)) 0 0;
}

.facts dt {
  color: var(--fg);
  font-size: var(--fs-md);
  font-weight: 600;
}

.facts dd {
  margin: 6px 0 0;
  color: var(--fg-2);
  font-size: var(--fs-md);
  line-height: 1.55;
}

/* what it is not */

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

.not-list li {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  font-size: var(--fs-body);
}

/* install: the close */

.install {
  text-align: center;
}

.install-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: max(32px, calc(44 * var(--u))) auto 0;
}

@media (min-width: 1400px) {
  .install-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: calc(940 * var(--u));
  }
}

.cmd-row {
  justify-content: flex-start;
  height: 56px;
  padding: 0 6px 0 18px;
  border-radius: var(--r-control);
  font-size: var(--fs-md);
  text-align: left;
}

.cmd-row code {
  flex: 1;
}

.cmd-row .copy-btn {
  margin-left: 12px;
}

.install-note {
  max-width: 46em;
  margin: calc(30 * var(--u)) auto 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* footer */

.footer {
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  padding: 40px 0 56px;
}

.footer .brand img {
  width: 110px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: var(--fs-md);
}

.footer-links a {
  color: var(--fg-2);
  transition: color 0.2s ease-out;
}

.footer-links a:hover {
  color: var(--fg);
}

/* ------------------------------------------------ the room below the hero */

/* The machine room the footage was shot in, where the simulated night goes
   on: the hero's six history rows (site.js) are the far row, a raised floor
   runs from their foot toward you, and each section ends on one host's
   history, standing on the rule below it. Only history marks carry color. */

.section,
.footer {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: url("assets/room-grain.svg") 0 0 / 180px 180px;
}

/* the bottom padding .section has at each width */
.section {
  --room-pad: calc(150 * var(--u));
}

/* The seam: --rows is the far row's height, --floor the floor's depth down
   to the heading. Until the row stands (end of this block) the horizon is
   the rule; once it does, the grain rises out of the hero's black behind it
   and a hairline (--far) marks the floor's far edge. */
.modes {
  --rows: calc(79 * var(--u));
  --floor: calc(71 * var(--u));
  --horizon: 0px;
  background:
    linear-gradient(var(--bg), rgb(8 9 10 / 0)) 0 0 / 100% var(--horizon) no-repeat,
    url("assets/room-grain.svg") 0 0 / 180px 180px,
    linear-gradient(90deg, transparent, var(--far, transparent) 25% 75%, transparent) 50% var(--horizon) / calc(var(--floor) * 1640 / 71) 1px no-repeat,
    url("assets/room-floor.svg") 50% var(--horizon) / auto var(--floor) no-repeat;
}

/* the floor again under the last rule, at the close: the seam's floor drawn
   deeper, its light gone above the heading; --dim tones it down on phones */
.install {
  --floor: calc(140 * var(--u));
  background:
    url("assets/room-grain.svg") 0 0 / 180px 180px,
    linear-gradient(var(--dim, transparent) 0 0),
    url("assets/room-floor.svg") 50% 0 / calc(1920 * var(--u)) var(--floor) no-repeat;
}

/* Window light: a halo and a wider, lower pool, each a blurred sheet in a box
   with room for its blur, masked to nothing at the section's bottom edge so
   no pool is cut off by the next rule. */
.pane,
.evidence .split {
  position: relative;
  isolation: isolate;
}

.pane::before,
.pane::after,
.evidence .split::before,
.evidence .split::after {
  --room-fade: linear-gradient(#000 calc(100% - var(--room-pad)), rgb(0 0 0 / 0.74) calc(100% - var(--room-pad) * 2 / 3), rgb(0 0 0 / 0.26) calc(100% - var(--room-pad) / 3), transparent);
  content: "";
  position: absolute;
  bottom: calc(-1 * var(--room-pad));
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: var(--room-fade);
  mask-image: var(--room-fade);
}

/* the halo: blur(40px), drawn 100px inside its box */
.pane::before,
.evidence .split::before {
  top: -76px;
  right: calc(2% - 100px);
  left: calc(2% - 100px);
  background: linear-gradient(rgb(230 237 243 / 0.1) 0 0) 100px 100px / calc(100% - 200px) var(--sheet) no-repeat;
  filter: blur(40px);
}

/* the pool: blur(100px), drawn 250px inside its box */
.pane::after,
.evidence .split::after {
  right: calc(10% - 250px);
  left: calc(10% - 250px);
  background: linear-gradient(rgb(230 237 243 / 0.09) 0 0) 250px 250px / calc(100% - 500px) var(--sheet) no-repeat;
  filter: blur(100px);
}

/* the mode windows are 172 to 217px tall: the halo covers 24 to 210px of
   the pane, the pool 110 to 310px */
.pane::before {
  --sheet: 186px;
}

.pane::after {
  --sheet: 200px;
  top: -140px;
}

/* the report window's own grid cell: the halo from 24px below its top to
   12px past its bottom, the pool from its middle to 90px past its bottom */
.evidence .split::before {
  --sheet: calc(100% - 88px - var(--room-pad));
  grid-area: 1 / 2;
}

.evidence .split::after {
  --sheet: calc(100% - 160px - var(--room-pad));
  grid-area: 1 / 2;
  top: calc(50% - 250px);
}

/* One sweep of light along each rule (at #modes, the horizon) the first time
   it is on screen: a core on the line, a faint bloom on the floor. */
.section::before,
.footer::before {
  content: "";
  position: absolute;
  top: var(--horizon, 0px);
  left: 0;
  z-index: -1;
  width: 42%;
  height: var(--floor, 48px);
  background:
    linear-gradient(90deg, rgb(230 237 243 / 0), rgb(230 237 243 / 0.5) 50%, rgb(230 237 243 / 0)) 0 0 / 100% 1px no-repeat,
    radial-gradient(50% 100% at 50% 0, rgb(230 237 243 / 0.06), rgb(230 237 243 / 0));
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

/* what site.js watches: a 1px mark on the rule */
.room-mark {
  position: absolute;
  top: var(--horizon, 0px);
  left: 0;
  width: 1px;
  height: 1px;
}

/* History marks drawn like the column's (bars in eighths of a cell, lost
   probes as dots) in state colors at low strength, newest on the right. */
.trace,
.trace-stack {
  --ok: 30%;
  --slow: 36%;
  --lost: 56%;
  position: absolute;
  pointer-events: none;
}

/* A band fills its section's bottom padding, so no mark sits behind text;
   whole-pixel bars make each catch-up step exactly one probe. */
.trace {
  --cell: var(--room-pad);
  --bar: round(calc(20 * var(--u)), 1px);
  --gap: round(calc(14 * var(--u)), 1px);
  --run: 40;
  right: 0;
  bottom: 0;
  left: max(20px, calc((100% - 1240 * var(--u)) / 2));
  display: grid;
  grid-template-columns: 13ch minmax(0, 1fr);
  column-gap: max(12px, calc(24 * var(--u)));
  align-items: end;
  height: var(--cell);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  line-height: 1;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

.trace-host {
  padding-bottom: calc(var(--cell) / 8);
}

/* the far row: the table's bar and gap, ending under its newest probe, one
   pitch apart down as well as across */
.trace-stack {
  --cell: calc(11 * var(--u));
  --bar: calc(8 * var(--u));
  --gap: calc(5.6 * var(--u));
  top: 0;
  right: calc(50% - 704 * var(--u) - 1px);
  left: calc(50% - 713 * var(--u) + 1px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: var(--cell);
  row-gap: calc(2.6 * var(--u));
}

.trace .bars,
.trace-stack .bars {
  --pitch: calc(var(--bar) + var(--gap));
  justify-self: end;
  justify-content: flex-end;
  width: calc(round(down, 100% + var(--gap), var(--pitch)) - var(--gap));
  height: 100%;
  margin: 0;
  overflow: hidden;
  overflow: clip;
  transform: none;
}

.trace-track {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: var(--gap);
  height: 100%;
}

.trace-track i,
.trace-track .fail {
  flex: none;
  width: var(--bar);
}

.trace-track .ok {
  background: color-mix(in srgb, var(--green) var(--ok), transparent);
}

.trace-track .slow {
  background: color-mix(in srgb, var(--amber) var(--slow), transparent);
}

.trace-track .fail {
  height: var(--bar);
  margin-bottom: calc(var(--cell) / 8);
  background: color-mix(in srgb, var(--red) var(--lost), transparent);
}

@media (max-width: 1099px) {
  .section {
    --room-pad: 96px;
  }

  .modes {
    --rows: 52px;
    --floor: 44px;
  }

  .install {
    --floor: 88px;
  }

  .trace-stack {
    --cell: 7px;
    --bar: 6px;
    --gap: 3px;
    right: calc((100% - min(100% - 32px, 968px)) / 2 + 16px);
    left: calc((100% - min(100% - 32px, 968px)) / 2 + 16px);
    row-gap: 2px;
  }

  .evidence .split::before,
  .evidence .split::after {
    grid-area: 2 / 1;
  }
}

@media (max-width: 699px) {
  .section {
    --room-pad: 72px;
  }

  .modes {
    --rows: 37.5px;
    --floor: 34.5px;
  }

  .install {
    --floor: 64px;
    --dim: rgb(8 9 10 / 0.4);
  }

  .trace {
    --bar: 7px;
    --gap: 5px;
    --run: 24;
  }

  .trace-stack {
    --cell: 5px;
    --bar: 4px;
    --gap: 1.5px;
    row-gap: 1.5px;
  }
}

/* The light runs first: a band waits as older probes until its rule has lit
   and half of it shows, then steps forward to the hero's frame. */
@media (prefers-reduced-motion: no-preference) {
  .section.is-lit::before,
  .footer.is-lit::before {
    animation: room-sweep 1.6s cubic-bezier(0.45, 0, 0.25, 1) both;
  }

  .trace.is-pending .trace-track {
    transform: translateX(calc(var(--run) * var(--pitch)));
  }

  .trace.is-live .trace-track {
    animation: trace-run calc(var(--run) * 65ms) steps(var(--run), end) both;
  }

  .trace.is-cued .trace-track {
    animation-delay: 0.8s;
  }
}

@keyframes room-sweep {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  15%,
  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(138%);
  }
}

@keyframes trace-run {
  from {
    transform: translateX(calc(var(--run) * var(--pitch)));
  }

  to {
    transform: none;
  }
}

/* The far row needs round() and color-mix(); with both, unforced colors and
   the script, it replaces the first rule as the horizon. */
@supports (width: round(down, 1px, 1px)) and (color: color-mix(in srgb, #000, #fff)) {
  @media (forced-colors: none) {
    .js .modes {
      --horizon: var(--rows);
      --far: var(--line-2);
      border-top-color: transparent;
    }
  }
}

@supports not ((width: round(down, 1px, 1px)) and (color: color-mix(in srgb, #000, #fff))) {
  .trace,
  .trace-stack {
    display: none;
  }
}

@media (forced-colors: active) {
  .section,
  .footer {
    background: none;
  }

  .trace,
  .trace-stack {
    display: none;
  }
}

/* 404: the page that did not answer */

.lost {
  display: grid;
  justify-items: center;
  gap: 22px;
  min-height: 100vh;
  align-content: center;
  padding: 48px 20px;
  text-align: center;
}

.lost-brand {
  margin: 0;
}

.lost-brand img {
  width: 130px;
}

.lost h1 {
  margin: 12px 0 0;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.lost-lede {
  max-width: 30em;
  margin: 0;
  text-wrap: balance;
  color: var(--fg-2);
  font-size: 19px;
  line-height: 1.55;
}

.lost-window {
  width: min(100%, 560px);
  margin-top: 8px;
  text-align: left;
}

.tui.tui-lost {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.tui-lost th,
.tui-lost td {
  height: 30px;
}

.tui-lost tbody tr:first-child > * {
  height: 36px;
  padding-top: 6px;
}

.tui.tui-lost th:nth-child(1) { width: 30%; }
.tui.tui-lost th:nth-child(2),
.tui.tui-lost th:nth-child(3) { width: 17%; }
.tui.tui-lost th:nth-child(4) { width: 20%; }

/* phones drop "last", which is "-" here anyway, as the hero does */
@media (max-width: 479px) {
  .tui-lost th:nth-child(3),
  .tui-lost td:nth-child(3) {
    display: none;
  }

  .tui.tui-lost { font-size: 13px; }
  .tui.tui-lost th:nth-child(1) { width: 31%; }
  .tui.tui-lost th:nth-child(2) { width: 21%; }
  .tui.tui-lost th:nth-child(4) { width: 25%; }
}

.tui-lost .bars {
  gap: 4px;
  height: 18px;
  margin: 0;
  transform: translateY(-2px);
}

.tui-lost .bars .fail {
  width: 6px;
  height: 6px;
  margin-bottom: 4px;
}

.lost-link {
  min-height: 48px;
  margin-top: 6px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 16px;
}

.bars i {
  forced-color-adjust: none;
}

p code {
  white-space: nowrap;
}

.narrow-only {
  display: none;
}

html:not(.js) .lab,
html:not(.js) .js-only {
  display: none;
}

/* ------------------------------------------------ narrow screens */

/* Below 1100 px --u stays at its 1100 px value, so every size is continuous
   across the breakpoint and the px floors carry the smaller screens. */
@media (max-width: 1099px) {
  :root {
    --u: 0.658px;
  }

  .hero h1 {
    font-size: clamp(40px, 4.67vw, 52px);
  }

  .lede {
    font-size: clamp(16px, 1.62vw, 18px);
    line-height: 1.5;
  }

  .actions {
    flex-wrap: wrap;
  }

  .term {
    width: min(calc(100% - 32px), 968px);
  }

  .term-body {
    padding: 4px 0 16px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .term .tui {
    width: 940px;
    margin: 0 12px;
  }

  .term .tui th:nth-child(1) { width: 124px; }
  .term .tui th:nth-child(2) { width: 118px; }
  .term .tui th:nth-child(3) { width: 112px; }
  .term .tui th:nth-child(4),
  .term .tui th:nth-child(5),
  .term .tui th:nth-child(6),
  .term .tui th:nth-child(7),
  .term .tui th:nth-child(8),
  .term .tui th:nth-child(9) { width: 66px; }
  .term .tui th:nth-child(10) { width: 54px; }

  .term .bars {
    gap: 3px;
    height: 22px;
    margin-left: 0;
    transform: translateY(-3px);
  }

  .term .bars i {
    width: 6px;
  }

  .term .bars .fail {
    width: 5px;
    height: 5px;
    margin-bottom: 6px;
  }

  .term-search {
    padding-inline: 16px;
  }

  .term-keys {
    padding-inline: 16px;
    background-size: calc(100% - 32px) 1px;
  }

  .term figcaption {
    padding-inline: 16px;
  }

  .section {
    padding-block: 96px;
  }

  .section h2 {
    font-size: clamp(28px, 3.23vw, 36px);
  }

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

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

  .ruler li:nth-child(5) {
    border-right: 0;
  }

  .ruler li:nth-child(-n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .lab-row {
    flex-wrap: wrap;
    gap: 18px;
  }

  .lab-slider {
    flex-basis: 100%;
  }
}

/* a narrow terminal: host, state, last, loss and history */
@media (max-width: 899px) {
  .wide-only {
    display: none;
  }

  .narrow-only {
    display: inline;
  }

  .term .tui {
    width: calc(100% - 24px);
  }

  .term .tui th:nth-child(2), .term .tui td:nth-child(2),
  .term .tui th:nth-child(5), .term .tui td:nth-child(5),
  .term .tui th:nth-child(6), .term .tui td:nth-child(6),
  .term .tui th:nth-child(7), .term .tui td:nth-child(7),
  .term .tui th:nth-child(8), .term .tui td:nth-child(8),
  .term .tui th:nth-child(10), .term .tui td:nth-child(10) {
    display: none;
  }

  .term .tui th:nth-child(1) { width: 31%; }
  .term .tui th:nth-child(3) { width: 27%; }
  .term .tui th:nth-child(4) { width: 15%; }
  .term .tui th:nth-child(9) { width: 15%; }
}

@media (max-width: 699px) {
  .nav-links {
    display: none;
  }

  /* the label leaves the screen but stays in the link's accessible name */
  .nav-gh span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nav-gh {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .hero-copy {
    padding: 0 16px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cmd code {
    flex: 1;
    text-align: left;
  }

  .copy-btn {
    margin-left: 8px;
  }

  .lab-readout {
    min-width: 0;
  }

  .tui.tui-mini {
    min-width: 660px;
  }

  .actions .btn {
    justify-content: center;
  }

  /* phones get a rack of status lights, not the aisle's empty middle */
  .still,
  .backdrop video {
    object-position: 18% 0;
  }

  .section {
    padding-block: 72px;
  }

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

  .ruler li {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ruler li:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .ruler li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .ruler .bars {
    height: 24px;
  }

  .ruler .bars i {
    width: 10px;
  }

  .ruler .bars .refused {
    font-size: 20px;
  }

  .ruler .bars .fail {
    margin: 0 2px 4px;
  }

  .cmd-row {
    font-size: var(--fs-sm);
  }

  .term .tui {
    width: calc(100% - 20px);
    margin: 0 10px;
    font-size: 12px;
  }

  .term .tui th,
  .term .tui td {
    padding-right: 6px;
  }

  .term .tui th:last-child,
  .term .tui td:last-child {
    padding-right: 0;
  }

  .term .tui th:nth-child(1) { width: 28.5%; }
  .term .tui th:nth-child(3) { width: 26.5%; }
  .term .tui th:nth-child(4) { width: 14%; }
  .term .tui th:nth-child(9) { width: 16%; }

  .term .bars {
    gap: 1.5px;
  }

  .term .bars i {
    width: 4px;
  }

  .term .bars .fail {
    width: 4px;
    height: 4px;
  }

  .term .bars i:nth-child(-n + 3) {
    display: none;
  }
}

/* the smallest phones keep host, state, loss and history */
@media (max-width: 379px) {
  .term .tui th:nth-child(4),
  .term .tui td:nth-child(4) {
    display: none;
  }

  .term .tui th:nth-child(1) { width: 33.5%; }
  .term .tui th:nth-child(3) { width: 31%; }
  .term .tui th:nth-child(9) { width: 18.5%; }
}

@media (max-width: 339px) {
  .term .tui {
    font-size: 11px;
  }
}

/* below the 320 px reflow floor (a folded Galaxy Fold is about 280 px): the
   install commands tighten so their row fits instead of pushing the page out */
@media (max-width: 319px) {
  .hero-copy {
    padding: 0 12px;
  }

  .cmd {
    padding-left: 12px;
    font-size: 13px;
  }

  /* the hero table keeps host, state and history; loss gives them its room */
  .term .tui th:nth-child(9),
  .term .tui td:nth-child(9) {
    display: none;
  }

  .term .tui th:nth-child(1) { width: 40%; }
  .term .tui th:nth-child(3) { width: 36%; }
}

@media (max-width: 359px) {
  .tab {
    padding: 0 12px;
  }
}

@media (max-width: 339px) {
  .lost {
    padding-inline: 12px;
  }

  .lost-window .window-body {
    padding-inline: 12px;
  }
}

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