/* OpenSourceIntel Linux: light paper by default, the distro's deep navy in
   dark mode and always in the hero. Colours come from the distro's art: the
   wallpaper's navy, the logo's orange, the splash's cream. Headings are set in
   a monospace, as the wallpaper's labels are. Every token pair used for text is
   listed in scripts/check-contrast.mjs and checked against WCAG AA in both
   schemes. */

:root {
  color-scheme: light dark;

  --paper: #f7f5f0;
  --paper-raised: #ffffff;
  --paper-sunk: #ecebe4;
  --ink: #142a3e;
  --ink-muted: #4b5d6d;
  --rule: #d6d3c8;
  --link: #1d5c8c;
  --link-hover: #142a3e;
  --accent: #b8431b;
  --on-accent: #ffffff;
  --accent-text: #a83d17;
  --focus: #b8431b;
  --head-glow: rgba(255, 112, 67, 0.14);

  /* The hero, in both schemes: the wallpaper's navy. hero.js reads the
     field, ink, faint and warm colours for its canvas. */
  --hero-bg-top: #16496f;
  --hero-bg: #0b2238;
  --hero-veil: rgba(8, 26, 44, 0.55);
  --hero-panel: rgba(8, 26, 44, 0.82);
  --hero-rule: rgba(217, 237, 255, 0.18);
  --hero-ink: #fff5eb;
  --hero-muted: #c9d9e8;
  --hero-accent: #ff9b77;
  --hero-field: #d9edff;
  --hero-faint: #7d98b2;
  --hero-warm: #ff7043;

  --night: #0f2c48;
  --night-raised: #16496f;
  --on-night: #fff5eb;
  --on-night-muted: #bfd2e3;
  --on-night-link: #9fd0f5;
  --on-night-accent: #ff9b77;
  --on-night-rule: rgba(234, 241, 246, 0.24);

  --code-bg: #0b2238;
  --code-ink: #e8f0f7;
  --code-muted: #93aec2;

  --shadow: 0 1px 2px rgba(20, 42, 62, 0.08), 0 10px 28px rgba(20, 42, 62, 0.1);
  --radius: 10px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1a2a;
    --paper-raised: #11263b;
    --paper-sunk: #07131f;
    --ink: #e8f0f7;
    --ink-muted: #a9bccd;
    --rule: #22405c;
    --link: #8cc6f2;
    --link-hover: #cde6fa;
    --accent: #ff7a4d;
    --on-accent: #1a0903;
    --accent-text: #ff9b77;
    --focus: #ff9b77;
    --head-glow: rgba(255, 112, 67, 0.16);

    --night: #06121e;
    --night-raised: #0f2c48;

    --code-bg: #050e17;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.3);
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

/* A monospace runs wide, so the sizes sit a step below a serif's. */
h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
}

h2 {
  font-size: clamp(1.45rem, 2.7vw, 1.95rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

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

/* No ligatures: in a command, "-f" and "->" must look like what you type. */
code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

:not(pre) > code {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  min-width: 2.2em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--rule);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

strong {
  font-weight: 650;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.75rem;
}

.eyebrow--on-night {
  color: var(--on-night-accent);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--night);
  color: var(--on-night);
  border-bottom: 1px solid var(--on-night-rule);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--on-night);
  text-decoration: none;
}

.brand:hover {
  color: var(--on-night);
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand img {
  border-radius: 9px;
}

.brand__name {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__sub {
  color: var(--on-night-muted);
  font-weight: 400;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--on-night);
  font-weight: 550;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--night-raised);
  color: var(--on-night);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--on-night-accent);
  border-radius: 8px 8px 2px 2px;
}

