:root {
  color-scheme: dark;
  --black: #050606;
  --black-2: #0b0e0d;
  --paper: #efe7d0;
  --dim: rgba(239, 231, 208, 0.64);
  --faint: rgba(239, 231, 208, 0.14);
  --red: #be3f32;
  --amber: #d8a23c;
  --green: #5faf7d;
  --blue: #6f8fa3;
  --violet: #8f6aa7;
  --accent: #d8a23c;
  --progress-width: 0%;
  --grid-shift: 0px;
  --orbit-rotation: 0deg;
  --chapter-progress: 0;
  font-family:
    "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 162, 60, 0.16), transparent 24rem),
    radial-gradient(circle at 78% 16%, rgba(111, 143, 163, 0.16), transparent 28rem),
    linear-gradient(120deg, rgba(190, 63, 50, 0.15), transparent 32rem),
    linear-gradient(230deg, rgba(95, 175, 125, 0.12), transparent 34rem),
    linear-gradient(135deg, #07110e 0%, #15140d 38%, #111618 72%, #050606 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.21;
  background-image:
    linear-gradient(rgba(239, 231, 208, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 231, 208, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: translateY(var(--grid-shift));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background:
    repeating-linear-gradient(8deg, transparent 0 18px, rgba(239, 231, 208, 0.08) 19px 20px),
    repeating-linear-gradient(96deg, transparent 0 41px, rgba(239, 231, 208, 0.05) 42px 43px);
  mix-blend-mode: screen;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

.wittgenstein-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.wittgenstein-background::before,
.wittgenstein-background::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(239, 231, 208, 0.08);
  opacity: 0.7;
}

.wittgenstein-background::before {
  left: 5vw;
  top: 14vh;
  width: 34vw;
  height: 46vh;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(239, 231, 208, 0.08) 28.4% 28.8%, transparent 29%),
    linear-gradient(180deg, transparent 0 34%, rgba(239, 231, 208, 0.08) 34.4% 34.8%, transparent 35%);
  transform: rotate(-4deg);
}

.wittgenstein-background::after {
  right: 6vw;
  bottom: 8vh;
  width: 28vw;
  height: 28vw;
  max-height: 44vh;
  background:
    radial-gradient(circle at 32% 30%, rgba(216, 162, 60, 0.16), transparent 0.6rem),
    radial-gradient(circle at 67% 34%, rgba(95, 175, 125, 0.16), transparent 0.6rem),
    radial-gradient(circle at 48% 68%, rgba(190, 63, 50, 0.16), transparent 0.6rem);
  transform: rotate(8deg);
}

.wittgenstein-background span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: rgba(239, 231, 208, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4vw, 5rem);
  font-style: italic;
  font-weight: 700;
  transform: rotate(var(--r));
  white-space: nowrap;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 3px;
  background: rgba(239, 231, 208, 0.08);
}

.scroll-progress span {
  display: block;
  width: var(--progress-width);
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green), var(--blue));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 1rem clamp(1rem, 4vw, 3.4rem);
  background: linear-gradient(to bottom, rgba(5, 6, 6, 0.94), rgba(5, 6, 6, 0));
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-size: clamp(0.82rem, 1.1vw, 0.96rem);
  font-weight: 850;
  text-transform: uppercase;
}

.brand-mark {
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(239, 231, 208, 0.46);
  background:
    linear-gradient(90deg, transparent 46%, var(--accent) 47% 53%, transparent 54%),
    linear-gradient(transparent 46%, rgba(239, 231, 208, 0.72) 47% 53%, transparent 54%);
  box-shadow: 0 0 1.2rem rgba(216, 162, 60, 0.18);
}

.nav-links {
  gap: clamp(0.8rem, 2vw, 1.5rem);
  color: rgba(239, 231, 208, 0.72);
  font-size: 0.82rem;
  font-weight: 750;
}

.nav-links a {
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  border-color: currentColor;
  color: var(--paper);
}

