/* Shared spacing contract. Loaded after each route's components.
   Keep colours and layout ownership in the existing identity/component files. */
:root {
  --t-hero-page: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --t-hero: var(--t-hero-page);
  --t-title-l: clamp(1.625rem, 1.25rem + 1.875vw, 2.5rem);
  --t-title: var(--t-title-l);
  --t-title-s: clamp(1.375rem, 1.125rem + 1.25vw, 1.875rem);
  --t-card: clamp(1.125rem, 1.0625rem + .3125vw, 1.25rem);
  --t-body: 1rem;
  --t-lede: clamp(1rem, .9583rem + .2083vw, 1.125rem);
  --t-small: .875rem;
  --t-micro: .8125rem;
  --lh-display: 1.15;
  --lh-title: 1.25;
  --lh-card: 1.35;
  --lh-body: 1.6;
  --lh-small: 1.5;
  --sec-title: var(--t-title-l);
  --sec-intro: var(--t-lede);
  --sec-eyebrow: .75rem;
  --card-title: var(--t-card);
  --card-body: var(--t-body);
  --gutter: clamp(1rem, .5rem + 2vw, 2.5rem);
  --rhythm: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  --rhythm-lg: clamp(3rem, 2rem + 5vw, 6rem);
  --section-gap: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  --card-padding: clamp(1rem, .75rem + 1.25vw, 1.5rem);
}
body .prow__actions { grid-column: 1 / -1; justify-content: flex-end; gap: 1rem; }
body .prow__repair { min-width: 0; align-items: flex-start; }
body .prow__price { align-self: start; white-space: nowrap; }
body .pgroup__head { flex-wrap: wrap; gap: .75rem; }
body .pgroup__head > div { min-width: 0; flex: 1 1 12rem; }
body .pgroup__from { white-space: normal; }
body .pgroups__toolbar { position: relative; top: auto; }
body :is(.btn, .prow__book) svg { flex-shrink: 0; }
body :is(input, select, textarea) { scroll-margin-top: calc(var(--header-h) + 1rem); }
body textarea { min-height: 9rem; resize: vertical; }
body .storecard__rating { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 44px; margin: .5rem 0 0; color: var(--ink); text-decoration: none; }
body .storecard__rating > svg { flex: 0 0 20px; width: 20px; height: 20px; }
body .storecard__rating-score { white-space: nowrap; }
body .storecard__rating-score > span[aria-hidden] { color: #996000; }
body .storecard__rating:hover { text-decoration: underline; text-underline-offset: 4px; }
body .storecard__rating-date { margin: 0 0 .75rem; color: var(--text-soft); }
body .page :is(h1, .hero__title, .store-locator-intro .display-l) {
  text-wrap: balance;
  overflow-wrap: break-word;
}
body .page :is(.opener h2, .opener__title, .why__title, .reviews__title, .help-band__copy h2, .brand-seo__copy h2, .brand-seo__faq h2, .cta__title) {
  max-width: 100%;
  text-wrap: balance;
}
body .page .prose { max-width: var(--container-read); }
body .page .prose :is(p, li) { overflow-wrap: break-word; }
body .page .prose h2 { margin-top: var(--s7); }
body .page .prose :is(p, ul, ol) + :is(p, ul, ol) { margin-top: var(--s4); }

body :is(.section, .why, .home-stores, .reviews-section, .faq-section, .brand-seo, .help-band) { padding-block: var(--rhythm); }
body :is(.hero--compact, .hero--editorial, .repair-hub, .branch-opening) { padding-block: var(--section-gap); }
body .opener { margin-bottom: var(--section-gap); gap: var(--s4) var(--s6); }
body :is(.grid, .split, .hero__inner, .field, .form__row, .enquiry-form, .card, .panel, .stack, .cat__col, .cat__detail) { min-width: 0; }
body :is(.grid, .split, .hero__inner, .form__row) > * { min-width: 0; }
body :is(.grid--2, .grid--3) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
body :is(.form, .enquiry-form, .field, .adm__field, .cat__fields) :is(input, select, textarea) { min-width: 0; max-width: 100%; }
body :is(.btn, .storecard__cta) { min-height: 48px; white-space: normal; text-align: center; }
body :is(.pill-nav a, .opening__faults a, .review__more, .storecard__directions, .storecard__links a) { min-height: 44px; }
body :is(.card, .panel, .artcard__body) { padding: var(--card-padding); }
body :is(.hero__lede, .subhead, .lede, .prose, .footer__blurb) { overflow-wrap: break-word; }
body :is(.pfilter, .pill-nav, .reviews__list, .opening__faults) { min-width: 0; max-width: 100%; }
body :is(.cat__repairs) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }

/* Transaction screens use the same body scale, with a quieter title hierarchy. */
body .booking-shell .fault-row__text { min-width: 0; }
body .booking-shell .fault-row__price { white-space: normal; text-align: right; }
body .booking-shell .repair-options { min-width: 0; }

