/* Served with the page (Latin subsets, SIL Open Font License 1.1), so visitors' browsers
   contact no font service. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #0a0a0c;
  --panel: #141418;
  --line: #26262c;
  --text: #ececf0;
  --muted: #9b9ba6;
  --cyan: #00c7ff;
  --magenta: #ff3dc7;
  --green: #3ccf78;
  --radius: 14px;
  --width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, pre { font-family: "JetBrains Mono", ui-monospace, monospace; }
code { font-size: 0.9em; color: #f3c8ea; }
kbd {
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
}

/* The brightness slider dims the page. */
#dim {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 80ms linear;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--width);
  margin: 0 auto;
  padding: 20px 16px;
}
.brand { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.02em; }
.brand span {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.top nav { display: flex; gap: 22px; font-size: 14px; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav .repo { color: var(--text); }

main { max-width: var(--width); margin: 0 auto; padding: 0 16px; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding-top: 40px; }

h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 8px 0 20px;
}
h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; margin: 0 0 18px; line-height: 1.15; }
.grad {
  background: linear-gradient(90deg, var(--cyan), #9b7bff 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: clamp(17px, 2vw, 21px); line-height: 1.65; color: #c9c9d2; margin: 0 0 32px; text-wrap: pretty; }
.muted { color: var(--muted); }

/* The laptop deck: the bar, then a strip of keys. */
.deck {
  position: relative;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #2a2a30, #1c1c21 60%, #18181c);
  box-shadow: 0 1px 0 #3a3a42 inset, 0 30px 80px -30px rgba(0, 199, 255, 0.18),
    0 30px 80px -40px rgba(255, 61, 199, 0.22);
}
.bezel {
  padding: 7px;
  border-radius: 12px;
  background: #050506;
  box-shadow: 0 0 0 1px #0f0f12, 0 1px 0 #3a3a42;
}
#bar {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  touch-action: none;
  cursor: pointer;
  image-rendering: auto;
}
.keys { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.key, .numrow span {
  border-radius: 7px;
  background: #0d0d10;
  color: #d8d8de;
  box-shadow: 0 1px 0 #2e2e35 inset, 0 2px 0 #000;
}
.key.fn {
  flex: 0 0 auto;
  min-width: 64px;
  border: 0;
  font: 600 15px Inter, sans-serif;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: background 60ms, transform 60ms;
  color: var(--key-glyph, #d8d8de);
  text-shadow: var(--key-glow, none);
}
.key.fn.down { background: #26262c; transform: translateY(1px); }
.key.fn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.numrow { display: flex; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.numrow span {
  flex: 1 1 0;
  min-width: 34px;
  padding: 6px 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  color: var(--key-glyph, #8c8c96);
  text-shadow: var(--key-glow, none);
}
.numrow span.wide { flex: 1.6 1 0; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 8px; }
.said {
  margin: 12px 2px 0;
  min-height: 1.6em;
  font: 500 14px "JetBrains Mono", monospace;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.said b { color: var(--text); font-weight: 500; }
.said .cmd { color: #f3c8ea; }

.hints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 26px 0 16px;
}
.hints li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: #c4c4cc;
  font-size: 15px;
}
.hints b { color: var(--text); }
.fine { color: var(--muted); font-size: 13.5px; margin: 0; }
button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  cursor: pointer;
}
button.link:hover { text-decoration: underline; }

.intro-text { color: var(--muted); margin: -8px 0 26px; }
/* Each recording is the whole bar on one line, like the real thing. */
.strip { margin: 0 0 30px; }
.strip .bezel { padding: 6px; }
.strip img, .strip canvas, .strip video { display: block; width: 100%; height: auto; border-radius: 5px; background: #000; }
.strip figcaption { max-width: 860px; padding: 12px 2px 0; color: #c4c4cc; font-size: 15px; }
.strip figcaption b { color: var(--text); }

/* The builder. */
.palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms, background 120ms, opacity 120ms;
  opacity: 0.55;
}
.tile:hover { opacity: 0.85; }
.tile-wrap { position: relative; display: flex; }
.tile-wrap .tile { flex: 1; }
/* Move left / right, on picked tiles. */
.moves {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: none;
  gap: 4px;
}
.tile-wrap.picked .moves { display: flex; }
.moves button {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 1px solid #3a3a44;
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.85);
  color: var(--text);
  font: 700 15px/1 Inter, sans-serif;
  cursor: pointer;
}
.moves button:hover:not(:disabled) { border-color: var(--cyan); }
.moves button:disabled { opacity: 0.3; cursor: default; }
#preview { touch-action: pan-y; }
#preview.dragging { cursor: grabbing; }
.tile[aria-pressed="true"] {
  opacity: 1;
  border-color: #5a5a66;
  background: #1a1a20;
  box-shadow: 0 0 0 1px rgba(0, 199, 255, 0.25), 0 10px 30px -18px rgba(255, 61, 199, 0.5);
}
.tile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tile canvas { display: block; width: 100%; height: auto; border-radius: 4px; background: #000; }
.tile .order {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  color: #0a0a0c;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.tile .order:empty { display: none; }
.tile-title { font-weight: 700; font-size: 15px; }
.tile-what { color: var(--muted); font-size: 13px; line-height: 1.45; }
.kind {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.kind.toggle { background: rgba(60, 207, 120, 0.16); color: #7fe0a6; }
.kind.meter { background: rgba(0, 199, 255, 0.14); color: #7fd8f5; }
.build-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 22px; font-size: 14px; }
.build-bar #picked { margin-right: auto; }
.starters { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.starters .muted { font-size: 14px; }
.chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: 600 13px Inter, sans-serif;
  cursor: pointer;
}
.chip:hover { border-color: #4a4a55; }

.skins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 0;
}
.skins .muted { font-size: 14px; margin-right: 4px; }
.chip.skin { padding: 4px 12px; font-size: 13px; }
.chip.skin[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.chip.primary { background: linear-gradient(90deg, #0a8fc0, #b0328f); border-color: transparent; }
.code-head .actions { display: flex; gap: 8px; }
.setting { display: inline-flex; align-items: center; gap: 6px; color: #c4c4cc; }
.setting select {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.setting input { accent-color: var(--cyan); }
.build .strip { margin-bottom: 36px; }
.colors { margin: -8px 0 24px; border: 1px solid var(--line); border-radius: 12px; background: #111115; }
.colors summary { padding: 12px 16px; cursor: pointer; font-weight: 600; }
.colors summary .muted { margin-left: 8px; font-weight: 400; font-size: 13.5px; }
.colors > p { margin: 0; padding: 0 16px 12px; font-size: 14px; max-width: 900px; }
.colors > p .chip { margin-left: 8px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px 16px; padding: 0 16px 16px; }
.color-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.color-row.changed { background: rgba(0, 199, 255, 0.07); }
.color-row input[type="color"] { flex: none; width: 40px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.color-row label { display: flex; flex-direction: column; min-width: 0; flex: 1; cursor: pointer; line-height: 1.3; }
.color-row label code { font-size: 12.5px; }
.color-row label span { color: var(--muted); font-size: 12.5px; }
.color-reset { flex: none; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: 12px Inter, sans-serif; cursor: pointer; }
.color-reset:hover { color: var(--text); border-color: #4a4a55; }
.toggle-editor { margin: -12px 0 36px; }
.toggle-editor h3 { margin: 0 0 6px; font-size: 20px; }
.toggle-editor > .muted { max-width: 860px; margin: 0 0 16px; font-size: 14.5px; }
.toggle-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.toggle-card {
  margin: 0;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111115;
  min-width: 0;
}
.toggle-card legend { padding: 0 6px; font-weight: 700; }
.cmd-preset { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; color: #c4c4cc; font-size: 14px; }
.cmd-preset select, .cmd-field textarea, .cmd-field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e0e12;
  color: var(--text);
}
.cmd-preset select { flex: 1; min-width: 0; padding: 5px 8px; font: 13px Inter, sans-serif; }
.cmd-field { display: block; margin: 0 0 8px; }
.cmd-field span { display: block; margin: 0 0 3px; color: var(--muted); font-size: 12.5px; }
.cmd-field textarea { display: block; width: 100%; padding: 7px 9px; font: 12.5px/1.5 "JetBrains Mono", monospace; resize: vertical; }
.cmd-field textarea:focus, .cmd-field input:focus, .cmd-preset select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.cmd-field input { display: block; width: 100%; padding: 7px 9px; font: 12.5px "JetBrains Mono", monospace; }
.cmd-note { margin: 2px 0 0; color: #e8c37a; font-size: 13px; }
.cmd-about { margin: 2px 0 10px; color: var(--muted); font-size: 13.5px; }
.build h3 { margin: 0 0 12px; font-size: 20px; }
.code.small { margin: 0 0 14px; font-size: 12.5px; }
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 8px;
  color: var(--muted);
  font: 500 13px "JetBrains Mono", monospace;
}
.code.generated { max-height: 460px; overflow: auto; }

/* Narrow screens: the minimap under the bar, and a nudge towards a bigger screen. */
/* A scrubber: slide anywhere in it to pan the bar. Vertical swipes still scroll the page. */
.minimap {
  margin-top: 10px;
  padding: 8px 10px 6px;
  border-radius: 10px;
  background: #0b0b0e;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7), 0 1px 0 #2e2e35;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.minimap.sliding { cursor: grabbing; }
.minimap canvas { display: block; width: 100%; height: auto; border-radius: 3px; }
.minimap .rail { position: relative; height: 4px; margin: 9px 0 0; border-radius: 2px; background: #1c1c22; }
.minimap .thumb {
  position: absolute;
  top: -2px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(0, 199, 255, 0.5), rgba(255, 61, 199, 0.5));
  transition: transform 90ms;
}
.minimap.sliding .thumb { transform: scaleY(1.35); }
.minimap p {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.minimap p span { color: #5d5d68; font-size: 15px; line-height: 1; }
.phone-note { display: none; }
.phone-break { display: none; }
h1 .grad { white-space: nowrap; }
.build-phone { display: none; }
.build-tip {
  margin: -6px 0 18px;
  color: #c4c4cc;
  font-size: 15px;
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
.split p { margin: 0 0 14px; color: #c9c9d2; }
.split p.muted { color: var(--muted); }
.code {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0e0e12;
  font-size: 13.5px;
  line-height: 1.65;
  color: #e3e3ea;
}
.code .c { color: #6f6f7c; }
.code .k { color: var(--cyan); }
.code .s { color: #f3c8ea; }
.code .h { color: #b9a6ff; }

/* Hero badges */
.badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.badges li {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111115;
  color: #c4c4cc;
  font-size: 14.5px;
  text-align: center;
}
.badges li::before { content: "\2713"; margin-right: 6px; color: var(--green); }

/* Hero calls to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -12px 0 40px; }
.button {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #16161b;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.button:hover { text-decoration: none; border-color: #4a4a55; }
.button.primary { background: linear-gradient(90deg, #0a8fc0, #b0328f); border-color: transparent; }
.button.primary:hover { filter: brightness(1.1); }
.version { color: var(--muted); font-size: 14px; margin-left: 4px; }
.fun {
  margin: -8px 0 28px;
  padding: 14px 18px;
  border-left: 3px solid var(--magenta);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(255, 61, 199, 0.09), rgba(0, 199, 255, 0.03));
  color: #e3e3ea;
  font-size: clamp(15.5px, 1.6vw, 17.5px);
}
.try-note { color: #c9c9d2; font-size: 15px; margin-left: 6px; }
.skins-hint { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Builder steps */
.build-steps { margin: -6px 0 24px; padding-left: 22px; color: #c9c9d2; max-width: 900px; }
.build-steps li { margin: 0 0 6px; }
/* The fallback when this browser can't run the live bar */
/* Floating jump arrows, top right: none at the top, up only at the bottom. */
.jump {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jump[hidden], .jump button[hidden] { display: none; }
.jump button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text);
  font: 600 20px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.jump button:hover { border-color: var(--cyan); color: var(--cyan); }
.jump button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.camera-source { position: fixed; right: 0; bottom: 0; width: 2px; height: 2px; opacity: 0.01; pointer-events: none; }
.fallback-only { display: none; }
.no-live .fallback-only { display: block; }
.no-live #bar, .no-live .keys, .no-live .minimap, .no-live .skins, .no-live .skins-hint,
.no-live .hints, .no-live #replay, .no-live .theme-strips, .no-live .build .strip,
.no-live .tile canvas, .no-live .try-it, .no-live .live-note, .no-live .try-note, .no-live .fine { display: none; }
.bezel video.fallback-only { width: 100%; height: auto; border-radius: 5px; background: #000; }
.fallback-note { margin: 12px 2px 0; color: #e8c37a; font-size: 14.5px; }
.themes-still { max-width: 100%; height: auto; margin: 0 0 30px; border-radius: 12px; }
.live-note {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #1d4a5c;
  border-radius: 12px;
  background: rgba(0, 199, 255, 0.06);
  color: #c9c9d2;
  font-size: 15px;
}
.live-note .chip { margin-left: 8px; }
figcaption .try-it { margin-left: 6px; font-size: 14px; }

/* Reference: each part folds */
details.ref { margin: 0 0 6px; }
details.ref > summary { list-style: none; cursor: pointer; }
details.ref > summary::-webkit-details-marker { display: none; }
details.ref > summary h3 { display: inline-block; }
details.ref > summary::after { content: "+"; margin-left: 10px; color: var(--muted); font-size: 20px; }
details.ref[open] > summary::after { content: "\2212"; }
details.ref > .table-wrap, details.ref > p { margin-bottom: 10px; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cards article {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #16161b, #111115);
  position: relative;
  overflow: hidden;
}
.cards article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  opacity: 0.7;
}
.cards h3 { margin: 0 0 8px; font-size: 16px; }
.cards p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Themes gallery */
.theme-strips { display: grid; gap: 14px; margin: 0 0 30px; }
.theme-strip {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.theme-strip .bezel { display: block; padding: 6px; transition: border-color 0.15s; }
.theme-strip canvas { display: block; width: 100%; height: auto; border-radius: 5px; }
.theme-strip canvas + canvas { margin-top: 6px; }
.theme-strip .theme-name { display: block; padding: 6px 2px 0; color: var(--muted); font: 13px "JetBrains Mono", monospace; }
.theme-strip:hover .bezel, .theme-strip:focus-visible .bezel { border-color: #4a4a55; }
.theme-strip.active .bezel { border-color: var(--cyan); }
.theme-strip.active .theme-name { color: var(--cyan); }
.theme-strip:focus-visible { outline: none; }

/* Install steps */
/* minmax(0, …) and min-width: 0 let long commands scroll inside their box instead of
   stretching the page on phones. */
.steps { counter-reset: step; list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; max-width: 900px; min-width: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #0a0a0c;
}
.steps h3 { margin: 4px 0 8px; font-size: 19px; }
.steps p { margin: 0 0 12px; color: #c9c9d2; }
.steps p.muted { color: var(--muted); font-size: 14.5px; }
.steps .code { margin-bottom: 10px; }
.opt {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1d1d24;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.callout {
  padding: 16px 18px;
  border: 1px solid #23423a;
  border-left: 4px solid var(--green);
  border-radius: 10px;
  background: #0f1614;
  color: #c9c9d2;
  font-size: 15px;
}
.callout.warn { border-color: #4a3a1a; border-left-color: #f0b03c; background: #17130b; }
.callout p { margin: 10px 0 0; }
.small { font-size: 13px; }

/* Reference tables */
#docs h3 { margin: 22px 0 10px; font-size: 20px; }
#docs details.ref:first-of-type h3 { margin-top: 6px; }
#docs > .muted { max-width: 860px; margin: 0 0 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: #121217; color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }
td { color: #c9c9d2; }
td:first-child { white-space: nowrap; color: var(--text); }
#light .table-wrap + p { margin-top: 10px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #111115; }
.faq summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: #c9c9d2; }

/* About */
.credits { margin: 0 0 14px; padding-left: 18px; color: #c9c9d2; }
.credits li { margin-bottom: 8px; }
#about h3 { margin: 0 0 12px; font-size: 20px; }

footer {
  max-width: var(--width);
  margin: 0 auto;
  padding: 28px 16px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1000px) {
  .palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-bar { flex-wrap: wrap; }
  /* Phones: the builder folds away behind a note; it's for the computer with the bar. */
  .build-phone {
    display: block;
    padding: 14px 16px;
    border: 1px dashed #3a3a44;
    border-radius: 12px;
    color: #c4c4cc;
  }
  .build-phone p { margin: 0 0 12px; }
  .build:not(.open) .build-body { display: none; }
  .build.open .build-phone button { display: none; }
  .build.open .build-phone { margin-bottom: 22px; }
  .build-tip { display: none; }
  .phone-note {
    display: block;
    margin: 14px 2px 0;
    padding: 10px 14px;
    border: 1px dashed #3a3a44;
    border-radius: 10px;
    color: #c4c4cc;
    font-size: 14px;
  }
  .hints { grid-template-columns: minmax(0, 1fr); }
  .phone-break { display: inline; }
  h1 { font-size: clamp(40px, 9vw, 64px); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cta { margin-top: -6px; margin-bottom: 30px; }
  .button { padding: 10px 18px; font-size: 14.5px; }
  /* The left part of each theme, at a size a phone can show. */
  .theme-strip .bezel { overflow: hidden; }
  .theme-strip canvas { width: 260%; max-width: none; }
  .steps > li { padding-left: 46px; }
  td:first-child { white-space: normal; }
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
  .badges li { padding: 10px 8px; font-size: 13.5px; border-radius: 14px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .top nav a:not(.repo) { display: none; }
  .deck { padding: 12px 12px 10px; border-radius: 16px; }
  .numrow span:nth-child(n + 8) { display: none; }
}

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