/*
  Splay's site and manual. Colours come from the app icon: a navy square with a white-blue,
  a cyan and an indigo tile. Light and dark follow the system. No web fonts, no scripts here.
*/

:root {
  color-scheme: light;

  --navy: #0a1a44;
  --royal: #1456e0;
  --royal-deep: #0f45b8;
  --azure: #2f8cff;
  --cyan: #58c6ff;
  --indigo: #4a4de0;
  --ice: #dce8ff;
  --screen: #07112e;

  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #edf2fb;
  --band: #eef3fc;
  --text: #0b1020;
  --muted: #47526e;
  --line: #dbe3f0;
  --line-strong: #c3cfe4;
  --link: #1456e0;
  --ring: #2f8cff;
  --code-bg: #eef2fa;
  --code-text: #13204a;
  --kbd-bg: #ffffff;
  --kbd-line: #c3cfe4;
  --tint: #e4edff;
  --tint-text: #0f3fb0;
  --comment: #5d6b8c;

  --fig-display: #ffffff;
  --fig-line: #c3cfe4;
  --fig-tile: #f3f7ff;
  --fig-tile-line: #8ea3c8;
  --fig-focus: #dce8ff;
  --fig-focus-line: #1456e0;

  --shadow-screen: 0 28px 70px -32px rgba(10, 26, 68, 0.55), 0 2px 6px rgba(10, 26, 68, 0.08);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 60px;
  --gutter: 24px;
  --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b1020;
    --surface: #111a33;
    --surface-2: #0f1830;
    --band: #0d1530;
    --text: #e6edff;
    --muted: #a6b3d3;
    --line: #1f2b4a;
    --line-strong: #2d3c63;
    --link: #58c6ff;
    --ring: #58c6ff;
    --code-bg: #0f1830;
    --code-text: #dce8ff;
    --kbd-bg: #16213f;
    --kbd-line: #33456f;
    --tint: #14275a;
    --tint-text: #cfe0ff;
    --comment: #8796ba;

    --fig-display: #0b1328;
    --fig-line: #2d3c63;
    --fig-tile: #16244a;
    --fig-tile-line: #4a608f;
    --fig-focus: #1b3570;
    --fig-focus-line: #58c6ff;

    --shadow-screen: 0 28px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(120, 160, 255, 0.12);
  }
}

/* Base */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.landing {
  font-size: 17px;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

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

code {
  font-size: 0.875em;
  padding: 0.12em 0.36em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow-wrap: break-word;
}

pre {
  margin: 1.25em 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
  tab-size: 4;
}

pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
  overflow-wrap: normal;
}

