/* Banbridge Tyres & Auto Repairs. The one stylesheet. Tokens and components: design/DESIGN.md */

@font-face { font-family: Archivo; src: url(fonts/archivo-400.woff2?v=129074ba42) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url(fonts/archivo-600.woff2?v=c32c722286) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url(fonts/archivo-expanded-500.woff2?v=ca99be3fc9) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo Semi"; src: url(fonts/archivo-semiexpanded-500.woff2?v=5265c8cd3a) format("woff2"); font-weight: 500; font-display: swap; }
/* Arial sized to match, so the swap barely moves the text */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"); size-adjust: 98%; }
@font-face { font-family: "Expanded Fallback"; src: local("Arial"); size-adjust: 116%; }

:root {
  --rubber: #1e2023;
  --rubber-lift: #33363a;
  --graphite: #43464a;
  --alloy: #bdbbb3;
  --stone: #e9e5de; /* The light section ground: a clear step from White, so a change of band reads as deliberate */
  --stone-line: #aeaa9f;
  --paper: #f6f4ef; /* Text and buttons on dark grounds. Not a section ground */
  --white: #fff;
  --red: #e30615;
  --amber: #d98200;
  --on-rubber-muted: #c3c6c8;
  --on-rubber-line: #54575c;

  /* What changes on a dark ground. .on-dark surfaces below swap these. */
  --focus: var(--rubber);
  --line: var(--alloy);
  --ill-face: #f1f2f0;
  --link-line: var(--graphite);
  --muted: var(--graphite);

  --font: Archivo, "Archivo Fallback", Arial, sans-serif;
  --display: "Archivo Expanded", "Expanded Fallback", Arial, sans-serif;
  --semi: "Archivo Semi", "Archivo Fallback", Arial, sans-serif;

  --t-small: .875rem;
  --t-nav: .9375rem;
  --t-body: 1.0625rem;
  --t-h3: 1.3125rem;
  --t-lead: 1.1875rem; /* A section's first paragraph, and nothing else */
  --t-h2: clamp(1.625rem, 1.45rem + .7vw, 2.125rem);
  --t-pull: clamp(1.5rem, 1.1rem + 1.7vw, 2rem); /* Short statements only, of 12 words or fewer, and never bigger than a section heading */
  --t-h1-page: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
  --t-h1: clamp(2.5rem, 1.75rem + 3.1vw, 4.75rem);

  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4rem;
  --s-8: 6rem;
  --s-9: 8rem;

  --gutter: var(--s-4);
  --gap: var(--s-4);
  --header: 4.5rem;
  --logo-h: 3rem; /* 48px */
  --bar: 3.5rem;
  --content: 82rem;
  --section: var(--s-7); /* Every band's padding, top and bottom */
  --tile-gap: var(--s-2); /* Between photo tiles */
  --measure: 32rem; /* Paragraphs and callouts: about 65 to 70 characters at 18px. Below 1024px, lists too */

  --m-fast: 160ms ease-out;
  --m-menu: 180ms ease-out;
  --m-bar: 200ms ease-out;
  --m-row: 200ms ease-out;
  --m-settle: 900ms cubic-bezier(.16, 1, .3, 1);
  --m-draw: 850ms cubic-bezier(.45, 0, .2, 1);
  --m-zoom: 450ms cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 40rem) {
  :root { --tile-gap: var(--s-3); }
}
@media (min-width: 64rem) {
  :root { --gutter: var(--s-7); --section: var(--s-8); --tile-gap: var(--gap); --t-body: 1.125rem; --t-lead: 1.25rem; }
}
/* One page title size across phones, which keeps a two-word title like Wheel alignment on one line from 375px */
@media (max-width: 26rem) {
  :root { --t-h1-page: 2.16rem; }
}

@media (min-width: 56rem) {
  :root { --header: 6rem; --logo-h: 4.5rem; } /* 72px */
}

.site-header, .site-footer, .nav, .hero--rubber, .decoder, .ground-dark, .hours-pop, .action-bar, .viewer {
  --focus: var(--paper);
  --line: var(--on-rubber-line);
  --ill-face: #26282c;
  --link-line: var(--on-rubber-muted);
  --muted: var(--on-rubber-muted);
}

/* The three grounds. Each block on a page picks one: no two neighbours match and no two dark bands touch (tests/illustrations.mjs). */
.ground-dark { background: var(--rubber); color: var(--paper); }
.ground-stone, .hero:not(.hero--page) { background: var(--stone); --line: var(--stone-line); --ill-face: var(--stone); }
.ground-white { background: var(--white); --ill-face: var(--white); }

*, *::before, *::after { box-sizing: border-box; }
/* Rubber on the canvas, so pulling the page past its top or bottom shows the same colour as the header and footer, with no gap */
html { background: var(--rubber); -webkit-text-size-adjust: 100%; hanging-punctuation: first allow-end last; scroll-behavior: smooth; scroll-padding-top: var(--header); }
html:has(#menu:popover-open) { overflow: hidden; }
body { margin: 0; background: var(--white); color: var(--rubber); font: 400 var(--t-body)/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, address { margin: 0; padding: 0; font-style: normal; }
ul { list-style: none; }
p { text-wrap: pretty; }
/* Rows, captions and questions are short, so they balance: no word is left alone on the last line */
li, figcaption, .row-label { text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
h2, h3 { font-family: var(--semi); font-weight: 500; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: 1.2; letter-spacing: -.01em; }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -.01em; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* One focus ring everywhere: solid, clear of the element, and it flips on dark grounds */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: var(--gutter); top: var(--s-2); z-index: 30; padding: var(--s-2) var(--s-3); background: var(--paper); color: var(--rubber); --focus: var(--red); transform: translateY(-200%); }
.skip-link:focus-visible { transform: none; }

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

/* Links */
/* The hairline is always there. The red one draws in over it, left to right. */
.text-link {
  text-decoration: none; padding-bottom: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: linear-gradient(var(--red), var(--red)), linear-gradient(var(--link-line), var(--link-line));
  background-position: 0 100%, 0 100%; background-repeat: no-repeat; background-size: 0 1px, 100% 1px;
  transition: background-size var(--m-fast);
}
:where(html:not(.is-touch)) .text-link:hover, .text-link:focus-visible { background-size: 100% 1px, 100% 1px; }

/* A phone number never breaks across lines */
a[href^="tel:"], .call-number { white-space: nowrap; }

/* Button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3em; min-height: var(--s-6); padding: 0 var(--s-4); border-radius: 3px; background: var(--rubber); color: var(--paper); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--m-fast), transform 80ms ease-out; }
:where(html:not(.is-touch)) .btn:hover { background: var(--rubber-lift); }
.btn:active, .call-link:active, .action-bar a:active { transform: translateY(1px); }
.btn:active { background: #0f1012; }
.btn--secondary { background: transparent; color: var(--rubber); box-shadow: inset 0 0 0 1px var(--rubber); }
:where(html:not(.is-touch)) .btn--secondary:hover { background: rgb(30 32 35 / .08); }
.btn--secondary:active { background: var(--alloy); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-4); }
/* Call and Message us, wherever the two appear: {{callMessage}} in build.js. Below 1024px one row of two equal buttons, so the
   font arriving can't flip them onto two rows, and below 375px the call button says "Call us" so they still fit. */
.call-short { display: none; }
@media (max-width: 23.4rem) {
  .call-long { display: none; }
  .call-short { display: inline; }
}
@media (max-width: 63.99rem) {
  .btn { font-size: 1rem; }
  .actions--pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); align-items: stretch; width: 100%; max-width: 23rem; }
  .actions--pair .btn { padding-inline: var(--s-2); white-space: nowrap; }
}

@media (min-width: 64rem) {
  .btn { font-size: 1.0625rem; }
}

/* A safety note: clear but calm. A panel of the next ground, a rule down its side in the text colour and a bold first line. Never red: red
   marks the one accent in a drawing, and here it would only alarm. Square corners, like every panel. */
.callout { padding: var(--s-3) var(--s-4); background: var(--stone); border-left: 3px solid var(--rubber); }
.callout strong { display: block; margin-bottom: var(--s-1); font-weight: 600; }
.ground-stone .callout { background: var(--white); }
:is(.hero--rubber, .ground-dark) .callout { background: var(--rubber-lift); border-left-color: var(--paper); }

/* An icon link: the same 3px corners and hairline as the call link, at a full 48px target */
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: var(--s-6); height: var(--s-6); border: 1px solid currentColor; border-radius: 3px; text-decoration: none; transition: background-color var(--m-fast), color var(--m-fast); }
.icon-link svg { display: block; }
:where(html:not(.is-touch)) .icon-link:hover { background: var(--rubber); color: var(--paper); }
.site-footer .icon-link { border-color: var(--on-rubber-muted); }
:where(html:not(.is-touch)) .site-footer .icon-link:hover { background: var(--paper); color: var(--rubber); border-color: var(--paper); }