.concept-hud {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 40;
  width: min(25rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid rgba(239, 231, 208, 0.16);
  background:
    linear-gradient(135deg, rgba(239, 231, 208, 0.08), rgba(5, 6, 6, 0.2)),
    rgba(5, 6, 6, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.hud-count,
.eyebrow,
.chapter-kicker {
  margin: 0;
  color: var(--accent);
  font-size: clamp(0.72rem, 1.1vw, 0.88rem);
  font-weight: 850;
  text-transform: uppercase;
}

.concept-hud h2 {
  margin: 0.52rem 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.35rem);
  line-height: 1.22;
}

.concept-hud p:last-child {
  margin: 0.54rem 0 0;
  color: rgba(239, 231, 208, 0.68);
  font-size: 0.9rem;
  line-height: 1.55;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.72fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  min-height: 112svh;
  padding: clamp(7rem, 12vh, 9rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vh, 6rem);
}

.hero-copy {
  max-width: 70rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 560;
  letter-spacing: 0;
}

h1 {
  max-width: 14ch;
  margin-top: 1rem;
  font-size: clamp(3rem, 7.8vw, 7.8rem);
  line-height: 1.11;
}

.lede {
  max-width: 46rem;
  margin: 1.7rem 0 0;
  color: rgba(239, 231, 208, 0.77);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.8;
}

.opening-instrument {
  min-height: 39rem;
  padding: clamp(1rem, 2.3vw, 1.4rem);
  border: 1px solid rgba(239, 231, 208, 0.16);
  background:
    linear-gradient(145deg, rgba(239, 231, 208, 0.1), rgba(239, 231, 208, 0.025)),
    linear-gradient(30deg, rgba(216, 162, 60, 0.06), rgba(95, 175, 125, 0.06)),
    rgba(6, 11, 9, 0.74);
  backdrop-filter: blur(16px);
}

.instrument-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(239, 231, 208, 0.68);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.example-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 1rem;
}

.example-tab {
  min-height: 2.5rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid rgba(239, 231, 208, 0.14);
  color: rgba(239, 231, 208, 0.72);
  background: rgba(239, 231, 208, 0.045);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.example-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 231, 208, 0.34);
  color: var(--paper);
}

.example-tab.is-active {
  border-color: var(--accent);
  color: var(--black);
  background: var(--accent);
}

.example-stage {
  display: grid;
  grid-template-rows: auto minmax(13rem, 1fr) auto;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(239, 231, 208, 0.16);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent),
    rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.example-copy {
  display: grid;
  gap: 0.46rem;
}

.example-source,
.example-copy h2,
.example-copy p {
  margin: 0;
}

.example-source {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.example-copy h2 {
  color: var(--paper);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.18;
}

.example-copy p {
  color: rgba(239, 231, 208, 0.72);
  font-size: 0.92rem;
  line-height: 1.62;
}

.example-visual {
  position: relative;
  min-height: 14rem;
  border: 1px solid rgba(239, 231, 208, 0.12);
  background:
    linear-gradient(rgba(239, 231, 208, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 231, 208, 0.04) 1px, transparent 1px),
    rgba(4, 8, 7, 0.52);
  background-size: 26px 26px;
  overflow: hidden;
}

.example-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at var(--stage-x, 40%) var(--stage-y, 45%), rgba(216, 162, 60, 0.18), transparent 35%);
}

.example-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.example-action {
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 0;
  color: var(--black);
  background: var(--paper);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

#exampleHint {
  color: rgba(239, 231, 208, 0.6);
  font-size: 0.82rem;
  line-height: 1.42;
}

.instrument-note {
  margin-top: 1rem;
  color: rgba(239, 231, 208, 0.62);
  font-size: 0.88rem;
  line-height: 1.64;
}

.shape,
.apple,
.box-card,
.series-number,
.trait-pill,
.diary-token,
.beetle-box {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(239, 231, 208, 0.18);
  color: rgba(239, 231, 208, 0.8);
  background: rgba(239, 231, 208, 0.07);
  font-weight: 900;
}

.shape {
  width: 4rem;
  height: 3rem;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) translateY(var(--lift, 0px));
  transition:
    transform 260ms ease,
    background 260ms ease,
    color 260ms ease;
}

.shape.is-called,
.apple.is-picked,
.series-number.is-lit,
.diary-token.is-lit,
.beetle-box.is-open {
  color: var(--black);
  background: var(--accent);
}

.call-line {
  position: absolute;
  left: 7%;
  top: 11%;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(239, 231, 208, 0.18);
  color: var(--accent);
  background: rgba(0, 0, 0, 0.34);
  font-size: 0.86rem;
  font-weight: 850;
}

.apple {
  width: 2.1rem;
  height: 2.1rem;
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  transition: background 240ms ease;
}

.slip {
  position: absolute;
  left: 8%;
  bottom: 9%;
  padding: 0.7rem;
  color: var(--black);
  background: rgba(239, 231, 208, 0.88);
  font-family: Georgia, serif;
  font-weight: 900;
}

.box-card {
  width: 5.2rem;
  height: 4rem;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  white-space: pre-line;
}

