/* =========================================================================
   Design tokens — Apple-Tesla Tech Repair palette: White / Near-Black
   #0B0B0B / Electric Blue #0071E3, Inter served + SF Pro Display fallback.
   This :root block is the source of truth; reach for tokens (var(--space-*),
   var(--secondary), var(--radius-pill)) instead of raw values everywhere.
   ========================================================================= */

:root {
  /* Surfaces — warm near-white page base (Iter 12 IA refresh), with a
     pure-white lifted-panel variant so hero panels read as elevated
     above the page. Section tint (--surface-container-low) is bumped
     warmer + slightly darker so it stays visually distinguishable
     from the new page base. */
  --surface:                     #fafaf8;
  --surface-dim:                 #e8e8ed;
  --surface-bright:              #ffffff;
  --surface-container-lowest:    #ffffff;  /* lifted hero panels */
  --surface-container-low:       #f2f2ee;  /* soft section background */
  --surface-container:           #ebebef;
  --surface-container-high:      #e1e1e6;
  --surface-container-highest:   #d8d8de;
  --on-surface:                  #0b0b0b;  /* spec near-black for primary text */
  --on-surface-variant:          #3a3a3c;
  --outline:                     #86868b;
  --outline-variant:             #d2d2d7;  /* spec post-scroll nav border */
  --inverse-surface:             #0b0b0b;
  --inverse-on-surface:          #ffffff;

  /* Primary — Near-Black (#0B0B0B) — primary text + Dark-CTA fill */
  --primary:                     #0b0b0b;
  --on-primary:                  #ffffff;
  --primary-container:           #1c1c1e;
  --on-primary-container:        #a1a1a6;

  /* Secondary — Electric Blue (#0071E3) — primary CTA / link / active state */
  --secondary:                   #0071e3;
  --on-secondary:                #ffffff;
  --secondary-container:         #b5dcff;
  --on-secondary-container:      #0058b3;

  /* Tertiary — same near-black; kept for components that key off --tertiary */
  --tertiary:                    #0b0b0b;
  --on-tertiary:                 #ffffff;
  --tertiary-container:          #1c1c1e;
  --on-tertiary-container:       #a1a1a6;

  /* Error — Apple system red; functional state, NOT a brand color */
  --error:                       #d70015;
  --on-error:                    #ffffff;
  --error-container:             #ffe5e5;
  --on-error-container:          #7a0010;

  /* Material-3 "fixed" surfaces — kept for token-completeness; DESIGN.md
     remains 1:1 mappable to these custom properties. */
  --surface-tint:                #86868b;
  --inverse-primary:             #d2d2d7;
  --primary-fixed:               #e8e8ed;
  --primary-fixed-dim:           #d2d2d7;
  --on-primary-fixed:            #0b0b0b;
  --on-primary-fixed-variant:    #3a3a3c;
  --secondary-fixed:             #cfe7ff;
  --secondary-fixed-dim:         #a8d0ff;
  --on-secondary-fixed:          #001b3d;
  --on-secondary-fixed-variant:  #0058b3;
  --tertiary-fixed:              #e8e8ed;
  --tertiary-fixed-dim:          #d2d2d7;
  --on-tertiary-fixed:           #0b0b0b;
  --on-tertiary-fixed-variant:   #3a3a3c;

  /* Type scale — Inter served, SF Pro Display local fallback on Apple */
  --font-family:                 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --type-display-size:           clamp(24px, 6vw, 56px);
  --type-headline-lg-size:       clamp(20px, 3.5vw, 34px);
  --type-headline-md-size:       clamp(18px, 2.5vw, 22px);
  --type-body-lg-size:           18px;
  --type-body-md-size:           16px;
  --type-label-caps-size:        13px;

  /* Shape */
  --radius-sm:                   0.25rem;  /* 4px — inputs */
  --radius:                      0.5rem;   /* 8px — chips/tags */
  --radius-md:                   0.75rem;  /* 12px — small cards per spec */
  --radius-lg:                   1rem;     /* 16px — large cards */
  --radius-xl:                   1.5rem;
  --radius-pill:                 980px;    /* spec pill radius — default for .btn */
  --radius-full:                 9999px;   /* perfect circle (cart count etc.) */

  /* Spacing rhythm — 8px base system */
  --space-1:                     8px;
  --space-2:                     16px;
  --space-3:                     24px;   /* gutter */
  --space-4:                     32px;
  --space-5:                     40px;
  --space-6:                     48px;   /* desktop margin */
  --space-8:                     64px;
  --space-10:                    100px;  /* spec desktop section padding */
  --container-max:               1200px;
  --margin-mobile:                16px;
  --margin-desktop:               48px;

  /* Chrome — sticky frosted nav, hero, soft drop shadow per spec */
  --chrome-nav-height:           52px;
  --chrome-nav-bg:               rgba(255, 255, 255, 0.85);
  --chrome-nav-blur:             20px;
  --chrome-nav-border:           1px solid var(--outline-variant);
  --chrome-hero-vh:              70vh;
  --shadow-ambient:              0 2px 20px rgba(0, 0, 0, 0.08);

  /* Secondary accents — added in the "vivid enhancements" pass.
     These layer on top of the existing palette; Electric Blue (--secondary)
     remains the primary CTA color. Brass is reserved for trust marks and
     "popular/featured" badges; Emerald for live-status / warranty signals;
     Navy for dark sections (CTA banner, footer-future). All three are
     outside scripts/check-invariants.js FORBIDDEN_HEXES. */
  --brass:                       #c5a059;
  --brass-deep:                  #775a19;
  --brass-tint:                  rgba(197, 160, 89, 0.12);
  --emerald:                     #2e7d32;
  --emerald-light:               #53a252;
  --emerald-tint:                rgba(46, 125, 50, 0.10);
  --navy:                        #041627;
  --navy-2:                      #1a2b3c;
  --shadow-ambient-navy:         0 2px 20px rgba(4, 22, 39, 0.08);
}

/* =========================================================================
   Reset — modern, minimal.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  /* Contain the mobile nav drawer's translateX(100%) and any other
     deliberately off-viewport element so it never contributes to the
     document's scrollWidth. iOS Safari otherwise treats the drawer's
     translated position as layout-relevant and allows horizontal
     scroll, dragging fixed-position floating actions and the sticky
     header off the right edge. `clip` (not `hidden`) is required so
     the sticky header keeps working — `hidden` would establish a new
     scrolling context and break position: sticky. */
  overflow-x: clip;
  /* Smooth in-page anchor scroll for hero CTA → #home-quote and similar.
     Already disabled under prefers-reduced-motion (rule below). */
  scroll-behavior: smooth;
  /* Offset so anchor targets clear the sticky header (52px nav). */
  scroll-padding-top: calc(var(--chrome-nav-height) + var(--space-2));
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 var(--type-body-md-size) / 1.6 var(--font-family);
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
picture,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  cursor: pointer;
}

/* =========================================================================
   Typography — hierarchy by weight + scale, not color (per DESIGN.md).
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  color: var(--on-surface);
  font-family: var(--font-family);
}

h1 {
  font-size: var(--type-headline-lg-size);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--type-headline-lg-size);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space-2);
  font-size: var(--type-body-md-size);
  line-height: 1.6;
}

a {
  color: var(--on-surface);
  text-underline-offset: 0.15em;
  text-decoration-color: var(--outline-variant);
}

a:hover {
  text-decoration-color: var(--primary);
}

/* Label-caps — reserved for technical signifiers per DESIGN.md. */
.label-caps {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================================================
   Layout primitives
   ========================================================================= */

.site-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3) var(--margin-mobile);
}

@media (min-width: 768px) {
  .site-main {
    padding: var(--space-4) var(--margin-desktop);
  }
}

/* Mobile — tighten top padding so the hero starts closer to the sticky
   header instead of leaving a big empty band. */
@media (max-width: 600px) {
  .site-main {
    padding-top: var(--space-2);
  }
}

/* =========================================================================
   Shell — header and footer. Generous whitespace, tonal separation
   (no harsh borders) per DESIGN.md.
   ========================================================================= */

/* Sticky frosted-glass top bar — spec §2.1.
   Border-bottom appears via .is-scrolled toggled by script.js after 20px. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chrome-nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(var(--chrome-nav-blur));
  backdrop-filter: saturate(180%) blur(var(--chrome-nav-blur));
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--outline-variant);
}

/* Drop the backdrop-filter at mobile widths. The frosted-glass blur
   creates a CSS containing block for position: fixed descendants, which
   trapped the .site-nav drawer inside the 52px-tall header band — opening
   the drawer rendered the nav links as a horizontal smushed strip below
   the header instead of as a full-screen overlay. The visual cost on
   phones is small (sticky bar drops to opaque white); the usability cost
   of a broken drawer was not. */
@media (max-width: 767px) {
  .site-header {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: var(--container-max);
  margin: 0 auto;
  height: var(--chrome-nav-height);
  padding: 0 var(--margin-mobile);
}

@media (min-width: 768px) {
  .site-header-inner {
    padding: 0 var(--margin-desktop);
  }
}

.site-brand {
  font-weight: 700;
  font-size: var(--type-headline-md-size);
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
}

.site-brand img {
  display: block;
  height: 40px;
  width: auto;
}

@media (max-width: 640px) {
  .site-brand img { height: 32px; }
}

/* Mobile hamburger toggle — three CSS bars; transforms to X via aria-expanded.
   Sits last in source order (after cart-badge) so on mobile the visual right
   edge reads Book → Cart → Hamburger. Brand's `margin-right: auto` carries
   all right-side items as a clump; no margin-auto needed here. */
.site-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  color: var(--on-surface);
  cursor: pointer;
}

.site-nav-toggle-bars,
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  content: "";
  position: relative;
}

.site-nav-toggle-bars::before { top: -7px; }
.site-nav-toggle-bars::after  { top: 5px; }

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars {
  background: transparent;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle-bars::after {
  top: -2px;
  transform: rotate(-45deg);
}

@media (min-width: 768px) {
  .site-nav-toggle {
    display: none;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-nav a {
  font-weight: 500;
  color: var(--on-surface);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--secondary);
}

@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    inset: var(--chrome-nav-height) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3) var(--margin-mobile) var(--space-6);
    background: var(--surface);
    transform: translateX(100%);
    transition: transform 250ms ease;
    z-index: 99;
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav a {
    padding: var(--space-2) 0;
    font-size: var(--type-headline-md-size);
    border-bottom: 1px solid var(--outline-variant);
  }
}

/* Cart badge — right-edge anchor of the header now that the Book Now
   pill is gone (Iter 12 follow-up). `margin-left: auto` carries the
   right-side cluster (Cart + Hamburger on mobile) to the right edge
   while the brand + nav links sit left-aligned. */
.cart-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  min-height: 44px;
  padding: var(--space-1) var(--space-2);
  background: var(--surface-container);
  color: var(--on-surface);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-full);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Soft-gray footer (deviation from spec §2.3 dark footer). Subtle
   top-left -> bottom-right tonal gradient for depth, same shape as
   .section--soft. */
.site-footer {
  background: linear-gradient(
    135deg,
    var(--surface-container-low) 0%,
    var(--surface-container) 100%
  );
  color: var(--on-surface);
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-6) var(--margin-mobile);
}

@media (min-width: 768px) {
  .site-footer-inner {
    padding: var(--space-8) var(--margin-desktop);
  }
}

.footer-cols {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-5);
}

/* Single jump: 1-col below 768px, then 4-col immediately. The earlier
   1 → 2col@640px → 4col@960px progression stranded the brand/tagline
   column in an awkward intermediate state on 640–959px viewports. */
@media (min-width: 768px) {
  .footer-cols {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    column-gap: var(--space-4);
  }
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-logo {
  display: block;
  width: auto;
  height: 83px;
  align-self: flex-start;
}

.footer-brand {
  margin: 0;
  font-size: var(--type-headline-md-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}

.footer-tagline {
  margin: 0;
  max-width: 30ch;
  color: var(--on-surface-variant);
}

.footer-col-heading {
  margin: 0 0 var(--space-2);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-primary-container);
}

.footer-links,
.footer-locations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-links a,
.footer-locations-list a {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover,
.footer-locations-list a:hover {
  color: var(--secondary);
}

.footer-locations-list li {
  margin-bottom: var(--space-2);
}

.footer-location-name {
  margin: 0;
  font-weight: 600;
  color: var(--on-surface);
}

.footer-location-meta {
  margin: 4px 0 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
  line-height: 1.5;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: var(--space-1) 0 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--on-surface);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: background-color 200ms ease, color 200ms ease;
}

.footer-social a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--secondary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
}

.footer-copyright {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
}

.footer-trademark {
  flex: 1 100%;
  margin: 0;
  color: var(--outline);
  font-size: 12px;
  line-height: 1.5;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-legal a {
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--on-surface);
}

/* =========================================================================
   Buttons — pill-shaped per DESIGN.md.
     .btn-primary   electric-blue fill (spec Primary CTA)
     .btn-secondary transparent + blue border + blue text (spec Secondary)
     .btn-dark      near-black fill (spec Dark CTA — for use on white sections)
     .btn-accent    alias for .btn-primary (kept for backward compat with
                    pages that emphasize confirmation actions)
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--type-body-md-size);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.btn-primary,
.btn-primary:visited,
.btn-accent,
.btn-accent:visited {
  background: var(--secondary);
  color: var(--on-secondary);
}

.btn-primary:hover,
.btn-accent:hover {
  background: var(--on-secondary-container);
}

.btn-secondary,
.btn-secondary:visited {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-container);
}

.btn-dark,
.btn-dark:visited {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-dark:hover {
  background: var(--primary-container);
}

/* =========================================================================
   Hero — default block for sub-pages; .hero--fullscreen for the 90vh
   homepage hero variant.
   ========================================================================= */

.hero {
  padding: var(--space-5) 0 var(--space-6);
}

.hero h1 {
  max-width: 20ch;
  margin-bottom: var(--space-3);
}

.hero p {
  max-width: 55ch;
  margin-bottom: var(--space-4);
  font-size: var(--type-body-lg-size);
  color: var(--on-surface-variant);
}

.hero--fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--chrome-hero-vh);
  padding: var(--space-6) 0;
}

@media (max-width: 767px) {
  .hero--fullscreen {
    min-height: auto;
  }
}

/* =========================================================================
   Section helpers — alternate light-gray and dark sections per spec §1.2.
   ========================================================================= */

.section--soft {
  background: linear-gradient(
    135deg,
    var(--surface-container-low) 0%,
    var(--surface-container) 100%
  );
}

.section--dark {
  background: var(--primary);
  color: var(--on-primary);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark p {
  color: var(--on-primary);
}

.section--dark .label-caps,
.section--dark a {
  color: var(--on-primary);
}

.section--dark .btn-secondary {
  color: var(--on-primary);
  border-color: var(--on-primary);
}

.section--dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================================
   Breadcrumbs
   ========================================================================= */

.breadcrumbs {
  margin-bottom: var(--space-3);
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.breadcrumbs a {
  color: var(--on-surface-variant);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

/* =========================================================================
   Repair catalog — category picker, brand picker, model page
   ========================================================================= */

.lede {
  max-width: 60ch;
  margin-bottom: var(--space-4);
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.category-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: var(--space-4);
}

/* Brand grid stacks vertically — one full-width brand section per row
   so model lists have room to breathe instead of being squeezed into
   240px columns. Order comes from Supabase sort_order. */
.brand-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  margin-top: var(--space-4);
}

.category-card,
.brand-card {
  display: block;
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  color: var(--on-surface);
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.category-card:hover {
  box-shadow: var(--shadow-ambient);
  transform: translateY(-2px);
}

.category-card h2,
.brand-card h2 {
  margin-bottom: var(--space-2);
  font-size: var(--type-headline-md-size);
}

.category-card p {
  margin: 0;
  color: var(--on-surface-variant);
}

.brand-models {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-1) var(--space-3);
}

.brand-models a {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
  transition: color 120ms ease;
}

.brand-models a:hover {
  color: var(--secondary);
}

/* Mobile — cap the visible "featured models" list at 4 per brand card,
   but ONLY on the homepage /repairs/ index (.page-repairs). The
   per-category page (.page-brands at /repairs/{category}/) is the
   "Show all" destination and must render every model in brand.models;
   without the scoping prefix it was being capped to 4 too, so mobile
   users clicking "Show all Apple phones" only saw the first 4 source-
   order entries (iPhone 6 line). Update sortFeaturedModels' slice cap
   and this selector together if you want a different mobile vs desktop
   ratio on the homepage. */
@media (max-width: 600px) {
  .page-repairs .brand-models > li:nth-child(n+5) {
    display: none;
  }
}

/* =========================================================================
   /repairs/ redesign — search hero + brand-card refresh + show-all
   ========================================================================= */

/* "What needs repair?" hero — now contains only the h1 and scrolls
   away normally. The input + tabs share a sticky bar below (see
   .repairs-search-sticky), so the panel framing was retired. */
.device-search-hero {
  max-width: 880px;
  margin: var(--space-3) auto var(--space-3);
  text-align: center;
}

.device-search-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Sticky search bar — wraps the device-picker mount and the
   .repair-tabs row so both pin together below the page header
   (chrome-nav-height) as the user scrolls through the brand grid.
   z-index: 60 keeps the picker's dropdown suggestions above the
   sticky tabs and above brand-marquee on / (mirrors .device-picker). */
.repairs-search-sticky {
  position: sticky;
  top: var(--chrome-nav-height);
  z-index: 60;
  margin: 0 calc(-1 * var(--margin-mobile));
  padding: var(--space-2) var(--margin-mobile) 0;
  background: var(--surface);
}

@media (min-width: 768px) {
  .repairs-search-sticky {
    margin: 0 calc(-1 * var(--margin-desktop));
    padding: var(--space-2) var(--margin-desktop) 0;
  }
}

.repairs-search-sticky-picker {
  max-width: 880px;
  margin: 0 auto;
}

.device-search-hero .lede {
  margin: 0 auto var(--space-3);
  max-width: 52ch;
  color: var(--on-surface-variant);
  font-size: 16px;
}

.device-search-mount {
  margin: 0 auto;
  max-width: 640px;
  text-align: left;
}

/* Hero treatment for the picker's auto-generated input — large,
   pill-radius, elevated. The picker self-renders the input; we
   dress it via the .device-search-hero scope. */
.device-search-hero .device-picker {
  max-width: none;
  margin: 0;
}

.device-search-hero .device-picker-input {
  min-height: 64px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  font-size: 19px;
  box-shadow: var(--shadow-ambient);
}

.device-search-hero .device-picker-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 5px var(--secondary-container), var(--shadow-ambient);
}

.device-search-hero .device-picker-list {
  border-radius: var(--radius-lg);
  padding: var(--space-1) 0;
}

/* Brand-card head: logo column + title stack column. Replaces the
   old direct `<h2>` / `<h3>` flow. */
.brand-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.brand-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--outline-variant);
}

/* Height-driven sizing so wordmark logos (Samsung, Motorola) render
   at their natural aspect ratio instead of squashed into a square
   box. Mirrors the homepage brand-marquee pattern. */
.brand-card-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  display: block;
}

/* Per-slug overrides for wordmark heights — Samsung and Motorola are
   ultra-wide wordmarks; shrink to keep tile visual weight balanced
   with the icon-style logos (Apple, Google, Nintendo, OnePlus). */
.brand-card-head[data-brand-slug="samsung"] .brand-card-logo {
  height: 18px;
}
.brand-card-head[data-brand-slug="motorola"] .brand-card-logo {
  height: 26px;
}

/* Text-only header when no logo is available (BRAND_LOGOS miss AND
   no Supabase brand_image). Matches the visual weight of the logo
   so card heights stay consistent across the grid. */
.brand-card-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

/* Model-count subtext floats to the right edge so the logo anchors
   the left and the count balances the right. */
.brand-card-count {
  margin: 0 0 0 auto;
  color: var(--on-surface-variant);
  font-size: var(--type-body-sm-size, 13px);
  font-weight: 500;
}

/* "Show all 43 Apple phones →" link with arrow nudge on hover. */
.brand-show-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: auto;
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

.brand-show-all-arrow {
  display: inline-block;
  transition: transform 150ms ease;
}

.brand-show-all:hover .brand-show-all-arrow {
  transform: translateX(4px);
}

/* Anchored brand cards on /repairs/{category}/ — scroll into view
   clear of the sticky header chrome + category tabs. Matches the
   .category-section rule above so behavior is consistent. */
.brand-card[id] {
  scroll-margin-top: calc(var(--chrome-nav-height) + 64px);
}

/* =========================================================================
   Model page — hero + repair list + sidebar
   ========================================================================= */

.page-model {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .page-model {
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: var(--space-5);
  }

  .page-model > .breadcrumbs,
  .page-model > .device-hero,
  .page-model > h2,
  .page-model > .repair-list {
    grid-column: 1;
  }

  .page-model > .model-sidebar {
    grid-column: 2;
    grid-row: 1 / span 10;
  }
}

.device-hero {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.device-hero img {
  width: 96px;
  height: auto;
}

.device-hero .label-caps {
  margin-bottom: var(--space-1);
  color: var(--on-surface-variant);
}

.repair-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.repair-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.repair-info h3 {
  margin-bottom: var(--space-1);
}

.repair-info .label-caps {
  color: var(--on-surface-variant);
}

.repair-buy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.repair-price {
  margin: 0;
  font-size: var(--type-headline-md-size);
  font-weight: 700;
}

.model-sidebar {
  padding: var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  align-self: start;
}

.model-sidebar h2 {
  margin-bottom: var(--space-2);
  font-size: var(--type-headline-md-size);
}

.model-sidebar h3 {
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.sidebar-location {
  margin-bottom: var(--space-2);
  color: var(--on-surface-variant);
}

.sidebar-location strong {
  color: var(--on-surface);
}

.sidebar-location a {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}

/* =========================================================================
   Accessories — anchor-nav + per-category grid of product cards
   ========================================================================= */

.accessory-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-3) 0 var(--space-5);
}

.accessory-filter a {
  padding: var(--space-1) var(--space-2);
  background: var(--surface-container);
  color: var(--on-surface);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.accessory-filter a:hover {
  background: var(--surface-container-high);
}

.accessory-group {
  margin-bottom: var(--space-6);
  scroll-margin-top: var(--space-4);
}

.accessory-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: var(--space-3);
}

.accessory-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  transition: box-shadow 150ms ease;
}

.accessory-card:hover {
  box-shadow: var(--shadow-ambient);
}

.accessory-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-container-low);
  border-radius: var(--radius);
}

.accessory-body h3 {
  margin-bottom: var(--space-1);
  font-size: var(--type-body-lg-size);
}

