/**
 * Spec detail modal — shares lightbox dialog/backdrop/close; scrollable body (Figma 286:953).
 * Vertical margin: 16px top + 16px bottom → panel max-height calc(100dvh - 32px).
 */

.tf-lightbox-modal__wrap.tf-specs-modal__wrap {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px;
}

.tf-specs-modal__panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: min(1200px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border: 1.238px solid rgb(255 255 255 / 0.4);
  border-radius: 0;
  overflow: hidden;
}

/* Close above scroll + dock (Figma 309:2673) */
.tf-specs-modal__panel .tf-lightbox-modal__close {
  top: 24px;
  right: 24px;
  z-index: 4;
  transform: none;
  transition:
    top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Vertically center close in 128px sticky header while dock is shown */
.tf-specs-modal__panel.tf-specs-modal__panel--dock-visible .tf-lightbox-modal__close {
  top: 64px;
  transform: translateY(-50%);
}

/* Compact title bar — slides in when hero title scrolls out (Figma 309:2801) */
.tf-specs-modal__dock {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 128px;
  padding: 0 100px 0 64px;
  background: #1a1a1a;
  border-bottom: 1px solid rgb(255 255 255 / 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s;
}

.tf-specs-modal__dock.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.tf-specs-modal__dock-title {
  margin: 0;
  font-family: var(--font-family-headline);
  font-weight: var(--font-weight-headline);
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.1;
  color: var(--color-white);
  text-transform: uppercase;
}

.tf-specs-modal__scroll {
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 96px 64px 80px;
  -webkit-overflow-scrolling: touch;
}

.tf-specs-detail[hidden] {
  display: none !important;
}

.tf-specs-detail {
  display: flex;
  flex-direction: column;
  gap: 72px;
  color: var(--color-white);
}

.tf-specs-detail__title {
  margin: 0;
  font-family: var(--font-family-headline);
  font-weight: var(--font-weight-headline);
  font-size: clamp(36px, 8vw, 80px);
  line-height: 1.1;
  color: var(--color-white);
  text-transform: uppercase;
}

.tf-specs-detail__lead {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-l);
  line-height: 25px;
}

.tf-specs-detail__accent {
  color: var(--color-orange);
}

.tf-specs-detail__body {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  max-width: 65ch;
}

.tf-specs-detail__body--wide {
  max-width: 1035px;
}

.tf-specs-detail__section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tf-specs-detail__section-title {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-l);
  line-height: 25px;
  font-weight: 400;
}

.tf-specs-detail__subsection-title {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-l);
  line-height: 25px;
  font-weight: 400;
}

.tf-specs-detail__subsection-title + .tf-specs-detail__chart-caption {
  margin-top: -8px;
}

.tf-specs-detail__chart-caption {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  color: var(--color-white);
}

.tf-specs-detail__list {
  margin: 0;
  padding-left: 1.25em;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
}

.tf-specs-detail__list li {
  margin-bottom: 0;
}

.tf-specs-detail__list li + li {
  margin-top: 0;
}

.tf-specs-detail__figure {
  margin: 0;
  width: 100%;
}

.tf-specs-detail__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: contain;
}

.tf-specs-detail__figure .tf-lightbox,
.tf-specs-detail__figure .tf-lightbox--media {
  width: 100%;
}

.tf-specs-detail__inline-img .tf-lightbox {
  width: 100%;
}

.tf-specs-detail__inline-img .tf-lightbox img {
  width: 100%;
  height: auto;
}

.tf-specs-detail__wing-area-chart .tf-lightbox img {
  border-radius: 0;
}

/* Wing planform diagram — images/wing-dimensions.svg (Figma 286:1066) */
.tf-specs-detail__planform {
  position: relative;
  width: 100%;
  min-height: 120px;
  aspect-ratio: 1072 / 360;
  max-height: 360px;
}

.tf-specs-detail__planform .tf-specs-detail__planform-img {
  border-radius: 0;
}

.tf-specs-detail__planform-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  object-position: left top;
}

/* Wing Area Chart.svg */
.tf-specs-detail__wing-area-chart {
  width: 100%;
  max-width: 1072px;
}