/* Header */
/* Solid Rubber at all times. Seamless with a dark hero at the top of the page; past 8px (bar.js) a 1px edge appears, so the page
   clearly passes under a solid bar. A box shadow, not a border, so the header's height never changes. */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--rubber); color: var(--paper); transition: box-shadow var(--m-fast); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--on-rubber-line); }
.bar { display: flex; align-items: center; gap: var(--s-4); height: var(--header); padding-inline: var(--gutter); max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; }
.logo { display: block; margin-right: auto; }
.logo img { width: auto; height: var(--logo-h); }
.call-link { display: inline-flex; align-items: center; gap: .3em; min-height: 2.5rem; padding-inline: var(--s-3); border: 1px solid var(--on-rubber-muted); border-radius: 3px; font-size: var(--t-nav); text-decoration: none; white-space: nowrap; transition: border-color var(--m-fast), background-color var(--m-fast); }
:where(html:not(.is-touch)) .call-link:hover { border-color: var(--paper); background: var(--rubber-lift); }
.call-number { display: none; }
.menu-toggle { font-size: var(--t-nav); min-height: 2.5rem; }

.nav { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0 var(--gutter); background: var(--rubber); color: var(--paper); opacity: 0; transition: opacity var(--m-menu), display var(--m-menu) allow-discrete, overlay var(--m-menu) allow-discrete; }
.nav:popover-open { opacity: 1; }
@starting-style { .nav:popover-open { opacity: 0; } }
.nav > ul { margin-top: var(--s-4); }
.nav > ul > li { border-bottom: 1px solid var(--line); }
.nav > ul > li > a { display: block; padding-block: var(--s-3); font-family: var(--semi); font-size: var(--t-h2); font-weight: 500; text-decoration: none; }
/* The current page, or on a service page the Services link and that service's own row */
.nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* Services and its list of service pages. bar.js shows the button and sets .is-open. In the menu it's a list under Services, closed
   each time the menu opens; from 896px a White panel under the header. The chevron is the hours button's. */
.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
.has-sub > a { flex: 1; }
.sub-toggle { display: flex; align-items: center; justify-content: center; flex: none; width: 3rem; height: 3rem; margin-right: -.5rem; border-radius: 3px; }
.sub-toggle[hidden] { display: none; }
.sub-toggle::before { content: ""; width: .6rem; height: .6rem; margin-top: -.3rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--m-fast), margin var(--m-fast); }
.sub-toggle[aria-expanded="true"]::before { margin-top: .3rem; transform: rotate(225deg); }
.sub { display: none; flex-basis: 100%; }
.has-sub.is-open .sub { display: block; }
.sub-list { padding: 0 0 var(--s-3) var(--s-3); }
/* At least 44px tall to tap, at the same size of type */
.sub-list a { display: flex; align-items: center; min-height: 2.75rem; padding-block: .5rem; font-size: 1.125rem; line-height: 1.4; text-decoration: none; }
.menu-close { display: flex; align-items: center; margin: var(--s-3) 0 var(--s-3) auto; } /* the same 40px as the Menu button, 16px clear of the edge so its focus ring shows */
.nav .call-link { margin-top: var(--s-5); }
.nav .call-number { display: inline; }
/* Without popover support the nav simply sits in the page */
@supports not selector(:popover-open) {
  .nav { position: static; height: auto; opacity: 1; }
  .bar { flex-wrap: wrap; height: auto; padding-block: var(--s-2); }
  .menu-toggle { display: none; }
}

@media (min-width: 56rem) {
  .call-number { display: inline; }
  .menu-toggle { display: none; }
  /* The nav fills the bar's height, so Services and its panel are one box from the top of the header to the panel's foot */
  .nav { display: flex; align-self: stretch; position: static; width: auto; height: auto; margin-right: auto; padding: 0; background: none; opacity: 1; overflow: visible; }
  .nav > ul { display: flex; gap: var(--s-5); margin: 0; }
  .nav > ul > li { display: flex; align-items: center; border: 0; }
  .nav > ul > li > a { padding-block: var(--s-2); font-family: var(--font); font-size: var(--t-nav); font-weight: 400; }
  :where(html:not(.is-touch)) .nav > ul > li > a:not([aria-current]):hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }

  .has-sub { position: relative; flex-wrap: nowrap; }
  .has-sub > a { flex: none; }
  .sub-toggle { position: relative; width: 1.5rem; height: 2.5rem; margin: 0 -.5rem 0 .125rem; color: var(--on-rubber-muted); transition: color var(--m-fast); }
  /* A 44px target for a small button: it reaches right, into the gap before About, so it never covers the Services link */
  .sub-toggle::after { content: ""; position: absolute; left: 0; top: 50%; width: 2.75rem; height: 2.75rem; translate: 0 -50%; }
  .sub-toggle::before { width: .4rem; height: .4rem; margin-top: -.2rem; border-width: 0 1px 1px 0; }
  .sub-toggle[aria-expanded="true"]::before { margin-top: .2rem; }
  :where(html:not(.is-touch)) .sub-toggle:hover, .sub-toggle[aria-expanded="true"] { color: var(--paper); }
  /* Hangs from the foot of the header, its words lined up with the word Services */
  .sub { position: absolute; top: 100%; left: calc(-1 * var(--s-4)); padding: var(--s-3) var(--s-4) var(--s-4); background: var(--white); color: var(--rubber); box-shadow: 0 1.5rem 3rem -1.5rem rgb(30 32 35 / .45); --focus: var(--rubber); opacity: 0; translate: 0 -.25rem; transition: opacity var(--m-fast), translate var(--m-fast), display var(--m-fast) allow-discrete; }
  .has-sub.is-open .sub { opacity: 1; translate: none; }
  @starting-style { .has-sub.is-open .sub { opacity: 0; translate: 0 -.25rem; } }
  .sub-list { padding: 0; }
  .sub-list--cols { columns: 2; column-gap: var(--s-6); width: 30rem; }
  .sub-list li { break-inside: avoid; border-bottom: 1px solid var(--stone); }
  /* build.js marks the last row of each column: the first column ends there, and no line hangs below either column */
  .sub-list--cols .col-end { break-after: column; }
  .sub-list .col-end { border-bottom: 0; }
  .sub-list a { min-height: 0; padding-block: .625rem; font-size: 1rem; line-height: 1.3; }
  :where(html:not(.is-touch)) .sub-list a:not([aria-current]):hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .3em; }
  .nav .call-link { display: none; }
  .logo { margin-right: var(--s-6); }
}

