/* Parallel fact groups share a measure; a parameter's label and value need not. */
@media (min-width: 981px) {
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout > .spec-block {
    display: grid;
    grid-template-rows: auto 1fr;
    align-self: stretch;
    min-inline-size: 0;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout .spec-table {
    display: grid;
    align-content: stretch;
    gap: 0;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout .spec-table > div {
    display: grid;
    grid-template-columns: minmax(0, 0.31fr) minmax(0, 0.69fr);
    align-items: baseline;
    gap: clamp(10px, 1vw, 16px);
    padding-block: 10px;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout .spec-table > div > :is(span, p) {
    margin: 0;
    min-inline-size: 0;
    overflow-wrap: break-word;
  }
}

@media (min-width: 861px) {
  body[data-af-page="gauze"] .spec-parameter-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  body[data-af-page="gauze"] .spec-parameter-groups > table {
    align-self: stretch;
    min-inline-size: 0;
  }
}

/* Keep comparable photos and mode cards in equal tracks without imposing an
   artificial height when a narrow viewport stacks them. */
@media (min-width: 981px) {
  body[data-af-page="airjet"] .airjet-machine-view-grid,
  body[data-af-page="waterjet"] .frame-structure-grid,
  body[data-af-page="rapier"] .field-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

body[data-af-page="home"] #fabrics .production {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  aspect-ratio: 1280 / 762;
}

/* Wide spread: both sides establish a single row. The photograph sets a
   minimum from its width; translated copy can still grow without clipping. */
@media (min-width: 1200px) {
  #fabrics .shell.guide {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    align-items: stretch;
    column-gap: clamp(1.25rem, 2.15vw, 2rem);
  }
  body[data-af-page="home"] #fabrics .production {
    align-self: stretch;
    aspect-ratio: auto;
  }
  #fabrics .production::before { content: ''; display: block; padding-block-start: 56%; }
  #fabrics .production img { object-position: 58% 52%; }
  #fabrics .guide > .production + div {
    display: flex; flex-direction: column; align-self: stretch; min-inline-size: 0;
  }
  #fabrics .guide h2 { margin-block: .14rem .5rem; }
  #fabrics .fabric-list {
    display: grid; grid-template-rows: repeat(4, auto); flex: 1;
  }
  #fabrics .fabric-row {
    grid-template-columns: minmax(7rem, 21%) minmax(0, 1fr);
    gap: .7rem;
    min-block-size: 0;
    padding-block: .32rem;
  }
  #fabrics .fabric-use { gap: .08rem; }
  #fabrics .fabric-row b, #fabrics .fabric-use strong, #fabrics .fabric-use > span {
    font-size: var(--af-type-action, .9375rem);
  }
  #fabrics .fabric-use strong { line-height: var(--af-lead-small); }
  #fabrics .fabric-use > span { line-height: var(--af-lead-small); }
}
/* At laptop widths keep the full measure for each tip. The category and
   example share a line where they fit; the advice starts underneath. */
@media (min-width: 1200px) and (max-width: 1380px) {
  #fabrics .fabric-row { display: block; align-content: center; }
  #fabrics .fabric-row b { margin-inline-end: .45em; padding-inline-end: .55em; border-inline-end: 1px solid #a9bdcb; }
  #fabrics .fabric-use { display: contents; }
  #fabrics .fabric-use strong { font-weight: 500; }
  #fabrics .fabric-use > span { display: block; margin-block-start: .12rem; }
}
@media (min-width: 621px) and (max-width: 1199px) {
  #fabrics .shell.guide { grid-template-columns: minmax(0,1fr); gap: 1rem; max-inline-size: 50rem; }
  body[data-af-page="home"] #fabrics .production { aspect-ratio: 2 / 1; }
  #fabrics .fabric-row { grid-template-columns: minmax(8rem,24%) minmax(0,1fr); }
}

@media (min-width: 1200px) and (max-width: 1340px) {
  #fabrics .fabric-use > span { display: inline; margin-block: 0; margin-inline-start: .3em; }
}

@media (max-width: 760px) {
  /* The source stylesheet marks its mobile padding as important. */
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout {
    gap: 10px !important;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout > .spec-block {
    padding: 12px 14px !important;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout .spec-table > div {
    padding-block: 8px !important;
  }
  body[data-af-page="waterjet"] #waterjet-specs .spec-layout .spec-table > div:last-child {
    padding-block-end: 0 !important;
  }
  body[data-af-page="gauze"] .spec-parameter-groups {
    gap: 10px;
  }
}
