@font-face {
  font-family: "Big Shoulders";
  src: url("assets/bigshoulders.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #000818;
  --field: #071426;
  --field-raised: #0b1c31;
  --limestone: #c3b5a7;
  --bright: #eee5d8;
  --cyan: #53c7ee;
  --cyan-dim: #32677f;
  --magenta: #f0448f;
  --muted: #91a9bb;
  --faint: #748da0;
  --line: rgb(83 199 238 / 28%);
  --line-strong: rgb(83 199 238 / 58%);
  --backdrop: rgb(0 4 15 / 82%);
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --body: Optima, Candara, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  --type-display: clamp(5rem, 9vw, 6rem);
  --type-headline: clamp(28px, 2.8vw, 40px);
  --type-title: 24px;
  --type-brand: 32px;
  --type-statement: clamp(21px, 2.2vw, 30px);
  --type-article-display: clamp(3.5rem, 7vw, 6rem);
  --type-article-display-mobile: clamp(3.4rem, 17vw, 5rem);
  --type-guide-display: clamp(4.8rem, 10vw, 6rem);
  --type-guide-display-mobile: clamp(4.4rem, 22vw, 6rem);
  --type-article-section: clamp(30px, 4vw, 42px);
  --type-subheading: 26px;
  --type-minor-heading: 21px;
  --type-intro: 19px;
  --type-lead: 17px;
  --type-body: 16px;
  --type-result: 15px;
  --type-compact: 14px;
  --type-caption: 13px;
  --type-small: 12px;
  --type-control: 11px;
  --type-label: 10px;
  --type-micro: 9px;
  --type-node: clamp(10px, 0.85vw, 13px);
  --measure: 72ch;
  --page: 1600px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--cyan-dim) var(--ground);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgb(83 199 238 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(83 199 238 / 2%) 1px, transparent 1px), var(--ground);
  background-size: 64px 64px;
  color: var(--limestone);
  font-family: var(--body);
  font-size: var(--type-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--magenta);
  color: var(--ground);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ground);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--ground);
  background: var(--cyan-dim);
}

a {
  color: inherit;
  text-decoration-color: var(--cyan-dim);
  text-underline-offset: 0.22em;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--bright);
  color: var(--ground);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip:focus {
  transform: translateY(0);
}

.utility {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 1.6fr;
  height: 34px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.12em;
  line-height: 33px;
  text-transform: uppercase;
}

.utility span {
  padding-inline: 20px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility span:last-child {
  text-align: right;
}

.siteheader {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 clamp(18px, 3vw, 46px);
  border-bottom: 1px solid var(--line-strong);
  background: rgb(0 8 24 / 96%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--bright);
  text-decoration: none;
}

.brand span {
  font-family: var(--display);
  font-size: var(--type-brand);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
}

.brand i {
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-label);
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primarynav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  font-family: var(--mono);
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.primarynav > a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
}

.primarynav > a:not(.iconlink)::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.primarynav > a:hover,
.primarynav > a:focus-visible,
.primarynav > a[aria-current] {
  color: var(--bright);
}

.primarynav > a:hover::after,
.primarynav > a:focus-visible::after,
.primarynav > a[aria-current]::after {
  transform: scaleX(1);
}

.iconlink,
.iconbutton {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 8px;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cyan);
}

.iconlink svg,
.iconbutton svg {
  width: 18px;
  height: 18px;
}

.iconlink svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.iconbutton {
  cursor: pointer;
}

.menutoggle {
  display: none;
}

.searchbutton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--type-control);
  letter-spacing: inherit;
  text-transform: inherit;
}

.searchbutton:hover {
  border-color: var(--line-strong);
  color: var(--bright);
}

.searchbutton svg {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-micro);
}

.greekrule {
  height: 8px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0 3px, var(--cyan-dim) 3px 4px, transparent 4px 9px),
    linear-gradient(0deg, transparent 0 3px, rgb(83 199 238 / 38%) 3px 4px, transparent 4px 7px);
  background-size: 18px 7px;
}

.fieldhero {
  display: grid;
  grid-template-columns: minmax(330px, 28%) 1fr;
  max-width: var(--page);
  min-height: calc(100svh - 108px);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
}

.dossier {
  position: relative;
  display: flex;
  min-height: 680px;
  padding: clamp(30px, 4vw, 62px) clamp(24px, 3.2vw, 52px) 230px;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  background:
    linear-gradient(120deg, rgb(83 199 238 / 4%), transparent 38%), linear-gradient(var(--field), rgb(3 17 34 / 94%));
}

