/* Iris. One stylesheet, no framework.
   Spacing only uses the --s tokens. Colors only use the theme tokens. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #f4f3f0;
  --surface: #eae8e4;
  --ink: #121116;
  --muted: #4e4a57;
  --accent: #6431d6;
  --rule: #c9c5cf;
  --on-ink: #f4f3f0;
  --on-accent: #ffffff;
  --band: #121116;
  --band-ink: #f2f0f7;
  --band-muted: #b9b4c6;
  --band-accent: #a98bff;
  --band-dark: #0d0c10;
  --band-rule: #34303d;
  --on-ink-muted: #b9b4c6;
  --grid: rgb(18 17 22 / 0.07);
  --blade: #121116;
  color-scheme: light;

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(48px, 7vw, 88px);
  --max: 1240px;
  --header: 60px;
  --radius: 14px;
  --radius-sm: 8px;
  --pill: 999px;
}

:root[data-theme="dark"] {
  --paper: #0d0c10;
  --surface: #18161d;
  --ink: #f2f0f7;
  --muted: #b9b4c6;
  --accent: #a98bff;
  --rule: #3a3644;
  --on-ink: #0d0c10;
  --on-accent: #0d0c10;
  --band: #1c1a22;
  --grid: rgb(242 240 247 / 0.06);
  --blade: #2b2834;
  --on-ink-muted: #4e4a57;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0c10;
    --surface: #18161d;
    --ink: #f2f0f7;
    --muted: #b9b4c6;
    --accent: #a98bff;
    --rule: #3a3644;
    --on-ink: #0d0c10;
    --on-accent: #0d0c10;
    --band: #1c1a22;
    --grid: rgb(242 240 247 / 0.06);
    --blade: #2b2834;
    --on-ink-muted: #4e4a57;
    color-scheme: dark;
  }
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  font-kerning: normal;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

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

button,
input {
  font: inherit;
  color: inherit;
}

p {
  max-width: 68ch;
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: calc(var(--header) + var(--s5));
}

[hidden] {
  display: none !important;
}

/* Animated aperture field behind the page, drawn by site.js. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Type ---------- */

