/* ==========================================================================
   Atlas Distributions — Design System v2 (Light / White)
   Style: Trust & Authority, lightened — white canvas, navy type, blue accent
   ========================================================================== */

:root {
  /* Core brand */
  --color-primary: #0F172A;
  --color-on-primary: #FFFFFF;
  --color-secondary: #475569;
  --color-accent: #0369A1;
  --color-accent-hover: #075985;
  --color-accent-soft: #E0F2FE;

  /* Surfaces — white-forward */
  --color-background: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F8FAFC;
  --color-foreground: #0F172A;
  --color-muted: #F1F5F9;
  --color-muted-foreground: #64748B;
  --color-border: #E2E8F0;
  --color-border-strong: #CBD5E1;

  --color-destructive: #DC2626;
  --color-success: #15803D;
  --color-ring: #0369A1;

  /* Typography */
  --font-heading: 'Lexend', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  /* Spacious scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.10);

  --max-width: 1180px;
  --header-h: 76px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* The `hidden` attribute is how the JS shows and hides the buy button, the
   calculator's input modes and the quote basket. A UA stylesheet only sets
   display:none at the lowest precedence, so any component carrying its own
   display value (.btn is inline-flex, .grid is grid) would ignore it. This
   makes it stick. */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-foreground);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 var(--space-4); color: var(--color-secondary); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 var(--space-6); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-accent); color: #FFF;
  padding: var(--space-3) var(--space-6); z-index: 200;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md);
  font-family: var(--font-heading); font-weight: 500; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; min-height: 46px;
  transition: transform var(--transition), background var(--transition),
              box-shadow var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #FFF; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-accent-hover); color: #FFF; box-shadow: var(--shadow-md); }
.btn-secondary { background: #FFF; color: var(--color-primary); border-color: var(--color-border-strong); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; min-height: 54px; }

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--color-primary);
  color: #CBD5E1;
  font-size: 0.85rem;
}
.utility-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: var(--space-2) var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap;
}
.utility-bar a { color: #E2E8F0; }
.utility-bar a:hover { color: #FFF; }
.utility-links { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.utility-links span, .utility-links a { display: inline-flex; align-items: center; gap: var(--space-2); }
.utility-links svg { width: 15px; height: 15px; color: #7DD3FC; flex-shrink: 0; }
@media (max-width: 700px) {
  /* Drop the tagline (it repeats the hero copy) and tighten the gutters so the
     phone and email sit on one row instead of stacking two rows above the fold. */
  .utility-tagline { display: none; }
  .utility-inner { justify-content: center; padding: var(--space-2) var(--space-4); }
  .utility-links { gap: var(--space-4); font-size: 0.8rem; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: var(--max-width); margin: 0 auto; gap: var(--space-4);
}
.nav-logo img { height: 50px; width: auto; }
@media (max-width: 1023px) { .nav-logo img { height: 44px; } }
.nav-links {
  display: flex; align-items: center; gap: var(--space-6);
  list-style: none; margin: 0; padding: 0;
}
.nav-links > li { position: relative; }
.nav-links a, .dropdown-toggle {
  color: var(--color-secondary); font-family: var(--font-body);
  font-weight: 500; font-size: 0.97rem; padding: var(--space-2) 0;
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.nav-links a:hover, .dropdown-toggle:hover,
.nav-links a[aria-current="page"] { color: var(--color-accent); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.dropdown-toggle svg { width: 14px; height: 14px; transition: transform var(--transition); }
.dropdown.is-open .dropdown-toggle svg { transform: rotate(180deg); }
.dropdown.is-open .dropdown-toggle { color: var(--color-accent); }

.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: -16px;
  min-width: 290px; background: #FFF;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-2);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
/* Desktop: hover + focus-within (keyboard accessible, no JS needed).
   Mobile overrides below use the JS-applied .is-open class instead. */
@media (min-width: 1024px) {
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
  .dropdown:hover .dropdown-toggle,
  .dropdown:focus-within .dropdown-toggle { color: var(--color-accent); }
  .dropdown:hover .dropdown-toggle svg,
  .dropdown:focus-within .dropdown-toggle svg { transform: rotate(180deg); }
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
  display: block; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); color: var(--color-primary); font-weight: 500;
}
.dropdown-menu a:hover { background: var(--color-accent-soft); color: var(--color-accent-hover); }
.dropdown-menu .dd-desc {
  display: block; font-size: 0.82rem; color: var(--color-muted-foreground);
  font-weight: 400; margin-top: 2px;
}
.dropdown-menu a:hover .dd-desc { color: var(--color-accent-hover); }

.nav-cta { display: none; }
.nav-cta-mobile { display: none; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--space-2); min-width: 44px; min-height: 44px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--color-primary); }

@media (min-width: 1024px) { .nav-cta { display: inline-flex; } }

@media (max-width: 1023px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; width: 100%; height: calc(100vh - var(--header-h));
    flex-direction: column; align-items: stretch;
    background: #FFF; padding: var(--space-6); gap: 0; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links > li > a, .dropdown-toggle {
    padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border);
    width: 100%; font-size: 1.05rem;
  }
  .dropdown-toggle { justify-content: space-between; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-bottom: 1px solid var(--color-border);
    border-radius: 0; padding: 0 0 var(--space-3) var(--space-4);
    display: none; min-width: 0;
  }
  .dropdown.is-open .dropdown-menu { display: block; }
  .nav-cta-mobile { display: inline-flex; margin-top: var(--space-6); }
}

/* ---------- Hero (white / airy) ---------- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--color-accent-soft) 0%, transparent 65%),
    #FFFFFF;
  padding: var(--space-24) 0 var(--space-16);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-heading); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: var(--space-4);
}
.hero h1 { margin-bottom: var(--space-6); }
.hero .lead {
  font-size: 1.2rem; color: var(--color-secondary);
  max-width: 620px; margin: 0 auto var(--space-8);
}
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }

/* ---------- Trust strip ---------- */
.trust-bar { background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
.trust-bar-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-6); padding: var(--space-8) 0; text-align: center;
}
.trust-item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.trust-item svg { width: 26px; height: 26px; color: var(--color-accent); }
.trust-item span {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 0.85rem; color: var(--color-primary);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-24) 0; }
.section-tight { padding: var(--space-16) 0; }
.section-alt { background: var(--color-surface-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-header { max-width: 660px; margin: 0 auto var(--space-16); text-align: center; }
.section-header .eyebrow { margin-bottom: var(--space-3); }
.section-header p { font-size: 1.08rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* auto-fit means "as many 300px columns as will fit", which is three at desktop
   width — so a four-card section rendered as three plus one stranded underneath.
   Above the breakpoint, hold it to two so pairs sit square and four cards read
   as a 2x2 block. Every other grid-2 on the site holds exactly two cards, which
   this leaves unchanged. */
@media (min-width: 860px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card {
  background: #FFF; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.card-icon {
  width: 50px; height: 50px; border-radius: var(--radius-md);
  background: var(--color-accent-soft); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-6);
}
.card-icon svg { width: 25px; height: 25px; }
.card h3 { margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }
.card .btn { margin-top: var(--space-6); }
.sector-card { text-align: center; padding: var(--space-6); }
.sector-card .card-icon { margin-left: auto; margin-right: auto; }

/* ---------- Photo cards (sector imagery) ----------
   Card variant with a cropped photo on top. The media box owns the crop via
   aspect-ratio + object-fit so mismatched source sizes still line up. */
.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-card .photo-media {
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--color-muted); border-bottom: 1px solid var(--color-border);
}
.photo-card .photo-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 450ms ease;
}
.photo-card:hover .photo-media img { transform: scale(1.045); }
.photo-card .photo-body { padding: var(--space-6); }
.photo-card h3 { margin-bottom: var(--space-2); }
.photo-card p:last-child { margin-bottom: 0; }

.photo-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* Six columns rather than three, with every card spanning two. Visually
   identical for a full row, but it gives half-column positions to play with —
   which is what lets an odd last row be centred instead of hanging left. */
@media (min-width: 940px) {
  .photo-grid { grid-template-columns: repeat(6, 1fr); }
  .photo-grid > * { grid-column: span 2; }

  /* Five cards in threes leaves two stranded at the left of the second row.
     Starting the fourth card one column in centres the pair under the trio.
     Scoped with :nth-last-child(2) so it only fires on a five-card grid — the
     three-card grids elsewhere are untouched. */
  .photo-grid > :nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
}

/* Staggered variant — drops every second card so the row reads as a rhythm
   rather than a flat strip. Uses margin, not transform, so it doesn't fight
   the card's translateY hover. */
@media (min-width: 940px) {
  .photo-grid-stagger { align-items: start; }
  .photo-grid-stagger > :nth-child(even) { margin-top: var(--space-12); }
}

/* ---------- Media stack (two offset photos beside a text column) ----------
   width/height stay auto so the grid stretches the box and `aspect-ratio`
   drives the crop — setting width:100% would let each image's height
   attribute win and squash the ratio. min-width:0 stops the intrinsic image
   width from blowing out the parent grid column. */
.media-stack { display: grid; gap: var(--space-4); min-width: 0; }
.media-stack img {
  width: 100%; height: auto; min-width: 0;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
/* The stagger: each photo gives up a slice of the column and pulls to
   opposite edges, so the pair reads as offset rather than a flat stack. */
@media (min-width: 700px) {
  .media-stack img { width: calc(100% - var(--space-12)); }
  .media-stack img:first-child { justify-self: start; }
  .media-stack img:last-child { justify-self: end; }
}

/* Single feature photo inside a grid or split row */
.media-single img {
  width: 100%; height: auto; min-width: 0;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

/* ---------- Product cards ---------- */
.product-card { display: flex; flex-direction: column; position: relative; }
.product-card.featured { border-color: var(--color-accent); box-shadow: var(--shadow-md); }
.product-card .price {
  font-family: var(--font-heading); font-size: 1.9rem; font-weight: 600;
  color: var(--color-primary); margin: var(--space-2) 0 var(--space-1);
}
.product-card .price small { font-size: 0.88rem; font-weight: 400; color: var(--color-muted-foreground); }
.product-card .price-note { font-size: 0.85rem; color: var(--color-muted-foreground); margin-bottom: var(--space-6); }
.badge {
  position: absolute; top: -13px; right: var(--space-6);
  background: var(--color-accent); color: #FFF;
  font-family: var(--font-heading); font-size: 0.72rem; font-weight: 600;
  padding: var(--space-1) var(--space-3); border-radius: 999px; letter-spacing: 0.02em;
}
.feature-list { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.feature-list li {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-2) 0; color: var(--color-secondary); font-size: 0.97rem;
}
.feature-list svg { width: 18px; height: 18px; color: var(--color-success); flex-shrink: 0; margin-top: 4px; }
.product-card .btn { margin-top: auto; }

/* Buy / quote pair on the product pages. The wrapper takes the auto margin so
   both buttons stay pinned to the bottom of the card as a unit. */
.buy-actions { display: grid; gap: var(--space-3); margin-top: auto; }
.buy-actions .btn { margin-top: 0; }
.buy-note {
  font-size: 0.84rem; color: var(--color-muted-foreground);
  margin: var(--space-4) 0 0; line-height: 1.5;
}

/* ---------- Spec table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.97rem; min-width: 460px; }
table.spec th, table.spec td { padding: var(--space-4) var(--space-6); text-align: left; border-bottom: 1px solid var(--color-border); }
table.spec th { background: var(--color-surface-alt); font-family: var(--font-heading); font-weight: 600; color: var(--color-primary); }
table.spec tr:last-child td { border-bottom: none; }
table.spec td { color: var(--color-secondary); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--color-primary); color: #FFF;
  border-radius: var(--radius-xl); padding: var(--space-16) var(--space-8);
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(3, 105, 161, 0.4), transparent 55%);
  /* Decoration only. Without this it covers the whole banner — including the
     buttons — and swallows every click, because a positioned pseudo-element
     with auto z-index paints above the content it follows. */
  pointer-events: none;
}
/* Belt and braces: lift the content above the gradient as well, so the buttons
   stay clickable even if the rule above is ever lost. */
.cta-banner-inner { position: relative; z-index: 1; max-width: 580px; margin: 0 auto; }
.cta-banner h2 { color: #FFF; }
.cta-banner p { color: #CBD5E1; font-size: 1.08rem; }
.cta-banner .btn-secondary { background: transparent; color: #FFF; border-color: rgba(255,255,255,0.35); }
.cta-banner .btn-secondary:hover { background: rgba(255,255,255,0.1); color: #FFF; border-color: #FFF; }
.cta-actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; margin-top: var(--space-8); }

/* ---------- Forms ---------- */
.form-card {
  background: #FFF; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-4); }
.field { margin-bottom: var(--space-6); }
.field label {
  display: block; font-family: var(--font-heading); font-weight: 500;
  font-size: 0.92rem; color: var(--color-primary); margin-bottom: var(--space-2);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.95rem;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem;
  background: #FFF; color: var(--color-foreground); min-height: 46px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-accent); outline: none;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.14);
}
.field.required label::after { content: " *"; color: var(--color-destructive); }
.field .error { display: none; color: var(--color-destructive); font-size: 0.86rem; margin-top: var(--space-1); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-destructive); }
.field.has-error .error { display: block; }

.field-help { font-size: 0.85rem; color: var(--color-muted-foreground); margin: var(--space-3) 0 0; }

/* ---------- Range slider ----------
   The track is styled through the vendor track pseudo-elements so the fill can
   sit behind a full-size thumb. `--range-progress` is written by main.js. */
.range-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
}
.range-head label { margin-bottom: var(--space-3); }
.range-output {
  font-family: var(--font-heading); font-weight: 600; font-size: 1.5rem;
  color: var(--color-accent); line-height: 1.2;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; background: transparent; cursor: pointer;
  margin: var(--space-2) 0; padding: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px; background: var(--color-muted);
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: var(--range-progress, 50%) 100%; background-repeat: no-repeat;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; margin-top: -9px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #FFF; border: 3px solid var(--color-accent); box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--color-muted); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--color-accent); }
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--color-accent);
  background: #FFF; box-shadow: var(--shadow-sm);
}
input[type="range"]:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 4px; }
.range-scale {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--color-muted-foreground);
}

.form-success {
  display: none; background: #F0FDF4; border: 1px solid var(--color-success);
  border-radius: var(--radius-md); padding: var(--space-6);
  margin-top: var(--space-6); text-align: center;
}
.form-success.is-visible { display: block; }
.form-success svg { width: 32px; height: 32px; color: var(--color-success); margin: 0 auto var(--space-2); }

.contact-alt {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-6) 0 0; border-top: 1px solid var(--color-border);
  margin-top: var(--space-8); color: var(--color-secondary); font-size: 0.95rem;
}
.contact-alt svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-6) 0; cursor: pointer;
  font-family: var(--font-heading); font-weight: 500; font-size: 1.05rem;
  color: var(--color-primary); list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; transition: transform var(--transition); }
