/* lumenshell.dev. A near-black canvas where type does the talking, depth
   comes from stepping surface colours (never shadows or borders), and the
   only warm light is Lumen's own campfire. Ember is for the Copy button
   and nothing else; syntax colours stay inside code. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/static/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/jbmono-400.woff2") format("woff2"); }

:root {
  /* Surfaces, from the floor up */
  --canvas: #121212;
  --raised: #1e1e1d;
  --code: #353534;
  --hover: #40403f;

  /* Text */
  --text: #faf9f6;
  --soft: #e3e2e0;
  --muted: #a3a29f;
  --faint: #868684;

  /* The one accent: step four of Lumen's fire palette. Copy only. */
  --ember: #f78724;
  --ember-hover: #ffb53d;

  /* Syntax, inside code only (Rosé Pine, Lumen's default theme) */
  --syn-key: #c4a7e7;
  --syn-str: #f6c177;
  --syn-com: #908caa;

  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --width: 1440px;
}

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

html { background: var(--canvas); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--muted);
  font: 400 1rem/1.5 var(--sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--soft); text-decoration-color: var(--faint); text-underline-offset: 0.22em; transition: color 0.15s ease, text-decoration-color 0.15s ease; }

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

code { font-family: var(--mono); font-size: 0.875em; letter-spacing: 0; }

h1, h2, h3 { color: var(--text); font-weight: 400; margin: 0; text-wrap: balance; }

h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: 1.125rem; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--text); color: var(--canvas); z-index: 10; border-radius: 4px; }
.skip:focus { left: 8px; }

/* Header */

.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.02em; }
.top nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.top nav .gh { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 10px 0; }
.top nav .gh svg { display: block; }
.top nav a, .bottom nav a { display: inline-block; padding: 10px 0; color: var(--faint); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
/* The current release, left of the GitHub mark: quiet, in the type versions
   are written in, and a link to what changed. The two sit closer together
   than the page links, as one group. */
.top nav .version {
  margin-right: calc(12px - clamp(16px, 3vw, 32px));
  padding: 3px 9px; background: var(--raised); border-radius: 50px;
  font: 400 0.75rem/1.5 var(--mono); letter-spacing: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Hero: the headline stack, then the product window standing in front of
   the fire. */

.hero { position: relative; overflow: hidden; }

.hero-text {
  max-width: 960px; margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) var(--gutter) 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 34em; margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); line-height: 1.5;
  text-wrap: pretty;
}

/* The install bar: a Linux / macOS switch, the command for the chosen
   system after a faint prompt, and Copy, the page's one primary action.
   One grid, one control height (40px) and one inner radius (8px), inset
   8px in a 16px-radius bar so the corners stay concentric. */

.get { margin-top: 34px; }

.bar {
  display: inline-grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  max-width: 100%;
  padding: 8px;
  background: var(--code); border-radius: 16px;
  text-align: left;
}

