/* etchling — landing page styles
   Colors come from chip layout layers: green diffusion, red polysilicon,
   blue and amber metal. Yellow is the light inside a chip factory. */

@font-face { font-family: "Jersey 15"; font-weight: 400; font-display: swap; src: url(/static/fonts/jersey-15-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Silkscreen"; font-weight: 400; font-display: swap; src: url(/static/fonts/silkscreen-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;

  --bg: #0b0c10;
  --bg-2: #111319;
  --bg-3: #181b24;
  --line: #232835;
  --line-2: #323847;
  --text: #eceef3;
  --text-2: #c3c8d4;
  --muted: #9aa1b2;
  --dim: #646c7e;

  /* layout layers */
  --diff: #2fd47a;
  --poly: #ff5263;
  --m1: #4a8dff;
  --m2: #ffae3d;
  --via: #e9ecf2;
  --fab: #ffd83d;
  --fab-deep: #c79d00;

  --ink: #15161a;
  --paper: #f2efe6;

  --font-display: "Jersey 15", ui-monospace, monospace;
  --font-label: "Silkscreen", ui-monospace, monospace;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gutter: 24px;
  --notch: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.3px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--fab); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--fab); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- shared bits ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c, var(--muted));
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 12px;
  height: 12px;
  background: repeating-linear-gradient(45deg, var(--c, var(--muted)) 0 2px, transparent 2px 4px);
  box-shadow: inset 0 0 0 2px var(--c, var(--muted));
}
.kicker-diff { --c: var(--diff); }
.kicker-poly { --c: var(--poly); }
.kicker-m1 { --c: var(--m1); }
.kicker-ink { --c: var(--ink); }

.section { padding: 128px 0 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 820px;
  text-wrap: balance;
}

.section-lead {
  margin-top: 20px;
  max-width: 38em;
  font-size: 19px;
  color: var(--text-2);
  text-wrap: pretty;
}

.btn {
  --shade: rgba(0, 0, 0, 0.24);
  --light: rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px 15px;
  font-family: var(--font-label);
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  clip-path: var(--notch);
  transition: transform 80ms steps(2), filter 120ms;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px currentColor; }

.btn-fab {
  background: var(--fab);
  color: var(--ink);
  box-shadow: inset -4px -4px 0 var(--shade), inset 4px 4px 0 var(--light);
}
.btn-fab:active { box-shadow: inset 4px 4px 0 var(--shade); }

.btn-ghost {
  background: var(--bg-3);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--line-2), inset -4px -4px 0 rgba(0, 0, 0, 0.35);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--text), inset -4px -4px 0 rgba(0, 0, 0, 0.35); }

.btn-small { padding: 11px 14px 10px; font-size: 12px; }
.btn-big { padding: 22px 30px 21px; font-size: 18px; }

.btn-play {
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.btn-start { font-size: 0.8em; }

/* ---------- pixel sprites ---------- */

.mascot .px-outline { fill: #8b93a8; }
.mascot .px-body { fill: #232734; }
.mascot .px-legs { fill: #c7cdd9; }
.mascot .px-eyes { fill: var(--fab); animation: blink 6s infinite; transform-box: fill-box; transform-origin: center; }
.mascot .px-mouth { fill: #8b93a8; }

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.15); }
}

.icon .px-main { fill: var(--c); }
.icon .px-lit { fill: var(--text); }
.icon .px-hot { fill: var(--fab); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 16, 0.94);
  border-bottom: 2px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 34px; height: auto; }
.logo-word { font-family: var(--font-display); font-weight: 400; font-size: 32px; letter-spacing: 0.01em; line-height: 1; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  font-family: var(--font-label);
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }

.nav-cta-short { display: none; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 380px) {
  .nav-inner { gap: 12px; }
  .nav-cta-long { display: none; }
  .nav-cta-short { display: inline; }
}

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

.hero { padding: 72px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--diff);
  margin-bottom: 28px;
}
.tag-dot { width: 10px; height: 10px; background: var(--diff); animation: cursor 1.1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(58px, 6.8vw, 96px);
  line-height: 0.9;
  letter-spacing: 0;
}
.hero-title span { display: block; }
.hero-title-2 { color: var(--fab); }

