/* ==========================================================================
   IVAS — page-specific composition
   ========================================================================== */

/* ---------------------------------------------------------- home: intro */
.intro__grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: stretch; }
@media (min-width: 960px) { .intro__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.intro__statement {
  font-size: clamp(1.45rem, 2.7vw + .5rem, 2.55rem);
  font-weight: 500; line-height: 1.24; letter-spacing: -.028em;
  max-width: 26ch;
}
.intro__statement .w { opacity: .16; transition: opacity 240ms linear; }
.no-js .intro__statement .w, .intro__statement.is-plain .w { opacity: 1; }
.intro__actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: clamp(24px, 3.4vw, 40px);
}

/* Rev2 §6 — the photograph fills the right column from the top of the statement
   to the foot of the buttons. It is out of flow on desktop so its own proportions
   can't stretch the row; the text column alone decides the height. */
.intro__photo { aspect-ratio: 16 / 10; border-radius: 18px; }
@media (min-width: 960px) {
  .intro__photo { aspect-ratio: auto; min-height: 100%; max-height: 560px; position: relative; }
  .intro__photo img { position: absolute; inset: 0; }
}

/* ------------------------------------------------- home: category index */
.cat-index { border-top: 1px solid var(--line); }
.cat-row {
  position: relative;
  display: grid; gap: .35rem;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'n name count' '. lead lead';
  align-items: baseline;
  padding-block: clamp(18px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .cat-row {
    grid-template-columns: 52px minmax(0, 1.05fr) minmax(0, 1fr) auto;
    grid-template-areas: 'n name lead count';
    align-items: center; gap: 1.5rem;
  }
}
.cat-row__n { grid-area: n; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); }
.cat-row__name {
  grid-area: name; margin: 0;
  font-size: clamp(1.25rem, 2.3vw, 2rem); font-weight: 550; letter-spacing: -.028em;
  line-height: 1.15;
}
.cat-row__name a::after { content: ''; position: absolute; inset: 0; }
.cat-row__lead { grid-area: lead; margin: 0; font-size: var(--fs-small); color: var(--ink-muted); }
.cat-row__count {
  grid-area: count; font-family: var(--font-mono); font-size: .76rem;
  color: var(--ink-faint); white-space: nowrap;
}
.cat-row:hover .cat-row__name { color: var(--fg-strong); }
/* Rev1 §6.2 — an inline thumbnail on small screens, where there is no cursor
   for the floating preview to follow. */
.cat-row__thumb {
  grid-area: thumb;
  width: 56px; height: 44px; border-radius: 8px; overflow: hidden;
  background: var(--bg-sunken); flex: 0 0 auto;
}
.cat-row__thumb img, .cat-row__thumb .tex { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) {
  .cat-row {
    grid-template-columns: auto auto 1fr;
    grid-template-areas: 'n thumb name' '. lead lead';
    column-gap: .8rem;
  }
  .cat-row__count { display: none; }
}
@media (min-width: 900px) { .cat-row__thumb { display: none; } }

/* floating image that follows the cursor (desktop only) */
.cat-float {
  position: fixed; top: 0; left: 0; z-index: 5;
  width: 230px; aspect-ratio: 4/3;
  border-radius: var(--r-tile); overflow: hidden;
  pointer-events: none; opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(.9);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
  box-shadow: 0 18px 48px rgba(var(--navy-rgb), .26);
}
.cat-float.is-shown { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
.cat-float img, .cat-float .tex { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (max-width: 899px) { .cat-float { display: none; } }

/* generated material textures — used where a category has no photograph */
.tex { background-color: var(--bg-sunken); }
.tex--beads {
  background-image: radial-gradient(circle at 30% 30%, var(--tex-hi) 0 22%, transparent 23%),
                    radial-gradient(circle at 70% 60%, var(--tex-hi) 0 18%, transparent 19%);
  background-size: 18px 18px, 26px 26px; background-color: var(--tex-1);
}
.tex--plaster {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='4'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)' opacity='.55'/%3E%3C/svg%3E");
  background-color: var(--tex-2);
}
.tex--swatch {
  background-image: linear-gradient(135deg,
    var(--tex-s1) 0 25%, var(--tex-s2) 25% 50%,
    var(--tex-s3) 50% 75%, var(--tex-s4) 75% 100%);
}
/* Rev1 §6.1 — two more, for the demit layers that have no product photograph
   in the migrated pool: the existing wall, and the dowels. */
.tex--wall {
  background-color: var(--tex-3);
  background-image:
    repeating-linear-gradient(0deg, var(--tex-line) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--tex-line) 0 1px, transparent 1px 72px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23w)' opacity='.28'/%3E%3C/svg%3E");
  background-position: 0 0, 0 0, 0 0;
}
.tex--dowel {
  background-color: var(--tex-4);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%237E858F' stroke-width='2'%3E%3Ccircle cx='18' cy='18' r='9'/%3E%3Ccircle cx='54' cy='54' r='9'/%3E%3C/g%3E%3Cg fill='%237E858F'%3E%3Ccircle cx='18' cy='18' r='2.6'/%3E%3Ccircle cx='54' cy='54' r='2.6'/%3E%3C/g%3E%3Cg stroke='%237E858F' stroke-width='1.4' opacity='.55'%3E%3Cpath d='M18 9v18M9 18h18M54 45v18M45 54h18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}

/* ------------------------------------------- section imagery (Rev1 §6.2)
   One shared set of shapes so an added photograph never invents a new card
   style: a framed figure, a wide band and a caption. */
