/* =============================================================================
   Safiery Store — Design System (Dark)
   Palette: brand blue #3E78BD + neutral grey #8C9198 on a dark stage — matches
   the homepage "Follow the power" energy universe (assets/css/energy.css).
   Trade (B2B) mode keeps the SAME look — only prices/tier/savings change.
   ========================================================================== */

/* Fonts are loaded from each page's <head> with a preconnect + direct <link>
   (see the SEO/perf block stamped by scripts/apply-seo-head.mjs) instead of a
   CSS @import — an @import here forced a render-blocking serial request chain
   (HTML → store.css → fonts.googleapis CSS → gstatic woff2) on every page. */

:root {
  /* surfaces — dark-first, same near-black as the homepage stage */
  --bg:        #070c15;
  --bg-rgb:    7,12,21;
  --bg-soft:   #0a1424;   /* alternating sections, footer */
  --surface:   #101a2c;   /* cards */
  --surface-rgb: 16,26,44;
  --surface-soft: #131f34;
  /* Light on purpose: product photography is studio-shot on white, so photo
     tiles (pcard-img/pdp-hero/news-media) get a light "stage" even though the
     rest of the site is dark — a dark tile would either cut a harsh white box
     out of the page or, for photos with backgrounds removed, make black
     products vanish. Pure white (not off-white) so the tile never shows a
     seam against a photo's own white background. See "photo stage" below. */
  --tile:      #ffffff;
  --line:      rgba(126,160,205,.16);
  --line-2:    rgba(126,160,205,.30);

  /* brand */
  --brand:      #3E78BD;  /* primary blue (from swatch) — solid fills */
  --brand-deep: #2c5a91;  /* darker blue — solid-fill hover (buttons) */
  --brand-ink:  #7fb4ee;  /* light blue — links, accent text on dark */
  --brand-tint: rgba(62,120,189,.16);  /* translucent blue wash */
  --brand-tint2:rgba(62,120,189,.32);
  --grey:       #8c9198;  /* brand grey (from swatch) */

  /* text */
  --text:      #ecf3fc;
  --text-dim:  #a3b5cc;
  --text-mut:  #7c8ca8;

  /* semantic */
  --green:     #35c274;
  --amber:     #f0a83c;
  --red:       #ef6a5f;

  /* type */
  --display: 'Bricolage Grotesque', ui-sans-serif, sans-serif;
  --body:    'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --radius:    16px;
  --radius-sm: 10px;
  --maxw: 1280px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 1px 1px rgba(0,0,0,.22);
  --shadow:    0 14px 34px -16px rgba(0,0,0,.55);
  --shadow-lg: 0 30px 70px -26px rgba(0,0,0,.65);

  --accent: var(--brand);
  color-scheme: dark;
}

/* trade mode keeps the same theme — no accent change */

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  /* same ambient wash as the homepage explorer stage (energy.css .home-dark);
     fixed so it stays visible behind the whole page, not just above the fold */
  background-image:
    radial-gradient(1100px 500px at 85% -12%, rgba(62,120,189,.20), transparent 70%),
    radial-gradient(800px 400px at 4% 2%, rgba(46,90,150,.16), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; }

/* Page frame: every page except the full-bleed home page boxes its main
   content to the exact same left/right column as the header (.wrap shares
   --maxw with .header-main .wrap), so the frame's edges line up with where
   the logo and header icons start/stop. Home (body.home-dark) opts out —
   it's the locked, edge-to-edge "Follow the power" stage. */
body:not(.home-dark) #main > .wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 28px;
  padding-top: 40px;
  padding-bottom: 48px;
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .icon-btn:focus-visible { outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 600; transition: top .15s ease; }
.skip-link:focus { top: 0; }
/* Visually-hidden but readable by screen readers + crawlers (clip technique).
   Also defined in energy.css for the homepage; kept here so every page (which
   loads only store.css) can carry an sr-only <h1>. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; margin: 0; letter-spacing: -.02em; color: var(--text); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand); display: inline-block; }
.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; letter-spacing: .005em;
  transition: transform .14s ease, box-shadow .25s ease, background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(62,120,189,.6); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(44,90,145,.6); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(var(--bg-rgb),.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topstrip { background: var(--brand-tint); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); }
.topstrip .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topstrip .wrap > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topstrip .dot { color: var(--green); }
.header-main .wrap { display: flex; align-items: center; gap: 26px; height: 78px; }
.brand { flex: none; display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.03em; color: var(--text); }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(62,120,189,.7); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; flex: 1 1 auto; min-width: 0; }
/* Direct-child selector: .nav now also contains the mega-panel (nested several
   levels deep, full of its own <a> tiles) — ".nav a" would leak this nowrap/pill
   styling onto every mega-menu link too. */
.nav > a { flex: none; white-space: nowrap; padding: 8px 13px; border-radius: 8px; font-size: 14.5px; color: var(--text-dim); font-weight: 500; transition: .14s; }
.nav > a:hover, .nav > a.active { color: var(--brand-ink); background: var(--brand-tint); }
.header-actions { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-dim); display: grid; place-items: center; transition: .14s; }
.icon-btn:hover { color: var(--brand-ink); border-color: var(--brand); background: var(--brand-tint); }
.icon-btn svg { width: 19px; height: 19px; }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 100px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--surface); }
.menu-toggle { display: none; }

/* ---------- Shop mega-menu ---------- */
/* .mega-panel is position:absolute with no positioned ancestor between it and
   .wrap (.nav-item stays position:static on purpose) so it centers against the
   1280px content column, not the narrow "Shop" trigger near the header's left edge. */
.nav-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px; font-family: var(--body); font-size: 14.5px; font-weight: 500; color: var(--text-dim); background: none; border: 0; transition: .14s; }
.nav-trigger .chev { width: 14px; height: 14px; transition: transform .18s ease; }
.nav-trigger:hover, .nav-trigger.open, .nav-trigger.active { color: var(--brand-ink); background: var(--brand-tint); }
.nav-trigger.open .chev { transform: rotate(180deg); }
.mega-panel {
  position: absolute; top: calc(100% + 14px); left: 50%; z-index: 60;
  width: min(1120px, calc(100vw - 48px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 30px 32px 24px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform-origin: top center;
  transform: translateX(-50%) translateY(-14px) scaleY(.96);
  transition: opacity .2s ease, transform .3s cubic-bezier(.16,1,.3,1), visibility 0s linear .3s;
}
.mega-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0) scaleY(1);
  transition: opacity .26s ease, transform .34s cubic-bezier(.16,1,.3,1);
}
.mega-domains { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
/* Guides has 4 categories, not 5, and no numbered/coloured domain badge — a narrower
   panel keeps its columns from reading too wide/sparse next to Shop's. */
.mega-panel-narrow { width: min(920px, calc(100vw - 48px)); }
.mega-domains-4 { grid-template-columns: repeat(4, 1fr); }
/* Columns cascade in on open (staggered per index) rather than popping in with
   the panel all at once — the panel itself still does the "coming down" slide. */
.mega-domain-col { display: flex; flex-direction: column; min-width: 0; opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease; }
.mega-panel.open .mega-domain-col { opacity: 1; transform: translateY(0); }
.mega-panel.open .mega-domain-col:nth-child(1) { transition-delay: .02s; }
.mega-panel.open .mega-domain-col:nth-child(2) { transition-delay: .05s; }
.mega-panel.open .mega-domain-col:nth-child(3) { transition-delay: .08s; }
.mega-panel.open .mega-domain-col:nth-child(4) { transition-delay: .11s; }
.mega-panel.open .mega-domain-col:nth-child(5) { transition-delay: .14s; }
.mega-domain-media { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin-bottom: 14px; }
.mega-domain-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform .3s ease; }
.mega-domain-col:hover .mega-domain-media img { transform: scale(1.05); }
.mega-domain-title { display: flex; align-items: baseline; gap: 7px; font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.25; margin-bottom: 10px; }
.mega-domain-title:hover { color: var(--brand); }
.mega-num { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; font-weight: 600; color: rgb(var(--tile-rgb)); }
.mega-sublist { display: flex; flex-direction: column; gap: 1px; }
.mega-sublist a { display: block; padding: 5px 0; font-size: 13px; color: var(--text-dim); }
.mega-sublist a:hover { color: var(--brand); text-decoration: underline; }
.mega-promo { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: background .14s, border-color .14s; }
/* Support mega-menu: flat destinations, no columns — the same .mega-promo
   card repeated side by side instead of stacked once under the Shop columns.
   Column count varies with the destination count (see .mega-promo-grid-4,
   same pattern as .mega-domains-4 above for Guides). */
.mega-promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mega-promo-grid-4 { grid-template-columns: repeat(4, 1fr); }
.mega-promo-grid .mega-promo { margin-top: 0; height: 100%; align-items: flex-start; }
.mega-promo:hover { border-color: var(--brand); background: var(--brand-tint); }
.mega-promo .mega-ico { width: 28px; height: 28px; color: var(--brand); flex: none; }
.mega-promo-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mega-promo-body b { font-size: 14.5px; color: var(--text); }
.mega-promo-body span { font-size: 12.5px; color: var(--text-mut); line-height: 1.4; }
.mega-promo-arrow { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--text-mut); transform: rotate(-90deg); }
.mega-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.mega-footer a:first-child { font-weight: 600; color: var(--brand-ink); }
.mega-footer a:last-child { color: var(--text-mut); }
.mega-footer a:hover { color: var(--brand); }
@media (prefers-reduced-motion: reduce) {
  .mega-panel, .mega-domain-col, .mega-domain-media img, .nav-trigger .chev { transition: none; }
  .mega-domain-col { opacity: 1; transform: none; }
}

/* ---------- header search ---------- */
.search-box { display: flex; align-items: center; position: relative; }
.search-box .search-toggle.open, .search-box.open .search-toggle { color: var(--brand-ink); border-color: var(--brand); background: var(--brand-tint); }
.search-input {
  width: 0; opacity: 0; visibility: hidden; margin-left: 0;
  padding: 0; border: 1px solid transparent; border-radius: 11px; background: var(--surface); color: var(--text);
  font-family: var(--body); font-size: 14px;
  transition: width .2s ease, opacity .16s ease, margin-left .2s ease, padding .2s ease, visibility 0s linear .2s;
}
.search-box.open .search-input { width: 230px; opacity: 1; visibility: visible; margin-left: 8px; padding: 0 12px; height: 42px; border-color: var(--line); transition: width .2s ease, opacity .16s ease, margin-left .2s ease, padding .2s ease; }
.search-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 760px) { .search-box { display: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 90px; background: var(--bg-soft); padding-bottom: 90px; } /* clears the fixed Ask Safiery launcher (bottom:20px, ~44px tall) at full scroll */
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding: 60px 0 36px; }
.site-footer h4 { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mut); margin-bottom: 16px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a, .site-footer li { color: var(--text-dim); font-size: 14.5px; }
.site-footer a:hover { color: var(--brand); }
.footer-tagline { color: var(--text-dim); font-size: 15px; max-width: 32ch; margin: 16px 0 0; }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-mut); letter-spacing: .03em; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 54px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 78px); font-weight: 800; letter-spacing: -.035em; }
.hero h1 .hl { color: var(--brand); }
.hero p.lede { font-size: 18.5px; color: var(--text-dim); max-width: 46ch; margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--text); }
.hero-stat .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.hero-visual { aspect-ratio: 1/1; border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 42%, var(--brand-tint), var(--surface) 70%); box-shadow: var(--shadow-lg); display: grid; place-items: center; position: relative; overflow: hidden; }
.hero-visual::after { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(62,120,189,.10) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%); }
.hero-visual > svg { width: 58%; height: 58%; position: relative; z-index: 1; color: var(--brand); }

/* brand logo */
.brand-logo { height: 65px; width: auto; display: block; filter: brightness(0) invert(1); opacity: .92; }
.site-footer .brand-logo { height: 92px; }

/* ---- interactive 3D Scotty hero ---- */
.hero-3d { padding: 0; }
.hero-3d::after { content: none; }
.scotty-viewer { width: 100%; height: 100%; border-radius: 26px; background: transparent; --poster-color: transparent; --progress-bar-color: transparent; outline: none; }
.viewer-badge { position: absolute; left: 16px; top: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; background: rgba(var(--surface-rgb),.86); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--text-dim); font-size: 11px; letter-spacing: .04em; padding: 6px 11px; border-radius: 100px; }
.vb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: vbpulse 1.9s infinite; }
@keyframes vbpulse { 0%,100% { box-shadow: 0 0 0 3px rgba(62,120,189,.22); } 50% { box-shadow: 0 0 0 7px rgba(62,120,189,0); } }
.viewer-controls { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: flex; gap: 8px; }
.vc-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: rgba(var(--surface-rgb),.9); backdrop-filter: blur(8px); color: var(--brand-ink); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: .14s; }
.vc-btn:hover { background: var(--surface); border-color: var(--brand); transform: translateY(-1px); }
.vc-btn svg { width: 18px; height: 18px; }
.ar-btn { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); white-space: nowrap; background: var(--brand); color: #fff; border: 0; border-radius: 100px; padding: 10px 18px; font-family: var(--body); font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 22px -8px rgba(62,120,189,.6); }
.m-progress { position: absolute; left: 14%; right: 14%; bottom: 18px; height: 4px; border-radius: 4px; background: rgba(62,120,189,.16); overflow: hidden; transition: opacity .45s ease; }
.m-bar { height: 100%; width: 0%; background: var(--brand); transition: width .2s ease; }

/* hotspots */
.hp { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 9px; --min-hotspot-opacity: 0.25; }
.hp-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--brand), 0 4px 10px -2px rgba(0,0,0,.45); flex: none; }
.hp-card { opacity: 0; transform: translateY(4px) scale(.96); transform-origin: left center; transition: .16s ease; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; box-shadow: var(--shadow); white-space: nowrap; text-align: left; }
.hp:hover .hp-card, .hp:focus .hp-card, .hp:focus-visible .hp-card { opacity: 1; transform: none; }
.hp-card b { display: block; font-size: 12.5px; color: var(--text); font-family: var(--body); }
.hp-card span { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }

/* ---- centered hero + product pillars ---- */
.hero--center { text-align: center; padding: 90px 0 50px; }
.hero--center .eyebrow, .hero--center .hero-cta, .hero--center .hero-stats { justify-content: center; }
.hero--center h1 { font-size: clamp(44px, 7vw, 90px); }
.hero--center .lede { margin-left: auto; margin-right: auto; }
.hero--center .hero-stats { gap: 48px; margin-top: 38px; }

.section-head.center { justify-content: center; text-align: center; }
.section-head.center > div { max-width: 62ch; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

.pillars { padding-top: 26px; }
.pillar { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 54px 0; }
.pillar-body { max-width: 52ch; }
.pillar-num { font-family: var(--display); font-size: 60px; font-weight: 800; line-height: 1; color: var(--brand-tint2); display: block; margin-bottom: 4px; }
.pillar-body .eyebrow { margin-bottom: 12px; }
.pillar-body h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.pillar-body > p { color: var(--text-dim); font-size: 16px; margin: 0 0 18px; }
.pillar-points { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; }
.pillar-points li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--text); }
.pillar-points li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E78BD' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pillar-media { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle at 50% 38%, var(--brand-tint), var(--surface) 72%); box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; }
.pillar-img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }

/* scroll-reveal — slides in from each product's side */
[data-pillar] .pillar-media { opacity: 0; transform: translateX(48px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); will-change: transform, opacity; }
[data-pillar].pillar--media-left .pillar-media { transform: translateX(-48px); }
[data-pillar] .pillar-body { opacity: 0; transform: translateY(26px); transition: opacity .8s ease .12s, transform .8s cubic-bezier(.2,.7,.2,1) .12s; }
[data-pillar].in .pillar-media, [data-pillar].in .pillar-body { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-pillar] .pillar-media, [data-pillar] .pillar-body { opacity: 1 !important; transform: none !important; transition: none; }
}

@media (max-width: 920px) {
  .pillar { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
  .pillar-media { order: -1; }
  .pillar-num { font-size: 46px; }
  [data-pillar] .pillar-media, [data-pillar].pillar--media-left .pillar-media { transform: translateY(30px); }
}

[data-reveal] { opacity: 0; transform: translateY(16px); animation: reveal .65s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { color: var(--text-dim); margin: 8px 0 0; max-width: 52ch; }

/* shop.html category header: tight single-column by default, upgrades to a
   text+image hero grid when the active category has a heroImage (see store.js).
   Photo tile follows the same light "photo stage" as pdp-hero/pcard-img — these
   are studio-shot on white, so the plate stays light even on the dark page. */
.section-head--shop { margin: 14px 0 22px; }
.section-head--shop.has-media { display: grid; grid-template-columns: 1.3fr .9fr; align-items: center; gap: 40px; margin: 22px 0 34px; }
.section-head--shop.has-media p { max-width: 46ch; }
.section-head-media { aspect-ratio: 4/3; max-height: 300px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); position: relative; }
.section-head-media img {
  position: absolute; left: 16px; top: 16px;
  width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain;
  background: var(--tile); border-radius: 14px;
  filter: brightness(.95);
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.6);
}
@media (max-width: 920px) {
  .section-head--shop.has-media { grid-template-columns: 1fr; }
  .section-head-media { order: -1; max-height: 220px; }
}
@media (max-width: 760px) {
  .section-head-media { display: none; }
}

/* ---------- category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); overflow: hidden; transition: .18s; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-sm); }
.cat-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.cat-card .ico { width: 44px; height: 44px; color: var(--brand); }
.cat-card .ctag { position: absolute; top: 16px; right: 16px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--text-mut); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.cat-card h3 { font-size: 18px; margin-top: 18px; }
.cat-card p { font-size: 13px; color: var(--text-dim); margin: 6px 0 0; }
.cat-card .more { font-family: var(--mono); font-size: 12px; color: var(--brand); margin-top: 12px; letter-spacing: .03em; }

/* ---------- shop layout (sidebar removed) ---------- */
/* shop.html's grid used to bleed to 1560px past --maxw; now capped to the
   sitewide 1280px column like every other page, so its page-frame border
   (see body:not(.home-dark) #main > .wrap above) lines up with the header. */

/* ---------- product grid + card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(285px, 1fr)); gap: 20px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } /* product.html related-products; inherits the 20px gap above (was 18px) — a harmless +2px there */

@media (min-width: 1600px) {
  .product-grid { grid-template-columns: repeat(4, minmax(285px, 1fr)); } /* 4-up only on wide screens; card ~292px, well over the 285px minimum inside the 1280px-capped wrap */
}
.pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; position: relative; box-shadow: var(--shadow-sm); }
.pcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.pcard:hover .pcard-img img { transform: scale(1.03); }
/* Photo "plate": a flush light stage framed by the card's own 10px padding —
   the dark margin around it reads as a photo floating on the card. Product
   photos are studio-shot on white, so the plate stays --tile (pure white)
   even though the rest of the card is dark; brightness() takes the glare off. */
