@charset "UTF-8";
/* The Playground (playground/): interactive maths visuals. Loaded after styles.css, before each visual's own styles.css.
   The visuals were written against a small set of theme variables. The neutrals and fonts map to the site's tokens, so
   they follow its light and dark themes; the chart and highlight colours keep the palette the visuals were checked with. */

:root {
  --font-sans: var(--sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --color-background-primary: var(--surface);
  --color-background-secondary: var(--surface-2);
  --color-text-primary: var(--ink);
  --color-text-secondary: var(--muted);
  --color-border-primary: var(--line-strong);
  --color-border-secondary: var(--line);
  --color-background-info: #e3eeff;
  --color-text-info: #1f5fd1;
  --traycer-chart-1: #1f5fd1;
  --traycer-chart-2: #1d7a3e;
  --traycer-chart-3: #b4327f;
  --traycer-chart-4: #a36200;
  --traycer-chart-5: #6d45c9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background-info: #13284a;
    --color-text-info: #8fbaff;
    --traycer-chart-1: #7fb0ff;
    --traycer-chart-2: #6fd38f;
    --traycer-chart-3: #f08cc4;
    --traycer-chart-4: #f0c35a;
    --traycer-chart-5: #b69cff;
  }
}

/* Gallery */
.playground { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: clamp(40px, 5vw, 56px); }
.playground-intro { max-width: 46rem; }
.playground h1 { font-size: clamp(2.75rem, 1.6rem + 3.6vw, 4.25rem); margin-top: 22px; }
.playground h1 em { color: var(--accent); }
.playground-lead { font-size: 1.125rem; line-height: 1.75; color: var(--muted); margin-top: 22px; max-width: 38rem; }
.playground-how { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9375rem; color: var(--muted); }
.playground-how li { display: inline-flex; align-items: center; gap: 10px; }
.playground-how li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.playground-section { display: flex; flex-direction: column; gap: 8px; }
.playground-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.playground-section-head h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); letter-spacing: -.03em; }
.playground-section-head p { color: var(--muted); font-size: .9375rem; }
.playground-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 32px; }
.playground-list li { border-bottom: 1px solid var(--line); min-width: 0; }
.playground-list a { display: flex; flex-direction: column; gap: 2px; padding: 14px 4px; }
.playground-list a:hover .playground-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.playground-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 1.0625rem; font-weight: 600; }
.playground-desc { color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.playground-tag { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--note-ink); background: var(--note-bg); border: 1px solid var(--line-strong); padding: 0 8px; border-radius: 999px; line-height: 1.6; }
.playground-note { color: var(--muted); font-size: .9375rem; }
.playground-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.playground + .site-footer, .playground-visual .site-footer { border-top: 1px solid var(--line); }

/* Visual pages: the site's header and footer around the visual's own <main>. */
body.playground-visual { padding: 0; background: var(--bg); }
.playground-visual .site-header { display: block; }
body.playground-visual > main { padding: 24px 16px 56px; }
.playground-visual main h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -.03em; line-height: 1.15; }
.playground-visual main :is(h2, h3, h4) { font-family: var(--sans); letter-spacing: normal; line-height: inherit; }

/* Classes that replace the inline styles the visuals' scripts used to write (the site's CSP blocks those). */
.pg-handle-grab { cursor: grab; }
.pg-handle-ew { cursor: ew-resize; }
.pg-clickable { cursor: pointer; }
.pg-row-selected { background: var(--color-background-info, #dbeafe); font-weight: 600; }
.pg-swatch-chart-1 { background: var(--traycer-chart-1, #2563eb); }
.pg-swatch-chart-2 { background: var(--traycer-chart-2, #16a34a); }
.pg-swatch-chart-4 { background: var(--traycer-chart-4, #d97706); }
.pg-swatch-ink { background: var(--color-text-primary, #111827); }
.pg-swatch-muted { background: var(--color-text-secondary, #6b7280); }
.pg-swatch-amber { background: #d97706; }
td.pg-cell-chart-1 { color: var(--traycer-chart-1, #2563eb); font-weight: 600; }
td.pg-cell-chart-2 { color: var(--traycer-chart-2, #16a34a); font-weight: 700; }
.pg-bar-chart-1 { background: var(--traycer-chart-1, #2563eb); }
.pg-bar-chart-2 { background: var(--traycer-chart-2, #d97706); }
.pg-bar-chart-3 { background: var(--traycer-chart-3, #16a34a); }