.figure {
  margin: 0;   /* browsers indent <figure> by 40px otherwise */
  position: relative; overflow: hidden;
  border-radius: var(--r-glass);
  background: var(--bg-sunken);
}
.figure img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focal, 50% 50%);
}
.figure--4x3 { aspect-ratio: 4 / 3; }
.figure--3x2 { aspect-ratio: 3 / 2; }
.figure--wide { aspect-ratio: 21 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure figcaption {
  margin-top: .6rem; font-size: .76rem; color: var(--ink-faint);
}
.section--dark .figure figcaption { color: var(--on-dark-faint); }

/* photo band that runs the full width of a section */
.photo-band {
  position: relative; overflow: hidden;
  border-radius: var(--r-glass);
  aspect-ratio: 21 / 9;
  background: var(--bg-sunken);
}
@media (max-width: 767px) { .photo-band { aspect-ratio: 16 / 10; } }
.photo-band img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focal, 50% 50%);
}
.photo-band__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  /* the global measure cap on <p> cut the gradient off mid-band */
  max-width: none;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 2.4vw, 32px) clamp(14px, 2vw, 24px);
  background: linear-gradient(0deg, rgba(var(--navy-rgb), .88) 18%, rgba(var(--navy-rgb), 0));
  color: var(--on-dark);
  font-size: var(--fs-small);
}

/* a photograph pinned beside a text column */
.text-figure { display: grid; gap: clamp(20px, 3vw, 40px); align-items: center; }
@media (min-width: 900px) {
  .text-figure { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
  .text-figure--flip > :first-child { order: 2; }
}

/* snap rail (mobile categories, brands, related) */
.rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(190px, 62vw, 260px);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1);
  padding-bottom: 6px;
  /* rev3: snapping to the first card ignored the padding and parked it on the viewport edge */
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none; -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
[data-product-related] h2 { margin-bottom: var(--section-head-gap); }
@media (min-width: 900px) { .rail--mobile-only { display: none; } }

.cat-tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4/5; padding: 14px;
  border-radius: var(--r-tile); overflow: hidden; position: relative;
  color: var(--on-dark); background: var(--bg-sunken);
}
.cat-tile .tex, .cat-tile img { position: absolute; inset: 0; z-index: 0; }
.cat-tile::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(var(--navy-rgb), .82) 0%, rgba(var(--navy-rgb), .15) 62%);
}
.cat-tile > * { position: relative; z-index: 2; }
.cat-tile strong { font-size: .95rem; font-weight: 600; line-height: 1.2; }
.cat-tile span { font-family: var(--font-mono); font-size: .68rem; color: rgba(var(--white-rgb), .7); }

/* ------------------------------------------------------ demit diagram
   Rev1 §6.1 — the list used to sit alone in the left half with the right half
   of the section empty. It is now paired with a visual that follows the active
   layer: the build-up diagram highlights and lifts the matching slab, and the
   card below it swaps to the material that layer is actually made of. */
.demit-stage { position: relative; }
@media (min-width: 1024px) {
  .demit-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .86fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
  }
  .demit-stage > .layer-list  { grid-column: 1; grid-row: 1; }
  .demit-stage > .demit-visual {
    grid-column: 2; grid-row: 1;
    position: sticky; top: clamp(88px, 13vh, 132px);
  }
}
.demit-visual { display: grid; gap: 14px; }
.demit-figure { position: relative; }
.demit-figure svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 1023px) { .demit-figure { display: none; } }

.layer {
  opacity: .5;
  transition: transform 420ms var(--ease-out), opacity 300ms linear;
}
.layer.is-active { opacity: 1; transform: translate(18px, -12px); }
/* rev3 §4: the section is light now, so every slab gets a hairline (the
   plaster slab is near-white) and the active one is outlined in navy */
.layer path { stroke: var(--line-strong); stroke-width: 1; }
.layer.is-active path { stroke: var(--fg); stroke-width: 2; }
.no-js .layer { opacity: 1; }
.layer__label { font-family: var(--font-mono); font-size: 11px; fill: var(--fg-muted); }
.layer.is-active .layer__label { fill: var(--fg); font-weight: 600; }
.demit-figure__frame { stroke: var(--line-strong); }
.demit-figure__note { fill: var(--fg-faint); }

/* the material card under the diagram */
.demit-swatch {
  position: relative; overflow: hidden;
  border-radius: var(--r-glass);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  aspect-ratio: 16 / 10;
}
.demit-swatch__item {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 420ms var(--ease-out), visibility 420ms;
}
.demit-swatch__item.is-active { opacity: 1; visibility: visible; }
.no-js .demit-swatch { aspect-ratio: auto; }
.no-js .demit-swatch__item { position: relative; opacity: 1; visibility: visible; }
.demit-swatch img, .demit-swatch .tex {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focal, 50% 50%);
}
.demit-swatch__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 26px 16px 14px;
  background: linear-gradient(0deg, rgba(var(--navy-rgb), .94) 22%, rgba(var(--navy-rgb), 0));
}
.demit-swatch__cap strong {
  display: block; font-size: .95rem; font-weight: 600; color: var(--on-dark);
}
.demit-swatch__cap span {
  display: block; margin-top: .15rem;
  font-family: var(--font-mono); font-size: .72rem; color: var(--on-dark-muted);
}