.pcard-img { aspect-ratio: 4/3; background: var(--tile); border-radius: 11px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; filter: brightness(.97); }
.pcard-img img {
  max-width: 86%; max-height: 88%; object-fit: contain;
  transition: transform .3s ease;
}
/* pcard-topbar spans the plate width; badgeHTML (store.js) guarantees
   exactly one badge (stock-led OR sale flag, never both), pinned top-left. */
.pcard-topbar { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.pcard-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
/* Solid fills on the dark page (pdp-flags, no photo behind them). Over the
   light photo stage (pcard-flags) they go translucent + blurred instead —
   see below — so they read as a frosted chip rather than cutting a hard
   opaque block out of the product photo. */
.flag.sale { background: #c0392b; color: #fff; }
.flag.feat { background: var(--brand); color: #fff; }
.pcard-flags .flag { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pcard-flags .flag.sale { background: rgba(192,57,43,.8); }
.stock-led { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); background: rgba(var(--surface-rgb),.88); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pcard-topbar .stock-led { margin-left: 0; }
.stock-led .led { width: 5px; height: 5px; border-radius: 50%; }
.led.in_stock { background: var(--green); }
.led.backorder { background: var(--amber); }
.led.made_to_order { background: var(--brand); }
.led.out_of_stock { background: var(--grey, #8C9198); }
.pcard-body { padding: 14px 6px 8px; display: flex; flex-direction: column; flex: 1; }
.pcard-eyebrow { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--text-mut); }
.pcard h3 {
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--body);
  line-height: 1.3;
  margin: 5px 0 0;
  letter-spacing: 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: calc(1.3em * 3);
}
.pcard h3 a:hover { color: var(--brand); }
.minibadge { font-family: var(--mono); font-size: 10px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: var(--surface-soft); }
.pcard-body .pbadges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pcard-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }

/* one-line truncated descriptor from product.short */
.pcard-desc {
  font-family: var(--body);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-dim);
  margin: 6px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* compact stacked ex/inc GST price (priceHTML opts.card branch output) */
.price-compact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-compact .pc-ex {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.price-compact .pc-ex .pc-suffix {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-mut);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-left: 5px;
}
.price-compact .pc-ex .pc-from { font-size: 11px; font-weight: 500; color: var(--text-mut); margin-right: 2px; }
.price-compact .pc-inc {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mut);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.price-compact .pc-was {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mut);
  text-decoration: line-through;
  margin-top: 1px;
}

/* "View product" text-link CTA (replaces old <button data-add>) */
.pcard-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 6px 2px;
  transition: color .16s ease, gap .16s ease;
}
.pcard-cta-arrow { width: 12px; height: 12px; flex: none; transition: transform .16s ease; }
.pcard-cta:hover, .pcard-cta:focus-visible {
  color: var(--brand-ink);
  gap: 8px;
}
.pcard-cta:hover .pcard-cta-arrow, .pcard-cta:focus-visible .pcard-cta-arrow {
  transform: translate(2px, -2px);
}

/* price block */
.price { display: flex; flex-direction: column; gap: 1px; }
.price .now { font-family: var(--mono); font-size: 19px; font-weight: 600; color: var(--text); }
.price .now .cur { font-size: 11px; color: var(--text-mut); margin-right: 3px; }
.price .was { font-size: 12.5px; color: var(--text-mut); text-decoration: line-through; }
.price .gst { font-size: 10.5px; color: var(--text-mut); letter-spacing: .02em; }
.price .b2b { color: var(--text); }                 /* trade price = same look as retail */
.price .retail-strike { font-size: 12.5px; color: var(--text-mut); text-decoration: line-through; }
.price .save { font-size: 10.5px; color: var(--brand); }
.price.lg .now { font-size: 30px; }

/* ---------- shop toolbar (filters live in dropdown panels, not a sidebar) ---------- */
.filter-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filter-block:last-child { border-bottom: 0; }
.filter-block h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); margin-bottom: 12px; font-weight: 500; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--text-dim); cursor: pointer; }
.filter-opt:hover { color: var(--text); }
.filter-opt input { accent-color: var(--brand); width: 15px; height: 15px; }
.filter-opt .ct { margin-left: auto; font-size: 11px; color: var(--text-mut); }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding: 40px 0 0; flex-wrap: wrap; }
.shop-toolbar .count { font-size: 13px; color: var(--text-dim); }
.shop-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.shop-toolbar-right { display: flex; align-items: center; gap: 16px; flex: none; }

.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-group { position: relative; }

.filter-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-family: var(--body); font-size: 14px; font-weight: 500;
  transition: border-color .14s, color .14s, background .14s;
}
.filter-trigger:hover { border-color: var(--brand); color: var(--brand-ink); }
.filter-trigger.active { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-tint); }
.filter-trigger .filter-count { font-family: var(--mono); font-size: 12px; color: var(--brand); }
.filter-trigger.active .filter-count { color: var(--brand-ink); }
.filter-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.filter-caret { width: 13px; height: 13px; flex: none; color: var(--text-mut); transition: transform .16s ease; }
.filter-trigger.open .filter-caret { transform: rotate(180deg); }

.filter-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  width: 280px; max-height: 70vh; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 6px 18px 16px; box-shadow: var(--shadow-sm);
}
.filter-panel--price { width: 240px; }
.filter-panel--right { left: auto; right: 0; }
.filter-panel .filter-block:first-child { padding-top: 14px; }