.faq-item[open] .faq-question svg { transform: rotate(45deg); }
.faq-answer { padding: 0 0 var(--space-6); color: var(--color-secondary); max-width: 68ch; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-8); }
.stat { text-align: center; }
.stat .num { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 600; color: var(--color-accent); line-height: 1; }
.stat .label { font-size: 0.92rem; color: var(--color-muted-foreground); margin-top: var(--space-2); }

/* ---------- Page header ---------- */
.page-header {
  background:
    radial-gradient(ellipse 70% 70% at 50% -20%, var(--color-accent-soft) 0%, transparent 60%),
    #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-16) 0 var(--space-12); text-align: center;
}
.page-header p { max-width: 620px; margin: 0 auto; font-size: 1.1rem; }

/* Breadcrumbs */
.breadcrumb { padding: var(--space-4) 0 0; font-size: 0.88rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; justify-content: center; }
.breadcrumb li { display: flex; align-items: center; gap: var(--space-2); color: var(--color-muted-foreground); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--color-border-strong); }

/* ---------- Split ---------- */
/* .split-wide must repeat the display/gap/alignment, not just the columns —
   pages use it on its own (class="container split-wide"), so without these it
   falls back to block layout and the two columns stack. */
.split, .split-wide { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.split-wide { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 900px) { .split, .split-wide { grid-template-columns: 1fr; gap: var(--space-12); } }

.icon-list { list-style: none; padding: 0; margin: 0; }
.icon-list li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; color: var(--color-secondary); }
.icon-list svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; margin-top: 4px; }