.accessory-price {
  margin: 0 0 var(--space-2);
  font-size: var(--type-headline-md-size);
  font-weight: 700;
}

/* =========================================================================
   Cart page
   ========================================================================= */

.cart-empty {
  padding: var(--space-5) var(--space-3);
  text-align: center;
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.cart-empty p {
  margin: 0 0 var(--space-3);
  font-size: var(--type-body-lg-size);
  color: var(--on-surface-variant);
}

.cart-empty p:last-child {
  margin-bottom: 0;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.cart-line {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.cart-line-body h3 {
  margin-bottom: var(--space-1);
  font-size: var(--type-body-lg-size);
}

.cart-line-body .label-caps {
  margin: 0;
  color: var(--on-surface-variant);
}

.cart-line-qty {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.cart-qty-btn {
  padding: 0;
  min-width: 44px;
  height: 44px;
  font-size: var(--type-body-lg-size);
  font-weight: 700;
  line-height: 1;
}

.cart-qty-value {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

.cart-line-price {
  text-align: right;
}

.cart-line-price p {
  margin: 0 0 var(--space-1);
  font-size: var(--type-headline-md-size);
  font-weight: 700;
}

.cart-remove {
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-remove:hover {
  color: var(--error);
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  font-size: var(--type-body-lg-size);
}

.cart-total strong {
  font-size: var(--type-headline-lg-size);
}

.cart-note {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-sm-size, 13px);
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* Upsell strip on /cart/ — compact horizontal cards with thumbnail,
   name, price, and an Add button. Sits above Subtotal inside .cart-summary. */
.cart-upsell {
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--outline-variant);
}

.cart-upsell-title {
  margin: 0 0 var(--space-2);
  font-size: var(--type-title-lg-size, 18px);
  font-weight: 600;
  color: var(--on-surface);
}

.cart-upsell-grid {
  display: grid;
  gap: var(--space-2);
}

.cart-upsell-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
}

.cart-upsell-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-container);
}

.cart-upsell-body {
  min-width: 0;
}

.cart-upsell-name {
  margin: 0;
  font-size: var(--type-body-md-size);
  font-weight: 500;
  color: var(--on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-upsell-price {
  margin: 2px 0 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-sm-size, 13px);
}

.cart-upsell-add {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .cart-upsell-card {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "img body"
      "btn btn";
  }
  .cart-upsell-img { grid-area: img; width: 56px; height: 56px; }
  .cart-upsell-body { grid-area: body; }
  .cart-upsell-add { grid-area: btn; justify-self: start; }
}

@media (max-width: 600px) {
  .cart-line {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .cart-line-price {
    text-align: left;
  }
}

/* =========================================================================
   Contact page — form + locations side-by-side on desktop
   ========================================================================= */

.contact-layout {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  margin-top: var(--space-4);
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.contact-form {
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.contact-form-placeholder {
  padding: var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius);
}

.contact-form-placeholder code {
  padding: 0 6px;
  background: var(--surface-container);
  border-radius: var(--radius-sm);
  font-size: 0.92em;
}

.contact-locations {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-locations h2 {
  font-size: var(--type-headline-md-size);
  margin-bottom: var(--space-1);
}

.contact-location {
  padding: var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
}

.contact-location h3 {
  margin-bottom: var(--space-1);
}

.contact-location p {
  margin: 0 0 var(--space-2);
  color: var(--on-surface-variant);
}

.contact-location a {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}

.contact-map {
  margin-top: var(--space-2);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-container);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================================
   Checkout success + cancel
   ========================================================================= */

.page-checkout-success h2 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--type-headline-md-size);
}

.checkout-success-note {
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius);
  color: var(--on-surface-variant);
}

.checkout-success-ref {
  margin-top: var(--space-4);
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-cancel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* =========================================================================
   Homepage
   ========================================================================= */

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* Iter 12 — homepage hero search form. Replaces the dual hero CTAs
   ("Get an instant quote" / "Browse repairs") with a single device-
   search input + "Find Repair" submit button. The DevicePicker
   self-renders the input via [data-repair-picker-mount]; the wrapping
   <form> with [data-repair-picker-form] lets src/repairs.js attach a
   submit handler for typed-but-not-picked queries. */
.home-hero-search {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: stretch;
  margin-top: var(--space-3);
  max-width: 560px;
}

@media (max-width: 600px) {
  .home-hero-search {
    margin-top: var(--space-2);
  }
}

.home-hero-search .device-search-mount {
  flex: 1 1 280px;
  min-width: 0;
}

.home-hero-search .device-picker {
  margin: 0;
  max-width: none;
}

.home-hero-search .device-picker-input {
  min-height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  font-size: 17px;
  box-shadow: var(--shadow-ambient);
}

.home-hero-search .device-picker-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px var(--secondary-container), var(--shadow-ambient);
}

.home-hero-search .device-picker-list {
  border-radius: var(--radius-lg);
}

.home-hero-search-submit {
  min-height: 56px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  white-space: nowrap;
}

/* Mobile — once the button wraps to its own row, the 56px chunky pill
   looks oversized. Drop to 48px and stretch full-width — cleaner mobile
   CTA pattern (matches the Stripe / Apple Pay button shape). */
@media (max-width: 600px) {
  .home-hero-search-submit {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }
}

/* Iter 12 follow-up — "Popular:" chip row directly below the search
   form. Data-driven from src/_data/popularSearches.js (newest phone
   per major brand). Sits BETWEEN the search and the Ask-our-AI
   prompt, so the visual order reads: search → popular shortcuts →
   "still stuck? ask" — three tiers of escalating help. */
.home-hero-popular {
  margin: var(--space-2) 0 0;
  /* !important defends against any unidentified inherited/descendant
     rule that overrode this on the chip <a> children — the diagnostic
     at 7px+!important worked while 9px without didn't. Cheap insurance
     for a single utility class; revisit if the cascade is ever audited. */
  font-size: 11px !important;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--on-surface-variant);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 5px;
}

.home-hero-popular-label,
.home-hero-popular-chip,
.home-hero-popular-sep {
  font-size: 11px !important;
}

.home-hero-popular-label {
  font-weight: 500;
  color: var(--on-surface-variant);
}

.home-hero-popular-chip {
  color: var(--secondary);
  font-weight: 400;
  text-decoration: none;
}

.home-hero-popular-chip:hover {
  text-decoration: underline;
}

.home-hero-popular-sep {
  color: var(--outline);
}

/* Mobile — bump from 11px to 12px for legibility, give chips a tap-friendly
   hit area, and let the row wrap to a second line rather than letterboxing.
   Also tightens margin-top to claw back hero vertical air. !important is
   required to outweigh the existing !important declarations on the row
   and children rules above. */
@media (max-width: 600px) {
  .home-hero-popular {
    margin-top: var(--space-1);
    gap: 6px 8px;
    font-size: 12px !important;
  }
  .home-hero-popular-label,
  .home-hero-popular-chip,
  .home-hero-popular-sep {
    font-size: 12px !important;
  }
  .home-hero-popular-chip {
    padding: 2px 8px;
    border-radius: var(--radius);
  }
  .home-hero-popular-sep {
    display: none;
  }
}

/* Iter 12 follow-up — "Ask our AI" prompt moved into the hero. Sits
   below the popular-search chip row so the alternate-path affordance
   shares the same eye-tracked attention zone as the primary search
   but reads as the LAST escalation step. Quiet typography — not a
   competing CTA, just an obvious "I don't know what to type" escape
   hatch. */
.home-hero-ask-ai {
  margin: var(--space-3) 0 0;
  font-size: 14px;
  color: var(--on-surface-variant);
}

.home-hero-ask-ai-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--secondary);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  font-family: inherit;
}

.home-hero-ask-ai-btn:hover {
  text-decoration: underline;
}

/* Mobile — keep the ask-AI prompt visually clear of the floating chat
   button on the right. The chat button is ~56px + var(--space-2) gutter, so
   reserve right-side padding to prevent visual collision when the user
   scrolls. Margin tightened on mobile to claw back hero vertical air. */
@media (max-width: 600px) {
  .home-hero-ask-ai {
    margin-top: var(--space-1);
    padding-right: 72px;
  }
}

/* --- 3.1.A: full-screen hero --- */

.home-hero-eyebrow {
  /* Iter 12 follow-up — sit tight against the H1. Bottom margin was 8px
     (var(--space-1)); zero now so the pill reads as part of the headline
     block rather than as a floating tag. Top margin stays 0 — the hero's
     own padding breathes the pill off the page chrome. */
  margin: 0;
  color: var(--on-surface-variant);
  /* !important — same defensive pattern as .home-hero-popular above
     since the cascade ghost on this hero scope ate non-important
     font-size declarations in the wild. */
  font-size: 13px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.home-hero-eyebrow-highlight {
  display: inline-block;
  padding: 2px 9px;
  background: var(--secondary);
  color: var(--on-secondary);
  border-radius: var(--radius-pill);
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-hero h1 {
  max-width: 16ch;
  margin: 0 0 var(--space-3);
  font-size: var(--type-display-size);
}

/* Mobile — let the H1 use the full row width so it doesn't wrap to
   2-words-per-line on 320–360px viewports. Font sizes also dropped a
   step so "Expert device repair. Done right." and the subtitle each
   fit on a single line at 430px+ viewports (iPhone 14 Pro Max +
   above); 320–360px phones may still wrap the H1 once, which is fine.
   Margins below H1/sub tightened too so the search/CTA chain feels
   less stretched. */
@media (max-width: 600px) {
  .home-hero h1 {
    max-width: 100%;
    margin-bottom: var(--space-2);
    font-size: clamp(20px, 5vw, 24px);
  }
  .home-hero-sub {
    margin-bottom: var(--space-2);
    /* !important defends against the same cascade ghost that bit the
       .home-hero-popular row — a hidden inherited/descendant rule
       was outweighing this plain mobile override (verified by the
       9px-no-effect diagnostic). */
    font-size: 14px !important;
  }
}

.home-hero-sub {
  max-width: 50ch;
  margin: 0 0 var(--space-3);
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.home-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.home-hero-trust li {
  font-size: var(--type-label-caps-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* --- 3.1.D / E: soft + dark section card shells inside .site-main --- */

.home-section.section--soft,
.home-section.section--dark {
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .home-section.section--soft,
  .home-section.section--dark {
    padding: var(--space-5) var(--space-4);
  }
}

.home-quote-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* --- 3.1.G: warranty promise banner --- */

.home-warranty-banner {
  margin-bottom: var(--space-8);
  padding: var(--space-4);
  background: linear-gradient(
    135deg,
    var(--surface-container-low) 0%,
    var(--surface-container) 100%
  );
  color: var(--on-surface);
  border-radius: var(--radius-lg);
}

.home-warranty-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  max-width: var(--container-max);
  margin: 0 auto;
}

.home-warranty-banner .label-caps {
  margin: 0;
}

.home-warranty-banner-text {
  margin: 0;
  flex: 1 1 280px;
  font-size: var(--type-body-lg-size);
  color: var(--on-surface);
}

.home-section {
  margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
  .home-section {
    margin-bottom: var(--space-4);
  }
}

.home-section > h2 {
  margin-bottom: var(--space-3);
  font-size: var(--type-headline-md-size);
}

@media (min-width: 768px) {
  .home-section > h2 {
    margin-bottom: var(--space-4);
  }
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin: 0;
}

.section-header a {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}

.section-header a:hover {
  color: var(--primary);
}

/* Popular repairs — feature-card grid */

.feature-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  display: block;
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  color: var(--on-surface);
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-ambient);
  transform: translateY(-2px);
}

.feature-card h3 {
  margin-bottom: var(--space-1);
  font-size: var(--type-body-lg-size);
}

.feature-card p {
  margin: 0;
  color: var(--on-surface-variant);
}

/* Trust signals */

.trust-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: var(--space-4);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
}

.trust-item .label-caps {
  margin-bottom: var(--space-1);
  color: var(--on-surface);
}

.trust-item p:last-child {
  margin: 0;
  color: var(--on-surface-variant);
}

/* Our locations */

.locations-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .locations-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.location-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.location-map {
  aspect-ratio: 16 / 9;
  background: var(--surface-container);
}

/* Photo-rollout (2026-05-16) — store photo above the map embed inside
   each location card. Sized at 4:3 so the storefront / repair-desk
   subject fills the frame without competing with the map's 16:9 below.
   margin-bottom adds a divider gap from the Google Maps iframe so the
   two media surfaces don't read as one stacked block. */
.location-photo {
  margin: 0 0 var(--space-3);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-container);
}