.btn-clear-filters {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 6px;
  font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--text-mut);
  border-radius: var(--radius-sm);
}
.btn-clear-filters svg { width: 14px; height: 14px; }
.btn-clear-filters:hover { color: var(--brand); }
.btn-clear-filters:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.field { background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; color: var(--text); padding: 10px 13px; font-family: var(--body); font-size: 14px; }
.field::placeholder { color: var(--text-mut); }
.field:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field:focus { border-color: var(--brand); }
select.field { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3b5cc' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.search-wrap { position: relative; flex: 1; max-width: 320px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mut); }
.search-wrap .field { width: 100%; padding-left: 36px; }
.range-row { display: flex; gap: 8px; align-items: center; }
.range-row .field { width: 100%; font-size: 13px; }

/* ---------- product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 46px; padding: 40px 0 0; align-items: start; }
.pdp-gallery { position: sticky; top: 116px; }
.pdp-hero { aspect-ratio: 1/1; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); position: relative; }
.pdp-hero img {
  position: absolute; left: 18px; top: 18px;
  width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain;
  background: var(--tile); border-radius: 14px;
  filter: brightness(.95);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
.pdp-info .pcat { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.pdp-info .pcat .sku { font-family: var(--mono); color: var(--text-mut); }
.pdp-info h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 12px 0 14px; }
.pdp-flags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.pdp-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0; }
.pdp-buy { display: flex; gap: 12px; align-items: center; margin: 22px 0; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 100px; overflow: hidden; background: var(--surface); }
.qty button { width: 42px; height: 46px; background: var(--surface); color: var(--text); border: 0; font-size: 18px; }
.qty button:hover { color: var(--brand); background: var(--brand-tint); }
.qty input { width: 48px; height: 46px; text-align: center; background: transparent; border: 0; color: var(--text); font-size: 16px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.specs-table tr { border-bottom: 1px solid var(--line); }
.specs-table td { padding: 12px 0; vertical-align: top; }
.specs-table td:first-child { color: var(--text-dim); width: 42%; font-size: 13.5px; }
.specs-table td:last-child { font-family: var(--mono); font-size: 13.5px; color: var(--text); }
.specs-table thead td { color: var(--text-mut); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
/* Spec label cells are <th scope="row"> for a11y/table semantics — mirror the
   old td:first-child look (th defaults to bold + centred, so reset those). */
.specs-table th { padding: 12px 0; vertical-align: top; text-align: left; font-weight: 400; color: var(--text-dim); width: 42%; font-size: 13.5px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 50px 0 26px; flex-wrap: wrap; }
.tab { padding: 12px 18px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; max-width: 75ch; color: var(--text-dim); font-size: 15.5px; }
.tab-panel.active { display: block; }
.tab-panel p { margin: 0 0 14px; }
.trade-cta-box { border: 1px solid var(--brand-tint2); background: var(--brand-tint); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; margin: 20px 0; color: var(--text); }
.trade-cta-box svg { color: var(--brand); width: 40px; height: 40px; flex: none; }

/* ---------- trade banner ---------- */
.trade-banner { border: 1px solid var(--brand-tint2); border-radius: var(--radius); background: var(--brand-tint); padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--text); }
.trade-banner svg { color: var(--brand); width: 40px; height: 40px; flex: none; }
.trade-banner .tier-chip { font-size: 13px; padding: 8px 14px; border-radius: 100px; background: var(--brand); color: #fff; font-weight: 600; }

/* ---------- cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; padding: 36px 0 0; }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb { width: 92px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--tile); }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: contain; filter: brightness(.95); }
.cart-line h4 { font-family: var(--body); font-weight: 600; font-size: 15px; color: var(--text); }
.cart-line .ln-mini { font-size: 11.5px; color: var(--text-mut); margin-top: 4px; }
.cart-line .ln-mini .sku { font-family: var(--mono); }
.cart-line .ln-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.qty.sm button { width: 34px; height: 36px; font-size: 15px; }
.qty.sm input { width: 38px; height: 36px; font-size: 14px; }
.link-remove { background: none; border: 0; color: var(--text-mut); font-size: 12px; }
.link-remove:hover { color: var(--red); }
.summary { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; position: sticky; top: 116px; box-shadow: var(--shadow-sm); }
.summary h3 { font-size: 19px; margin-bottom: 18px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 14.5px; color: var(--text-dim); }
.sum-row .v { font-family: var(--mono); color: var(--text); }
.sum-row.save, .sum-row.save .v { color: var(--brand); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; margin-top: 8px; border-top: 1px solid var(--line); }
.sum-total .lbl { font-size: 15px; color: var(--text); }
.sum-total .v { font-family: var(--mono); font-size: 25px; font-weight: 600; color: var(--brand); }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 80px 20px; }
.empty svg { width: 56px; height: 56px; color: var(--text-mut); margin-bottom: 18px; }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--text-mut); letter-spacing: .04em; padding: 26px 0 0; }
.breadcrumb a:hover { color: var(--brand); }
.value-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.value { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.value .ico { width: 28px; height: 28px; color: var(--brand); margin-bottom: 14px; }
.value h4 { font-size: 16px; margin-bottom: 6px; }
.value p { font-size: 13.5px; color: var(--text-dim); margin: 0; }
.notice { border: 1px solid var(--line); background: var(--surface-soft); border-radius: var(--radius); padding: 16px 18px; font-size: 14px; color: var(--text-dim); }
.notice.warn { border-color: rgba(240,168,60,.4); background: rgba(240,168,60,.12); color: var(--amber); }

.auth-card { max-width: 460px; margin: 50px auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.form-group { margin: 16px 0; }
.form-group label { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); margin-bottom: 7px; }
.form-group .field { width: 100%; }
.form-group textarea.field { min-height: 110px; resize: vertical; font: inherit; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.demo-accounts { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.demo-accounts table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.demo-accounts td { padding: 6px 4px; border-bottom: 1px solid var(--line); font-family: var(--mono); color: var(--text-dim); }
.demo-accounts td:last-child { text-align: right; color: var(--brand); }
.demo-accounts tr:hover td { color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--brand); }
.form-error { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 16px; }
/* Guidance under a form field. Promoted from a page-local rule in warranty.html so
   there is one definition rather than a per-page copy that drifts. Works for both
   <span class="field-hint"> and <p class="field-hint">. */
.field-hint { display: block; color: var(--text-dim); font-size: 12.5px; line-height: 1.45; margin: 5px 0 0; }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; padding: 13px 16px; box-shadow: var(--shadow); font-size: 14px; color: var(--text); animation: toastin .3s ease; min-width: 240px; }
.toast .ti { color: var(--brand); }
@keyframes toastin { from { opacity: 0; transform: translateX(20px); } }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; opacity: 0; pointer-events: none; transition: .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.nav-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 280px; background: var(--surface); border-left: 1px solid var(--line); z-index: 70; transform: translateX(100%); transition: transform .25s ease; padding: 80px 22px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-lg); }
.nav-drawer.open { transform: none; }
.nav-drawer a { padding: 13px 14px; border-radius: 9px; color: var(--text-dim); font-size: 16px; }
.nav-drawer a:hover { background: var(--brand-tint); color: var(--brand-ink); }
.nav-drawer .close { position: absolute; top: 20px; right: 20px; }
.drawer-search { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); color: var(--text-mut); }
.drawer-search svg { width: 18px; height: 18px; flex: none; }
.drawer-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font-family: var(--body); font-size: 15px; }
.drawer-search input:focus-visible { outline: none; }
.drawer-disclosure { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 14px; border-radius: 9px; background: none; border: 0; color: var(--text-dim); font-size: 16px; }
.drawer-disclosure:hover { background: var(--brand-tint); color: var(--brand-ink); }
.drawer-disclosure .chev { width: 15px; height: 15px; transition: transform .18s ease; }
.drawer-group.open .drawer-disclosure .chev { transform: rotate(180deg); }
.drawer-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
.drawer-sub-inner { overflow: hidden; display: flex; flex-direction: column; }
.drawer-group.open .drawer-sub { grid-template-rows: 1fr; }
.drawer-tile { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 26px; color: var(--text-dim); font-size: 14.5px; }
.drawer-tile svg { width: 18px; height: 18px; flex: none; color: var(--text-mut); }
.drawer-tile:hover { background: var(--brand-tint); color: var(--brand-ink); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cat-grid, .value-row { grid-template-columns: repeat(3,1fr); } /* .product-grid removed: at 1080px cw~1032px already clears the 895px needed for 3 fixed 285px-min columns; see the 1024px breakpoint below */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, minmax(285px, 1fr)); } /* fixes an overflow window: a bare 3-col default would overflow between ~vw 761-942 (cw dips to 872px, needs 895px) */
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; }
  .pdp { grid-template-columns: 1fr; }
  .pdp-gallery { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .cat-grid, .product-grid, .product-grid.cols-3, .value-row { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 30px; }
  .hero { padding: 50px 0 30px; }
  .wrap { padding: 0 18px; }
  .topstrip .wrap .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .product-grid, .product-grid.cols-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line .thumb { width: 64px; height: 52px; }
  .cart-line .ln-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .price-compact .pc-ex { font-size: 14px; }
  .price-compact .pc-ex .pc-suffix { margin-left: 3px; }
  .pcard-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filter-panel { width: min(280px, calc(100vw - 32px)); }
}

