.injury-page {
  --sans: "Atkinson Hyperlegible Next", sans-serif;
  max-width: 1440px;
  margin: auto;
  padding: 150px var(--pad) 70px;
}
.injury-page h1 {
  font-size: clamp(2.7rem, 5.5vw, 5.6rem);
  font-weight: 400;
  line-height: 1.05;
  max-width: 950px;
  margin: 20px 0;
}
.model-intro {
  font-size: 1.35rem;
  max-width: 850px;
}
.model-boundary {
  max-width: 1000px;
  border-left: 2px solid #ab7950;
  padding: 8px 0 8px 22px;
  margin: 30px 0 40px;
  color: #655d53;
}
.model-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  border: 1px solid #cfc8bc;
}
.model-view {
  position: relative;
  min-width: 0;
  background: #181e21;
  color: #e4ded1;
}
.model-view-heading {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 10px var(--mono);
  letter-spacing: 0.06em;
  pointer-events: none;
}
.model-view-heading span:last-child {
  max-width: 140px;
  text-align: right;
}
#knee-model {
  display: block;
  width: 100%;
  height: 620px;
  cursor: grab;
  touch-action: none;
}
#knee-model:active {
  cursor: grabbing;
}
#knee-model:focus-visible {
  outline: 2px solid #edbe60;
  outline-offset: -4px;
}
.model-view-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
}
.model-view button {
  color: #eee5d5;
  border: 1px solid #596064;
  background: transparent;
  padding: 8px 12px;
  font: 12px var(--sans);
  cursor: pointer;
}
.model-view button:hover {
  background: #384043;
}
.model-hint {
  font: 11px var(--sans);
  text-align: center;
  margin: 15px 12px;
}
.bone-toggle {
  display: block;
  text-align: center;
  font: 12px var(--sans);
  padding-bottom: 22px;
}
.bone-toggle input {
  accent-color: #edbe60;
}
.model-panel {
  padding: 30px;
  background: #f4f0e8;
}
.model-panel h2 {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  margin: 12px 0 24px;
}
.structure-list {
  display: grid;
  gap: 5px;
}
.structure-list button {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  font: 14px var(--sans);
  padding: 11px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #38382f;
  cursor: pointer;
}
.structure-list button[aria-pressed="true"] {
  border-color: #b8af9f;
  background: #e9e2d5;
}
.structure-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px #0002;
}
[data-structure="nerve"] { --swatch: #edbe60; }
[data-structure="anterior"] { --swatch: #e38474; }
[data-structure="posterior"] { --swatch: #ad9ad9; }
[data-structure="biceps"] { --swatch: #77c4b7; }
[data-structure="popliteus"] { --swatch: #8fafdf; }
[data-structure="lateral"] { --swatch: #c4cc81; }
.structure-detail {
  border-top: 1px solid #cfc8bc;
  margin-top: 25px;
  padding-top: 24px;
}
.structure-detail h3 {
  font-size: 1.65rem;
  font-weight: 400;
  margin: 10px 0;
}
.structure-detail p {
  margin: 10px 0;
}
.model-small {
  font: 13px/1.6 var(--sans);
  color: #6b655d;
}
.mechanism-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 55px 0;
  border-bottom: 1px solid #cfc8bc;
}
.injury-page h2 {
  font-weight: 400;
  line-height: 1.12;
}
.mechanism-section h2,
.model-evidence > h2 {
  font-size: 2.6rem;
  margin: 16px 0;
}
.mechanism-section p {
  max-width: 600px;
}
.mechanism-controls {
  padding: 28px;
  background: #242d30;
  color: #eee5d5;
  font: 14px/1.5 var(--sans);
}
.mechanism-controls label {
  display: block;
  font: 13px var(--sans);
  margin-bottom: 10px;
}
.mechanism-controls select {
  display: block;
  width: 100%;
  padding: 12px;
  background: #f9f6ef;
  color: #332f29;
  border: 1px solid #b8af9f;
  font: 14px var(--sans);
  margin-bottom: 25px;
}
.mechanism-controls output {
  display: block;
  margin-top: 6px;
  color: #edbe60;
}
.mechanism-controls input {
  width: 100%;
  accent-color: #926338;
}
.model-evidence {
  padding-top: 50px;
}
.model-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}
.model-evidence h3 {
  font-size: 1.5rem;
  font-weight: 400;
}
.model-source-strip {
  display: flex;
  gap: 30px;
  padding: 30px 0;
  margin: 20px 0;
  border-block: 1px solid #cfc8bc;
  align-items: center;
}
.model-source-strip img {
  width: 160px;
  height: 170px;
  object-fit: contain;
  background: #181e21;
}
.model-source-strip h3 {
  margin-top: 0;
}
.model-source-strip p {
  max-width: 750px;
}
.model-link {
  display: inline-block;
  margin-top: 20px;
  border-bottom: 1px solid currentColor;
}
.injury-page button:focus-visible,
.injury-page select:focus-visible,
.injury-page input:focus-visible {
  outline: 2px solid #936433;
  outline-offset: 3px;
}
@media (max-width: 850px) {
  .model-workspace {
    grid-template-columns: 1fr;
  }
  .mechanism-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .model-evidence-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #knee-model {
    height: 580px;
  }
  .injury-page {
    padding-top: 115px;
  }
  .model-source-strip {
    align-items: start;
  }
  .model-source-strip img {
    width: 100px;
    height: 120px;
  }
}
@media (max-width: 440px) {
  #knee-model {
    height: 520px;
  }
  .model-panel {
    padding: 22px;
  }
  .model-source-strip {
    flex-direction: column;
  }
  .model-view-heading {
    font-size: 9px;
    left: 15px;
    right: 15px;
  }
  .mechanism-controls {
    padding: 20px;
  }
}

/* A quiet studio keeps the real anatomical surfaces readable from every angle. */
.model-view { background: #111719; }
.model-stage {
  position: relative;
  background: radial-gradient(ellipse at 48% 43%, #354246 0%, #212b2e 34%, #111719 76%);
  isolation: isolate;
}
.model-view-heading { z-index: 2; line-height: 1.6; }
.model-view-heading > span:first-child { max-width: none; text-align: left; }
.model-status {
  position: absolute; z-index: 4; top: 42%; left: 12%; right: 12%;
  text-align: center; font: 15px/1.6 var(--sans); color: #f3e9d7;
  padding: 20px; background: #172022ee; border: 1px solid #647075;
}
.model-status[hidden], .model-callout[hidden] { display: none; }
.model-callout {
  position: absolute; z-index: 2; pointer-events: none; transform: translateX(-50%);
  max-width: 210px; padding: 6px 10px; background: #101719e8;
  border: 1px solid #87908b66; border-radius: 3px; color: #eee5d5;
  font: 11px/1.4 var(--sans); text-align: center;
}
.model-marker-note { position: absolute; bottom: 7px; left: 10px; right: 10px;
  text-align: center; pointer-events: none; color: #c4bbb0; font: 10px var(--sans); }
.model-marker-note span { display: inline-block; width: 7px; height: 7px; border: 1px solid #ffb19d;
  border-radius: 50%; margin-right: 6px; }
.model-view-controls { padding-top: 15px; }
.model-view-controls button { border-radius: 3px; }
.model-view-controls button[aria-pressed="true"] { background: #364349; border-color: #8b989c; }
.model-hint { color: #a8b4b7; }
.model-layers { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 4px 24px 0; }
.bone-toggle { padding: 0; white-space: nowrap; }
.opacity-control { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px;
  width: 190px; font: 11px var(--sans); }
.opacity-control output { color: #dfc994; }
.opacity-control input { grid-column: 1 / -1; width: 100%; accent-color: #c9b88e; }
.model-layer-note { text-align: center; margin: 14px 16px 22px; color: #9faeb0; font: 11px/1.5 var(--sans); }
.mechanism-controls { border-top: 1px solid #485053; background: #1e292d; }
.model-attribution { padding: 20px; background: #eae5db; }
@media (max-width: 440px) {
  .model-view-controls { gap: 5px; padding-inline: 10px; }
  .model-view-controls button { font-size: 11px; padding: 8px 10px; }
  .model-layers { gap: 20px; }
}