@media (max-width: 639px) {
  body :is(.split, .hero__inner) { gap: var(--s6); }
  body .page .hero--editorial .hero__title { max-width: 100%; }
  body #business-form { padding: var(--s4); }
  body :is(.field, .form__row, .cat__option) { min-width: 0; }
  body .cat__option { grid-template-columns: minmax(0, 1fr) 5rem auto; }
  body .adm__listbar > div { flex-wrap: wrap; }
  body .adm__table thead { display: block; }
  body .footer__cta { gap: var(--s6); }
  body .booking-shell .fault-row,
  body .booking-shell .repair-option { gap: var(--s2); padding-inline: var(--s3); }
  body .booking-shell .fault-row__price { max-width: 6.5rem; }
}

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

/* Decorative section labels are reserved for page heroes. Functional form,
   navigation and table labels are deliberately not included here. */
body :is(.eyebrow, .opener__eyebrow, .reviews__eyebrow, .brands__label, .pricepromo__context, .advice-topics__title):not(:is(.hero, .opening, .document-hero, .repair-hub__intro, .store-locator-intro, .branch-opening, .adm__head) *) { display: none; }

/* Approved reference: forest introduction beside four white benefit cards. */
body .footer__arcs { display: none; }
body .footer__inner { width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; padding-block: 48px 24px; }
body .footer__top { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 0 0 40px; }
body .footer__cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 360px; max-width: 100%; }
body .footer__cta .btn { min-height: 48px; margin: 0; padding: 12px 18px; }
body .footer__cta .btn + .btn { margin-top: 0; }
@media (max-width: 399px) { body .footer__cta { grid-template-columns: minmax(0, 1fr); } }
body .footer__cta-lead { grid-column: 1 / -1; margin: 0 0 4px; }
body .footer__cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 40px; }
body .footer__col--brand { max-width: 340px; }
body .footer__heading { margin: 0 0 16px; text-transform: none; }
body .footer__links { display: grid; gap: 4px; }
body .footer__links a { display: inline-flex; align-items: center; min-height: 36px; }
body .footer__blurb { margin: 20px 0 12px; }
body .footer__contacts { display: grid; gap: 4px; margin-top: 16px; }
body .footer__contacts a { min-height: 36px; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
body .footer__bar { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; padding-top: 24px; }
body .footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; grid-column: 1 / -1; grid-row: 1; }
body .footer__legal a { display: inline-flex; min-height: 36px; align-items: center; }
body .footer__copy { margin: 0; }
body .footer__pay { grid-column: 1 / -1; margin: 0; }
@media (max-width: 899px) { body .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
@media (max-width: 599px) { body .footer__top { flex-direction: column; align-items: stretch; } body .footer__cta { width: 100%; } body .footer__cols { gap: 28px 20px; } body .footer__col--brand { grid-column: 1 / -1; max-width: none; } body .footer__bar { grid-template-columns: minmax(0, 1fr); gap: 16px; } body .footer__shop { justify-self: start; } body .footer__legal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; } }
body .why--split .why__inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr); gap: 16px; }
body .why--split .why__head { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 36px); border-radius: 16px; background: var(--brand-deep); color: white; }
body .page .why--split .why__title { max-width: 340px; margin: 0; color: white; }
body .why--split .why__sub { margin: 20px 0 0; color: #e1e9e4; }
body .why--split .why__cta { margin-top: 0; padding-top: 56px; }
body .why--split .why__cta .btn { background: var(--brand-bright); color: var(--brand-deep); border-color: var(--brand-bright); }
body .why--split .why__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
body .why--split .why__item { display: flex; flex-direction: column; align-items: flex-start; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: none; transform: none; }
body .why--split .why__icon { width: 72px; height: 72px; margin: 0 0 16px; background: var(--sage); color: var(--brand-deep); border-radius: 12px; }
body .why--split .why__item-title { margin: 0; }
body .why--split .why__item-body { margin: 10px 0 0; color: var(--text-soft); }
body .why--split .why__item-note { margin: 14px 0 0; color: var(--text-soft); }
@media (max-width: 899px) { body .why--split .why__inner { grid-template-columns: minmax(0, 1fr); } body .why--split .why__title { max-width: none; } body .why--split .why__cta { padding-top: 24px; } }
@media (max-width: 539px) { body .why--split .why__grid { grid-template-columns: minmax(0, 1fr); } body .why--split .why__item { padding: 24px; } }

/* Modern benefits: one light panel with a responsive two-column card grid. */
body .pill-nav { display: flex; flex-wrap: wrap; gap: var(--s2); margin-inline: 0; padding-inline: 0; overflow: visible; }
body .pill-nav > li { display: flex; flex: 0 0 auto; min-width: 0; }
body .pill-nav a { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s4); white-space: nowrap; }
body .pill-nav a > span { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 1.5em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 639px) { body .pill-nav { gap: var(--s2); } body .pill-nav a { padding-inline: var(--s3); } }
@media (max-width: 999px) { }
@media (max-width: 599px) {
}
