  /* ---------- Tokens ---------- */
  :root {
    --bench: #E8EDEF;      /* page: cool lab-bench grey */
    --paper: #FBFCFC;      /* tiles and panels */
    --ink: #1B2B34;        /* text: deep slate */
    --ink-soft: #52646E;   /* secondary text */
    --rule: #C9D3D8;       /* borders */
    --teach: #2E5BBA;      /* group: teaching (cobalt) */
    --tools: #1F8A7E;      /* group: classroom tools (teal) */
    --games: #D9902A;      /* group: games (marigold) */
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body: "Source Serif 4", Georgia, serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bench: #141C21; --paper: #1D272D; --ink: #E6ECEE; --ink-soft: #9DB0B9;
      --rule: #34444C; --teach: #7C9EEB; --tools: #4FC2B4; --games: #F0B45A;
    }
  }
  :root[data-theme="dark"] {
    --bench: #141C21; --paper: #1D272D; --ink: #E6ECEE; --ink-soft: #9DB0B9;
    --rule: #34444C; --teach: #7C9EEB; --tools: #4FC2B4; --games: #F0B45A;
  }

  /* ---------- Base ---------- */
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bench);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--body);
  }
  h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--teach); outline-offset: 3px; border-radius: 4px; }
  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
  @media (min-width: 720px) { .wrap { padding: 0 32px; } }
  .skip { position: absolute; left: -999px; }
  .skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

  /* ---------- Nav ---------- */
  .site-head { border-bottom: 1px solid var(--rule); background: var(--bench); position: sticky; top: 0; z-index: 5; }
  .nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
  .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem var(--display); }
  .brand-mark {
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 2px solid var(--ink); border-radius: 4px; font: 800 1rem var(--display);
  }
  .nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .nav-links a {
    display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none;
    font: 400 0.98rem var(--display); color: var(--ink-soft);
  }
  .nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--paper); }
  .nav-toggle {
    display: none; background: none; border: 1px solid var(--rule); border-radius: 6px;
    padding: 8px 12px; font: 600 0.95rem var(--display); color: var(--ink); cursor: pointer;
  }
  @media (max-width: 719px) {
    .nav-toggle { display: block; }
    .nav-links {
      display: none; position: absolute; left: 0; right: 0; top: 64px;
      flex-direction: column; background: var(--bench); border-bottom: 1px solid var(--rule); padding: 8px 16px 16px;
    }
    .nav-links.open { display: flex; }
  }

  /* ---------- Hero ---------- */
  .hero { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 48px; align-items: center; }
  @media (min-width: 820px) { .hero { grid-template-columns: 300px 1fr; gap: 56px; padding-top: 88px; padding-bottom: 72px; } }
  .hero-el {
    background: var(--paper); border: 3px solid var(--ink); border-radius: 6px;
    aspect-ratio: 1 / 1; max-width: 300px; padding: 18px 20px;
    display: grid; grid-template-rows: auto 1fr auto auto;
  }
  .hero-el .num { font: 600 1.4rem var(--display); }
  .hero-el .sym { font: 800 clamp(6rem, 22vw, 8.5rem)/1 var(--display); letter-spacing: -0.04em; align-self: center; }
  .hero-el .name { font: 600 1.15rem var(--display); }
  .hero-el .mass { color: var(--ink-soft); font-size: 0.95rem; }
  .hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; }
  .hero p { max-width: 36em; margin: 16px 0 0; font-size: 1.15rem; }
  .hero .aside { color: var(--ink-soft); font-style: italic; font-size: 1rem; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  .btn {
    display: inline-block; padding: 11px 20px; border-radius: 6px; text-decoration: none;
    font: 600 1rem var(--display); border: 2px solid var(--ink);
  }
  .btn-solid { background: var(--ink); color: var(--bench); }
  .btn-solid:hover { background: var(--teach); border-color: var(--teach); color: #fff; }
  .btn-line:hover { background: var(--paper); }

  /* ---------- Sections ---------- */
  section { padding: 56px 0; border-top: 1px solid var(--rule); }
  section h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; }
  .lede { max-width: 38em; color: var(--ink-soft); margin: 10px 0 0; }

  /* ---------- The table (signature element) ---------- */
  .legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 20px; }
  .legend button {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px;
    padding: 7px 14px; font: 400 0.95rem var(--display);
  }
  .legend button[aria-pressed="true"] { border-color: var(--ink); font-weight: 600; }
  .swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--ink)); }

  .table { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
  .el {
    --c: var(--ink);
    position: relative; display: flex; flex-direction: column; min-height: 178px;
    padding: 12px 14px 14px; text-decoration: none;
    background: var(--paper); border: 1px solid var(--rule); border-top: 6px solid var(--c); border-radius: 4px;
    transition: opacity .25s ease, transform .25s ease, border-color .15s ease;
  }
  .el[data-group="teach"] { --c: var(--teach); }
  .el[data-group="tools"] { --c: var(--tools); }
  .el[data-group="games"] { --c: var(--games); }
  .el:hover { border-color: var(--c); border-top-color: var(--c); }
  .el .num { font: 600 0.9rem var(--display); color: var(--ink-soft); }
  .el .sym { font: 800 3.1rem/1 var(--display); letter-spacing: -0.03em; margin: 8px 0 10px; color: var(--c); }
  .el .name { font: 600 1.05rem/1.2 var(--display); }
  .el .mass { font-size: 0.88rem; line-height: 1.35; color: var(--ink-soft); margin-top: auto; padding-top: 6px; }
  .el.dim { opacity: 0.22; transform: scale(0.97); }
  .table-note { color: var(--ink-soft); font-size: 0.95rem; margin-top: 16px; max-width: 46em; }

  /* ---------- Lab notes ---------- */
  .notes { list-style: none; padding: 0; margin: 24px 0 0; }
  .notes li { border-bottom: 1px solid var(--rule); }
  .notes a { display: grid; gap: 4px 24px; padding: 18px 0; text-decoration: none; }
  @media (min-width: 720px) { .notes a { grid-template-columns: 140px 1fr; } }
  .notes time { color: var(--ink-soft); font: 400 0.95rem var(--display); }
  .notes h3 { font-size: 1.25rem; font-weight: 600; }
  .notes a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
  .notes p { margin: 4px 0 0; color: var(--ink-soft); }

  /* ---------- About / contact ---------- */
  .about { display: grid; gap: 32px; }
  @media (min-width: 820px) { .about { grid-template-columns: 1.4fr 1fr; gap: 56px; } }
  .about p { max-width: 36em; }
  .facts { margin: 0; padding: 20px 22px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
  .facts div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .facts div:last-child { border-bottom: 0; }
  .facts dt { color: var(--ink-soft); }
  .facts dd { margin: 0; font-family: var(--display); font-weight: 600; text-align: right; }

  footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--ink-soft); font-size: 0.95rem; }
  footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .el { transition: none; }
  }