.series-number {
  width: 3.5rem;
  height: 3.5rem;
  left: var(--x);
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.trait-pill {
  left: var(--x);
  top: var(--y);
  padding: 0.45rem 0.6rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.diary-token {
  width: 3rem;
  height: 3.8rem;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  font-family: Georgia, serif;
}

.beetle-box {
  width: 4.8rem;
  height: 4.4rem;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
}

.beetle-box span {
  opacity: 0;
  transition: opacity 180ms ease;
}

.beetle-box.is-open span {
  opacity: 1;
}

.public-use {
  position: absolute;
  right: 6%;
  bottom: 8%;
  max-width: 58%;
  color: rgba(239, 231, 208, 0.72);
  font-size: 0.8rem;
  line-height: 1.5;
}

.thesis-strip {
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 5rem);
  border-block: 1px solid rgba(239, 231, 208, 0.15);
  background: rgba(5, 6, 6, 0.72);
}

.thesis-strip p {
  max-width: 78rem;
  margin: 0;
  color: rgba(239, 231, 208, 0.86);
  font-size: clamp(1.3rem, 3vw, 3rem);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  line-height: 1.42;
}

.chapter {
  min-height: 160svh;
  padding: clamp(5rem, 12vh, 8rem) clamp(1rem, 5vw, 5rem);
  border-bottom: 1px solid rgba(239, 231, 208, 0.1);
}

.chapter-inner {
  position: sticky;
  top: clamp(5rem, 10vh, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 1fr);
  gap: clamp(1.6rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 8rem);
}

.chapter-copy {
  max-width: 43rem;
}

.chapter-copy h2 {
  max-width: 13ch;
  margin-top: 0.85rem;
  font-size: clamp(2.7rem, 6.4vw, 7rem);
  line-height: 0.98;
}

.chapter-copy p:not(.chapter-kicker) {
  margin: 1.4rem 0 0;
  color: rgba(239, 231, 208, 0.75);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.85;
}

.chapter-copy cite {
  display: block;
  margin-top: 1rem;
  color: rgba(239, 231, 208, 0.56);
  font-size: 0.85rem;
  font-style: normal;
  line-height: 1.6;
}

.practice-board,
.use-switcher,
.family-lab,
.rule-machine,
.diary-machine,
.form-grid,
.closing-panel {
  border: 1px solid rgba(239, 231, 208, 0.16);
  background:
    linear-gradient(135deg, rgba(239, 231, 208, 0.075), rgba(239, 231, 208, 0.018)),
    rgba(6, 8, 7, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.3);
}

.practice-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background-color: rgba(239, 231, 208, 0.12);
}

.practice-cell {
  min-height: 10.8rem;
  padding: 1rem;
  background: rgba(6, 8, 7, 0.86);
  transition:
    background 280ms ease,
    transform 280ms ease;
}

.practice-cell.is-hot {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, transparent), transparent),
    rgba(6, 8, 7, 0.9);
  transform: translateY(-4px);
}

.practice-cell b {
  display: block;
  color: var(--accent);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 560;
}