/* mobile: a swipeable strip above the list instead of a shrunken column */
@media (max-width: 1023px) {
  .demit-visual {
    position: sticky; top: calc(60px + env(safe-area-inset-top, 0px));
    z-index: 4; margin-bottom: 18px;
    padding-block: 10px;
    /* solid, not a fade: a translucent tail let the list copy underneath read
       straight through the strip */
    background: var(--bg-sunken);
    box-shadow: 0 12px 16px -12px var(--shadow-edge);
  }
  .demit-swatch {
    aspect-ratio: auto; border: 0; background: none; border-radius: 0;
    display: grid; grid-auto-flow: column;
    grid-auto-columns: 46%;
    gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1);
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .demit-swatch::-webkit-scrollbar { display: none; }
  .demit-swatch__item {
    position: relative; inset: auto; scroll-snap-align: center;
    opacity: .5; visibility: visible;
    aspect-ratio: 16 / 10; overflow: hidden;
    border-radius: var(--r-tile); border: 1px solid var(--line);
  }
  .demit-swatch__item.is-active { opacity: 1; border: 2px solid var(--fg); }
  .demit-swatch__cap { padding: 22px 12px 10px; }
  .demit-swatch__cap strong { font-size: .84rem; }
}
.dim-line { stroke: var(--fg-faint); stroke-width: 1; stroke-dasharray: 3 3; opacity: .85; }
.dim-draw { stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); }
.no-js .dim-draw, .is-in .dim-draw { stroke-dashoffset: 0; transition: stroke-dashoffset 800ms var(--ease-out); }

.layer-list { display: grid; gap: 2px; }
.layer-item {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem;
  padding: 16px 0; border-bottom: 1px solid var(--line-strong);
  opacity: .5; transition: opacity var(--dur) var(--ease-out);
}
.layer-item.is-current, .no-js .layer-item { opacity: 1; }
.layer-item__n {
  align-self: start; padding: 2px 7px; border-radius: 6px;
  font-family: var(--font-mono); font-size: .78rem; color: var(--fg-muted);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.layer-item.is-current .layer-item__n { background: var(--accent); color: var(--accent-fg); }
.layer-item h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.layer-item__spec { font-family: var(--font-mono); font-size: .76rem; color: var(--fg); }
.layer-item p { font-size: var(--fs-small); color: var(--fg-muted); margin: .4rem 0 0; }
/* Underlined always, not only on hover: it sits inside a paragraph and colour
   alone is not a distinguishing feature (WCAG 1.4.1 — axe flagged all six). */
.layer-item__link {
  color: var(--link); white-space: nowrap;
  text-decoration: underline; text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.layer-item__link:hover { text-decoration-thickness: 2px; }
.layer-item.is-current { opacity: 1; }

/* mobile: cards, not sticky steps — the swipeable strip above is the sticky
   element now, and two sticky layers fighting for the same top edge stacked
   the cards on top of each other */
@media (max-width: 1023px) {
  .layer-item {
    opacity: 1;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--r-tile); padding: 16px; margin-bottom: 10px;
    transition: border-color var(--dur) var(--ease-out);
  }
  .layer-item.is-current { border-color: var(--fg); }
}

/* ------------------------------------------------------- energy widget */
.energy { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (min-width: 900px) { .energy { grid-template-columns: 1fr 1fr; } }
.energy__bars { display: grid; gap: 6px; }
.energy__bar {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .78rem; color: var(--fg);
}
.energy__bar i {
  display: block; height: 22px; border-radius: 3px;
  width: var(--w, 40%);
  transform-origin: left; transform: scaleX(0);
}
.no-js .energy__bar i, .energy.is-in .energy__bar i {
  transform: scaleX(1);
  transition: transform 520ms var(--ease-out);
  transition-delay: calc(70ms * var(--i, 0));
}
.energy__big {
  font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 550; letter-spacing: -.04em;
  line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums;
  /* the yellow stays, as a bar under the figure: yellow text on white is 1.4:1 */
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: .09em; text-underline-offset: .1em;
}
.energy__foot { font-size: .74rem; color: var(--fg-faint); margin-top: 1rem; }

/* --------------------------------------------------------- calculator */
.calc { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 900px) { .calc { grid-template-columns: .85fr 1.15fr; } }
.calc__inputs { display: grid; gap: 14px; align-content: start; }
@media (min-width: 560px) { .calc__inputs { grid-template-columns: 1fr 1fr; } }
.calc__inputs .field--full { grid-column: 1 / -1; }
.calc__out {
  border: 1px solid var(--line); border-radius: var(--r-glass);
  background: var(--bg-elev); box-shadow: var(--shadow-1);
  overflow: hidden;
}
.calc__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: .8rem;
  align-items: baseline;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.calc__row:nth-child(even) { background: var(--bg-zebra); }
.calc__row:last-child { border-bottom: 0; }
.calc__row b { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg); }
.calc__row .pack { font-family: var(--font-mono); font-size: .74rem; color: var(--fg-muted); }
.calc__note { font-size: .76rem; color: var(--fg-faint); margin-top: 1rem; }
.calc__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
details.assumptions { margin-top: 1rem; }
details.assumptions summary {
  cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--link);
  padding-block: .4rem;
}
details.assumptions ul { margin-top: .6rem; display: grid; gap: .4rem; }
details.assumptions li {
  font-family: var(--font-mono); font-size: .74rem; color: var(--fg-muted);
  padding-left: 1rem; position: relative;
}
details.assumptions li::before { content: '—'; position: absolute; left: 0; }

/* ------------------------------------------------------------ marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
           mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: clamp(20px, 3vw, 44px); width: max-content;
                  animation: marquee 44s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: clamp(1.3rem, 3.4vw, 2.4rem); font-weight: 500; letter-spacing: -.03em;
  color: var(--ink-faint); white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.marquee a:hover { color: var(--ink-strong); }
.section--dark .marquee a { color: rgba(var(--white-rgb), .42); }
.section--dark .marquee a:hover { color: var(--on-dark); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* --------------------------------------------------- sticky service panels */
.services-stack { display: grid; gap: 14px; }
.service-panel {
  position: sticky; top: clamp(76px, 12vh, 120px);
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-glass);
  padding: clamp(22px, 3.4vw, 44px);
  transform-origin: top center;
}
.service-panel__n { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-faint); }
.service-panel h3 { margin: .5rem 0 .6rem; font-size: clamp(1.25rem, 2.2vw, 1.8rem); }
.service-panel .lead { margin-bottom: .7rem; }
/* Rev1 §6.2 — each panel carries its own photograph; below 860px it stacks
   above the copy rather than shrinking into a sliver. */