.location-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Per-location zoom override — the West Covina storefront photo reads
   too wide at the default 1:1 cover crop (sign + interior compete for
   attention); +10% scale tightens the framing onto the storefront sign. */
.location-card#westcovina .location-photo img {
  transform: scale(1.1);
  transform-origin: center center;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.location-map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
}

.location-body {
  padding: var(--space-3);
}

.location-body h3 {
  margin-bottom: var(--space-2);
}

.location-body p {
  margin: 0 0 var(--space-2);
  color: var(--on-surface-variant);
}

.location-body a:not(.btn) {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}

/* Testimonials */

.testimonial-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonial-card {
  margin: 0;
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.testimonial-card blockquote {
  margin: 0 0 var(--space-3);
  font-size: var(--type-body-lg-size);
  color: var(--on-surface);
}

.testimonial-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--on-surface-variant);
}

.testimonial-card .label-caps {
  color: var(--on-surface-variant);
}

/* Why customers choose us — interim trust block.
   Renders in place of testimonials until real reviews land. Same card
   geometry as .feature-grid / .testimonial-grid so the section weight
   matches what it replaces. */

.why-choose-us-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.why-choose-us-card {
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
}

.why-choose-us-card .label-caps {
  margin: 0 0 var(--space-1);
  color: var(--on-surface);
}

.why-choose-us-card p:last-child {
  margin: 0;
  color: var(--on-surface-variant);
}

.why-choose-us-card a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Final CTA */

.final-cta {
  padding: var(--space-5) var(--space-4);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  text-align: center;
}

.final-cta h2 {
  margin-bottom: var(--space-3);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* =========================================================================
   /warranty/ — overview cards + how-to-claim steps + native <details> FAQ.
   ========================================================================= */

.page-warranty-header {
  margin-bottom: var(--space-5);
  max-width: 60ch;
}

.warranty-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-6);
}

@media (min-width: 720px) {
  .warranty-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.warranty-card {
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient);
}

.warranty-card .label-caps {
  margin: 0 0 var(--space-2);
  color: var(--secondary);
}

.warranty-card.warranty-not-covered .label-caps {
  color: var(--on-surface-variant);
}

.warranty-card ul {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.warranty-claim {
  margin-bottom: var(--space-6);
}

.warranty-steps {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.warranty-steps li {
  padding: var(--space-4);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
}

.warranty-steps h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--type-headline-md-size);
}

.warranty-steps p {
  margin: 0;
  color: var(--on-surface-variant);
}

.warranty-faq {
  margin-bottom: var(--space-6);
}

.warranty-faq details {
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius);
  margin-bottom: var(--space-1);
  border: 1px solid var(--outline-variant);
}

.warranty-faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: var(--space-1) 0;
  position: relative;
  padding-right: var(--space-3);
}

.warranty-faq summary::-webkit-details-marker {
  display: none;
}

.warranty-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: var(--space-1);
  font-size: 1.4em;
  font-weight: 400;
  line-height: 1;
  color: var(--on-surface-variant);
  transition: transform 200ms ease;
}

.warranty-faq details[open] summary::after {
  content: "−";
}

.warranty-faq details p {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--on-surface-variant);
}

.warranty-cta {
  padding: var(--space-5) var(--space-4);
  background: var(--surface-container-low);
  color: var(--on-surface);
  border-radius: var(--radius-lg);
  text-align: center;
}

.warranty-cta h2 {
  margin: 0 0 var(--space-3);
  color: var(--on-surface);
}

.warranty-cta .cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* =========================================================================
   Location cards — used in the /about/#locations section (merged from
   /contact/ in Iter 12). Reuses the locations-grid + location-card
   structure from the Home preview but adds an "Open now" / "Closed"
   indicator (script.js initOpenNowIndicators).
   ========================================================================= */

.page-contact-header {
  margin-bottom: var(--space-5);
}

.page-contact-header h1 {
  margin-bottom: var(--space-2);
}

.contact-form-section,
.contact-locations-section {
  margin-bottom: var(--space-8);
}

.contact-form-section h2,
.contact-locations-section h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-headline-md-size);
}

.contact-form-section > p,
.contact-locations-section > p {
  margin: 0 0 var(--space-3);
  color: var(--on-surface-variant);
  max-width: 60ch;
}

.location-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}

.location-heading h3 {
  margin: 0;
  font-size: var(--type-headline-md-size);
}

.location-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.location-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--outline);
}

/* Emerald (not blue) so "live/open" reads visually distinct from a CTA. */
.location-status.is-open {
  background: var(--emerald-tint);
  color: var(--emerald);
}

.location-status.is-open .location-status-dot {
  background: var(--emerald-light);
  box-shadow: 0 0 0 3px var(--emerald-tint);
}

.location-status.is-closed {
  background: var(--surface-container);
  color: var(--on-surface-variant);
}

.location-address,
.location-phone {
  margin: 0 0 var(--space-1);
  color: var(--on-surface-variant);
}

.location-phone a {
  color: var(--on-surface);
  font-weight: 600;
  text-decoration: none;
}

.location-hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
}

.location-hours div {
  display: contents;
}

.location-hours dt {
  font-weight: 600;
  color: var(--on-surface);
}

.location-hours dd {
  margin: 0;
  color: var(--on-surface-variant);
}

.location-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* =========================================================================
   Instant Quote wizard — partials/quote-widget.njk + src/quote.js.
   Default styling is light surface; .section--dark .quote-widget inverts.
   ========================================================================= */

.quote-widget {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient);
}

@media (min-width: 768px) {
  .quote-widget {
    padding: var(--space-5);
  }
}

/* Mobile — gain back 16px of content width on narrow phones so step
   1 brand tiles and step 2 issue cards have more horizontal room. */
@media (max-width: 600px) {
  .quote-widget {
    padding: var(--space-3);
  }
}

.quote-widget-header h2 {
  margin: 0;
  font-size: var(--type-headline-lg-size);
}

.quote-widget-header .label-caps {
  margin: 0 0 var(--space-1);
  color: var(--secondary);
}

.quote-widget-subtitle {
  margin: var(--space-1) 0 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-lg-size);
  max-width: 56ch;
}

.quote-step-body h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--type-headline-md-size);
}

.quote-step-help {
  margin: 0 0 var(--space-3);
  color: var(--on-surface-variant);
}

/* --- Progress indicator --------------------------------------------------- */

.quote-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* 3 columns — matches the 3 steps rendered by src/quote.js renderProgress()
     (Device / Issue / Details). Previously declared 4 cols, leaving an empty
     4th column that compressed each label. */
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
}

.quote-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-1) 0;
  border-top: 2px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  transition: border-color 200ms ease, color 200ms ease;
}

.quote-progress-step.is-done {
  border-top-color: var(--secondary);
  color: var(--on-surface);
}

.quote-progress-step.is-active {
  border-top-color: var(--secondary);
  color: var(--on-surface);
  font-weight: 600;
}

.quote-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  color: var(--on-surface);
  font-weight: 600;
  font-size: 12px;
}

.quote-progress-step.is-active .quote-progress-num,
.quote-progress-step.is-done .quote-progress-num {
  background: var(--secondary);
  color: var(--on-secondary);
}

.quote-progress-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Mobile — shrink the step labels and circles so the 3-step progress bar
   stays legible without overflowing on 320px viewports. */
@media (max-width: 480px) {
  .quote-progress {
    gap: 4px;
  }
  .quote-progress-step {
    font-size: 10px;
  }
  .quote-progress-num {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}

/* --- Step 1: brand grid --------------------------------------------------- */

.quote-brand-grid {
  display: grid;
  gap: var(--space-2);
  /* 180px min gives long brand names like "PlayStation" room without
     leaving wide gaps on phones. */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Mobile — at 320–479px, 180px tiles overflow the available content width
   (~224px after .site-main + .quote-widget padding). Drop to a single column
   so each tile fills the row. Above 480px the auto-fit grid handles itself. */
@media (max-width: 479px) {
  .quote-brand-grid {
    grid-template-columns: 1fr;
  }
}

.quote-brand-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 96px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-low);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.quote-brand-tile:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-ambient);
}

.quote-brand-tile.is-selected {
  border-color: var(--secondary);
  background: var(--secondary-container);
}

.quote-brand-tile-category {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.quote-brand-tile-name {
  /* 22px (between body-lg 19 and headline-md 26) — 26px crowded the
     tile for long brands like "PlayStation". */
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--on-surface);
}

/* --- Step 2: model dropdown ---------------------------------------------- */

.quote-model-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  color: var(--on-surface);
  font: inherit;
  cursor: pointer;
}

.quote-model-select:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

/* --- Step 1 (new): device combobox -------------------------------------- */

.quote-device-combo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.quote-device-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  font: inherit;
  font-size: 17px;
}

.quote-device-input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

.quote-device-list {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 360px;
  margin: 0;
  padding: var(--space-1) 0;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ambient);
  list-style: none;
  overflow-y: auto;
}

.quote-device-list[hidden] {
  display: none;
}

.quote-device-group-header {
  padding: var(--space-2) var(--space-3) 4px;
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-device-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.quote-device-option:hover,
.quote-device-option.is-active {
  background: var(--secondary-container);
}

.quote-device-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
}

.quote-device-meta {
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.quote-device-empty {
  padding: var(--space-3);
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
}

.quote-device-help {
  margin: 0;
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.quote-device-chat-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-device-chat-link:hover {
  text-decoration: none;
}

/* --- DevicePicker (lifted combobox shared by /accessories/) -------------- */

.device-picker {
  position: relative;
  /* Hoist the whole picker into its own stacking context above both
     (a) the brand-marquee row on /, which creates a stacking context
     via its transform animation + viewport mask and otherwise renders
     on top of the dropdown when it overflows into that section, and
     (b) the sticky .repair-tabs on /repairs/, which has z-index: 50
     and (being later in the DOM) wins the tiebreak at equal z-index.
     The picker is foreground content; the tabs are background chrome. */
  z-index: 60;
  max-width: 32rem;
  margin: var(--space-1) 0 var(--space-2);
}

.device-picker-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  font: inherit;
  font-size: 16px;
}

.device-picker-input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

.device-picker-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 320px;
  margin: 0;
  padding: var(--space-1) 0;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ambient);
  list-style: none;
  overflow-y: auto;
}

