:root {
  color-scheme: light;
  --paper: #f4efe4;
  --paper-strong: #fffaf0;
  --paper-shade: #d8d0c2;
  --ink: #171611;
  --ink-soft: #514c42;
  --aperture: #090a09;
  --aperture-soft: #111411;
  --line: rgba(23, 22, 17, 0.18);
  --line-dark: rgba(244, 239, 228, 0.2);
  --tissue: #9f2737;
  --coral: #ff785f;
  --burgundy: #c65364;
  --cyan: #4fd7c5;
  --acid: #b7ff52;
  --gold: #c89b45;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --interface: "Avenir Next", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--interface);
}

body::before {
  background: linear-gradient(180deg, rgba(9, 10, 9, 0.76), rgba(9, 10, 9, 0.22) 70%, transparent);
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 3px solid var(--tissue);
  outline-offset: 3px;
}

.anatomy-topbar :focus-visible,
.canvas-shell :focus-visible,
.instrument-bar button:focus-visible,
.flow-ribbon button:focus-visible {
  outline-color: var(--acid);
}

.anatomy-shell {
  min-height: 100vh;
  overflow: clip;
}

.anatomy-topbar[data-site-header] {
  --chopshopr-glass: rgba(9, 10, 9, 0.84);
}

.anatomy-topbar[data-site-header] .site-topbar__nav {
  display: grid !important;
  flex: 1 1 auto;
  justify-items: end;
  overflow: visible;
}

.anatomy-topbar[data-site-header] .site-primary-links a {
  min-height: 44px !important;
}

.living-plate {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto minmax(660px, 1fr);
  gap: clamp(18px, 2.4vw, 34px);
  padding: calc(var(--site-fixed-header-clearance) + 18px) clamp(18px, 3.1vw, 48px) 42px;
  background:
    repeating-linear-gradient(0deg, rgba(23, 22, 17, 0.018) 0 1px, transparent 1px 5px),
    var(--paper);
}

.plate-heading {
  display: grid;
  max-width: 1180px;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.48fr);
  gap: 10px clamp(24px, 5vw, 80px);
  align-items: end;
}

.plate-code {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.plate-code span {
  color: var(--tissue);
}

.plate-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6vw, 6.6rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.plate-intro {
  max-width: 500px;
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 1.4vw, 1.16rem);
  line-height: 1.48;
}

.plate-jump-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plate-jump-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

.plate-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.specimen-field {
  position: relative;
  min-width: 0;
  min-height: 660px;
  overflow: hidden;
  border-right: 1px solid var(--ink);
  isolation: isolate;
}

.specimen-field::before,
.specimen-field::after {
  position: absolute;
  z-index: -2;
  content: "";
}

.specimen-field::before {
  inset: 70px 34px 78px 30px;
  border: 1px solid rgba(23, 22, 17, 0.75);
  border-radius: 51% 49% 47% 53% / 46% 50% 50% 54%;
  background: var(--aperture);
  box-shadow: 0 40px 100px rgba(47, 34, 22, 0.2);
}