.tf-specs-detail__wing-area-chart img {
  border-radius: 0;
}

/* Wing geometry — text + analysis photo (two columns) */
.tf-specs-detail__wing-specs-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(20px, 3vw, 40px);
  width: 100%;
}

.tf-specs-detail__wing-specs-col {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tf-specs-detail__wing-analysis-photo {
  flex: 0 1 420px;
  width: auto;
  max-width: min(420px, 100%);
  margin: 0;
  align-self: flex-start;
}

.tf-specs-detail__wing-analysis-photo .tf-lightbox img {
  border-radius: 8px;
}

@media (max-width: 720px) {
  .tf-specs-detail__wing-specs-row {
    flex-direction: column;
  }

  .tf-specs-detail__wing-analysis-photo {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }

  .tf-specs-detail__wing-analysis-photo .tf-lightbox {
    width: 100%;
  }
}

/* Electric propulsion (Figma 286:1416) */
.tf-specs-detail__eyebrow {
  margin: 0;
  font-family: var(--font-family-headline);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 57.753px);
  line-height: 1.1;
  color: var(--color-orange);
}

.tf-specs-detail__eyebrow--shout {
  text-transform: uppercase;
}

.tf-specs-detail__block-title {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 25px;
  font-weight: 400;
  color: var(--color-white);
}

.tf-specs-detail__component-head {
  margin: 0 0 16px;
  font-family: var(--font-family-body);
  font-size: var(--type-body-l);
  line-height: 25px;
  font-weight: 400;
  color: var(--color-white);
}

.tf-specs-detail__component-head strong {
  font-weight: 700;
}

.tf-specs-detail__stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 1035px;
}

.tf-specs-detail__stack .tf-specs-detail__body {
  max-width: 609px;
}

.tf-specs-detail__inline-img {
  margin: 0;
  max-width: 100%;
}

.tf-specs-detail__inline-img img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: 8px;
}

.tf-specs-detail__figure--half {
  width: 50%;
  max-width: 50%;
}

.tf-specs-detail__figure--half img {
  width: 100%;
  height: auto;
}

/* Electric propulsion — constraints strip: full width; other formulas use 270px below */
.tf-specs-detail__figure--formula-fullwidth {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.tf-specs-detail__figure--formula-fullwidth img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}

/* Inline P=IV / I=P/V formulas: 270px width, sharp corners */
.tf-specs-detail__inline-img--formula img {
  border-radius: 0;
}

.tf-specs-detail__inline-img--half {
  max-width: 50%;
  width: 50%;
}

.tf-specs-detail__inline-img--half img {
  width: 100%;
  height: auto;
}

.tf-specs-detail__inline-img--half.tf-specs-detail__inline-img--formula {
  width: min(100%, 270px);
  max-width: 270px;
}

.tf-specs-detail__figure--pitch-score-chart {
  width: min(100%, 520px);
  max-width: 520px;
}

.tf-specs-detail__figure--pitch-score-chart .tf-lightbox,
.tf-specs-detail__figure--pitch-score-chart .tf-lightbox img {
  width: 100%;
}

.tf-specs-detail__figure--prop img,
.tf-specs-detail__figure--prop video {
  border-radius: 64px;
}

.tf-specs-detail__figure--prop .tf-lightbox--media {
  border-radius: 64px;
  overflow: hidden;
}

.tf-specs-detail__figure--prop video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-black);
}

/* Key Components — Propeller: text column + video column (grid; reliable vs float inside flex sections) */
.tf-specs-detail__propulsion-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
  width: 100%;
}