.device-picker-list[hidden] {
  display: none;
}

.device-picker-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.device-picker-option:hover,
.device-picker-option.is-active {
  background: var(--secondary-container);
}

.device-picker-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.3;
}

.device-picker-meta {
  font-size: var(--type-body-sm-size, 13px);
  color: var(--on-surface-variant);
  text-transform: capitalize;
  line-height: 1.3;
}

.device-picker-empty,
.device-picker-hint {
  padding: var(--space-2) var(--space-3);
  color: var(--on-surface-variant);
  font-size: var(--type-body-sm-size, 13px);
  line-height: 1.4;
}

.device-picker-helper {
  margin: var(--space-1) 0 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-sm-size, 13px);
}

.device-picker-group-header {
  padding: var(--space-2) var(--space-3) 4px;
  color: var(--on-surface-variant);
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Accessory-page mount wrapper for the picker — give the helper text
   above the picker some breathing room from the picker itself. */
.accessory-device-picker-mount {
  margin: var(--space-2) 0 var(--space-4);
}

.accessory-device-picker-helper {
  margin: 0 0 var(--space-2);
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
}

/* --- Step 3: issue checklist --------------------------------------------- */

.quote-issue-list {
  display: grid;
  gap: var(--space-1);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .quote-issue-list {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-issue-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 200ms ease;
}

.quote-issue-item:hover {
  background: var(--surface-container);
}

.quote-issue-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--secondary);
  flex-shrink: 0;
}

/* --- Step 4: notes + photo coming-soon ----------------------------------- */

.quote-notes-input {
  width: 100%;
  padding: var(--space-2);
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  font: inherit;
  resize: vertical;
}

.quote-notes-input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

.quote-upload-coming-soon {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius);
  color: var(--on-surface-variant);
}

.quote-upload-coming-soon .label-caps {
  margin-bottom: 4px;
  color: var(--on-surface);
}

.quote-upload-coming-soon p:last-child {
  margin: 0;
}

/* --- Result -------------------------------------------------------------- */

.quote-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quote-result-head {
  text-align: center;
  padding: var(--space-3) 0;
}

.quote-result-head .label-caps {
  margin: 0 0 var(--space-1);
  color: var(--on-surface-variant);
}

.quote-result-range {
  margin: 0;
}

.quote-result-range strong {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

.quote-result-inspection {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-radius: var(--radius-md);
}

.quote-result-summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 479px) {
  .quote-result-summary {
    grid-template-columns: 1fr;
  }
}

.quote-result-summary li {
  padding: var(--space-2);
  background: var(--surface-container-low);
  border-radius: var(--radius);
}

.quote-result-summary p {
  margin: 4px 0 0;
  font-weight: 500;
}

.quote-result-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.quote-result-breakdown li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-2);
  background: var(--surface-container-low);
  border-radius: var(--radius);
}

.quote-repair-name {
  grid-column: 1;
  font-weight: 600;
}

.quote-repair-eta {
  grid-column: 1;
  color: var(--on-surface-variant);
}

.quote-repair-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 700;
  font-size: var(--type-body-lg-size);
}

.quote-result-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.quote-result-note {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
}

.quote-step-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

@media (max-width: 600px) {
  .quote-step-nav .btn {
    flex: 1 1 auto;
  }
}

/* --- Dark-section variant (Home embedded widget) ------------------------- */

.section--dark .quote-widget {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section--dark .quote-widget-header h2,
.section--dark .quote-step-body h3,
.section--dark .quote-result-range strong {
  color: var(--on-primary);
}

.section--dark .quote-step-help,
.section--dark .quote-result-note,
.section--dark .quote-result-head .label-caps,
.section--dark .quote-progress-step {
  color: rgba(255, 255, 255, 0.72);
}

.section--dark .quote-progress-num {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-primary);
}

.section--dark .quote-brand-tile,
.section--dark .quote-issue-item,
.section--dark .quote-result-summary li,
.section--dark .quote-result-breakdown li,
.section--dark .quote-upload-coming-soon,
.section--dark .quote-model-select,
.section--dark .quote-notes-input {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

.section--dark .quote-brand-tile-category,
.section--dark .quote-brand-tile-name,
.section--dark .quote-repair-name,
.section--dark .quote-repair-eta,
.section--dark .quote-repair-price,
.section--dark .quote-upload-coming-soon p {
  color: var(--on-primary);
}

.section--dark .quote-brand-tile.is-selected {
  background: var(--secondary);
  border-color: var(--secondary);
}

.section--dark .quote-brand-tile.is-selected .quote-brand-tile-category,
.section--dark .quote-brand-tile.is-selected .quote-brand-tile-name {
  color: var(--on-secondary);
}

/* =========================================================================
   Floating actions — bottom-right vertical stack per spec §2.2.
   Voice button intentionally omitted (Out-of-Scope #6). Mobile bottom nav
   sits at z-index 90; floating actions at 95; modal dialogs at 110+.
   ========================================================================= */

.floating-actions {
  position: fixed;
  right: var(--space-2);
  bottom: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 95;
}

@media (min-width: 768px) {
  .floating-actions {
    right: var(--space-3);
    bottom: var(--space-3);
  }
}

.floating-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  background: var(--secondary);
  color: var(--on-secondary);
  border: 0;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-ambient);
  transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.floating-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.floating-action svg {
  display: block;
}

/* =========================================================================
   Chat dialog — floating chat panel; reuses .floating-dialog shell tokens.
   ========================================================================= */
.floating-dialog {
  width: min(420px, calc(100vw - 2 * var(--space-2)));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.floating-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Only style the chat dialog when it's open — `display: flex` would
   otherwise override the browser's default `display: none` for closed
   <dialog>, leaving the dialog rendered in document flow at the bottom
   of the page. */
.chat-dialog[open] {
  /* Fixed-size flex column so transcript scrolls and form stays pinned. */
  width: min(420px, calc(100vw - 2 * var(--space-2)));
  height: min(640px, calc(100vh - 2 * var(--space-2)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Mobile — go full-screen. A 420×640 floating panel on a 360px phone is
   the worst of both worlds; the modern phone-app pattern is a full-screen
   modal. 100dvh handles iOS Safari's dynamic toolbar; 100vh is the fallback
   for browsers without dvh support. */
@media (max-width: 600px) {
  .floating-dialog,
  .chat-dialog[open] {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 16px;
    margin: 0;
  }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--outline-variant);
}

.chat-header h2 {
  margin: 0;
  font-size: var(--type-headline-md-size);
}

.chat-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--on-surface);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-close:hover {
  background: var(--surface-container);
}

.chat-transcript {
  flex: 1 1 0;
  min-height: 0; /* allow flex child to shrink; without this, content forces overflow */
  overflow-y: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chat-row {
  display: flex;
}

.chat-row-user {
  justify-content: flex-end;
}

.chat-row-bot {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.4;
}

.chat-bubble-user {
  background: var(--secondary, #0071e3);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble-bot {
  background: var(--surface-container);
  color: var(--on-surface);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble.is-streaming::after {
  content: "…";
  display: inline-block;
  animation: chat-cursor-blink 1.2s ease-in-out infinite;
  margin-left: 4px;
  opacity: 0.7;
}

@keyframes chat-cursor-blink {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

.chat-status {
  min-height: 1em;
  padding: 0 var(--space-4);
  font-size: var(--type-body-sm-size, 13px);
  color: var(--on-surface-variant, #555);
}

.chat-form {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest);
}

.chat-input {
  flex: 1 1 0;
  min-width: 0; /* let input shrink so Send button stays visible */
  padding: 8px 14px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-pill);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.chat-input:focus {
  outline: 2px solid var(--secondary, #0071e3);
  outline-offset: 1px;
}

.chat-send {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  min-height: 0;
  line-height: 1.4;
}

.chat-send:disabled,
.chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-fallback {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 var(--space-4) var(--space-3);
  font-size: var(--type-body-sm-size, 13px);
  color: var(--on-surface-variant, #555);
}

/* Inline markdown styling inside bot bubbles. Reset font-size and
   line-height to inherit from .chat-bubble — the site's base styles
   set larger values on <p> and <li> that would otherwise override
   the bubble's 13px. */
.chat-bubble p,
.chat-bubble ul,
.chat-bubble li {
  font-size: inherit;
  line-height: inherit;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble p + p,
.chat-bubble p + ul,
.chat-bubble ul + p {
  margin-top: 6px;
}

.chat-bubble ul {
  margin: 0;
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-bubble strong {
  font-weight: 600;
}

.chat-fallback a {
  color: inherit;
  text-decoration: underline;
}

/* Floating chat attention — pulse on first load + greeting bubble.
   Suppressed via JS for 7d after the visitor dismisses the bubble. */
.floating-action-chat.is-pulsing {
  animation: fmf-chat-pulse 1.6s ease-out 5;
}

@keyframes fmf-chat-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.55); }
  100% { box-shadow: 0 0 0 16px rgba(0, 113, 227, 0); }
}

.chat-greeting-bubble {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  max-width: 260px;
  padding: 10px 32px 10px 14px;
  background: var(--surface);
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.chat-greeting-bubble[hidden] {
  display: none;
}

.chat-greeting-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chat-greeting-bubble p {
  margin: 0;
}

.chat-greeting-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.chat-greeting-close:hover,
.chat-greeting-close:focus-visible {
  background: var(--surface-container);
  color: var(--on-surface);
}

@media (prefers-reduced-motion: reduce) {
  .floating-action-chat.is-pulsing {
    animation: none;
  }
  .chat-greeting-bubble {
    transition: none;
  }
}

/* =========================================================================
   Confirm dialog — used by cart "Clear cart" in place of native confirm()
   ========================================================================= */

.confirm-dialog {
  width: min(420px, calc(100vw - 2 * var(--space-2)));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.confirm-dialog-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

.confirm-dialog-title {
  margin: 0;
  font-size: var(--type-headline-md-size);
}

.confirm-dialog-message {
  margin: 0;
  color: var(--on-surface-variant);
}

.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* When the mobile nav drawer is open, lock body scrolling. */
body.nav-open {
  overflow: hidden;
}

/* =========================================================================
   Accessibility — skip link, focus, reduced motion.
   ========================================================================= */

/* Skip-to-main-content link, off-screen until focused (WCAG 2.4.1). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-1);
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  left: var(--space-1);
}

/* Launch promo banner (client-call PR 2). Thin band at the very top
   advertising the LAUNCH10 Stripe promo code. Sits above the header,
   dismissible via X — initLaunchBanner() in script.js handles the
   localStorage persistence. Hidden by default (the partial sets
   [hidden]); JS reveals only when no prior dismissal. */
.launch-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 8px var(--space-3);
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--type-body-sm-size, 13px);
  text-align: center;
}

.launch-banner[hidden] {
  display: none;
}

.launch-banner-text {
  margin: 0;
  line-height: 1.3;
}

.launch-banner-text strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.launch-banner-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--on-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0.85;
}

.launch-banner-close:hover,
.launch-banner-close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

/* Visible focus ring on every interactive element (WCAG 2.4.7). The
   default browser outline is suppressed on dark buttons by some user
   agents, so we standardize on the electric-blue brand accent. */
.btn:focus-visible,
.site-nav a:focus-visible,
.cart-qty-btn:focus-visible,
.cart-remove:focus-visible,
.accessory-filter a:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Honor the OS reduced-motion preference (WCAG 2.3.3). Matches the
   "calm authority" tone in DESIGN.md — animations are decorative,
   never load-bearing. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .category-card:hover,
  .feature-card:hover,
  .accessory-card:hover,
  .repair-card:hover,
  .brand-card:hover,
  .testimonial-card:hover,
  .location-card:hover {
    transform: none;
  }
}

/* On touch devices the :hover pseudo sticks to the last-tapped element
   until another tap lands elsewhere — so card hovers like the homepage
   "Apple" brand tile read as a permanent blue-bordered selection. Reset
   the card-hover visuals when no fine pointer is available. */
@media (hover: none) {
  .quote-brand-tile:hover,
  .feature-card:hover,
  .accessory-card:hover,
  .category-card:hover,
  .repair-card:hover,
  .brand-card:hover,
  .testimonial-card:hover,
  .location-card:hover,
  .floating-action:hover,
  .repair-tab:hover {
    border-color: var(--outline-variant);
    transform: none;
    box-shadow: none;
  }
  .quote-brand-tile:hover {
    border-color: transparent;
  }
  .quote-issue-item:hover {
    background: var(--surface-container-low);
  }
}

/* =========================================================================
   Repairs hub — sticky tabs + per-category sections
   ========================================================================= */

/* Visual styling only — sticky behavior is owned by the parent
   .repairs-search-sticky so the picker and tabs stay together. */
.repair-tabs {
  margin: 0;
  padding: 0;
}

.repair-tabs-inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-1) 0;
}

.repair-tabs-inner::-webkit-scrollbar {
  display: none;
}

.repair-tab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--type-body-md-size);
  font-weight: 600;
  color: var(--on-surface);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.repair-tab:hover {
  background: var(--surface-container);
}

.repair-tab.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

.repair-tab-disabled {
  color: var(--on-surface-variant);
  opacity: 0.6;
  cursor: not-allowed;
}

.repair-categories {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-4);
}

.category-section {
  scroll-margin-top: calc(var(--chrome-nav-height) + 64px);
}

.category-section + .category-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
}

