/* G keeps the scoped reading controls and typography of F. */
.technical-page .technical-detail-layout.f-layout.g-layout {
  width: min(1560px, calc(100% - 48px));
  max-width: none;
  gap: 32px;
}

@media (min-width: 1280px) {
  .technical-page .technical-detail-layout.f-layout.g-layout {
    grid-template-columns: 200px minmax(0, 900px) 342px;
  }

  .technical-page .technical-detail-layout.f-layout.g-layout:not(:has(> .f-rail)) {
    grid-template-columns: minmax(0, 900px) 342px;
  }
}

@media (1280px <= width <= 1520px) {
  .technical-page .technical-detail-layout.f-layout.g-layout {
    width: calc(100% - 40px);
    grid-template-columns: 192px minmax(0, 900px) 342px;
    gap: 26px;
  }
}

@media (1001px <= width < 1280px) {
  .technical-page .technical-detail-layout.f-layout.g-layout {
    width: min(1360px, calc(100% - 48px));
    grid-template-columns: minmax(0, 1fr) 342px;
    gap: 36px;
  }
}

/* The shared flexible verification widget needs 300px inside the card. */
@media (max-width: 381px) {
  .technical-page .g-layout.f-layout .technical-article-inquiry {
    width: max(100%, min(334px, calc(100vw - 16px)));
    margin-inline: min(0px, calc((100% - min(334px, calc(100vw - 16px))) / 2));
    padding-inline: clamp(0px, calc((100vw - 318px) / 2), 16px);
  }
}

.g-layout > .technical-article {
  container: article-g / inline-size;
}

/* Fit the real image proportions inside the reading width. */
.technical-page .g-layout.f-layout .technical-article .native-article-figure {
  width: 100%;
  max-width: 680px;
  margin: 28px auto 34px;
}

.technical-page .g-layout.f-layout .technical-article .native-article-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  margin: 0 auto;
  object-fit: contain;
}

.technical-page .g-layout.f-layout .technical-article .native-article-figure figcaption {
  text-align: center;
  overflow-wrap: anywhere;
}

.technical-page .g-layout.f-layout .technical-article .f-hero .native-article-figure {
  max-width: 720px;
  margin: 0 auto;
}

.g-layout .g-hero-split {
  display: grid;
  grid-template-columns: minmax(0, min(53%, 430px)) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  margin-bottom: 32px;
}

.g-layout .g-hero-split > * {
  min-width: 0;
}

.g-layout .g-hero-lead {
  overflow-wrap: anywhere;
}

.g-layout .g-hero-lead > p:last-child,
.g-layout .g-hero-lead > :last-child p:last-child {
  margin-bottom: 0;
}

.technical-page .g-layout.f-layout .technical-article .g-hero-split .f-hero {
  margin: 0;
}

.technical-page .g-layout.f-layout .technical-article .g-hero-split .f-hero .native-article-figure {
  max-width: 430px;
}

.technical-page .g-layout.f-layout .technical-article .g-hero-split .f-hero .native-article-figure img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: var(--g-hero-focus, center);
}

.technical-page .g-layout.f-layout[data-g-hero-fit="contain"] .technical-article .g-hero-split .f-hero .native-article-figure img {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

@container article-g (max-width: 730px) {
  .g-layout .g-hero-split {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 20px;
  }
}

/* Keep adjacent figures together; never combine media across authored text. */
.technical-page .g-layout.f-layout .technical-article :is(.g-media-group, .native-article-media-group) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
  margin: 28px 0 34px;
}

.technical-page .g-layout.f-layout .technical-article :is(.g-media-group, .native-article-media-group) .native-article-figure {
  max-width: none;
  margin: 0;
}

@container article-g (min-width: 640px) {
  .technical-page .g-layout.f-layout .technical-article :is(
    .g-media-group[data-g-media-count="3"],
    .native-article-media-group:has(> :nth-child(3):last-child)
  ) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container article-g (min-width: 860px) {
  .technical-page .g-layout.f-layout .technical-article .native-article-media-group[data-columns="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container article-g (max-width: 460px) {
  .technical-page .g-layout.f-layout .technical-article :is(.g-media-group, .native-article-media-group) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Remove only the verified blank edge bands in two existing diagrams. */
.technical-page .g-layout.f-layout .technical-article .native-article-figure img[src$="/exec-ccefb52f-c84d-4565-bfe0-bde7aef3ce72_800x600.webp"] {
  width: 100%;
  aspect-ratio: 800 / 513;
  object-fit: cover;
  object-position: center 38%;
}

.technical-page .g-layout.f-layout .technical-article .native-article-figure img[src$="/07-stage-resolved-trial-record.webp"] {
  width: min(100%, 680px);
  aspect-ratio: 1536 / 932;
  object-fit: cover;
  object-position: center;
}

/* Native tables already have an outer frame. Only the outer frame owns margins. */
.technical-page .g-layout.f-layout .technical-article .sct-table-frame:has(> .f-table) {
  margin: 24px 0 28px;
}

.technical-page .g-layout.f-layout .technical-article .sct-table-frame > .f-table {
  margin: 0;
  border: 0;
  border-radius: 0;
}
