/* The paper. One hue per strip: --h is set on <html>. Everything else is steel. */
:root {
  color-scheme: light dark;
  --h: 85;
  --c: 0.14;
  --l: 0.835;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hole: 76px;
  --beat: 94px;
  --gutter: 20px;
  --head: 52px;
  --paper: oklch(var(--l) var(--c) var(--h));
  --paper-2: oklch(calc(var(--l) + 0.05) calc(var(--c) * 0.72) var(--h));
  --ink: oklch(0.2 0.045 var(--h));
  --ink-2: oklch(0.31 0.06 var(--h));
  --rule: oklch(0.2 0.045 var(--h) / 0.17);
  --well: oklch(0.965 0.022 var(--h));
  --well-shade: oklch(0.2 0.05 var(--h) / 0.5);
  --lip: oklch(1 0 0 / 0.42);
  --on-ink: oklch(calc(var(--l) + 0.08) calc(var(--c) * 0.6) var(--h));
  --needs: oklch(0.42 0.19 28);

  /* The Manual reads these. */
  --d-bg: var(--paper);
  --d-bg-2: var(--paper-2);
  --d-surface: var(--paper-2);
  --d-ink: var(--ink);
  --d-muted: var(--ink-2);
  --d-line-strong: var(--rule);
  --d-accent: var(--ink);
  --d-font-text: var(--sans);
  --d-font-display: var(--serif);
}
:root[data-theme="dark"] {
  --paper: oklch(0.235 calc(var(--c) * 0.36) var(--h));
  --paper-2: oklch(0.29 calc(var(--c) * 0.36) var(--h));
  --ink: oklch(0.955 0.025 var(--h));
  --ink-2: oklch(0.82 0.035 var(--h));
  --rule: oklch(0.955 0.025 var(--h) / 0.16);
  --well: oklch(0.36 calc(var(--c) * 0.3) var(--h));
  --well-shade: oklch(0.08 0.02 var(--h) / 0.72);
  --lip: oklch(1 0 0 / 0.07);
  --on-ink: oklch(0.2 0.04 var(--h));
  --needs: oklch(0.8 0.15 40);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(0.235 calc(var(--c) * 0.36) var(--h));
    --paper-2: oklch(0.29 calc(var(--c) * 0.36) var(--h));
    --ink: oklch(0.955 0.025 var(--h));
    --ink-2: oklch(0.82 0.035 var(--h));
    --rule: oklch(0.955 0.025 var(--h) / 0.16);
    --well: oklch(0.36 calc(var(--c) * 0.3) var(--h));
    --well-shade: oklch(0.08 0.02 var(--h) / 0.72);
    --lip: oklch(1 0 0 / 0.07);
    --on-ink: oklch(0.2 0.04 var(--h));
    --needs: oklch(0.8 0.15 40);
  }
}
@media (min-width: 720px) {
  :root { --hole: 92px; --beat: 110px; --gutter: 32px; }
}


@font-face { font-family: "Bodoni Moda"; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/fonts/bodoni-moda-latin-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-display: swap; font-weight: 400 900; src: url(/fonts/bodoni-moda-latin-opsz-italic.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-display: swap; font-weight: 400 900; src: url(/fonts/bodoni-moda-math-opsz-normal.woff2) format("woff2-variations"); unicode-range: U+266D-266F; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%; src: url(/fonts/instrument-sans-latin-wdth-normal.woff2) format("woff2-variations"); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.5 var(--sans); font-stretch: 96%; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
body.has-comb { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--ink); color: var(--paper); border-radius: 4px; }
.skip:focus { top: 8px; }

/* The header. */
.head { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 4px; height: var(--head); padding: env(safe-area-inset-top) calc(var(--gutter) - 8px) 0 var(--gutter); background: var(--paper); box-sizing: content-box; }
.brand { display: inline-flex; align-items: baseline; gap: 7px; margin: 0; margin-right: auto; font: 800 23px/1 var(--serif); font-variation-settings: "opsz" 28; letter-spacing: -0.015em; text-decoration: none; }
.brand svg { width: 16px; height: 15px; align-self: center; translate: 0 1px; }
.head-tool { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.head-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.head-tool.is-off .wave { display: none; }
.head-tool:not(.is-off) .cross { display: none; }
.go { display: inline-flex; align-items: center; height: 36px; padding: 0 13px; margin: 0 2px; border-radius: 3px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); text-decoration: none; }
.theme-button { position: relative; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.menu-panel { position: absolute; right: 0; top: 46px; z-index: 30; display: grid; min-width: 220px; padding: 8px; background: var(--ink); color: var(--paper); border-radius: 4px; box-shadow: 0 16px 40px oklch(0 0 0 / 0.35); }
.menu-panel a { padding: 10px 12px; font: 500 italic 21px/1.15 var(--serif); font-variation-settings: "opsz" 20; text-decoration: none; }
.menu-panel a:hover { text-decoration: underline; }

/* The foot. */
.foot { position: relative; padding: 56px var(--gutter) 40px; background: var(--paper); }
.foot-fine { margin: 0 0 30px; font: 500 italic 44px/1 var(--serif); font-variation-settings: "opsz" 60; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; }
.foot-nav nav { display: grid; gap: 5px; align-content: start; }
.foot-nav a { text-decoration: none; font-weight: 500; }
.foot-nav a:hover { text-decoration: underline; }
.fine { margin: 0 0 22px; font-size: 14px; color: var(--ink-2); max-width: 60ch; }
.theme-line { margin: 0 0 24px; }
.site-credit { --credit-ink: var(--ink); --credit-muted: var(--ink-2); --credit-line: var(--rule); --credit-accent: var(--ink); --credit-heart: oklch(0.5 0.2 20); --credit-hover: oklch(0 0 0 / 0.06);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--credit-ink); font-size: 15px; }
.site-credit-made { margin: 0; }
.site-credit-made a { color: var(--credit-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--credit-accent); text-underline-offset: 3px; }
.site-credit-social { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-credit-social a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--credit-muted); border-radius: 50%; }
.site-credit-social a:hover { color: var(--credit-ink); background: var(--credit-hover); }
.site-credit-social svg { width: 19px; height: 19px; }
.site-credit-sponsor { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; color: var(--credit-ink); border: 1px solid var(--credit-line); border-radius: 3px; text-decoration: none; font-weight: 500; }
.site-credit-sponsor:hover { background: var(--credit-hover); }
.site-credit-sponsor svg { width: 18px; height: 18px; color: var(--credit-heart); }