@media (max-width: 559px) {
  .site-nav {
    width: 100%;
  }

  /* Five links on one row at 360 px. */
  .site-nav ul {
    justify-content: space-between;
    gap: 0;
  }

  .site-nav a {
    padding: 8px 3px;
    font-size: 0.9rem;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.button--primary:hover {
  color: var(--on-accent);
  filter: brightness(1.06);
}

.button--ghost {
  border-color: var(--on-night-rule);
  color: var(--on-night);
}

.button--ghost:hover {
  background: var(--night-raised);
  color: var(--on-night);
  border-color: var(--on-night);
}

.button--ghost-ink {
  border-color: var(--ink);
  color: var(--ink);
}

.button--ghost-ink:hover {
  background: var(--paper-raised);
  color: var(--ink);
}

.button__note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.9;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.stack--row {
  flex-direction: row;
  flex-wrap: wrap;
}

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

/* The hero is the wallpaper, in both colour schemes: deep navy with a field of
   scraped characters, a pivot trail and its sources, drawn by hero.js on the
   canvas. The canvas covers the wallpaper image (there for a browser without
   JavaScript); the text sits on a navy panel so it reads over either. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--hero-ink);
  background-color: var(--hero-bg);
  background-image: linear-gradient(var(--hero-veil), var(--hero-veil)), url("/img/wallpaper-1280.jpg");
  background-size: cover;
  background-position: 70% 40%;
}

.hero.hero--live {
  background-image: linear-gradient(180deg, var(--hero-bg-top), var(--hero-bg));
}

.hero__signal {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero__inner {
  display: grid;
  align-items: center;
  min-height: clamp(420px, 56vw, 620px);
  padding-block: clamp(32px, 7vw, 96px) clamp(200px, 30vw, 96px);
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: 5fr 6fr;
    padding-block: clamp(48px, 7vw, 96px);
  }
}

.hero__panel {
  padding: clamp(22px, 3.4vw, 36px);
  background: var(--hero-panel);
  border: 1px solid var(--hero-rule);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero .eyebrow {
  color: var(--hero-accent);
}

.hero h1 {
  color: var(--hero-ink);
}

.hero__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--hero-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.section--night a:not(.button) {
  color: var(--on-night-link);
}

.section--night a:not(.button):hover {
  color: var(--on-night);
}

/* ---------- Page heads (inner pages) ---------- */

.page-head {
  position: relative;
  background-color: var(--paper-sunk);
  background-image: radial-gradient(ellipse 60% 120% at 100% 50%, var(--head-glow), transparent 70%);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(40px, 6vw, 72px);
}

.page-head__lead {
  font-size: 1.15rem;
  margin: 0;
}

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

.section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section--sunk {
  background: var(--paper-sunk);
}

.section--night {
  background: var(--night);
  color: var(--on-night);
}

.section--night h2,
.section--night h3 {
  color: var(--on-night);
}

.section--night .eyebrow {
  color: var(--on-night-accent);
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin-bottom: 0.35em;
}

.section-head__intro {
  color: var(--ink-muted);
  font-size: 1.1rem;
  margin: 0;
}

.section--night .section-head__intro {
  color: var(--on-night-muted);
}

.section__more {
  margin: 28px 0 0;
  font-weight: 600;
}

.section__more a::after,
.bench__card h3 a::after {
  content: " →";
}

.split {
  display: grid;
  gap: 32px 56px;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--center {
    align-items: center;
  }
}

.split p {
  max-width: var(--measure);
}

/* ---------- Facts strip ---------- */

.facts {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--rule);
}

.facts__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  list-style: none;
  /* Only the list's own vertical margin: .wrap's margin-inline: auto centres it. */
  margin-block: 0;
  padding-block: 24px;
}

@media (min-width: 860px) {
  .facts__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.facts__list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 3px solid var(--accent-text);
}

.facts__list strong {
  font-family: var(--font-mono);
  font-size: 1.2rem;
}