.service-panel { display: grid; gap: clamp(18px, 2.6vw, 34px); align-items: center; }
@media (min-width: 860px) {
  .service-panel { grid-template-columns: minmax(0, .58fr) minmax(0, 1fr); }
}
.service-panel__media {
  position: relative; overflow: hidden;
  border-radius: var(--r-tile); background: var(--bg-sunken);
  aspect-ratio: 3 / 2;
}
.service-panel__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focal, 50% 50%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.service-panel:hover .service-panel__media img { transform: scale(1.04); }

/* ------------------------------------------------------------- gallery */
.masonry { columns: 2 clamp(150px, 30vw, 300px); column-gap: clamp(10px, 1.4vw, 18px); }
@media (min-width: 900px) { .masonry { columns: 3 260px; } }
.masonry > * { break-inside: avoid; margin-bottom: clamp(10px, 1.4vw, 18px); }
.gal-item {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--r-tile); background: var(--bg-sunken);
  clip-path: inset(0 0 0 0);
}
.gal-item img { width: 100%; height: auto; transition: transform var(--dur-slow) var(--ease-out); }
.gal-item:hover img { transform: scale(1.04); }
.gal-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 10px 12px;
  font-size: .76rem; color: var(--on-dark);
  background: linear-gradient(0deg, rgba(var(--navy-rgb), .8), transparent);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.gal-item:hover figcaption, .gal-item:focus-visible figcaption { opacity: 1; }

/* Rev2 §7 — two photographs and the map balance the address column as a 2x2. */
.contact-grid.contact-grid--home { grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 28px); }
.contact-grid--home > :nth-child(1), .contact-grid--home > :nth-child(2) { grid-column: 1 / -1; }
.contact-grid--home .figure { border-radius: 18px; }
@media (min-width: 960px) {
  .contact-grid.contact-grid--home { align-items: stretch; }
  .contact-grid--home > :nth-child(1) { grid-column: 1; }
  .contact-grid--home > :nth-child(2) { grid-column: 2; aspect-ratio: auto; min-height: 340px; }
}

/* -------------------------------------------------------- contact page */
.contact-grid { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
}
/* Rev1 — the enquiry form used to live inside the right column, which made
   that column run ~870px past the end of the left one and left half the
   section blank beside it. It is now a third grid item spanning both columns.
   (A sticky left column was tried first and rejected: at 1024x768 the details
   column is taller than the space above the fixed FAB, so its buttons parked
   underneath it — caught by the §3.3 overlap assertion.) */
.contact-form { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .contact-form { margin-top: clamp(24px, 3vw, 44px); }
  /* two up, so the form uses the width it now has instead of leaving the
     right half of the section empty again */
  .contact-form .form-grid { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .contact-form .form-grid > .field--full,
  .contact-form .form-grid > [data-form-attach],
  .contact-form .form-grid > .field--consent,
  .contact-form .form-grid > :last-child,
  .contact-form .form-grid > :nth-last-child(2) { grid-column: 1 / -1; }
  .contact-form .textarea { min-height: 150px; }
}
.contact-cards { display: grid; gap: 10px; }
@media (min-width: 560px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--bg-raised);
}
.contact-card svg { width: 20px; height: 20px; color: var(--fg-strong); flex: 0 0 auto; margin-top: 2px; }
.contact-card__label { display: block; font-size: .74rem; color: var(--ink-faint); }
.contact-card__value { display: block; margin-top: .15rem; font-size: .98rem; font-weight: 600; }
.contact-card .copy-btn { margin: -12px -12px -12px auto; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-faint); }
.contact-card .copy-btn:hover { color: var(--fg-strong); }

.hours-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.hours-table th, .hours-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours-table tbody tr:nth-child(even) > * { background: var(--bg-zebra); }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); font-size: .8rem; }
.hours-table tr.is-today { font-weight: 700; color: var(--fg-strong); }
.hours-table tr.is-today td:last-child { color: var(--fg-strong); }

.map-frame {
  position: relative; border-radius: var(--r-glass); overflow: hidden;
  aspect-ratio: 16/11; background: var(--bg-sunken);
  border: 1px solid var(--line);
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 10px;
  align-content: center; text-align: center; padding: 20px;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, var(--grid-line) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, var(--grid-line) 23px 24px),
    var(--bg-sunken);
}
.map-placeholder p { font-size: .84rem; color: var(--ink-muted); }

/* ---------------------------------------------------------- product page */
.product-layout { display: grid; gap: clamp(24px, 4vw, 56px); }
@media (min-width: 900px) { .product-layout { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.product-gallery__main {
  aspect-ratio: 4/3; border-radius: var(--r-glass); overflow: hidden;
  background: var(--bg-sunken); border: 1px solid var(--line);
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.product-gallery__thumbs button {
  width: 66px; height: 54px; border-radius: 8px; overflow: hidden; flex: 0 0 auto;
  border: 1px solid var(--line-strong); opacity: .6;
}
.product-gallery__thumbs button.is-active { opacity: 1; border-color: var(--fg-strong); }
.product-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  font-size: .74rem; font-weight: 600; color: var(--ink-muted);
}
.price-block {
  display: flex; align-items: baseline; gap: .6rem;
  margin-block: 1.2rem; padding-block: 1.2rem;
  border-block: 1px solid var(--line);
}
.price-block strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.price-block span { font-size: .8rem; color: var(--ink-faint); }

/* --------------------------------------------------------- process steps */
.process { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 800px) { .process { grid-template-columns: repeat(3, 1fr); } }
.process li {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--r-tile);
  background: var(--bg-raised);
}
.process li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-mono); font-size: .76rem;
  color: var(--ink-faint); margin-bottom: .7rem;
}
.process h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.process p { font-size: var(--fs-small); color: var(--ink-muted); }

