/* SynthMaker's manual: the site's own colours and type (index.html), and a colour for each part of the manual, the
   colour that part has in the app itself: the Patch's message wires are green, a face's views yellow. */
:root {
  --bg: #101116;
  --panel: #181a22;
  --panel2: #1e2029;
  --line: #262a36;
  --text: #eef0f6;
  --muted: #9aa0b2;
  --accent: #3d8bff;
  --warm: #f5a524;
  --glow: #c44dff;
  --red: #ff5a5a;
  /* The parts (patch.js LINK and KIND): Message green, View yellow, Modifier purple, Audio blue, Notes pink. */
  --part-patch: #34c759;
  --part-faces: #facc40;
  --modifier: #9a6bff;
  --audio: #4fa1ff;
  --notes: #ff5c8a;
  --part: var(--accent);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
.part-patch { --part: var(--part-patch); }
.part-faces { --part: var(--part-faces); }
.part-circuits { --part: #4fa1ff; }   /* audio blue: what a circuit carries */
.part-code { --part: #bf73ff; }       /* the Code view's purple */
.part-shaders { --part: #ff5c8a; }    /* pink, for pictures */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }
:not(pre) > code { font-size: .88em; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.skip { position: absolute; left: -999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--panel); padding: 6px 10px; border-radius: 8px; }

/* ——— The bar along the top ——— */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.top .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.top .brand img { width: 28px; height: 28px; border-radius: 7px; }
.top .brand span { color: var(--muted); font-weight: 500; }
.top nav.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; }
.top nav.crumbs a { color: var(--muted); white-space: nowrap; }
.top nav.crumbs .here { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .app { margin-left: auto; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); }
@media (max-width: 720px) { .top nav.crumbs { display: none; } }
/* Jump to: one line under the header (44px), inside the same sticky bar, so it never covers the page */
.top .jumpin { max-width: 1120px; margin: 0 auto; padding: 0 16px; border-top: 1px solid var(--line); }
.jump { position: relative; font-size: 14px; }
.jump > summary { list-style: none; height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); min-width: 0; }
.jump > summary::-webkit-details-marker { display: none; }
.jump > summary .lab { flex: none; color: var(--muted); font-weight: 600; }
.jump > summary .lab::after { content: " ▾"; color: var(--part); }
.jump[open] > summary .lab::after { content: " ▴"; }
.jump > summary .now { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.jump ol { position: absolute; left: -8px; top: 44px; z-index: 30; margin: 0; padding: 6px; list-style: none; width: min(420px, calc(100vw - 16px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.jump li a { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.jump li a:hover { background: var(--panel2); text-decoration: none; }
.jump li a b { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; color: #0b0c10; background: var(--part); }
.jump li a.here { background: color-mix(in srgb, var(--part) 14%, transparent); }
/* Headings land below the header and the Jump to line */
section.step, main [id] { scroll-margin-top: 112px; }

/* ——— The page ——— */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 80px; }
.col { max-width: 720px; }
.hero { padding: 48px 0 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--part); }
.chip::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: var(--part); }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.04; letter-spacing: -.03em; margin: 14px 0 16px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--muted); margin: 0; max-width: 34em; }
.lede b { color: var(--text); font-weight: 600; }
h2 { font-size: clamp(25px, 3.2vw, 32px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; display: flex; gap: 14px; align-items: baseline; }
h2 .n { flex: none; display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; font-size: .62em; font-weight: 800;
  background: var(--part); color: #0b0c10; transform: translateY(-.18em); letter-spacing: 0; }
h3 { font-size: 19px; margin: 26px 0 8px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
section.step { padding: 44px 0 8px; border-top: 1px solid var(--line); margin-top: 36px; }
.muted { color: var(--muted); }

/* What you'll learn */
.learn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.learn li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.45; }
.learn li b { display: block; color: var(--part); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
@media (max-width: 760px) { .learn { grid-template-columns: 1fr; } }

/* A paragraph with a note beside it (below it on a narrow screen) */
.with-note { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 300px); gap: 36px; align-items: start; }
@media (max-width: 1000px) { .with-note { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.note { border-left: 3px solid var(--part); background: var(--panel); border-radius: 0 12px 12px 0; padding: 14px 16px; font-size: 15px; line-height: 1.5; margin: 4px 0 18px; }
.note h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--part); }
.note p:last-child { margin: 0; }

/* Numbered steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 18px; }
ol.steps > li { counter-increment: s; position: relative; padding: 2px 0 12px 44px; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: var(--part); border: 2px solid var(--part); }
ol.steps > li b { color: var(--text); }
.ui { font-weight: 600; color: var(--text); white-space: nowrap; }   /* a button's or a menu's words, as the app shows them */

/* ——— Figures: a real screenshot, numbered callouts measured from the app (img/shots.json) ——— */
figure { margin: 22px 0 26px; }
.shot .frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #111217; }
.shot .frame img { width: 100%; height: auto; }
/* A wide diagram on a phone: it keeps a readable size and pans sideways inside its frame */
.shot .panin { position: relative; }
@media (max-width: 600px) { .shot.pan .frame { overflow-x: auto; overscroll-behavior-x: contain; } .shot.pan .panin { width: 640px; }
  .shot.pan figcaption::before { content: "Swipe the picture sideways to see all of it. "; color: var(--muted); } }
.shot.narrow { max-width: 380px; }
.shot.mid { max-width: 720px; }
.wide { max-width: 1040px; }
.live.mid { max-width: 640px; }
.mark { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  font: 800 14px/1 -apple-system, BlinkMacSystemFont, sans-serif; color: #0b0c10; background: var(--part); box-shadow: 0 0 0 3px rgba(0,0,0,.55), 0 4px 14px rgba(0,0,0,.5);
  transition: transform .15s; pointer-events: none; }
.ring { position: absolute; border: 2px solid var(--part); border-radius: 12px; z-index: 1; pointer-events: none; opacity: .0; transition: opacity .15s;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--part) 22%, transparent); }
.frame.on .ring.lit, .ring.always { opacity: 1; }
.frame.on .mark.lit { transform: scale(1.18); }
figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
ol.legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
ol.legend li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15.5px; color: var(--text); line-height: 1.45; cursor: default; }
ol.legend li::before { content: attr(data-n); width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800;
  color: #0b0c10; background: var(--part); }
ol.legend li.lit { color: #fff; }

/* Steps with a small picture each: beside the line on a wide screen, under it on a phone */
ol.steps.pics > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 8px 18px; align-items: start; padding-bottom: 18px; }
ol.steps.pics > li figure { margin: 0; }
@media (max-width: 760px) { ol.steps.pics > li { grid-template-columns: minmax(0, 1fr); } }
/* A picture that answers the pointer: plain, and its other state while the hot spot is pointed at or tapped */
.hover .frame { aspect-ratio: var(--ar); }
@media (max-width: 600px) { .hover .frame { aspect-ratio: var(--ar-phone, var(--ar)); } }
.hover .frame > .layer { position: absolute; inset: 0; transition: opacity .35s ease; }
.hover .frame > .layer img, .hover .frame > .layer picture { display: block; width: 100%; height: 100%; }
.hover .frame > .layer.b { opacity: 0; }
.hover.showing .frame > .layer.b { opacity: 1; }
.hover:not(.showing) .frame [data-state="b"] { display: none; }
.hover:not(.showing) li[data-state="b"] { opacity: .35; }   /* kept in place (no jump), quiet until the list shows */
.hover .hot { position: absolute; z-index: 3; border: 2px dashed color-mix(in srgb, var(--part) 80%, transparent); border-radius: 12px; background: transparent; cursor: pointer; padding: 0;
  animation: hotpulse 2.2s ease-in-out infinite; }
.hover.showing .hot { animation: none; border-color: transparent; }
@keyframes hotpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--part) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--part) 28%, transparent); } }
@media (prefers-reduced-motion: reduce) { .hover .hot { animation: none; } }