/* ---------- section anchor offset (so dot-nav jumps clear the sticky header) ---------- */
#s-hero, #s-energy, #s-cats, #s-featured, #after-energy {
  scroll-margin-top: 106px;
}

/* ---------- side dot nav ---------- */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  pointer-events: none;
}
.dot-nav::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}
.dot-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
  flex: none;
  opacity: 0;
  animation: dn-enter .5s cubic-bezier(.2,.7,.2,1) both;
}
.dot-nav-btn:nth-child(1) { animation-delay: .3s; }
.dot-nav-btn:nth-child(2) { animation-delay: .44s; }
.dot-nav-btn:nth-child(3) { animation-delay: .58s; }
.dot-nav-btn:nth-child(4) { animation-delay: .72s; }
.dot-nav-btn:nth-child(5) { animation-delay: .86s; }
@keyframes dn-enter { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.dot-nav-pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line-2);
  border: 1.5px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-2);
  transition: background .3s ease, box-shadow .35s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
  position: relative; z-index: 1;
}
.dot-nav-btn:hover .dot-nav-pip {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(62,120,189,.22);
  transform: scale(1.35);
}
.dot-nav-btn.active .dot-nav-pip {
  background: var(--brand);
  transform: scale(1.6);
  box-shadow: 0 0 0 4px rgba(62,120,189,.2), 0 0 0 8px rgba(62,120,189,.07);
  animation: dn-pulse 2.2s ease infinite;
}
@keyframes dn-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(62,120,189,.2), 0 0 0 8px rgba(62,120,189,.06); }
  50%      { box-shadow: 0 0 0 6px rgba(62,120,189,.10), 0 0 0 13px rgba(62,120,189,0); }
}
.dot-nav-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(7px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.dot-nav-btn:hover .dot-nav-label,
.dot-nav-btn.active .dot-nav-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- pillar separators ---------- */
.pillar-sep {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 6px 0 0;
}
.pillar-sep span {
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-tint2);
  opacity: 0;
  transform: scale(0) translateY(5px);
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .4s ease;
}
.pillar-sep span:nth-child(2) { transition-delay: .09s; }
.pillar-sep span:nth-child(3) { transition-delay: .18s; }
.pillar-sep.sep-on span { opacity: 1; transform: none; }

@media (max-width: 900px) { .dot-nav { display: none; } }

/* =============================================================================
   News tab (news.html) — fed by the ERP store-news endpoint
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin: 0 0 56px;
}
.news-status {
  grid-column: 1 / -1;
  color: var(--text-mut);
  font-size: 15px;
  padding: 40px 0;
  text-align: center;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.news-media { aspect-ratio: 16 / 9; background: none; overflow: hidden; position: relative; }
.news-media img {
  position: absolute; left: 12px; top: 12px; display: block;
  width: calc(100% - 24px); height: calc(100% - 14px); object-fit: contain;
  background: var(--tile); border-radius: 12px;
  filter: brightness(.95);
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.55);
}
.news-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.news-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
.news-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}
.news-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.news-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint2);
  border-radius: 999px;
  padding: 3px 10px;
}
.news-excerpt { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.news-body { color: var(--text-dim); font-size: 14px; line-height: 1.65; margin: 0; }
.news-more {
  align-self: flex-start;
  margin-top: 4px;
  font-weight: 600;
  font-size: 14px;
  color: var(--brand);
  text-decoration: none;
}
.news-more:hover { color: var(--brand-ink); text-decoration: underline; }

/* tiles are clickable — they open the full article in a modal */
.news-card { cursor: pointer; }
.news-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.news-more-cue { margin-top: auto; padding-top: 6px; color: var(--brand); }
.news-card:hover .news-more-cue { color: var(--brand-ink); }