.display {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.25rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.display--page {
  font-size: clamp(2.25rem, 6.5vw, 5rem);
}

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

h2,
.h2 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h3 {
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  max-width: 42ch;
}

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sep {
  display: inline-block;
  width: 16px;
  height: 1px;
  margin: 0 0.75em;
  vertical-align: middle;
  background: currentColor;
}

.note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Typing ---------- */

.type-host {
  position: relative;
}

.type-host.is-typing > .type-ghost,
.type-host.is-typing > .type-ghost * {
  color: transparent;
}

.type-live {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.caret {
  display: inline-block;
  width: 0.08em;
  min-width: 3px;
  height: 0.8em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  background: var(--accent);
}

.label .caret {
  width: 0.6em;
  height: 1.05em;
  vertical-align: -0.2em;
}

@media (prefers-reduced-motion: no-preference) {
  .caret {
    animation: caret-blink 1s steps(1) infinite;
  }
}

@keyframes caret-blink {
  50% {
    visibility: hidden;
  }
}

/* ---------- Layout helpers ---------- */

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

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

.skip-link {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  z-index: 100;
  padding: var(--s3) var(--s4);
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

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

.section {
  padding-block: var(--section);
}

.section + .section {
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: var(--s3) var(--s7);
  margin-bottom: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--ink);
}

.section-head p {
  max-width: 52ch;
  color: var(--muted);
}

.split {
  display: grid;
  gap: var(--s4) var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid var(--ink);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.split > :first-child {
  container-type: inline-size;
}

.split .h2 {
  font-size: clamp(1.75rem, 10cqi, 3.25rem);
}

.split__intro {
  margin-top: var(--s3);
  max-width: 34ch;
  color: var(--muted);
}

.prose {
  display: grid;
  gap: var(--s3);
  align-content: start;
}

.prose h2 {
  margin-top: var(--s4);
  font-stretch: 112%;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 46px;
  padding: 0 var(--s5);
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-stretch: 108%;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn--line {
  background: transparent;
  color: var(--ink);
}

.btn--line:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.btn--signal {
  border-color: var(--band-accent);
  background: var(--band-accent);
  color: var(--band-dark);
}

.btn--signal:hover {
  border-color: var(--band-ink);
  background: var(--band-ink);
  color: var(--band-dark);
}

.btn[disabled] {
  cursor: progress;
}

.icon-arrow {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

@media (prefers-reduced-motion: no-preference) {
  .icon-arrow {
    transition: transform 0.18s ease-out;
  }

  .btn:hover .icon-arrow {
    transform: translateX(3px);
  }
}

@media (max-width: 479.98px) {
  .actions .btn {
    flex: 1 1 100%;
  }
}

.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s5);
  min-height: var(--header);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding-block: var(--s2);
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.mark__back {
  fill: var(--accent);
}

.mark__blades {
  fill: var(--ink);
}

.mark__seams {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.6;
}

.mark__iris {
  transform-origin: 16px 16px;
}

@media (prefers-reduced-motion: no-preference) {
  .mark__iris {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .logo:hover .mark__iris,
  .logo:focus-visible .mark__iris {
    transform: rotate(60deg);
  }
}

.logo__word {
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
}

.site-nav a {
  display: inline-block;
  padding-block: var(--s2);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.lamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-width: 44px;
  min-height: 38px;
  padding: 0 var(--s3);
  border: 1px solid var(--rule);
  border-radius: var(--pill);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.lamp:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.lamp__bulb {
  width: 10px;
  height: 10px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.lamp[aria-pressed="true"] .lamp__bulb {
  border-color: var(--accent);
  background: var(--accent);
}

.no-js .lamp {
  display: none;
}

.menu-button {
  display: none;
}

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

@media (max-width: 859.98px) {
  .js .site-nav {
    display: none;
  }

  .js .site-header__actions {
    margin-left: auto;
  }

  .js .lamp {
    min-height: 44px;
  }

  .js .menu-button {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    min-height: 44px;
    padding: 0 var(--s4);
    border: 1px solid var(--ink);
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--on-ink);
    font-family: var(--mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .no-js .site-header__inner {
    padding-block: var(--s2);
  }

  .no-js .site-nav {
    margin-left: 0;
    width: 100%;
  }
}

.menu-button__bars {
  position: relative;
  width: 14px;
  height: 9px;
}

.menu-button__bars::before,
.menu-button__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
}

.menu-button__bars::before {
  top: 0;
}

.menu-button__bars::after {
  bottom: 0;
}

.menu-button[aria-expanded="true"] .menu-button__bars::before {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-button__bars::after {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .menu-button__bars::before,
  .menu-button__bars::after {
    transition: transform 0.2s ease-out;
  }
}

.menu {
  position: fixed;
  inset: var(--header) 0 0 0;
  z-index: 49;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
}

.menu__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s7);
  min-height: 100%;
  padding-block: var(--s4) var(--s7);
}

.menu__list li + li {
  border-top: 1px solid var(--rule);
}

.menu__list a {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  padding-block: var(--s4);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.menu__num {
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.menu__foot {
  display: grid;
  gap: var(--s2);
  margin-top: auto;
}

.menu__foot a {
  font-weight: 700;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}

html.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .menu.is-opening {
    animation: iris-open 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@keyframes iris-open {
  from {
    clip-path: circle(0 at calc(100% - 40px) 0);
  }

  to {
    clip-path: circle(150% at calc(100% - 40px) 0);
  }
}

/* ---------- Film band ---------- */

.film {
  position: relative;
  padding-block: 24px;
  background: var(--band);
  color: var(--band-accent);
}

.film::before,
.film::after,
.poster::before,
.poster::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  background: var(--paper);
  -webkit-mask: url("/assets/img/sprocket.svg") left center / 20px 7px repeat-x;
  mask: url("/assets/img/sprocket.svg") left center / 20px 7px repeat-x;
}

.film::before {
  top: 6px;
}

.film::after {
  bottom: 6px;
}

.film--thin {
  padding-block: 10px;
}

.film--thin::after {
  display: none;
}

.film__codes {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--s6);
  height: 1.5em;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.film__codes span {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  white-space: nowrap;
}

.film__codes span::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.film__codes span.is-pending {
  visibility: hidden;
}

.film__codes .caret {
  width: 0.7em;
  height: 1.1em;
  margin-left: 0;
  vertical-align: -0.2em;
  background: var(--band-accent);
}

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

.hero {
  display: grid;
  gap: var(--s6);
  align-items: center;
  padding-block: clamp(32px, 5vw, 72px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--s7);
  }
}

.hero__copy {
  display: grid;
  gap: var(--s5);
  container-type: inline-size;
}

/* Each sentence of the headline is about 7.7em wide; this keeps both on one line. */
.hero .display {
  font-size: clamp(2rem, 12.5cqi, 6.5rem);
}

.hero__figure {
  display: grid;
  gap: var(--s3);
  justify-items: center;
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}

.aperture {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ap-back {
  fill: var(--accent);
}

.ap-reticle {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.5;
}

.ap-blades {
  fill: var(--blade);
}

.ap-seams {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2.5;
}

.ap-housing {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.ap-ticks {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
}

.ap-labels text {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  fill: var(--muted);
  text-anchor: middle;
  dominant-baseline: central;
}

.ap-labels text.is-active {
  font-weight: 700;
  fill: var(--accent);
}

.aperture-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  max-width: 340px;
}

.aperture-control output {
  min-width: 5ch;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
}

.no-js .aperture-control {
  display: none;
}

/* ---------- Range inputs ---------- */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

input[type="range"]::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -8px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

input[type="range"]:hover::-webkit-slider-thumb {
  background: var(--accent);
}

input[type="range"]:hover::-moz-range-thumb {
  background: var(--accent);
}

/* ---------- Releases ---------- */

.spec-strip {
  display: grid;
  border-top: 1px solid var(--ink);
}

.spec-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  column-gap: var(--s5);
  margin-top: var(--s4);
}

.spec-strip div {
  display: grid;
  gap: 2px;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.spec-strip dt,
.spec-list dt,
.range__scores dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-strip dd {
  font-weight: 600;
  font-size: 0.9375rem;
}

.log__title {
  margin-bottom: var(--s2);
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.settings-table th,
.settings-table td {
  padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: baseline;
}

.settings-table thead th {
  padding-block: var(--s2);
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Practice range ---------- */

.range {
  display: grid;
}

.range__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

@media (max-width: 599.98px) {
  .range__stage {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 1000px) {
  .range--full .range__stage {
    aspect-ratio: 2.2 / 1;
  }
}

.range__canvas {
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (pointer: fine) {
  .range__canvas.is-live {
    cursor: none;
  }
}

.range__nojs {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  max-width: none;
  padding: var(--s5);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted);
}

.js .range__nojs,
.no-js .range__bar {
  display: none;
}

.no-js .range__stage {
  border-radius: var(--radius);
}

.range__bar {
  display: grid;
  gap: var(--s3);
  padding: var(--s2) var(--s4);
  border: 1px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
}

@media (min-width: 700px) {
  .range__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.range__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s5);
}

.slider {
  display: grid;
  grid-template-columns: auto minmax(84px, 140px) 6ch;
  align-items: center;
  gap: var(--s3);
  font-size: 0.8125rem;
  font-weight: 700;
}

.slider output {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.range__scores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
}

.range__scores div {
  display: grid;
  gap: 2px;
}

.range__scores dd {
  font-weight: 700;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.range__caption {
  padding-top: var(--s3);
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 72ch;
}

.range__caption .label {
  margin-right: var(--s2);
  color: var(--ink);
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.switch__track {
  position: relative;
  width: 40px;
  height: 22px;
  flex: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--pill);
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
}

.switch input:checked + .switch__track {
  border-color: var(--accent);
  background: var(--accent);
}

.switch input:checked + .switch__track::after {
  background: var(--on-accent);
  transform: translateX(17px);
}

.switch input:focus-visible + .switch__track {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .switch__track::after {
    transition: transform 0.15s ease-out;
  }
}

/* ---------- Shipped list ---------- */

.shipped {
  margin-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.shipped li {
  display: grid;
  grid-template-columns: 3ch auto minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s1) var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.shipped__num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.shipped__name {
  font-stretch: 112%;
  font-weight: 700;
}

.shipped__meta {
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-align: right;
  color: var(--muted);
}

.shipped .is-pending .shipped__name {
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 599.98px) {
  .shipped li {
    grid-template-columns: 3ch minmax(0, 1fr);
  }

  .shipped__meta {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

/* ---------- How we work ---------- */

.ways {
  display: grid;
  gap: var(--s5) var(--s7);
}

@media (min-width: 760px) {
  .ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ways li {
  display: grid;
  gap: var(--s2);
  align-content: start;
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

.ways__tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.ways p {
  max-width: 44ch;
  font-size: 1.0625rem;
}

/* ---------- Contact ---------- */

.contact {
  container-type: inline-size;
}

.contact__email {
  display: inline-block;
  max-width: 100%;
  font-weight: 800;
  font-size: clamp(1.5rem, 7.4cqi, 6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
}

.contact__email:hover {
  text-decoration-thickness: 0.08em;
}

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

.site-footer {
  margin-top: auto;
  background: var(--paper);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s6);
  padding-block: var(--s5);
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
}

.site-footer__nav a {
  display: inline-block;
  padding-block: var(--s2);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer__nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-footer__copy {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

@media (max-width: 599.98px) {
  .site-footer__copy {
    margin-left: 0;
  }
}

/* ---------- Product page ---------- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--s2);
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--accent);
}

.display--product {
  font-size: clamp(3rem, 18cqi, 12rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.diagram {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
}

.diagram svg {
  width: 100%;
  height: auto;
}

.dg-frame {
  fill: none;
}

.dg-grid {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}

.dg-crop {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.dg-ghost {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.dg-target {
  fill: var(--ink);
}

.dg-target-ring {
  fill: none;
  stroke: var(--surface);
  stroke-width: 3;
}

.dg-target-dot,
.dg-dots circle {
  fill: var(--accent);
}

.dg-box {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}

.dg-motion {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.dg-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
}

.dg-raw {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.dg-cross {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}

.dg-marker circle {
  fill: var(--ink);
}

.dg-marker text {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  fill: var(--paper);
  text-anchor: middle;
  dominant-baseline: central;
}

.steps {
  display: grid;
  gap: var(--s5) var(--s7);
  counter-reset: step;
}

@media (min-width: 760px) and (max-width: 1099.98px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--s1) var(--s4);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  grid-row: span 2;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8125rem;
}

.steps h3 {
  align-self: center;
}

.steps p {
  grid-column: 2;
  font-size: 0.9375rem;
  color: var(--muted);
}

.settings-table tbody th {
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.settings-table td[data-label="Range"],
.settings-table td[data-label="Default"] {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.settings-table td[data-label="What it does"] {
  font-size: 0.9375rem;
  color: var(--muted);
}

@media (max-width: 759.98px) {
  .settings-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .settings-table,
  .settings-table tbody,
  .settings-table tr,
  .settings-table th,
  .settings-table td {
    display: block;
  }

  .settings-table tr {
    display: grid;
    gap: 2px;
    padding-block: var(--s3);
    border-bottom: 1px solid var(--rule);
  }

  .settings-table tbody tr:first-child {
    border-top: 1px solid var(--ink);
  }

  .settings-table th,
  .settings-table td {
    padding: 0;
    border: 0;
  }

  .settings-table tbody th {
    margin-bottom: var(--s1);
    white-space: normal;
  }

  .settings-table td[data-label="Range"]::before,
  .settings-table td[data-label="Default"]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 9ch;
    color: var(--muted);
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .settings-table td[data-label="What it does"] {
    margin-top: var(--s1);
  }
}

.spec-list div {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.spec-list div:first-child {
  padding-top: 0;
}

@media (max-width: 479.98px) {
  .spec-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.notes {
  display: grid;
  gap: var(--s3);
  align-content: start;
}

.notes__version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.notes ul {
  display: grid;
  gap: var(--s2);
}

.notes li {
  position: relative;
  padding-left: var(--s5);
}

.notes li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 10px;
  height: 2px;
  background: var(--accent);
}

.faq {
  border-top: 1px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
  font-stretch: 105%;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 1ch;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  padding-bottom: var(--s3);
  font-size: 0.9375rem;
  color: var(--muted);
}

.closer {
  display: grid;
  gap: var(--s5);
  padding-block: 0 var(--section);
}

.closer__text {
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--muted);
}

.closer__title {
  padding-top: var(--s4);
  border-top: 1px solid var(--ink);
  font-size: clamp(1.75rem, 5vw, 3.75rem);
}

/* ---------- Project poster (homepage) ---------- */

.poster {
  position: relative;
  display: grid;
  gap: var(--s6);
  padding: calc(var(--s7) + var(--s2)) clamp(20px, 4vw, 56px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--band);
  color: var(--band-ink);
}

.poster::before {
  top: var(--s3);
}

.poster::after {
  bottom: var(--s3);
}

@media (min-width: 960px) {
  .poster {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }
}

.poster__copy {
  display: grid;
  gap: var(--s4);
  align-content: start;
}

.poster .label {
  color: var(--band-muted);
}

.poster__name {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.poster__lede {
  max-width: 36ch;
  color: var(--band-muted);
}

.poster__points {
  border-top: 1px solid var(--band-rule);
}

.poster__points li {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--band-rule);
  font-stretch: 108%;
  font-weight: 700;
}

.poster__num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--band-accent);
}

.poster__link {
  justify-self: start;
  margin-top: var(--s2);
}

/* The whole poster is the link's hit area. */
.poster__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 20px;
}

.poster:hover .poster__link {
  border-color: var(--band-ink);
  background: var(--band-ink);
}

.poster:hover .poster__name {
  color: var(--band-accent);
}

.poster__link:focus-visible {
  outline-color: var(--band-accent);
}

.range--preview .range__stage {
  border-radius: var(--radius);
}

/* The preview inside the dark poster uses the dark palette in both themes. */
.poster .range {
  --surface: #1c1a22;
  --ink: #f2f0f7;
  --muted: #b9b4c6;
  --accent: #a98bff;
  --grid: rgb(242 240 247 / 0.07);
}

.poster .range__stage {
  border-color: var(--band-rule);
}

/* ---------- Project tour ---------- */

.chapter {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  padding-block: var(--s7);
  overflow-x: clip;
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--header);
}

.chapter--intro {
  padding-top: var(--s5);
  border-top: 0;
}

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  html:has(.tour) {
    scroll-snap-type: y proximity;
  }

  .chapter,
  .tour ~ #details {
    scroll-snap-align: start;
  }
}

.chapter__intro {
  display: grid;
  gap: var(--s4);
  container-type: inline-size;
}

.intro__grid {
  display: grid;
  gap: var(--s5) var(--s7);
  align-items: center;
}

@media (min-width: 960px) {
  .intro__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.intro__copy {
  display: grid;
  gap: var(--s5);
}

.intro__visual .range__stage {
  aspect-ratio: 16 / 9;
}

.intro__copy .spec-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

@media (max-width: 479.98px) {
  .intro__copy .spec-strip {
    column-gap: var(--s3);
  }

  .intro__copy .spec-strip dd {
    font-size: 0.8125rem;
  }
}

.chapter__inner {
  display: grid;
  gap: var(--s6) var(--s7);
  align-items: center;
}

@media (min-width: 960px) {
  .chapter__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.chapter__copy {
  display: grid;
  gap: var(--s4);
  align-content: start;
}

.chapter__count {
  color: var(--accent);
}

.chapter__title {
  font-size: clamp(2rem, 5vw, 4rem);
}

.chapter__lede {
  max-width: 42ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  color: var(--muted);
}

.chapter__stack {
  display: grid;
  gap: var(--s5);
}

.chapter__head {
  display: grid;
  gap: var(--s3) var(--s7);
}

.chapter__head .chapter__lede {
  max-width: 52ch;
}

.chapter--range .range__stage {
  aspect-ratio: 16 / 10;
}

@media (min-width: 1000px) {
  .chapter--range .range__stage {
    aspect-ratio: 3 / 1;
  }
}

@media (max-width: 599.98px) {
  .chapter--range .range__stage {
    aspect-ratio: 4 / 3;
  }
}

.chapter__next {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s6);
  padding-block: var(--s2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.chapter__next .icon-arrow {
  width: 12px;
  height: 12px;
}

.chapter__next:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .chapter__next:hover .icon-arrow {
    transform: translateY(3px);
  }
}

.text-link {
  justify-self: start;
  padding-block: var(--s2);
  font-weight: 700;
  font-size: 0.9375rem;
}

.points {
  border-top: 1px solid var(--rule);
}

.points li {
  position: relative;
  padding: var(--s3) 0 var(--s3) var(--s6);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

.points li::before {
  content: "";
  position: absolute;
  top: calc(var(--s3) + 0.72em);
  left: 0;
  width: 14px;
  height: 2px;
  background: var(--accent);
}

.points strong {
  color: var(--ink);
}

/* The 3D adapter in the hardware chapter. */
.device {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
}

@media (max-width: 959.98px) {
  .chapter--hardware .device {
    order: -1;
    aspect-ratio: 16 / 10;
  }
}

.device__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.device__strike {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.device__strike line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
  stroke-linecap: round;
  /* The line is about 136 units long. */
  stroke-dasharray: 140;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .js .device__strike line {
    stroke-dashoffset: 140;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.35s;
  }

  .js .chapter.is-active .device__strike line {
    stroke-dashoffset: 0;
  }
}

.device__tag {
  position: absolute;
  top: 10%;
  right: 12%;
  padding: var(--s1) var(--s3);
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.no-js .device,
.device.is-unsupported {
  display: none;
}

/* Engine chapter */
.chapter--engine .chapter__visual {
  display: grid;
  gap: var(--s4);
}

.steps--compact {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s3);
}

.steps--compact li {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px var(--s3);
}

.steps--compact li::before {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.steps--compact h3 {
  font-size: 1rem;
}

.steps--compact p {
  font-size: 0.875rem;
}

.steps li.is-current::before {
  background: var(--accent);
  color: var(--on-accent);
}

.dg-marker.is-on circle {
  fill: var(--accent);
}

.chapter--engine .spec-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  margin-top: 0;
}

/* Profiles chapter */
.profiles {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.profiles__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s4);
  padding: var(--s4);
  border-bottom: 1px solid var(--rule);
}

.profile.is-focused {
  background: var(--surface);
}

.profile__name {
  font-stretch: 110%;
  font-weight: 700;
}

.profile__values {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

.profile__state {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile__state::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.profile.is-focused .profile__state {
  color: var(--accent);
}

.profile.is-focused .profile__state::before {
  border-color: var(--accent);
  background: var(--accent);
}

.profiles__caption {
  padding: var(--s3) var(--s4);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Offline chapter */
.term {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--band);
  color: var(--band-ink);
}

.term__title {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--band-rule);
  color: var(--band-muted);
}

.term__body {
  margin: 0;
  padding: var(--s5) var(--s4);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term__key {
  color: var(--band-accent);
}

/* Floating Previous and Next bar */
.tour-bar {
  position: fixed;
  right: var(--gutter);
  bottom: var(--s4);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 5px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
  transform: translateY(calc(100% + var(--s5)));
  visibility: hidden;
}

.tour-bar.is-shown {
  transform: none;
  visibility: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .tour-bar {
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.35s;
  }

  .tour-bar.is-shown {
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
  }
}

.tour-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-width: 42px;
  height: 42px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.tour-bar__btn .icon-arrow {
  width: 14px;
  height: 14px;
}

.tour-bar__btn--next {
  padding: 0 var(--s4);
  background: var(--on-ink);
  color: var(--ink);
}

.tour-bar__btn:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.tour-bar__btn[disabled] {
  color: var(--on-ink-muted);
  cursor: default;
}

.tour-bar__btn[disabled]:hover {
  background: transparent;
  color: var(--on-ink-muted);
}

.tour-bar__btn:focus-visible {
  outline-color: var(--accent);
  outline-offset: 2px;
}

.tour-bar__status {
  display: grid;
  min-width: 9.5rem;
  padding-inline: var(--s2);
  line-height: 1.25;
}

.tour-bar__count {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--on-ink-muted);
}

.tour-bar__title {
  font-weight: 700;
  font-size: 0.8125rem;
  white-space: nowrap;
}

@media (max-width: 599.98px) {
  .tour-bar {
    right: 50%;
    transform: translate(50%, calc(100% + var(--s5)));
  }

  .tour-bar.is-shown {
    transform: translate(50%, 0);
  }

  .chapter {
    padding-bottom: calc(var(--s7) + var(--s8));
  }
}

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

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

.poster__download {
  position: relative;
  z-index: 2;
  padding: var(--s2);
  font-weight: 700;
  font-size: 0.9375rem;
}

.poster__download:hover {
  color: var(--band-accent);
}

.poster__link {
  margin-top: 0;
}

.poster__note,
.intro__note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--band-muted);
}

.intro__note {
  margin-top: calc(var(--s2) * -1);
  color: var(--muted);
}

.download {
  position: relative;
  display: grid;
  gap: var(--s6) var(--s7);
  padding: calc(var(--s7) + var(--s2)) clamp(20px, 4vw, 56px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--band);
  color: var(--band-ink);
}

.download::before,
.download::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  background: var(--paper);
  -webkit-mask: url("/assets/img/sprocket.svg") left center / 20px 7px repeat-x;
  mask: url("/assets/img/sprocket.svg") left center / 20px 7px repeat-x;
}

.download::before {
  top: var(--s3);
}

.download::after {
  bottom: var(--s3);
}

@media (min-width: 960px) {
  .download {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

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

.download a:hover {
  color: var(--band-accent);
}

.download :focus-visible {
  outline-color: var(--band-accent);
}

.download__main {
  display: grid;
  gap: var(--s4);
  align-content: start;
}

.download__lede {
  max-width: 34ch;
  font-size: 1.0625rem;
  color: var(--band-muted);
}

.download__fine {
  font-size: 0.8125rem;
  color: var(--band-muted);
}

.download__side {
  display: grid;
  gap: var(--s4);
}

.download__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s5);
  border-top: 1px solid var(--band-rule);
}

.download__meta div {
  display: grid;
  gap: 2px;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--band-rule);
}

.download__meta dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-muted);
}

.download__meta dd {
  font-weight: 600;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.download__meta .download__hash {
  grid-column: 1 / -1;
}

.download__hash code {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
}

.download__verify {
  font-size: 0.8125rem;
  color: var(--band-muted);
}

.download__verify code {
  color: var(--band-ink);
  overflow-wrap: anywhere;
}

.download__steps {
  display: grid;
  gap: var(--s2);
  counter-reset: install;
}

.download__steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--s3);
  align-items: baseline;
  font-size: 0.9375rem;
  counter-increment: install;
}

.download__steps li::before {
  content: counter(install, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--band-accent);
}

/* ---------- Simple pages ---------- */

.page {
  display: grid;
  gap: var(--s6);
  padding-block: var(--s6) var(--section);
}

.page__head {
  display: grid;
  gap: var(--s3);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--ink);
}

.page__body {
  max-width: 44rem;
}

.lost {
  display: grid;
  gap: var(--s6);
  align-items: center;
  padding-block: var(--s7) var(--section);
}

@media (min-width: 900px) {
  .lost {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.lost__copy {
  display: grid;
  gap: var(--s4);
}

.lost__report {
  font-size: 0.9375rem;
  color: var(--muted);
}

.aperture--closed {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
}

.result {
  display: grid;
  gap: var(--s4);
  justify-items: start;
  padding-block: var(--s7) var(--section);
}

/* ---------- Motion preferences ---------- */

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