.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; align-items: start; }
.four figure, .three figure { margin: 0; }
@media (max-width: 760px) { .four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .three { grid-template-columns: minmax(0, 1fr); } }

/* Two pictures side by side, the second below on a phone */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }
.pair figure { margin: 0; }

/* Before and after: the same place in the Patch, one picture over the other */
.swap .frame { aspect-ratio: var(--ar); }
@media (max-width: 600px) { .swap .frame { aspect-ratio: var(--ar-phone, var(--ar)); } }
.swap .frame > .layer picture, .swap .frame > .layer img { display: block; width: 100%; height: 100%; }
.swap .frame > .layer { position: absolute; inset: 0; transition: opacity .6s ease; }
.swap .frame > .layer.b { opacity: 0; }
.swap[data-show="a"] [data-state="b"], .swap[data-show="b"] [data-state="a"] { display: none; }
.mark { transition: transform .15s, opacity .4s; }
.swap[data-show="b"] .frame > .layer.b { opacity: 1; }
.swap[data-show="b"] .frame > .layer.a { opacity: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 0 12px; background: var(--panel); flex-wrap: wrap; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--part); color: #0b0c10; }

/* ——— A live picture: the screenshot, and ▶ swaps in the real patch, running, at the same size. The controls sit in a bar
   under the picture, inside its frame, so they never cover what the picture shows. ——— */
