:root {
  --color-surface: #ffffff; /* content card */
  --color-surface-alt: #efefef; /* page ground */
  --color-surface-dark: #222222; /* nav band and footer band */

  /* Foreground for LIGHT surfaces only.
     Ratios, computed not estimated, against surface / surface-alt:
       text        11.37:1 / 9.89:1
       muted        6.69:1 / 5.82:1
       link         5.39:1 / 4.69:1
       link-hover   6.85:1 / 5.96:1
     All clear 4.5:1 on both light surfaces. */
  --color-text: #3a3a3a;
  --color-muted: #5c5c5c;
  --color-link: #ad4f00;
  --color-link-hover: #993f00;

  /* Foreground for the DARK surface ONLY. Each of these FAILS on both
     light surfaces and must never be used there:
       text-on-dark    15.91:1 on dark, 1.00:1 and 1.15:1 on light
       muted-on-dark    9.61:1 on dark, 1.66:1 and 1.44:1 on light
       accent-on-dark   5.91:1 on dark, 2.69:1 and 2.34:1 on light */
  --color-text-on-dark: #ffffff;
  --color-muted-on-dark: #c9c9c9;
  --color-accent-on-dark: #ff7500;

  /* Decorative only. Never carries meaning, so it is not held to 3:1. */
  --color-border: #d4d4d4;

  /* Focus needs two tokens: #0b57d0 measures 6.39:1 and 5.55:1 on the
     light surfaces but only 2.49:1 on the dark band, where it would be
     nearly invisible on the nav. */
  --color-focus: #0b57d0;
  --color-focus-on-dark: #ffffff;

  --font-body: Arial, Helvetica, sans-serif;

  /* Base is flat (not fluid) at 17px/25.5px: an unexamined fluid base
     rendered 16.14px at mobile, a typography departure from the reference.
     --text-2xl solves for the two measured h1 endpoints (30px at 412px,
     40px at 1280px): slope (40-30)/(1280-412) = 1.152vw, intercept
     30 - (1.152vw at 412px) = 25.25px = 1.578rem. */
  --text-sm: 0.9375rem; /* 15px, the reference nav size */
  --text-base: 1.0625rem; /* 17px, flat, matching the reference */
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.36rem + 0.55vw, 1.875rem);
  --text-2xl: clamp(1.875rem, 1.578rem + 1.152vw, 2.5rem);

  --leading-tight: 1.2;
  --leading-body: 1.5;

  --weight-light: 300;
  --weight-normal: 400;
  --weight-bold: 700;
  --weight-cta: 600;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* --card-pad is load-bearing beyond spacing: it defines the real slot
     width every `sizes` attribute declares. At the gate profile (412 CSS
     px, DPR 2.625) the content slot is 412 - 60 = 352 CSS px, 924 device
     px. Declaring 100vw instead would request a rung 17% wider than
     anything actually rendered. */
  --width-prose: 70ch;
  --width-content: 1185px;
  --card-pad: 30px;
  --gutter: var(--space-s);

  --radius-s: 2px;
  --radius-m: 4px;

  --border-hairline: 1px solid var(--color-border);
  --border-control: 2px;

  --z-base: 0;
  --z-nav: 10;
  --z-skip: 100;

  /* No transitions anywhere except the 2px card lift on /products/ hover
     (instant, not animated; suppressed under prefers-reduced-motion
     below). Token exists so any future transition inherits one value. */
  --motion-fast: 150ms;
  --easing: ease;

  /* WCAG 2.2 SC 2.5.8 permits 24px; 44 is the house standard used here. */
  --target-min: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
figcaption,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* height: auto is required alongside max-width: 100%: the HTML width/height
   attributes act as presentational size hints, and max-width overrides only
   the width hint, so without height: auto an image keeps its full attribute
   height at a capped width and visibly squashes (hit this on the header
   logo and the hero). A more specific component rule may still override
   this default, as .card__media img already does. */
img,
picture,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