.dossier h1,
.guideintro h1,
.article h1,
.lostpage h1 {
  margin: 0;
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-display);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 0.82;
  text-wrap: balance;
}

.dossier h1 {
  text-shadow: 0 12px 36px rgb(83 199 238 / 12%);
}

.statement {
  max-width: 22ch;
  margin: 36px 0 0;
  color: var(--bright);
  font-size: var(--type-statement);
  letter-spacing: 0.015em;
  line-height: 1.35;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 34px 0 0;
  border-block: 1px solid var(--line);
}

.facts div {
  min-width: 0;
  padding: 14px 10px 12px 0;
  border-right: 1px solid var(--line);
}

.facts div + div {
  padding-left: 12px;
}

.facts div:last-child {
  border-right: 0;
}

.facts dt,
.facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.facts dt {
  color: var(--faint);
}

.facts dd {
  margin-top: 3px;
  color: var(--cyan);
  font-size: var(--type-small);
}

.homeactions,
.guideactions,
.lostpage > div {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--type-control);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.button.primary {
  border-color: var(--limestone);
  background: var(--limestone);
  color: var(--ground);
}

.button.primary:hover {
  border-color: var(--cyan);
  background: var(--cyan);
}

.button.secondary:hover {
  border-color: var(--cyan);
  background: rgb(83 199 238 / 8%);
  color: var(--bright);
}

.installblock {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--ground);
}

.installblock > span {
  position: absolute;
  top: -20px;
  left: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.installblock code {
  padding: 12px 14px;
  color: var(--bright);
  font-family: var(--mono);
  font-size: var(--type-caption);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installblock button {
  min-width: 58px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.installblock button:hover {
  background: rgb(83 199 238 / 8%);
}

.atlasplate {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  height: 190px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.atlasplate img {
  position: absolute;
  right: 4px;
  bottom: -72px;
  width: 190px;
  opacity: 0.63;
}

.atlasplate span {
  position: absolute;
  bottom: 14px;
  left: 4px;
  max-width: 14ch;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.constellation {
  --orbit-x: 0px;
  --orbit-y: 0px;
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr;
  background: rgb(0 8 24 / 58%);
}

.charthead {
  display: flex;
  min-height: 82px;
  padding: 18px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.charthead h2,
.homefold h2,
.principles h2,
.fieldguide h2 {
  margin: 0;
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-headline);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.charthead p,
.principles header p,
.packageindex > div:first-child p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--type-caption);
}

.charthead label,
.packagefilter label {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.charthead input,
.packagefilter input {
  width: 130px;
  margin-left: 8px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--bright);
  font-family: var(--mono);
  font-size: var(--type-small);
  outline: 0;
}

.charthead input:focus,
.packagefilter input:focus {
  border-color: var(--magenta);
}

.chartfield {
  position: relative;
  min-height: 598px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 28%, rgb(83 199 238 / 7%) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 63%, rgb(195 181 167 / 8%) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 18%, rgb(83 199 238 / 8%) 0 1px, transparent 2px);
  background-size:
    47px 47px,
    61px 61px,
    83px 83px;
}

.chartfield::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 54%, rgb(83 199 238 / 4%) 55%, transparent 56%);
  content: "";
  pointer-events: none;
  transform: translate3d(var(--orbit-x), var(--orbit-y), 0);
  transition: transform 700ms var(--ease);
}

.chartlines {
  position: absolute;
  inset: 22px 28px 34px;
  width: calc(100% - 56px);
  height: calc(100% - 56px);
  color: var(--cyan);
  opacity: 0.42;
  overflow: visible;
  transform: translate3d(calc(var(--orbit-x) * -0.35), calc(var(--orbit-y) * -0.35), 0);
  transition: transform 700ms var(--ease);
}

.chartlines circle,
.chartlines path {
  stroke-dasharray: 0.3 1.4;
  stroke-width: 0.16;
}

.chartlines line {
  stroke-width: 0.16;
  vector-effect: non-scaling-stroke;
}

.chartfield nav {
  position: absolute;
  inset: 22px 28px 34px;
}

.starnode {
  position: absolute;
  top: calc(var(--y) * 0.96%);
  left: calc(var(--x) * 1%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-node);
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translate3d(calc(-50% + var(--orbit-x) * 0.16), calc(-50% + var(--orbit-y) * 0.16), 0);
  transition:
    color 160ms var(--ease),
    opacity 180ms var(--ease),
    filter 180ms var(--ease),
    transform 700ms var(--ease);
  white-space: nowrap;
}

.starnode span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--bright);
  background: var(--cyan);
  box-shadow: 0 0 16px rgb(83 199 238 / 54%);
  transform: rotate(45deg);
}