/* Hero: the wheel is the only large dark thing on the screen */
.hero { position: relative; overflow: hidden; display: flex; min-height: calc(100svh - var(--header)); }
/* Only positions the composition: the words start at its left and the tyre hangs off its right. It has no ground and crops nothing. */
.hero-frame { position: relative; display: flex; width: 100%; }
.hero-copy { position: relative; padding-block: var(--s-5) calc(70vw + var(--s-4)); }
.hero h1 { max-width: 13ch; font-size: var(--t-h1); line-height: 1.04; letter-spacing: -.025em; }
.lede { max-width: 34ch; margin-top: var(--s-3); color: var(--muted); }
.lede .text-link { color: inherit; }

/* Phones: the tyre is smaller than the screen is wide, its hub well in view, and the copy keeps clear of it */
.wheel { position: absolute; right: -30vw; bottom: -34vw; width: 104vw; aspect-ratio: 1; }
/* On phones the name reads from the tyre's lower left, so it's turned to bring it all into the framing. From 640px the
   tyre-sidewall-wide artwork already sits where it should, on the visible top left, every letter the right way up.
   rotate is its own property, so it adds to the scroll's turn and the load's settle rather than fighting them. */
.wheel-spin { position: absolute; inset: 0; rotate: 16deg; }
.wheel-art { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; animation: settle var(--m-settle) both; }
/* The centre sits just under the tyre's inner edge, so no seam shows */
.wheel-art--centre { inset: 21.4%; width: 57.2%; height: 57.2%; }
@keyframes settle { from { transform: rotate(-16deg); } to { transform: none; } }

@media (min-width: 40rem) {
  .wheel { width: 70vw; right: -18vw; bottom: -26vw; }
  .wheel-spin { rotate: 0deg; }
  .hero-copy { padding-bottom: var(--s-5); }
}
@media (min-width: 64rem) {
  .lede { max-width: min(42ch, 38vw); margin-top: var(--s-4); font-size: var(--t-lead); line-height: 1.45; }
  .actions { margin-top: var(--s-5); }
}
/* Phones on their side: the button matters more than the tyre. Upright, the tyre sits below the copy on any phone. */
@media (max-width: 64rem) and (max-height: 40rem) and (orientation: landscape) {
  .wheel { display: none; }
  .hero-copy { padding-bottom: var(--s-5); }
}
/* Phones on their side: the same content, on fewer lines */
@media (max-width: 64rem) and (max-height: 30rem) {
  .hero h1 { max-width: none; font-size: var(--t-h2); }
  .lede { max-width: 72ch; }
  .hero-copy { padding-block: var(--s-4); }
}

/* The phone's composition with more room, and the same whatever the browser zoom, which only changes the viewport's size
   in CSS pixels. Everything's held in rem: the frame is the header's width, the hero's height is capped so a huge viewport
   doesn't make a huge empty block, and the tyre's size comes from that height between a minimum and a maximum, limited by
   the width so it can't reach the words. Its centre sits .4 of its radius in from the frame's right and .16 up from the
   bottom, which keeps the whole name in view. The ground stays edge to edge, and the tyre carries on past the frame until
   the hero's own overflow crops it, so only the viewport's edge ever cuts it. By viewport size alone, as Brave can't report a pointer: anything narrower and short
   is treated as a phone on its side, with no tyre. tests/illustrations.mjs checks this at each size. */
@media (min-width: 64rem) {
  .hero:not(.hero--page) { --hero-h: min(100svh - var(--header), 56rem); --r: min(clamp(20rem, var(--hero-h) * .75, 36rem), 40vw); min-height: var(--hero-h); }
  .hero-frame { max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; align-items: flex-start; }
  .hero-frame > .hero-copy { padding-block: calc(var(--hero-h) * .13) var(--s-5); }
  .hero-frame .wheel { display: block; width: calc(var(--r) * 2); right: calc(var(--r) * -.6); bottom: calc(var(--r) * -.84); left: auto; top: auto; }
}
/* Very short: one line of heading already, so the buttons stack to stay clear of the tyre */
@media (min-width: 64rem) and (max-height: 30rem) {
  .hero-frame .lede { max-width: 38vw; }
  .hero-frame .actions { flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); }
  .hero-frame > .hero-copy { padding-block: var(--s-4); }
}

/* Sections */
.section { padding-block: var(--section); }

/* The one clickable row, everywhere on the site: linkRow() in build.js, or a question's summary. The whole row is the link. On hover or keyboard focus the title and arrow shift 4px and a red hairline draws under it. */
.services { padding-block: var(--section); }
.link-row { --pad: var(--s-3); --row-x: 0rem; --row-line: 0; position: relative; padding-block: var(--pad-top, var(--pad)) var(--pad); padding-right: var(--s-6); border-bottom: 1px solid var(--line); font-family: var(--semi); font-size: var(--t-h3); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.link-row a { text-decoration: none; }
/* The whole row is the link */
.link-row a::after { content: ""; position: absolute; inset: 0; }
.link-row a:focus-visible { outline: none; }
.link-row a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
/* A block, not inline-block, whose baseline is its last line: a title that wraps still lines up on its first */
.row-label { display: block; transform: translateX(var(--row-x)); transition: transform var(--m-row); }
.link-row::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--red); transform: scaleX(var(--row-line)); transform-origin: left; transition: transform var(--m-row); pointer-events: none; }
.link-row::after {
  content: ""; position: absolute; right: -.22rem; top: calc(var(--pad-top, var(--pad)) + .125rem); width: 1.75rem; height: 1.75rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.25'%3E%3Cpath d='M2 10h15.5M11.5 4l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.25'%3E%3Cpath d='M2 10h15.5M11.5 4l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateX(var(--row-x)); transition: transform var(--m-row); pointer-events: none;
}
/* One state for every row. Every :hover on the site is written like this one, with no media query, as Brave reports hover and pointer queries as false.
   bar.js sets .is-touch on the first touch, so a tap can't leave anything lit. :where() adds no specificity, so :active still wins.
   Focus only for the keyboard: never plain :focus, which the back button restores */
:where(html:not(.is-touch)) .link-row:hover { --row-x: .25rem; --row-line: 1; }
.link-row:has(a:focus-visible), .link-row:focus-visible { --row-x: .25rem; --row-line: 1; }
/* Without motion, the hairline still marks the row but nothing shifts */
@media (prefers-reduced-motion: reduce) {
  .row-label, .link-row::after { transform: none !important; }
}
/* A service row adds its description. From 1024px the name takes about a third, with the description straight after it. */
.service { --pad: var(--s-5); display: grid; gap: var(--s-2); }
.service h3 { font-size: var(--t-h3); line-height: 1.25; }
.service p { max-width: var(--measure); font: 400 var(--t-body)/1.55 var(--font); letter-spacing: 0; color: var(--muted); }
/* A question opens rather than goes somewhere, so it has its own mark in place of the arrow */
.link-row--toggle { padding-right: 0; border-bottom: 0; }
.link-row--toggle::after { content: none; }
.services-note { margin-top: var(--s-4); }

