:root {
  color-scheme: light;
  --ink: #1f2328;
  --ink-2: #24292f;
  --muted: #59636e;
  --subtle: #6e7781;
  --paper: #f6f8fa;
  --paper-2: #ffffff;
  --line: #d0d7de;
  --line-dark: #30363d;
  --dark: #0d1117;
  --dark-2: #161b22;
  --blue: #0969da;
  --blue-bright: #1f6feb;
  --green: #1f883d;
  --red: #cf222e;
  --amber: #9a6700;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-soft: 0 16px 44px rgba(31, 35, 40, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}

.topbar {
  align-items: center;
  background: rgba(246, 248, 250, 0.92);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 850;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: #f8fafc;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

main {
  overflow: clip;
}

.hero {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 66px max(24px, calc((100vw - var(--max)) / 2)) 42px;
  position: relative;
}

.hero::before {
  display: none;
}

.hero-grid,
.status-rail,
.run-local,
.autonomy,
.cast,
.voice,
.real-runs,
.rules,
.keeps,
.patterns,
.terrarium,
.workflow,
.boundaries,
.preview,
.closing {
  position: relative;
  z-index: 1;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  margin: 0 auto;
  max-width: var(--max);
  min-height: 0;
}

.hero-copy {
  max-width: 620px;
}

.repo-line {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 6px 10px;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  font-size: clamp(40px, 4.6vw, 58px);
  line-height: 1.05;
  margin: 0;
}

h2 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
  margin: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
}

p {
  line-height: 1.62;
}

.lede {
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  margin: 18px 0 0;
  max-width: 620px;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 12px 17px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  border: 1px solid rgba(31, 136, 61, 0.5);
  color: #ffffff;
}

.button.primary:hover {
  background: #1a7f37;
}

.button.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--paper);
  border-color: #afb8c1;
}

.text-link {
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  color: #0550ae;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-visual {
  margin: 0;
}

.hero-visual a {
  display: block;
}

.hero-visual img {
  filter: drop-shadow(0 16px 34px rgba(31, 35, 40, 0.14));
  height: auto;
  width: 100%;
}