.live { margin: 34px 0 10px; }
.live .box { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000;
  box-shadow: 0 30px 90px color-mix(in srgb, var(--part) 16%, transparent); }
.live .stage { position: relative; aspect-ratio: var(--ar-wide); overflow: hidden; background: #000; }
@media (max-width: 600px) { .live .stage { aspect-ratio: var(--ar-tall, var(--ar-wide)); } }
.live .stage picture, .live .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.live .stage iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #000; opacity: 0; transition: opacity .35s ease; }
.live.on .stage iframe { opacity: 1; }
.live.on .stage picture { opacity: 0; }
/* Picture or live: a quiet chip on the picture, a badge and a glow once it runs */
.live .stage { cursor: pointer; }
.live.on .stage { cursor: auto; }
.live .chip-pic, .live .chip-live, .live .chip-start { position: absolute; z-index: 4; pointer-events: none; font: 600 11.5px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 999px; padding: 5px 9px; letter-spacing: .02em; }
.live .chip-pic, .live .chip-live { right: 10px; top: 10px; }
.live[data-chip="tl"] .chip-pic, .live[data-chip="tl"] .chip-live { right: auto; left: 10px; }
.live[data-chip="tc"] .chip-pic, .live[data-chip="tc"] .chip-live { right: auto; left: 50%; transform: translateX(-50%); }
.live[data-chip="bl"] .chip-pic, .live[data-chip="bl"] .chip-live { top: auto; bottom: 10px; right: auto; left: 10px; }
.live .chip-pic { color: rgba(255,255,255,.62); background: rgba(16,17,22,.62); border: 1px solid rgba(255,255,255,.14); }
.live .chip-live { display: none; align-items: center; gap: 6px; color: #fff; background: rgba(16,17,22,.82); border: 1px solid color-mix(in srgb, var(--part) 70%, transparent); }
.live .chip-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--part); animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.live .chip-start { display: none; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 14px; padding: 9px 16px; color: #fff; background: rgba(16,17,22,.85); border: 1px solid var(--line); }
.live.loading .chip-start { display: block; }
.live.loading .chip-pic { display: none; }
.live.on .chip-pic { display: none; }
.live.on .chip-live { display: inline-flex; }
.live.on .box { border-color: var(--part); box-shadow: 0 0 0 3px color-mix(in srgb, var(--part) 35%, transparent), 0 30px 90px color-mix(in srgb, var(--part) 28%, transparent); }
.live .box { transition: border-color .3s, box-shadow .3s; }
.live .stop { color: #0b0c10 !important; background: var(--part) !important; border-color: var(--part) !important; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .live .chip-live i { animation: none; } }
.live .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; background: var(--panel); border-top: 1px solid var(--line); }
.live .play, .live .stop { flex: none; display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 999px; padding: 10px 16px 10px 12px; cursor: pointer; }
.live .play { color: #0b0c10; background: var(--part); border: 0; }
.live .play:hover { filter: brightness(1.06); }
.live .play svg { width: 18px; height: 18px; }
.live .stop { display: none; color: var(--text); background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; }
.live .play:focus-visible, .live .stop:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.live.loading .play { pointer-events: none; opacity: .8; }
.live.loading .play .t::after { content: "…"; }
.live.on .play { display: none; }
.live.on .stop { display: inline-flex; }
.live .hint { flex: 1 1 200px; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.live a.open { flex: 0 1 auto; margin-left: auto; font-weight: 600; font-size: 14.5px; text-align: right; }
.live .sorry { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; background: rgba(20,21,28,.92); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; color: var(--text); }

/* The whole file, behind a toggle */
details.whole { margin: 10px 0 20px; }
details.whole > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text);
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px; list-style: none; }
details.whole > summary::-webkit-details-marker { display: none; }
details.whole > summary::before { content: "▸"; color: var(--part); transition: transform .15s; }
details.whole[open] > summary::before { transform: rotate(90deg); }
details.whole[open] > summary { margin-bottom: 4px; }
.pair.cards { max-width: 720px; }

/* ——— Try it ——— */
.try { position: relative; margin: 22px 0 28px; padding: 18px 20px 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--part) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--part) 45%, var(--line)); }
.try h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--part); display: flex; gap: 8px; align-items: center; }
.try ol, .try ul { margin: 0 0 12px; padding-left: 22px; }
.try li { margin-bottom: 4px; }
.try .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #0b0c10; background: var(--part); border-radius: 999px; padding: 9px 16px; }
.try .go:hover { text-decoration: none; filter: brightness(1.06); }