.hero-lead {
  margin-top: 28px;
  max-width: 33em;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 32px;
  font-family: var(--font-label);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; background: var(--dim); }

.hero-art { padding: 8px 7%; }

@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { max-width: 560px; width: 100%; margin-inline: auto; padding: 12px 11% 0; }
}

/* ---------- the chip ---------- */

.chip { position: relative; width: 100%; aspect-ratio: 1; }
.chip-svg { width: 100%; height: 100%; }

.pkg-pins rect { fill: #aab2c0; }
.pkg-fingers rect { fill: #d6a94c; }
.pkg-body { fill: #1b1e27; stroke: #2e3340; stroke-width: 0.6; }
.pkg-cavity { fill: #0d0f14; }
.pkg-dot { fill: #3a4050; }

.die-bg { fill: #121620; }
.L-ring { fill: #454d60; }
.L-diff { fill: var(--diff); opacity: 0.62; }
.L-poly { fill: var(--poly); opacity: 0.8; }
.L-m1 { fill: var(--m1); opacity: 0.82; }
.L-m2 { fill: var(--m2); opacity: 0.92; }
.L-via { fill: var(--via); }
.L-pad { fill: #c9ced8; }
.art-line { fill: var(--m2); }
.art-eyes { fill: var(--fab); animation: blink 5s 4s infinite; transform-box: fill-box; transform-origin: center; }

.bond-wires line { stroke: #e0bb6a; stroke-width: 0.32; opacity: 0.85; }

/* Etch the die layer by layer, like a fab does. */
.L { animation: etch 0.5s steps(12) both; animation-delay: calc(0.3s + var(--i) * 0.5s); }
@keyframes etch {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

.scanline {
  fill: var(--fab);
  opacity: 0;
  animation: scan 0.5s steps(12) 0.3s 5 both;
}
@keyframes scan {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(64px); opacity: 1; }
}
.scanline { animation-fill-mode: backwards; }

.pulse {
  fill: #fff;
  opacity: 0;
  animation: pulse var(--dur) linear infinite;
  animation-delay: calc(3s + var(--delay));
}
@keyframes pulse {
  0% { transform: translateX(0); opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { transform: translateX(var(--len)); opacity: 0; }
}

.callout {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: fade-in 0.4s steps(4) 2.8s backwards;
}
@keyframes fade-in { from { opacity: 0; } }

.callout-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--bg);
}
.callout-line { position: absolute; top: var(--y); height: 1px; background: rgba(236, 238, 243, 0.75); }
.callout-left .callout-line { left: -8%; width: calc(var(--x) + 8%); }
.callout-right .callout-line { left: var(--x); right: -8%; }
.callout-label {
  position: absolute;
  top: var(--y);
  transform: translateY(-100%);
  margin-top: -6px;
  padding: 4px 7px 3px;
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background: var(--text);
}
.callout-left .callout-label { left: -8%; }
.callout-right .callout-label { right: -8%; }

@media (max-width: 480px) {
  .callout-label { font-size: 10px; }
}

/* ---------- what: the datasheet ---------- */

.sheet {
  --ink-2: #4a4c55;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 36px 48px 28px;
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.45);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 4px solid var(--ink);
}
.sheet-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; }
.sheet-mark { width: 32px; }
.sheet-mark .px-outline, .sheet-mark .px-mouth { fill: var(--ink); }
.sheet-part { display: flex; align-items: center; gap: 16px; }
.sheet-part-no { font-family: var(--font-mono); font-weight: 500; font-size: 15px; letter-spacing: 0.04em; }
.sheet-stamp {
  font-family: var(--font-label);
  font-size: 12px;
  text-transform: uppercase;
  color: #c8283a;
  border: 2px solid #c8283a;
  padding: 5px 8px 4px;
  transform: rotate(-4deg);
}

.sheet-title {
  margin-top: 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px 56px;
}
.sheet-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sheet-h span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
}
.sheet-p { font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.sheet-p + .sheet-p { margin-top: 14px; }

.sheet-list li { position: relative; padding-left: 22px; font-size: 16.5px; line-height: 1.5; }
.sheet-list li + li { margin-top: 8px; }
.sheet-list li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; background: var(--ink); }

.sheet-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 14px; }
.sheet-table th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 8px 12px 8px 0; }
.sheet-table td { text-align: right; font-weight: 500; padding: 8px 0; }
.sheet-table tr { border-bottom: 1px dashed #b9b5a8; }

.sheet-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .sheet { padding: 24px 20px 20px; box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45); }
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-p { font-size: 17px; }
  .sheet-foot { flex-direction: column; }
}
@media (max-width: 420px) {
  .sheet-part-no { display: none; }
}

/* ---------- how: world map ---------- */

.worlds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 72px;
}
.worlds::before {
  content: "";
  position: absolute;
  top: 42px;
  left: 44px;
  right: calc((100% - 5 * 20px) / 6 - 44px);
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 16px);
}