.tf-specs-detail__propulsion-intro-text {
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tf-specs-detail__propulsion-intro-text .tf-specs-detail__component-head {
  margin-bottom: 0;
}

.tf-specs-detail__propulsion-intro-text p {
  margin: 0;
}

.tf-specs-detail__figure--propulsion-intro-media {
  margin: 0;
  width: 100%;
  max-width: min(560px, 100%);
  justify-self: end;
}

.tf-specs-detail__figure--propulsion-intro-media video {
  width: 100%;
  height: auto;
}

/* Key Components propeller clip: 16px corners (overrides .figure--prop 64px pill) */
.tf-specs-detail__figure--propulsion-intro-media.tf-specs-detail__figure--prop video,
.tf-specs-detail__figure--propulsion-intro-media.tf-specs-detail__figure--prop .tf-lightbox--media {
  border-radius: 16px;
}

@media (max-width: 767px) {
  .tf-specs-detail__propulsion-intro-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tf-specs-detail__figure--propulsion-intro-media {
    justify-self: stretch;
    max-width: 100%;
  }
}

/* Key Components — Motor: text column (~60%) + motor photo (right) */
.tf-specs-detail__propulsion-motor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
  width: 100%;
}

.tf-specs-detail__propulsion-motor-text {
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tf-specs-detail__propulsion-motor-text .tf-specs-detail__component-head {
  margin-bottom: 0;
}

.tf-specs-detail__propulsion-motor-text p,
.tf-specs-detail__propulsion-motor-text ol {
  margin: 0;
}

.tf-specs-detail__figure--propulsion-motor-media {
  margin: 0;
  width: 100%;
  max-width: min(420px, 100%);
  justify-self: end;
}

.tf-specs-detail__figure--propulsion-motor-media img {
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .tf-specs-detail__propulsion-motor-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tf-specs-detail__figure--propulsion-motor-media {
    justify-self: stretch;
    max-width: 100%;
  }
}

/* PoD chart + prop blade photo — side by side on desktop */
.tf-specs-detail__propulsion-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
  width: 100%;
}

.tf-specs-detail__propulsion-pair .tf-specs-detail__figure--pitch-score-chart {
  width: 100%;
  max-width: none;
}

.tf-specs-detail__propulsion-pair .tf-specs-detail__figure--propulsion-pair-prop img {
  border-radius: 16px;
}

@media (max-width: 767px) {
  .tf-specs-detail__propulsion-pair {
    grid-template-columns: 1fr;
  }
}

/* Tails — Control Surfaces: split elevators video + aircraft diagram side by side */
.tf-specs-detail__tail-control-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
  width: 100%;
}

.tf-specs-detail__tail-control-pair > .tf-specs-detail__figure {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 767px) {
  .tf-specs-detail__tail-control-pair {
    grid-template-columns: 1fr;
  }
}

/* Battery: LiPo photo (left) + cells vs score chart (right) — flex so global figure { width:100% } can't force stacking */
.tf-specs-detail__battery-pair {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  width: 100%;
}

.tf-specs-detail__battery-pair > .tf-specs-detail__figure {
  width: auto;
  margin: 0;
}

.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-photo {
  flex: 0 1 auto;
  max-width: min(400px, 42%);
  min-width: 0;
}

.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-chart {
  flex: 1 1 0;
  min-width: 0;
}

.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-chart img,
.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-chart .tf-lightbox {
  border-radius: 0;
}

.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-chart img {
  width: 100%;
  height: auto;
}

.tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-photo .tf-lightbox {
  width: 100%;
}

@media (max-width: 599px) {
  .tf-specs-detail__battery-pair {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .tf-specs-detail__battery-pair > .tf-specs-detail__figure {
    width: 100%;
    max-width: 100%;
  }

  .tf-specs-detail__battery-pair .tf-specs-detail__figure--battery-photo {
    max-width: 100%;
  }
}

.tf-specs-detail__list--ordered {
  list-style: decimal;
  padding-left: 1.5em;
}

.tf-specs-detail__table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tf-specs-detail__data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  color: var(--color-white);
}

.tf-specs-detail__data-table th,
.tf-specs-detail__data-table td {
  padding: 8px 16px 8px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(255 255 255 / 0.4);
}

.tf-specs-detail__data-table th {
  font-size: var(--type-body-l);
  font-weight: 400;
}

.tf-specs-detail__data-table td:last-child,
.tf-specs-detail__data-table th:last-child {
  min-width: 12rem;
}

.tf-specs-detail__data-table a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tf-specs-detail__data-table a:hover,
.tf-specs-detail__data-table a:focus-visible {
  color: var(--color-orange);
}

