/* DEC-171: compact mobile previews. Full records and desktop copy stay editable. */
.certificate-details171 { margin-block: 12px; }
.certificate-details171 > summary { display: none; }
.card-attributes171 > summary { display: none; }
@media (max-width: 700px) {
  /* No fixed card height or text clipping: names and essential information wrap. */
  body #main :is(.card, .mm-card, .completion-card, .ed122-entry, .r104-card,
    .author153-card, .about-tile, .buyer-guide-card) {
    min-height: 0;
    height: auto;
    overflow-wrap: anywhere;
  }
  body.home #main #product_families .product-series-card { min-height: 0; }
  body #main :is(.card-content, .completion-card-body, .about-tile-copy,
    .buyer-guide-content, .author153-card-copy) { padding: 16px 16px var(--ty182-card-inset,20px); gap: 12px; }
  body #main :is(.mm-card, .r104-card) { padding: 16px 16px var(--ty182-card-inset,20px); gap: 12px; }
  body #main .ed122-entry-copy { padding: 16px 0 0; }
  body #main :is(.card, .completion-card, .mm-card, .r104-card, .ed122-entry,
    .author153-card, .about-tile, .buyer-guide-card) h3 {
    min-height: 0; margin-block: 0 8px; line-height: 1.35;
  }
  body #main :is(.card, .completion-card, .mm-card, .r104-card, .ed122-entry,
    .author153-card, .about-tile, .buyer-guide-card) p {
    margin-block: 0 12px; line-height: 1.5;
  }
  /* List previews retain titles, classification and actions; the destination
     contains the complete description. Unlinked explanatory cards keep prose. */
  body #main .product-series-card > .card-content > p,
  body #main #product-results .card > .card-content > p,
  body #main .ed122-entry > .ed122-entry-copy > p,
  body #main .r104-card > p,
  body #main .author153-card > .author153-card-copy > p:not(.author153-meta),
  body #main .completion-articles .completion-card-body > p,
  body #main .resource-article .card-content > p,
  body #main [data-mm-result-cards] .mm-card > p:first-of-type,
  body #main [data-mm-site-results] .mm-card > p:last-of-type,
  body #main .mm-grid:not([data-mm-result-cards]):not([data-mm-site-results]) > .mm-card:has(> .mm-link) > p,
  body #main .buyer-guide-content > p { display: none; }
  body #main :is(.card-image, .completion-card-image, .card124-media,
    .ed122-media, .buyer-guide-image, .author153-media) {
    /* DEC294: adapt the preview height to its width; never turn full-width
       photos into a fixed-height strip. Product/document rules below stay separate. */
    height: auto !important; min-height: 0 !important;
    max-height: none !important; aspect-ratio: 3 / 2 !important;
  }
  body #main .product-series-card .card-image,
  body #main #product-results .card-image {
    height: 144px !important; min-height: 0 !important;
    max-height: none !important; aspect-ratio: auto !important;
  }
  body #main :is(.card-image, .completion-card-image, .card124-media,
    .ed122-media, .buyer-guide-image, .author153-media) img {
    width: 100%; height: 100%; object-fit: contain;
  }
  /* Complete equipment views, with the same frame at every mobile width. */
  body.home #main #industries .card-image {
    height: auto !important; min-height: 0 !important;
    max-height: none !important; aspect-ratio: 4 / 3 !important;
  }
  body.home #main #product_families .card-image img,
  body #main .product-series-card .card-image img,
  body #main #product-results .card-image img { object-fit: contain; }
  body #main .product-card-tags {
    display: flex; flex-wrap: wrap; gap: 4px 8px; margin-block: 0 8px; padding: 0;
  }
  body #main .product-card-tags li { margin: 0; padding: 4px 8px; line-height: 1.4; }
  /* Related recommendations already omit chips on mobile; do not reintroduce them. */
  body #main .product-section .product-series-card .product-card-tags { display: none; }
  body #main :is(.product-series-card, #product-results .card) .text-link {
    display: inline-flex; align-items: center; min-height: 44px; margin-top: 0;
  }
  body #main .ed122-entry .ed122-icon { width: 32px; height: 32px; margin-bottom: 8px; }
  body #main .ed122-entry .ed122-icon svg { width: 22px; height: 22px; }
  /* A photo and a title already identify these subjects on a small screen. */
  body #main :is(.ed122-icon, .ve118-icon, .performance-icon) { display: none; }
  body #main .mm-card > .card124-media { margin: 0 !important; }
  body #main .ve118-card-title { margin: 0; }
  body #main .ed122-entry .ed122-title { min-height: 44px; }
  body #main .r104-card h3 { margin-block: 8px 12px; }
  body #main .r104-card-foot { padding-top: 8px; }
  body #main .r104-card > .card124-media { margin-bottom: 12px; }
  body #main .author153-card-copy :is(small, time, .author153-meta) { padding-top: 8px; }
  body #main .about-cert-image,
  body #main #certificate-library .about-cert-image {
    height: 168px !important; min-height: 0 !important;
    aspect-ratio: auto !important; padding: 12px !important;
  }
  body #main .about-cert-image img { width: 100%; height: 100%; object-fit: contain; }
  body #main .certificate-details171 { margin-block: 8px; text-align: left; }
  body #main .certificate-details171 > summary,
  body #main .card-attributes171 > summary {
    display: list-item; cursor: pointer; min-height: 44px; padding-block: 10px;
    color: var(--blue, #1d2297); font-weight: 600;
  }
  body #main .certificate-details171 > summary:focus-visible,
  body #main .card-attributes171 > summary:focus-visible {
    outline: 3px solid #557bfa; outline-offset: 3px;
  }
  body #main .certificate-actions { margin-top: 8px; gap: 8px 16px; flex-wrap: wrap; }
  body #main .certificate-actions :is(a, button) {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  body #main .completion-team .completion-portrait {
    height: 168px; min-height: 0; aspect-ratio: auto;
  }
  body #main .completion-team .completion-portrait img {
    width: 100%; height: 100%; object-fit: contain;
  }
  body #main :is(.about-location-image, .about-culture-image) {
    height: auto !important; min-height: 0 !important; aspect-ratio: 3 / 2 !important;
  }
  body #main :is(.about-location-image, .about-culture-image) img {
    width: 100%; height: 100%; object-fit: contain;
  }
  body #main .p134-application-image {
    height: 128px !important; min-height: 0; aspect-ratio: auto !important;
  }
  body #main .p134-application-image img { width: 100%; height: 100%; object-fit: cover; }
  body #main .p134-standards figure {
    height: 168px !important; min-height: 0; aspect-ratio: auto !important;
  }
  body #main .p134-standards figure img { width: 100%; height: 100%; object-fit: contain; }
  body #main :is(.about-advantage, .about-locations article, .cases132-copy,
    .p134-standards article, .product-document-cards > article) {
    min-height: 0; height: auto; padding: 16px;
  }
  body #main .cases132-art { width: 100%; height: 128px; object-fit: cover; }
  body #main [data-mm-result-cards] .mm-card .card-attributes171 { margin: 0; }
  body #main [data-mm-result-cards] .mm-card > details > summary {
    min-height: 44px; padding-block: 10px; cursor: pointer;
  }
  body #main [data-mm-result-cards] .mm-card .card-attributes171 > dl { margin: 0; }
  body #main [data-mm-result-cards] .mm-card .card-attributes171 > dl > div {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px;
    padding-block: 8px; overflow-wrap: anywhere;
  }
  body #main [data-mm-result-cards] .mm-card .card-attributes171 > dl :is(dt, dd) { margin: 0; }
  body #main .buyer-guide-links { margin-block: 0 12px; }
  body #main .buyer-guide-links a { min-height: 44px; padding-block: 8px; }
  body #main .buyer-guide-content > .text-link { min-height: 44px; }
  body #main :is(.cards, .mm-grid, .completion-grid, .about-certificate-grid,
    .buyer-guide-grid, .r104-result-grid, .r104-related-grid, .author153-grid) {
    row-gap: 24px;
  }
  body #main :is(.about-track, .industry-track, .author153-track) { align-items: start; }
  body #main :is(.about-track, .certificate-track150, .about-certificate-grid) {
    align-items: start !important;
  }
  body #main :is(.about-track, .certificate-track150) > .about-tile {
    height: auto !important; min-height: 0;
  }
  body.home #main #industries .industry-track > .card,
  body.home #main #industries .industry-track > .card:last-child { height: auto; min-height: 0; }
}

/* Explicit product preferences apply on compact mobile cards too. */
@media(max-width:700px){body #main .product-section .product-series-card .product-card-tags[data-display174="configured"]{display:flex;flex-wrap:wrap;gap:4px 8px}body #main .product-card-tags[data-display174="configured"] li{max-width:100%;overflow-wrap:anywhere;white-space:normal}}