.os { display: flex; gap: 4px; }
.os button {
  height: 40px; padding: 0 16px;
  background: transparent; color: var(--muted);
  border: 0; border-radius: 8px;
  font: 500 0.875rem/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.os button[aria-pressed="true"] { background: var(--hover); color: var(--text); }

/* Each system's command and its Copy button sit straight in the bar's grid. */
.command { display: contents; }
.command[hidden] { display: none; }
.command code {
  grid-column: 2;
  display: block; box-sizing: content-box;
  width: 49ch; /* the longest command and its prompt, so switching doesn't move the bar */
  margin-left: 4px; padding: 0 24px;
  border-left: 1px solid rgb(250 249 246 / 0.1);
  color: var(--soft); font-size: 0.9375rem; line-height: 40px;
  white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.command code::-webkit-scrollbar { display: none; }
.command code::before { content: "$ " / ""; color: var(--faint); }

.copy {
  grid-column: 3;
  min-width: 84px; height: 40px; padding: 0 20px;
  background: var(--ember); color: var(--canvas);
  border: 0; border-radius: 8px;
  font: 600 0.875rem/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease;
}

/* Before the script runs there's no switch: every command shows, one per
   row, each with its own Copy. */
html:not(.js) .os { display: none; }
html:not(.js) .bar { grid-template-columns: minmax(0, 1fr) auto; }
html:not(.js) .command code { grid-column: 1; margin-left: 0; border-left: 0; }
html:not(.js) .copy { grid-column: 2; }

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

/* The stage: the product window below the hero text. */

.stage {
  position: relative;
  max-width: calc(var(--width) + 2 * var(--gutter));
  margin: clamp(48px, 7vw, 80px) auto 0;
  padding: 0 var(--gutter);
}

.window {
  position: relative;
  width: min(100%, 1280px); margin: 0 auto;
  border-radius: 16px;
}

/* The window can show other screenshots, chosen from a row of buttons under
   it. Every image shares one grid cell and one size, so they cross-fade in
   place. Without the script there's just the first image. */
.shots { display: grid; }
.shots .window { grid-area: 1 / 1; opacity: 0; transition: opacity 0.35s ease; }
.shots .window.is-on { opacity: 1; }
.shots .window[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .shots .window { transition: none; } }

.shot-bar { margin-top: 20px; text-align: center; }
html:not(.js) .shot-bar { display: none; }
.shot-picks {
  display: inline-flex; gap: 4px; max-width: 100%;
  padding: 4px; background: var(--raised); border-radius: 12px;
  overflow-x: auto; scrollbar-width: none;
}
.shot-picks::-webkit-scrollbar { display: none; }
.shot-picks button {
  flex: none; height: 36px; padding: 0 14px;
  background: transparent; color: var(--muted);
  border: 0; border-radius: 8px;
  font: 500 0.875rem/1 var(--sans); letter-spacing: -0.01em; white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.shot-picks button[aria-pressed="true"] { background: var(--code); color: var(--text); }
.shot-caption { min-height: 1.5em; margin: 14px 0 0; color: var(--muted); font-size: 0.9375rem; text-wrap: balance; }

.hero-short { min-height: 70vh; }

/* The campfire: pinned to the bottom of the window and burning behind
   everything as you scroll. The header, content and footer sit in front;
   the footer's own surface covers it at the end of the page. */

.fire {
  position: fixed; left: 0; bottom: 0; z-index: 0;
  width: 100%; height: clamp(220px, 26vw, 380px); /* flames in the lower half, embers above */
  image-rendering: pixelated;
  pointer-events: none;
}
.top, main, .bottom { position: relative; z-index: 1; }

/* Pause or light the fire: moving content that's always on screen needs a
   way to stop it. */
.fire-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 2;
  height: 32px; padding: 0 12px;
  background: rgba(18, 18, 18, 0.82); color: var(--muted);
  border: 0; border-radius: 50px;
  font: 500 0.8125rem/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, color 0.15s ease;
}

/* Sections */

.features, .yours, .again {
  max-width: var(--width); margin: 0 auto;
  padding: clamp(80px, 10vw, 128px) var(--gutter) 0;
}

/* Features */

.features h2 { max-width: 18ch; }
.features dl {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 48px);
  margin: 48px 0 0;
}
.features dt { color: var(--text); font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.015em; }
.features dd { margin: 8px 0 0; color: var(--faint); font-size: 0.9375rem; line-height: 1.55; text-wrap: pretty; }
.features dd code { color: var(--muted); }

/* Make it yours: a numbered list on the left, and the chosen file on the
   right in a panel one surface step up, sized to the longest file so
   switching never moves the page. */

.yours-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 48px; }
.yours-head .lead { margin: 0; max-width: 30em; text-align: left; }

.yours-rows {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px clamp(24px, 4vw, 56px); align-items: start;
  margin-top: 40px;
}
.yours-item { grid-column: 1; padding: 20px 22px; border-radius: 14px; transition: background 0.15s ease; }
.yours-item.is-on { background: var(--raised); }

.yours-pick {
  display: grid; grid-template-columns: 42px 1fr; gap: 6px 0;
  width: 100%; padding: 0;
  background: none; border: 0; color: inherit;
  text-align: left; font: inherit; letter-spacing: inherit;
  cursor: pointer;
}
html:not(.js) .yours-pick { cursor: default; }
.yours-num { color: var(--faint); font: 400 0.8125rem/1.9 var(--mono); transition: color 0.15s ease; }
.yours-title { color: var(--soft); font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.015em; }
.yours-text { grid-column: 2; color: var(--faint); font-size: 0.9375rem; line-height: 1.55; text-wrap: pretty; }
.yours-text code { color: var(--muted); }
.yours-item.is-on .yours-num, .yours-item.is-on .yours-title { color: var(--text); }
.yours-item.is-on .yours-text { color: var(--muted); }
.yours-link { display: inline-block; margin: 6px 0 0 42px; padding: 4px 0; font-weight: 500; font-size: 0.9375rem; }

