/* The header selects its arrangement against the actual translated link widths. */
.header .header-actions .language-picker {
  width: auto;
  max-width: none;
  max-inline-size: none;
  padding-inline: 10px 26px;
  min-height: 42px;
}
.header .header-actions {flex-shrink: 0}
.header .nav > .wontide-primary-links {flex-wrap: nowrap}
.header .nav > .wontide-primary-links > a {white-space: nowrap; overflow-wrap: normal; flex-shrink: 0}
.header[data-nav-mode="row"] .nav {
  display: flex !important;
  margin-inline-start: auto;
  position: static;
  min-inline-size: 0;
}
.header[data-nav-mode="row"] .header-actions {margin: 0}
.header[data-nav-mode="row"] .header-contact {display: inline-flex}
.header[data-nav-mode="row"] .menu-toggle {display: none !important}
.header[data-nav-mode="menu"] .menu-toggle {display: flex !important; align-items: center}
.header[data-nav-mode="menu"] .header-actions {margin-inline-start: auto}
.header[data-nav-mode="menu"] .header-contact,
.header[data-nav-mode="menu"] .nav {display: none !important}
.header[data-nav-mode="menu"] .nav.is-open {
  display: block !important;
  position: absolute;
  inset: 100% 0 auto;
  margin: 0;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: white;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 .5rem 1rem rgba(16,41,58,.1);
  max-block-size: calc(100dvh - 6rem);
  overflow-y: auto;
}
.header[data-nav-mode="menu"] .nav.is-open > .wontide-primary-links {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr));
  gap: .25rem 1rem;
}
.header[data-nav-mode="menu"] .nav.is-open a {
  white-space: normal;
  padding: .7rem .2rem;
}
@media (max-width: 460px) {
  .header[data-nav-mode="menu"] {padding-inline: 12px; gap: 8px}
  .header[data-nav-mode="menu"] .header-actions {gap: 8px}
  .header[data-nav-mode="menu"] .brand, .header[data-nav-mode="menu"] .official-logo {width: clamp(65px, 22vw, 93px)}
}
/* The measurement pass is synchronous and removed before painting. Padding, font and gap inherit from the real header. */
.header[data-nav-mode] .nav.nav-measure,
.header .nav.nav-measure {
  position: absolute !important; display: flex !important; inset: auto !important;
  visibility: hidden !important; width: max-content !important; max-width: none !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: visible !important;
}
.header .nav.nav-measure > .wontide-primary-links {
  display: flex !important; flex-wrap: nowrap !important; width: max-content !important;
}
.header .nav.nav-measure > .wontide-primary-links > a {white-space: nowrap !important; width: max-content}
.header[data-nav-mode] .header-actions .header-contact.measure-contact,
.header .header-actions .header-contact.measure-contact {display: inline-flex !important; position: absolute; visibility: hidden}
@media (max-width: 700px) {
  main table[data-mobile-cards] {display: block !important; width: 100% !important; min-width: 0 !important; min-inline-size: 0 !important; max-width: 100%; border: 0; margin: 0}
  main table[data-mobile-cards] caption {display:block; text-align:start; margin-bottom:.65rem}
  main table[data-mobile-cards] thead {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
  }
  main table[data-mobile-cards] tbody {display: grid; gap: .8rem}
  main table[data-mobile-cards] tbody tr {
    display: block; background: white; border: 1px solid var(--line,#ccd5dc);
    padding: .4rem .8rem; text-align: start;
  }
  main table[data-mobile-cards] tbody :is(td, th) {
    display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.25fr); align-items:baseline; gap:.65rem;
    padding: .55rem 0; font-size: .94rem; line-height:1.5; text-align: start; border: 0;
    color: var(--ink,#183347); background: transparent; white-space: normal; word-break:normal; overflow-wrap:break-word;
  }
  main table[data-mobile-cards] :is(td, th)[data-column-label]::before {
    content:attr(data-column-label); color:#43596b; font-weight:650; word-break:normal; overflow-wrap:normal; hyphens:auto;
  }
  main table[data-mobile-cards] tbody :is(td, th) + :is(td, th) {border-block-start: 1px solid #e1e6ea}
  main :is(.table-wrap,.table-scroll,.col-table,.column-table-wrap):has(> table[data-mobile-cards]) {overflow:visible}
}
.factory-video-card-media:has(img[src*="wontide-steel-pouring.jpg"]) {
  aspect-ratio: 16/9;
}
.factory-video-card-media img[src*="wontide-steel-pouring.jpg"] {object-fit: cover}
.error-page {min-height: 100vh; margin: 0; background: #f4f7f9; color: #163348}
.error-page header {display:flex; align-items:center; justify-content:space-between; padding:1rem max(5vw,1rem); background:white; border-bottom:1px solid #d8e2e7}
.error-page header img {width: 98px; height:auto}
.error-page main {margin:clamp(3rem,9vw,7rem) auto; width:min(52rem,88vw)}
.error-page h1 {font-size:clamp(2rem,6vw,4.5rem);line-height:1.09; margin:.25em 0 .5em}
.error-page .error-code {font-weight:700; color:#284c8e; font-size:1rem}
.error-page nav {display:flex; gap:.8rem 1.3rem; flex-wrap:wrap; margin:1.7rem 0}
.error-page nav a {display:inline-flex; padding:.65rem 0; border-bottom:1px solid currentColor; text-decoration:none}
.error-page select {font:inherit;padding:.45rem .65rem;max-width:54vw}

/* Factory routes appear on both the long homepage and the guide templates. */
main > .manufacturing-routes {
  padding: clamp(24px, 4vw, 62px) clamp(24px, 5vw, 88px);
  border-block-end: 1px solid #d7e1e9;
  background: #f4f7fa;
}
.manufacturing-routes h2 {font-size:clamp(1.45rem,2.3vw,2.25rem);line-height:1.22;margin:0 0 .65em}
.manufacturing-routes p {max-inline-size:82ch;margin:.55em 0;line-height:1.65}
/* Native select arrows reserve additional invisible width on macOS Chrome.
   An explicit arrow lets the displayed text use exactly its measured box. */
.header .header-actions select.language-picker {
  appearance: none;
  padding-inline: 10px 26px !important;
  background-color: white;
  background-image: linear-gradient(45deg,transparent 50%,#183347 50%),linear-gradient(135deg,#183347 50%,transparent 50%);
  background-size: 5px 5px,5px 5px;
  background-position: right 14px center,right 9px center;
  background-repeat:no-repeat;
}
[dir=rtl] .header .header-actions select.language-picker {background-position:left 9px center,left 14px center}
@media (max-width:700px) {
  main table[data-mobile-cards] tbody :is(th,td)[data-column-label],
  main table[data-mobile-cards] tbody :is(th,td)[data-column-label]::before {
    white-space: normal !important;
    width: auto;
    max-width: 100%;
  }
}
.factory-video-player:has(video[poster*="wontide-steel-pouring.jpg"]) {
  width:min(100%,480px);
  margin-inline:auto;
}
.factory-video-stage:has(video[poster*="wontide-steel-pouring.jpg"]) {padding:0}
.factory-video-player:has(.factory-video-stage-portrait) {
  max-inline-size:min(100%,min(40.5vh,405px));
  margin-inline:auto;
}
.factory-video-player .factory-video-stage-portrait {padding:0; background:transparent;}
.factory-video-player .factory-video-stage-portrait video {width:100%;height:auto;max-height:none}

/* Use one source pixel per display pixel on 2x screens for these limited masters. */
.factory-video-player:has(video[poster*="/wontide-cnc-machining.jpg"]) {
  max-inline-size: min(100%, 272px);
}
.factory-video-player:has(video[poster*="/wontide-shot-blasting.jpg"]) {
  max-inline-size: min(100%, 270px);
}
img:is([src*="/wontide-cnc-machining.jpg"],[src*="/wontide-shot-blasting.jpg"]) {
  display:block; object-fit:contain;
}
figure.guide-hero-image:has(img[src*="/part-cast-steel-helical-pile-tip.png"]) {
  max-inline-size:min(100%, 364px); align-self:center; justify-self:center;
}
figure.guide-hero-image img[src*="/part-cast-steel-helical-pile-tip.png"] {
  display:block; height:auto; aspect-ratio:724/353; object-fit:contain;
}

img[src*="/part-cast-steel-helical-pile-tip.png"]{max-inline-size:min(100%,362px)!important;margin-inline:auto;}
img[src*="/wontide-cnc-machining.jpg"]{max-inline-size:min(100%,272px)!important;margin-inline:auto;}
img[src*="/wontide-shot-blasting.jpg"]{max-inline-size:min(100%,270px)!important;margin-inline:auto;}
img[src*="/part-valve-body-view-03.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
img[src*="/part-machined-base.webp"]{max-inline-size:min(100%,800px)!important;margin-inline:auto;}
img[src*="/laser.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
img[src*="/workshop.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
img[src*="/workshop-1280.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
img[src*="/workshop-1024.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
img[src*="/factory-gate.webp"]{max-inline-size:min(100%,960px)!important;margin-inline:auto;}
.factory-video-stage:not(.factory-video-stage-portrait) video[poster*="steel-pouring"]{max-width:min(100%,480px);}
