:root {
  --plate: #dcebe7;
  --plate-light: #f4faf7;
  --plate-deep: #bfd4ce;
  --ink: #102f38;
  --muted: #4e676c;
  --line: #86a5a2;
  --left: #2057d4;
  --left-deep: #153a93;
  --right: #d9367d;
  --right-deep: #8e2052;
  --coupled: #713dc2;
  --signal: #f0e54a;
  --white: #ffffff;
  --shadow: #0a2229;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--plate);
  background-image:
    linear-gradient(rgba(16, 47, 56, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 56, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 4px solid var(--signal);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.6rem;
  left: 0.6rem;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 58px;
  padding: 0.7rem clamp(1rem, 3vw, 3.2rem);
  border-bottom: 2px solid var(--ink);
  background: rgba(244, 250, 247, 0.94);
}

.site-mark,
.language-link,
.site-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.site-mark::before {
  width: 0.8rem;
  height: 0.8rem;
  background: conic-gradient(var(--left) 0 50%, var(--right) 50% 100%);
  border: 1px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 2.4vw, 2.5rem);
}

.site-nav a,
.language-link {
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.language-link:hover {
  border-color: currentColor;
}

.language-link {
  justify-self: end;
  padding: 0.35rem 0.55rem;
  border: 2px solid var(--ink);
  background: var(--signal);
}

.hero {
  min-height: calc(100svh - 58px);
  padding: clamp(1.6rem, 3.2vw, 3.5rem) clamp(1rem, 3vw, 3.2rem) clamp(2rem, 4vw, 4rem);
  border-bottom: 3px solid var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(540px, 1.16fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
  width: min(1540px, 100%);
  margin: 0 auto;
}

.hero-copy {
  position: sticky;
  top: 1.5rem;
  padding-top: clamp(0.5rem, 4vh, 3rem);
}

.eyebrow {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.2rem;
  height: 0.3rem;
  background: linear-gradient(90deg, var(--left) 0 50%, var(--right) 50% 100%);
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1.3rem;
  font-family: var(--display);
  font-size: clamp(4rem, 7.6vw, 8.8rem);
  font-stretch: condensed;
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.78;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 36rem;
  margin-bottom: 1rem;
  font-size: clamp(1.12rem, 1.55vw, 1.45rem);
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.42;
}

.hero-proof {
  max-width: 34rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.phase-equation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  max-width: 34rem;
  padding: 1rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.phase-number {
  display: block;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.8;
}

.phase-name {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phase-arrow {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 900;
}

.phase-to {
  text-align: right;
}

.experiment-column {
  display: grid;
  gap: 1rem;
}

.phase-machine {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 180px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--plate-light);
  box-shadow: 9px 9px 0 var(--shadow);
}

.machine-half {
  position: relative;
  display: grid;
  place-items: center;
}

.machine-half:first-child {
  border-right: 1px solid var(--line);
}

.disc {
  position: relative;
  width: clamp(94px, 13vw, 160px);
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--left);
  box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.3);
  animation: turn-left 2.2s linear infinite;
}

.machine-half:last-child .disc {
  background: var(--right);
  animation-name: turn-right;
}

.disc::before,
.disc::after {
  position: absolute;
  content: "";
}

.disc::before {
  top: 6%;
  left: calc(50% - 3px);
  width: 6px;
  height: 44%;
  background: var(--white);
  border: 1px solid var(--ink);
}

.disc::after {
  inset: 42%;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
}

.coupler {
  position: absolute;
  z-index: 2;
  top: calc(50% - 11px);
  left: calc(50% - 42px);
  width: 84px;
  height: 22px;
  border: 3px solid var(--ink);
  background: var(--coupled);
}

.machine-label {
  position: absolute;
  right: 0.7rem;
  bottom: 0.55rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@keyframes turn-left {
  to { transform: rotate(360deg); }
}

@keyframes turn-right {
  from { transform: rotate(180deg); }
  to { transform: rotate(540deg); }
}

.experiment {
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 9px 9px 0 var(--shadow);
}

.experiment-head {
  padding: clamp(1.1rem, 2vw, 1.65rem);
  border-bottom: 2px solid var(--ink);
}

.experiment-head h2 {
  margin-bottom: 0.7rem;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-transform: uppercase;
}

.experiment-head p {
  max-width: 52rem;
  margin-bottom: 0.7rem;
}

.experiment-head p:last-child {
  margin-bottom: 0;
}

.test-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.rig-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.readout {
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.readout:last-child {
  border-right: 0;
}

.readout span {
  display: block;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.readout strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.beat-pulse {
  height: 12px;
  border-bottom: 2px solid var(--ink);
  background: var(--plate-deep);
}

.beat-pulse.is-beating {
  background: var(--signal);
  animation: beat 150ms ease-out;
}

@keyframes beat {
  0% { transform: scaleY(1); }
  45% { transform: scaleY(2.3); }
  100% { transform: scaleY(1); }
}

.hands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: clamp(0.8rem, 2vw, 1.3rem);
}

.hand {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.key-pad {
  position: relative;
  min-width: 0;
  min-height: 76px;
  padding: 0.6rem 0.35rem;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--left);
  color: var(--white);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  box-shadow: 0 6px 0 var(--left-deep);
}

.hand-right .key-pad {
  background: var(--right);
  box-shadow: 0 6px 0 var(--right-deep);
}

.key-pad strong,
.key-pad small {
  display: block;
  pointer-events: none;
}

.key-pad strong {
  font-family: var(--display);
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 0.9;
}

.key-pad small {
  margin-top: 0.35rem;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-pad.is-cued {
  color: var(--ink);
  background: var(--signal);
  box-shadow: 0 6px 0 #a89f20;
}

.key-pad.is-pressed {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--shadow);
}

.pair-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  padding: 0 1.25rem 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.pair-legend strong {
  color: var(--ink);
}

.rig-controls {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  padding: 1rem 1.25rem;
  border-top: 2px solid var(--ink);
  background: var(--plate-light);
}

.action-button,
.stop-button {
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.action-button {
  flex: 1;
  background: var(--signal);
  box-shadow: 4px 4px 0 var(--ink);
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.stop-button {
  background: var(--white);
  color: var(--ink);
}

.rig-status {
  min-height: 3.6rem;
  margin: 0;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.result {
  padding: 1.2rem 1.25rem 1.35rem;
  border-top: 3px solid var(--ink);
  background: var(--plate-light);
}

.result h3 {
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}

.experiment[data-state="transition"] .result {
  background: #e7dcf8;
}

.experiment[data-state="stable"] .result {
  background: #dce7ff;
}

.experiment[data-state="irregular"] .result,
.experiment[data-state="short"] .result {
  background: #f8e6ed;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
  border: 2px solid var(--ink);
}

.result-metric {
  padding: 0.8rem;
  border-right: 1px solid var(--ink);
}

.result-metric:last-child {
  border-right: 0;
}

.result-metric span,
.result-metric strong {
  display: block;
}

.result-metric span {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.result-metric strong {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 900;
}

.boundary-note,
.privacy-note {
  margin-bottom: 0.35rem;
  font-size: 0.83rem;
  font-weight: 650;
}

.privacy-note {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 500;
}

.facts-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  background: var(--plate-light);
}

.fact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
}

.fact:first-child {
  border-right: 2px solid var(--ink);
}

.fact strong {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.8;
}

.fact span {
  font-size: 0.75rem;
  line-height: 1.25;
}

.content-section {
  padding: clamp(4rem, 9vw, 9rem) clamp(1rem, 5vw, 5rem);
  border-bottom: 3px solid var(--ink);
  background: var(--plate-light);
}

.section-wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6.2vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-transform: uppercase;
}

.section-heading > p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.42rem);
}

.phase-story {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.phase-argument {
  min-height: 330px;
  padding: clamp(1.4rem, 2.6vw, 2.6rem);
  border-right: 2px solid var(--ink);
}

.phase-argument:last-child {
  border-right: 0;
}

.argument-mark {
  display: grid;
  place-items: center;
  width: 4.8rem;
  aspect-ratio: 1;
  margin-bottom: 2rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--left);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 900;
}

.phase-argument:nth-child(2) .argument-mark {
  background: var(--coupled);
}

.phase-argument:nth-child(3) .argument-mark {
  background: var(--right);
}

.phase-argument h3 {
  margin-bottom: 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.7vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: uppercase;
}

.phase-argument p {
  margin-bottom: 0;
  color: var(--muted);
}

.model-board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
  margin-top: clamp(3rem, 6vw, 6rem);
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--plate);
}

.model-state {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.model-state:first-child {
  border-right: 2px solid var(--ink);
}

.well {
  position: relative;
  width: min(340px, 80%);
  height: 180px;
  border-bottom: 18px solid var(--left);
  border-radius: 0 0 50% 50%;
}

.model-state:last-child .well {
  border-bottom-color: var(--coupled);
}

.well::after {
  position: absolute;
  bottom: -30px;
  left: calc(50% - 27px);
  width: 54px;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.model-state:first-child .well {
  opacity: 0.48;
  transform: scaleY(0.35);
  transform-origin: bottom;
}

.model-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.model-arrow {
  position: absolute;
  z-index: 2;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  font-size: 1.6rem;
  font-weight: 900;
}

.model-caption {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.method-section {
  background: var(--ink);
  color: var(--white);
}

.method-section .eyebrow,
.method-section .section-heading > p:last-child {
  color: #c4d8d4;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 2px solid var(--white);
}

.method-grid p {
  min-height: 280px;
  margin: 0;
  padding: clamp(1.3rem, 2.8vw, 2.5rem);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 1.02rem;
}

.method-grid p:last-child {
  border-right: 0;
}

.scope-note {
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 8px solid var(--signal);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.05rem;
  font-weight: 700;
}

.sources-section {
  background: var(--plate);
}

.source-list {
  border-top: 3px solid var(--ink);
}

.source-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  padding: 1.6rem 0;
  border-bottom: 2px solid var(--ink);
}

.source-year {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.source-copy h3 {
  margin-bottom: 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

.source-copy p {
  max-width: 56rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

.source-copy small {
  display: block;
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.45;
}

.source-link {
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--signal);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 3vw, 3.2rem);
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.back-top {
  position: fixed;
  z-index: 25;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--ink);
  background: var(--signal);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(calc(100% + 2rem));
  transition: transform 180ms ease;
}

.back-top.is-visible {
  transform: none;
}

.not-found {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 1rem;
}

.not-found main {
  width: min(760px, 100%);
  padding: clamp(1.4rem, 5vw, 4rem);
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--shadow);
}

.not-found h1 {
  max-width: none;
  font-size: clamp(3rem, 10vw, 7rem);
}

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

  .hero-copy {
    position: static;
  }

  h1 {
    max-width: 12ch;
  }

  .phase-equation {
    max-width: 42rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: 0;
    padding-top: 1.5rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5.4rem);
  }

  .phase-equation {
    gap: 0.45rem;
  }

  .phase-number {
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .phase-name {
    font-size: 0.55rem;
  }

  .phase-machine {
    min-height: 150px;
    box-shadow: 6px 6px 0 var(--shadow);
  }

  .experiment {
    box-shadow: 6px 6px 0 var(--shadow);
  }

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

  .readout {
    padding: 0.65rem 0.45rem;
  }

  .readout span {
    font-size: 0.48rem;
  }

  .readout strong {
    font-size: 1.25rem;
  }

  .hands {
    gap: 0.45rem;
    padding: 0.75rem;
  }

  .hand {
    gap: 0.35rem;
  }

  .key-pad {
    min-height: 72px;
    padding-inline: 0.2rem;
  }

  .key-pad strong {
    font-size: 1.75rem;
  }

  .key-pad small {
    font-size: 0.44rem;
  }

  .pair-legend {
    padding-inline: 0.75rem;
  }

  .rig-controls {
    flex-direction: column;
    padding: 0.8rem;
  }

  .rig-status {
    padding-inline: 0.8rem;
  }

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

  .result-metric {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .result-metric:last-child {
    border-bottom: 0;
  }

  .facts-rail {
    grid-template-columns: 1fr;
  }

  .fact:first-child {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .content-section {
    padding-block: 4.5rem;
  }

  .section-heading h2 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .phase-story,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .phase-argument,
  .method-grid p {
    min-height: 0;
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .phase-argument:last-child,
  .method-grid p:last-child {
    border-bottom: 0;
  }

  .method-grid p {
    border-bottom-color: rgba(255, 255, 255, 0.55);
  }

  .model-board {
    grid-template-columns: 1fr;
    min-height: 560px;
  }

  .model-state:first-child {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .model-arrow {
    top: calc(50% - 30px);
  }

  .source-row {
    grid-template-columns: 4rem 1fr;
  }

  .source-link {
    grid-column: 2;
    justify-self: start;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .site-header,
  .hero,
  .content-section {
    padding-inline: 0.85rem;
  }

  .site-mark,
  .language-link {
    font-size: 0.64rem;
  }

  .experiment-head {
    padding-inline: 0.85rem;
  }

  .key-pad small {
    letter-spacing: -0.02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .disc:first-child {
    transform: rotate(0deg);
  }

  .machine-half:last-child .disc {
    transform: rotate(180deg);
  }
}