html {
  /* No font-size override: the user's browser setting is the base, and the
     scale above is expressed relative to it. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-surface-alt);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-light);
}

h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-normal);
}

h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

p,
li {
  text-wrap: pretty;
}

/* Underlined so link identity never rests on color alone. Components that
   supply their own affordance opt out individually, never globally. */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-link-hover);
}

:focus-visible {
  outline: var(--border-control) solid var(--color-focus);
  outline-offset: 2px;
}

/* The dark band needs its own focus color: the light-surface focus token
   measures only 2.49:1 there. */
.site-nav :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* Never use opacity to de-emphasize text: it composites against whatever
   is behind it and silently breaks the measured contrast. Use this. */
.muted {
  color: var(--color-muted);
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-skip);
  padding: var(--space-2xs) var(--space-s);
  background-color: var(--color-surface);
  color: var(--color-link);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* No inline padding of its own: the white card IS the container and
   supplies its own inset (see .card-surface). Adding a gutter here too
   double-pads the content edge. */
.container {
  width: 100%;
  max-width: var(--width-content);
  margin-inline: auto;
}

/* The white card. Its inline padding IS the page gutter (see .container). */
.card-surface {
  background-color: var(--color-surface);
  padding-block: var(--card-pad);
  padding-inline: var(--card-pad);
}

@media (min-width: 48rem) {
  :root {
    --card-pad: 40px;
  }
}

.flow > * + * {
  margin-block-start: var(--flow-space, var(--space-m));
}

.prose {
  max-width: var(--width-prose);
}

main {
  display: block;
}

/* The logo is already <a href="/">, so it is excluded from .media-link
   (nesting anchors is invalid). */
.site-header {
  background-color: var(--color-surface);
}

.site-header__inner,
.site-nav__list,
.site-footer__inner {
  max-width: var(--width-content);
  margin-inline: auto;
  padding-inline: var(--card-pad);
}

.site-header__inner {
  display: flex;
  align-items: center;
  padding-block: var(--space-l);
}

/* Capped and responsive rather than the reference's fixed unscaled size: at
   the 412px mobile gate width a fixed logo would leave under 15px of margin
   inside the 352px content column and risks horizontal overflow. */