/* ——— Code ——— */
.code { position: relative; background: #0c0d12; border: 1px solid var(--line); border-radius: 14px; margin: 14px 0 20px; overflow: hidden; }
.code .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.code .head b { color: var(--text); font-weight: 600; }
.code .copy { font: 600 12.5px/1 -apple-system, sans-serif; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.code pre { margin: 0; padding: 14px 0; overflow-x: auto; font-size: 13.5px; line-height: 1.65; tab-size: 4; }
.code pre code { display: block; min-width: max-content; }
.code .ln { display: block; padding: 0 18px 0 16px; border-left: 3px solid transparent; }
.code .ln[data-n] { cursor: default; }
.code .ln[data-n]::before { content: attr(data-n); display: inline-grid; place-items: center; width: 19px; height: 19px; margin: 0 10px 0 -2px; border-radius: 50%;
  font: 800 11px/1 -apple-system, sans-serif; color: #0b0c10; background: var(--part); vertical-align: 1px; }
.code .ln:not([data-n])::before { content: ""; display: inline-block; width: 27px; }
.code.nonum .ln::before { display: none !important; }
.code .ln.lit { background: color-mix(in srgb, var(--part) 13%, transparent); border-left-color: var(--part); }
.tok-k { color: #ff7ab2; } .tok-s { color: #ff8170; } .tok-n { color: #d9c97c; } .tok-c { color: #7f8c98; font-style: italic; }
.tok-t { color: #dabaff; } .tok-m { color: #a7ebdd; } .tok-p { color: #4eb0cc; }

/* The face beside its code (the code below it on a narrow screen) */
.beside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .beside { grid-template-columns: 1fr; } }
.beside figure, .beside .code { margin: 0; }

/* A short block of code inside a paragraph's column */
pre.inline { background: #0c0d12; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.6; overflow-x: auto; margin: 4px 0 14px; }
pre.inline code { background: none; border: 0; padding: 0; font-size: inherit; }

/* A gallery of examples: a picture, its name, a line, and a way to open it */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }
.demo { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.demo .pic { display: block; background: #111217; border-bottom: 1px solid var(--line); }
.demo .pic img { width: 100%; height: auto; aspect-ratio: 2.3; object-fit: contain; padding: 6px; }
.demo .txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.demo .kind { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--part); }
.demo h3 { margin: 0; font-size: 19px; }
.demo p { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.demo .go { margin-top: auto; align-self: flex-start; display: inline-flex; font-weight: 700; font-size: 14px; color: #0b0c10; background: var(--part); border-radius: 999px; padding: 8px 14px; }
.demo .go:hover { text-decoration: none; filter: brightness(1.06); }

/* A word of the glossary, linked the first time a page uses it */
a.term { color: inherit; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--part) 75%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a.term:hover { color: #fff; text-decoration-style: solid; }
/* The glossary */
dl.glossary { margin: 0; display: grid; gap: 10px; }
.glossary .word { border: 1px solid var(--line); border-left: 4px solid var(--part, var(--accent)); border-radius: 12px; background: var(--panel); padding: 12px 16px; scroll-margin-top: 112px; }
.glossary .word:target { border-color: var(--part, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--part, var(--accent)) 25%, transparent); }
.glossary dt { font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.glossary dt::first-letter { text-transform: uppercase; }
.glossary dd { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.glossary dd a { white-space: nowrap; font-weight: 600; }
a.wordslink { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--panel); color: var(--text); }
a.wordslink:hover { text-decoration: none; border-color: var(--accent); }
/* New words: a part's first page starts with what its words mean, each with a small picture */
.defs { margin: 26px 0 0; }
.defs h2 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--part); margin: 0 0 10px; }
.defs .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.defs .def { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.defs .def img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; background: #111217; border-bottom: 1px solid var(--line); }
.defs .def p { margin: 0; padding: 10px 14px 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.defs .def p b { color: var(--text); }

/* A small table of views */
.views { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 15.5px; }
.views th, .views td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.views th { font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.views td:first-child { white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* Remember */
.remember { margin: 44px 0 0; padding: 22px 22px 8px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.remember h2 { font-size: 22px; }
.remember ul { margin: 0 0 14px; padding-left: 20px; }
.remember li { margin-bottom: 6px; }

/* Next and previous */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 48px 0 0; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } }
.pager a { display: block; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--panel); color: var(--text); position: relative; overflow: hidden; }
.pager a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--part) 60%, var(--line)); }
.pager a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--part); }
.pager small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.pager b { font-size: 19px; letter-spacing: -.01em; }
.pager .next { text-align: right; grid-column: 2; }
.pager .next::before { left: auto; right: 0; }
@media (max-width: 640px) { .pager .next { grid-column: 1; } }
footer.foot { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
footer.foot .tm { flex-basis: 100%; font-size: 12.5px; opacity: .8; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .top, .live .play, .live .stop, .seg, .code .copy, footer.foot { display: none !important; }
  body { background: #fff; color: #111; }
}