.yours-file {
  grid-column: 2; margin: 0; min-width: 0;
  background: var(--raised); border-radius: 16px; padding: 0 8px 8px;
}
.yours-file figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 12px 10px;
  color: var(--faint); font: 400 0.75rem/1.4 var(--mono);
}
.yours-file pre {
  margin: 0; padding: 18px 20px;
  background: var(--canvas); border-radius: 10px;
  overflow-x: auto; scrollbar-width: thin;
  color: var(--soft); font: 400 0.8125rem/1.75 var(--mono);
}
.yours-file pre code { font-size: 1em; }
.yours-shell pre { padding-left: 28px; }

/* With the script, on wide screens: every file shares the right-hand cell,
   and only the chosen one is visible. */
@media (min-width: 901px) {
  .js .yours-rows { grid-template-rows: repeat(3, auto) 1fr; }
  .js .yours-file { grid-row: 1 / -1; align-self: stretch; display: flex; flex-direction: column; }
  .js .yours-file pre { flex: 1; }
  .js .yours-file[hidden] { display: flex; visibility: hidden; }
}

pre .k { color: var(--syn-key); }
pre .s { color: var(--syn-str); }
pre .c { color: var(--syn-com); }
pre .o { color: var(--muted); }
pre .p { color: var(--faint); }
pre .ran { position: relative; }
pre .ran::before {
  content: ""; position: absolute; left: -12px; top: 0.15em; bottom: 0.15em;
  width: 3px; border-radius: 2px; background: #5d5c59;
}

/* The last call */

.again { text-align: center; padding-bottom: clamp(80px, 10vw, 128px); }

/* Footer: one surface step up from the canvas (Warp's footer role). A
   brand column, then the links in groups, then a hairline over the legal
   line and the credit. */

.bottom { background: rgb(30 30 29 / 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); } /* --raised, letting the fire glow through */
.bottom-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(32px, 6vw, 96px);
  max-width: var(--width); margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) var(--gutter) 72px; /* room for the fire's pause button */
}
.bottom-brand p { max-width: 26em; margin: 16px 0 0; color: var(--faint); font-size: 0.9375rem; line-height: 1.55; text-wrap: pretty; }

.bottom-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.bottom-links h2 { margin: 0 0 8px; color: var(--soft); font-size: 0.875rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.006em; }
.bottom-links ul { margin: 0; padding: 0; list-style: none; }
.bottom nav.bottom-links a { padding: 6px 0; font-weight: 400; font-size: 0.9375rem; }

.bottom-legal {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 24px; border-top: 1px solid #2f2f2f;
}
.bottom-legal p { margin: 0; color: var(--muted); font-size: 0.875rem; } /* one step up: the fire glows behind this line */


/* Guides: one readable column of prose over the fire, the same type scale
   as the home page. Tables and code scroll sideways on their own, so the
   page never does. */

.doc {
  max-width: calc(60rem + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(80px, 10vw, 128px);
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--faint); font-size: 0.875rem; }
.crumbs a { color: var(--faint); text-decoration: none; }
.doc-head { margin-top: 20px; }
.doc-head h1 { font-size: clamp(2.125rem, 5.5vw, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; }
.doc-head .lead { margin: 18px 0 0; max-width: none; }
.doc-meta { margin: 14px 0 0; color: var(--faint); font-size: 0.875rem; }

.prose, .faq { color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }
.prose { margin-top: 48px; }
.prose > :first-child { margin-top: 0; }
.prose h2, .faq > h2, .doc-cta h2, .related h2, .guide-group h2 {
  margin: 56px 0 0; font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; letter-spacing: -0.025em;
}
.prose h3, .faq h3 { margin: 32px 0 0; }
.prose p, .prose ul, .prose ol, .faq p { margin: 16px 0 0; text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--soft); font-weight: 500; }
.prose code, .faq code { padding: 0.1em 0.35em; background: var(--raised); border-radius: 5px; color: var(--soft); overflow-wrap: anywhere; }

.prose pre {
  margin: 20px 0 0; padding: 18px 20px;
  background: var(--raised); border-radius: 12px;
  overflow-x: auto; scrollbar-width: thin;
  color: var(--soft); font: 400 0.875rem/1.7 var(--mono);
}
.prose pre code { padding: 0; background: none; font-size: 1em; }

