/* ==========================================================================
   Perth Fence Pro — Design Tokens & Base Styles
   Brand colors extracted from official logo (Facebook, verified page).
   Typography: IBM Plex Sans (body/headings) + JetBrains Mono (labels/accents,
   echoing the monospace wordmark used in the Perth Fence Pro logo).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  /* Brand — logo colours, matched to the live perthfencepro.com.au palette */
  --ink-900: #232A30;   /* darkest — footer bg, hover states */
  --ink-800: #2F3840;   /* primary — header bg, headings (exact match to live site) */
  --ink-700: #46525C;
  --stone-300: #C4CCD4; /* live-site secondary surface — blue-grey tint */

  --sky-50:  #EEF8FD;   /* tint — section backgrounds */
  --sky-200: #B0E0F8;   /* logo house-panel blue — light-on-dark text & decorative */
  --sky-500: #2F97D4;   /* decorative / non-text only (3:1) — icons, focus ring, borders */
  --sky-700: #1B6D9E;   /* text & button fills on white (5.6:1) */
  --sky-800: #14567A;   /* hover/active (7.9:1) */

  --gray-100: #F3F4F5;
  --gray-200: #DDE1E3;  /* logo roof gray */
  --gray-400: #9CA6AC;
  --gray-600: #64707A;

  --white: #FFFFFF;

  --success: #178A4C;
  --error: #C3402B;

  /* Semantic tokens */
  --color-bg: var(--white);
  --color-bg-muted: var(--sky-50);
  --color-surface: var(--white);
  --color-border: var(--gray-200);
  --color-text: var(--ink-800);
  --color-text-muted: var(--gray-600);
  --color-primary: var(--ink-800);
  --color-primary-hover: var(--ink-900);
  --color-on-primary: var(--white);
  --color-accent: var(--sky-700);
  --color-accent-hover: var(--sky-800);
  --color-on-accent: var(--white);

  /* Type scale */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  /* Spacing (4/8px rhythm) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;   /* 20px — the scale is a 4px grid (space-N = N x 4px).
                           It was referenced in 11 rules but never defined, so
                           those declarations were silently dropped. */
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

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

  --shadow-sm: 0 1px 2px rgba(35, 42, 48, 0.08);
  --shadow-md: 0 8px 24px rgba(35, 42, 48, 0.10);
  --shadow-lg: 0 20px 48px rgba(35, 42, 48, 0.16);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;

  --container-max: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
p { max-width: 68ch; }
a { color: inherit; text-decoration: none; }

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

:focus-visible {
  outline: 3px solid var(--sky-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: var(--space-4); }

/* ---- Eyebrow / mono labels (nods to the logo's monospace wordmark) ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  min-height: 48px;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--color-on-primary);
  border-color: rgba(255,255,255,0.4);
}
.btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary); background: var(--gray-100); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: var(--text-base); }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.brand img { height: 44px; width: auto; }
.brand-word { font-weight: 700; font-size: var(--text-lg); color: var(--color-primary); line-height: 1.1; }
.brand-tagline { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--color-text-muted); letter-spacing: 0.02em; }

.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; gap: var(--space-8); }
.main-nav a {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.main-nav a:hover { color: var(--color-accent-hover); }
.main-nav a[aria-current="page"] {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent);
}

.header-cta { display: none; align-items: center; gap: var(--space-4); }
.header-phone {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-2);
  border-radius: var(--radius-sm);
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.header-phone .icon { color: var(--color-accent); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--gray-100); }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-panel {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0 var(--space-6);
}
.mobile-panel.is-open { display: block; }
.mobile-panel ul { display: flex; flex-direction: column; gap: var(--space-1); }
.mobile-panel a {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.mobile-panel a:hover { background: var(--gray-100); }
.mobile-panel a[aria-current="page"] { color: var(--color-accent-hover); background: var(--sky-50); }
.mobile-panel .btn { margin-top: var(--space-4); }

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .header-cta { display: flex; }
  .nav-toggle, .mobile-panel { display: none !important; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* Scrim strength is measured, not eyeballed: the hero photo contains pure-white
   pixels (picket fence + cloud), so text needs an effective alpha of ~0.77 to
   clear 4.5:1. On mobile the text spans the full width, so the scrim is uniform.
   From 1024px the text only occupies the left column, so the weight moves into a
   horizontal band — same contrast where the words are, photo still visible right. */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35,42,48,0.76) 0%, rgba(35,42,48,0.86) 55%, rgba(35,42,48,0.94) 100%);
}

@media (min-width: 960px) {
  /* Where the copy actually ends: container left edge + the 46rem copy cap.
     Tracking this in px (not a fixed %) keeps the dark band exactly as wide as
     the text at every viewport, so the photo is revealed as soon as there's room. */
  .hero { --hero-text-edge: max(768px, calc(50vw + 168px)); }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(35,42,48,0.30) 0%, rgba(35,42,48,0.46) 55%, rgba(35,42,48,0.70) 100%);
  }
  .hero-media::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
      rgba(35,42,48,0.68) 0,
      rgba(35,42,48,0.68) var(--hero-text-edge),
      rgba(35,42,48,0) calc(var(--hero-text-edge) + 260px));
  }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-24) var(--space-16);
}
/* Cap the copy, not the container — capping .container here would let its
   `margin-inline: auto` re-centre the whole block instead of left-aligning it. */
.hero-content > * { max-width: 46rem; }
.hero .eyebrow { color: var(--sky-200); }
.hero .eyebrow::before { background: var(--sky-200); }
.hero h1 { margin-top: var(--space-4); }
.hero p.lead { margin-top: var(--space-4); font-size: var(--text-lg); color: var(--gray-200); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.18);
}
.trust-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--gray-200); }
.trust-item .icon { color: var(--sky-200); }

.page-hero {
  background: var(--color-primary);
  color: var(--white);
  padding-block: var(--space-16) var(--space-12);
}
.page-hero .eyebrow { color: var(--sky-200); }
.page-hero .eyebrow::before { background: var(--sky-200); }
.page-hero h1 { margin-top: var(--space-4); font-size: var(--text-4xl); }
.page-hero p.lead { margin-top: var(--space-4); font-size: var(--text-lg); color: var(--gray-200); max-width: 60ch; }
.breadcrumb { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--sky-200); letter-spacing: 0.03em; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Sections ---- */
section { padding-block: var(--space-16); }
@media (min-width: 768px) { section { padding-block: var(--space-24); } }
.section-muted { background: var(--color-bg-muted); }
.section-dark { background: var(--color-primary); color: var(--white); }
.section-head { max-width: 42rem; margin-bottom: var(--space-12); }
.section-head h2 { margin-top: var(--space-3); }
.section-head p.lead { margin-top: var(--space-4); color: var(--color-text-muted); font-size: var(--text-lg); }
.section-dark .section-head p.lead { color: var(--gray-200); }
.section-foot { margin-top: var(--space-12); }

/* ---- Grids & Cards ---- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-2px); }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--sky-50);
  color: var(--color-accent-hover);
  margin-bottom: var(--space-5);
}
.card-icon .icon { width: 26px; height: 26px; }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-4);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-accent-hover);
}
.card .card-link .icon { width: 16px; height: 16px; transition: transform var(--duration) var(--ease); }
.card:hover .card-link .icon { transform: translateX(3px); }
/* Whole card becomes the hit area — the small inline link alone is a poor touch target */
.card .card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card:focus-within { outline: 3px solid var(--sky-500); outline-offset: 2px; }
.card .card-link:focus-visible { outline: none; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); text-align: center; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-4xl); color: var(--sky-200); }
.stat-label { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--gray-200); }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(0deg, rgba(35,42,48,0.85), rgba(35,42,48,0));
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; transform: translateY(0); }
.gallery-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }
.filter-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 500;
  min-height: 44px;
}
.filter-btn:hover { border-color: var(--color-accent); }
.filter-btn[aria-pressed="true"] { background: var(--color-primary); color: var(--white); border-color: var(--color-primary); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 28, 0.92);
  padding: var(--space-6);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(90vw, 1100px); max-height: 82vh; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: var(--space-6); }
.lightbox-next { right: var(--space-6); }
.lightbox-caption {
  position: absolute;
  bottom: var(--space-6);
  left: 0; right: 0;
  text-align: center;
  color: var(--gray-200);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.stars { display: flex; gap: 2px; color: var(--sky-500); margin-bottom: var(--space-4); }
.stars .icon { width: 18px; height: 18px; }
.testimonial-card blockquote { font-size: var(--text-lg); color: var(--color-text); }
.testimonial-author { margin-top: var(--space-6); display: flex; flex-direction: column; }
.testimonial-author strong { font-size: var(--text-sm); }
.testimonial-author span { font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); }

