:root {
  --starch: #e8d9c0;
  --yarn: #f4eee4;
  --cylinder: #8b5a32;
  --ink: #2a1e14;
  --mute: #6a5848;
  --steam: #c45c28;
  --deep: #3a2a1c;
  --line: rgba(42, 30, 20, 0.16);
  --shadow: 0 16px 34px rgba(42, 30, 20, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--yarn);
  font-family: "Noto Sans SC", sans-serif;
  line-height: 1.65;
}
.starch {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0.14;
  background-image: url("images/texture.webp");
  background-size: 420px auto;
  mix-blend-mode: multiply;
}
.warp {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 20;
  background: repeating-linear-gradient(
    180deg,
    var(--starch) 0 3px,
    var(--cylinder) 3px 4px,
    transparent 4px 7px
  );
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 18px; top: 48px; z-index: 80; background: #fff; padding: 8px; }
.steam {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 46;
  margin: 0;
  background: var(--cylinder);
  color: var(--starch);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-align: center;
  padding: 7px 16px 7px 24px;
}
.nav {
  position: fixed;
  top: 34px; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px 10px 28px;
  background: rgba(244, 238, 228, 0.94);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; font-weight: 700;
}
.brand small {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 400; color: var(--mute); letter-spacing: 0.12em;
}
.beam-mark {
  width: 32px; height: 18px;
  border-radius: 9px 9px 2px 2px;
  background: repeating-linear-gradient(90deg, var(--starch) 0 3px, var(--deep) 3px 4px);
  box-shadow: 0 6px 0 var(--cylinder);
}
.nav-toggle { display: none; background: transparent; border: 1px solid var(--ink); padding: 6px 12px; }
.nav-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-links a.is-active { color: var(--steam); }
.nav-links .live, .live {
  border: 1px solid var(--steam); padding: 4px 10px; color: var(--steam); text-decoration: none;
}
h1, h2, h3 { margin: 0 0 0.4em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(42,30,20,0.82) 0%, rgba(42,30,20,0.28) 70%);
}
.hero-copy { position: relative; z-index: 1; color: var(--yarn); padding: 22vh 7vw 10vh 48px; max-width: 780px; }
.kicker, .vlabel {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.14em; color: #e8b48a; font-size: 12px;
}
.axles { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.axles span {
  font-family: "IBM Plex Mono", monospace; font-size: 12px;
  border: 1px solid rgba(232, 217, 192, 0.55); padding: 4px 8px;
}
.axles .bad { border-color: #ffb4ac; color: #ffb4ac; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; text-decoration: none;
  border: 1px solid currentColor; padding: 10px 16px; font: inherit; cursor: pointer;
  background: transparent; color: inherit;
}
.btn-fill { background: var(--steam); color: #fff; border-color: var(--steam); }
.wrap { width: min(1100px, calc(100% - 64px)); margin: 0 auto; padding: 72px 0; }
.section-head { display: grid; grid-template-columns: 160px 1fr; gap: 24px; margin-bottom: 32px; }
.alt { background: linear-gradient(180deg, #efe4d2 0%, var(--yarn) 100%); }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tri article, .cells li, .io article {
  background: #fff8ee; border: 1px solid var(--line); padding: 20px; box-shadow: var(--shadow);
}
.tag {
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 11px;
  background: var(--cylinder); color: var(--starch); padding: 2px 8px; margin-bottom: 8px;
}
.tri ul, .rules, .io ul, .bench ul { padding-left: 1.1em; margin: 0; }
.cells { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cells img { width: calc(100% + 40px); max-width: none; height: 150px; object-fit: cover; display: block; margin: -20px -20px 14px; }
.bench { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 24px; align-items: center; }
.bench img { width: 100%; display: block; border: 8px solid var(--cylinder); }
.size-line {
  font-family: "IBM Plex Mono", monospace;
  background: var(--deep); color: var(--starch); padding: 14px 16px;
}
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
footer { background: var(--deep); color: var(--starch); padding: 28px 0; }
.footer-inner {
  padding: 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  width: min(1100px, calc(100% - 64px)); margin: 0 auto;
}
footer .live { color: #ffd2c4; border-color: #ffd2c4; }
@media (max-width: 960px) {
  .warp { display: none; }
  .hero, .section-head, .tri, .cells, .bench, .io { grid-template-columns: 1fr; }
  .hero { min-height: 100svh; }
  .hero-copy { padding: 130px 20px 48px; }
  .wrap, .footer-inner { width: calc(100% - 32px); }
  .nav { flex-wrap: wrap; padding-left: 16px; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: #fff8ee;
    position: relative; z-index: 60;
  }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 12px 16px; background: #fff8ee; z-index: 55;
  }
  .nav-links.open { display: flex; }
}