/* ------------------------------------------------------------ brand tiles */
.brand-grid { display: grid; gap: 2px; background: var(--line); border-radius: var(--r-tile); overflow: hidden; }
@media (min-width: 560px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .brand-grid { grid-template-columns: repeat(4, 1fr); } }
.brand-tile {
  background: var(--bg-raised); padding: 22px 20px; min-height: 130px;
  display: flex; flex-direction: column; gap: .35rem;
  transition: background var(--dur-fast) var(--ease-out);
}
.brand-tile:hover { background: var(--bg-sunken); }
.brand-tile strong {
  font-size: 1.22rem; font-weight: 600; letter-spacing: -.025em; color: var(--ink-strong);
}
.brand-tile span { font-size: .78rem; color: var(--ink-muted); }
.brand-tile .mono { margin-top: auto; color: var(--ink-faint); }
/* Rev1 §6.2 — a product photograph for the brands the catalogue has one for.
   Brands with nothing in the pool keep the typographic tile, so the grid still
   reads as one system rather than half-filled. */
.brand-tile__media {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; margin: -22px -20px 14px;
  background: var(--bg-sunken);
}
.brand-tile__media img, .brand-tile__media .tex {
  width: 100%; height: 100%; object-fit: cover;
  /* The navidiku product shots carry a watermark in the bottom-right corner.
     These sources are portrait and the tile is 16/10, so the crop is happening
     anyway — biasing it upwards takes the watermark with it. */
  object-position: 50% 30%;
  transition: transform var(--dur-slow) var(--ease-out);
}
/* brands the catalogue has no photograph for keep a tile of the same weight,
   so the grid does not read as half-filled */
.tex--brand {
  display: block;
  /* rev3 §4: light concrete with the logo lattice in navy, not a navy block */
  background-color: var(--bg-sunken);
  background-image:
    linear-gradient(135deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), 0) 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='37' viewBox='0 0 908 518'%3E%3Cg fill='%2307173F' fill-opacity='.07'%3E%3Cpath d='M453 3 587 80.5 453 158 319 80.5Z'/%3E%3Cpath d='M292.5 93.2 426.5 170.8 292.5 248.2 158.5 170.8Z'/%3E%3Cpath d='M613.5 93.2 747.5 170.8 613.5 248.2 479.5 170.8Z'/%3E%3Cpath d='M453 183.5 587 261 453 338.5 319 261Z'/%3E%3Cpath d='M292.5 273.8 426.5 351.2 292.5 428.8 158.5 351.2Z'/%3E%3Cpath d='M613.5 273.8 747.5 351.2 613.5 428.8 479.5 351.2Z'/%3E%3Cpath d='M453 364 587 441.5 453 519 319 441.5Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, 64px 37px;
  background-position: center, center;
}
.brand-tile:hover .brand-tile__media img { transform: scale(1.05); }

/* category rail on the catalogue page */
.rail--cats { grid-auto-columns: clamp(170px, 46vw, 220px); }
.rail--cats .cat-tile { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .rail--cats {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    overflow: visible; padding-inline: 0; margin-inline: 0;
  }
}

/* ----------------------------------------------------------- catalogue (rev2 §10)
   Desktop: sticky sidebar + results. Under 1024 the sidebar is a bottom sheet
   opened from the floating "Filteri (N)" button. */
.catalog { padding-block: clamp(20px, 3vw, 40px) calc(var(--section-y) * .6); }
.catalog__layout { display: grid; gap: clamp(16px, 2.4vw, 28px); align-items: start; }
@media (min-width: 1024px) { .catalog__layout { grid-template-columns: 280px minmax(0, 1fr); } }
.filters {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-tile);
  display: flex; flex-direction: column; min-height: 0;
}
.filters__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.filters__head h2 { font-size: .86rem; font-weight: 700; letter-spacing: .08em; }
.filters__reset { font-size: .68rem; font-weight: 700; letter-spacing: .05em; color: var(--link); min-height: 44px; }
.filters__reset:hover { text-decoration: underline; text-underline-offset: .2em; }
.filters__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 2px 16px 10px; flex: 1; min-height: 0; }
.filters__close, .filters__foot, .filters__scrim, .filters__open { display: none; }
@media (min-width: 1024px) {
  .filters { position: sticky; top: 76px; max-height: calc(100vh - 92px); }
}
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: 44px; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink);
}
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary span { flex: 1; }
.fgroup summary svg { width: 15px; height: 15px; transition: transform var(--dur-fast) var(--ease-out); }
.fgroup[open] summary svg { transform: rotate(180deg); }
.fgroup__n {
  min-width: 18px; height: 18px; padding-inline: 5px; border-radius: 9px; display: grid; place-items: center;
  background: var(--btn-primary); color: var(--btn-primary-fg); font-size: .66rem;
}
.fgroup__body { padding-bottom: 10px; }
.fgroup__scroll { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; margin-right: -8px; padding-right: 8px; }
.fopt {
  display: flex; align-items: center; gap: 9px; min-height: 36px; padding-block: 3px;
  font-size: .88rem; line-height: 1.25; cursor: pointer; color: var(--ink-muted);
}
@media (max-width: 1023px) { .fopt { min-height: 44px; } }
.fopt span { flex: 1; }
.fopt em { font-style: normal; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-faint); }
.fopt input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--btn-primary); }
.fopt:has(input:checked) { color: var(--ink); font-weight: 600; }
.fchips { display: flex; flex-wrap: wrap; gap: 5px; }
.fchips--mono .fchip { font-family: var(--font-mono); font-size: .7rem; }
.fchip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding-inline: 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: .78rem; font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform 180ms var(--ease-back);
}
.fchip em { font-style: normal; font-family: var(--font-mono); font-size: .66rem; opacity: .65; }
.fchip:hover { background: var(--bg-sunken); }
.fchip.is-on { background: var(--btn-primary); border-color: var(--btn-primary); color: var(--btn-primary-fg); }
@media (max-width: 1023px) { .fchip { min-height: 44px; } }
.fnote { margin: 8px 0 0; font-size: .74rem; line-height: 1.4; color: var(--ink-faint); }