/* ---- Process steps ---- */
.steps { counter-reset: step; display: grid; gap: var(--space-8); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: var(--space-12); }
.step > h3 { margin-top: var(--space-1); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--sky-200);
  -webkit-text-stroke: 1px var(--color-accent-hover);
}
.section:not(.section-dark) .step::before,
section:not(.section-dark) .step::before { color: var(--sky-50); -webkit-text-stroke: 1.5px var(--color-accent); }
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- CTA band ---- */
.cta-band {
  background: var(--color-primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -140px; top: -160px;
  background: radial-gradient(circle, var(--sky-500) 0%, transparent 70%);
  opacity: 0.25;
}
@media (min-width: 768px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: var(--space-16); }
}
.cta-band h2 { position: relative; }
.cta-band p { position: relative; color: var(--gray-200); margin-top: var(--space-2); }
.cta-band .hero-actions { position: relative; margin-top: 0; flex-shrink: 0; }

/* ---- Forms ---- */
.form-grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; display: grid; gap: var(--space-5); } }
.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}
.field .required { color: var(--error); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: var(--text-base);
  min-height: 48px;
  transition: border-color var(--duration) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-accent);
  outline: 3px solid rgba(47,151,212,0.25);
  outline-offset: 0;
}
.field-hint { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.field-error { font-size: var(--text-xs); color: var(--error); margin-top: var(--space-1); display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field.has-error .field-error { display: block; }
.form-note {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--sky-50);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--ink-700);
}
.form-note .icon { color: var(--color-accent-hover); flex-shrink: 0; margin-top: 2px; }
.form-success {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: #EAF6EE;
  border: 1px solid #BEE4CB;
  border-radius: var(--radius-md);
  color: #0E5C31;
}
.form-success.is-visible { display: flex; }
.form-success .icon { color: var(--success); flex-shrink: 0; }

/* ---- Info cards (contact page) ---- */
.info-list { display: grid; gap: var(--space-5); }
.info-row { display: flex; gap: var(--space-4); align-items: flex-start; }
.info-row .card-icon { margin-bottom: 0; flex-shrink: 0; }
.info-row h3 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.info-row p, .info-row a { color: var(--color-text-muted); font-size: var(--text-sm); }
.info-row a:hover { color: var(--color-accent-hover); }

/* ---- Service area list ---- */
.suburb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2) var(--space-6); }
@media (min-width: 640px) { .suburb-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .suburb-grid { grid-template-columns: repeat(4, 1fr); } }
.suburb-grid li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); padding-block: var(--space-1); }
.suburb-grid .icon { width: 16px; height: 16px; color: var(--color-accent); }

/* ---- Values / checklist ---- */
.check-list { display: grid; gap: var(--space-4); }
.check-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-item .icon {
  color: var(--success);
  background: #EAF6EE;
  border-radius: 50%;
  padding: 4px;
  width: 24px; height: 24px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.site-footer { background: var(--ink-900); color: var(--gray-200); padding-block: var(--space-16) var(--space-8); }
.footer-grid { display: grid; gap: var(--space-12); grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand img { height: 36px; width: auto; flex-shrink: 0; }  /* width:auto is load-bearing: as a flex item with only height set,
     flex-basis comes from the intrinsic width and the logo stretches. */
.footer-brand span { font-weight: 700; color: var(--white); font-size: var(--text-lg); }
.footer-col h3 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-200); margin-bottom: var(--space-4); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a:hover { color: var(--white); }
.footer-col p { font-size: var(--text-sm); }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.footer-social a:hover { background: var(--color-accent); }
.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--gray-400);
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom a:hover { color: var(--white); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0 !important; }
.flow > * + * { margin-top: var(--space-4); }

/* ==========================================================================
   Fence estimator (calculator.html)
   ========================================================================== */
.calc-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .calc-grid { grid-template-columns: 1.5fr 1fr; gap: var(--space-12); } }

.calc-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.calc-step { padding-block: var(--space-6); border-top: 1px solid var(--color-border); }
.calc-step:first-of-type { border-top: 0; padding-top: 0; }
.calc-step > h3 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

