/* Shared by playground pages. Colours and type copied from ../index.html; keep them in step. */
:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --ink: #1b1b19;
  --text: #1b1b19;   /* body copy; headings and bold use --ink */
  --soft: #64635d;
  --faint: #9e9d96;
  --rule: #e4e2da;
  --chip: #eeece6;
  --accent: #6d28d9;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  --t-purple: #ebe6f7;
  --bar: #6d28d9;
  --track: #ebe6f7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151513; --paper: #1d1d1b; --ink: #e3e1da; --text: #b4b2aa; --soft: #8e8c85; --faint: #696862;
  --rule: #2c2b28; --chip: #252421; --accent: #b39dff;
  --t-purple: #231f2e;
  --bar: #9b7cf0; --track: #2a2438;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); overflow-x: clip; }
body { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, b, strong, .bar .name { color: var(--ink); }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }

.col { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent);
       backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar .wide { display: flex; justify-content: space-between; align-items: center; height: 56px; font-family: var(--sans); font-size: 14px; }
.bar .name { font-family: var(--serif); font-weight: 900; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.bar nav { display: flex; gap: 22px; align-items: center; }
.bar nav a { text-decoration: none; color: var(--soft); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: -6px -7px -6px -4px; padding: 0;
                border: 0; border-radius: 50%; background: none; color: var(--soft); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--chip); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }

.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); margin: 0 0 10px; }
.chapter { padding-top: 96px; }
.chapter h2 { font-size: 28px; font-weight: 400; letter-spacing: -.01em; margin: 0 0 12px; line-height: 1.25; }
.soft { color: var(--soft); }

footer.col { margin-top: 96px; padding-bottom: 96px; }
footer::before { content: ""; display: block; border-top: 1px solid var(--rule); margin-bottom: 56px; }
footer .big { font-size: 28px; line-height: 1.35; margin: 0 0 28px; }
footer .links { font-family: var(--sans); font-size: 14px; color: var(--soft); }
footer .links a { color: var(--soft); }
footer .sep { color: var(--faint); margin: 0 8px; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .bar nav { gap: 16px; }
  .bar nav a.hide-sm { display: none; }
}