/* ── article modal ──────────────────────────────────────────────────────── */
body.news-modal-open { overflow: hidden; }
.news-modal[hidden] { display: none; }
.news-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(16px, 5vh, 64px) 16px;
  overflow-y: auto;
}
.news-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
  animation: nm-fade .18s ease;
}
.news-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: nm-rise .22s cubic-bezier(.2, .7, .3, 1);
}
.news-modal-dialog:focus { outline: none; }
.news-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(var(--surface-rgb), .9); backdrop-filter: blur(6px);
  border: 1px solid var(--line); color: var(--text); cursor: pointer;
  transition: .14s;
}
.news-modal-close:hover { background: var(--surface); border-color: var(--line-2); color: var(--brand-ink); }
.news-modal-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.news-modal-media { background: none; padding: 16px 16px 0; }
.news-modal-media:empty { display: none; }
.news-modal-media img { width: 100%; max-height: 380px; object-fit: contain; display: block; background: var(--tile); border-radius: 12px; filter: brightness(.95); }
.news-modal-body { padding: 26px clamp(22px, 4vw, 40px) 32px; }
.news-modal-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 4vw, 30px); line-height: 1.18;
  color: var(--text); margin: 8px 0 0;
}
.news-modal-body .news-tags { margin-top: 14px; }
.news-article { color: var(--text-dim); font-size: 16px; line-height: 1.72; margin-top: 18px; }
.news-article p { margin: 0 0 14px; }
.news-article p:last-child { margin-bottom: 0; }
.news-modal-body .news-more { display: inline-block; margin-top: 22px; font-size: 15px; }
.news-modal-body .news-more[hidden] { display: none; }

@keyframes nm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .news-modal-scrim, .news-modal-dialog { animation: none; } }

@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; gap: 16px; } .news-title { font-size: 19px; } }

/* =============================================================================
   Guides tab (guides.html) — tile metadata in data/guides.js; tiles open the
   full archived article (data/guides-content.js) in the shared .news-modal
   chrome. Article-body styling below is scoped to .guide-article so it never
   leaks onto the plain-text .news-article used by News.
   ========================================================================== */
.guide-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
}
.guide-jump a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint2);
  border-radius: 999px;
  padding: 7px 16px;
  text-decoration: none;
}
.guide-jump a:hover { background: var(--brand-tint2); }
.guide-section { margin-bottom: 48px; scroll-margin-top: 90px; }
.guide-section-head { margin-bottom: 20px; }
.guide-section-head h3 { font-family: var(--display); font-size: clamp(20px, 2.4vw, 26px); margin: 0; color: var(--text); }
.guide-section-head p { color: var(--text-dim); font-size: 14.5px; margin: 6px 0 0; }
.guide-grid { margin-bottom: 0; }
.guide-card { text-decoration: none; color: inherit; }
.guide-card .news-more-cue { margin-top: auto; }

/* ── guide article body (rendered inside the shared news-modal) ──────────── */
.guide-article { color: var(--text-dim); font-size: 16px; line-height: 1.72; margin-top: 18px; }
.guide-article h3, .guide-article h4 {
  font-family: var(--display); font-weight: 700; color: var(--text);
  line-height: 1.28; margin: 34px 0 12px;
}
.guide-article h3 { font-size: clamp(19px, 2.6vw, 23px); }
.guide-article h4 { font-size: 17px; }
.guide-article > *:first-child { margin-top: 0; }
.guide-article p { margin: 0 0 14px; }
.guide-article p:last-child { margin-bottom: 0; }
.guide-subhead { font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.guide-article ul, .guide-article ol { margin: 0 0 16px; padding-left: 1.3em; }
.guide-article li { margin-bottom: 6px; }
.guide-article blockquote {
  margin: 0 0 16px; padding: 4px 0 4px 16px;
  border-left: 3px solid var(--brand-tint2);
  color: var(--text); font-style: italic;
}
.guide-figure { margin: 0 0 20px; }
.guide-figure img {
  width: 100%; display: block; border-radius: 12px;
  background: var(--tile); box-shadow: 0 6px 18px -8px rgba(0,0,0,.55);
}
.guide-table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.guide-table tr:not(:last-child) { border-bottom: 1px solid var(--line); }
.guide-table th, .guide-table td { padding: 10px 14px; text-align: left; white-space: nowrap; }
.guide-table th { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.guide-table td { color: var(--text-dim); }
.guide-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--tile); margin: 0 0 20px; cursor: pointer;
}
.guide-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.guide-video-play {
  position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.85); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: .14s;
}
.guide-video:hover .guide-video-play { background: var(--brand); border-color: var(--brand); }

/* ==== category story (shop.html landings) ====================================
   Editorial explainer block rendered by assets/js/story.js: "What is a …?"
   panel + animated power-flow diagram + info banner + subcategory tiles.
   --st-rgb is set inline per story to the active domain's accent (the same
   five colours as the homepage universe and the Shop mega-menu). */
.story {
  --st: rgb(var(--st-rgb, 62,120,189));
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--surface-rgb), .55), rgba(var(--surface-rgb), .22));
  padding: 30px 34px; margin-bottom: 18px; position: relative; overflow: hidden;
}
.story::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(620px 280px at 76% 30%, rgba(var(--st-rgb), .07), transparent 70%);
}
.story > * { position: relative; }
.story-what h3 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.01em; }
.story-lead { color: var(--text-dim); margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; max-width: 54ch; }
.story-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.story-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), .5);
}
.story-chip-ico { width: 20px; height: 20px; color: var(--brand-ink); flex: none; }
.story-chip b { display: block; font-size: 12.5px; line-height: 1.3; }
.story-chip i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-mut); line-height: 1.3; }
.story-ctas { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* flow diagram (right column) */
.story-flow { border-left: 1px solid var(--line); padding-left: 34px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.story-rail { display: flex; justify-content: space-between; align-items: flex-end; position: relative; margin-bottom: 22px; }
.story-rail::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2.5px; height: 1px; background: var(--line-2); }
.story-stop { display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.story-stop-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); white-space: nowrap; }
.story-stop-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.story-stop.on .story-stop-label { color: var(--st); }
.story-stop.on .story-stop-dot { background: var(--st); box-shadow: 0 0 10px 2px rgba(var(--st-rgb), .45); }

.story-nodes { display: flex; align-items: stretch; }
.story-node {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px; padding: 12px 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), .6);
}
.story-node.hot {
  border-color: rgba(var(--st-rgb), .55);
  box-shadow: 0 0 0 1px rgba(var(--st-rgb), .25), 0 12px 32px -18px rgba(var(--st-rgb), .55);
}
/* width:100% + max-width so a squeezed node card (5-node diagrams on narrow
   two-column layouts) shrinks its photo instead of letting it spill the card */