/* Gallery, when site.json lists any photos */
.gallery { display: grid; gap: var(--gap); }
@media (min-width: 64rem) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .frame--landscape { grid-column: auto; }
}

/* The closing section, the same on every page that has one: src/partials/closing.html. Always on Paper, as the dark footer follows it.
   It carries the same padding as every other band. */
.closing { padding-block: var(--section); }
.closing p { max-width: var(--measure); text-wrap: balance; }
/* Visit: the address and map as one band, the phone and hours as the next */
.location { padding-block: var(--section); }
.location address { font-size: var(--t-lead); line-height: 1.45; }
.how-to-find { margin-top: var(--s-3); max-width: var(--measure); color: var(--muted); }
.visit-detail { padding-block: var(--section); }
/* Contact's Find us block: the address, directions, then Facebook and the Google links on one row */
.find-address { font-size: var(--t-lead); line-height: 1.45; }
.find-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-top: var(--s-4); }

.visit-map { width: 100%; max-width: 34rem; }
/* The same roads at the same scale, to whichever shape the column needs: square, 3:2 or 2:1. Each is only as wide as keeps its labels readable. */
.map .ill.ill--mid, .map .ill.ill--wide { display: none; }
.ground-dark .map { --map-ground: var(--rubber); }
.ground-white .map { --map-ground: var(--white); }
.ground-stone .map { --map-ground: var(--stone); }
.visit-map figcaption { margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.hours { width: 100%; max-width: var(--measure); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { vertical-align: baseline; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { padding-left: var(--s-3); text-align: right; white-space: nowrap; }
.hours tr[aria-current="date"] th, .hours tr[aria-current="date"] td { font-weight: 600; }
.hours tr:last-child :is(th, td) { border-bottom: 0; }

/* Inner pages: words, then the drawing under them, centred. From 1024px words on the left and the drawing on the right. */
.hero--page { display: block; min-height: 0; }
.hero--rubber { background: var(--rubber); color: var(--paper); }
:is(.hero--rubber, .ground-dark) .btn { background: var(--paper); color: var(--rubber); }
:where(html:not(.is-touch)) :is(.hero--rubber, .ground-dark) .btn:hover { background: var(--alloy); }
:is(.hero--rubber, .ground-dark) .btn:active { background: #aeb1b0; }
.hero--rubber .btn--secondary { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--on-rubber-muted); }
:where(html:not(.is-touch)) .hero--rubber .btn--secondary:hover { background: var(--rubber-lift); }
.hero--rubber .btn--secondary:active { background: #0f1012; }
.hero-split { display: grid; }
.hero--page .hero-copy { padding-block: var(--s-6) 0; }
.hero--page h1 { max-width: 16ch; font-size: var(--t-h1-page); line-height: 1.06; letter-spacing: -.02em; }
/* One scale for the whole set. --k is what one unit of a drawing measures on screen, and every drawing is on a board no bigger
   than 470 by 480 (scripts/make-illustrations.py), so each is as big as its shape allows and every line weight matches. */
.hero-art { --k: min(calc(85vw / 470), calc(300px / 480)); --l: 2.1; --t: 1.4; --a: 2.5; display: flex; justify-content: center; min-width: 0; margin: 0; padding-block: var(--s-6); color: var(--on-rubber-muted); }
.hero-art .ill { flex: none; display: block; width: calc(var(--w) * var(--k)); max-width: none; height: auto; stroke-width: var(--l); }
.hero-art .ill .t { stroke-width: var(--t); }
.hero-art .ill :is(.a, .am) { stroke-width: var(--a); }
.hero-art .ill .d { stroke-dasharray: 5 6; }
@media (min-width: 40rem) {
  .hero-art { --k: min(calc(85vw / 470), calc(min(360px, 72vh) / 480)); --l: 1.8; --t: 1.2; --a: 2.1; }
}
@media (min-width: 64rem) {
  /* Hangs off the header's frame, not the viewport, so on a huge viewport the drawing stays beside the words */
  .hero-split { --hero-h: clamp(37rem, 40vw, 46rem); grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: center; min-height: var(--hero-h); }
  .hero--page .hero-copy { grid-column: 1 / span 6; padding-block: var(--s-7); }
  .hero--page .lede { max-width: 38ch; }
  .hero-art { --k: min(calc((var(--hero-h) - 4rem) / 480), calc((50vw - var(--gutter) - var(--gap) / 2) / 470), 1.3px); --l: 1.45; --t: .95; --a: 1.65; grid-column: 7 / -1; padding-block: var(--s-5); }
}
/* The MOT route is the one drawing with words, so it keeps a scale of its own that holds them at a readable size. On phones
   the same loop folds into two rows of two, drawn at actual size, so it fills the same box as the other drawings. */
.hero-art--route { --k: min(calc(85vw / 290), 1px); --l: 1.5; --t: 1; --a: 1.75; }
.hero-art--route .ill text { fill: var(--paper); font-size: 16px; font-weight: 600; }
.route--wide { display: none !important; }
@media (min-width: 40rem) {
  .hero-art--route { --k: calc(min(360px, 72vh) / 368); }
  .route--wide { display: block !important; }
  .route--phone { display: none !important; }
  .hero-art--route .ill text { font-size: 15px; font-weight: 400; }
}
@media (min-width: 64rem) {
  .hero-art--route { --k: min(calc((var(--hero-h) - 4rem) / 480), 1.3px); --l: 1.45; --t: .95; --a: 1.65; }
}

/* The line drawings. One stroke language at every size. */
.ill { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; max-width: 100%; height: auto; font-family: var(--font); }
.ill .t { stroke-width: 1; stroke-opacity: .6; }
.ill .a { stroke: var(--red); stroke-width: 1.75; }
.ill .f { fill: var(--ill-face); stroke: none; }
.ill .pin { fill: var(--red); stroke: none; }
.ill .road { stroke-width: 4; }
.ill .am { stroke: var(--amber); stroke-width: 1.75; }
/* The street map: real roads, to scale. Labels get a halo of the ground colour so they read over a line. */
.map { --map-ground: var(--paper); }
.map .ill { display: block; width: 100%; height: auto; }
.map .ill .halo { fill: var(--map-ground); }
.map .ill .lane { stroke: var(--red); stroke-width: 2.5; }
.map .ill .lane-end { stroke: var(--red); stroke-width: 2; stroke-dasharray: 3 4; }
.map .ill text { stroke: var(--map-ground); stroke-width: 3px; paint-order: stroke; }
.map figcaption a { color: inherit; }
.ill .town-bg, .ill .halo { fill: var(--paper); stroke: none; }
.ill text { fill: currentColor; stroke: none; font-size: 14px; letter-spacing: 0; }
.ill text.small { font-size: 12px; fill: var(--muted); }
.ill text.town, .ill text.strong { font-size: 15px; font-weight: 600; }
/* The map carries real labels, so on a phone its type stays readable */
@media (max-width: 40rem) {
  .map .ill text { font-size: 15.5px; }
  .map .ill text.strong { font-size: 16.5px; }
  .map .ill text.garage { font-size: 15px; } /* it has to fit between two roads */
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art .ill :is(path, circle, ellipse, rect):not(.f, .pin) { stroke-dasharray: 1; animation: draw var(--m-draw) both; }
  .hero-art .ill :is(.f, .pin) { animation: appear 300ms 550ms ease-out both; }
  .hero-art .ill path.d { stroke-dasharray: 5 6; animation: appear 300ms 550ms ease-out both; }
  /* The MOT route draws in along its way, one run after another, and each arrowhead lands as its run arrives */
  .hero-art .ill text { animation: appear 300ms 300ms ease-out both; }
  .hero-art .ill .r1 { animation: draw 700ms 400ms cubic-bezier(.45, 0, .2, 1) both; }
  .hero-art .ill .r2 { animation: draw 500ms 1100ms cubic-bezier(.45, 0, .2, 1) both; }
  .hero-art .ill .r3 { animation: draw 800ms 1600ms cubic-bezier(.45, 0, .2, 1) both; }
  .hero-art .ill .hd { stroke-dasharray: none; }
  .hero-art .ill .hd.r1 { animation: appear 150ms 1050ms ease-out both; }
  .hero-art .ill .hd.r2 { animation: appear 150ms 1550ms ease-out both; }
  .hero-art .ill .hd.r3 { animation: appear 150ms 2350ms ease-out both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* The tyre turns a little as the page scrolls, where browsers support it */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .wheel-spin { animation: roll linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    @keyframes roll { to { transform: rotate(10deg); } }
  }
}

/* Page rhythm */
.rows { border-top: 1px solid var(--line); }
.rows li { --pad: var(--s-3); padding-block: var(--pad-top, var(--pad)) var(--pad); border-bottom: 1px solid var(--line); }
.brands li { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.brands { border-top: 1px solid var(--line); }
/* Body copy is one size. Lead is one more, and only ever the first paragraph of a section, on every page. */
.columns-lead > p:first-of-type, .columns-intro, .closing-grid p:first-of-type:not(.actions), .decoder-intro p:first-of-type { font-size: var(--t-lead); line-height: 1.45; max-width: var(--measure); }
/* Paragraphs stop at the measure, stacked, from the content column's left edge. Never in two columns. */
.columns-lead, .columns-main > p:not(.callout), .after-steps, .story-text { max-width: var(--measure); }
.columns-lead p + p { margin-top: var(--s-3); }
.columns-lead > h3 { margin-top: var(--s-5); margin-bottom: var(--s-3); }
.columns-main > * + *, .columns-main > .figures:not(:first-child) { margin-top: var(--s-5); }
.columns-main > h3 { margin-top: var(--s-6); }
.columns-main > h3 + * { margin-top: var(--s-3); }
/* A few facts, set large. The figure is the picture. */
.figures { display: grid; gap: var(--s-4); margin: 0; }
.figures > div { position: relative; padding-top: var(--s-3); border-top: 1px solid currentColor; }
.figures dt { font-family: var(--display); font-size: var(--t-pull); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; }
.figures dd { margin: var(--s-2) 0 0; color: var(--muted); max-width: 32ch; }
.figures > .figure--red { border-top: 3px solid var(--red); }
.figures > .figure--amber { border-top: 3px solid var(--amber); }
/* Two named cases rather than two numbers, so they're small titles, within the text column */
.figures--two dt { font-family: var(--semi); font-size: var(--t-h3); line-height: 1.25; letter-spacing: -.01em; }
@media (min-width: 40rem) {
  .figures { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); }
  .figures--two { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .frontage-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
}

/* Numbered, because these really are in order */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sec-gap); counter-reset: step; }
.steps li { counter-increment: step; padding-top: var(--s-3); border-top: 1px solid currentColor; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: var(--s-3); font-size: var(--t-small); font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; color: var(--muted); }
.steps h3 { margin-bottom: var(--s-2); }
/* Equal tiles, with their rules on one line: three across, or four as two by two */
@media (min-width: 40rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; column-gap: var(--gap); }
  .steps:has(> li:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Wheel alignment: three views of the front wheels. Beside their captions on phones, side by side on bigger screens */
.explainer { display: grid; gap: var(--s-5); }
.explainer figure { display: grid; grid-template-columns: minmax(7rem, 2fr) 3fr; gap: var(--s-4); align-items: center; padding-top: var(--s-4); border-top: 1px solid currentColor; color: var(--rubber); --ill-face: var(--paper); }
.explainer .ill { display: block; width: 100%; height: auto; }
.explainer figcaption { color: var(--muted); }
.explainer strong { display: block; margin-bottom: var(--s-1); font-family: var(--semi); font-size: var(--t-h3); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; color: var(--rubber); }
@media (min-width: 40rem) {
  .explainer { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); }
  .explainer figure { grid-template-columns: 1fr; align-items: start; }
}
/* One list everywhere: rows in a single column. This one takes a tick. */
.rows--check li { position: relative; padding-left: var(--s-5); }
.rows--check li::before { content: ""; position: absolute; left: 0; top: calc(var(--pad-top, var(--pad)) + .1rem); width: 1.25rem; height: 1.25rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.5l4.5 4.5L16.5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.5l4.5 4.5L16.5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Read your tyre */
.decoder { background: var(--rubber); color: var(--paper); padding-block: var(--section); overflow: clip; }
.decoder-intro { display: grid; gap: var(--s-3); }
.decoder-intro p { color: var(--muted); }
.decoder-art { margin-top: var(--s-5); }
/* On phones the arc stays in view above the keys, so a tap always shows what it lit up */
@media (max-width: 63.99rem) {
  .is-live .decoder-art { position: sticky; top: var(--header); z-index: 1; background: var(--rubber); }
  .is-live .decoder-keys a { scroll-margin-top: calc(var(--header) + 8rem); }
}
.decoder-svg { display: block; width: 100%; height: auto; }
.part { cursor: pointer; }
.part-mark { fill: #8b8e92; transition: fill var(--m-fast); }
.part-line { stroke: transparent; transition: stroke var(--m-fast); }
.part.is-active .part-mark, :where(html:not(.is-touch)) .part:hover .part-mark { fill: var(--paper); }
.part.is-active .part-line { stroke: var(--red); }
/* Without JavaScript, the links still light up the part they point at */
.decoder:has(#part-width:target) [data-part="width"] .part-mark,
.decoder:has(#part-profile:target) [data-part="profile"] .part-mark,
.decoder:has(#part-construction:target) [data-part="construction"] .part-mark,
.decoder:has(#part-rim:target) [data-part="rim"] .part-mark,
.decoder:has(#part-load:target) [data-part="load"] .part-mark,
.decoder:has(#part-speed:target) [data-part="speed"] .part-mark { fill: var(--paper); }
.decoder-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--s-3); margin-top: var(--s-4); }
.decoder-keys a { display: flex; flex-direction: column; gap: var(--s-1); padding-block: var(--s-3); border-top: 2px solid var(--on-rubber-line); font-size: var(--t-small); color: var(--muted); text-decoration: none; transition: border-color var(--m-fast), color var(--m-fast); }
.decoder-keys b { font-family: var(--semi); font-size: var(--t-h3); font-weight: 500; line-height: 1.2; color: var(--paper); }
:where(html:not(.is-touch)) .decoder-keys a:hover, .decoder-keys a[aria-current] { border-top-color: var(--red); color: var(--paper); }
.decoder-foot { max-width: var(--measure); margin-top: var(--s-4); color: var(--muted); }
.decoder-notes { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.decoder-note { scroll-margin-top: calc(var(--header) + var(--s-3)); }
.decoder-note h3 { margin-bottom: var(--s-2); }
.decoder-note p { max-width: var(--measure); color: var(--muted); }
.decoder-note:target h3 { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; }
.decoder-note[hidden] { display: none; }
.is-live .decoder-notes { display: block; min-height: 8.75rem; }
.is-live .decoder-foot { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
@media (min-width: 40rem) { .decoder-keys { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 64rem) {
    .is-live .decoder-notes { min-height: 7rem; }
  .decoder-notes:not(.is-live .decoder-notes) { grid-template-columns: repeat(3, 1fr); }
}

/* Home: "Sound familiar?", set as type */
.familiar { padding-block: var(--section); }
.familiar-list { display: grid; }
.familiar-end { margin-top: var(--s-4); }
.familiar-end a { text-underline-offset: .2em; white-space: nowrap; }

/* The photo tiles, the same on every page: {{tileGrid}} and Home's jobs, in build.js. One ratio and one gap everywhere, with their outer edges on the content's. Two tiles share a row at every width. From 640px a single photo is one tile, the same size as one of a pair, starting at the left. On a phone it has the row to itself. No boxes or shadows: the photo's edge and the ground do the work. */
.from-workshop.sec { align-items: start; }
.tiles { display: grid; grid-auto-flow: dense; gap: var(--tile-gap); }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--stone-line); }
/* Small, solid and readable over any photo */
.tile-label { position: absolute; z-index: 2; left: var(--s-1); bottom: var(--s-1); padding: 0 .375rem; background: var(--rubber); color: var(--paper); font-size: var(--t-small); font-weight: 600; line-height: 1.5; pointer-events: none; }
/* What the job was, at one distance from its photos */
.tiles-caption { grid-column: 1 / -1; max-width: var(--measure); margin-top: calc(var(--s-3) - var(--tile-gap)); color: var(--muted); }
.tiles-caption:not(:last-child) { margin-bottom: var(--s-3); }
.tiles--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--3 > .tile:last-child { grid-column: 1 / -1; }
@media (min-width: 40rem) {
  .tiles--1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles--3 > .tile:last-child { grid-column: auto; }
}

/* Home's jobs, all one layout: the photos, then the words. On a phone the words sit under them, and from 640px the photos take two columns and the words the third. A before and after is two tiles, and a single photo is one tile the same size, with its words straight after it.
   The whole job is the link, and each photo sits above it, as it opens the viewer. */
.jobs { display: grid; gap: var(--s-6); }
.job { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tile-gap); align-items: start; }
.job-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); grid-column: 1 / -1; margin-top: calc(var(--s-3) - var(--tile-gap)); }
.job--single .tile { grid-column: 1 / -1; }
.job p { max-width: 40ch; color: var(--muted); }
.job .text-link { font-weight: 600; }
.job a::after { content: ""; position: absolute; inset: 0; }
.job a:focus-visible { outline: none; }
.job a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
:where(html:not(.is-touch)) .job:hover:not(:has(.view:hover)) .text-link { background-size: 100% 1px, 100% 1px; }
@media (min-width: 40rem) {
  .job { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-text { grid-column: auto; margin-top: 0; }
  .job--single .tile { grid-column: auto; }
  .job--single .job-text { grid-column: span 2; }
}

/* The photo viewer: viewer.js. Each photo is a button above any link around it. A very small zoom on hover, inside the photo's own frame, so nothing moves. */
.view { position: relative; z-index: 1; display: block; width: 100%; overflow: hidden; cursor: zoom-in; }
@media (prefers-reduced-motion: no-preference) {
  .view img { transition: transform var(--m-zoom); }
  :where(html:not(.is-touch)) .view:hover img { transform: scale(1.03); }
}
/* Full-screen on Rubber, in the top layer. Top row: where you are and Close. Then the photo, whole. Then its line and the two arrows, within a thumb's reach. */
.viewer { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0 var(--gutter) env(safe-area-inset-bottom); background: var(--rubber); color: var(--paper); opacity: 0; transition: opacity var(--m-menu), display var(--m-menu) allow-discrete, overlay var(--m-menu) allow-discrete; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; opacity: 1; }
@starting-style { .viewer[open] { opacity: 0; } }
html:has(.viewer[open]) { overflow: hidden; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header); }
.viewer-count { font-size: var(--t-nav); font-variant-numeric: tabular-nums; color: var(--muted); }
.viewer-close { min-height: 2.5rem; margin-left: auto; padding-inline: var(--s-3); border: 1px solid var(--on-rubber-muted); border-radius: 3px; font-size: var(--t-nav); transition: border-color var(--m-fast), background-color var(--m-fast); }
:where(html:not(.is-touch)) .viewer-close:hover { border-color: var(--paper); background: var(--rubber-lift); }
/* Swipes across belong to the viewer. Scrolling and pinching stay with the browser. */
.viewer-stage { position: relative; min-height: 0; overflow: clip; overflow-clip-margin: 0; margin-inline: calc(var(--gutter) * -1); touch-action: pan-y pinch-zoom; }
.viewer-img { position: absolute; inset: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; cursor: default; -webkit-user-drag: none; user-select: none; }
.viewer.is-failed .viewer-img { visibility: hidden; }
/* Only if a photo's slow. A plain ring, as a tyre seen face on. */
.viewer.is-loading .viewer-stage::after { content: ""; position: absolute; inset: 0; width: 2.5rem; height: 2.5rem; margin: auto; border: 3px solid var(--on-rubber-line); border-top-color: var(--paper); border-radius: 50%; animation: viewer-turn 900ms linear infinite; }
@keyframes viewer-turn { to { transform: rotate(360deg); } }
.viewer-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; min-height: 5.5rem; padding-block: var(--s-3); }
/* No words and nowhere to go: no bar, so the photo gets the room */
.viewer-foot:has(.viewer-caption:empty):has(.viewer-next[hidden]) { min-height: var(--s-4); padding: 0; }
.viewer-caption { max-width: 60ch; font-size: var(--t-nav); line-height: 1.4; color: var(--muted); }
.viewer-nav { display: flex; gap: var(--s-2); }
.viewer-nav button { display: flex; align-items: center; justify-content: center; width: var(--s-6); height: var(--s-6); border: 1px solid var(--on-rubber-muted); border-radius: 3px; transition: border-color var(--m-fast), background-color var(--m-fast); }
.viewer-nav button[hidden] { display: none; }
:where(html:not(.is-touch)) .viewer-nav button:hover { border-color: var(--paper); background: var(--rubber-lift); }
.viewer-nav button:active, .viewer-close:active { transform: translateY(1px); }
.viewer-prev svg { transform: scaleX(-1); }
/* Phones on their side: the photo gets the height */
@media (max-height: 30rem) {
  .viewer-top { min-height: 3.25rem; }
  .viewer-foot { min-height: 0; padding-block: var(--s-1); }
}

/* Home: the garage's own photos, when there are any */
.frontage { padding-bottom: var(--section); }
.frontage-grid { display: grid; gap: var(--s-5); align-items: end; }
.frontage-art .frame, .frontage-art img { width: 100%; }
.frontage-side .frame { margin-bottom: var(--s-4); }
@media (min-width: 64rem) {
  .frontage-art { grid-column: 1 / span 8; }
  .frontage-side { grid-column: 9 / -1; }
}
.frame { position: relative; overflow: hidden; background: var(--stone); }
.frame--landscape { aspect-ratio: 3 / 2; }
.frame--portrait { aspect-ratio: 4 / 5; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* Every titled section, on every page. One rule across the whole section, then the title and the content. From 1024px they
   sit side by side with the first line of each on one baseline, whatever their sizes, as the browser lines them up.
   So the content's own first rule and first row's top padding go: it starts level with the title. tests/illustrations.mjs measures it. */
.sec { --sec-gap: var(--s-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sec-gap) var(--gap); }
/* Sections are told apart by their ground alone. A rule appears only between two neighbours that share one, so there's never a double separator. */
.sec::before { content: ""; display: none; grid-column: 1 / -1; height: 1px; background: var(--line); }
:is(.ground-white + .ground-white, .ground-stone + .ground-stone, .ground-white + .visit > .ground-white:first-child, .ground-stone + .visit > .ground-stone:first-child) .sec::before { display: block; }
.visit-map, .gallery { align-self: start; }
.link-row:first-child, .sec > .rows li:first-child, .columns-main > .rows:first-child li:first-child, :is(h2, h3, .callout) + .rows li:first-child { --pad-top: 0px; }
.sec > .rows, .columns-main > .rows:first-child, :is(h2, h3, .callout) + .rows { border-top: 0; }
.rows:has(+ .callout) > li:last-child { border-bottom: 0; padding-bottom: 0; }
.explainer li:first-child figure { padding-top: 0; border-top: 0; }
.columns-main > .figures:first-child > div:first-child { padding-top: 0; border-top: 0; }
.columns-main > .callout + h3 { margin-top: var(--s-5); }
@media (min-width: 40rem) {
  .explainer figure { padding-top: 0; border-top: 0; }
  .columns-main > .figures:first-child > div { padding-top: 0; border-top: 0; }
  .columns-main > .figures:first-child > .figure--red::before { content: ""; position: absolute; left: 0; right: 0; top: -.75rem; height: 3px; background: var(--red); }
}
@media (min-width: 64rem) {
  .sec { --sec-gap: var(--s-5); grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: first baseline; }
  .sec > h2 { grid-column: 1 / span 3; }
  .sec > :not(h2) { grid-column: 4 / -1; }
  /* A drawing has no first line of text to share, so the title starts level with its top instead */
  .sec:has(> .columns-main > .explainer:first-child) { align-items: start; }
}

/* The two Google links: one component, on any ground, always on one line with a fine divider. */
.reviews { --rv-gap: var(--s-3); display: flex; align-items: center; gap: var(--rv-gap); font-size: .8125rem; white-space: nowrap; }
.reviews a { display: inline-block; padding-block: var(--s-1); }
.reviews a + a { position: relative; }
.reviews a + a::before { content: ""; position: absolute; left: calc(var(--rv-gap) / -2 - .5px); top: .4em; bottom: .4em; width: 1px; background: var(--line); }
@media (min-width: 40rem) {
  .reviews { --rv-gap: var(--s-4); font-size: var(--t-small); }
}

/* The opening-status component: a small button with a dot, opening the week's hours. Grey until the script knows, or if it never runs. */
.status { display: inline-flex; max-width: 100%; }
.status-btn { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; padding-inline: .75rem; border: 1px solid var(--line); border-radius: 3px; font-size: var(--t-small); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; transition: border-color var(--m-fast); }
:where(html:not(.is-touch)) .status-btn:hover { border-color: currentColor; }
/* The tap target: at least 44px tall on a 32px button, with nothing moving. It reaches further up than down, as the Google links are only 4px below on Home. */
.status-btn::before { content: ""; position: absolute; inset: -.5625rem -1px -.3125rem; }
.status-dot { display: none; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #8b8e92; }
.status[data-state] .status-dot { display: block; }
.status[data-state="open"] .status-dot { background: #1f9d55; box-shadow: 0 0 0 3px rgb(31 157 85 / .18); }
button.status-btn::after { content: ""; flex: none; width: .4rem; height: .4rem; margin: -.15rem .1rem 0 .1rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform var(--m-fast); }
button.status-btn[aria-expanded="true"]::after { margin-top: .15rem; transform: rotate(225deg); }
.hours-pop { position: absolute; inset: auto; width: min(19rem, 100vw - 1rem); margin: 0; padding: .75rem var(--s-3); border: 1px solid var(--on-rubber-line); border-radius: 3px; background: var(--rubber); color: var(--paper); font-size: var(--t-small); box-shadow: 0 .75rem 2rem rgb(30 32 35 / .3); opacity: 0; transition: opacity var(--m-fast), display var(--m-fast) allow-discrete, overlay var(--m-fast) allow-discrete; }
.hours-pop:popover-open { opacity: 1; }
@starting-style { .hours-pop:popover-open { opacity: 0; } }
.hours-pop-title { margin-bottom: var(--s-2); font-weight: 600; }
.hours-pop .hours { max-width: none; }
.hours-pop .hours th, .hours-pop .hours td { padding: .25rem .5rem; }
.hours-pop .hours tr[aria-current="date"] :is(th, td) { background: var(--rubber-lift); }
.hours-pop .hours tr[aria-current="date"] th { box-shadow: inset 2px 0 0 var(--red); }

/* Home's hero, under the buttons: one row at a hairline's distance, and on narrower screens the status over the links.
   It's held to the width it needs, so it can't reach the tyre: tests/illustrations.mjs measures it at every size with the longest wording. */
.info-row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); width: 100%; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
@media (min-width: 40rem) {
  .info-row { width: fit-content; }
}
@media (min-width: 64rem) {
  .info-row { margin-top: var(--s-5); }
}
@media (min-width: 90rem) {
  .info-row { flex-direction: row; align-items: center; gap: var(--s-3); }
  .info-row > .reviews { position: relative; padding-left: var(--s-3); }
  .info-row > .reviews::before { content: ""; position: absolute; left: 0; top: .4em; bottom: .4em; width: 1px; background: var(--line); }
}
/* Short desktop windows, or zoomed in: the row and the buttons stay tight, and the hero keeps its foot */
@media (min-width: 64rem) and (max-height: 50rem) {
  .hero-frame .actions { margin-top: var(--s-4); }
  .hero-frame .info-row { margin-top: var(--s-3); padding-top: var(--s-2); gap: var(--s-1); }
}
/* Very short: the tyre comes in close, so everything in the row narrows to stay clear of it */
@media (min-width: 64rem) and (max-height: 30rem) {
  .hero-frame .reviews { flex-direction: column; align-items: flex-start; gap: 0; }
  .hero-frame .reviews a + a::before { display: none; }
  .hero-frame .status-btn { gap: .35rem; padding-inline: .375rem; font-size: .8125rem; }
  .hero-frame button.status-btn::after { margin-inline: 0; }
}

/* Home's hero below 1024px: everything tightened, so the tyre starts where it always did. The two buttons share one row at
   equal widths, and on the narrowest phones the call button says "Call us". tests/illustrations.mjs holds the tyre to its place. */
@media (max-width: 63.99rem) {
  :where(.hero:not(.hero--page)) .hero-copy { padding-top: var(--s-4); }
  .hero:not(.hero--page) .lede { margin-top: var(--s-2); }
  .hero:not(.hero--page) .actions { margin-top: var(--s-3); }
  .hero:not(.hero--page) .info-row { margin-top: var(--s-3); padding-top: var(--s-2); gap: var(--s-1); }
  .hero .status-btn { min-height: 2rem; padding-inline: .625rem; }
}
/* A desktop window zoomed in until it's very short keeps its stacked buttons, clear of the tyre */
@media (min-width: 64rem) and (max-height: 30rem) {
  .hero:not(.hero--page) .hero-frame .actions { display: flex; align-items: flex-start; max-width: none; }
  .hero:not(.hero--page) .hero-frame .status-btn { padding-inline: .375rem; }
}

/* A small arrow, as on the service rows */
.arrow-link::after {
  content: ""; display: inline-block; width: .875em; height: .875em; margin-left: .4em; vertical-align: -.08em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M2 10h15.5M11.5 4l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M2 10h15.5M11.5 4l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* About, below the hero */
.about-block { padding-block: var(--section); }
.story-text > * + * { margin-top: var(--s-3); }
.why { display: grid; gap: var(--s-5); }
.why li { display: grid; gap: var(--s-2); justify-items: start; align-content: start; }
.why p { color: var(--muted); max-width: 30ch; }
.fine-icon { display: block; margin-bottom: var(--s-1); fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.fine-icon .a { stroke: var(--red); stroke-width: 1.5; }
@media (min-width: 40rem) {
  .why { grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); }
}
/* The icons have no first line of text to share, so the title starts level with their top */
@media (min-width: 64rem) { .sec.why-grid { align-items: start; } }

/* Common questions: rows like the rest of the site, opened by the browser's own details element, so no script.
   Each question is the one clickable row. The plus loses its upright to become a minus. */
.faq-band { padding-block: var(--section); }
.faq-item { border-bottom: 1px solid var(--line); }
#faq { scroll-margin-top: var(--header); }
.faq-item summary { position: relative; display: grid; min-height: 2.75rem; grid-template-columns: minmax(0, 1fr) 1rem; gap: var(--s-3); align-items: first baseline; padding-block: var(--s-3); font-family: var(--semi); font-size: var(--t-h3); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; cursor: pointer; list-style: none; }
.faq-item:first-child summary { padding-top: 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; align-self: start; width: 1rem; height: 1rem; margin-top: calc((1.25em - 1rem) / 2); }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .5px); height: 1px; background: currentColor; }
.faq-mark::after { transform: rotate(90deg); transition: transform var(--m-row); }
.faq-item[open] .faq-mark::after { transform: rotate(0deg); }
/* The same width as its question, stopping where the mark's column starts. A link lands on the answer, so this leaves room for the question above it and the sticky header above that */
.faq-a { padding-right: calc(1rem + var(--s-3)); padding-bottom: var(--s-4); scroll-margin-top: calc(var(--header) + 7.5rem); }
/* For the preview only. It stops the launch: npm run check:launch fails while any remain. On White, where this red passes for small text. */
.red-note { color: var(--red); font-size: var(--t-small); text-decoration: underline dashed var(--red); text-underline-offset: .25em; }
@media (prefers-reduced-motion: reduce) {
  .faq-mark::after { transition: none; }
}

/* Phones: Call, Message and Directions, once the hero's own buttons have scrolled away and until the footer arrives. bar.js sets
   .is-visible on the bar and .has-bar on the body. The room it needs is below the footer, which is always off screen while the bar shows, so nothing moves. */
.action-bar { display: none; }
@media (max-width: 55.99rem) {
  /* --bar is the buttons' height, and the bar has a 1px rule on top of them */
  html { scroll-padding-bottom: calc(var(--bar) + 1px + env(safe-area-inset-bottom)); }
  body { background: var(--rubber); }
  body.has-bar { padding-bottom: calc(var(--bar) + 1px + env(safe-area-inset-bottom)); }
  main { background: var(--white); }
  .action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); background: var(--rubber); color: var(--paper); border-top: 1px solid var(--on-rubber-line); visibility: hidden; transform: translateY(100%); transition: transform var(--m-bar), visibility var(--m-bar); }
  .action-bar.is-visible { visibility: visible; transform: none; }
  .action-bar a { display: flex; align-items: center; justify-content: center; min-height: var(--bar); font-size: var(--t-nav); font-weight: 600; text-decoration: none; }
  .action-bar a + a { border-left: 1px solid var(--on-rubber-line); }
  .action-bar :focus-visible { outline-offset: -5px; }
}

/* The change of ground is the separator, so a list that ends its section doesn't end in a hairline as well, or in the extra padding under one. */
.service:last-child, .rows:last-child > li:last-child, .familiar-list:last-child > .link-row:last-child { border-bottom: 0; padding-bottom: 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item:last-child:not([open]) summary { padding-bottom: 0; }

/* Desktop widths. Only paragraphs stop at --measure, for reading, and they stack. Everything else runs the full content column, from its left edge
   to the page's right margin: rows and link lists, questions, callouts, photos and maps. */
@media (min-width: 64rem) {
  /* A service row: the name in about a third, the description straight after it, the arrow at the margin */
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); align-items: baseline; }

  .figures--two dd { max-width: none; }

  /* The closing section: its line on the left and the buttons at the margin */
  .closing-grid > div { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
  .closing-grid .actions { flex: none; margin-top: 0; }

  /* Photos. Three tiles share a row, with the line under the pair. One tile has its line beside it. */
  .tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles--3 .tiles-caption { grid-column: span 2; margin-bottom: 0; }
  .tiles--1 .tiles-caption { grid-column: auto; margin-top: 0; align-self: start; }
  .job--single p { max-width: var(--measure); }

  /* Home's Where we are: the address on the left of the content column and the map to its right */
  .sec.location-grid:not(.location-grid--map) > .location-copy { grid-column: 4 / span 3; }
  .sec.location-grid:not(.location-grid--map) > .visit-map { grid-column: 7 / -1; }
  /* Contact: the map alone, across the column */
  .location-grid--map.sec { align-items: start; }
  .visit-map { max-width: none; }
  .location-grid--map .map .ill.ill--mid { display: block; }
  .location-grid--map .map .ill:not(.ill--mid, .ill--wide) { display: none; }
  .map .ill:is(.ill--mid, .ill--wide) text { font-size: 15.5px; }
  .map .ill:is(.ill--mid, .ill--wide) text.strong { font-size: 16.5px; }
  .map .ill:is(.ill--mid, .ill--wide) text.garage { font-size: 15px; }

  /* The hours across the column, with the times starting on its middle line */
  .visit-detail .hours { max-width: none; }
  .visit-detail .hours th { width: 50%; }
  .visit-detail .hours td { padding-left: calc(var(--gap) / 2); text-align: left; }
}
/* From 1280px Home's map can take the 3:2 shape, and Contact's the 2:1 */
@media (min-width: 80rem) {
  .map .ill:not(.ill--mid, .ill--wide) { display: none; }
  .map .ill.ill--mid { display: block; }
  .location-grid--map .map .ill.ill--mid { display: none; }
  .location-grid--map .map .ill.ill--wide { display: block; }
}
/* Moving between pages: the header stays put and the content cross-fades */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Footer: one row. Who and where, how to reach us, and the Google links. The same on every page; stacked on phones. */
.site-footer { background: var(--rubber); color: var(--paper); padding-block: var(--s-4); font-size: var(--t-small); }
.footer-main { display: grid; gap: var(--s-3); }
.footer-id { display: flex; align-items: center; gap: var(--s-3); }
.footer-logo { display: block; flex: none; }
.footer-logo img { width: auto; height: 3rem; }
.footer-phone { font-family: var(--semi); font-size: var(--t-body); font-weight: 500; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.site-footer .icon-link { flex: none; border-color: var(--on-rubber-line); }
.site-footer a:not(.icon-link, .text-link) { text-decoration: none; }
:where(html:not(.is-touch)) .site-footer a:not(.icon-link, .text-link):hover { text-decoration: underline; text-underline-offset: .25em; }
@media (min-width: 64rem) {
  .site-footer { padding-block: var(--s-5); }
  .footer-main { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
  .footer-id { grid-column: 1 / span 4; }
  .footer-reach { grid-column: 5 / span 4; }
  .footer-social { grid-column: 9 / -1; flex-wrap: nowrap; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
