/*
 * 35.md — one stylesheet.
 *
 * Ink on paper, hairlines instead of boxes, no radius, one accent. The accent
 * means bit 0 — the cursor at the end of the mark — and, by extension,
 * anything live: a lit lamp, a powered trace, the cell you are on. Everything
 * else is the grid.
 *
 * Motion curves live here as custom properties so script and stylesheet
 * share them: --out for arrivals, --spring for things with mass, --snap for
 * things that land. The two springs are sampled from a damped oscillator.
 *
 * The typeface is served from this origin. A webfont CDN would hand every
 * visitor's address to a third party, which is the one thing this site is for
 * not doing.
 */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
/* Author display rules such as .keys and button would otherwise outrank the attribute. */
[hidden] { display: none !important; }

:root {
  --paper: #f4f3ef;
  --paper-2: #ebe9e3;
  --ink: #121211;
  --ink-2: #5f5e59;
  --ink-3: #9d9b94;
  --line: #dcdad3;
  --line-2: #c4c2ba;
  --dot: #d9d7cf;
  --accent: #ff4d00;
  --on-accent: #ffffff;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --cell: clamp(44px, 14vw, 62px);

  --out: cubic-bezier(.16, 1, .3, 1);
  --in: cubic-bezier(.7, 0, .84, 0);
  --spring: linear(0, 0.016, 0.054, 0.101, 0.166, 0.227, 0.292, 0.369, 0.434, 0.508, 0.569, 0.635, 0.687, 0.735, 0.786, 0.824, 0.864, 0.894, 0.92, 0.945, 0.964, 0.981, 0.994, 1.005, 1.013, 1.019, 1.024, 1.026, 1.028, 1.029, 1.029, 1.028, 1.027, 1.025, 1.023, 1.021, 1.019, 1.018, 1.015, 1.014, 1.012, 1.01, 1.009, 1.007, 1.006, 1.005, 1.004, 1.003, 1);
  --snap: linear(0, 0.043, 0.119, 0.236, 0.371, 0.494, 0.632, 0.758, 0.869, 0.951, 1.027, 1.083, 1.116, 1.14, 1.149, 1.148, 1.139, 1.124, 1.107, 1.086, 1.065, 1.048, 1.03, 1.014, 1.001, 0.993, 0.985, 0.981, 0.978, 0.978, 0.978, 0.98, 0.983, 0.985, 0.988, 0.991, 0.994, 0.996, 0.999, 1, 1.002, 1.003, 1.003, 1.003, 1.003, 1.003, 1.003, 1.002, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c0c0b;
    --paper-2: #161615;
    --ink: #ecebe6;
    --ink-2: #9a9993;
    --ink-3: #5f5e59;
    --line: #242422;
    --line-2: #3a3935;
    --dot: #1c1c1a;
    --accent: #ff5c14;
    --on-accent: #0c0c0b;
  }
}
:root[data-theme="dark"] {
  --paper: #0c0c0b;
  --paper-2: #161615;
  --ink: #ecebe6;
  --ink-2: #9a9993;
  --ink-3: #5f5e59;
  --line: #242422;
  --line-2: #3a3935;
  --dot: #1c1c1a;
  --accent: #ff5c14;
  --on-accent: #0c0c0b;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
  /* Double-tap zoom is a gesture, not a layout. A one-finger drag still reaches the games. */
  touch-action: manipulation;
}

body {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  /* Graph paper: one dot per module, faint enough to be felt rather than seen. */
  background: var(--paper) radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}

::selection { background: var(--accent); color: var(--on-accent); }
:where(a, button, input):focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }

