/* Code Club Offaly
   Brand: Code Club guidelines 2024. Lexend, Code Club green #41b653,
   secondary #da315f #f8f294 #46499e, supporting palette for highlights.
   Signature: curly braces that close around whatever you point at. */

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  /* brand */
  --green: #41b653;
  --green-press: #38a249;
  --green-ink: #1a7530;      /* green as text on light surfaces: 5.2:1 on cream, 4.8:1 on raised */
  --pink: #da315f;
  --lemon: #f8f294;
  --violet: #46499e;
  --orange: #f26a45;
  --yellow: #fedf00;
  --slate: #37384d;
  --rose: #ef60a3;
  --mint: #4aba7a;
  --sky: #31a9e0;
  --plum: #632341;
  --night: #061719;
  --cream: #f7f3ed;

  /* warm neutral ramp, tinted toward the brand's dark teal */
  --bg: var(--cream);
  --card: #fffdf9;
  --raised: #efe9df;
  --text: #061719;
  --text-2: #3b4849;
  --text-3: #5c6766;
  --line: rgba(6, 23, 25, 0.1);
  --line-strong: rgba(6, 23, 25, 0.18);

  /* night surfaces */
  --n-bg: #061719;
  --n-card: #0c2124;
  --n-raised: #132b2e;
  --n-text: #f3efe8;
  --n-text-2: #a8b5b3;
  --n-text-3: #7f8e8c;
  --n-line: rgba(243, 239, 232, 0.1);

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;
  --mid: 240ms;
  --slow: 420ms;

  --r-sm: 6px;
  --r: 10px;
  --r-card: 16px;
  --r-panel: 20px;

  --wrap: 1200px;
  --gutter: 32px;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 500; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; text-wrap: balance; }
code, kbd, pre { font-family: var(--mono); }
::selection { background: var(--lemon); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--green-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--night);
  color: var(--cream);
  border-radius: var(--r);
  text-decoration: none;
  transition: top var(--fast) var(--ease);
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- type helpers ---------- */

.label {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--green-ink);
  margin-bottom: 16px;
}
.label::before { content: "// "; opacity: 0.6; }
.night .label { color: var(--green); }

.h-display {
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.h-page {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.h-section {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.h-card { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.lede {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36rem;
}
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- placeholders for facts the club still has to confirm ---------- */

.tbc {
  font-family: var(--mono);
  font-size: 0.85em;
  font-weight: 400;
  color: var(--plum);
  background: rgba(239, 96, 163, 0.14);
  border: 1px dashed rgba(99, 35, 65, 0.4);
  border-radius: 4px;
  padding: 0 6px;
  white-space: nowrap;
}
.night .tbc { color: #ffc2de; background: rgba(239, 96, 163, 0.16); border-color: rgba(255, 194, 222, 0.4); }

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--green);
  --btn-fg: var(--night);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 500 16px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
    border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { --btn-bg: var(--green-press); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-quiet {
  --btn-bg: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-quiet:hover { --btn-bg: var(--raised); }
.night .btn-quiet { --btn-fg: var(--n-text); box-shadow: inset 0 0 0 1px rgba(243, 239, 232, 0.22); }
.night .btn-quiet:hover { --btn-bg: var(--n-raised); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  color: var(--green-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(28, 122, 49, 0.4);
  transition: text-decoration-color var(--fast) var(--ease);
}
.link:hover { text-decoration-color: currentColor; }
.night .link { color: var(--green); text-decoration-color: rgba(65, 182, 83, 0.45); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  color: var(--green-ink);
  text-decoration: none;
}
.arrow-link svg { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ---------- signature: braces close around the thing you point at ---------- */

.brace {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.brace::before,
.brace::after {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--green);
  opacity: 0;
  transition: opacity var(--fast) var(--ease), transform var(--mid) var(--ease);
  pointer-events: none;
}
.brace::before { content: "{"; margin-right: 2px; transform: translateX(6px); }
.brace::after { content: "}"; margin-left: 2px; transform: translateX(-6px); }
.brace:hover::before,
.brace:hover::after,
.brace:focus-visible::before,
.brace:focus-visible::after,
.brace[aria-current="page"]::before,
.brace[aria-current="page"]::after {
  opacity: 1;
  transform: none;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--mid) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: block; flex: none; line-height: 0; }
.logo img { height: 44px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  height: 40px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color var(--fast) var(--ease);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 12px; color: var(--night); }

.menu-btn {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-btn:hover { background: var(--raised); }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  :root { --gutter: 20px; --header-h: 64px; }
  .logo img { height: 38px; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease), visibility 0s linear var(--mid);
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
  }
  .nav a { height: 48px; font-size: 18px; padding: 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 16px 0 0; height: 48px; border: 0; }
}

/* ---------- sections ---------- */

.section { padding: 112px 0; }
.section-sm { padding: 72px 0; }
.section + .section { padding-top: 0; }
.section.night + .section,
.section + .section.night,
.section.tinted + .section,
.section + .section.tinted { padding-top: 112px; }
.night {
  background: var(--n-bg);
  color: var(--n-text);
}
.night .lede, .night .text-2 { color: var(--n-text-2); }
.night .muted { color: var(--n-text-3); }
.tinted { background: var(--raised); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .lede { margin-top: 20px; }
.section-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}
.section-head.split .lede { margin-top: 0; }

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .section.night + .section,
  .section + .section.night,
  .section.tinted + .section,
  .section + .section.tinted { padding-top: 80px; }
  .section-head { margin-bottom: 40px; }
  .section-head.split { grid-template-columns: 1fr; }
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 64px;
  align-items: center;
}
.hero-copy .lede { margin: 28px 0 36px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--green-ink); }

/* rotating word (after xAI's headline: letters blur in and out, the slot
   resizes to the word, an underline sweeps in) */
.rotator {
  display: inline-flex;
  position: relative;
  vertical-align: bottom;
  white-space: nowrap;
  transition: width 350ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rotator-word { display: inline-flex; color: var(--green-ink); }
.rotator-word span {
  display: inline-block;
  transition: opacity 250ms var(--ease), transform 250ms var(--ease), filter 250ms var(--ease);
}
.rotator-word span.is-out { opacity: 0; transform: translateY(-0.18em); filter: blur(4px); }
.rotator-word span.is-pre { opacity: 0; transform: translateY(0.22em); filter: blur(4px); }
.rotator::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.07em;
  border-radius: 2px;
  background: var(--green);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 800ms var(--ease) 300ms;
}
.rotator.is-lined::after { transform: scaleX(1); }
.rotator-sizer {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.full-stop { color: var(--text); }

@media (max-width: 1000px) {
  .hero { padding: 40px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* entrance: the hero copy only, once */
@media (prefers-reduced-motion: no-preference) {
  .enter > * {
    animation: enter var(--slow) var(--ease) both;
  }
  .enter > *:nth-child(2) { animation-delay: 50ms; }
  .enter > *:nth-child(3) { animation-delay: 100ms; }
  .enter > *:nth-child(4) { animation-delay: 150ms; }
  .enter > *:nth-child(5) { animation-delay: 200ms; }
}
@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
}

/* ---------- code window (hero playground) ---------- */

.window {
  background: var(--n-bg);
  color: var(--n-text);
  border-radius: var(--r-panel);
  box-shadow: 0 24px 48px -24px rgba(6, 23, 25, 0.35), 0 2px 6px rgba(6, 23, 25, 0.08);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--n-line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--n-text-3);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(243, 239, 232, 0.16); }
.window-bar .file { color: var(--n-text-2); }
.window-bar .spacer { flex: 1; }

.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 380px;
}
.play-code {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--n-line);
  min-width: 0;
}
.editor {
  position: relative;
  flex: 1;
  display: flex;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 22px;
}
.gutter {
  flex: none;
  width: 40px;
  padding: 16px 0;
  text-align: right;
  color: var(--n-text-3);
  opacity: 0.6;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.gutter div { padding-right: 12px; }
.gutter div.is-error { color: var(--orange); opacity: 1; }
.editor-area { position: relative; flex: 1; min-width: 0; }
.editor-area textarea,
.editor-area pre {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 16px 16px 16px 4px;
  border: 0;
  font: inherit;
  line-height: inherit;
  white-space: pre;
  overflow: hidden;
  tab-size: 4;
  letter-spacing: 0;
}
.editor-area textarea {
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: var(--green);
  outline: none;
  z-index: 1;
  overflow: auto;
}
.editor-area textarea::selection { background: rgba(65, 182, 83, 0.3); color: transparent; }
.editor-area pre { color: var(--n-text); pointer-events: none; }
.tok-kw { color: #ef8cb9; }
.tok-fn { color: #8fd49b; }
.tok-num { color: #f9c66b; }
.tok-str { color: #f8f294; }
.tok-com { color: var(--n-text-3); }

.play-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--n-line);
  flex-wrap: wrap;
}
.chip {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--n-raised);
  color: var(--n-text-2);
  font: 400 13px/1 var(--mono);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover { color: var(--n-text); background: #1b3539; }
.chip[aria-pressed="true"] { color: var(--night); background: var(--lemon); }
.run {
  margin-left: auto;
  margin-right: -8px;
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 500;
  border-radius: var(--r-sm);
}
.run svg { width: 14px; height: 14px; }

.play-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0a1f22;
  background-image: radial-gradient(rgba(243, 239, 232, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 10px 10px;
}
.play-stage canvas { width: 100%; flex: 1; aspect-ratio: 1; }
.console {
  min-height: 44px;
  padding: 12px 16px;
  border-top: 1px solid var(--n-line);
  font: 400 12.5px/20px var(--mono);
  color: var(--n-text-3);
}
.console .ok { color: var(--green); }
.console .err { color: #f7a189; }

@media (max-width: 640px) {
  .play { grid-template-columns: 1fr; }
  .play-code { border-right: 0; border-bottom: 1px solid var(--n-line); }
  .editor { min-height: 240px; }
  .play-stage canvas { aspect-ratio: 4 / 3; }
}

/* ---------- facts strip ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { padding: 28px 24px 28px 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact b {
  display: block;
  font-size: 36px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.fact span { display: block; font-size: 15px; line-height: 22px; color: var(--text-2); }
.facts-src { margin-top: 12px; font-size: 13px; color: var(--text-3); }
@media (max-width: 800px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- scroll reveal statement (after Hyperiux: text fills in reading
   order as you scroll, with a green front running ahead of the white) ---------- */

.statement-wrap { padding: 160px 0; }
.statement {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-align: center;
  text-wrap: pretty;
}
.statement .ch { color: rgba(243, 239, 232, 0.16); }
.statement em { font-style: normal; }
.statement-foot {
  margin-top: 48px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--n-text-3);
}
@media (max-width: 700px) { .statement-wrap { padding: 112px 0; } }

/* ---------- paths (after Form&Fun: a column tints when you point at it,
   the picture insets and starts to play) ---------- */

.paths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.path {
  --tint: rgba(74, 186, 122, 0.16);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--r-panel);
  text-decoration: none;
  color: inherit;
  transition: background-color 400ms cubic-bezier(0.23, 1, 0.32, 1), padding 400ms cubic-bezier(0.23, 1, 0.32, 1);
}
.path-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-radius 400ms cubic-bezier(0.23, 1, 0.32, 1);
}
.path-body { padding: 24px 4px 8px; transition: padding 400ms cubic-bezier(0.23, 1, 0.32, 1); }
.path :is(h2, h3) { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.02em; margin-bottom: 12px; }
.path p { font-size: 15px; line-height: 23px; color: var(--text-2); margin-bottom: 16px; }
.path ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.path li {
  font: 400 12px/24px var(--mono);
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: rgba(6, 23, 25, 0.06);
  color: var(--text-2);
}
.path.t-sky { --tint: rgba(49, 169, 224, 0.16); }
.path.t-yellow { --tint: rgba(254, 223, 0, 0.22); }
.path.t-rose { --tint: rgba(239, 96, 163, 0.16); }
.path.t-mint { --tint: rgba(74, 186, 122, 0.2); }

@media (hover: hover) and (min-width: 901px) {
  .path:hover,
  .path:focus-visible { background: var(--tint); padding: 16px; }
  .path:hover .path-body,
  .path:focus-visible .path-body { padding: 20px 4px 4px; }
  .path:hover .path-art,
  .path:focus-visible .path-art { border-radius: 10px; }
}
@media (max-width: 1100px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; } }
@media (max-width: 900px) {
  .path { background: var(--tint); padding: 12px; }
  .path-body { padding: 20px 4px 4px; }
  .path-art { border-radius: 10px; }
}
@media (max-width: 560px) { .paths { grid-template-columns: 1fr; } }

/* path artwork, all drawn in code */
.art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.art-scratch { background: var(--lemon); }
.art-python { background: var(--violet); }
.art-web { background: var(--pink); }
.art-make { background: var(--green); }

/* scratch-style blocks */
.blocks { position: absolute; left: 9%; top: 11%; width: 56%; display: flex; flex-direction: column; }
.blk {
  position: relative;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  font: 500 12px/1 var(--font);
  color: #fff;
  border-radius: 6px;
  white-space: nowrap;
}
.blk + .blk { margin-top: 2px; }
.blk.hat { border-radius: 16px 16px 6px 6px; height: 40px; }
.blk.ev { background: #a36318; }
.blk.ctl { background: #9f6408; }
.blk.mot { background: var(--violet); }
.blk.look { background: #8a55d7; }
.blk.in { margin-left: 16px; }
.blk .pill {
  margin: 0 4px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fff;
  color: var(--night);
  font-size: 11px;
}
.stage-mini {
  position: absolute;
  right: 8%;
  bottom: 8%;
  width: 34%;
  aspect-ratio: 4 / 3;
  background: #fffdf9;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(6, 23, 25, 0.1);
  overflow: hidden;
}
.sprite {
  position: absolute;
  left: 10%;
  top: 38%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
}
.sprite::after {
  content: "";
  position: absolute;
  right: 22%;
  top: 30%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--night);
}
.is-playing .sprite { animation: bounce 1.6s var(--ease) infinite alternate; }
@keyframes bounce {
  0% { transform: translate(0, 0); }
  50% { transform: translate(150%, -40%); }
  100% { transform: translate(300%, 0); }
}
.is-playing .blk.hat { animation: flag 0.4s var(--ease); }
@keyframes flag { 50% { transform: translateY(-2px); } }

/* python turtle */
.art-python canvas { width: 82%; height: 82%; }

/* web: a tiny browser */
.mini-browser {
  width: 78%;
  background: #fffdf9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 24px -12px rgba(6, 23, 25, 0.4);
}
.mini-browser .bar { height: 22px; display: flex; gap: 4px; align-items: center; padding: 0 8px; background: var(--raised); }
.mini-browser .bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(6, 23, 25, 0.2); }
.mini-browser .src {
  margin: 0;
  padding: 10px 12px;
  font: 400 10.5px/16px var(--mono);
  color: var(--slate);
  background: #fffdf9;
  white-space: pre;
  overflow: hidden;
}
.mini-browser .src b { font-weight: 400; color: var(--pink); }
.mini-browser .page {
  padding: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px;
  line-height: 18px;
}
.mini-browser .page .ttl {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--night);
  transition: color var(--slow) var(--ease);
}
.mini-browser .page .bar2 {
  margin-top: 8px;
  height: 6px;
  width: 30%;
  border-radius: 3px;
  background: var(--raised);
  transition: width 900ms var(--ease), background-color var(--slow) var(--ease);
}
.is-playing .mini-browser .page .ttl { color: var(--pink); }
.is-playing .mini-browser .page .bar2 { width: 86%; background: var(--lemon); }

/* physical computing: a 5x5 LED board */
.board {
  width: 64%;
  aspect-ratio: 1.15;
  border-radius: 14px;
  background: var(--night);
  padding: 9%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 28px -16px rgba(6, 23, 25, 0.6);
}
.leds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12%; width: 62%; aspect-ratio: 1; }
.leds i {
  border-radius: 2px;
  background: rgba(243, 239, 232, 0.1);
  transition: background-color 120ms linear;
}
.leds i.on { background: #ff5a3c; }

/* ---------- steps / timeline ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step { padding: 24px 24px 0 0; border-top: 1px solid var(--line-strong); }
.step + .step { padding-left: 24px; }
.step-n {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green-ink);
  margin-bottom: 40px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { font-size: 15px; line-height: 23px; color: var(--text-2); }
.night .step { border-top-color: rgba(243, 239, 232, 0.2); }
.night .step-n { color: var(--green); }
.night .step p { color: var(--n-text-2); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .step:nth-child(3) { padding-left: 0; }
  .step-n { margin-bottom: 20px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step + .step { padding-left: 0; }
}

/* ---------- cards ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 28px;
  box-shadow: 0 0 0 1px var(--line);
}
.card :is(h2, h3) { font-size: 20px; margin-bottom: 10px; }
.card p { font-size: 15px; line-height: 24px; color: var(--text-2); }
.card-h { display: flex; align-items: center; gap: 10px; }
.card-h svg { width: 20px; height: 20px; flex: none; color: var(--green-ink); }
.night .card { background: var(--n-card); box-shadow: 0 0 0 1px var(--n-line); }
.night .card p { color: var(--n-text-2); }
.night .card-h svg { color: var(--green); }

/* audience split: two big doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 40px;
  border-radius: var(--r-panel);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--mid) var(--ease);
}
.door h3 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.02em; margin-bottom: 16px; max-width: 14ch; }
.door p { position: relative; z-index: 1; max-width: 32ch; font-size: 16px; line-height: 25px; }
.door .btn { margin-top: auto; align-self: flex-start; }
.door-green { background: var(--green); color: var(--night); }
.door-green p { color: rgba(6, 23, 25, 0.78); }
.door-green .btn { --btn-bg: var(--night); --btn-fg: var(--cream); }
.door-green .btn:hover { --btn-bg: #0f2a2d; }
.door-violet { background: var(--violet); color: #fff; }
.door-violet p { color: rgba(255, 255, 255, 0.82); }
.door-violet .btn { --btn-bg: var(--cream); --btn-fg: var(--night); }
.door-violet .btn:hover { --btn-bg: #fff; }
.door .glyph {
  position: absolute;
  right: -12px;
  bottom: -40px;
  font-family: var(--mono);
  font-size: 168px;
  line-height: 1;
  font-weight: 500;
  opacity: 0.12;
  pointer-events: none;
  transition: transform var(--slow) var(--ease);
}
.door:hover .glyph { transform: translateX(-12px); }
@media (max-width: 800px) {
  .doors { grid-template-columns: 1fr; }
  .door { min-height: 320px; padding: 32px 28px; }
}

/* ---------- page hero ---------- */

.page-hero { padding: 64px 0 72px; }
.page-hero .lede { margin-top: 24px; }
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px 64px;
  align-items: end;
}
.page-hero-aside {
  font-size: 15px;
  line-height: 24px;
  color: var(--text-2);
  padding-left: 24px;
  border-left: 2px solid var(--green);
}
@media (max-width: 900px) {
  .page-hero { padding: 32px 0 48px; }
  .page-hero-grid { grid-template-columns: 1fr; }
}

/* ---------- key/value table ---------- */

.kv { margin: 0; display: grid; grid-template-columns: 1fr; }
.kv div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.kv div:last-child { border-bottom: 1px solid var(--line); }
.kv dt { font-family: var(--mono); font-size: 13px; line-height: 26px; color: var(--text-3); }
.kv dd { margin: 0; font-size: 16px; line-height: 26px; }
@media (max-width: 560px) { .kv div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- two-column prose ---------- */

.cols { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px 80px; }
.prose { font-size: 17px; line-height: 28px; color: var(--text-2); }
.prose h3 { color: var(--text); font-size: 22px; margin: 40px 0 12px; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--green-ink); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* ---------- principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.principle {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: var(--r-panel);
  padding: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.principle h3 { font-size: 26px; letter-spacing: -0.02em; max-width: 9ch; }
.principle p {
  margin-top: auto;
  font-size: 15px;
  line-height: 23px;
}
.principle .disc {
  position: absolute;
  right: -18%;
  top: -18%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  transition: transform var(--slow) var(--ease);
}
.principle:hover .disc { transform: translate(-8%, 8%); }
.pr-1 { background: var(--green); color: var(--night); }
.pr-1 .disc { background: var(--lemon); }
.pr-2 { background: var(--pink); color: #fff; }
.pr-2 .disc { background: var(--lemon); }
.pr-3 { background: var(--violet); color: #fff; }
.pr-3 .disc { background: var(--cream); }
.pr-4 { background: var(--card); color: var(--night); box-shadow: 0 0 0 1px var(--line); }
.pr-4 .disc { background: var(--violet); }
@media (max-width: 1000px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .principles { grid-template-columns: 1fr; }
  .principle { aspect-ratio: auto; min-height: 240px; }
}

/* ---------- programme rows ---------- */

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px 40px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.row h3 { font-size: 22px; }
.row p { color: var(--text-2); font-size: 16px; line-height: 25px; }
.row .meta { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
@media (max-width: 800px) { .row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- picker (projects page) ---------- */

.picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.picker-q {
  background: var(--card);
  border-radius: var(--r-panel);
  padding: 32px;
  box-shadow: 0 0 0 1px var(--line);
}
.picker fieldset { border: 0; margin: 0 0 28px; padding: 0; }
.picker fieldset:last-child { margin-bottom: 0; }
.picker legend { font-size: 18px; font-weight: 400; margin-bottom: 14px; padding: 0; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 15px;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), color var(--fast) var(--ease);
}
.opt span:hover { background: var(--raised); }
.opt input:checked + span { background: var(--night); color: var(--cream); box-shadow: none; }
.opt input:focus-visible + span { outline: 2px solid var(--green-ink); outline-offset: 2px; }

.picker-a {
  position: relative;
  border-radius: var(--r-panel);
  padding: 32px;
  background: var(--n-bg);
  color: var(--n-text);
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.picker-a .mono { font-size: 13px; color: var(--n-text-3); }
.picker-a h3 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.02em; margin: 16px 0 12px; }
.picker-a p { color: var(--n-text-2); }
.picker-a .first {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--n-raised);
  font-size: 15px;
  line-height: 23px;
  color: var(--n-text-2);
}
.picker-a .first b { display: block; color: var(--n-text); font-weight: 500; margin-bottom: 4px; }
.picker-a .btn { margin-top: auto; align-self: flex-start; }
.picker-a .swap { transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease); }
.picker-a.is-changing .swap { opacity: 0; transform: translateY(6px); }
@media (max-width: 900px) { .picker { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 16px 0;
  font-size: 19px;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "{ }";
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text-3);
  transition: color var(--fast) var(--ease);
}
.faq details[open] summary::after { content: "{-}"; color: var(--green-ink); }
.faq summary:hover::after { color: var(--green-ink); }
.faq .answer { padding: 0 0 28px; max-width: 64ch; color: var(--text-2); font-size: 16px; line-height: 26px; }

/* ---------- forms ---------- */

.form {
  background: var(--card);
  border-radius: var(--r-panel);
  padding: 36px;
  box-shadow: 0 0 0 1px var(--line);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .legend { font-size: 15px; font-weight: 400; }
.field .hint { font-size: 13px; color: var(--text-3); }
.input {
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
  font: 300 16px/1.4 var(--font);
  transition: box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6766' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:hover { box-shadow: inset 0 0 0 1px rgba(6, 23, 25, 0.32); }
.input:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--green-ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 22px; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green-ink); flex: none; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.form-note { font-size: 13px; line-height: 20px; color: var(--text-3); max-width: 44ch; }
.form-status { font: 400 13px/20px var(--mono); color: var(--green-ink); }
.form-status.err { color: var(--pink); }
@media (max-width: 640px) {
  .form { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- callout ---------- */

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.callout svg { width: 20px; height: 20px; margin-top: 3px; color: var(--pink); }
.callout h3 { font-size: 18px; margin-bottom: 6px; }
.callout p { font-size: 15px; line-height: 24px; color: var(--text-2); }

/* ---------- cta band ---------- */

.cta {
  border-radius: var(--r-panel);
  background: var(--green);
  color: var(--night);
  padding: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.cta h2 { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.02em; font-weight: 600; }
.cta p { margin-top: 12px; color: rgba(6, 23, 25, 0.78); max-width: 46ch; }
.cta .btn { --btn-bg: var(--night); --btn-fg: var(--cream); }
.cta .btn:hover { --btn-bg: #0f2a2d; }
.cta .btn-quiet { --btn-bg: transparent; --btn-fg: var(--night); box-shadow: inset 0 0 0 1px rgba(6, 23, 25, 0.3); }
.cta .btn-quiet:hover { --btn-bg: rgba(6, 23, 25, 0.08); }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ---------- footer ---------- */

.site-footer {
  background: var(--n-bg);
  color: var(--n-text-2);
  padding: 80px 0 40px;
  font-size: 15px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.foot-brand img { height: 56px; width: auto; margin-bottom: 24px; }
.foot-brand p { max-width: 36ch; line-height: 24px; }
.site-footer h4 { font-size: 14px; font-weight: 400; color: var(--n-text-3); margin-bottom: 16px; font-family: var(--mono); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--n-text); text-decoration: none; }
.site-footer a:hover { color: var(--green); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--n-line);
  font-size: 13px;
  line-height: 20px;
  color: var(--n-text-3);
}
.foot-base .spacer { flex: 1; }
.term-hint { background: none; border: 0; padding: 0; color: var(--n-text-3); font: inherit; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.term-hint:hover { color: var(--n-text); }
.term-hint svg { width: 16px; height: 16px; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  background: var(--n-raised);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 0 0 1px var(--n-line);
  color: var(--n-text);
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- terminal easter egg ---------- */

.term {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(560px, calc(100vw - 32px));
  border-radius: 14px;
  background: var(--n-bg);
  color: var(--n-text);
  box-shadow: 0 24px 60px -16px rgba(6, 23, 25, 0.55), 0 0 0 1px var(--n-line);
  font: 400 13px/20px var(--mono);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease), visibility 0s linear var(--mid);
}
.term.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease); }
.term .window-bar { height: 40px; }
.term .close { margin-left: auto; background: none; border: 0; color: var(--n-text-3); cursor: pointer; font: inherit; padding: 4px; }
.term .close:hover { color: var(--n-text); }
.term-out { height: 260px; overflow-y: auto; padding: 12px 16px; white-space: pre-wrap; color: var(--n-text-2); }
.term-out .in { color: var(--n-text); }
.term-out .g { color: var(--green); }
.term-out .y { color: var(--lemon); }
.term-line { display: flex; gap: 8px; padding: 0 16px 14px; }
.term-line span { color: var(--green); }
.term-line input { flex: 1; background: none; border: 0; outline: none; color: var(--n-text); font: inherit; caret-color: var(--green); }
@media (max-width: 560px) { .term { right: 16px; bottom: 16px; } }

/* ---------- 404 ---------- */
.nf { min-height: 60vh; display: flex; align-items: center; }
.nf .h-display span { color: var(--green-ink); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* Policy register and printable documents */
.policy-page { max-width: 840px; }
.policy-page > .lede { margin-top: 20px; }
.policy-back { margin-bottom: 24px; }
.policy-page > .lede { margin-bottom: 24px; }
.policy-prose { margin-top: 24px; }
.policy-register { list-style: none; padding: 0; }
.policy-register li { padding: 22px 0; border-top: 1px solid var(--line); }
.policy-register h2 { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.policy-register p, .policy-prose { color: var(--text-2); line-height: 1.7; }
.policy-prose h2 {
  margin: 36px 0 12px;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.28;
  color: var(--text);
}
.policy-prose h2[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
.policy-prose h3 {
  margin: 24px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--text);
}
.policy-toc {
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
}
.policy-toc h2 { margin-top: 0; }
.policy-toc li { break-inside: avoid; }
.policy-prose p + p { margin-top: 14px; }
.policy-prose :is(ul, ol) { padding-inline-start: 1.6em; margin: 12px 0; }
.policy-prose ul { list-style: disc; }
.policy-prose ol { list-style: decimal; }
.policy-prose ol[type="a"] { list-style: lower-alpha; }
.policy-prose li + li { margin-top: 8px; }
.policy-prose a { color: var(--green-ink); text-decoration: underline; text-underline-offset: 0.18em; }
.policy-risks dt { margin-top: 18px; font-weight: 600; color: var(--text); }
.policy-risks dd { margin: 4px 0 0; }
.policy-page { overflow-wrap: anywhere; }
.form-notice { margin-bottom: 16px; font-size: 15px; line-height: 1.55; }
.form button:disabled { opacity: 0.65; cursor: default; }

@media print {
  body:has(.policy-page) { background: white; color: black; }
  body:has(.policy-page) :is(.site-header, .site-footer, .skip, .term, .policy-back) { display: none; }
  body:has(.policy-page) main > .section { padding: 0; }
  .policy-page { width: 100%; max-width: none; }
  .policy-page .h-page { font-size: 26pt; }
  .policy-prose, .policy-register p { color: black; }
  .policy-prose :is(h2, h3), .policy-risks dt { break-after: avoid; }
  .policy-prose p, .policy-prose li { orphans: 3; widows: 3; }
}