/* Fence type cards */
.type-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 560px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
.type-card { position: relative; display: block; cursor: pointer; }
.type-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.type-card span.box {
  display: block;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  min-height: 72px;
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.type-card:hover span.box { border-color: var(--color-accent); }
.type-card input:checked + span.box {
  border-color: var(--color-accent);
  background: var(--sky-50);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}
.type-card input:focus-visible + span.box { outline: 3px solid var(--sky-500); outline-offset: 2px; }
.type-card strong { display: block; font-size: var(--text-sm); }
.type-card em { display: block; font-style: normal; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }

/* Pills (height) */
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.opt-pill { position: relative; }
.opt-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-pill span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding-inline: var(--space-5);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-sm); font-weight: 500;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.opt-pill:hover span { border-color: var(--color-accent); }
.opt-pill input:checked + span { background: var(--color-primary); color: var(--white); border-color: var(--color-primary); }
.opt-pill input:focus-visible + span { outline: 3px solid var(--sky-500); outline-offset: 2px; }

/* Gates */
.gate-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); }
.gate-row label { font-size: var(--text-sm); font-weight: 500; }
.gate-price { color: var(--color-text-muted); font-weight: 400; font-family: var(--font-mono); font-size: var(--text-xs); }
.gate-row input { width: 84px; min-height: 44px; text-align: center; padding: var(--space-2); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); }

/* Length + checkboxes */
.length-field { display: flex; align-items: center; gap: var(--space-3); max-width: 260px; }
.length-field input { flex: 1; min-height: 48px; padding: var(--space-3) var(--space-4); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-base); }
.length-field .unit { font-family: var(--font-mono); color: var(--color-text-muted); }
.check-row { display: flex; align-items: flex-start; gap: var(--space-3); padding-block: var(--space-2); min-height: 44px; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--color-accent); }
.check-row label { font-size: var(--text-sm); }
.check-row label em { display: block; font-style: normal; font-size: var(--text-xs); color: var(--color-text-muted); }

/* Run estimate readout */
.run-readout {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
}
.run-readout .label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.run-readout .value { font-size: var(--text-2xl); font-weight: 700; font-family: var(--font-mono); color: var(--color-primary); }
.run-readout .note { font-size: var(--text-xs); color: var(--color-text-muted); width: 100%; }

/* Estimate panel */
.estimate-panel { position: sticky; top: 96px; }
.estimate-list { display: grid; gap: var(--space-3); margin-block: var(--space-5); }
.estimate-list .empty { font-size: var(--text-sm); color: var(--color-text-muted); }
/* Narrow: description on its own row so it isn't squeezed into a sliver.
   Wider: price sits inline to the right. */
.run-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'desc remove' 'price price';
  gap: var(--space-2) var(--space-3);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.run-item > div:first-child { grid-area: desc; }
.run-item .run-price { grid-area: price; }
.run-item .run-remove { grid-area: remove; }
@media (min-width: 480px) {
  .run-item {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: 'desc price remove';
  }
  .run-item .run-price { text-align: right; }
}
.run-item strong { display: block; font-size: var(--text-sm); }
.run-item span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); }
.run-price { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.run-remove { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--color-text-muted); }
.run-remove:hover { background: var(--gray-100); color: var(--error); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-5); border-top: 2px solid var(--color-border); }
.total-row .label { font-size: var(--text-sm); font-weight: 600; }
.total-row .label em { display: block; font-style: normal; font-weight: 400; font-size: var(--text-xs); color: var(--color-text-muted); }
.total-row .amount { font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 700; color: var(--color-primary); text-align: right; }

#summary-text {
  width: 100%; min-height: 150px; margin-top: var(--space-4);
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.6;
  padding: var(--space-4); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--gray-100); resize: vertical;
}
.copy-status { font-size: var(--text-xs); color: var(--success); margin-top: var(--space-3); min-height: 1.2em; }
.calc-disclaimer { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-6); }

/* ==========================================================================
   Reviews / testimonials
   ========================================================================== */
.rating-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
}
.rating-badge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  min-height: 48px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
a.rating-badge:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.rating-badge .score { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-lg); color: var(--color-primary); }
.rating-badge .meta { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.3; }
.rating-badge .meta strong { display: block; color: var(--color-text); font-size: var(--text-sm); font-weight: 600; }
/* Stars carry the rating, so they are a meaningful graphic and need 3:1 (WCAG 1.4.11).
   A brighter gold (#E8A317) only reaches 2.17:1 on white; this one measures 3.44:1 on
   white and 3.19:1 on --color-bg-muted. */