.table { margin: 24px 0 0; overflow-x: auto; border-radius: 12px; background: var(--raised); scrollbar-width: thin; }
.prose table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; }
.prose th { color: var(--soft); font-weight: 500; }
.prose thead th { color: var(--text); }
.prose tbody tr { border-top: 1px solid #2f2f2f; }

.prose blockquote, .note {
  margin: 24px 0 0; padding: 16px 20px;
  background: var(--raised); border-radius: 12px; color: var(--soft);
}
.note p:first-child { margin-top: 0; }

.faq h3 { color: var(--soft); }
.faq h3 + p { margin-top: 8px; }

.doc-cta { margin-top: 64px; padding: clamp(24px, 4vw, 40px); background: var(--raised); border-radius: 20px; }
.doc-cta h2 { margin: 0; }
.doc-cta p { margin: 12px 0 0; }
.doc-cta .get { margin-top: 24px; }
.doc-cta .bar { background: var(--code); }

.related ul, .guide-group ul { margin: 16px 0 0; padding: 0; list-style: none; }
.related li, .guide-group li { border-top: 1px solid #2f2f2f; }
.related a, .guide-group a { display: block; padding: 12px 0; text-decoration: none; }
.guide-group:first-of-type h2 { margin-top: 48px; }

/* Docs: every page in a sidebar on the left, the page in a wide column in
   the middle, and its headings on the right. Both side columns stay put
   while the page scrolls. Below 1180px the headings go; below 900px the
   sidebar becomes a menu above the page. */

.docs {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr) 11rem;
  gap: 0 clamp(24px, 2.5vw, 48px); align-items: start;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(80px, 10vw, 128px); /* the header's gutters, so the sidebar sits under the name */
}
.docs-page { min-width: 0; width: 100%; max-width: 70rem; margin: 0 auto; }
.docs-page .doc-head { margin-top: 16px; }
.docs-page .doc-head h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); line-height: 1.08; letter-spacing: -0.035em; }
.docs-page .doc-head h1 code { font-size: 0.9em; }
.docs-page .prose { margin-top: 32px; }