.hero-terrarium-visual img {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.status-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.status-rail li {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.field-note {
  border-left: 4px solid var(--green);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 0;
  max-width: 620px;
  padding-left: 15px;
}

.run-local,
.autonomy,
.cast,
.voice,
.real-runs,
.rules,
.keeps,
.patterns,
.terrarium,
.workflow,
.boundaries,
.preview,
.closing {
  padding: 82px max(24px, calc((100vw - var(--max)) / 2));
}

.section-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section-heading {
  max-width: 820px;
}

.section-heading p,
.section-split p,
.demo-note,
.loop-grid p,
.cast-grid p,
.voice-grid blockquote,
.module-grid p,
.pattern-grid p,
.timeline p,
.preview-grid p,
.closing p,
.boundary-copy p {
  color: var(--muted);
}

.section-split {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1fr);
}

.run-local {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

pre {
  background: var(--dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  color: #e6edf3;
  margin: 0;
  overflow-x: auto;
  padding: 24px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
}

p code,
li code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.demo-note {
  border-left: 4px solid var(--blue);
  margin: 24px 0 0;
  max-width: 900px;
  padding-left: 16px;
}

.demo-note code {
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 2px 5px;
}

.autonomy {
  background: var(--dark);
  border-bottom: 1px solid var(--line-dark);
  color: #f8fafc;
}

.autonomy .section-heading {
  max-width: 900px;
}

.autonomy .section-heading p {
  color: #8b949e;
}

.loop-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.loop-grid article {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  min-height: 260px;
  padding: 22px;
}

.loop-grid article:nth-child(1) {
  border-top: 4px solid #3fb950;
}

.loop-grid article:nth-child(2) {
  border-top: 4px solid #58a6ff;
}

.loop-grid article:nth-child(3) {
  border-top: 4px solid #f85149;
}

.loop-index {
  color: #8b949e;
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 44px;
}

.loop-grid h3 {
  color: #f0f6fc;
  margin-bottom: 10px;
}

.loop-grid p {
  color: #8b949e;
  margin-bottom: 0;
}

.cast {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.cast .section-heading {
  max-width: 940px;
}

.cast-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.cast-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  min-height: 280px;
  padding: 18px;
}

.role-tag {
  color: var(--blue);
  display: inline-flex;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 34px;
  text-transform: uppercase;
}

.cast-grid h3 {
  margin-bottom: 10px;
}

.cast-grid p {
  margin-bottom: 0;
}

.voice {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.voice-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.voice-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 230px;
  padding: 18px;
}

.voice-grid blockquote {
  border-left: 4px solid var(--green);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  margin: 0;
  padding-left: 14px;
}

.real-runs {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.real-runs .section-heading {
  max-width: 940px;
}

.highlight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.highlight-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 250px;
  padding: 18px;
}

.voice-line-grid {
  grid-template-columns: 1fr;
}

.highlight-grid .voice-line-card {
  background: #ffffff;
  min-height: 0;
  padding: 22px;
}

.voice-line-card .role-tag {
  margin-bottom: 14px;
}

.voice-line-card h3 {
  margin-bottom: 8px;
}

.voice-meta {
  color: var(--subtle);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 16px;
}

.voice-section {
  border-left: 4px solid var(--amber);
  margin-top: 16px;
  padding-left: 14px;
}

.voice-section strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.voice-section p,
.voice-section li {
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.58;
}

.voice-section p {
  margin: 0;
}

.voice-section ul {
  margin: 0;
  padding-left: 20px;
}

.voice-section li + li {
  margin-top: 5px;
}

.highlight-grid blockquote {
  border-left: 4px solid var(--amber);
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.5;
  margin: 0;
  padding-left: 14px;
}

.rules {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.rules .section-heading {
  max-width: 940px;
}

.rulebook {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 34px;
  overflow: hidden;
}

.rulebook article {
  background: #ffffff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  padding: 20px 22px;
}

.rulebook article + article {
  border-top: 1px solid var(--line);
}

.rulebook article:nth-child(even) {
  background: #f6f8fa;
}

.rulebook strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.rulebook span {
  color: var(--muted);
  line-height: 1.55;
}

.keeps {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 34px;
}

.module-grid article,
.pattern-grid article,
.preview-grid article {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.module-index {
  color: var(--blue);
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 28px;
}

.module-grid h3 {
  margin-bottom: 10px;
}

.module-grid p,
.pattern-grid p,
.preview-grid p {
  margin-bottom: 0;
}

.patterns {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.pattern-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.pattern-grid article {
  background: var(--paper);
  min-height: 260px;
}

.terrarium {
  background: #101827;
  border-bottom: 1px solid var(--line-dark);
  color: #f8fafc;
}

.terrarium .section-heading {
  max-width: 1040px;
}

.terrarium .section-heading p {
  color: #b6c2d4;
}

.terrarium-open {
  color: #7dd3fc;
  display: inline-flex;
  margin-top: 4px;
}

.terrarium-console {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  margin-top: 34px;
}

.terrarium-map-shell,
.terrarium-detail {
  background: rgba(13, 17, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--radius);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.terrarium-map-shell {
  min-width: 0;
  overflow: hidden;
  padding: 14px;
}

.terrarium-map-stage {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.32)),
    #101827;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  min-height: 430px;
  overflow: hidden;
  position: relative;
}

.terrarium-habitat,
.terrarium-routes {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.terrarium-habitat {
  filter: saturate(1.12) contrast(1.04);
  object-fit: cover;
}

.terrarium-routes {
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.terrarium-route {
  fill: none;
  stroke: rgba(125, 211, 252, 0.78);
  stroke-dasharray: 3 3;
  stroke-linecap: round;
  stroke-width: 0.65;
}

.route-active {
  animation: routePulse 2.8s ease-in-out infinite;
  stroke: rgba(74, 222, 128, 0.85);
}

.route-next {
  stroke: rgba(125, 211, 252, 0.85);
}

.route-blocked {
  stroke: rgba(248, 113, 113, 0.9);
}

.route-label {
  fill: #e6edf3;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 3.1px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, 0.86);
  stroke-width: 0.55;
}

.route-label-blocked {
  fill: #fecaca;
}

.message-dot {
  fill: #ffffff;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9));
}

.dot-active {
  fill: #4ade80;
}

.dot-next {
  fill: #7dd3fc;
}

.dot-blocked {
  fill: #fb7185;
}

.terrarium-creature {
  align-items: center;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: var(--radius);
  color: #f8fafc;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  justify-items: center;
  left: var(--x);
  min-width: 82px;
  padding: 7px;
  position: absolute;
  top: var(--y);
  transform: translate(-50%, -50%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
  z-index: 3;
}

.terrarium-creature:hover,
.terrarium-creature.is-active {
  background: rgba(22, 27, 34, 0.96);
  border-color: rgba(125, 211, 252, 0.9);
  transform: translate(-50%, -52%);
}

.terrarium-creature img {
  aspect-ratio: 1;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 6px;
  object-fit: cover;
  width: clamp(42px, 5vw, 66px);
}

.terrarium-creature span {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  max-width: 92px;
  overflow-wrap: anywhere;
  text-align: center;
}

.terrarium-legend {
  color: #b6c2d4;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.terrarium-legend span {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.legend-dot {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.legend-dot.active {
  background: #4ade80;
}

.legend-dot.next {
  background: #7dd3fc;
}

.legend-dot.blocked {
  background: #fb7185;
}

.terrarium-detail {
  padding: 18px;
}

.detail-status-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.status-pill,
.detail-lane {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.status-pill {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}

.status-pill[data-state="blocked"] {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.status-pill[data-state="next"] {
  background: rgba(125, 211, 252, 0.14);
  border-color: rgba(125, 211, 252, 0.45);
  color: #bae6fd;
}

.detail-lane {
  color: #cbd5e1;
}

.terrarium-detail h3 {
  color: #f8fafc;
  font-size: 24px;
  margin-bottom: 18px;
}

.terrarium-detail dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.terrarium-detail dt,
.detail-list strong {
  color: #93c5fd;
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.terrarium-detail dd {
  color: #dbeafe;
  line-height: 1.5;
  margin: 0;
}

.detail-list {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  margin-top: 16px;
  padding-top: 16px;
}

.detail-list ul {
  color: #cbd5e1;
  display: grid;
  gap: 8px;
  line-height: 1.45;
  margin: 0;
  padding-left: 18px;
}

@keyframes routePulse {
  0%,
  100% {
    opacity: 0.58;
  }

  50% {
    opacity: 1;
  }
}

.workflow {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.timeline {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  background: var(--line);
  content: "";
  height: 3px;
  left: 5%;
  position: absolute;
  right: 5%;
  top: 20px;
}

.timeline li {
  counter-increment: step;
  min-width: 0;
  padding: 54px 16px 0 0;
  position: relative;
}

.timeline li::before {
  color: var(--subtle);
  content: "0" counter(step);
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.step-dot {
  background: #ffffff;
  border: 3px solid var(--blue);
  border-radius: 999px;
  box-shadow: 0 0 0 6px #ddf4ff;
  height: 18px;
  left: 0;
  position: absolute;
  top: 12px;
  width: 18px;
}

.timeline li:nth-child(1) .step-dot,
.timeline li:nth-child(2) .step-dot {
  border-color: var(--green);
  box-shadow: 0 0 0 6px #dafbe1;
}

.timeline li:nth-child(5) .step-dot {
  border-color: var(--red);
  box-shadow: 0 0 0 6px #ffebe9;
}

.timeline strong {
  display: block;
  font-size: 20px;
}

.timeline p {
  margin: 10px 0 0;
}

.boundaries {
  background: var(--dark);
  color: #f8fafc;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 0.7fr) minmax(460px, 1fr);
}

.boundary-copy p {
  color: #8b949e;
  font-size: 18px;
}

.boundary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.boundary-grid article {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-left: 4px solid #f85149;
  border-radius: var(--radius);
  color: #e6edf3;
  font-size: 15px;
  font-weight: 850;
  min-height: 76px;
  padding: 19px 18px;
}

.boundary-grid article:nth-child(2n) {
  border-left-color: #58a6ff;
}

.boundary-grid article:nth-child(3n) {
  border-left-color: #3fb950;
}

.preview {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.preview-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.preview-grid img {
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  width: 100%;
}

.preview-grid h3 {
  min-height: 48px;
}

.closing {
  align-items: center;
  background: #ffffff;
  display: flex;
  gap: 30px;
  justify-content: space-between;
}

.closing div {
  max-width: 760px;
}

.closing .button.primary {
  background: var(--ink);
  color: #ffffff;
  flex: 0 0 auto;
}

.closing .button.primary:hover {
  background: #334155;
}

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

  .hero-grid {
    min-height: auto;
  }

  .module-grid,
  .cast-grid,
  .voice-grid,
  .highlight-grid,
  .pattern-grid,
  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terrarium-console {
    grid-template-columns: 1fr;
  }

  .terrarium-map-stage {
    min-height: 500px;
  }

  .loop-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 16px;
    padding-top: 16px;
    position: static;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .run-local,
  .autonomy,
  .cast,
  .voice,
  .real-runs,
  .rules,
  .keeps,
  .patterns,
  .terrarium,
  .workflow,
  .boundaries,
  .preview,
  .closing {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero {
    padding-top: 52px;
  }

  .timeline {
    display: block;
    margin-top: 34px;
  }

  .timeline::before {
    bottom: 0;
    height: auto;
    left: 8px;
    right: auto;
    top: 12px;
    width: 3px;
  }

  .timeline li {
    padding: 0 0 34px 40px;
  }

  .step-dot {
    left: 0;
    top: 4px;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .closing {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .text-link {
    padding: 8px 0;
  }

  .module-grid,
  .cast-grid,
  .voice-grid,
  .highlight-grid,
  .pattern-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .terrarium-map-stage {
    aspect-ratio: 1 / 1.25;
    min-height: 620px;
  }

  .terrarium-creature {
    min-width: 72px;
    padding: 6px;
  }

  .terrarium-creature img {
    width: 44px;
  }

  .rulebook article {
    grid-template-columns: 1fr;
  }

  .preview-grid h3 {
    min-height: 0;
  }
}