.stars { display: inline-flex; gap: 1px; color: #BD7D0A; }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.testimonial-card .stars { margin-bottom: var(--space-4); }
.testimonial-card blockquote { font-size: var(--text-base); line-height: 1.7; }
.testimonial-card blockquote::before { content: '\201C'; }
.testimonial-card blockquote::after  { content: '\201D'; }
/* equal-height cards: pin the attribution to the bottom regardless of quote length */
.testimonial-card { display: flex; flex-direction: column; }
.testimonial-card blockquote { flex: 1; }
.testimonial-card .testimonial-author { margin-top: auto; padding-top: var(--space-6); }

/* ==========================================================================
   Blog — index cards and article typography
   ========================================================================== */
.post-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: transparent; }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--gray-100); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: var(--space-6); display: flex; flex-direction: column; flex: 1; }
.post-card time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); }
.post-card h3 { margin: var(--space-2) 0 var(--space-3); font-size: var(--text-lg); }
.post-card h3 a { color: var(--color-text); }
.post-card h3 a:hover { color: var(--color-accent-hover); }
.post-card p { font-size: var(--text-sm); color: var(--color-text-muted); flex: 1; }
.post-card .more {
  margin-top: var(--space-4); font-weight: 600; font-size: var(--text-sm);
  color: var(--color-accent-hover); display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: 44px;
}
/* whole card clickable without nesting links */
.post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.post-card { position: relative; }

/* ---- Article ---- */
.article-hero { max-width: 48rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-4); }
.article-meta time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--sky-200); }
.article-figure { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-12); }
.article-figure img { width: 100%; height: auto; display: block; }
.article-figure figcaption { font-size: var(--text-xs); color: var(--color-text-muted); padding-top: var(--space-3); }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: var(--space-6); }
.prose p { font-size: var(--text-lg); line-height: 1.75; color: var(--ink-700); max-width: none; }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--space-12); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--space-8); }
.prose strong { color: var(--color-text); font-weight: 600; }
.prose a { color: var(--color-accent-hover); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--color-primary); }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li { font-size: var(--text-lg); line-height: 1.75; color: var(--ink-700); margin-top: var(--space-2); }
.prose li::marker { color: var(--color-accent); }

.article-cta {
  max-width: 42rem; margin-top: var(--space-16);
  padding: var(--space-8); border-radius: var(--radius-lg);
  background: var(--color-bg-muted); border: 1px solid var(--color-border);
}
.article-cta h2 { font-size: var(--text-xl); }
.article-cta p { margin-top: var(--space-2); color: var(--color-text-muted); }
.article-nav { max-width: 42rem; margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }
.article-nav a { font-weight: 600; font-size: var(--text-sm); color: var(--color-accent-hover); display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }

/* Seven nav items + brand + phone + CTA needs ~1165px at full spacing.
   Between the nav breakpoint and 1280px, tighten so everything still fits
   rather than dropping a laptop-width user back to the hamburger. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .main-nav ul { gap: var(--space-4); }
  .main-nav a { font-size: var(--text-xs); }
  .brand-tagline { display: none; }
  .brand img { height: 38px; }
  .header-phone { font-size: var(--text-xs); padding-inline: var(--space-1); }
  .header-cta { gap: var(--space-3); }
  .header-cta .btn { padding-inline: var(--space-4); }
}
/* the number must never wrap mid-digits */
.header-phone { white-space: nowrap; }

/* Breadcrumb links were 33×17 — under the 24×24 WCAG 2.2 target minimum.
   Extra line-height + vertical padding lifts them over it without changing the look. */
.breadcrumb { line-height: 2; }
.breadcrumb a { display: inline-block; padding-block: 4px; }

/* Footer nav links were 20px tall. They technically pass WCAG 2.2 via the spacing
   exception, but they're fiddly on a phone — pad them to a comfortable target. */
.footer-col ul a { display: inline-block; padding-block: 4px; }

/* Gallery captions were hover-only, so on a touch device they never appeared at all.
   Show them permanently where there's no hover. The backdrop holds 0.80 alpha behind
   the text itself — white on that is 7.6:1 even over a pure-white photo. */
@media (hover: none) {
  .gallery-item figcaption {
    opacity: 1;
    transform: none;
    background: linear-gradient(0deg,
      rgba(35,42,48,0.92) 0%,
      rgba(35,42,48,0.86) 70%,
      rgba(35,42,48,0) 100%);
    padding-top: var(--space-8);
  }
}