.site-header__logo img {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Wraps at 320px rather than collapsing behind a JS drawer: four short
   labels wrap to two rows at 320px in the worst case, and a drawer needs
   JS, aria-expanded, focus management and a focus trap to buy back a small
   amount of vertical space. */
.site-nav {
  background-color: var(--color-surface-dark);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
}

.site-nav__list a {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding-inline: var(--space-s);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
  text-decoration: none;
}

.site-nav__list a:hover {
  color: var(--color-accent-on-dark);
}

/* The :not(.btn) guard is required: without it, this rule outranks .btn on
   specificity and repaints a filled button's label in the same token as
   its own fill, 1:1 contrast, invisible, while Lighthouse still scores the
   page 100. */
.site-nav a[aria-current]:not(.btn) {
  color: var(--color-accent-on-dark);
  font-weight: var(--weight-bold);
  text-decoration: underline;
}

.site-footer {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}

.site-footer__inner {
  padding-block: var(--space-l);
}

.site-footer a {
  color: var(--color-accent-on-dark);
}

.site-footer__nap {
  font-size: var(--text-sm);
}

.site-footer__credit {
  margin-block-start: var(--space-m);
  font-size: var(--text-sm);
  color: var(--color-muted-on-dark);
}

.breadcrumb {
  font-size: var(--text-sm);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.breadcrumb__list li:not(:last-child)::after {
  content: "/";
  margin-inline-start: var(--space-3xs);
  color: var(--color-muted);
}

.breadcrumb__list a {
  text-decoration: underline;
}

.breadcrumb__list [aria-current] {
  color: var(--color-muted);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target-min);
  padding-inline: var(--space-m);
  border-radius: var(--radius-m);
  font-weight: var(--weight-cta);
  text-decoration: none;
  border: var(--border-control) solid transparent;
}

/* The white label against the fill clears 4.5:1 everywhere, but the FILL
   against the dark band measures 2.95:1, failing WCAG 1.4.11's 3:1
   non-text minimum: the label reads fine so an obvious check passes, while
   the control is still nearly indistinguishable from the band behind it.
   Fixed with a border, not a fill change, scoped to that one surface. */
.btn--cta {
  background-color: var(--color-link);
  color: var(--color-text-on-dark);
}

.btn--cta:hover {
  background-color: var(--color-link-hover);
}

.site-footer .btn--cta,
.site-nav .btn--cta {
  border-color: var(--color-text-on-dark);
}

.btn--ghost {
  background-color: transparent;
  border-color: currentColor;
  color: var(--color-link);
}

.site-nav .btn--ghost,
.site-footer .btn--ghost {
  color: var(--color-text-on-dark);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.figure {
  margin: 0;
}

.figcaption {
  margin-block-start: var(--space-2xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* max-width: 100% (not width: 100%): fills the column on a full-ladder
   photo but does not upscale a smaller single-file image past its own
   intrinsic size, unlike a bare width: 100% would. Every image here
   already carries width/height HTML attributes, so the anchor has a
   reserved, non-collapsing box without needing a width override. */
.media-link {
  display: block;
}

.figure > .media-link > img {
  max-width: 100%;
}

.form-field label {
  display: block;
  margin-block-end: var(--space-3xs);
  font-weight: var(--weight-cta);
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: var(--target-min);
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-s);
  background-color: var(--color-surface);
  color: var(--color-text);
}

.form-field textarea {
  min-height: 10rem;
  resize: vertical;
}

/* The border alone is not enough to signal focus; the shared focus-visible
   outline does the work, this just removes the doubled default ring some
   browsers add on top of it. */
.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--color-text);
}

/* / only, the sole <picture> in the build. Capped at 640px: the master is
   917px wide, clearing 2x density at that cap but needing upscale past it. */
.hero img {
  /* min(), not a bare max-width: 40rem: a plain cap is MORE specific than
     the base img{max-width:100%} reset and would replace it outright,
     letting the image request 640px even inside a narrower container and
     overflow. min() keeps both constraints live; the smaller always wins. */
  max-width: min(40rem, 100%);
  width: 100%;
  margin-inline: auto;
}

.products-grid {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 40rem) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface-alt);
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12rem;
  background-color: var(--color-surface);
}

/* object-fit: contain, not cover: the three product images have aspect
   ratios 1.42, 0.65 and 4.00 (a photograph, a tall product shot, and a 4:1
   wordmark), and cropping any of them to a common ratio would force the
   portrait shot or the wordmark past recognition. Scoped exception to the
   no-crop rule, used nowhere else in this build.

   No srcset on the ReVolt Battery Exchange card image: the box is
   height-capped at 12rem, so rendered width is ~124px regardless of
   viewport, and even the smallest generated rung (480w) exceeds 2x that.
   A srcset would only let the browser fetch a larger rung for no benefit. */
.card__media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.card__title {
  margin-block-start: var(--space-s);
  padding-inline: var(--space-s);
  color: var(--color-link);
}

.card__link:hover .card__title,
.card__link:focus-visible .card__title {
  color: var(--color-link-hover);
}

.card__body {
  padding: var(--space-s);
  padding-block-start: var(--space-2xs);
}

/* :focus-within covers keyboard focus landing on the anchor inside. No
   transform under prefers-reduced-motion (suppressed below). */
.card:hover,
.card:focus-within {
  transform: translateY(-2px);
}

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

  /* Zeroing a duration does not suppress a transform that was never
     transitioned in the first place: the card lift is an instant :hover
     state change, so it survived the block above untouched (measured
     matrix(1,0,0,1,0,-2) still applying under reduce) until scoped out
     here explicitly. */
  .card:hover,
  .card:focus-within {
    transform: none;
  }
}