.results { min-width: 0; position: relative; }
.results__bar { display: flex; flex-wrap: wrap; gap: 8px; }
.results__search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 10px; min-height: 48px; padding-inline: 14px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-input);
}
.results__search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.results__search svg { width: 18px; height: 18px; color: var(--ink-faint); flex: 0 0 auto; }
.results__search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; height: 46px; }
.results__sort {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 48px; padding-inline: 14px 8px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-input);
}
.results__sort span { font-size: .66rem; font-weight: 700; letter-spacing: .07em; color: var(--ink-faint); }
.results__sort select { border: 0; background: none; font-size: 16px; font-weight: 600; color: var(--fg-strong); height: 44px; max-width: 170px; outline: none; }
.rchips {
  display: flex; gap: 6px; overflow-x: auto; margin: 10px calc(var(--gutter) * -1) 0; padding: 2px var(--gutter);
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.rchips::-webkit-scrollbar { display: none; }
.rchip {
  flex: 0 0 auto; scroll-snap-align: start; min-height: 44px; padding-inline: 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: .84rem; font-weight: 500; white-space: nowrap; background: var(--bg-raised);
}
.rchip.is-on { background: var(--btn-primary); border-color: var(--btn-primary); color: var(--btn-primary-fg); }
@media (min-width: 1024px) { .rchips { display: none; } }
.achips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding-inline: 12px 9px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 500; animation: chip-pop 200ms var(--ease-back);
}
.achip svg { width: 13px; height: 13px; }
.achip:hover { border-color: var(--fg-strong); }
.achip--all { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-fg); font-size: .68rem; font-weight: 700; letter-spacing: .05em; padding-inline: 12px; }
@keyframes chip-pop { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
.results__count { margin: 12px 0 10px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-faint); }
.cat-intro { margin-bottom: 14px; padding: 14px 18px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-tile); }
.cat-intro h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.cat-intro p { margin: 0; font-size: .92rem; color: var(--ink-muted); }
.cat-intro--isomat { border-left: 4px solid var(--accent); }
.cat-intro--isomat h2 { color: var(--fg); }
.cat-intro--isomat p { color: var(--fg-muted); }
.cat-intro__src { margin-top: .5rem !important; font-size: .76rem !important; color: var(--fg-faint) !important; }