/* The header is a flex row, so the toggle was being shrunk from its declared 44px
   down to ~38px at 375px. It's the primary mobile nav control — don't let it compress. */
.nav-toggle { flex-shrink: 0; }

/* Phone / email / social links on the contact page were 19px tall — these are the
   primary actions on the page, so make them a proper target. */
.info-row a { display: inline-block; padding-block: 6px; min-height: 32px; }

/* ==========================================================================
   Landing pages (.lp-*) — used by /bunbury-fencing
   Scoped prefix so none of this can leak into the main site pages.
   ========================================================================== */

/* Minimal header: logo + phone + one CTA. No nav, so ad traffic has one job. */
.lp-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--color-border); }
.lp-header .header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-3); }
.lp-header .brand img { height: 40px; width: auto; flex-shrink: 0; }
.lp-header-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.lp-header-actions .header-phone { white-space: nowrap; }
/* Below 560px the phone number alone is enough — the sticky bar carries the CTA. */
@media (max-width: 559px) { .lp-header-actions .btn { display: none; } }
/* At phone widths the logo + wordmark + phone number will not fit on one row
   (measured 450px of content in a 375px viewport). Drop the wordmark; the logo
   still identifies the brand and the phone number is the more useful element. */
@media (max-width: 559px) {
  .lp-header .brand > span { display: none; }
  .lp-header .brand img { height: 36px; }
  .lp-header .header-inner { gap: var(--space-3); }
}

/* Sticky quote bar — mobile only. The page is built for phone-first ad traffic. */
.lp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(35, 42, 48, 0.10);
}
.lp-sticky .btn { flex: 1; min-height: 48px; }
.lp-sticky .btn-secondary { flex: 0 0 auto; padding-inline: var(--space-6); }
@media (min-width: 768px) { .lp-sticky { display: none; } }
/* Stop the bar covering the end of the page. */
@media (max-width: 767px) { body.lp-page { padding-bottom: 84px; } }

/* Problem/solution pairs */
.lp-problem { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .lp-problem { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); } }
.lp-problem-card { border: 1px solid var(--color-border); border-left: 3px solid var(--sky-200); border-radius: var(--radius-md); padding: var(--space-6); background: var(--white); }
.lp-problem-card h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.lp-problem-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* Project photo grid */
.lp-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .lp-projects { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }
.lp-projects figure { margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--gray-100); }
.lp-projects img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.lp-projects figcaption { font-size: var(--text-xs); color: var(--color-text-muted); padding: var(--space-2) var(--space-1) 0; }

/* "What to send us" checklist */
.lp-ask { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .lp-ask { grid-template-columns: repeat(2, 1fr); gap: var(--space-3) var(--space-6); } }
.lp-ask li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-sm); }
.lp-ask .icon { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; margin-top: 3px; }

/* ==========================================================================
   Quote wizard (.qw-*) — used by /quote/
   Scoped prefix. Reuses the existing tokens, buttons, radius and type scale.
   ========================================================================== */

.qw { max-width: 46rem; margin-inline: auto; }

/* Progress */
.qw-progress { margin-bottom: var(--space-8); }
.qw-progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-3); }
.qw-progress-step { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.qw-progress-pct { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-accent); }
.qw-progress-track { height: 6px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.qw-progress-bar { height: 100%; width: 0%; border-radius: 999px; background: var(--color-accent); transition: width 240ms ease; }
@media (prefers-reduced-motion: reduce) { .qw-progress-bar { transition: none; } }

/* Step */
.qw-step { animation: qw-in 200ms ease; }
@keyframes qw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qw-step { animation: none; } }
.qw-step h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.qw-step .qw-help { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* Answer cards — real radio/checkbox inputs, visually styled */
.qw-options { display: grid; gap: var(--space-3); }
@media (min-width: 560px) { .qw-options.qw-cols-2 { grid-template-columns: repeat(2, 1fr); } }
.qw-opt { position: relative; display: block; cursor: pointer; }
.qw-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.qw-opt > .qw-box {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: 60px; padding: var(--space-4) var(--space-5);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--white); transition: border-color 120ms ease, background 120ms ease;
}
.qw-opt .qw-opt-title { font-weight: 600; display: block; }
.qw-opt .qw-opt-sub { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }
.qw-opt input:checked + .qw-box { border-color: var(--color-accent); background: var(--color-bg-muted); box-shadow: inset 0 0 0 1px var(--color-accent); }
.qw-opt input:focus-visible + .qw-box { outline: 3px solid var(--color-accent); outline-offset: 2px; }
@media (hover: hover) { .qw-opt:hover > .qw-box { border-color: var(--color-accent); } }
.qw-opt-thumb { width: 72px; height: 54px; flex-shrink: 0; border-radius: 6px; object-fit: cover; background: var(--gray-100); }