/* Structures spec — bordered photo cards (Figma 292:1868) */
.tf-specs-detail__structures-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.tf-specs-detail__structures-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  /* Match tallest sibling in each row (side-by-side cards share one height) */
  align-items: stretch;
  width: 100%;
}

.tf-specs-detail__structures-row > .tf-specs-detail__structures-card:only-child {
  flex: 0 1 512px;
  max-width: min(512px, 100%);
}

/* Wing + vertical tail: left column stacked cards, right column assembly video */
.tf-specs-detail__structures-row--wing-tail {
  align-items: stretch;
}

.tf-specs-detail__structures-stack {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1 1 280px;
  min-width: 0;
  max-width: calc(50% - 16px);
}

.tf-specs-detail__structures-stack .tf-specs-detail__structures-card {
  max-width: 100%;
}

.tf-specs-detail__structures-row--wing-tail .tf-specs-detail__structures-card--wing-video {
  flex: 1 1 280px;
  max-width: calc(50% - 16px);
  min-width: 0;
}

.tf-specs-detail__structures-card--wing-video .tf-lightbox--media video {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 720px) {
  .tf-specs-detail__structures-row--wing-tail {
    flex-direction: column;
  }

  .tf-specs-detail__structures-row--wing-tail .tf-specs-detail__structures-stack,
  .tf-specs-detail__structures-row--wing-tail .tf-specs-detail__structures-card--wing-video {
    max-width: 100%;
  }
}

.tf-specs-detail__structures-card {
  box-sizing: border-box;
  flex: 1 1 280px;
  min-width: 0;
  max-width: calc(50% - 16px);
  padding: 24px 32px;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tf-specs-detail__structures-card-heading {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  font-weight: 700;
  color: var(--color-white);
}

.tf-specs-detail__structures-card-caption {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  color: var(--color-white);
}

.tf-specs-detail__structures-card .tf-specs-detail__figure {
  margin: 0;
  width: 100%;
}

/* Tool coat card: crop portrait photo to same aspect ratio / height as sibling landscape mold photos */
.tf-specs-detail__structures-card--tool-coat .tf-specs-detail__figure {
  aspect-ratio: 4096 / 2731;
  overflow: hidden;
  border-radius: 16px;
}

.tf-specs-detail__structures-card--tool-coat .tf-lightbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tf-specs-detail__structures-card .tf-lightbox img {
  border-radius: 16px;
}

.tf-specs-detail__structures-card .tf-lightbox--media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Full-width bordered photo in prose (e.g. Layup Schedule) — matches .tf-specs-detail__structures-card frame */
.tf-specs-detail__structures-photo-block {
  box-sizing: border-box;
  margin-top: 40px;
  padding: 24px 32px;
  width: 100%;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tf-specs-detail__structures-photo-block .tf-specs-detail__figure {
  margin: 0;
  width: 100%;
}

.tf-specs-detail__structures-photo-block .tf-lightbox img {
  border-radius: 16px;
}

.tf-specs-detail__cfd-lead {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-family-body);
  font-size: var(--type-body-xs);
  line-height: 25px;
  color: var(--color-white);
}

.tf-specs-detail__table-wrap--cfd {
  max-width: 508px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

@media (max-width: 640px) {
  .tf-lightbox-modal__wrap.tf-specs-modal__wrap {
    padding: 16px 12px;
  }

  .tf-specs-modal__scroll {
    padding: 88px 24px 48px;
  }

  .tf-specs-modal__panel .tf-lightbox-modal__close {
    top: 16px;
    right: 16px;
  }

  .tf-specs-modal__panel.tf-specs-modal__panel--dock-visible .tf-lightbox-modal__close {
    top: 48px;
    transform: translateY(-50%);
  }

  .tf-specs-modal__dock {
    min-height: 96px;
    padding: 0 88px 0 24px;
  }

  .tf-specs-detail {
    gap: 48px;
  }

  .tf-specs-detail__structures-card {
    max-width: 100%;
    flex: 1 1 100%;
  }
}