.world { --c: var(--muted); position: relative; }
.world-diff { --c: var(--diff); }
.world-poly { --c: var(--poly); }
.world-m1 { --c: var(--m1); }
.world-m2 { --c: var(--m2); }
.world-via { --c: var(--via); }
.world-fab { --c: var(--fab); }

.world-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  background: var(--bg-3);
  box-shadow: inset 0 0 0 3px var(--c), inset -7px -7px 0 rgba(0, 0, 0, 0.35);
  clip-path: var(--notch);
}
.world-icon { width: 44px; height: 44px; }
.world-player {
  position: absolute;
  z-index: 1;
  width: 40px;
  left: 24px;
  top: -34px;
  animation: hop 1.2s steps(2) infinite;
}
@keyframes hop { 50% { transform: translateY(-4px); } }

.world-fab .world-tile { background: var(--fab); box-shadow: inset -7px -7px 0 rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(255, 216, 61, 0.14); }
.world-fab .icon .px-main { fill: var(--ink); }
.world-fab .icon .px-lit { fill: rgba(21, 22, 26, 0.55); }
.world-fab .icon .px-hot { fill: var(--poly); }

.world-id {
  margin-top: 20px;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--c);
}
.world-name { margin-top: 4px; font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1; }
.world-body { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }

@media (max-width: 1040px) {
  .worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; }
  .worlds::before { display: none; }
}
@media (max-width: 640px) {
  .worlds { grid-template-columns: 1fr; row-gap: 28px; margin-top: 64px; }
  .worlds::before {
    display: block;
    top: 44px;
    bottom: 44px;
    left: 34px;
    right: auto;
    width: 4px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--line-2) 0 8px, transparent 8px 16px);
  }
  .world { display: grid; grid-template-columns: 72px 1fr; column-gap: 18px; }
  .world-tile { width: 72px; height: 72px; grid-row: span 3; }
  .world-icon { width: 38px; height: 38px; }
  .world-player { width: 34px; left: 19px; top: -30px; }
  .world-id { margin-top: 2px; }
  .world-name { font-size: 28px; }
}

/* ---------- how: the playable level ---------- */

.demo { margin-top: 136px; }
.demo-head { margin-bottom: 36px; }

.console {
  position: relative;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 2px var(--line-2), 14px 14px 0 rgba(0, 0, 0, 0.45);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--line-2);
  font-family: var(--font-label);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}
.console-level { background: var(--m1); color: var(--ink); padding: 5px 8px 4px; line-height: 1; }
.console-progress { margin-left: auto; color: var(--text); }
.console-sound {
  background: none;
  border: 2px solid var(--line-2);
  padding: 5px 8px 4px;
  font-family: var(--font-label);
  font-size: 11px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.console-sound:hover { color: var(--text); border-color: var(--muted); }

.console-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }

.board { padding: 20px 20px 16px; border-right: 2px solid var(--line-2); }
.board-svg { width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.board-dot { fill: rgba(255, 255, 255, 0.07); }

.wire { fill: none; stroke: #2a3142; stroke-width: 8; stroke-linecap: square; stroke-linejoin: miter; transition: stroke 120ms steps(2); }
.wire-halo { fill: none; stroke: var(--bg-2); stroke-width: 20; stroke-linecap: butt; }
.wire-flow { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2; stroke-dasharray: 4 12; opacity: 0; }
.via { fill: #2a3142; }

.net[data-on] .wire { stroke: var(--fab); }
.net[data-on] .wire-flow { opacity: 1; animation: flow 0.5s linear infinite; }
.net[data-on] .via { fill: #fff; }
@keyframes flow { to { stroke-dashoffset: -16; } }

.crossing { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 3; }

.gate { fill: var(--bg-3); stroke: var(--text); stroke-width: 3; stroke-linejoin: miter; }
.gate-back { fill: none; stroke: var(--text); stroke-width: 3; }
.gate-label { font-family: var(--font-label); font-size: 12px; fill: var(--muted); text-anchor: middle; }

.switch { cursor: pointer; }
.switch-label { font-family: var(--font-display); font-weight: 400; font-size: 30px; fill: var(--text); text-anchor: middle; }
.switch-body { fill: var(--bg-3); stroke: var(--line-2); stroke-width: 3; transition: stroke 120ms steps(2); }
.switch-knob { fill: var(--dim); transition: transform 120ms steps(3), fill 120ms steps(2); }
.switch:hover .switch-body { stroke: var(--muted); }
.switch[data-on] .switch-body { stroke: var(--fab); }
.switch[data-on] .switch-knob { fill: var(--fab); transform: translateX(24px); }

.led-glow { fill: var(--fab); opacity: 0; filter: blur(12px); transition: opacity 150ms; }
.led-body { fill: #1f2430; stroke: var(--line-2); stroke-width: 3; }
.led-bit { font-family: var(--font-display); font-weight: 400; font-size: 30px; fill: var(--dim); text-anchor: middle; }
.led-label { font-family: var(--font-label); font-size: 13px; fill: var(--text); }
.led[data-on] .led-glow { opacity: 0.5; }
.led[data-on] .led-body { fill: var(--fab); stroke: #fff1a8; }
.led[data-on] .led-bit { fill: var(--ink); }

.board-note { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.board-note-mark { flex: none; width: 16px; height: 16px; border: 1.5px dashed var(--muted); }

.panel { display: flex; flex-direction: column; gap: 22px; padding: 22px; }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 96px;
  background: var(--bg-3);
  border: 0;
  cursor: pointer;
  clip-path: var(--notch);
  box-shadow: inset 0 0 0 2px var(--line-2), inset -6px -6px 0 rgba(0, 0, 0, 0.4);
  transition: transform 80ms steps(2);
}
.key:hover { box-shadow: inset 0 0 0 2px var(--muted), inset -6px -6px 0 rgba(0, 0, 0, 0.4); }
.key:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--muted), inset 6px 6px 0 rgba(0, 0, 0, 0.4); }
.key-cap { font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 1; }
.key-state { font-family: var(--font-label); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.key[aria-pressed="true"] {
  background: var(--fab);
  color: var(--ink);
  box-shadow: inset -6px -6px 0 rgba(0, 0, 0, 0.22), inset 6px 6px 0 rgba(255, 255, 255, 0.35);
}
.key[aria-pressed="true"] .key-state { color: var(--ink); }
.key:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--text); }

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
}
.readout-op { color: var(--dim); }
.readout-result { color: var(--fab); letter-spacing: 0.04em; }
.readout-dec {
  flex-basis: 100%;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.truth { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 15px; text-align: center; }
.truth caption { caption-side: top; text-align: left; font-family: var(--font-label); font-size: 11px; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.truth th { font-family: var(--font-label); font-weight: 400; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 2px solid var(--line-2); }
.truth td { padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.truth td[data-reveal] { color: var(--dim); }
.truth tr[data-found] td[data-reveal] { color: var(--fab); }
.truth tr[data-current] td { background: var(--bg-3); }
.truth tr[data-current] td:first-child { box-shadow: inset 3px 0 0 var(--fab); }

.clear {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--fab);
  color: var(--ink);
  animation: pop 0.3s steps(3) both;
}
.clear[hidden] { display: none; }
.clear-mascot { flex: none; width: 56px; animation: hop 0.6s steps(2) infinite; }
.clear-mascot .px-outline, .clear-mascot .px-mouth { fill: var(--ink); }
.clear-mascot .px-eyes { fill: #fff; }
.clear-title { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; }
.clear-body { font-size: 16px; }
.clear .btn { margin-left: auto; }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }

@media (max-width: 900px) {
  .console-body { grid-template-columns: 1fr; }
  .board { border-right: 0; border-bottom: 2px solid var(--line-2); padding: 12px 12px 14px; }
  .console-goal { display: none; }
  .clear { flex-wrap: wrap; }
  .clear .btn { margin-left: 0; }
}
@media (max-width: 600px) {
  .console { box-shadow: inset 0 0 0 2px var(--line-2), 8px 8px 0 rgba(0, 0, 0, 0.45); }
  .panel { padding: 16px; }
  .key { height: 80px; }
  .readout { font-size: 46px; }
}

/* ---------- how: the fab ---------- */

.fab {
  position: relative;
  margin-top: 144px;
  padding: 104px 0 112px;
  background-color: var(--fab);
  background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 2px, transparent 2px 10px);
  color: var(--ink);
}
.fab::before, .fab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: conic-gradient(var(--fab) 25%, transparent 0 50%, var(--fab) 0 75%, transparent 0) 0 0 / 16px 16px;
}
.fab::before { top: -8px; }
.fab::after { bottom: -8px; transform: scaleY(-1); }

.fab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.fab-p { margin-top: 18px; max-width: 34em; font-size: 19px; line-height: 1.6; }
.fab-copy .section-title { max-width: 560px; }
.tip {
  margin-top: 32px;
  max-width: 34em;
  padding: 14px 16px;
  border: 2px dashed rgba(21, 22, 26, 0.55);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

.wafer { width: 100%; max-width: 460px; margin-inline: auto; }
.wafer-disc { fill: #15171d; }
.w-die { fill: #262a35; }
.w-mem { fill: rgba(74, 141, 255, 0.55); }
.w-line { fill: rgba(233, 236, 242, 0.3); }
.w-yours { fill: var(--fab); }
.w-mascot .px-outline, .w-mascot .px-body, .w-mascot .px-legs, .w-mascot .px-mouth { fill: var(--ink); }
.w-mascot .px-eyes { fill: var(--fab); }
.w-yours-ring { fill: none; stroke: var(--fab); stroke-width: 0.9; stroke-dasharray: 1.6 1.2; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -5.6; } }
.w-flag rect { fill: var(--ink); }
.w-flag text { font-family: var(--font-label); font-size: 5px; fill: var(--fab); text-anchor: middle; text-transform: uppercase; }

@media (max-width: 860px) {
  .fab { margin-top: 112px; padding: 80px 0 88px; }
  .fab-grid { grid-template-columns: 1fr; gap: 40px; }
  .wafer { max-width: 360px; }
}

/* ---------- why ---------- */

.why-title { max-width: 1000px; }
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  margin-top: 56px;
  align-items: start;
}

.stat {
  padding: 32px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 2px var(--line-2), 14px 14px 0 rgba(0, 0, 0, 0.45);
}
.stat-value {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(64px, 8vw, 104px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label { margin-top: 10px; font-size: 20px; color: var(--text); max-width: 20em; }

.bar { display: flex; gap: 2px; height: 32px; margin-top: 32px; }
.bar-seg { display: block; height: 100%; }
.bar-filled { background: #3a4152; }
.bar-unfilled { background: repeating-linear-gradient(135deg, var(--poly) 0 6px, #e0424f 6px 12px); }

.bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.bar-key { display: flex; align-items: center; gap: 8px; }
.bar-key b { color: var(--text); font-weight: 600; }
.bar-key::before { content: ""; flex: none; width: 10px; height: 10px; }
.bar-key-filled::before { background: #3a4152; }
.bar-key-unfilled { text-align: right; }
.bar-key-unfilled::before { background: var(--poly); }

.stat-caption { margin-top: 24px; font-size: 14px; color: var(--muted); }
.stat-caption a { color: var(--text-2); text-underline-offset: 3px; }

.points { display: grid; gap: 36px; counter-reset: point; }
.point { --c: var(--diff); position: relative; padding-left: 64px; }
.point:nth-child(2) { --c: var(--m1); }
.point:nth-child(3) { --c: var(--fab); }
.point::before {
  counter-increment: point;
  content: "0" counter(point);
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-label);
  font-size: 14px;
  color: var(--c);
  box-shadow: inset 0 0 0 2px var(--c);
}
.point-title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; }
.point-body { margin-top: 8px; color: var(--text-2); text-wrap: pretty; }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 600px) {
  .stat { padding: 22px; box-shadow: inset 0 0 0 2px var(--line-2), 8px 8px 0 rgba(0, 0, 0, 0.45); }
  .bar-legend { flex-direction: column; gap: 6px; }
  .point { padding-left: 56px; }
  .point-title { font-size: 28px; }
}

/* ---------- call to action ---------- */

.cta { padding-bottom: 128px; }
.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  padding: 56px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 2px var(--line-2);
}
.cta-main .btn { margin-top: 32px; }
.cta-side { padding-left: 40px; border-left: 2px dashed var(--line-2); align-self: center; color: var(--text-2); }
.cta-side-title { font-family: var(--font-label); font-weight: 400; font-size: 13px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.cta-mail { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-weight: 500; font-size: 18px; color: var(--fab); text-underline-offset: 4px; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .cta-box { grid-template-columns: 1fr; padding: 32px 22px; gap: 32px; }
  .cta-side { padding-left: 0; padding-top: 28px; border-left: 0; border-top: 2px dashed var(--line-2); }
  .btn-big { font-size: 16px; padding: 20px 22px 19px; }
}

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

.footer-track { position: relative; height: 56px; overflow: hidden; border-bottom: 4px solid var(--line-2); }
.walker { position: absolute; bottom: 0; left: 0; animation: walk 28s linear infinite; }
.walker-sprite { width: 44px; animation: hop 0.5s steps(2) infinite; }
@keyframes walk {
  from { transform: translateX(-60px); }
  to { transform: translateX(100vw); }
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 24px 0 40px;
  font-family: var(--font-label);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-logo { font-family: var(--font-display); font-weight: 400; font-size: 26px; text-transform: none; color: var(--muted); }
.footer-copy { margin-left: auto; }

/* ---------- 404 ---------- */

.lost-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: min(640px, 100% - 2 * var(--gutter));
  margin: 18vh auto 0;
}
.lost-mascot { width: 96px; margin-bottom: 24px; animation: hop 1.2s steps(2) infinite; }
.lost-main .btn { margin-top: 28px; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pulse, .scanline { display: none; }
}

/* ---------- social card (scripts/og.ts) ---------- */

.og { width: 1200px; height: 630px; overflow: hidden; }
.og *, .og *::before, .og *::after { animation: none !important; }
.og .callout, .og .pulse, .og .scanline { display: none; }
.og-card { display: grid; grid-template-columns: 1fr 470px; align-items: center; gap: 24px; height: 100%; padding: 0 64px 0 80px; }
.og .logo-mark { width: 44px; }
.og .logo-word { font-size: 44px; }
.og .hero-title { margin-top: 56px; font-size: 104px; }
.og .tag { margin: 48px 0 0; font-size: 18px; }
.og .tag-dot { width: 14px; height: 14px; }
