/* Equipment (page key "equipment": /equipment/ and the product category archives). Ported from the site concept v3
   (parts/pages/equipment.css, catalogue half): the head with its stats, the sticky browse rail with scrollspy, the
   instrument groups and cards, the total station comparison, the closing CTA. Prefix eq-.
   Task page: reveals only on card tiles; headings, specs, filters and buttons never animate in.
   Port notes: sticky offsets add the admin bar (--wp-bar); groups land 102px below the top as the concept router placed
   them; the "Brochure being added" pill styles core's .pdf-none; View details shows on wide cards only, as in the concept. */

/* ---------- Catalogue head ---------- */
.eq-head { padding-bottom: clamp(28px, 3.5vw, 40px); }
.eq-stats { flex-wrap: nowrap; justify-content: flex-end; }
.eq-stats .stat span { max-width: 10.5em; }
.eq-stats b { font-variant-numeric: tabular-nums; }

/* Browse rail (the scroller is the containing block, so its screen-reader counts never widen the page) */
.eq-rail .rail-inner { position: relative; }
.eq-rail-note { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding-left: 16px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.eq-rail-note svg { width: 16px; height: 16px; }
.rail .chip-btn { transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), opacity var(--t-med) var(--ease); }

/* ---------- Instrument groups ---------- */
.eq-group { padding-block: clamp(64px, 7vw, 96px); scroll-margin-top: calc(102px + var(--wp-bar)); }
.eq-ghead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px 64px; align-items: end; margin-bottom: clamp(28px, 3vw, 40px); }
.eq-ghead .eyebrow { font-variant-numeric: tabular-nums; }
.eq-ghead h2 { margin-top: 14px; font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -0.02em; }
.eq-gmeta { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 40px; }
.eq-gmeta p { max-width: 36em; font-size: 16.5px; line-height: 1.55; color: var(--muted); }
.eq-gcount { flex: none; margin-left: auto; padding-bottom: 5px; font: 500 12px/1.3 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eq-empty { padding: 22px 24px; border-radius: var(--radius-lg); border: 1px dashed var(--line); font-size: 16px; color: var(--muted); }

/* Cards: the homepage .pcard/.ptile language, framed so they read on white and tinted grounds alike */
.eq-grid { display: grid; gap: 24px; }
.eq-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eq-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eq-card { --pad: 10px; padding: var(--pad); border: 1px solid var(--line); border-radius: calc(var(--radius-lg) + var(--pad)); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease), opacity var(--t-med) var(--ease); }
.eq-card:hover { border-color: transparent; }
.eq-card .ptile { aspect-ratio: 4 / 3; }
.eq-card .ptile img { width: 70%; height: 76%; }
.eq-card:hover .ptile img { transform: scale(1.04); }
.eq-card .pbody { padding: 18px 8px 4px; }
.eq-card .pbody h2 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.eq-id :is(h2, h3) a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 250ms var(--ease); }
.eq-id :is(h2, h3) a:hover { background-size: 100% 2px; }
/* The name link keeps a 24px+ target on phones */
.eq-id :is(h2, h3) a { display: inline-block; padding-block: 3px; }
.eq-card .pfoot { flex-wrap: wrap; gap: 8px 16px; }
.eq-nb { white-space: nowrap; }
.eq-card .pdf, .eq-cmp .pdf, .eq-card .pdf-none { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 13.5px/1 var(--font-sub); color: var(--ink); white-space: nowrap; }
.eq-card .pdf, .eq-cmp .pdf { transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.eq-card .pdf:hover, .eq-cmp .pdf:hover { border-color: var(--muted); transform: translateY(-1px); }
.eq-card .pdf small, .eq-cmp .pdf small { font: 400 12.5px/1 var(--font-body); color: var(--muted); }
.eq-card .pdf svg, .eq-cmp .pdf svg { color: var(--accent-ink); }
.eq-card .pdf-none { border-style: dashed; color: var(--muted); }
.eq-card .pdf-none svg { width: 15px; height: 15px; }

/* Horizontal cards: two to a row (Levels) and the full-width card for a one-instrument group */
.eq-card--h { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.eq-card--h .ptile { aspect-ratio: 1 / 1; }
.eq-card--h .ptile img { width: 72%; height: 72%; }
.eq-card--h .pbody { padding: 12px 12px 12px 24px; }
.eq-grid--2 .eq-card--h { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.eq-card--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.eq-card--wide .ptile { aspect-ratio: 16 / 10; }
.eq-card--wide .ptile img { width: 64%; height: 78%; }
.eq-card--wide .pbody { max-width: 42em; padding: 20px clamp(24px, 3.4vw, 52px); }
.eq-card--wide :is(h2, h3) { font-size: clamp(22px, 2vw, 26px); }
.eq-card--wide .tag { font-size: 16.5px; }
.eq-card--wide .chips { margin-top: 18px; }
.eq-card--wide .chips li { padding: 7px 12px; font-size: 13.5px; }
.eq-card--wide .pfoot { justify-content: flex-start; gap: 10px 26px; padding-top: 24px; }

/* ---------- Compare the total stations ---------- */
.eq-compare { margin-top: clamp(48px, 5vw, 72px); }
.eq-compare-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.eq-compare-head h3 { font-size: clamp(1.45rem, 2.1vw, 1.8rem); letter-spacing: -0.015em; }
.eq-compare-head p { font-size: 15px; color: var(--muted); }
/* The scroll box is the containing block, so the brochure links' screen-reader text never widens the page on phones */
.eq-cmp-box { position: relative; padding: 6px 16px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.eq-cmp { table-layout: fixed; }
.eq-cmp thead th, .eq-cmp thead td { top: calc(138px + var(--wp-bar)); width: auto; padding-block: 18px 14px; vertical-align: bottom; }
.eq-cmp thead td { position: sticky; z-index: 2; width: 18%; background: var(--surface); border-bottom: 2px solid var(--line); }
.eq-cmp-name { display: flex; align-items: flex-end; gap: 12px; font-size: 16px; line-height: 1.25; }
.eq-cmp-name img { flex: none; width: 30px; height: 54px; object-fit: contain; }
.eq-cmp tbody th { width: 18%; }
.eq-cmp td { font-size: 14.5px; }
.eq-cmp .pdf { min-height: 36px; padding: 6px 12px; }
.eq-cmp-hint { display: none; margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.eq-end { padding-top: clamp(72px, 7vw, 104px); }
.eq-arch { padding-top: clamp(24px, 3vw, 40px); }
.eq-arch + .eq-end { padding-top: clamp(24px, 3vw, 40px); }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .eq-grid--2 .eq-card--h { display: flex; flex-direction: column; }
  .eq-grid--2 .eq-card--h .ptile { aspect-ratio: 4 / 3; }
  .eq-grid--2 .eq-card--h .pbody { padding: 18px 8px 4px; }
}
@media (max-width: 900px) {
  .eq-ghead { grid-template-columns: 1fr; }
  .eq-gmeta { flex-wrap: wrap; }
  .eq-gcount { margin-left: 0; }
  .eq-stats { justify-content: flex-start; }
  .eq-cmp-box { overflow-x: auto; overscroll-behavior-x: contain; }
  .eq-cmp { min-width: 660px; }
  .eq-cmp thead th, .eq-cmp thead td { position: static; }
  .eq-cmp-hint { display: block; }
}
@media (max-width: 760px) {
  .eq-rail-note { display: none; }
  .eq-grid--3, .eq-grid--2 { grid-template-columns: 1fr; gap: 14px; }
  /* One compact card language on phones: tile and name side by side, chips and actions full width */
  .eq-card, .eq-card--h, .eq-card--wide, .eq-grid--2 .eq-card--h { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "tile id" "chips chips" "foot foot"; gap: 0 14px; align-items: center; padding: 10px 10px 12px; }
  .eq-card .pbody, .eq-grid--2 .eq-card--h .pbody { display: contents; }
  .eq-card .ptile, .eq-card--h .ptile, .eq-card--wide .ptile, .eq-grid--2 .eq-card--h .ptile { grid-area: tile; aspect-ratio: 1 / 1; border-radius: var(--radius); }
  .eq-card .ptile img { width: 78%; height: 78%; }
  .eq-card .ptile-mark { font-size: 1.35rem; }
  .eq-card .badge { top: 6px; left: 6px; padding: 4px 7px; font-size: 10.5px; }
  .eq-card .eq-id { grid-area: id; }
  .eq-card :is(h2, h3), .eq-card--wide :is(h2, h3) { font-size: 17.5px; }
  .eq-card .tag, .eq-card--wide .tag { margin-top: 4px; font-size: 14px; line-height: 1.45; }
  .eq-card .chips, .eq-card--wide .chips { grid-area: chips; margin-top: 12px; padding-inline: 2px; }
  .eq-card--wide .chips li { padding: 6px 10px; font-size: 13px; }
  .eq-card .pfoot, .eq-card--wide .pfoot { grid-area: foot; justify-content: space-between; gap: 6px 14px; padding: 10px 2px 0; }
}
@media (max-width: 600px) {
  /* The three stats share the width evenly and wrap their labels inside their own column (no sideways scroll) */
  .eq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .eq-stats .stat, .eq-stats .stat + .stat { min-width: 0; padding: 4px 10px 4px 0; }
  .eq-stats .stat + .stat { padding-left: 12px; }
  .eq-stats .stat span { max-width: none; letter-spacing: 0.05em; font-size: 11.5px; overflow-wrap: anywhere; }
}