.specimen-field::after {
  inset: 58px 18px 66px 14px;
  border: 1px solid rgba(23, 22, 17, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.specimen-meta,
.plate-stamp {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.specimen-meta {
  inset: 20px 22px auto;
}

.plate-stamp {
  inset: auto 22px 16px;
  gap: 20px;
}

.mode-strip {
  position: absolute;
  top: 82px;
  left: 8px;
  z-index: 8;
  display: grid;
  gap: 6px;
}

.mode-strip button {
  display: grid;
  width: 98px;
  min-height: 44px;
  grid-template-columns: 22px 1fr;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(244, 239, 228, 0.2);
  border-radius: 4px;
  padding: 0 9px;
  background: rgba(9, 10, 9, 0.86);
  color: rgba(244, 239, 228, 0.7);
  font-size: 0.72rem;
  font-weight: 820;
  text-align: left;
}

.mode-strip button span {
  color: rgba(244, 239, 228, 0.42);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.mode-strip button:hover,
.mode-strip button[aria-pressed="true"] {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.mode-strip button[aria-pressed="true"] span {
  color: rgba(23, 22, 17, 0.62);
}

.canvas-shell {
  position: absolute;
  inset: 72px 36px 80px 32px;
  z-index: 1;
  overflow: hidden;
  border-radius: 51% 49% 47% 53% / 46% 50% 50% 54%;
  background:
    radial-gradient(circle at 68% 32%, rgba(79, 215, 197, 0.08), transparent 28%),
    radial-gradient(circle at 36% 40%, rgba(255, 120, 95, 0.08), transparent 36%),
    var(--aperture);
  touch-action: pan-y;
}

.canvas-shell canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  touch-action: pan-y !important;
  transition: opacity 240ms ease;
}

[data-renderer="three"] .canvas-shell canvas,
[data-renderer="fallback"] .canvas-shell canvas {
  opacity: 1;
}

.canvas-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow:
    inset 0 0 100px rgba(0, 0, 0, 0.5),
    inset 0 -70px 110px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.fallback-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(42vw, 390px);
  aspect-ratio: 0.79;
  transform: translate(-50%, -47%) rotate(-7deg);
  opacity: 0.94;
  filter: drop-shadow(0 34px 34px rgba(0, 0, 0, 0.46));
  transition: opacity 180ms ease;
}

[data-renderer="three"] .fallback-heart,
[data-renderer="fallback"] .fallback-heart {
  opacity: 0;
}

[data-fallback-surface="poster"] .fallback-heart {
  opacity: 0.94;
}

.fallback-lobe {
  position: absolute;
  border: 1px solid rgba(255, 186, 165, 0.5);
  background: var(--tissue);
}

.fallback-lobe--left {
  inset: 18% 39% 2% 10%;
  border-radius: 64% 42% 52% 44% / 40% 38% 70% 66%;
  transform: rotate(10deg);
  box-shadow: inset 16px 10px 40px rgba(255, 164, 143, 0.24);
}

.fallback-lobe--right {
  inset: 14% 8% 16% 36%;
  border-radius: 46% 58% 48% 55% / 38% 46% 70% 62%;
  transform: rotate(-14deg);
  background: #7f1e2e;
  box-shadow: inset -12px 8px 34px rgba(255, 164, 143, 0.2);
}

.fallback-vessel {
  position: absolute;
  top: 0;
  width: 17%;
  height: 33%;
  border: 1px solid rgba(255, 186, 165, 0.46);
  border-radius: 42% 42% 18% 18%;
  background: var(--tissue);
}

.fallback-vessel--one {
  left: 30%;
  transform: rotate(-12deg);
}

.fallback-vessel--two {
  left: 48%;
  height: 29%;
  transform: rotate(10deg);
  background: #6f2230;
}

.fallback-vessel--three {
  left: 60%;
  height: 26%;
  transform: rotate(28deg);
}

.render-state {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 7;
  display: flex;
  max-width: calc(100% - 56px);
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  padding: 7px 10px;
  background: rgba(9, 10, 9, 0.76);
  color: rgba(244, 239, 228, 0.72);
  font-size: 0.7rem;
  font-weight: 760;
  backdrop-filter: blur(8px);
}

.render-pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 155, 69, 0.16);
}

[data-renderer="three"] .render-pulse {
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(183, 255, 82, 0.16);
}

[data-renderer="fallback"] .render-pulse {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 120, 95, 0.16);
}

.canvas-instruction {
  position: absolute;
  bottom: 24px;
  left: 28px;
  z-index: 7;
  margin: 0;
  color: rgba(244, 239, 228, 0.54);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.anatomy-hotspot {
  position: absolute;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  color: var(--paper-strong);
  pointer-events: auto;
}

.anatomy-hotspot::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(244, 239, 228, 0.72);
  border-radius: 50%;
  content: attr(data-number);
  background: rgba(9, 10, 9, 0.86);
  font-size: 0.58rem;
  font-weight: 900;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.36);
}