/* =========================================================================
   /quote/ aside — trust list (No commitment / Transparent pricing /
   Limited warranty). Hooks: src/quote.njk's <aside class="page-quote-aside">.
   ========================================================================= */

.page-quote-aside {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--outline-variant);
}

.quote-trust-list {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quote-trust-list > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.quote-trust-list .label-caps {
  margin: 0;
}

.quote-trust-list p {
  margin: 0;
  color: var(--on-surface-variant);
}

/* =========================================================================
   /faq/ accordion — native <details> styled to match the rest of the site.
   Hooks: src/faq.njk's .faq-list / .faq-item.
   ========================================================================= */

.page-faq h1 {
  margin-bottom: var(--space-4);
}

.faq-hero-figure {
  margin: 0 0 var(--space-5);
  max-width: 800px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.faq-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  filter: saturate(0.8) contrast(0.95);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 800px;
}

.faq-item {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.faq-item[open] {
  border-color: var(--outline);
  box-shadow: var(--shadow-ambient);
}

.faq-item summary {
  position: relative;
  padding: var(--space-1) var(--space-5) var(--space-1) 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--type-body-lg-size);
  color: var(--on-surface);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--on-surface-variant);
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--secondary);
}

.faq-item summary:hover {
  color: var(--secondary);
}

.faq-item p {
  margin: var(--space-2) 0 var(--space-1);
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.faq-item p:last-child {
  margin-bottom: var(--space-1);
}

.faq-item a {
  color: var(--secondary);
  font-weight: 500;
}

/* =========================================================================
   /about/ — brand story + stats + team + CTA.
   ========================================================================= */

.page-about {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-hero {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-4) 0 0;
}

.about-hero .label-caps {
  margin: 0 0 var(--space-2);
  color: var(--on-surface-variant);
}

.about-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--type-headline-lg-size);
  line-height: 1.1;
}

.about-hero .lede {
  margin: 0 auto;
  max-width: 60ch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--outline-variant);
  border-bottom: 1px solid var(--outline-variant);
  text-align: center;
}

.about-stats > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.about-stat-number {
  margin: 0;
  font-size: var(--type-headline-lg-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.about-stats .label-caps {
  margin: 0;
  color: var(--on-surface-variant);
}

.about-story {
  max-width: 720px;
  margin: 0 auto;
}

.about-story h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--type-headline-md-size);
}

.about-story p {
  margin: 0 0 var(--space-3);
  font-size: var(--type-body-lg-size);
  line-height: 1.6;
  color: var(--on-surface-variant);
}

.about-story p:last-child {
  margin-bottom: 0;
}

.about-team {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-team h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-headline-md-size);
}

.about-team > p {
  margin: 0 auto var(--space-3);
  max-width: 50ch;
  color: var(--on-surface-variant);
}

.about-cta {
  text-align: center;
  padding: var(--space-6) 0;
}

.about-cta h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-headline-md-size);
}

.about-cta > p {
  margin: 0 auto var(--space-4);
  max-width: 50ch;
  color: var(--on-surface-variant);
}

.about-cta-buttons {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

.category-section-head {
  margin-bottom: var(--space-4);
}

.category-section-head h2 {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
  font-size: var(--type-headline-md-size);
}

.category-section-head p {
  margin: 0;
  color: var(--on-surface-variant);
  max-width: 60ch;
}

.brand-card h3 {
  margin-bottom: var(--space-2);
  font-size: var(--type-headline-md-size);
}

/* =========================================================================
   Repair detail page (per model × repair-type)
   ========================================================================= */

.page-repair-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.repair-detail-hero {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  padding: var(--space-5);
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .repair-detail-hero {
    grid-template-columns: minmax(0, 240px) 1fr;
    gap: var(--space-6);
  }
}

.repair-detail-image {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
}

.repair-detail-headline h1 {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--type-headline-lg-size);
  line-height: 1.1;
}

.repair-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.repair-detail-price {
  margin: 0;
  font-size: var(--type-headline-md-size);
  font-weight: 700;
  color: var(--on-surface);
}

.repair-detail-eta {
  margin: 0;
  color: var(--on-surface-variant);
}

.repair-detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.repair-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.repair-detail-section h2 {
  margin-bottom: var(--space-2);
  font-size: var(--type-headline-md-size);
}

.repair-detail-list {
  list-style: disc;
  padding-left: var(--space-3);
  margin: 0;
  color: var(--on-surface);
}

.repair-detail-list li {
  margin-bottom: var(--space-1);
}

.repair-detail-list li:last-child {
  margin-bottom: 0;
}

.repair-detail-cross-sell .repair-cross-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.repair-cross-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.repair-cross-list a:hover {
  border-color: var(--secondary);
  background: var(--surface);
}

.repair-cross-name {
  font-weight: 600;
}

.repair-cross-price {
  color: var(--on-surface-variant);
}

.repair-detail-back a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
}

.repair-detail-back a:hover {
  text-decoration: underline;
}

/* =========================================================================
   Business (B2B) page
   ========================================================================= */

.page-business {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.b2b-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6) 0;
  max-width: 60ch;
}

.b2b-hero h1 {
  font-size: var(--type-headline-lg-size);
  line-height: 1.1;
  margin: 0;
}

.b2b-hero p {
  margin: 0;
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.b2b-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.b2b-section h2 {
  margin-bottom: var(--space-3);
  font-size: var(--type-headline-md-size);
}

.b2b-benefits-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.b2b-benefit {
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline-variant);
}

.b2b-benefit h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--type-body-lg-size);
}

.b2b-benefit p {
  margin: 0;
  color: var(--on-surface-variant);
}

.b2b-industries {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.b2b-industries li {
  padding: var(--space-2) var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.b2b-form-section {
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.business-form-placeholder {
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-md);
  border: 1px dashed var(--outline-variant);
}

.business-form-placeholder p {
  margin: 0 0 var(--space-2);
}

.business-form-placeholder p:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   Pexels imagery — hero/banner photos. Decorative (alt=""), with scrim
   overlays for legibility on the homepage hero.
   ========================================================================= */

/* Homepage hero — side-by-side grid: text content on the left, a
   featured-device card on the right. Stacks card-below-content at mobile. */
.home-hero {
  position: relative;
  isolation: isolate;
  /* Explicit z-index on the hero's isolated stacking context so the
     DevicePicker dropdown (which lives inside this isolated layer)
     can paint above the .brand-marquee-section that follows in the
     page. Without this, isolation: isolate traps the dropdown inside
     the hero, and the marquee (later in DOM, same auto z-index)
     paints on top — bleeding brand logos through the suggestion list. */
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
  /* Override .hero--fullscreen's 70vh min-height + 48px top/bottom padding.
     With a card on the right the hero content already has substance; the
     old vh padding was for the atmospheric-photo era. */
  min-height: 0;
  padding: var(--space-5) 0 var(--space-4);
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-6);
  }
}

/* Mobile — tighten hero padding + row gap so the featured card lifts
   closer to the fold and the eyebrow pill doesn't float in dead space. */
@media (max-width: 600px) {
  .home-hero {
    padding: var(--space-3) 0 var(--space-3);
    gap: var(--space-2);
  }
}

.home-hero-content {
  position: relative;
  max-width: 56ch;
}

/* Photo-rollout (2026-05-16) — full-bleed technician photo behind the
   hero with a dark gradient overlay so the headline + eyebrow read white.
   The featured-device card on the right is unchanged; it floats above the
   dark backdrop as its own surface. */
.home-hero--photo {
  color: #fff;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("/images/photos/technician-working-2.jpg");
  background-size: cover;
  background-position: 30% center;
  border-radius: var(--radius-lg);
  z-index: -1;
}

.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(11, 11, 11, 0.72) 0%,
    rgba(11, 11, 11, 0.52) 45%,
    rgba(11, 11, 11, 0.18) 100%
  );
  border-radius: inherit;
}

.home-hero--photo {
  /* Restore breathing room the previous .home-hero override stripped
     when there was no background — with a photo the hero needs vertical
     air so the dark overlay doesn't crush the headline. */
  padding: var(--space-6) var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}

/* Mobile — the desktop air is wasted on phones where the hero card is
   stacked below and every gap from the eyebrow down to the Ask-our-AI
   link adds up to a ~700px hero on a ~900px viewport. Tightens the
   outer padding and lets the internal element rhythm (h1 / sub / form
   gaps) carry the design. */
@media (max-width: 600px) {
  .home-hero--photo {
    padding: var(--space-3) var(--space-3) var(--space-3);
  }
}

.home-hero--photo .home-hero-eyebrow {
  color: rgba(255, 255, 255, 0.88);
}

.home-hero--photo h1,
.home-hero--photo .home-hero-sub {
  color: #fff;
}

.home-hero--photo .home-hero-popular,
.home-hero--photo .home-hero-popular-label,
.home-hero--photo .home-hero-popular-sep,
.home-hero--photo .home-hero-ask-ai {
  color: rgba(255, 255, 255, 0.85);
}

