.product-page {
  display: grid;
  gap: var(--space-7);
  padding-block: var(--space-4) var(--space-6);
}

.product-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.product-hero-text {
  grid-template-columns: minmax(0, 1fr);
}

.product-hero h1 {
  margin-block: var(--space-2);
  font-size: var(--text-poster);
}

/* Round 3: product pages (the book, teachers, designs, chapter index and plates) share the
 * book's poster face for headings and labels; reading text stays Open Flight Text. Tool
 * panels inside a page (.model-workbench) keep their compact headings. */
.product-page :is(h1, h2, h3):not(.model-workbench *) {
  font-family: var(--font-poster);
  letter-spacing: var(--tracking-poster);
  hyphens: auto;
}
.product-page h1:not(.model-workbench *) {
  font-weight: var(--weight-heavy);
  line-height: var(--leading-tight);
}
.product-page .eyebrow {
  color: var(--color-poster);
  font-family: var(--font-poster);
  letter-spacing: var(--tracking-signage);
}

.product-hero .lede {
  margin-block: var(--space-4) var(--space-5);
}

.product-art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-stage);
  overflow: hidden;
}

.product-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-4);
  margin-block: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.product-card {
  overflow: hidden;
}

.product-card .product-art {
  aspect-ratio: 16 / 9;
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

.product-card-copy {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.product-card-copy h2,
.product-card-copy h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.product-card-copy a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-target);
}

.product-card-copy p {
  margin: 0;
  color: var(--color-text-muted);
}

.product-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-7);
  border-block-start: var(--line-hair) solid var(--color-rule);
  padding-block-start: var(--space-5);
}

.product-sections h2 {
  margin-block-start: 0;
}

.product-sections h3 {
  margin-block: var(--space-4) var(--space-1);
}

