@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #edf1f7;
  --grid: #e3e9f2;
  --surface: #fbfcfe;
  --ink: #14203a;
  --ink-soft: #4d5a78;
  --line: #c6d0e2;
  --mark: #ffd84d;
  --mark-ink: #14203a;
  --link: #2447b8;
  --bad: #b02d23;
  --good: #146c46;
  --good-bg: #dcf2e6;
  --them: #dae3f5;
  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1626;
    --grid: #151e31;
    --surface: #18223a;
    --ink: #e8edf7;
    --ink-soft: #a6b1c9;
    --line: #2c3a58;
    --link: #8fb0ff;
    --bad: #ff8a80;
    --good: #7fd8a8;
    --good-bg: #183528;
    --them: #22304d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: var(--link); }
main, .top, .foot { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.top { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; padding-bottom: 22px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.15rem/1 var(--display); letter-spacing: -0.01em; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 3px var(--ink); }
.top-link { font-weight: 500; text-decoration: none; }
.top-link:hover { text-decoration: underline; }

.eyebrow { font: 400 0.78rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 9vw, 5.2rem); font-weight: 800; line-height: 1; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 18px; }
h3 { font-size: 1.35rem; font-weight: 700; margin: 6px 0 8px; }
mark { background: var(--mark); color: var(--mark-ink); padding: 0 0.12em; border-radius: 4px; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding-top: 48px; }
.lede { font-size: 1.25rem; max-width: 40ch; color: var(--ink-soft); margin: 22px 0 28px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 6px; background: var(--ink); color: var(--paper); font-weight: 500; text-decoration: none; border: 2px solid var(--ink); }
.btn:hover { background: transparent; color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--surface); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; }

.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.story-text p { max-width: 46ch; }
.chat { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 6px 6px 0 var(--line); }
.msg { margin: 0; padding: 10px 14px; border-radius: 10px; max-width: 85%; }
.msg .who { display: block; font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.msg-them { background: var(--them); align-self: flex-start; }
.msg-ada { background: var(--paper); border: 1px solid var(--line); align-self: flex-end; }
.msg-ada.wrong { border-color: var(--bad); }
.note { margin: 4px 0 0; font-size: 0.9rem; color: var(--bad); }

.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; position: relative; }
.step p { margin: 0 0 18px; color: var(--ink-soft); }
.step-no { font: 400 0.8rem/1 var(--mono); color: var(--ink-soft); }
.tag { display: inline-block; font: 400 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-soft); }
.tag-live { background: var(--good-bg); color: var(--good); border-color: transparent; }

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; margin: 8px 0 0; }
.rules dt { font: 700 1.15rem/1.3 var(--display); }
.rules dd { margin: 4px 0 0; color: var(--ink-soft); }

.start p { max-width: 58ch; }
.start .actions { margin: 22px 0; }
.fine { font-size: 0.9rem; color: var(--ink-soft); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }

/* Live today: the game's tracks and features. */
.section-lede { max-width: 60ch; color: var(--ink-soft); margin: 0 0 22px; }
.tracks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.track { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.track h3 { margin: 4px 0 6px; }
.track p { margin: 0; color: var(--ink-soft); }
.track-count { font: 400 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.features { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 40px; }
.features li { padding-left: 22px; position: relative; color: var(--ink-soft); }
.features li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 2px var(--ink); }
.features strong { color: var(--ink); font-weight: 500; }

/* For parents and teachers. */
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.families-text p { max-width: 42ch; }
.checks { list-style: none; padding: 22px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; box-shadow: 6px 6px 0 var(--line); }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--good-bg); color: var(--good); font-size: 0.8rem; line-height: 20px; text-align: center; font-weight: 700; }

@media (max-width: 760px) {
  .story, .steps, .rules, .tracks, .features, .families { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .top-link { font-size: 0.95rem; }
}

/* The tools: hrn as the lead card, the adanext tools in a grid. */
.top-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.top .brand { flex-shrink: 0; white-space: nowrap; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; }
.tool p { margin: 0 0 14px; color: var(--ink-soft); }
.tool-lead { margin-bottom: 18px; box-shadow: 6px 6px 0 var(--line); }
.tool-lead > p:first-of-type { color: var(--ink); max-width: 72ch; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.tool-head h3 { margin: 0; }
.tool-install { font-size: 0.95rem; }
.tool-link { margin-top: auto; align-self: flex-start; font-weight: 500; text-decoration: none; }
.tool-link:hover { text-decoration: underline; }
.tool-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* For teams: the parts of a track, and the page you are on in the header. */
.tracks-teams { align-items: start; }
.parts { margin: 6px 0 0; display: grid; gap: 12px; }
.parts dt { font-weight: 500; }
.parts dd { margin: 2px 0 0; color: var(--ink-soft); }
.top-link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

@media (max-width: 760px) {
  .tool-grid { grid-template-columns: 1fr; }
  .top-nav { gap: 12px; }
}