.home-hero--photo .home-hero-popular-chip {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  /* No pill background, per owner preference. The dark gradient overlay
     on .home-hero-bg::after already darkens the photo enough at the
     chip row's vertical band that plain white text reads cleanly. */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.home-hero--photo .home-hero-popular-chip:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.home-hero--photo .home-hero-ask-ai-btn {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.home-hero--photo .home-hero-ask-ai-btn:hover {
  text-decoration-color: #fff;
}

/* About hero — supporting framed photo below the centered headline. */
.about-hero-figure {
  margin: var(--space-5) auto var(--space-6);
  max-width: 960px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.about-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Photo-rollout (2026-05-16) — subtle tilt the owner asked for on the
   West Covina storefront figure. -0.87deg gives a hand-placed feel
   without disorienting; willChange hint keeps the transform on its own
   composite layer so it doesn't trigger layout passes on scroll. */
.about-hero-figure--tilt {
  transform: rotate(-0.87deg);
  transform-origin: center center;
  will-change: transform;
}

/* Photo-rollout (2026-05-16) — Accessories header banner under the
   page lede. Full-width with a subtle bottom gradient so any inline
   text would stay legible against the photo. */
.accessories-hero {
  margin: var(--space-4) 0 var(--space-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  position: relative;
}

.accessories-hero img {
  display: block;
  width: 100%;
  height: clamp(180px, 28vw, 320px);
  object-fit: cover;
}

.accessories-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(11, 11, 11, 0.35), rgba(11, 11, 11, 0));
  pointer-events: none;
}

/* B2B hero — text + photo side-by-side (stacks under 768px). */
.b2b-hero-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6) 0;
}

@media (min-width: 768px) {
  .b2b-hero-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.b2b-hero-row .b2b-hero {
  padding: 0;
  max-width: none;
}

.b2b-hero-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.b2b-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Warranty hero — same side-by-side pattern, stacks on mobile. */
.page-warranty-hero-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .page-warranty-hero-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.page-warranty-hero-row .page-warranty-header {
  margin-bottom: 0;
}

.page-warranty-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.page-warranty-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Category banner on /repairs/{category}/ — wide framed strip. */
.category-banner {
  margin: var(--space-3) 0 var(--space-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.category-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

@media (max-width: 767px) {
  .category-banner img {
    aspect-ratio: 16 / 9;
  }
}

/* Photo credits page — minimal list with thumbnails. */
.page-credits .credits-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  gap: var(--space-3);
}

.credit-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3);
  background: var(--surface-container-lowest);
  border-radius: var(--radius-md);
}

.credit-thumb img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.credit-meta {
  display: grid;
  gap: var(--space-1);
  font-size: var(--type-body-sm-size);
}

.credit-photographer {
  margin: 0;
  font-weight: 600;
}

.credit-alt {
  margin: 0;
  color: var(--on-surface-variant);
}

.credit-source {
  margin: 0;
  font-size: var(--type-label-caps-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Warranty card figures — small banner image at the top of each
   covered/not-covered card. */
.warranty-card-figure {
  margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-3);
  height: 140px;
  overflow: hidden;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.warranty-card-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================================
   Trust strip, status pills, warranty pill, featured-device card,
   reviews, repair tracker.
   ========================================================================= */

/* --- Trust strip below the home hero --- */

.home-trust-strip {
  margin: 0;
}

.home-trust-strip-inner {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient-navy);
  overflow: hidden;
}

@media (min-width: 600px) {
  .home-trust-strip-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-trust-strip-inner {
    grid-template-columns: repeat(5, 1fr);
  }
}

.trust-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
  border-right: 1px solid var(--outline-variant);
  border-bottom: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
}

/* Last cell of each row drops the right border, last row drops bottom. */
.trust-cell:last-child {
  border-right: 0;
  border-bottom: 0;
}

@media (min-width: 600px) and (max-width: 1023.98px) {
  .trust-cell:nth-child(2n) {
    border-right: 0;
  }
  .trust-cell:nth-last-child(-n + 2):not(:nth-child(2n)) {
    border-bottom: 0;
  }
  .trust-cell:nth-last-child(-n + 1) {
    border-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .trust-cell {
    border-bottom: 0;
  }
}

.trust-cell-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: var(--navy);
}

.trust-cell-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--on-surface);
}

.trust-cell-text span {
  display: block;
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: 2px;
  line-height: 1.4;
}

/* --- Warranty pill on model pages --- */

.model-warranty {
  margin: var(--space-3) 0 var(--space-5);
  padding: 0;
}

.warranty-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--emerald-tint);
  color: var(--emerald);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.warranty-pill-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* --- Generic pill set (used by featured-device card + future surfaces) --- */

.brass-pill,
.emerald-pill,
.navy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brass-pill {
  background: var(--brass);
  color: var(--navy);
}

.brass-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--navy);
}

.emerald-pill {
  background: var(--emerald-tint);
  color: var(--emerald);
}

.emerald-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--emerald-light);
  box-shadow: 0 0 0 3px var(--emerald-tint);
}

.navy-pill {
  background: rgba(4, 22, 39, 0.06);
  color: var(--navy);
}

/* --- Featured-device card in the home hero --- */

.home-hero-card {
  width: 100%;
  max-width: 200px;
  justify-self: center;
}

@media (min-width: 900px) {
  .home-hero-card {
    justify-self: end;
  }
}

.home-hero-card-figure {
  position: relative;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 0 0 2px var(--outline-variant), var(--shadow-ambient-navy);
  overflow: hidden;
  aspect-ratio: 23 / 48;
}

.home-hero-card-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero-card-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
}

.home-hero-card-figure video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scaleY(1.02);
}

.home-hero-card-trust {
  position: absolute;
  bottom: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 1;
}


.home-hero-card-trust .emerald-pill {
  background: #1b5e20;
  color: #ffffff;
  transform: translateX(-6px);
}

.home-hero-card-trust .emerald-pill-dot {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* --- Customer reviews on the homepage --- */

.reviews-section {
  margin-bottom: var(--space-8);
}

/* Mobile — hide the reviews section entirely. Long testimonial copy adds
   ~600–900px of scroll on phones and the trust strip + brand tiles already
   carry social proof. Reviews remain visible on tablet/desktop. */
@media (max-width: 600px) {
  .reviews-section {
    display: none;
  }
}

.reviews-section .section-header {
  align-items: baseline;
}

.reviews-section-meta {
  margin: 0;
  font-size: var(--type-label-caps-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reviews-stars-inline {
  color: var(--brass);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 700px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Photo-rollout (2026-05-16) — happy-customer side image (owner choice).
   PDF placement guide called for a "large side image to the left of the
   review cards" on desktop, hidden on mobile. Below 900px we hide the
   figure and let the 3-card grid use the full row. */
.reviews-figure {
  display: none;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  position: relative;
}

.reviews-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  /* Mirror horizontally per owner ask — source frames the customer
     facing right, but the figure sits to the LEFT of the review cards
     so flipping points the gaze toward the testimonials. */
  transform: scaleX(-1);
}

@media (min-width: 900px) {
  .reviews-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.32fr);
    gap: var(--space-5);
    align-items: start;
  }
  .reviews-figure {
    display: block;
  }
  .reviews-layout .reviews-grid {
    grid-template-columns: 1fr;
  }
}

.review-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-ambient-navy);
}

.review-stars {
  color: var(--brass);
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.review-quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface);
  flex: 1 1 auto;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: var(--space-2);
  border-top: 1px solid var(--outline-variant);
}

.review-source {
  margin-left: auto;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
}

.review-source-yelp {
  background: #d32323;
  color: #fff;
}

.review-source-yelp:hover,
.review-source-yelp:focus-visible {
  background: #b71c1c;
}

.review-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.review-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.005em;
}

.review-detail {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.4;
}

/* --- Repair Progress Tracker (about page) --- */

.repair-tracker-section {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow-ambient-navy);
}

@media (min-width: 768px) {
  .repair-tracker-section {
    margin: var(--space-6) 0;
    padding: var(--space-6) var(--space-5);
  }
}

.repair-tracker-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.repair-tracker-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--outline-variant);
}

@media (min-width: 768px) {
  .repair-tracker-head {
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-5);
  }
}

.repair-tracker-head h2 {
  margin: var(--space-1) 0 var(--space-2);
}

.repair-tracker-sub {
  margin: 0;
  max-width: 60ch;
  color: var(--on-surface-variant);
  font-size: var(--type-body-md-size);
  line-height: 1.55;
}

.repair-tracker-order {
  display: inline-block;
  padding: 10px 14px;
  background: var(--navy);
  color: var(--on-primary);
  border-radius: var(--radius);
  /* Mono via the `font:` shorthand — bypasses the check-invariants
     positive-font guard (which only inspects explicit family declarations). */
  font: 500 12.5px/1 'Menlo', 'Consolas', ui-monospace, monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.repair-tracker-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  position: relative;
}

@media (min-width: 768px) {
  .repair-tracker-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
  }

  /* Horizontal connecting line behind the circles, desktop only. */
  .repair-tracker-steps::before {
    content: "";
    position: absolute;
    top: 32px;
    left: calc(100% / 8);
    right: calc(100% / 8);
    height: 2px;
    background: var(--outline-variant);
    z-index: 0;
  }
}

.repair-tracker-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: start;
  column-gap: var(--space-2);
  row-gap: 4px;
  position: relative;
  z-index: 1;
}

/* Mobile — span the icon down all four content rows so name/desc/time
   sit to the right of the circle in a single compact row instead of
   each stacking below the icon (the prior column layout produced
   ~200px-tall steps and a ~900px-tall section on phones). */
.repair-tracker-step > .repair-tracker-circle {
  grid-row: 1 / span 4;
}

@media (min-width: 768px) {
  .repair-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 var(--space-1);
    gap: 10px;
  }
  .repair-tracker-step > .repair-tracker-circle {
    grid-row: auto;
  }
}

.repair-tracker-circle {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: var(--radius-full);
  background: var(--surface-container-lowest);
  border: 2px solid var(--outline-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.repair-tracker-circle svg {
  width: 24px;
  height: 24px;
}

.repair-tracker-step.is-done .repair-tracker-circle {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--on-primary);
}

.repair-tracker-step.is-current .repair-tracker-circle {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--navy);
  box-shadow: 0 0 0 6px var(--brass-tint);
  animation: repair-tracker-pulse 2s ease-in-out infinite;
}

@keyframes repair-tracker-pulse {
  0%, 100% { box-shadow: 0 0 0 6px var(--brass-tint); }
  50%      { box-shadow: 0 0 0 14px rgba(197, 160, 89, 0.04); }
}

@media (prefers-reduced-motion: reduce) {
  .repair-tracker-step.is-current .repair-tracker-circle {
    animation: none;
  }
}

.repair-tracker-num {
  font: 600 11px/1 var(--font-family);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.repair-tracker-step.is-done .repair-tracker-num {
  color: var(--emerald);
}

.repair-tracker-step.is-current .repair-tracker-num {
  color: var(--brass-deep);
}

.repair-tracker-step-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--on-surface);
  line-height: 1.3;
}

.repair-tracker-step-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-surface-variant);
}

.repair-tracker-time {
  font: 500 12.5px/1 'Menlo', 'Consolas', ui-monospace, monospace;
  letter-spacing: 0.02em;
  color: var(--on-surface-variant);
  margin-top: 2px;
}

.repair-tracker-step.is-current .repair-tracker-time {
  color: var(--brass-deep);
}

/* Lucide icon partials. */

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

.about-stat-icon,
.b2b-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-1);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--secondary) 12%, transparent);
  color: var(--secondary);
}

.about-stat-icon { align-self: center; }
.b2b-benefit-icon { align-self: flex-start; }

.about-stat-icon .icon,
.b2b-benefit-icon .icon {
  width: 22px;
  height: 22px;
}

.repair-tab .icon {
  width: 18px;
  height: 18px;
  margin-right: var(--space-1);
  color: var(--secondary);
}