.story-node-media { width: 100%; max-width: 74px; height: 56px; border-radius: 8px; background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.story-node-media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.story-node-ico { background: rgba(var(--surface-rgb), .9); border: 1px solid var(--line); color: var(--text-dim); }
.story-node-ico svg { width: 26px; height: 26px; }
.story-node b { font-size: 11.5px; line-height: 1.25; }
.story-node i { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--text-mut); letter-spacing: .04em; }

.story-link { flex: 0 1 46px; min-width: 16px; position: relative; align-self: center; height: 14px; }
.story-link > svg:first-child { width: 100%; height: 14px; display: block; }
.sl-base { stroke: rgba(var(--st-rgb), .55); stroke-width: 2; }
.sl-flow { stroke: #fff; stroke-width: 2; opacity: .8; stroke-dasharray: 4 26; animation: story-flowdash 2.4s linear infinite; }
.sl-head { position: absolute; top: 0; width: 8px; height: 14px; fill: none; stroke: rgba(var(--st-rgb), .85); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sl-head-r { right: -1px; }
.sl-head-l { left: -1px; }
@keyframes story-flowdash { to { stroke-dashoffset: -120; } }

.story-cap { position: relative; margin-top: 22px; text-align: center; }
.story-cap::before { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 1px dashed rgba(var(--st-rgb), .45); }
.story-cap span {
  position: relative; display: inline-block; padding: 5px 14px; border-radius: 999px;
  border: 1px dashed rgba(var(--st-rgb), .55); background: rgb(var(--bg-rgb));
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--st);
}

/* film panel (right column) — replaces the diagram when a story sets flow.video */
.story-video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #000;
}
.story-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* info banner + subcategory tiles under the story panel */
.story-banner {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), .45);
}
.story-banner-ico { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--brand-ink); flex: none; }
.story-banner-ico svg { width: 16px; height: 16px; }
.story-banner p { margin: 0; font-size: 14px; color: var(--text-dim); }
.story-banner a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.story-banner a:hover { color: var(--text); }
.story-banner-arrow { color: var(--brand-ink); }

.story-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.story-tiles-2 { grid-template-columns: repeat(2, 1fr); }
.story-tile {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), .45);
  transition: border-color .14s, background .14s, transform .14s;
}
.story-tile:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateY(-1px); }
.story-tile-media { width: 104px; height: 76px; border-radius: 8px; overflow: hidden; flex: none; background: var(--tile); }
.story-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.story-tile-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.story-tile-body b { font-size: 14.5px; }
.story-tile-body span { font-size: 12.5px; color: var(--text-mut); line-height: 1.45; }
.story-tile-arrow { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--text-mut); transform: rotate(-90deg); }

/* a story landing keeps its heading compact: the flow diagram is the visual */
.section-head.has-story { margin-bottom: 24px; }
.section-head.has-story .section-head-media { display: none; }

@media (max-width: 1200px) {
  .story { grid-template-columns: 1fr; gap: 26px; padding: 24px; }
  .story-flow { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}
@media (max-width: 900px) {
  .story-tiles, .story-tiles-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .story { padding: 20px 16px; }
  .story-stop:not(.on) .story-stop-label { display: none; }
  /* nodes become a plain 2-col grid: wrapped connector arrows would dangle
     at row edges, so the links are dropped and the rail tells the sequence */
  .story-nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .story-link { display: none; }
}

/* ==== ambient power rails ====================================================
   The homepage universe's glowing conduits, carried through the rest of the
   store as fixed decorative traces in the side gutters (amber production on
   the left, blue storage/distribution on the right). Pure decoration: behind
   all content (z-index -1), no pointer events, only when the viewport leaves
   a real gutter beside the 1280px column, static under reduced motion. */
.power-rail { position: fixed; top: 0; bottom: 0; z-index: -1; pointer-events: none; display: none; }
.power-rail svg { width: 100%; height: 100%; display: block; }
.power-rail-l { left: 0; }
.power-rail-r { right: 0; }
.power-rail path { stroke-linecap: round; stroke-linejoin: round; }
/* same layer stack as the homepage conduits: breathing backlight glow, dark
   casing so the trace reads as a physical busbar, coloured core, faint surge
   sweep, white tick train, junction vias, pinging node dots, comet packets */
.power-rail .plglow { fill: none; stroke-width: 11; opacity: .2; filter: blur(8px); animation: plbreath 6.2s ease-in-out infinite; }
.power-rail-r .plglow { animation-delay: -3.1s; }
@keyframes plbreath { 0%, 100% { opacity: .15; } 50% { opacity: .28; } }
.power-rail .plcase { fill: none; stroke: #04070d; stroke-width: 6; opacity: .85; }
.power-rail .plbase { fill: none; stroke-width: 2.2; opacity: .5; }
.power-rail .plsurge { fill: none; stroke-width: 3.6; opacity: .14; stroke-dasharray: 80 720; animation: plsurge 6.5s linear infinite; }
@keyframes plsurge { to { stroke-dashoffset: -800; } }
.power-rail .plflow { fill: none; stroke: #fff; stroke-width: 1.8; opacity: .45; stroke-dasharray: 4 40; animation: plflow 3.4s linear infinite; }
.power-rail .plstub { fill: none; stroke-width: 2; stroke-dasharray: 3 7; opacity: .32; animation: plstubdrift 1.4s linear infinite; }
@keyframes plstubdrift { to { stroke-dashoffset: -10; } }
.power-rail .plvia { fill: #060b15; stroke-width: 1.4; opacity: .8; }
.power-rail .pldot { opacity: .9; }
.power-rail .plping { fill: none; stroke-width: 1.4; }
@keyframes plflow { to { stroke-dashoffset: -264; } }
@media (min-width: 1460px) {
  .power-rail { display: block; width: clamp(70px, calc((100vw - var(--maxw)) / 2 - 10px), 170px); }
}
@media (prefers-reduced-motion: reduce) {
  .power-rail .plflow, .power-rail .plglow, .power-rail .plstub, .sl-flow { animation: none; }
  /* packets/pings aren't built under reduced motion (store.js checks) — this
     also stills a frozen surge bar, which would read as a broken trace */
  .power-rail .plsurge, .power-rail .plpacket, .power-rail .plping { display: none; }
}