/* The comb. It stays at the foot of the window on every page. */
.comb { position: fixed; bottom: 0; left: 0; z-index: 10; width: 100%; height: 130px; will-change: transform; touch-action: pan-y; }
.comb::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; bottom: -60px; background: var(--paper); box-shadow: 0 -14px 14px -6px var(--paper); }
.comb canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.comb-keys { position: absolute; inset: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tine { position: absolute; top: 0; left: calc(var(--left) + var(--pitch) * var(--i, 0)); width: var(--pitch); height: 100%; }
.tine:nth-child(1) { --i: 0; } .tine:nth-child(2) { --i: 1; } .tine:nth-child(3) { --i: 2; } .tine:nth-child(4) { --i: 3; } .tine:nth-child(5) { --i: 4; }
.tine:nth-child(6) { --i: 5; } .tine:nth-child(7) { --i: 6; } .tine:nth-child(8) { --i: 7; } .tine:nth-child(9) { --i: 8; } .tine:nth-child(10) { --i: 9; }
.tine:nth-child(11) { --i: 10; } .tine:nth-child(12) { --i: 11; } .tine:nth-child(13) { --i: 12; } .tine:nth-child(14) { --i: 13; } .tine:nth-child(15) { --i: 14; }
.tine:focus-visible { outline-offset: -3px; outline-color: oklch(0.2 0.1 260); }
.tine i { display: none; }
/* With no WebGL, the tines are plain steel bars. */
.no-gl .tine i { display: block; position: absolute; top: 6px; left: 12%; right: 12%; height: var(--len); background: linear-gradient(90deg, #6d7379, #e3e7ea 28%, #f7f8f9 44%, #aab0b6 78%, #5d6268); border-radius: 3px 3px 0 0; }
.no-gl .comb-keys::after { content: ""; position: absolute; inset: 70px 0 0; background: linear-gradient(180deg, #cfd4d8, #8d9398); z-index: -1; }
.no-gl .tine.rung i { animation: ring-tine 0.5s ease-out; }
@keyframes ring-tine { 0%, 100% { transform: none; } 20% { transform: translateX(1px); } 40% { transform: translateX(-1px); } 60% { transform: translateX(0.6px); } }
.comb-stamp { position: absolute; left: 0; right: 0; top: calc(var(--stamp, 999px)); bottom: auto; margin: 0; display: flex; justify-content: center; gap: 1.6em; pointer-events: none; color: oklch(0.22 0.01 250 / 0.75); font: 700 9.5px/1 var(--sans); font-stretch: 86%; letter-spacing: 0.2em; text-transform: uppercase; text-shadow: 0 1px 0 oklch(1 0 0 / 0.35); }
.ghost { position: fixed; z-index: 11; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, oklch(1 0 0 / 0.62), oklch(1 0 0 / 0.26) 58%, oklch(1 0 0 / 0) 72%); box-shadow: 0 0 0 1.5px oklch(1 0 0 / 0.55); transform: scale(1.3); transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ghost.on { opacity: 1; transform: scale(1); }
.ghost.down { transform: scale(0.8); opacity: 0.86; }
@media (min-width: 960px) {
  .brand { font-size: 26px; }
}
.comb:not(.has-stamp) .comb-stamp { display: none; }