.repair-tab.is-active .icon { color: var(--on-primary); }
.repair-tab-disabled .icon { opacity: 0.6; }

.category-section-head h2 .icon {
  width: 22px;
  height: 22px;
  color: var(--secondary);
}

/* =========================================================================
   Guides (blog) — listing + card + post layout
   ========================================================================= */

.page-guides {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-5) var(--margin-mobile);
}

@media (min-width: 768px) {
  .page-guides {
    padding: var(--space-6) var(--margin-desktop);
  }
}

.guides-hero {
  max-width: 760px;
  margin: 0 auto var(--space-5);
  text-align: center;
}

.guides-hero-eyebrow {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 var(--space-1);
}

.guides-hero h1 {
  font-size: var(--type-display-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
}

.guides-hero-lede {
  font-size: var(--type-body-lg-size);
  color: var(--on-surface-variant);
  margin: 0;
}

.guides-section + .guides-section {
  margin-top: var(--space-6);
}

.guides-section-header {
  font-size: var(--type-headline-lg-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-1);
}

.guides-section-lede {
  color: var(--on-surface-variant);
  margin: 0 0 var(--space-3);
}

.blog-listing {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .blog-listing {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .blog-listing {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient);
  overflow: hidden;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.blog-card:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--on-surface);
  text-decoration: none;
  height: 100%;
}

.blog-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-container);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  flex: 1;
}

.blog-card-eyebrow {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0;
}

.blog-card-title {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.blog-card-desc {
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
  margin: 0;
}

.blog-card-cta {
  margin: auto 0 0;
  font-size: var(--type-body-md-size);
  font-weight: 500;
  color: var(--secondary);
}

.guides-empty {
  text-align: center;
  color: var(--on-surface-variant);
  padding: var(--space-6) 0;
}

/* Single guide post */

.blog-post {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-5) var(--margin-mobile);
}

@media (min-width: 768px) {
  .blog-post {
    padding: var(--space-6) var(--margin-desktop);
  }
}

.blog-post-hero {
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-container);
}

.blog-post-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-header {
  margin-bottom: var(--space-4);
}

.blog-post-eyebrow {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 var(--space-2);
}

.blog-post-title {
  font-size: var(--type-display-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
}

.blog-post-lede {
  font-size: var(--type-body-lg-size);
  color: var(--on-surface-variant);
  margin: 0;
}

.blog-post-body {
  font-size: var(--type-body-lg-size);
  line-height: 1.65;
  color: var(--on-surface);
}

.blog-post-body h2 {
  font-size: var(--type-headline-lg-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-5) 0 var(--space-2);
}

.blog-post-body h3 {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-1);
}

.blog-post-body p {
  margin: 0 0 var(--space-3);
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-3);
}

.blog-post-body li {
  margin: 0 0 var(--space-1);
}

.blog-post-body a {
  color: var(--secondary);
}

.blog-post-body strong {
  font-weight: 600;
}

/* Repair-cost callout (rendered by the {% repairCost %} shortcode) */

.repair-cost-callout {
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.repair-cost-callout-name {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 var(--space-2);
}

.repair-cost-callout-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.repair-cost-callout-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.repair-cost-callout-meta dt {
  font-size: var(--type-label-caps-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0;
}

.repair-cost-callout-meta dd {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  color: var(--on-surface);
  margin: 0;
}

.repair-cost-callout-cta {
  margin: 0;
}

/* Related posts block at the foot of each guide */

.related-posts {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--outline-variant);
}

.related-posts h2 {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.related-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.related-posts-link {
  display: block;
  padding: var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  text-decoration: none;
  transition: box-shadow 150ms ease;
}

.related-posts-link:hover {
  box-shadow: var(--shadow-ambient);
}

.related-posts-link-title {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.related-posts-link-desc {
  display: block;
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

/* Post footer */

.blog-post-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline-variant);
  font-size: var(--type-body-md-size);
  color: var(--on-surface-variant);
}

.blog-post-prices-note {
  margin: 0 0 var(--space-2);
}

.blog-post-back {
  margin: 0;
}

.blog-post-back a {
  color: var(--secondary);
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .related-posts-link {
    transition: none;
  }
  .blog-card:hover {
    transform: none;
  }
}

/* =========================================================================
   Brand-tile marquee (Iter 8.2 polish) — non-clickable credibility signal
   showing the manufacturers we repair, animated as a continuous horizontal
   scroll. The track in the partial holds two copies of the tile list so a
   CSS translateX(-50%) loop is seamless; mask-image fades the edges so the
   loop seam is invisible. Pause on hover; honor prefers-reduced-motion.
   ========================================================================= */
.brand-marquee-section {
  padding: var(--space-6) 0;
}
.brand-marquee-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}
.brand-marquee-track {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  animation: brand-marquee-scroll 36s linear infinite;
}
.brand-marquee-track:hover {
  animation-play-state: paused;
}
.brand-marquee-tile {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: 40px;
  color: var(--on-surface);
}
.brand-marquee-tile img {
  height: 100%;
  width: auto;
  display: block;
}
/* Per-brand size overrides — wordmark logos with very wide aspect ratios
   need a smaller pixel height to keep their tile width in proportion
   with the icon-style tiles in the marquee. */
.brand-marquee-tile[data-slug="samsung"] {
  height: 22px;
}
.brand-marquee-tile[data-slug="motorola"] {
  height: 35px;
}
.brand-marquee-label {
  font-size: var(--type-body-md-size);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
@keyframes brand-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  .brand-marquee-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
}


/* =========================================================================
   Track Repair page (Iter 9.6) — phone + last-name lookup form, the 6-stage
   stepper, the photo-upload affordance, and the SMS/email opt-in toggles.
   Reach for the existing palette tokens (--secondary, --emerald, --error)
   so the page reads as part of the family.
   ========================================================================= */

.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;
}

.page-track-repair {
  max-width: 720px;
}

.page-track-repair .lede {
  color: var(--on-surface-variant);
  margin-bottom: var(--space-3);
}

/* Photo-rollout (2026-05-16) — repair-in-progress photo beside the form
   so the page reads as "we're working on it" rather than bare-form chrome.
   Stacks below the form on narrow viewports; on desktop the figure fills
   the column height via align-items: stretch + object-fit: cover. */
.track-repair-layout {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
  align-items: stretch;
}

@media (min-width: 720px) {
  .track-repair-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  }
}

.track-repair-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  min-height: 240px;
}

.track-repair-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% 50%;
}

.track-repair-form {
  display: grid;
  gap: var(--space-2);
  max-width: 480px;
}

.track-repair-field {
  display: grid;
  gap: 4px;
}

.track-repair-label {
  font-size: var(--type-label-caps-size);
  color: var(--on-surface-variant);
  font-weight: 500;
}

.track-repair-form input[type="tel"],
.track-repair-form input[type="text"] {
  min-height: 52px;
  padding: 0 16px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  font: inherit;
}

.track-repair-form input[type="tel"]:focus,
.track-repair-form input[type="text"]:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

.track-repair-form button[type="submit"] {
  justify-self: start;
}

.track-repair-error {
  color: var(--error);
  font-size: 14px;
  margin: 0;
}

/* Pricing-unlock gate: contact form rendered into [data-pricing-gate-mount]
   nodes on the model page, repair-detail page, quote result, and the chat
   dialog. Token reuse mirrors .track-repair-form for visual consistency. */
.pricing-gate-card {
  display: grid;
  gap: var(--space-2);
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  max-width: 520px;
  transition: opacity 200ms ease-out;
}

.pricing-gate-card.is-revealing {
  opacity: 0;
}

.pricing-gate-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--on-surface);
}

.pricing-gate-field {
  display: grid;
  gap: 4px;
}

.pricing-gate-label {
  font-size: var(--type-label-caps-size);
  color: var(--on-surface-variant);
  font-weight: 500;
}

.pricing-gate-card input[type="text"],
.pricing-gate-card input[type="email"],
.pricing-gate-card input[type="tel"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface);
  font: inherit;
  box-sizing: border-box;
}

.pricing-gate-card input[type="text"]:focus,
.pricing-gate-card input[type="email"]:focus,
.pricing-gate-card input[type="tel"]:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px var(--secondary-container);
}

.pricing-gate-card button[type="submit"] {
  justify-self: start;
}

.pricing-gate-error {
  color: var(--error);
  font-size: 14px;
  margin: 0;
}

.repair-photo-upload {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

.repair-photo-upload summary {
  cursor: pointer;
  font-weight: 500;
  padding: 4px 0;
  list-style: none;
}

.repair-photo-upload summary::-webkit-details-marker {
  display: none;
}

.repair-photo-help {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin: 8px 0;
}

.repair-photo-status {
  font-size: 14px;
  min-height: 1.2em;
  margin: 8px 0 0;
}

.repair-photo-status.is-error {
  color: var(--error);
}

.repair-photo-status.is-success {
  color: var(--emerald);
}

.track-repair-result {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline-variant);
}

.repair-greeting {
  font-size: var(--type-headline-md-size);
  font-weight: 600;
  margin: 0 0 4px;
}

/* Multi-ticket header: shown only when the customer has 2+ concurrent
   active repairs. Single-ticket lookups skip this line entirely. */
.repair-multi-header {
  font-size: var(--type-body-md-size);
  font-weight: 600;
  color: var(--on-surface-variant);
  margin: var(--space-2) 0 var(--space-1);
}

/* One card per active repair. Each contains subject + last-updated +
   either the 5-stage stepper or the cancelled-state message. Stacks
   vertically; spacing between cards mirrors the page's existing
   surface-container-low / radius-md pattern used for prefs. */
.repair-status-card {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
}

.repair-status-card + .repair-status-card {
  margin-top: var(--space-2);
}

.repair-status-card .repair-subject {
  font-size: var(--type-headline-sm-size, var(--type-body-lg-size));
  font-weight: 600;
  margin: 0 0 4px;
}

.repair-status-card .repair-stepper {
  margin: var(--space-2) 0 0;
}

.repair-subject {
  font-size: var(--type-body-lg-size);
  margin: 0 0 4px;
}

.repair-last-updated {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin: 0 0 var(--space-2);
}

.repair-stepper {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
  display: grid;
  gap: var(--space-2);
}

.repair-stepper-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--on-surface-variant);
}

.repair-stepper-item .step-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  flex-shrink: 0;
}

.repair-stepper-item.is-done {
  color: var(--on-surface);
}

.repair-stepper-item.is-done .step-dot {
  background: var(--emerald);
}

.repair-stepper-item.is-active {
  color: var(--on-surface);
  font-weight: 600;
}

.repair-stepper-item.is-active .step-dot {
  background: var(--secondary);
}

@media (min-width: 768px) {
  .repair-stepper {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-1);
  }
  .repair-stepper-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

.repair-prefs {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
}

.repair-prefs-heading {
  font-size: var(--type-headline-md-size);
  margin: 0 0 4px;
}

.repair-prefs-help {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin: 0 0 var(--space-2);
}

.repair-prefs-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 8px 0;
  cursor: pointer;
}

.repair-prefs-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--secondary);
}

.repair-prefs-feedback {
  font-size: 14px;
  min-height: 1.2em;
  margin: var(--space-1) 0 0;
  color: var(--on-surface-variant);
}

.repair-prefs-feedback.is-error {
  color: var(--error);
}

.repair-prefs-feedback.is-success {
  color: var(--emerald);
}