.facts__list span {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* ---------- Bench cards (home) ---------- */

.bench {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bench__card {
  position: relative;
  padding: 22px 22px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.bench__card:hover {
  transform: translateY(-2px);
}

.bench__card h3 {
  margin-bottom: 0.4em;
}

.bench__card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.bench__card h3 a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.bench__card p {
  margin-bottom: 0.6em;
}

.bench__apps {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.ver {
  display: inline-block;
  padding: 0 0.45em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-sunk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: nowrap;
}

/* ---------- Compare (home) ---------- */

.compare {
  display: grid;
  gap: 16px;
}

@media (min-width: 860px) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .compare--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.compare__card {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.compare__card ul {
  margin: 0;
  padding-left: 1.2em;
}

.compare__card li + li {
  margin-top: 0.4em;
}

.cta {
  text-align: center;
}

.cta p {
  color: var(--ink-muted);
  margin-inline: auto;
}

.cta--left {
  text-align: left;
}

.cta--left p {
  margin-inline: 0;
}

/* ---------- Code blocks ---------- */

.code {
  position: relative;
  margin: 0 0 16px;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
}

.code__label {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 84px 0 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-muted);
}

.code pre {
  margin: 0;
  padding: 4px 16px 16px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
  tab-size: 4;
}

.code__copy,
.copy {
  font: 600 0.78rem/1 var(--font-sans);
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.code__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(235, 227, 203, 0.35);
  background: var(--code-bg);
  color: var(--code-ink);
}

.code__copy:hover {
  border-color: var(--code-ink);
}

.copy {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  vertical-align: middle;
}

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

.code-group {
  display: grid;
  gap: 0;
}

/* Grid items default to min-width: auto, so a long command would widen the
   whole column past the screen; let the <pre> scroll inside its box instead. */
.code,
.code-group > *,
.steps > *,
.howtos > *,
.split > *,
.release > *,
.compare > * {
  min-width: 0;
}

/* ---------- Download ---------- */

.release {
  display: grid;
  gap: 32px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .release {
    grid-template-columns: 2fr 3fr;
    align-items: start;
  }
}

.release h2 {
  margin-bottom: 0.25em;
}

.release__meta,
.release__hint {
  color: var(--ink-muted);
}

.release__meta {
  margin-bottom: 1.4em;
}

.release__hint {
  font-size: 0.9rem;
  margin: 14px 0 0;
}

.release__facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.release__facts div {
  display: grid;
  gap: 2px 16px;
}

@media (min-width: 560px) {
  .release__facts div {
    grid-template-columns: 8.5rem 1fr;
  }
}

.release__facts dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.2em;
}

.release__facts dd {
  margin: 0;
  min-width: 0;
}

.sha {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.needs {
  display: grid;
  gap: 12px;
  padding-left: 1.2em;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 24px 24px 12px 76px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 18px;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-text);
}

.step p,
.step ul {
  max-width: var(--measure);
}

@media (max-width: 559px) {
  .step {
    padding: 64px 18px 8px;
  }

  .step::before {
    left: 18px;
    top: 16px;
  }
}

.tools,
.keys {
  padding-left: 1.2em;
}

.keys {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.keys kbd {
  margin-right: 4px;
}

.table-title {
  font-size: 1.15rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom-width: 2px;
}

td.num,
th.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tests td.num {
  text-align: right;
}

.table-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* The ARM version's boot tests, below the PC version's. */
.table-note + .table-title {
  margin-top: 32px;
}

/* ---------- Applications ---------- */

.toc {
  display: grid;
  gap: 6px 16px;
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 860px) {
  .toc {
    grid-template-columns: max-content 1fr;
    align-items: baseline;
  }
}

.toc__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

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

.toc a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--ink);
}

.toc li[data-not-included] a::after {
  content: " · not included";
  color: var(--accent-text);
  font-size: 0.85em;
}

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.app {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  min-width: 0;
}

.app__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.app__name {
  margin: 0;
}

.app__start {
  font-size: 0.95rem;
}

.app__label {
  display: inline-block;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.app .code {
  box-shadow: none;
}

.app .code pre {
  font-size: 0.84rem;
}

.app__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

.app__pkg {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.ver--flathub {
  font-family: var(--font-sans);
}

/* A tool built in at a pinned version or commit (the spec's repos and build
   script), outlined in the accent. */
.ver--built {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent-text);
}

/* ---------- Method page ---------- */

/* What the distro leaves out, on purpose. */
.callout {
  align-self: start;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.callout h3 {
  margin-top: 0;
}

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

/* The pivot trail: steps in a row on wide screens, a column on narrow ones,
   joined by the accent line as on the wallpaper. */
.trail {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: none;
}

.trail__step {
  position: relative;
  padding-left: 34px;
}

.trail__dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

.trail__step::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  bottom: -22px;
  width: 2px;
  background: var(--accent);
}

.trail__step:last-child::before {
  display: none;
}

.trail__step--found .trail__dot {
  width: 26px;
  height: 26px;
  left: -4px;
  top: 0;
}

.trail__name {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
}

.trail__n {
  color: var(--accent-text);
  margin-right: 0.3em;
}

.trail__how {
  margin: 4px 0 0;
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .trail {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  .trail__step {
    padding-left: 0;
    padding-top: 40px;
  }

  .trail__dot {
    left: 0;
    top: 0;
  }

  .trail__step--found .trail__dot {
    left: -4px;
    top: -4px;
  }

  .trail__step::before {
    left: 18px;
    right: -16px;
    top: 8px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* Eight sources around one finding, as on the boot splash. */
.star__sources li:nth-child(1) {
  --i: 0;
}

.star__sources li:nth-child(2) {
  --i: 1;
}

.star__sources li:nth-child(3) {
  --i: 2;
}

.star__sources li:nth-child(4) {
  --i: 3;
}

.star__sources li:nth-child(5) {
  --i: 4;
}

.star__sources li:nth-child(6) {
  --i: 5;
}

.star__sources li:nth-child(7) {
  --i: 6;
}

.star__sources li:nth-child(8) {
  --i: 7;
}

.star {
  position: relative;
  margin: 0 auto;
  width: min(100%, 360px);
  aspect-ratio: 1;
}

.star__sources {
  list-style: none;
  margin: 0;
  padding: 0;
}

.star__sources li {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: rotate(calc(var(--i) * 45deg - 90deg)) translate(clamp(110px, 38vw, 150px)) rotate(calc(var(--i) * -45deg + 90deg)) translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  white-space: nowrap;
}

.star__sources li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: clamp(72px, 26vw, 110px);
  height: 1px;
  background: var(--rule);
  transform-origin: 0 50%;
  transform: rotate(calc(var(--i) * 45deg + 90deg));
}

.star__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  clip-path: polygon(12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%);
  width: 150px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.libs {
  min-width: 680px;
}

.libs th[scope="row"] {
  white-space: nowrap;
}

.libs tbody tr:last-child > * {
  border-bottom: 0;
}

.howtos-head {
  padding-bottom: 32px;
}

.howtos {
  display: grid;
  gap: 0;
  padding-block: 32px 72px;
}

.howto {
  max-width: 860px;
  padding-block: 32px;
  border-bottom: 1px solid var(--rule);
}

.howto:last-child {
  border-bottom: 0;
}

.howto h3 {
  font-size: 1.55rem;
}

.howto p,
.howto ul {
  max-width: var(--measure);
}

.issues {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

/* Which version the known-issues checks were made on, when there are two. */
.issues-note {
  margin: -8px 0 20px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.issue {
  min-width: 0;
  padding: 20px 22px 6px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.issue h3 {
  font-size: 1.2rem;
}

.issue p {
  max-width: var(--measure);
}

.note {
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--paper-raised);
}

.howto[data-not-included] h3::after {
  content: "Not included";
  display: inline-block;
  margin-left: 12px;
  padding: 2px 8px;
  border: 1px solid var(--accent-text);
  border-radius: 999px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------- Screenshots ---------- */

.gallery {
  display: grid;
  gap: 48px;
}

.gallery .section-head {
  margin-bottom: -16px;
}

.gallery--art {
  padding-top: 0;
}

.gallery__pair {
  display: grid;
  gap: 48px 32px;
}

@media (min-width: 860px) {
  .gallery__pair {
    grid-template-columns: 1fr 1fr;
  }
}

.shot {
  margin: 0;
  min-width: 0;
}

.shot__frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow);
}

/* Captures keep their own shape; the artwork pair (a 16:9 chart and a square
   logo) shares one frame shape so the row lines up. */
.gallery--art .gallery__pair .shot__frame {
  aspect-ratio: 16 / 9;
}

.gallery--art .gallery__pair .shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot[data-kind="artwork"]#logo .shot__frame img {
  object-fit: contain;
  padding: 6%;
}

.shot figcaption {
  margin-top: 16px;
  max-width: var(--measure);
}

.shot__title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.3em;
}

.shot__source {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  vertical-align: middle;
}

.tag--capture {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

/* ---------- Stations ---------- */

.designators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  margin: 0 0 1em;
}

.designators div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.designators dt {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-text);
}

.designators dd {
  margin: 0;
}

.stations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.station {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent-text);
  border-radius: var(--radius);
}

.station__head {
  margin-bottom: 0.5em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}

.station__designator {
  color: var(--accent-text);
  margin-right: 6px;
}

.station__alias {
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.station__status {
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.tag--on-air {
  margin: 0 6px 0 0;
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.plain-steps {
  display: grid;
  gap: 6px;
  padding-left: 1.4em;
}

/* ---------- 404 ---------- */

.lost {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.site-footer {
  background: var(--night);
  color: var(--on-night-muted);
  font-size: 0.95rem;
}

.site-footer__inner {
  display: grid;
  gap: 28px 40px;
  padding-block: 48px 40px;
}

@media (min-width: 860px) {
  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer a {
  color: var(--on-night);
}

.site-footer a:hover {
  color: var(--on-night-link);
}

.site-footer__brand,
.site-footer__heading {
  color: var(--on-night);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 0.5em;
}

.site-footer__brand {
  font-size: 1.2rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.site-footer li a {
  display: inline-block;
  padding-block: 6px;
}

.site-footer__credits {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--on-night-rule);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero__signal,
  .code__copy,
  .copy {
    display: none;
  }
}