/* Text / number / select fields */
.qw-field { display: block; margin-bottom: var(--space-6); }
.qw-field > label, .qw-legend { display: block; font-weight: 600; margin-bottom: var(--space-2); }
.qw-field input, .qw-field select, .qw-field textarea {
  width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  font: inherit; color: var(--color-text); background: var(--white);
}
.qw-field textarea { min-height: 110px; resize: vertical; }
/* `.qw-field input` (0,1,1) out-specifies `.visually-hidden` (0,1,0), which was
   forcing the hidden file input back to full width and overflowing the page at
   375px. Re-assert the hiding here rather than touching the shared utility. */
.qw-field input.visually-hidden,
.qw-drop input[type="file"].visually-hidden {
  width: 1px; height: 1px; min-height: 0; padding: 0; border: 0;
}
.qw-field input:focus-visible, .qw-field select:focus-visible, .qw-field textarea:focus-visible {
  outline: 3px solid var(--color-accent); outline-offset: 1px; border-color: var(--color-accent);
}
.qw-field .qw-hint { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }
.qw-suffix { position: relative; }
.qw-suffix input { padding-right: 4.5rem; }
.qw-suffix span { position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: var(--text-sm); }
fieldset.qw-field { border: 0; padding: 0; margin-inline: 0; }

/* Errors */
.qw-error { color: #B3261E; font-size: var(--text-sm); margin-top: var(--space-2); display: flex; gap: var(--space-2); align-items: flex-start; }
.qw-invalid input, .qw-invalid select, .qw-invalid textarea { border-color: #B3261E; }
.qw-banner { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-6); font-size: var(--text-sm); }
.qw-banner-error { background: #FDECEA; border: 1px solid #F3B9B3; color: #7A1B14; }
.qw-banner-info { background: var(--color-bg-muted); border: 1px solid var(--sky-200); }

/* Photo uploader */
.qw-drop { border: 1.5px dashed var(--color-border); border-radius: var(--radius-md); padding: var(--space-8) var(--space-5); text-align: center; background: var(--white); }
.qw-drop.is-over { border-color: var(--color-accent); background: var(--color-bg-muted); }
.qw-shots { display: grid; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.qw-shots li { display: flex; gap: var(--space-3); align-items: center; font-size: var(--text-sm); color: var(--color-text-muted); }
.qw-shots .icon { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }
.qw-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-5); }
@media (min-width: 560px) { .qw-thumbs { grid-template-columns: repeat(4, 1fr); } }
.qw-thumb { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--gray-100); aspect-ratio: 1; }
.qw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qw-thumb button {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px;
  border-radius: 50%; border: 0; background: rgba(35,42,48,0.82); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.qw-thumb button:focus-visible { outline: 3px solid var(--white); outline-offset: 1px; }

/* Review list */
.qw-review { display: grid; gap: 0; margin: 0 0 var(--space-6); padding: 0; }
.qw-review div { display: flex; justify-content: space-between; gap: var(--space-6); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.qw-review dt { color: var(--color-text-muted); font-size: var(--text-sm); }
.qw-review dd { margin: 0; font-weight: 600; text-align: right; }

/* Nav */
.qw-nav { display: flex; gap: var(--space-3); margin-top: var(--space-8); }
.qw-nav .qw-next { flex: 1; }
.qw-nav .btn { min-height: 52px; }
.qw-busy { display: inline-flex; align-items: center; gap: var(--space-2); }
.qw-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: qw-spin 700ms linear infinite; }
@keyframes qw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qw-spinner { animation-duration: 2.4s; } }

@media (max-width: 420px) {
  .qw-opt > .qw-box { padding: var(--space-4); gap: var(--space-3); }
  .qw-opt-thumb { width: 56px; height: 44px; }
  .qw-nav { flex-direction: column-reverse; }
  .qw-nav .btn { width: 100%; }
}