.starnode:hover,
.starnode:focus-visible {
  z-index: 4;
  color: var(--bright);
  filter: drop-shadow(0 6px 12px rgb(83 199 238 / 20%));
}

.starnode:hover span,
.starnode:focus-visible span {
  border-color: var(--magenta);
  background: var(--magenta);
}

.starnode[hidden] {
  display: none;
}

@starting-style {
  .starnode {
    opacity: 0.35;
    filter: blur(2px);
  }
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82px;
  height: 82px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.crosshair::before,
.crosshair::after,
.crosshair i::before,
.crosshair i::after {
  position: absolute;
  background: var(--line-strong);
  content: "";
}

.crosshair::before {
  top: 50%;
  right: -14px;
  left: -14px;
  height: 1px;
}

.crosshair::after {
  top: -14px;
  bottom: -14px;
  left: 50%;
  width: 1px;
}

.crosshair i::before {
  inset: 27px;
  border: 1px solid var(--magenta);
  background: transparent;
  transform: rotate(45deg);
}

.legend {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: flex;
  gap: 20px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  transform: rotate(45deg);
}

.legend b {
  width: 18px;
  height: 1px;
  background: var(--cyan-dim);
}

.mapempty {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-small);
  transform: translate(-50%, -50%);
}

.homefold {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  max-width: var(--page);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 0;
}

.quickcode {
  min-width: 0;
  padding: clamp(30px, 4vw, 62px);
  border-right: 1px solid var(--line-strong);
  background: var(--field);
}