.anatomy-hotspot::after {
  position: absolute;
  left: 38px;
  width: max-content;
  max-width: 150px;
  border-bottom: 1px solid rgba(244, 239, 228, 0.45);
  padding: 4px 0;
  content: attr(aria-label);
  color: var(--paper-strong);
  font-size: 0.68rem;
  font-weight: 760;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.anatomy-hotspot:hover::after,
.anatomy-hotspot:focus-visible::after,
.anatomy-hotspot[aria-pressed="true"]::after {
  opacity: 1;
  transform: translateX(0);
}

.anatomy-hotspot[aria-pressed="true"]::before {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
  box-shadow: 0 0 0 5px rgba(183, 255, 82, 0.16);
}

[data-mode="recall"] .anatomy-hotspot::after {
  display: none;
}

.instrument-bar {
  position: absolute;
  right: 50%;
  bottom: 64px;
  z-index: 9;
  display: grid;
  width: min(520px, calc(100% - 180px));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid rgba(244, 239, 228, 0.2);
  border-radius: 6px;
  overflow: hidden;
  transform: translateX(50%);
  background: rgba(9, 10, 9, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.instrument-bar button {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-right: 1px solid rgba(244, 239, 228, 0.14);
  padding: 4px 6px;
  background: transparent;
  color: rgba(244, 239, 228, 0.76);
  font-size: 0.68rem;
  font-weight: 780;
}

.instrument-bar button:last-child {
  border-right: 0;
}

.instrument-bar button:hover,
.instrument-bar button[aria-pressed="true"] {
  background: rgba(183, 255, 82, 0.13);
  color: var(--paper-strong);
}

.flow-ribbon {
  position: absolute;
  right: 50%;
  bottom: 118px;
  z-index: 9;
  display: none;
  width: min(520px, calc(100% - 180px));
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  border: 1px solid rgba(255, 120, 95, 0.4);
  border-radius: 6px;
  transform: translateX(50%);
  background: rgba(9, 10, 9, 0.92);
  color: var(--paper-strong);
}

[data-mode="flow"] .flow-ribbon {
  display: grid;
}

.flow-ribbon button {
  min-width: 44px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--coral);
  font-size: 1.1rem;
}

.flow-ribbon div {
  display: grid;
  gap: 2px;
  border-inline: 1px solid rgba(244, 239, 228, 0.13);
  padding: 8px 12px;
  text-align: center;
}

.flow-ribbon span {
  color: rgba(244, 239, 228, 0.52);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flow-ribbon strong {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 560;
}

.notes-margin {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 16px;
  padding: 22px 4px 24px 28px;
  background: var(--paper);
}

.notes-index {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.notes-eyebrow {
  margin: 16px 0 -10px;
  color: var(--tissue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notes-margin h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 4.2vw, 4.5rem);
  font-weight: 520;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.notes-detail,
.relationship-note p,
.safety-boundary {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.52;
}

.notes-detail {
  font-size: 0.96rem;
}

.relationship-note,
.source-note {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.relationship-note > span,
.source-note > span,
.recall-panel > span,
.section-heading > span {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-note > div,
.receipt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-note a,
.receipt-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding: 5px 2px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 780;
  text-decoration: none;
}

.source-note a:hover,
.receipt-links a:hover {
  border-color: var(--tissue);
  color: var(--tissue);
}

.recall-panel {
  display: none;
  gap: 8px;
  border-block: 1px solid var(--ink);
  padding: 14px 0;
}

[data-mode="recall"] .recall-panel {
  display: grid;
}

.recall-panel strong {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 560;
}

.recall-panel p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.44;
}

.recall-feedback[data-status="correct"] {
  color: #2f6a36;
  font-weight: 780;
}

.recall-feedback[data-status="incorrect"] {
  color: #a13231;
  font-weight: 780;
}

.recall-panel button,
.margin-actions button,
.truth-receipt details button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper-strong);
  font-weight: 820;
}

.recall-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.margin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.margin-actions button:first-child {
  background: var(--tissue);
}

.share-status {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.learning-ledger {
  display: grid;
  gap: clamp(30px, 5vw, 70px);
  padding: clamp(70px, 10vw, 150px) clamp(18px, 3.1vw, 48px) 90px;
  background: var(--paper-strong);
}

.ledger-heading {
  display: grid;
  max-width: 1100px;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.46fr);
  gap: 12px clamp(28px, 6vw, 90px);
  align-items: end;
}

.ledger-heading > p:first-child {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--tissue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.2vw, 5.7rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.ledger-heading > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.56;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.ledger-grid > section {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 24px clamp(14px, 2vw, 28px) 30px 0;
}

.ledger-grid > section + section {
  padding-left: clamp(14px, 2vw, 28px);
}

.ledger-grid > section:last-child {
  border-right: 0;
  padding-right: 0;
}

.section-heading {
  display: grid;
  gap: 7px;
  min-height: 126px;
  align-content: start;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.section-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  font-weight: 540;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.structure-groups {
  display: grid;
  gap: 18px;
}

.structure-groups > div {
  display: grid;
  gap: 4px;
}

.structure-groups h4 {
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.structure-groups button,
.flow-sequence button {
  display: grid;
  width: 100%;
  min-height: 44px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.structure-groups button {
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.8rem;
  font-weight: 740;
}

.structure-groups button span,
.flow-sequence button > span {
  color: var(--ink-soft);
  font-size: 0.6rem;
  font-weight: 850;
}

.structure-groups button:hover,
.structure-groups button[aria-pressed="true"],
.flow-sequence button:hover,
.flow-sequence button[aria-current="step"] {
  border-color: var(--tissue);
  color: var(--tissue);
}

.structure-groups button[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--acid);
  padding-left: 9px;
}

.flow-sequence ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-sequence button {
  grid-template-columns: 30px 1fr auto;
  gap: 9px;
  padding: 8px 0;
}

.flow-sequence button strong {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 560;
}

.flow-sequence button em {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-style: normal;
  text-transform: uppercase;
}

.truth-receipt dl {
  display: grid;
  margin: 0;
}

.truth-receipt dl div {
  display: grid;
  min-height: 44px;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.truth-receipt dt {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.truth-receipt dd {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 740;
}

.safety-boundary {
  border-left: 3px solid var(--coral);
  margin-top: 18px;
  padding-left: 12px;
  font-size: 0.76rem;
}

.receipt-links {
  margin-top: 14px;
}

.truth-receipt details {
  border-top: 1px solid var(--ink);
  margin-top: 20px;
  padding-top: 12px;
}

.truth-receipt summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 820;
}

.truth-receipt textarea {
  width: 100%;
  min-height: 230px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  background: var(--ink);
  color: var(--paper-strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
  line-height: 1.45;
}

.truth-receipt details button {
  width: 100%;
  margin-top: 8px;
}

.site-footer {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 3.1vw, 48px);
  background: var(--ink);
  color: var(--paper);
}

.site-footer a {
  display: inline-flex;
  min-width: 80px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 239, 228, 0.26);
  border-radius: 4px;
  text-decoration: none;
}

.site-footer p {
  max-width: 820px;
  margin: 0;
  color: rgba(244, 239, 228, 0.68);
  font-size: 0.76rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .plate-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .specimen-field::before {
    inset-inline: 18px;
  }

  .canvas-shell {
    inset-inline: 18px;
  }

  .mode-strip {
    left: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-strip button {
    width: auto;
  }

  .instrument-bar,
  .flow-ribbon {
    width: min(500px, calc(100% - 60px));
  }
}

@media (max-width: 820px) {
  .living-plate {
    grid-template-rows: auto auto;
    padding-inline: 0;
    padding-bottom: 0;
  }

  .plate-heading {
    display: grid;
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .plate-code {
    grid-column: auto;
  }

  .plate-heading h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .plate-intro {
    max-width: 620px;
  }

  .plate-grid {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }

  .specimen-field {
    min-height: 650px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .notes-margin {
    min-height: 430px;
    padding: 24px 18px 34px;
  }

  .margin-actions {
    margin-top: 14px;
  }

  .ledger-heading {
    grid-template-columns: 1fr;
  }

  .ledger-heading > p:first-child {
    grid-column: auto;
  }

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

  .ledger-grid > section,
  .ledger-grid > section + section {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 26px 0 34px;
  }

  .ledger-grid > section:last-child {
    border-bottom: 0;
  }

  .section-heading {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  :root {
    --site-fixed-header-height: 54px;
  }

  .anatomy-topbar.site-topbar--customer[data-site-header] {
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 4px;
  }

  .anatomy-topbar.site-topbar--customer[data-site-header] .site-brand,
  .anatomy-topbar.site-topbar--customer[data-site-header] .brand-link {
    width: auto;
    flex: 0 0 auto;
  }

  .anatomy-topbar.site-topbar--customer[data-site-header] .site-topbar__nav {
    width: auto;
    flex: 1 1 auto;
  }

  .living-plate {
    gap: 20px;
    padding-top: calc(var(--site-fixed-header-clearance) + 14px);
  }

  .plate-heading h1 {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }

  .plate-intro {
    font-size: 0.9rem;
  }

  .specimen-field {
    min-height: 590px;
  }

  .specimen-field::before {
    inset: 72px -28px 84px;
  }

  .specimen-field::after {
    inset: 62px -38px 72px;
  }

  .specimen-meta {
    inset-inline: 14px;
    font-size: 0.54rem;
  }

  .specimen-meta span:last-child {
    display: none;
  }

  .mode-strip {
    top: 62px;
    right: 10px;
    left: 10px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }

  .mode-strip button {
    min-width: 88px;
    flex: 1 0 auto;
    padding-inline: 7px;
  }

  .canvas-shell {
    inset: 72px -28px 84px;
    touch-action: pan-y;
  }

  .fallback-heart {
    width: min(84vw, 360px);
  }

  .canvas-instruction {
    right: 50%;
    bottom: 76px;
    left: auto;
    width: max-content;
    max-width: calc(100% - 60px);
    transform: translateX(50%);
    font-size: 0.62rem;
    text-align: center;
  }

  .render-state {
    right: 50%;
    bottom: 24px;
    transform: translateX(50%);
  }

  .instrument-bar {
    right: 10px;
    bottom: 58px;
    left: 10px;
    width: auto;
    transform: none;
  }

  .instrument-bar button {
    min-height: 48px;
    font-size: 0.61rem;
  }

  .flow-ribbon {
    right: 10px;
    bottom: 112px;
    left: 10px;
    width: auto;
    transform: none;
  }

  [data-mode="flow"] .canvas-instruction,
  [data-mode="flow"] .render-state {
    visibility: hidden;
  }

  .plate-stamp {
    inset: auto 14px 10px;
    font-size: 0.5rem;
  }

  .anatomy-hotspot::after {
    display: none;
  }

  .notes-margin h2 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .learning-ledger {
    padding: 72px 16px 60px;
  }

  .ledger-heading h2 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .margin-actions {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    padding-inline: 16px;
  }
}

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

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