.docs-side, .docs-toc {
  position: sticky; top: 24px;
  max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin;
  font-size: 0.9375rem; line-height: 1.4;
}
.docs-side h2, .docs-menu h2, .docs-toc h2 {
  margin: 0; padding: 0 12px 6px;
  color: var(--soft); font-size: 0.8125rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.006em;
}
.docs-side ul, .docs-menu ul, .docs-toc ul { margin: 0; padding: 0; list-style: none; }
.docs-side ul + h2, .docs-menu ul + h2 { margin-top: 24px; }
.docs-side a, .docs-menu nav a {
  display: block; padding: 6px 12px; border-radius: 8px;
  color: var(--faint); text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.docs-side a[aria-current], .docs-menu nav a[aria-current] { background: var(--raised); color: var(--text); }

/* On this page: a hairline down the left, with the heading you're reading
   picked out on it. */
.docs-toc h2 { padding-left: 16px; }
.docs-toc ul { border-left: 1px solid #2f2f2f; }
.docs-toc a {
  display: block; margin-left: -1px; padding: 5px 0 5px 16px;
  border-left: 1px solid transparent;
  color: var(--faint); font-size: 0.875rem; text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-toc .toc-3 a { padding-left: 28px; }
.docs-toc a[aria-current] { border-left-color: var(--soft); color: var(--text); }
.docs-toc code { font-size: 0.9em; }

/* The sidebar as a menu, for narrow screens. */
.docs-menu { display: none; grid-column: 1 / -1; margin-bottom: 24px; background: var(--raised); border-radius: 12px; }
.docs-menu summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  color: var(--faint); font-size: 0.9375rem; font-weight: 500;
  cursor: pointer; list-style: none;
}
.docs-menu summary::-webkit-details-marker { display: none; }
.docs-menu summary span + span { color: var(--text); }
.docs-menu summary span + span::before { content: "/" / ""; margin-right: 10px; color: var(--faint); }
.docs-menu summary::after {
  content: ""; width: 7px; height: 7px; margin: -3px 2px 0 auto;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.docs-menu[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.docs-menu nav { padding: 8px 8px 12px; }
.docs-menu nav a[aria-current] { background: var(--code); }

/* Headings stop a little below the top when you jump to them. */
.prose h2[id], .prose h3[id], .prose h4[id] { scroll-margin-top: 24px; }
.prose h4 { margin: 28px 0 0; color: var(--soft); font-size: 1rem; font-weight: 500; }
.prose hr { margin: 40px 0 0; border: 0; border-top: 1px solid #2f2f2f; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose li > p:first-child { margin-top: 0; }
.prose th code, .prose td code { white-space: nowrap; overflow-wrap: normal; }

/* A code block from the docs: its language above it, and a Copy button that
   site.js adds, quiet until you point at the block. */
.prose .code { position: relative; margin: 20px 0 0; background: var(--raised); border-radius: 12px; }
.prose .code figcaption { padding: 10px 20px 0; color: var(--faint); font: 400 0.75rem/1.4 var(--mono); }
.prose .code pre { margin: 0; background: none; }
.prose .code figcaption + pre { padding-top: 10px; }
.prose li .code, .prose li .table { margin-top: 12px; }
.code-copy {
  position: absolute; top: 8px; right: 8px;
  height: 28px; padding: 0 10px;
  background: var(--code); color: var(--muted);
  border: 0; border-radius: 8px;
  font: 500 0.75rem/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer; opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.code:hover .code-copy, .code-copy:focus-visible, .code-copy.is-done { opacity: 1; }
/* Where nothing hovers the button always shows, so a block with no language
   line leaves it a row of its own. */
@media (hover: none) {
  .code-copy { opacity: 1; }
  .prose .code > pre:first-child { padding-top: 44px; }
}

/* Previous and next, in reading order. */
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 64px; }
.docs-pager a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; background: var(--raised); border-radius: 12px;
  text-decoration: none; transition: background 0.15s ease;
}
.docs-pager .docs-next { grid-column: 2; text-align: right; }
.docs-pager span:first-child { color: var(--faint); font-size: 0.8125rem; }
.docs-pager span + span { color: var(--text); font-weight: 500; }

/* The docs index: each group a list of pages, with what each one covers. */
.docs-group h2 { margin: 56px 0 0; font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; letter-spacing: -0.025em; }
.docs-group:first-of-type h2 { margin-top: 48px; }
.docs-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.docs-group a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 18px 20px; background: var(--raised); border-radius: 12px;
  text-decoration: none; transition: background 0.15s ease;
}
.docs-group span:first-child { color: var(--text); font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.015em; }
.docs-group span + span { color: var(--faint); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.docs-index { max-width: calc(60rem + 2 * var(--gutter)); }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 12rem minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs { display: block; }
  .docs-side { display: none; }
  .docs-menu { display: block; }
}
@media (max-width: 600px) {
  .docs-group ul { grid-template-columns: 1fr; }
}

/* Hover, only where there's a pointer that hovers: on touch it would stick
   after a tap. */
@media (hover: hover) {
  a:hover { color: var(--text); text-decoration-color: var(--soft); }
  .top nav a:hover, .bottom nav a:hover { color: var(--text); }
  .os button:hover { color: var(--text); }
  .shot-picks button:hover { color: var(--text); }
  .copy:hover { background: var(--ember-hover); }
  .fire-toggle:hover { background: var(--code); color: var(--text); }
  .yours-item:hover { background: var(--raised); }
  .crumbs a:hover { color: var(--text); }
  .top nav .version:hover { background: var(--code); }
  .docs-side a:hover, .docs-menu nav a:hover, .docs-toc a:hover { color: var(--text); }
  .docs-pager a:hover, .docs-group a:hover { background: var(--code); }
  .code-copy:hover { background: var(--hover); color: var(--text); }
}

/* Narrow screens */

@media (max-width: 900px) {
  .bottom-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-inner { grid-template-columns: 1fr; }
  .yours-rows { grid-template-columns: 1fr; }
  .yours-item, .yours-file { grid-column: 1; }
}

@media (max-width: 600px) {
  .top nav a[href="/#features"] { display: none; }
  .shot-caption { min-height: 3em; }
  .features dl { grid-template-columns: 1fr; }
  /* The switch and Copy share the top row; the command gets the full width
     below, wrapping at a space with the second line hung under the first,
     past the prompt. */
  .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .os { grid-column: 1; grid-row: 1; }
  .copy { grid-column: 2; grid-row: 1; }
  .command code {
    grid-column: 1 / -1; grid-row: 2; width: auto;
    margin: 0; padding: 6px 14px 8px calc(14px + 2ch); border-left: 0;
    font-size: 0.8125rem; line-height: 1.6; text-indent: -2ch; white-space: normal;
  }
  html:not(.js) .command code { grid-row: auto; }
  .bottom-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