.quickcode > div {
  display: flex;
  margin-bottom: 28px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.quickcode > div a {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quickcode pre,
.article pre {
  position: relative;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--ground);
  color: var(--bright);
  scrollbar-color: var(--cyan-dim) var(--field);
}

.quickcode code,
.article pre code {
  display: block;
  min-width: max-content;
  padding: 22px;
  font-family: var(--mono);
  font-size: var(--type-small);
  line-height: 1.75;
}

.fieldroutes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.fieldroutes a {
  display: flex;
  min-height: 172px;
  padding: 26px;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 180ms var(--ease);
}

.fieldroutes a:nth-child(2n) {
  border-right: 0;
}

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

.fieldroutes a:hover {
  background: rgb(83 199 238 / 6%);
}

.fieldroutes strong {
  color: var(--cyan);
  font-family: var(--display);
  font-size: var(--type-title);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fieldroutes span {
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.5;
}

.principles {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) clamp(26px, 6vw, 100px);
  gap: clamp(50px, 8vw, 120px);
  border-inline: 1px solid var(--line);
}

.principles header p {
  max-width: 42ch;
  margin-top: 18px;
  font-size: var(--type-lead);
}

.principles dl {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.principles dl div {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  padding: 25px 0;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.principles dt {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-control);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.principles dd {
  margin: 0;
  color: var(--muted);
}

.sitefooter {
  display: grid;
  grid-template-columns: 1fr auto auto;
  max-width: var(--page);
  min-height: 120px;
  margin: 0 auto;
  padding: 30px clamp(20px, 3vw, 46px);
  align-items: center;
  gap: 42px;
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sitefooter > div {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.sitefooter strong {
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-title);
  letter-spacing: 0.12em;
}

.sitefooter nav {
  display: flex;
  gap: 24px;
}

.sitefooter a:hover {
  color: var(--cyan);
}

.docshell {
  display: grid;
  grid-template-columns: 250px minmax(0, 820px) 210px;
  max-width: 1500px;
  min-height: calc(100svh - 108px);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
}

.docnav {
  position: sticky;
  top: 66px;
  display: flex;
  max-height: calc(100svh - 66px);
  padding: 30px 24px;
  align-self: start;
  flex-direction: column;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--field);
  scrollbar-width: thin;
}

.docnav strong {
  margin: 28px 0 8px;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docnav a {
  padding: 7px 9px;
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.35;
  text-decoration: none;
}

.docnav a:hover {
  color: var(--bright);
}

.docnav a[aria-current="page"] {
  background: rgb(83 199 238 / 9%);
  color: var(--cyan);
}

.docnav .docnavhome {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-title);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article {
  min-width: 0;
  padding: clamp(38px, 6vw, 86px) clamp(28px, 5vw, 72px) 100px;
}

.breadcrumb {
  display: flex;
  margin-bottom: 46px;
  gap: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--cyan);
}

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

.article h1 {
  max-width: 13ch;
  margin-bottom: 44px;
  font-size: var(--type-article-display);
}

.article h2,
.article h3,
.article h4 {
  position: relative;
  color: var(--bright);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  scroll-margin-top: 92px;
  text-wrap: balance;
}

.article h2 {
  margin: 76px 0 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--type-article-section);
  text-transform: uppercase;
}

.article h3 {
  margin: 48px 0 16px;
  font-size: var(--type-subheading);
}

.article h4 {
  margin: 36px 0 12px;
  font-size: var(--type-minor-heading);
}

.headinganchor {
  margin-left: 10px;
  color: var(--cyan-dim);
  font-family: var(--mono);
  font-size: 0.45em;
  opacity: 0;
  text-decoration: none;
  vertical-align: middle;
  transition: opacity 160ms ease;
}

.article h2:hover .headinganchor,
.article h3:hover .headinganchor,
.article h4:hover .headinganchor,
.headinganchor:focus-visible {
  opacity: 1;
}

.article p,
.article li {
  color: var(--limestone);
}

.article p {
  margin: 0 0 22px;
}

.article ul,
.article ol {
  margin: 0 0 28px;
  padding-left: 24px;
}

.article li {
  margin: 8px 0;
  padding-left: 5px;
}

.article li::marker {
  color: var(--magenta);
  font-family: var(--mono);
}

.article a {
  color: var(--cyan);
}

.article code,
.packageindex code,
.packagerow code {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.88em;
}

.article p code,
.article li code,
.article td code {
  padding: 0.1em 0.28em;
  border: 1px solid rgb(83 199 238 / 16%);
  background: rgb(83 199 238 / 6%);
}

.article pre {
  margin: 28px 0 34px;
}

.copycode {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copycode:hover {
  border-color: var(--cyan);
  color: var(--bright);
}

.article blockquote {
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  background: var(--field);
}

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

.article table {
  display: block;
  width: 100%;
  margin: 30px 0 38px;
  overflow-x: auto;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.article th,
.article td {
  min-width: 140px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article th {
  background: var(--field);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article td {
  font-size: var(--type-compact);
}

.article hr {
  margin: 64px 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.sourcebar {
  display: flex;
  margin-top: 76px;
  padding: 14px 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-block: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sourcebar a {
  color: var(--cyan);
  text-transform: none;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 44px;
  border: 1px solid var(--line);
}

.pager a {
  display: flex;
  min-height: 96px;
  padding: 18px;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
}

.pager a + a {
  align-items: end;
  border-left: 1px solid var(--line);
  text-align: right;
}

.pager a:hover {
  background: rgb(83 199 238 / 6%);
}

.pager span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pager strong {
  margin-top: 5px;
  color: var(--cyan);
  font-size: var(--type-compact);
  font-weight: 500;
}

.toc {
  position: sticky;
  top: 66px;
  display: flex;
  max-height: calc(100svh - 66px);
  padding: 38px 22px;
  align-self: start;
  flex-direction: column;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.toc strong {
  margin-bottom: 14px;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc a,
.toc span {
  padding: 5px 0;
  color: var(--faint);
  font-size: var(--type-control);
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover,
.toc a.active {
  color: var(--cyan);
}

.toc .toclevel3 {
  padding-left: 12px;
}

.fieldguide {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(52px, 8vw, 110px) clamp(24px, 5vw, 74px) 120px;
  border-inline: 1px solid var(--line);
}

.guideintro {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) 1fr;
  padding-bottom: clamp(52px, 8vw, 110px);
  align-items: end;
  gap: clamp(30px, 7vw, 100px);
  border-bottom: 1px solid var(--line-strong);
}

.guideintro h1 {
  font-size: var(--type-guide-display);
}

.guideintro p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--type-intro);
}

.guideactions {
  grid-column: 2;
  margin-top: 8px;
}

.guideindex,
.packageindex {
  padding-top: clamp(66px, 9vw, 110px);
}

.guideindex h2,
.packageindex h2 {
  margin-bottom: 28px;
}

.indexrow {
  display: grid;
  grid-template-columns: 0.7fr 1fr auto;
  min-height: 92px;
  padding: 18px 0;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.indexrow:last-child {
  border-bottom: 1px solid var(--line);
}

.indexrow > span {
  color: var(--bright);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.indexrow p {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-compact);
}

.indexrow i {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--type-micro);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.indexrow:hover > span {
  color: var(--cyan);
}

.packageindex > div:first-child {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  align-items: end;
  gap: 40px;
}

.packagefilter {
  display: flex;
  margin: 34px 0 18px;
  align-items: center;
  justify-content: end;
}

.packagefilter input {
  width: min(260px, 60vw);
}

.packagerow {
  display: grid;
  grid-template-columns: 0.85fr 1.5fr 0.45fr;
  min-height: 68px;
  padding: 12px 14px;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.packagerow:last-child {
  border-bottom: 1px solid var(--line);
}

.packagerow:hover {
  background: rgb(83 199 238 / 6%);
}

.packagerow > span {
  color: var(--muted);
  font-size: var(--type-caption);
}

.packagerow i {
  justify-self: end;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-micro);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emptystate {
  margin: 0;
  padding: 34px;
  border: 1px solid var(--magenta);
  color: var(--limestone);
  text-align: center;
}

.searchdialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100svh - 50px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cyan);
  border-radius: 0;
  background: var(--field);
  color: var(--limestone);
  box-shadow: 0 24px 70px rgb(0 0 0 / 62%);
}

.searchdialog::backdrop {
  background: var(--backdrop);
}

.searchhead {
  display: flex;
  height: 58px;
  padding-left: 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.searchhead label {
  color: var(--bright);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.searchhead .iconbutton {
  width: 58px;
  height: 57px;
  border: 0;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
}

.searchdialog > input {
  display: block;
  width: calc(100% - 40px);
  margin: 20px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--bright);
  font-family: var(--mono);
  font-size: 16px;
  outline: 0;
}

.searchdialog > input:focus {
  border-color: var(--magenta);
}

.searchstatus {
  padding: 0 20px 14px;
  color: var(--faint);
  font-size: var(--type-small);
}

.searchresults {
  max-height: 490px;
  margin: 0;
  padding: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  list-style: none;
}

.searchresults a {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 16px 20px;
  gap: 8px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.searchresults a:hover,
.searchresults a:focus-visible {
  background: rgb(83 199 238 / 7%);
}

.searchresults strong {
  color: var(--cyan);
  font-size: var(--type-result);
}

.searchresults i {
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-micro);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.searchresults p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: var(--type-small);
}

.lostpage {
  display: flex;
  min-height: calc(100svh - 228px);
  padding: 40px 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.lostpage > span {
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-control);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lostpage h1 {
  margin-top: 28px;
  font-size: var(--type-article-display);
}

.lostpage p {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .fieldhero {
    grid-template-columns: minmax(310px, 34%) 1fr;
  }

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

  .toc {
    display: none;
  }

  .sitefooter {
    grid-template-columns: 1fr auto;
  }

  .sitefooter > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .utility {
    grid-template-columns: 1fr 1fr;
  }

  .utility span:nth-child(n + 3) {
    display: none;
  }

  .menutoggle {
    display: grid;
  }

  .primarynav {
    position: absolute;
    top: 66px;
    right: 0;
    left: 0;
    display: none;
    padding: 14px 22px 22px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line-strong);
    background: var(--field);
  }

  .primarynav.open {
    display: flex;
  }

  .primarynav > a,
  .primarynav .searchbutton {
    width: 100%;
    min-height: 46px;
    justify-content: start;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .primarynav .iconlink {
    display: flex;
    padding: 12px 0;
  }

  .fieldhero {
    grid-template-columns: 1fr;
  }

  .dossier {
    min-height: auto;
    padding-bottom: 40px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .dossier h1 {
    font-size: 6rem;
  }

  .statement {
    max-width: 28ch;
  }

  .atlasplate {
    top: 38px;
    right: 28px;
    bottom: auto;
    left: auto;
    width: 210px;
    height: 190px;
    border-top: 0;
    opacity: 0.45;
  }

  .constellation {
    min-height: 650px;
  }

  .homefold,
  .principles {
    grid-template-columns: 1fr;
  }

  .quickcode {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .docshell {
    grid-template-columns: 1fr;
  }

  .docnav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    max-height: 230px;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docnav strong,
  .docnav .docnavhome {
    grid-column: 1 / -1;
  }

  .docnav strong {
    margin-top: 14px;
  }

  .guideintro,
  .packageindex > div:first-child {
    grid-template-columns: 1fr;
  }

  .guideactions {
    grid-column: 1;
  }
}

@media (max-width: 680px) {
  .siteheader {
    min-height: 60px;
  }

  .primarynav {
    top: 60px;
  }

  .fieldhero {
    border-inline: 0;
  }

  .dossier {
    padding: 38px 22px 36px;
  }

  .dossier h1 {
    font-size: clamp(5rem, 24vw, 6rem);
  }

  .atlasplate {
    display: none;
  }

  .facts {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .homeactions {
    flex-direction: column;
  }

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

  .charthead label {
    display: flex;
    align-items: center;
  }

  .charthead input {
    width: 100%;
  }

  .constellation {
    min-height: 0;
  }

  .chartfield {
    min-height: 0;
    padding: 18px;
  }

  .chartlines,
  .crosshair,
  .legend,
  .chartfield::before {
    display: none;
  }

  .chartfield nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
  }

  .starnode {
    position: static;
    min-width: 0;
    min-height: 48px;
    padding: 10px;
    background: var(--ground);
    font-size: 10px;
    transform: none;
  }

  .starnode span {
    width: 6px;
    height: 6px;
  }

  .mapempty {
    position: static;
    padding: 30px;
    text-align: center;
    transform: none;
  }

  .homefold {
    border-inline: 0;
  }

  .quickcode {
    padding: 36px 20px;
  }

  .quickcode > div {
    align-items: start;
    flex-direction: column;
  }

  .fieldroutes {
    grid-template-columns: 1fr;
  }

  .fieldroutes a,
  .fieldroutes a:nth-child(2n),
  .fieldroutes a:nth-last-child(-n + 2) {
    min-height: 134px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fieldroutes a:last-child {
    border-bottom: 0;
  }

  .principles {
    padding: 70px 22px;
    gap: 44px;
    border-inline: 0;
  }

  .principles dl div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sitefooter {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 20px;
    border-inline: 0;
  }

  .sitefooter > div {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .sitefooter nav {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .sitefooter > span {
    grid-column: 1;
  }

  .article {
    padding: 42px 20px 80px;
  }

  .article h1 {
    font-size: var(--type-article-display-mobile);
  }

  .breadcrumb {
    flex-wrap: wrap;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .sourcebar {
    align-items: start;
    flex-direction: column;
  }

  .sourcebar a {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .fieldguide {
    padding-inline: 20px;
    border-inline: 0;
  }

  .guideintro h1 {
    font-size: var(--type-guide-display-mobile);
  }

  .guideintro p {
    font-size: var(--type-lead);
  }

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

  .indexrow {
    grid-template-columns: 1fr auto;
    gap: 7px 16px;
  }

  .indexrow p {
    grid-column: 1 / -1;
  }

  .packagerow {
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
  }

  .packagerow > span {
    grid-column: 1 / -1;
  }

  .packagefilter {
    justify-content: start;
  }

  .searchdialog {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip,
  .primarynav > a::after,
  .button,
  .chartfield::before,
  .chartlines,
  .starnode,
  .headinganchor {
    transition: none;
  }
}

/* ===========================================================================
   The field survey
   ---------------------------------------------------------------------------
   Atlas as a gamebook. Each page is one numbered station: an instrument strip
   across the top, a panel carrying the section number and the prose, and a
   choice list set with dotted leaders the way a gamebook prints "turn to 47".

   The two halves of Atlas get different accents — cyan for the web, magenta
   for the desktop — so a reader can tell from the colour of a station which
   world they are standing in without reading the label.
   =========================================================================== */

body.survey {
  --station: var(--cyan);
  --station-dim: var(--cyan-dim);
  --station-line: var(--line);
}

body.survey.field-desktop {
  --station: var(--magenta);
  --station-dim: #8d2a55;
  --station-line: rgb(240 68 143 / 26%);
}

body.survey.field-open,
body.survey.field-both {
  --station: var(--limestone);
  --station-dim: #6d6055;
  --station-line: rgb(195 181 167 / 24%);
}

/* `main`, not a bare class: the body carries `survey` too, for the accent
   variables above, and an unqualified rule would centre the whole page in a
   940px column — header, footer and all. */
main.survey {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* --- the instrument strip -------------------------------------------------- */

.stationhead {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  align-items: center;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--station-line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stationhead .field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--station);
}

.stationhead .field::before {
  width: 7px;
  height: 7px;
  background: var(--station);
  content: "";
  rotate: 45deg;
}

.stationhead .routetrail {
  margin-left: auto;
  overflow: hidden;
  max-width: 46ch;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stationhead .routetrail i {
  color: var(--faint);
  font-style: normal;
}

.stationhead .routetrail b {
  color: var(--station);
  font-weight: 400;
}

/* --- the panel ------------------------------------------------------------- */

.station {
  position: relative;
  margin-top: 40px;
}

/* Registration marks, the way a survey plate carries them: corner ticks that
   say the sheet is aligned. Decorative, so they never reach the reader. */
.station::before,
.station::after {
  position: absolute;
  width: 14px;
  height: 14px;
  content: "";
  pointer-events: none;
}

.station::before {
  top: -14px;
  left: -18px;
  border-top: 1px solid var(--magenta);
  border-left: 1px solid var(--magenta);
}

.station::after {
  right: -18px;
  bottom: -14px;
  border-right: 1px solid var(--magenta);
  border-bottom: 1px solid var(--magenta);
}

.station > header {
  position: relative;
  padding-bottom: 12px;
}

.stationkind {
  display: block;
  color: var(--station);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* The section number, printed at plate scale. It is the page's anchor: you
   should be able to tell which section you are on from across the room. */
.stationnumber {
  margin: 4px 0 -14px;
  color: var(--station);
  font-family: var(--display);
  font-size: clamp(5.5rem, 15vw, 9.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.78;
  opacity: 0.16;
}

.station h1 {
  position: relative;
  max-width: 20ch;
  margin: 0;
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-article-section);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
}

.station .lede {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--limestone);
  font-size: var(--type-statement);
  line-height: 1.4;
}

.stationbody {
  max-width: 68ch;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--station-line);
}

.stationbody p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: var(--type-lead);
}

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

.stationbody strong {
  color: var(--bright);
  font-weight: 600;
}

.stationbody code,
.station .lede code {
  padding: 1px 5px;
  border: 1px solid var(--station-line);
  color: var(--station);
  font-family: var(--mono);
  font-size: 0.86em;
}

/* --- the choices ----------------------------------------------------------- */

.choices {
  margin-top: 44px;
}

.choices h2 {
  margin: 0 0 14px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.choices li {
  border-bottom: 1px solid var(--station-line);
}

.choices a {
  display: grid;
  grid-template-columns: 34px auto minmax(24px, 1fr) auto;
  gap: 0 14px;
  align-items: baseline;
  padding: 16px 8px 16px 0;
  color: var(--limestone);
  text-decoration: none;
  transition:
    background 160ms var(--ease),
    color 160ms var(--ease);
}

.choices a:hover,
.choices a:focus-visible {
  background: rgb(83 199 238 / 6%);
  color: var(--bright);
}

body.survey.field-desktop .choices a:hover,
body.survey.field-desktop .choices a:focus-visible {
  background: rgb(240 68 143 / 7%);
}

/* The number is the keyboard shortcut, so it is drawn as a key, not a bullet. */
.choices a b {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--station-line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-control);
  font-weight: 400;
  transition:
    border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.choices a:hover b,
.choices a:focus-visible b {
  border-color: var(--station);
  color: var(--station);
}

.choices a > span {
  font-size: var(--type-lead);
  line-height: 1.35;
}

.choices a small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: var(--type-caption);
  line-height: 1.4;
}

/* The leader. This is the detail that makes it read as a printed gamebook
   rather than a list of links: the dots run from the end of the label to the
   section number, however long the label happens to be. */
.choices a i {
  height: 1em;
  border-bottom: 1px dotted var(--station-dim);
  translate: 0 -0.25em;
}

.choices a em {
  color: var(--station);
  font-family: var(--mono);
  font-size: var(--type-control);
  font-style: normal;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* --- endings --------------------------------------------------------------- */

.station.isending .stationnumber {
  opacity: 0.22;
}

.stack,
.command,
.snippet,
.reading {
  margin-top: 44px;
}

.stack h2,
.command h2,
.snippet h2,
.reading h2 {
  margin: 0 0 14px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stackrow {
  display: grid;
  grid-template-columns: minmax(160px, 22ch) 1fr;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--station-line);
}

.stackrow:last-child {
  border-bottom: 1px solid var(--station-line);
}

.stackrow code {
  color: var(--station);
  font-family: var(--mono);
  font-size: var(--type-compact);
}

.stackrow a {
  text-decoration-color: var(--station-dim);
  text-underline-offset: 3px;
}

.stackrow a:hover code {
  color: var(--bright);
}

.stackrow p {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-compact);
  line-height: 1.5;
}

.commandline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  background: var(--ground);
}

.commandline code {
  overflow-x: auto;
  padding: 14px 16px;
  color: var(--bright);
  font-family: var(--mono);
  font-size: var(--type-compact);
  white-space: nowrap;
}

.commandline .button {
  border: 0;
  border-left: 1px solid var(--line-strong);
}

.button.ghost {
  border-color: var(--station-line);
  color: var(--faint);
}

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

.snippet figure {
  margin: 0;
  border: 1px solid var(--station-line);
  background: var(--ground);
}

.snippet figcaption {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--station-line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.1em;
}

.snippet figcaption i {
  color: var(--station-dim);
  font-style: normal;
  text-transform: uppercase;
}

.snippet pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
}

.snippet code {
  color: var(--limestone);
  font-family: var(--mono);
  font-size: var(--type-caption);
  line-height: 1.7;
  tab-size: 2;
}

.reading > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reading a {
  padding: 9px 14px;
  border: 1px solid var(--station-line);
  color: var(--station);
  font-family: var(--mono);
  font-size: var(--type-control);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease);
}

.reading a:hover {
  border-color: var(--station);
  background: rgb(83 199 238 / 8%);
  color: var(--bright);
}

.stationfoot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--station-line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-control);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stationfoot a {
  color: var(--faint);
  text-decoration-color: var(--station-dim);
  text-underline-offset: 4px;
}

.stationfoot a:hover {
  color: var(--station);
}

.stationfoot .button {
  min-height: 34px;
  margin-left: auto;
  padding: 6px 12px;
}

/* --- the chart page's extra blocks ---------------------------------------- */

.cratefield,
.sectionindex {
  max-width: var(--page);
  margin: 0 auto;
  padding: 56px 32px;
  border-top: 1px solid var(--line);
}

.cratefield {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(240px, 26ch) 1fr;
}

.cratefield h2,
.sectionindex h2 {
  margin: 0 0 10px;
  color: var(--bright);
  font-family: var(--display);
  font-size: var(--type-subheading);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cratefield p,
.sectionindex p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--type-compact);
}

.cratelist {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.cratelist a {
  display: grid;
  grid-template-columns: minmax(140px, 18ch) 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 13px 16px;
  background: var(--ground);
  color: var(--limestone);
  text-decoration: none;
}

.cratelist a:hover {
  background: var(--field);
  color: var(--bright);
}

.cratelist code {
  color: var(--magenta);
  font-family: var(--mono);
  font-size: var(--type-compact);
}

.cratelist span {
  font-size: var(--type-compact);
}

.cratelist i {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-label);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sectionindex {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(240px, 26ch) 1fr;
}

.sectionlist {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  background: var(--line);
}

.sectionrow {
  display: grid;
  grid-template-columns: 3ch 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 11px 14px;
  background: var(--ground);
  color: var(--limestone);
  font-size: var(--type-compact);
  text-decoration: none;
}

.sectionrow:hover {
  background: var(--field);
  color: var(--bright);
}

.sectionrow b {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--type-control);
  font-weight: 400;
}

.sectionrow:hover b {
  color: var(--cyan);
}

.sectionrow i {
  font-family: var(--mono);
  font-size: var(--type-label);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sectionrow i.field-web {
  color: var(--cyan-dim);
}

.sectionrow i.field-desktop {
  color: #8d2a55;
}

.sectionrow i.field-open,
.sectionrow i.field-both {
  color: var(--faint);
}

@media (max-width: 860px) {
  .cratefield,
  .sectionindex {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .cratelist a {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  main.survey {
    padding: 0 16px 72px;
  }

  .stationhead .routetrail {
    width: 100%;
    margin-left: 0;
    padding-top: 6px;
  }

  .station::before,
  .station::after {
    display: none;
  }

  .stationnumber {
    font-size: clamp(4.5rem, 26vw, 7rem);
  }

  .choices a {
    grid-template-columns: 30px 1fr auto;
  }

  .choices a > span {
    grid-column: 2 / span 1;
  }

  /* The leader needs room to read as a leader. Below this width it is a
     smudge, so it goes and the section marker carries the line. */
  .choices a i {
    display: none;
  }

  .stackrow {
    grid-template-columns: 1fr;
  }

  .stationfoot .button {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .choices a,
  .choices a b,
  .reading a {
    transition: none;
  }
}