.practice-cell span {
  display: block;
  margin-top: 0.9rem;
  color: rgba(239, 231, 208, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.use-switcher {
  padding: 1rem;
}

.use-word {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 10rem;
  border-bottom: 1px solid rgba(239, 231, 208, 0.14);
}

.use-word span {
  color: rgba(239, 231, 208, 0.55);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.use-word strong {
  color: var(--accent);
  font-size: clamp(4rem, 11vw, 9rem);
  font-family: Georgia, serif;
  font-weight: 520;
  line-height: 0.86;
}

.use-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1rem 0 0;
  padding: 0;
  background: rgba(239, 231, 208, 0.1);
  list-style: none;
}

.use-list li {
  min-height: 8.4rem;
  padding: 1rem;
  background: rgba(6, 8, 7, 0.9);
}

.use-list small {
  display: block;
  color: var(--accent);
  font-weight: 850;
  text-transform: uppercase;
}

.use-list p {
  margin: 0.8rem 0 0;
  color: rgba(239, 231, 208, 0.78);
  line-height: 1.62;
}

.family-lab {
  display: grid;
  grid-template-rows: minmax(20rem, 1fr) auto;
  min-height: 34rem;
  overflow: hidden;
}

.family-map {
  position: relative;
  min-height: 22rem;
}

.family-node {
  position: absolute;
  display: grid;
  width: clamp(4.3rem, 8vw, 6.4rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(239, 231, 208, 0.2);
  border-radius: 50%;
  color: var(--black);
  background: var(--paper);
  font-weight: 900;
  transform:
    translate(-50%, -50%)
    translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform 140ms linear;
}

.family-node.is-core {
  color: var(--paper);
  background: var(--accent);
}

.trait-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1rem;
  border-top: 1px solid rgba(239, 231, 208, 0.14);
}

.trait-ledger span {
  padding: 0.5rem 0.68rem;
  border: 1px solid rgba(239, 231, 208, 0.14);
  color: rgba(239, 231, 208, 0.76);
  background: rgba(239, 231, 208, 0.05);
  font-size: 0.86rem;
}

.trait-ledger span.is-lit {
  border-color: color-mix(in srgb, var(--accent) 70%, white 8%);
  color: var(--paper);
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.rule-machine {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.rule-readout {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(239, 231, 208, 0.14);
}

.rule-readout span {
  color: rgba(239, 231, 208, 0.62);
  font-size: 0.86rem;
  font-weight: 800;
}

.rule-readout strong {
  color: var(--accent);
  font-size: clamp(3rem, 7vw, 6rem);
  font-family: Georgia, serif;
  font-weight: 520;
  line-height: 0.9;
}

.rule-track {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.45rem;
}

.rule-cell {
  display: grid;
  min-height: 4.4rem;
  place-items: center;
  border: 1px solid rgba(239, 231, 208, 0.14);
  color: rgba(239, 231, 208, 0.54);
  background: rgba(0, 0, 0, 0.18);
  font-weight: 850;
  transition:
    background 240ms ease,
    color 240ms ease,
    transform 240ms ease;
}

.rule-cell.is-active {
  color: var(--black);
  background: var(--accent);
  transform: translateY(-6px);
}

.diary-machine {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.diary-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.diary-mark {
  display: grid;
  min-height: 6rem;
  place-items: center;
  border: 1px solid rgba(239, 231, 208, 0.14);
  color: rgba(239, 231, 208, 0.5);
  background: rgba(0, 0, 0, 0.2);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-family: Georgia, serif;
  transition:
    border-color 260ms ease,
    color 260ms ease,
    transform 260ms ease;
}

.diary-mark.is-public {
  border-color: var(--accent);
  color: var(--paper);
  transform: rotate(-2deg) translateY(-5px);
}

.diary-machine p {
  margin: 0;
  color: rgba(239, 231, 208, 0.72);
  line-height: 1.75;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background-color: rgba(239, 231, 208, 0.12);
}

.form-tile {
  min-height: 9.5rem;
  padding: 1rem;
  background: rgba(6, 8, 7, 0.9);
}

.form-tile b {
  display: block;
  color: var(--accent);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-weight: 560;
}

.form-tile span {
  display: block;
  margin-top: 0.8rem;
  color: rgba(239, 231, 208, 0.68);
  line-height: 1.55;
}

.final-chapter {
  min-height: 112svh;
}

.closing-panel {
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.closing-panel p {
  margin: 0;
  color: rgba(239, 231, 208, 0.76);
  line-height: 1.8;
}

.closing-panel a {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.78rem 1rem;
  color: var(--black);
  background: var(--paper);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-copy,
.practice-board,
.use-switcher,
.family-lab,
.rule-machine,
.diary-machine,
.form-grid,
.closing-panel {
  opacity: 0.42;
  transform: translateY(24px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.chapter.is-visible .chapter-copy,
.chapter.is-visible .practice-board,
.chapter.is-visible .use-switcher,
.chapter.is-visible .family-lab,
.chapter.is-visible .rule-machine,
.chapter.is-visible .diary-machine,
.chapter.is-visible .form-grid,
.chapter.is-visible .closing-panel {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1080px) {
  .hero,
  .chapter-inner {
    grid-template-columns: 1fr;
  }

  .chapter-inner {
    position: relative;
    top: auto;
    min-height: auto;
  }

  .chapter {
    min-height: auto;
  }

  .concept-hud {
    position: sticky;
    top: 4.5rem;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 0 1rem;
  }

  .practice-board,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding-top: 6rem;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.8rem, 13vw, 5rem);
    line-height: 1.08;
  }

  .opening-instrument {
    min-height: auto;
  }

  .example-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .example-footer {
    grid-template-columns: 1fr;
  }

  .chapter-copy h2 {
    max-width: 11ch;
  }

  .practice-board,
  .use-list,
  .form-grid,
  .diary-strip {
    grid-template-columns: 1fr;
  }

  .family-lab {
    min-height: 28rem;
  }

  .rule-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rule-readout {
    grid-template-columns: 1fr;
  }
}