/* ---------- SEO prose block ---------- */
.prose-seo { font-size: 1rem; color: var(--color-secondary); }
.prose-seo h2 { font-size: 1.5rem; margin-top: var(--space-8); }
.prose-seo h3 { font-size: 1.1rem; margin-top: var(--space-6); }
.prose-seo p { max-width: 72ch; }

/* ---------- Numbered benefit cards (trade account) ---------- */
.step-num {
  font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600;
  color: var(--color-accent); letter-spacing: 0.08em;
  display: block; margin-bottom: var(--space-3);
}
.note-line {
  font-size: 0.86rem; color: var(--color-muted-foreground);
  margin-top: var(--space-4);
}
.tick-row {
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8);
  justify-content: center; margin-bottom: var(--space-12);
  list-style: none; padding: 0;
}
.tick-row li {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.93rem; color: var(--color-secondary);
}
.tick-row svg { width: 17px; height: 17px; color: var(--color-success); flex-shrink: 0; }

/* ---------- Google Business Profile link ---------- */
.gbp-link {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: #FFF; color: var(--color-primary);
  font-family: var(--font-heading); font-weight: 500; font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.gbp-link:hover { border-color: var(--color-accent); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.gbp-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.gbp-link small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; color: var(--color-muted-foreground); }

.site-footer .gbp-link {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18);
  color: #E2E8F0; margin-top: var(--space-2);
}
.site-footer .gbp-link:hover { border-color: rgba(255,255,255,0.5); color: #FFF; box-shadow: none; }
.site-footer .gbp-link small { color: #94A3B8; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary); color: #CBD5E1; padding: var(--space-24) 0 var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: var(--space-8); padding-bottom: var(--space-16); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
/* width:auto is load-bearing — the logo carries width/height attributes, so
   without it the attribute width wins and the mark gets squashed. */
.footer-logo { height: 44px; width: auto; margin-bottom: var(--space-6); filter: brightness(0) invert(1); }
.footer-about { color: #94A3B8; font-size: 0.93rem; max-width: 290px; }
.footer-col h4 {
  color: #FFF; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: var(--space-6); font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--space-3); color: #94A3B8; font-size: 0.93rem; }
.footer-col a { color: #CBD5E1; font-size: 0.93rem; }
.footer-col a:hover { color: #FFF; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-4); padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.85rem; color: #94A3B8;
}
.footer-legal { font-size: 0.78rem; color: #64748B; margin-top: var(--space-4); max-width: 640px; }

/* ==========================================================================
   AdBlue requirements calculator
   Two columns on desktop: the inputs on the left, a sticky result panel on
   the right so the numbers stay in view while the visitor adjusts figures.
   Everything the panel shows is derived in js/main.js — the markup ships with
   the default result already rendered, so the page is useful before (and
   without) JavaScript.
   ========================================================================== */
.calc { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-8); align-items: start; }
@media (max-width: 940px) { .calc { grid-template-columns: 1fr; } }

.calc-panel {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-sm);
}
.calc-panel > h2, .calc-panel > h3 { margin-top: 0; }

/* Mode switch — radios styled as a segmented control, so keyboard and screen
   reader users get real radio semantics while everyone sees two buttons. */
.calc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-6); }
@media (max-width: 420px) { .calc-modes { grid-template-columns: 1fr; } }
.calc-mode input { position: absolute; opacity: 0; width: 0; height: 0; }
.calc-mode span {
  display: block; text-align: center; cursor: pointer;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  font-family: var(--font-heading); font-weight: 500; font-size: 0.93rem;
  color: var(--color-secondary); background: #FFF;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.calc-mode span:hover { border-color: var(--color-accent); }
.calc-mode input:checked + span {
  background: var(--color-accent-soft); border-color: var(--color-accent);
  color: var(--color-primary);
}
.calc-mode input:focus-visible + span { outline: 2px solid var(--color-ring); outline-offset: 2px; }

.calc-fields[hidden] { display: none; }
.calc-panel .field { margin-bottom: var(--space-6); }
.calc-note { font-size: 0.85rem; color: var(--color-muted-foreground); margin: 0; }

/* Result panel */
.calc-result {
  background: var(--color-primary); border-radius: var(--radius-lg);
  padding: var(--space-8); color: #CBD5E1; position: sticky; top: var(--space-8);
}
@media (max-width: 940px) { .calc-result { position: static; } }
.calc-result h3 { color: #FFF; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }
.calc-figure { font-family: var(--font-heading); font-weight: 600; color: #FFF; line-height: 1.05; letter-spacing: -0.02em; }
.calc-figure .num { font-size: clamp(2.5rem, 6vw, 3.4rem); display: block; }
.calc-figure .unit { font-size: 1rem; color: #7DD3FC; display: block; margin-top: var(--space-2); }
.calc-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-6) 0; }
.calc-split div {
  background: rgba(255,255,255,0.07); border-radius: var(--radius-md); padding: var(--space-4);
}
.calc-split dt, .calc-split .k { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #94A3B8; }
.calc-split dd, .calc-split .v { margin: var(--space-1) 0 0; font-family: var(--font-heading); font-weight: 600; color: #FFF; font-size: 1.15rem; }
.calc-rec {
  border-top: 1px solid rgba(255,255,255,0.14); padding-top: var(--space-6); margin-top: var(--space-6);
}
.calc-rec .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #94A3B8; display: block; margin-bottom: var(--space-2); }
.calc-rec h4 { color: #FFF; font-size: 1.25rem; margin-bottom: var(--space-2); }
.calc-rec p { color: #CBD5E1; font-size: 0.93rem; }
.calc-result .btn-primary { background: var(--color-accent); }
.calc-result .btn-secondary { background: transparent; color: #FFF; border: 1px solid rgba(255,255,255,0.3); }
.calc-result .btn-secondary:hover { border-color: #FFF; background: rgba(255,255,255,0.08); }
.calc-actions { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.calc-disclaimer { font-size: 0.78rem; color: #94A3B8; margin: var(--space-4) 0 0; }

/* Equivalents strip under the calculator */
.calc-equiv { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-8); }
@media (max-width: 700px) { .calc-equiv { grid-template-columns: 1fr; } }
.calc-equiv .card { padding: var(--space-6); }
.calc-equiv .big { font-family: var(--font-heading); font-weight: 600; font-size: 1.6rem; color: var(--color-accent); display: block; }
.calc-equiv .cap { font-size: 0.88rem; color: var(--color-muted-foreground); }

/* Reused by the "how SCR works" numbered steps on the AdBlue page. */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }
.flow .card { padding: var(--space-6); position: relative; }
.flow .step-num { margin-bottom: var(--space-3); }

/* Calculator promo band (home page) — collapses to a single column on
   narrow screens so the button never gets squeezed beside the copy. */
.promo-band {
  display: grid; grid-template-columns: 1.6fr 1fr;
  gap: var(--space-8); align-items: center; padding: var(--space-8);
}
@media (max-width: 760px) { .promo-band { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ==========================================================================
   Quote basket — "Add to Quote" in place of a cart
   ========================================================================== */
.qty-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.qty-row label {
  font-family: var(--font-heading); font-weight: 500; font-size: 0.93rem;
  color: var(--color-primary);
}
.qty-stepper {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  overflow: hidden; background: #FFF;
}
.qty-stepper button {
  border: 0; background: var(--color-muted); color: var(--color-primary);
  font-size: 1.15rem; line-height: 1; width: 40px; cursor: pointer;
  font-family: var(--font-heading);
  transition: background var(--transition);
}
.qty-stepper button:hover { background: var(--color-accent-soft); }
.qty-stepper button:focus-visible { outline: 2px solid var(--color-ring); outline-offset: -2px; }
.qty-stepper input {
  width: 5.5rem; border: 0; text-align: center; padding: var(--space-2);
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
  color: var(--color-primary); background: #FFF;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus-visible { outline: 2px solid var(--color-ring); outline-offset: -2px; }

.volume-note, .quote-feedback {
  font-size: 0.86rem; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); margin: var(--space-4) 0 0;
}
.volume-note { background: var(--color-muted); color: var(--color-secondary); }
.quote-feedback { background: #F0FDF4; border: 1px solid var(--color-success); color: var(--color-primary); }
.quote-feedback[hidden], .volume-note[hidden] { display: none; }

/* Count on the "Request a Quote" button — the only place the basket announces
   itself outside the quote page. */
.quote-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4rem; height: 1.4rem; margin-left: var(--space-2);
  padding: 0 0.35rem; border-radius: 999px;
  background: rgba(255,255,255,0.22); color: #FFF;
  font-size: 0.78rem; font-weight: 600;
}

.quote-basket {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-6); margin-bottom: var(--space-8);
  background: var(--color-surface-alt);
}
.quote-basket h2 { font-size: 1.2rem; margin-bottom: var(--space-4); }
.quote-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.quote-item {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border);
}
.quote-item:last-child { border-bottom: 0; }
.quote-item-main { flex: 1 1 auto; min-width: 0; }
.quote-item-main strong { display: block; font-family: var(--font-heading); color: var(--color-primary); }
.quote-item-sub { font-size: 0.85rem; color: var(--color-muted-foreground); }
.quote-remove {
  border: 0; background: none; padding: var(--space-2);
  color: var(--color-muted-foreground); font-size: 0.85rem;
  cursor: pointer; text-decoration: underline;
}
.quote-remove:hover { color: var(--color-destructive); }
.quote-summary { font-size: 0.9rem; color: var(--color-secondary); margin: 0; }
.quote-custom {
  background: var(--color-accent-soft); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6); margin: var(--space-4) 0 0;
  font-size: 0.9rem; color: var(--color-primary);
}
.quote-empty { font-size: 0.93rem; color: var(--color-secondary); margin: 0; }
@media (max-width: 560px) {
  .quote-item { flex-wrap: wrap; }
  .quote-item-main { flex: 1 1 100%; }
}

/* ==========================================================================
   Cart tidy-up
   ========================================================================== */

/* No coupon codes are issued, so the field could only ever sit there with a
   disabled Apply button beside it — which reads as broken rather than as
   "unused". Hidden on the checkout too, for the same reason. */
.wp-block-woocommerce-cart-order-summary-coupon-form-block,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.wc-block-components-totals-coupon { display: none !important; }

/* A one-line cart under a full page header sat below the fold. Cart and
   checkout get a tighter top than a reading page needs. */
.woocommerce-cart .section,
.woocommerce-checkout .section { padding-top: var(--space-12); }

/* Fills the space beside the totals card. A cart with one item leaves the left
   column short, and the honest thing to put in the gap is the two ways out:
   back to the range, or — since checkout is capped at one unit — through to a
   quote for anything larger. Injected by initCartExtras() in js/main.js. */
.atlas-cart-aside {
  margin-top: var(--space-8); padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}
.atlas-cart-aside p {
  margin: var(--space-4) 0 0; font-size: 0.9rem;
  color: var(--color-muted-foreground); max-width: 46ch;
}
.atlas-cart-aside .btn { margin: 0; }

/* Add-another-product row on the quote page. The basket persists across pages,
   so the loop back out to the product pages needs to be visible — otherwise a
   second item means using the browser's back button and hoping. */
.quote-add-more {
  margin-top: var(--space-6); padding-top: var(--space-6);
  border-top: 1px solid var(--color-border); text-align: center;
}
.quote-add-label {
  display: block; font-family: var(--font-heading); font-weight: 500;
  font-size: 0.9rem; color: var(--color-primary); margin-bottom: var(--space-3);
}
.quote-add-links {
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center;
}
.quote-add-links a {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: 999px;
  background: #FFF; font-size: 0.88rem; color: var(--color-primary);
  transition: border-color var(--transition), color var(--transition);
}
.quote-add-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.quote-add-note {
  font-size: 0.82rem; color: var(--color-muted-foreground);
  margin: var(--space-4) auto 0; max-width: 48ch;
}

/* ---------- Cart totals card ----------
   WooCommerce pads the sidebar on the left only — it uses that padding as the
   gutter between the two cart columns. Once the card gained a border, the
   content read as shoved against the right edge with a wide margin on the left.
   Even it up, and give the express payment buttons room to breathe.

   !important throughout: these override WooCommerce's own block stylesheet,
   which loads after the theme's and matches on equal specificity. */
.woocommerce-cart .wc-block-components-sidebar,
.woocommerce-checkout .wc-block-components-sidebar {
  padding: var(--space-6) !important;
}

/* Apple Pay and Google Pay sat 12px apart, close enough to read as one control.
   The buttons are flex children, so the spacing lives in the row gap — a margin
   on the items themselves does nothing here. */
.woocommerce-cart .wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons,
.woocommerce-checkout .wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons {
  gap: var(--space-4) !important;
}
.wc-block-components-express-payment { margin-bottom: var(--space-2) !important; }
.wc-block-components-express-payment-continue-rule { margin: var(--space-6) 0 !important; }
.wc-block-cart__submit-container,
.wc-block-components-checkout-place-order-button { margin-top: 0 !important; }

/* The label and the stepper share a line on a wide panel and stack on a narrow
   one, rather than squeezing the number field to nothing in between. */
.qty-row { flex-wrap: wrap; }

/* Document download — the SDS beneath each product's specification table.
   Styled as a reference link rather than a button: someone fetches it when
   they need it for a safety file, so it should not compete with the quote
   buttons for attention. */
.doc-link {
  display: inline-flex; align-items: center; gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-primary);
  font-family: var(--font-heading); font-weight: 500; font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.doc-link:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }

.doc-link svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-accent); }

.doc-link small {
  display: block; font-family: var(--font-body); font-weight: 400;
  font-size: 0.8rem; color: var(--color-muted-foreground);
}

/* Diagrams and schematics are never cropped. The 3:2 crop that flatters a
   photograph cuts the labels off a labelled diagram, which defeats the point of
   including it — so these size to their own proportions on a white ground. */
.media-diagram img {
  width: 100%; height: auto;
  aspect-ratio: auto; object-fit: contain;
  background: #FFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