/* product card: photograph on a white tile, light body (rev3 §4 — was navy) */
.pgrid { display: grid; gap: clamp(10px, 1.4vw, 16px); grid-template-columns: 1fr; }
@media (min-width: 360px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
@media (hover: none) { .pcard:hover { transform: none; box-shadow: var(--shadow-1); } .pcard:active { transform: scale(.985); } }
.pcard__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.pcard__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  transition: transform var(--dur-slow) var(--ease-out);
}
.pcard__media .tex { position: absolute; inset: 0; }
/* packshots on a white plate; in the dark theme the plate is inset (§5.4) */
.pcard__media.is-pack { background: var(--plate); padding: var(--plate-pad); }
.pcard__media.is-pack img { object-fit: contain; object-position: center; padding: 8px; background: var(--packshot); border-radius: var(--plate-r); }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.pcard__badge {
  padding: 3px 7px; border-radius: 4px; background: var(--navy-chrome); color: var(--on-dark);
  font-size: .68rem; font-weight: 700; letter-spacing: .05em;
}
.pcard__badge--new { background: var(--accent); color: var(--accent-fg); }
.pcard__qv {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--fg);
}
.pcard__qv svg { width: 16px; height: 16px; }
.pcard__qv::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.pcard__qv:hover { background: var(--btn-primary); color: var(--btn-primary-fg); }
@media (hover: hover) and (pointer: fine) {
  .pcard__qv { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
  .pcard:hover .pcard__qv, .pcard:focus-within .pcard__qv { opacity: 1; }
}
.pcard__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px; min-width: 0; }
.pcard__eyebrow { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--fg-muted); line-height: 1.3; overflow-wrap: anywhere; }
.pcard__name { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.22; letter-spacing: -.005em; color: var(--fg); overflow-wrap: anywhere; }
.pcard__name a { color: inherit; text-decoration: none; }
.pcard__name a:hover { text-decoration: underline; text-underline-offset: .15em; }
.pcard__short {
  margin: 0; font-size: .8rem; line-height: 1.38; color: var(--fg-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__stds { display: flex; flex-wrap: wrap; gap: 3px; }
.pcard__stds span { padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 4px; font-family: var(--font-mono); font-size: .68rem; color: var(--fg-muted); }
.pcard__price { margin: auto 0 0; padding-top: 8px; border-top: 1px dashed var(--line-strong); font-size: .78rem; font-weight: 700; color: var(--fg); }
.pcard__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; padding-top: 4px; }
@media (max-width: 479px) { .pcard__btns { grid-template-columns: 1fr; } }
.pcard__btn {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 4px 6px;
  border: 1px solid var(--line-strong); border-radius: 10px; font-size: .78rem; font-weight: 700; line-height: 1.15; color: var(--fg);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.pcard__btn:hover { background: var(--bg-sunken); }
.pcard__btn--fill { background: var(--btn-primary); border-color: var(--btn-primary); color: var(--btn-primary-fg); }
.pcard__btn--fill:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); color: var(--btn-primary-fg); }
.pcard__btn--fill.is-added { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pcard :focus-visible { outline-color: var(--focus); }
.pcard--skel { min-height: 330px; background: var(--bg-sunken); gap: 10px; padding-bottom: 14px; box-shadow: none; }
.pcard--skel i { display: block; aspect-ratio: 4 / 3; background: var(--skel); }
.pcard--skel b { display: block; height: 11px; margin-inline: 12px; border-radius: 3px; background: var(--skel); }
.pcard--skel b:last-child { width: 50%; }
@media (prefers-reduced-motion: no-preference) { .pcard--skel { animation: skel 1100ms ease-in-out infinite alternate; } }
@keyframes skel { from { opacity: 1; } to { opacity: .55; } }
.cat-empty { grid-column: 1 / -1; padding: clamp(24px, 4vw, 44px); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-tile); }
.cat-empty h3 { margin-bottom: .4rem; }
.cat-empty__row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pager { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(16px, 2.4vw, 28px); }
.pager__nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.pager__n { min-width: 44px; height: 44px; border-radius: 10px; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pager__n:hover { background: var(--bg-sunken); }
.pager__n.is-on { background: var(--btn-primary); color: var(--btn-primary-fg); }
.pager__gap { align-self: center; color: var(--ink-faint); padding-inline: 4px; }
.qv-img { width: 100%; border-radius: 12px; margin-bottom: 1rem; }
.qv-img--pack { max-height: 260px; object-fit: contain; background: var(--packshot); border: 1px solid var(--line); padding: 10px; }
.qv-spec { margin: .4rem 0 0; font-size: .86rem; color: var(--ink-muted); }
.qv-spec b { color: var(--ink); }

/* mobile: the sidebar becomes a sheet */
@media (max-width: 1023px) {
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: var(--z-sheet); max-height: 86svh;
    border-radius: 20px 20px 0 0; border: 0;
    transform: translateY(102%); visibility: hidden;
    transition: transform 420ms cubic-bezier(.22, 1.1, .36, 1), visibility 420ms;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .filters-open .filters { transform: none; visibility: visible; }
  .filters__scrim {
    display: block; position: fixed; inset: 0; z-index: calc(var(--z-sheet) - 1);
    background: rgba(var(--navy-rgb), .5); opacity: 0; visibility: hidden;
    transition: opacity var(--dur) var(--ease-out), visibility var(--dur);
  }
  .filters-open .filters__scrim { opacity: 1; visibility: visible; }
  .filters__close { display: inline-grid; color: var(--ink); border-color: var(--line-strong); }
  .filters__reset { margin-left: auto; }
  .filters__foot { display: block; padding: 10px 16px; border-top: 1px solid var(--line); }
  .filters__foot .btn { width: 100%; min-height: 48px; }
  .filters__open {
    display: flex; align-items: center; gap: 8px; width: max-content; position: sticky; z-index: 5;
    margin: 14px auto 0;
    bottom: calc(var(--bottom-row-h) + 12px + env(safe-area-inset-bottom, 0px));
    min-height: 48px; padding-inline: 20px; border-radius: var(--r-pill);
    background: var(--inv-bg); color: var(--inv-fg); font-size: .9rem; font-weight: 600;
    box-shadow: 0 10px 26px rgba(var(--navy-rgb), .32);
  }
  .filters__open svg { width: 17px; height: 17px; }
}

/* product page additions */
.product-gallery__main.is-pack { background: var(--packshot); }
/* Isomat packshots are 270px files: shown at their own size, never blown up */
.product-gallery__main.is-pack img { object-fit: scale-down; padding: 18px; }
.product-desc { white-space: pre-line; }
.product-specs { margin: 1rem 0 0; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.product-specs div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 0; background: var(--bg); }
.product-specs dt { font-size: .82rem; font-weight: 600; color: var(--ink-faint); }
.product-specs dd { margin: 0; font-size: .9rem; white-space: pre-line; }
.product-tds { display: inline-flex; align-items: center; gap: 8px; margin-top: .8rem; min-height: 44px; font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: .2em; }
.product-tds svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------ calculators
   Rev3 §4: light, like every surface between header and footer. Navy linework
   on white, mono figures, results on a white card. Yellow marks state (focus,
   the active segment's underline), it never fills a control. */
.blueprint {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.calc-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .calc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.calc-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 196px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--card); overflow: hidden;
  box-shadow: var(--shadow-1); color: var(--fg);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.calc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.calc-card__diagram { position: absolute; right: -8px; top: 6px; width: 132px; height: 118px; opacity: .7; }
.calc-card__ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--navy-chrome); color: var(--accent); }
.calc-card__ico svg { width: 20px; height: 20px; }
.calc-card strong { margin-top: 8px; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.calc-card__text { font-size: .86rem; line-height: 1.4; color: var(--fg-muted); max-width: 42ch; position: relative; }
.calc-card__go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--link); }
.calc-card__go svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.calc-card:hover .calc-card__go svg { transform: translateX(3px); }
/* diagrams: navy linework, tints of the text colour so they follow the theme */
.d-solid { fill: var(--fg); fill-opacity: .6; } .d-mid { fill: var(--fg); fill-opacity: .38; } .d-soft { fill: var(--fg); fill-opacity: .2; }
.d-accent { fill: var(--accent); }
.d-line { fill: none; stroke: var(--fg); stroke-opacity: .7; stroke-width: 2; }
.d-soft-stroke { fill: none; stroke: var(--fg); stroke-opacity: .3; stroke-width: 6; }
.d-accent-stroke { fill: none; stroke: var(--accent); stroke-width: 4; }
.d-dim { fill: none; stroke: var(--fg); stroke-opacity: .5; stroke-width: 1; stroke-dasharray: 3 3; }
.calcx { display: grid; gap: clamp(16px, 2.4vw, 32px); }
@media (min-width: 900px) { .calcx { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } }
.calcx__in { display: grid; gap: 14px; }
.calcx__diagram { width: 140px; height: 124px; }
.calcx__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.seg-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg-field legend { padding: 0; margin-bottom: .4rem; font-size: .82rem; font-weight: 600; color: var(--fg); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--r-input); }
.seg__b {
  flex: 1 1 auto; min-height: 44px; padding-inline: 12px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--fg-muted);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.seg__b:hover { background: var(--bg-sunken); color: var(--fg); }