kbd {
  display: inline-block;
  padding: 0.12em 0.45em 0.16em;
  border: 1px solid var(--kbd-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--kbd-bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  vertical-align: 0.06em;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--royal);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wrap-wide {
  max-width: 1240px;
}

.github-only {
  display: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.site-nav a[aria-current] {
  color: var(--text);
  background: var(--surface-2);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.6em 1.3em;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.button:hover {
  border-color: var(--muted);
  text-decoration: none;
}

.button-primary {
  border-color: transparent;
  background: var(--royal);
  color: #ffffff;
  box-shadow: 0 8px 22px -10px rgba(20, 86, 224, 0.75);
}

.button-primary:hover {
  border-color: transparent;
  background: var(--royal-deep);
}

/* Landing: hero */

.hero {
  padding: 72px 0 32px;
}

.hero-text {
  max-width: 820px;
  text-align: center;
}

.hero-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 28px rgba(20, 86, 224, 0.28));
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.lede {
  max-width: 34em;
  margin: 20px auto 0;
  font-size: clamp(1.2rem, 2.3vw, 1.42rem);
  line-height: 1.5;
}

.lede kbd {
  font-size: 0.78em;
}

.built-on {
  max-width: 38em;
  margin: 16px auto 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
}

.status {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  max-width: 40em;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.status-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border: 2px solid var(--azure);
  border-radius: 3px;
  transform: translateY(1px);
}

/* Demo animations */

.demo {
  margin: 0;
}

.demo-frame {
  position: relative;
  overflow: hidden;
  /* The renders have 40-point corners at 1920 by 1200. */
  border-radius: 2.083% / 3.333%;
  background: var(--screen);
  box-shadow: var(--shadow-screen);
  aspect-ratio: 16 / 10;
}

.demo video,
.demo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo figcaption,
.feature-media figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.demo-hero {
  margin-top: 48px;
}

.demo-hero figcaption {
  max-width: 52em;
  margin-inline: auto;
  text-align: center;
}

/* Landing: features */

.features {
  padding: 40px 0 24px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.feature:first-child {
  border-top: 0;
}

.feature:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature:nth-child(even) .feature-text {
  order: 2;
}

.feature h2 {
  margin: 0 0 16px;
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  font-weight: 700;
}

.feature p {
  margin: 0 0 14px;
}

.feature-media {
  margin: 0;
  min-width: 0;
}

.keylist {
  margin: 22px 0 0;
}

.keylist div {
  display: grid;
  grid-template-columns: 14em minmax(0, 1fr);
  gap: 4px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.keylist dt {
  white-space: nowrap;
}

.keylist dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.diagram,
.config {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.config pre {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 14px;
}

.c {
  color: var(--comment);
}

/* Landing: Splay and Dinky */

.compare {
  padding: 88px 0;
  border-block: 1px solid var(--line);
  background: var(--band);
}

.compare h2,
.keys h2,
.build h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.compare-intro p,
.section-lede {
  max-width: 44em;
  margin: 0;
  font-size: 1.06rem;
}

.demo-wide {
  margin: 40px 0 48px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  padding: 26px 26px 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.12rem;
  font-weight: 650;
}

.card h3::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--cyan);
}

.card:nth-child(2) h3::before {
  background: var(--indigo);
}

.card:nth-child(3) h3::before {
  background: linear-gradient(160deg, #dbe6ff, #6f97e4);
}

.card ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.95rem;
  list-style: disc;
}

.card li {
  margin: 0 0 12px;
}

.card li::marker {
  color: var(--muted);
}

.compare-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px 48px;
  margin-top: 36px;
}

.compare-notes p {
  margin: 0;
  color: var(--muted);
}

/* Landing: keys */

.keys {
  padding: 88px 0 72px;
}

.table-scroll {
  margin-top: 32px;
  overflow-x: auto;
}

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

.keytable th {
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.keytable td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.keytable td:first-child {
  white-space: nowrap;
}

.keytable tr.ours td:first-child {
  box-shadow: inset 3px 0 0 var(--azure);
}

.tag {
  display: inline-block;
  padding: 1px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-ours {
  border-color: transparent;
  background: var(--tint);
  color: var(--tint-text);
}

.section-note {
  max-width: 46em;
  margin: 24px 0 0;
  color: var(--muted);
}

/* Landing: build */

.build {
  padding: 80px 0 96px;
  border-top: 1px solid var(--line);
}

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px;
  align-items: start;
  margin-top: 32px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 28px 54px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--royal);
  color: #ffffff;
  font-weight: 700;
}

.steps h3 {
  margin: 2px 0 8px;
  font-size: 1.15rem;
}

.steps p {
  margin: 0;
}

.steps pre {
  margin: 14px 0 0;
}

.steps pre + p {
  margin-top: 14px;
}

.build-more {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
}

.build-more p {
  margin: 0 0 18px;
}

.build-more p:last-child {
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px var(--gutter) 48px;
}

.site-footer p {
  max-width: 64em;
  margin: 0 0 10px;
}

.site-footer a {
  color: inherit;
}

/* Manual */

.manual-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.manual-nav {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 36px 4px 48px 0;
  font-size: 0.93rem;
}

.manual-nav-title {
  margin: 0 0 10px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.manual-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
}

.manual-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.manual-nav a[aria-current="page"] {
  background: var(--tint);
  color: var(--tint-text);
  font-weight: 600;
}

.manual-nav .toc {
  margin: 6px 0 12px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.manual-nav .toc a {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.prose {
  min-width: 0;
  padding: 40px 0 72px;
}

.prose > h1 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin: 56px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 1.55rem;
  font-weight: 700;
}

.prose h3 {
  margin: 36px 0 10px;
  font-size: 1.2rem;
  font-weight: 650;
}

.prose h2 code,
.prose h3 code {
  font-size: 0.85em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  max-width: var(--measure);
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--muted);
}

.prose li {
  margin: 4px 0;
}

.prose li > pre {
  margin: 10px 0;
}

.prose blockquote {
  padding: 14px 18px;
  border-left: 3px solid var(--azure);
  border-radius: 0 14px 14px 0;
  background: var(--surface-2);
}

.prose blockquote p {
  margin: 0;
}

.prose pre {
  max-width: 100%;
}

.prose table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose > table {
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom-color: var(--line-strong);
  font-weight: 600;
}

.wide-table {
  max-width: 100%;
  margin: 0 0 20px;
  overflow-x: auto;
}

.wide-table table {
  min-width: 640px;
  margin: 0;
}

.wide-table td:first-child {
  min-width: 13em;
}

/* Two columns fit any width. A narrow screen stacks them. */
.wide-table table:not(:has(th:nth-child(3))) {
  min-width: 0;
}

/* Browsers share the width out differently. This gives the first of two columns the same share in each. */
.wide-table table:not(:has(th:nth-child(3))) td:first-child {
  width: 38%;
}

/*
  A browser may wrap code after a hyphen. In a table of commands the layout
  puts each word of the code in one of these spans, so a command wraps only
  after a space or a pipe.
*/
.prose td code .keep {
  white-space: nowrap;
}

.cursor {
  color: var(--azure);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.pager a {
  display: flex;
  flex-direction: column;
  min-width: 12em;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.pager span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.pager-next {
  margin-left: auto;
  text-align: right;
}

/* Manual figures: the SVGs in _includes/figures, drawn with these classes. */

.prose figure {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 24px;
  max-width: var(--measure);
  margin: 20px 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.prose figure svg {
  flex: none;
  width: 170px;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.prose figure.wide svg {
  width: 320px;
}

.prose figure.steps svg {
  width: 136px;
}

.prose figure pre {
  flex: 1 1 220px;
  margin: 0;
  padding: 0;
  background: none;
}

.prose figcaption {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

figure .display {
  fill: var(--fig-display);
  stroke: var(--fig-line);
}

figure .tile {
  fill: var(--fig-tile);
  stroke: var(--fig-tile-line);
  vector-effect: non-scaling-stroke;
}

figure .off {
  opacity: 0.5;
}

figure .focus {
  fill: var(--fig-focus);
  stroke: var(--fig-focus-line);
  stroke-width: 2;
  filter: drop-shadow(0 0 3px rgba(47, 140, 255, 0.55));
}

figure .empty {
  fill: none;
  stroke: var(--fig-line);
  stroke-dasharray: 3 3;
}

figure text {
  fill: currentColor;
  font-family: var(--sans);
  font-size: 9px;
  text-anchor: middle;
  dominant-baseline: central;
}

/* 404 */

.notfound {
  padding: 120px 0 140px;
  text-align: center;
}

.notfound img {
  display: block;
  margin: 0 auto 20px;
}

.notfound h1 {
  margin: 0 0 12px;
  font-size: 2.4rem;
}

.notfound p {
  margin: 0 0 24px;
  color: var(--muted);
}

/* Narrow screens */

@media (max-width: 1000px) {
  .build-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .manual-shell {
    display: block;
  }

  .manual-nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 20px 0 0;
  }

  .manual-nav-title,
  .manual-nav .toc {
    display: none;
  }

  .manual-nav > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .manual-nav > ul a {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
  }

  .manual-nav > ul a[aria-current="page"] {
    border-color: transparent;
  }

  .prose {
    padding-top: 28px;
  }
}

@media (max-width: 880px) {
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 48px 0;
  }

  .feature:nth-child(even) .feature-text {
    order: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body.landing {
    font-size: 16px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-icon {
    width: 88px;
    height: 88px;
  }

  .demo-hero {
    margin-top: 36px;
  }

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

  .diagram,
  .config,
  .card,
  .build-more {
    padding: 20px;
    border-radius: 18px;
  }

  .config pre {
    font-size: 12.5px;
  }

  .compare,
  .keys {
    padding: 64px 0;
  }

  .keytable thead {
    display: none;
  }

  .keytable tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) fit-content(68%);
    gap: 6px 12px;
    padding: 12px 0 12px 12px;
    border-bottom: 1px solid var(--line);
  }

  .keytable tr.ours {
    box-shadow: inset 3px 0 0 var(--azure);
  }

  .keytable td {
    padding: 0;
    border: 0;
  }

  .keytable tr.ours td:first-child {
    box-shadow: none;
  }

  .keytable td:first-child {
    white-space: normal;
  }

  .keytable td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    color: var(--muted);
  }

  .keytable td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }

  /*
    A table of two columns shows each row as the first cell above the second.
    The second cell is muted, as in the key table on the landing page. A rule
    above the first row stands in for the hidden header.
  */
  .prose table:not(:has(th:nth-child(3))),
  .prose table:not(:has(th:nth-child(3))) :is(tbody, tr, td) {
    display: block;
  }

  .prose table:not(:has(th:nth-child(3))) {
    border-top: 1px solid var(--line-strong);
  }

  .prose table:not(:has(th:nth-child(3))) thead {
    display: none;
  }

  .prose table:not(:has(th:nth-child(3))) tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .prose table:not(:has(th:nth-child(3))) td {
    padding: 0;
    border: 0;
  }

  .prose table:not(:has(th:nth-child(3))) td:first-child {
    width: auto;
  }

  .prose table:not(:has(th:nth-child(3))) td + td {
    margin-top: 4px;
    color: var(--muted);
  }

  .prose h2 {
    margin-top: 44px;
    font-size: 1.35rem;
  }

  .prose figure {
    padding: 16px;
  }

  pre {
    font-size: 12.5px;
    padding: 14px 16px;
  }
}

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

  .site-nav a {
    padding: 6px 9px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