@media (max-width: 680px) {
  .product-hero,
  .product-sections {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-hero {
    gap: var(--space-4);
  }
}

.model-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.56fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.model-workbench [hidden] {
  display: none !important;
}
.bench-panel {
  min-width: 0;
  padding: clamp(var(--space-4), 2vw, var(--space-5));
  border: var(--line-hair) solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sheet);
}
.model-workbench h1,
.model-workbench h2,
.model-workbench h3,
.model-workbench p {
  margin: 0;
}
.model-workbench h1 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}
.model-workbench h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
}
.model-workbench h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}
.bench-icon {
  display: inline-block;
  flex-shrink: 0;
  width: var(--size-icon);
  height: var(--size-icon);
}
.bench-panel h2 > .bench-icon {
  color: var(--color-selected);
}
.specimen-panel,
.controls-panel {
  align-self: stretch;
}
.specimen-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.specimen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.specimen-subtitle {
  font-family: var(--font-text);
  font-style: italic;
  color: var(--color-text-muted);
}
.specimen-modes {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
}
.specimen-modes button,
.step-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}
.model-stage {
  border: var(--line-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  min-width: 0;
  min-height: clamp(15rem, 26vw, 21rem);
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--color-surface-stage);
}
.model-poster,
.model-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  display: block;
}
.model-stage[data-family='butterfly'] .model-poster {
  inset: 8% 3%;
  width: 94%;
  height: 84%;
  transform: scale(var(--span-scale, 0.94));
  filter: drop-shadow(0 3px 2px color-mix(in srgb, var(--color-text) 13%, transparent));
}
.model-stage:not([data-family='butterfly']) .model-poster {
  filter: drop-shadow(0 var(--space-2) var(--space-2) color-mix(in srgb, var(--color-text) 15%, transparent));
}
.model-stage.stage-grid {
  --color-grid: color-mix(in srgb, var(--color-rule) 60%, transparent);
}
.model-canvas canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.stage-actions:has(.explore[hidden]):has(.specimen-scale:empty) {
  display: none;
}
.specimen-scale {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.specimen-scale:not(:empty)::before,
.specimen-scale:not(:empty)::after {
  content: '';
  width: var(--space-5);
  height: var(--space-1);
  border-inline: var(--line-hair) solid var(--color-border);
  border-block-end: var(--line-hair) solid var(--color-border);
}
.specimen-note,
.lesson-materials,
.step-check,
.origin-photo figcaption {
  color: var(--color-text-muted);
}
.materials-label {
  display: block;
  color: var(--color-text);
  font-size: var(--text-sm);
}
.model-workbench .specimen-note {
  max-width: var(--measure);
}
.controls-panel,
.fold-panel,
.origin-panel {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}
.controls-panel {
  grid-template-rows: auto;
  align-content: space-between;
}
.model-palette {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.model-palette legend {
  font-weight: var(--weight-bold);
  margin-block-end: var(--space-2);
  padding: 0;
}
.paint-grid,
.model-tools,
.print-actions,
.orbit-controls,
.sketch-tools {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}
.paint-grid button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-inline: var(--space-2);
  font: inherit;
  font-size: var(--text-xs);
}
.palette-chip {
  width: var(--space-5);
  height: var(--space-5);
  border-radius: var(--radius-round);
  border: var(--line-hair) solid var(--color-border);
}
.model-tools label,
.orbit-controls label,
.sketch-tools label {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.model-tools {
  align-items: end;
}
.model-tools label {
  flex: 1;
}
.model-workbench select,
.model-workbench input {
  min-height: var(--size-target);
  min-width: 0;
  max-width: 100%;
}
.bench-span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-weight: var(--weight-bold);
}
.span-range {
  width: 100%;
  margin-block: calc(0px - var(--space-3));
  accent-color: var(--color-selected);
}
.bench-span output {
  color: var(--color-selected);
  font-variant-numeric: tabular-nums;
}
.model-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-2);
  border-block: var(--line-hair) solid var(--color-rule);
  margin: 0;
}
.model-facts dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.model-facts dd {
  margin: 0;
  font-weight: var(--weight-bold);
}
.print-actions .button {
  width: 100%;
}
.stage-status:empty {
  display: none;
}
.sketch-board {
  width: 100%;
  padding: var(--space-3);
  min-width: 0;
  text-align: center;
}
.flight-sketch {
  width: 100%;
  height: auto;
  display: block;
}
.course-line {
  fill: none;
  stroke: var(--color-selected);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
}
.course-start {
  fill: var(--color-surface);
  stroke: var(--color-selected);
  stroke-width: 3;
}
.course-end {
  fill: var(--color-surface);
  stroke: var(--color-text-accent);
  stroke-width: 2;
}
.course-end circle + circle {
  fill: var(--color-text-accent);
}
.sketch-key {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
}
.sketch-key span::before {
  content: '';
  display: inline-block;
  border: 2px solid var(--color-selected);
  border-radius: var(--radius-round);
  width: var(--space-2);
  height: var(--space-2);
  margin-inline-end: var(--space-1);
}
.sketch-key span + span::before {
  border-color: var(--color-text-accent);
  background: var(--color-text-accent);
}
.sketch-tools {
  justify-content: center;
  align-items: end;
  margin-block: var(--space-3) var(--space-1);
}
.sketch-board small,
.book-span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.lesson-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lesson-steps li {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}
.lesson-steps li:not(:has(.step-picture)) {
  display: block;
}
.step-picture {
  display: grid;
  place-items: center;
  aspect-ratio: 1.8;
  background: var(--color-surface-stage);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.step-picture svg,
.lesson-pattern {
  width: 100%;
  max-height: 11rem;
  display: block;
  object-fit: contain;
}
.step-number,
.step-check {
  display: block;
  font-size: var(--text-xs);
}
.step-number {
  color: var(--color-text-accent);
  font-weight: var(--weight-bold);
}
.lesson-steps li p,
.lesson-steps li h3 {
  margin-block-start: var(--space-1);
}
.step-buttons {
  display: flex;
  gap: var(--space-2);
}
.origin-photo {
  margin: 0;
  position: relative;
}
.origin-photo img,
.origin-drawing {
  display: block;
  width: 100%;
  height: clamp(7rem, 13vw, 11rem);
  border-radius: var(--radius-md);
  object-fit: cover;
}
.origin-drawing {
  object-fit: contain;
  background: var(--color-surface-stage);
  padding: var(--space-2);
}
.origin-photo figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-target);
  font-size: var(--text-xs);
}
.bench-disclosure {
  border-block-start: 1px solid var(--color-rule);
  padding-top: var(--space-1);
}
.bench-disclosure summary,
.bench-downloads summary {
  cursor: pointer;
  padding-block: var(--space-2);
  min-height: var(--size-target);
  font-weight: var(--weight-bold);
  color: var(--color-text-link);
}
.bench-disclosure p + p {
  margin-top: var(--space-2);
}
.edition-files {
  display: grid;
  gap: var(--space-2);
}
.bench-downloads {
  border-block-start: 1px solid var(--color-rule);
}
.product-page:has(.model-workbench) {
  gap: var(--space-5);
}
.model-workbench:not([data-ready])
  :is(.model-palette, .specimen-modes, .stage-actions, .model-tools, .span-range, .bench-span) {
  display: none;
}
@media (max-width: 760px) {
  .model-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
  .model-stage {
    min-height: 0;
    aspect-ratio: 1.6;
  }
  .model-stage:has(.sketch-board:not([hidden])) {
    aspect-ratio: auto;
  }
  .controls-panel {
    align-content: start;
  }
}
@media (max-width: 480px) {
  .lesson-steps li {
    grid-template-columns: minmax(0, 1fr);
  }
  .step-picture {
    max-height: 9rem;
  }
  .specimen-modes button {
    padding-inline: var(--space-2);
  }
}