.seg__b.is-on { background: var(--btn-primary); color: var(--btn-primary-fg); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }
.calcx__class { margin: .5rem 0 0; font-size: .82rem; color: var(--fg-muted); min-height: 2.6em; }
.calcx__out { border: 1px solid var(--line); border-radius: var(--r-glass); background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; }
.calcx__sum { display: none; }
.calcx__panel { padding: clamp(14px, 2vw, 20px); }
.calcx__scroll { max-height: min(62vh, 640px); overflow: auto; margin: calc(clamp(14px, 2vw, 20px) * -1) calc(clamp(14px, 2vw, 20px) * -1) 0; }
.calcx__table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.calcx__table th, .calcx__table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.calcx__table th:first-child, .calcx__table td:first-child { padding-left: clamp(14px, 2vw, 20px); }
.calcx__table th:last-child, .calcx__table td:last-child { padding-right: clamp(14px, 2vw, 20px); }
.calcx__table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--bg);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--fg-muted);
}
.calcx__table tbody tr:nth-child(even) > * { background: var(--bg-zebra); }
.calcx__table tbody th { font-weight: 500; }
.calcx__table tbody th a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.calcx__table tbody th a:hover { color: var(--link); text-decoration-color: currentColor; }
.calcx__spec { display: block; font-size: .74rem; font-weight: 400; color: var(--fg-faint); }
.calcx__table .num { font-family: var(--font-mono); font-size: .92rem; font-weight: 600; white-space: nowrap; color: var(--fg); }
.calcx__table .pack { font-family: var(--font-mono); font-size: .74rem; color: var(--fg-muted); }
.calcx__table td:last-child { font-family: var(--font-mono); font-size: .76rem; color: var(--fg-muted); }
.calcx__note { margin: .8rem 0 0; font-size: .78rem; color: var(--fg-faint); }
.calcx__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.calcx__more { margin: .6rem 0 0; }
.calcx__more a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .88rem; font-weight: 600; color: var(--link); }
.calcx__more svg { width: 18px; height: 18px; }
.calc-missing { display: grid; gap: 12px; justify-items: start; }
@media (max-width: 899px) {
  .calcx__out {
    position: sticky; bottom: calc(var(--bottom-row-h) + 8px + env(safe-area-inset-bottom, 0px)); z-index: 6;
    box-shadow: var(--shadow-2);
  }
  .calcx__sum {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 52px; padding: 8px 16px; font-size: .92rem; font-weight: 600; color: var(--fg); text-align: left;
  }
  .calcx__sum svg { width: 18px; height: 18px; transform: rotate(180deg); transition: transform var(--dur) var(--ease-out); }
  .calcx__out.is-open .calcx__sum svg { transform: none; }
  .calcx__panel { display: none; max-height: 62svh; overflow-y: auto; border-top: 1px solid var(--line); }
  .calcx__scroll { max-height: none; overflow: visible; }
  .calcx__out.is-open .calcx__panel { display: block; }
  .calcx__actions .btn { flex: 1 1 100%; }
}

@media print {
  .blueprint { background-image: none; }
  .calcx__actions, .calcx__sum, .calcx__diagram, .calcx__more { display: none !important; }
  /* rev4: the chosen option is part of the result, so print it, alone */
  .calcx__in .seg { display: block; border: 0; background: none; padding: 0; }
  .calcx__in .seg__b:not(.is-on) { display: none; }
  .calcx__in .seg__b.is-on { background: none !important; color: #000 !important; box-shadow: none !important; padding: 0; font-weight: 600; text-align: left; }
  .calcx__table thead th { position: static; }
  /* a grid item is not split across pages, so the two-column grid pushed the
     whole calculator to page 2 under a lone heading */
  .calcx { display: block; }
  .calcx > * + * { margin-top: 14pt; }
  .calcx__panel { display: block !important; max-height: none; }
  .calcx__out { position: static; background: #fff; border-color: #999; box-shadow: none; }
  .calcx__table th, .calcx__table td { color: #000 !important; border-color: #ccc; }
}

/* --------------------------------------------------------------- 404 */
.err-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }

/* ------------------------------------------------------------ legal page */
.prose h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-top: 2.2em; margin-bottom: .6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; list-style: disc; }
.prose li { margin-bottom: .4em; max-width: var(--measure); }

/* ------------------------------------------------- print (calculator) */
@media print {
  .calc__inputs, .calc__actions, details.assumptions summary { display: none; }
  .section--dark { background: #fff !important; color: #000 !important; }
  .section--dark * { color: #000 !important; }
  .calc__out { border: 1px solid #999; }
  .calc__row { border-color: #ccc; }
}
