/* Hallmark · shape: Catalogue · genre: editorial · theme: Grid (deal 2/3, seed preston-driving-school-homepage-66a3·867ff1e9·2026-11-11·r0) · job: book · draw: 83c515
 * hero: Stage · nav: floating pill · footer: index columns · imagery: photographs (the school's own) · signature: the lesson price at poster scale on a green field, changing as you choose
 * axes: light/grotesk-sans/cool · posture: full-palette · contrast: pass · fold: pass · brand: Learner2Driver (spec 2026-11-11) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R3 V4 · weakest: R, the owner asked for corners, colour photographs, motion and glass; kept to one entrance, one field per screen and glass only over pictures and scrolled content */
/* The hero head's L and D take the wordmark's red and green at the owner's request (gate 38iii stands as flagged). */
/* By the owner's request: rounded corners, photographs in colour, motion, and glass on the floating nav, photo labels, map tips and phone booking bar. The Grid theme ships square, duotone, still and opaque. */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- shared ---------- */
:root { --nav-height: 64px; --field-pad: var(--space-2xl); }
html { scroll-padding-top: var(--space-3xl); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* photographs in colour (the theme's duotone is switched off) */
[data-slot] > img { filter: none; mix-blend-mode: normal; }
[data-slot]:has(> img)::before { content: none; }

.skip { position: absolute; left: var(--space-md); top: var(--space-md); z-index: var(--z-modal); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); background: var(--color-ink); color: var(--color-paper); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

h1, h2, h3 { text-align: start; }
h2 { line-height: 1; }
p { color: var(--color-ink-2); }
.lead { color: var(--color-ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font: 500 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.btn:hover { background: var(--color-ink-2); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: var(--dur-micro); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--small { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }

.link { color: var(--color-ink); font-weight: 500; text-decoration: underline var(--rule-hair); text-underline-offset: 0.32em; transition: color var(--dur-short) var(--ease-out); }
.link:hover { color: var(--color-mark); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); }

.field { background: var(--color-field); color: var(--color-field-ink); --color-focus: var(--color-field-ink); }
.field p, .field .link, .panel--ink p, .panel--ink .link { color: inherit; }
.field .link:hover, .panel--ink .link:hover { color: inherit; text-decoration-thickness: 2px; }
.panel { border-radius: var(--radius-card); }
.panel--ink { background: var(--color-ink); color: var(--color-paper); --color-focus: var(--color-paper); }

/* glass only where something sits behind it to blur; solid where blur is unsupported or unwanted */
.glass { background: var(--glass-bg-solid); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7); backdrop-filter: blur(var(--glass-blur)) saturate(1.7); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--glass-bg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.chip { position: absolute; z-index: 2; inset-block-end: var(--space-md); inset-inline-start: var(--space-md); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }

.photo { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius-card); transition: transform var(--dur-long) var(--ease-out); }
.photo--square { aspect-ratio: 1; }
.cell:hover > .photo, .bento > .photo:hover { transform: translateY(-6px); }

.section { padding-block: var(--section-gap) 0; }
.head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.head--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--gap-columns); }

.stars { color: var(--brand-2); letter-spacing: 0.08em; }
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); text-decoration: none; }
a.rating { justify-self: start; min-height: 44px; transition: color var(--dur-short) var(--ease-out); }
a.rating:hover { color: var(--color-mark); }
.rating--large { font-size: var(--text-md); gap: var(--space-xs) var(--space-md); }

/* one entrance, used everywhere: rise and fade, staggered by --i. Visible without script. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes swap-in { from { opacity: 0; transform: translateY(0.12em); } to { opacity: 1; transform: none; } }

/* ---------- nav: a floating glass pill ---------- */
.nav { position: sticky; top: var(--space-sm); z-index: var(--z-sticky-nav); padding-block: var(--space-sm) 0; }
.nav__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: var(--nav-height); padding-inline: var(--space-lg) var(--space-sm); border-radius: var(--radius-pill); }
.wordmark { font: var(--display-weight) var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.wordmark__l { color: var(--brand-l); }
.wordmark__2 { color: var(--brand-2); }
.wordmark__d { color: var(--brand-d); }
.wordmark--large { font-size: var(--text-3xl); }
.nav__links { display: flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; }
.nav__links a { display: inline-flex; align-items: center; min-height: 40px; padding-inline: var(--space-md); border-radius: var(--radius-pill); text-decoration: none; color: var(--color-ink-2); transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.nav__links a:hover { color: var(--color-ink); background: var(--color-paper-2); }
.nav__links a[aria-current="true"] { color: var(--color-ink); background: var(--color-paper-3); }
.nav__end { display: flex; align-items: center; gap: var(--space-xs); }

.menu { display: none; position: relative; }
.menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-pill); list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.menu__bars { position: relative; width: 20px; height: 2px; border-radius: var(--radius-pill); background: var(--color-ink); box-shadow: 0 6px 0 var(--color-ink), 0 -6px 0 var(--color-ink); }
.menu__panel { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + var(--space-md)); display: grid; min-width: 15rem; padding: var(--space-xs); border-radius: var(--radius-card); animation: swap-in var(--dur-short) var(--ease-out); }
.menu__panel a { display: flex; align-items: center; min-height: 48px; padding-inline: var(--space-md); border-radius: var(--radius-control); font-weight: 500; color: var(--color-ink); text-decoration: none; }
.menu__panel a:hover { background: var(--color-paper-2); }

/* ---------- hero: Stage ---------- */
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: center; padding-block: var(--space-xl) var(--space-3xl); }
.hero__text { grid-column: 1 / span 5; display: grid; gap: var(--space-lg); }
.hero__text h1 { font-size: clamp(3rem, 5.6vw, 5.5rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 9ch; }
.hero__text .lead { max-width: 28ch; }
.hero__visual { grid-column: 6 / span 7; position: relative; }
.photo--hero { min-height: 440px; }
.photo--hero .chip { inset-block: var(--space-md) auto; }

/* the hero's two cars: the large photograph crossfades, the small one shows the other car */
#hero-cars img:not(.is-shown) { display: none; }
.js #hero-cars img { display: block; opacity: 0; transition: opacity var(--dur-long) var(--ease-in-out); }
.js #hero-cars img.is-shown { opacity: 1; }
.switch { position: absolute; z-index: 2; inset-block-end: var(--space-md); inset-inline-end: var(--space-md); display: none; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); }
.js .switch { display: flex; }
.switch button { min-height: 44px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.switch button:hover { background: var(--color-paper); }
.switch button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.switch button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.photo__swap { position: absolute; z-index: 3; inset: 0; display: none; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.js .photo__swap { display: block; }
.photo__swap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.photo--inset { transition: transform var(--dur-short) var(--ease-out); }
.photo--inset:hover { transform: translateY(-4px); }
.photo--inset { position: absolute; inset-inline-start: calc(-1 * var(--space-xl)); inset-block-end: calc(-1 * var(--space-2xl)); width: 40%; box-shadow: 0 0 0 6px var(--color-paper); }
.photo--inset .chip { inset-block-end: var(--space-sm); inset-inline-start: var(--space-sm); }

/* ---------- booking: the choices, and the price on a field ---------- */
.offer { padding-block: var(--section-gap-s) 0; }
.offer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: stretch; }
.offer__choices { grid-column: 1 / span 6; display: grid; align-content: start; gap: var(--space-lg); padding-block: var(--space-xl); }
.offer__choices .lead { margin-bottom: var(--space-md); }

.seg { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); min-width: 0; }
.seg legend { float: left; width: 6.5rem; padding: 0; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-md); border-radius: var(--radius-control); background: var(--color-paper-2); font-weight: 500; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.seg label small { margin-inline-start: var(--space-xs); font-size: var(--text-sm); font-weight: 400; }
.seg label:hover { background: var(--color-paper-3); }
.seg label:active { transform: scale(0.97); }
.seg input:checked + label { background: var(--color-ink); color: var(--color-paper); }
.seg input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.seg input:disabled + label { opacity: 0.55; cursor: not-allowed; }

/* a booking row that holds a field instead of choices */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); min-width: 0; }
.row__label { width: 6.5rem; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.input { flex: 1 1 11rem; min-width: 0; min-height: 48px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-control); background: var(--color-paper-2); color: var(--color-ink); font: 500 var(--text-md)/1 var(--font-body); transition: background-color var(--dur-short) var(--ease-out); }
.input--short { flex: 0 1 11rem; text-transform: uppercase; }
.input--short::placeholder { text-transform: none; }
.input::placeholder { color: var(--color-muted); opacity: 1; }
.input:hover { background: var(--color-paper-3); }
.input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.input[type="date"] { flex: 0 1 14rem; }

.offer__field { grid-column: 7 / span 6; display: grid; align-content: space-between; gap: var(--space-2xl); padding: var(--field-pad); border-radius: var(--radius-card); }
.price { display: grid; justify-items: start; gap: var(--space-md); animation: swap-in var(--dur-long) var(--ease-out); }
.price__name { font-size: var(--text-lead); font-weight: 500; }
.price__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-md); }
.price__figure { font: var(--display-weight) clamp(3.5rem, 6.5vw, 6rem)/0.9 var(--font-display); letter-spacing: -0.045em; }
.price__was { font-size: var(--text-lead); font-weight: 500; }
.field .price__save { padding: var(--space-xs) var(--space-lg); border-radius: var(--radius-pill); background: var(--color-field-ink); color: var(--color-field); font: var(--display-weight) var(--text-xl)/1.2 var(--font-display); letter-spacing: -0.02em; }
.price__other { font-size: var(--text-lead); line-height: 1.4; max-width: 28ch; }
.price__other strong { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; }
.price__switch { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; }
.price__switch:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.price--10 { display: none; }
.offer:has(#h-10:checked) .price--1 { display: none; }
.offer:has(#h-10:checked) .price--10 { display: grid; }
.offer__send { display: grid; gap: var(--space-md); }
.offer__summary { font-weight: 500; }

/* ---------- cars and instructors ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); }
.cell { display: grid; align-content: start; gap: var(--space-md); }
.cell__body { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-sm) var(--space-lg); }
.cell__body > div { display: grid; gap: var(--space-2xs); }
.specs { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); padding-block-start: var(--space-md); border-block-start: var(--rule-hair) solid var(--color-rule); }
.specs div { display: grid; gap: var(--space-3xs); }
.specs dt { font-size: var(--text-sm); color: var(--color-muted); }
.specs dd { margin: 0; font-weight: 500; }
.cell--type { justify-items: start; grid-template-rows: auto 1fr auto; padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); min-height: 260px; }
.cell--type h3 { font-size: var(--text-display-s); line-height: 1; letter-spacing: -0.04em; }

.hotspot { position: absolute; z-index: 3; inset-inline-start: var(--x); inset-block-start: var(--y); width: 44px; height: 44px; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: var(--radius-pill); background: none; cursor: pointer; }
.hotspot::before { content: ""; position: absolute; inset: 12px; border-radius: inherit; background: var(--color-paper); box-shadow: 0 0 0 5px var(--color-mark); transition: transform var(--dur-short) var(--ease-out); }
.hotspot:hover::before, .hotspot[aria-expanded="true"]::before { transform: scale(1.25); }
.hotspot:focus-visible { outline: 2px solid var(--color-paper); outline-offset: 2px; }
/* the note shows on hover or keyboard focus, and stays open once the dot is tapped or clicked */
.hotspot:hover + .hotspot__note, .hotspot:focus-visible + .hotspot__note, .hotspot[aria-expanded="true"] + .hotspot__note { display: grid; }
.hotspot__note { position: absolute; z-index: 3; inset-inline-start: calc(var(--x) + var(--space-lg)); inset-block-start: calc(var(--y) - var(--space-lg)); display: none; gap: var(--space-2xs); max-width: min(17rem, 55%); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); font-size: var(--text-sm); color: var(--color-ink); animation: swap-in var(--dur-short) var(--ease-out); }

/* ---------- learn the area: pick a spot, read the tip, see it on the map ---------- */
.routes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: start; }
.routes__side { grid-column: 1 / span 5; display: grid; }
.spots { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; justify-items: start; gap: var(--space-xs); }
.spots input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spots label { font: var(--display-weight) var(--text-2xl)/1.15 var(--font-display); letter-spacing: -0.035em; color: var(--color-muted); cursor: pointer; transition: color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.spots label:hover { color: var(--color-ink); transform: translateX(6px); }
.spots input:checked + label { color: var(--color-mark); }
.spots input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 4px; }

.routes__map { grid-column: 6 / span 7; position: relative; }
.map { position: relative; z-index: 0; isolation: isolate; display: grid; place-items: center; aspect-ratio: 4 / 3; min-height: 420px; border-radius: var(--radius-card); background: var(--color-paper-2); overflow: hidden; font-family: var(--font-body); }
.map .leaflet-control-attribution { font-size: var(--text-xs); }
.map__fallback { padding: var(--space-lg); text-align: center; }
.pin { display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font: var(--display-weight) var(--text-sm)/1 var(--font-display); box-shadow: 0 0 0 3px var(--color-paper); transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.pin.is-on { background: var(--color-mark); transform: scale(1.2); z-index: 1000 !important; }
.tips { position: absolute; z-index: 1; inset-inline: var(--space-md) auto; inset-block-end: var(--space-md); display: grid; gap: var(--space-md); justify-items: start; max-width: min(24rem, calc(100% - 2 * var(--space-md))); padding: var(--space-lg); border-radius: var(--radius-card); }
.tip { display: none; gap: var(--space-xs); animation: swap-in var(--dur-long) var(--ease-out); }
.tip p { color: var(--color-ink); }
.routes:has(#s-1:checked) .tip--1, .routes:has(#s-2:checked) .tip--2, .routes:has(#s-3:checked) .tip--3, .routes:has(#s-4:checked) .tip--4 { display: grid; }

/* ---------- readiness: sliders and a score ---------- */
.quiz { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: stretch; }
.quiz__controls { grid-column: 1 / span 6; display: grid; align-content: start; gap: var(--space-lg); }
.quiz__controls .head { margin-bottom: var(--space-md); }
.range { display: grid; gap: var(--space-2xs); }
.range__row { display: flex; justify-content: space-between; gap: var(--space-md); font-weight: 500; }
.range output { color: var(--color-muted); }
.range input { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: none; cursor: pointer; }
.range input::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--color-accent) var(--fill, 50%), var(--color-paper-3) var(--fill, 50%)); }
.range input::-moz-range-track { height: 8px; border-radius: var(--radius-pill); background: var(--color-paper-3); }
.range input::-moz-range-progress { height: 8px; border-radius: var(--radius-pill); background: var(--color-accent); }
.range input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: calc(-1 * var(--space-xs)); border: 3px solid var(--color-accent); border-radius: var(--radius-pill); background: var(--color-paper); transition: transform var(--dur-micro) var(--ease-out); }
.range input::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid var(--color-accent); border-radius: var(--radius-pill); background: var(--color-paper); }
.range input:active::-webkit-slider-thumb { transform: scale(1.12); }
.range input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-control); }
.quiz__score { grid-column: 8 / span 5; display: grid; align-content: space-between; gap: var(--space-2xl); padding: var(--field-pad); }
/* the panel follows the score: dark below 60, amber from 60, green from 85 */
.quiz__score { transition: background-color var(--dur-long) var(--ease-out), color var(--dur-long) var(--ease-out); }
.quiz__score[data-level="mid"] { background: var(--color-nearly); color: var(--color-ink); --color-focus: var(--color-ink); }
.quiz__score[data-level="high"] { background: var(--color-field); color: var(--color-field-ink); --color-focus: var(--color-field-ink); }
.score { display: grid; gap: var(--space-sm); color: inherit; }
.score__figure { font: var(--display-weight) clamp(5.5rem, 12vw, 11rem)/0.82 var(--font-display); letter-spacing: -0.055em; }
.score__label { font-size: var(--text-lead); font-weight: 500; }
.score__foot { display: grid; gap: var(--space-md); justify-items: start; }

/* ---------- passes ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-columns); }
.bento > .photo { grid-column: span 3; }
.tile { grid-column: span 6; display: grid; align-content: space-between; gap: var(--space-lg); padding: var(--space-xl); border-radius: var(--radius-card); }
.figure { font: var(--display-weight) clamp(4.5rem, 9vw, 8.5rem)/0.82 var(--font-display); letter-spacing: -0.055em; color: inherit; }
.tile__label { font-size: var(--text-lead); font-weight: 500; color: inherit; }
.tile--google { background: var(--color-paper-2); color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.tile--google:hover { background: var(--color-paper-3); }

/* ---------- reviews ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.quote { margin: 0; display: grid; align-content: space-between; gap: var(--space-xl); padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); }
.quote blockquote { margin: 0; }
.quote blockquote p { font: 400 var(--text-lg)/1.35 var(--font-display); letter-spacing: -0.015em; color: var(--color-ink); text-indent: -0.42em; }
.quote figcaption { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.quote figcaption a { color: var(--color-ink); text-decoration: underline var(--rule-hair); text-underline-offset: 0.3em; }
.quote figcaption a:hover { color: var(--color-mark); }

/* ---------- instagram: a centred grid of the latest posts ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }
.post { display: grid; align-content: start; gap: var(--space-xs); text-decoration: none; color: var(--color-ink); }
.post:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-card); }
.post__frame { position: relative; display: block; aspect-ratio: 5 / 4; margin-bottom: var(--space-xs); border-radius: var(--radius-card); background: var(--color-paper-2); overflow: hidden; transition: transform var(--dur-long) var(--ease-out); }
.post:hover .post__frame { transform: translateY(-6px); }
.post__frame img { width: 100%; height: 100%; object-fit: cover; }
/* placed by instagram.js so the photograph inside a tall reel cover fills the frame, centred */
.post__frame img.is-placed { position: absolute; max-width: none; object-fit: fill; }
.post__text { font-weight: 500; line-height: 1.35; }
.post__date { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- phone booking bar ---------- */
.dock { display: none; }

/* ---------- footer: index columns ---------- */
.footer { margin-block-start: var(--section-gap); padding-block: var(--space-3xl) var(--space-xl); background: var(--color-paper-2); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: var(--space-xl) var(--gap-columns); }
.footer__brand { display: grid; align-content: start; gap: var(--space-md); }
.footer__brand p { max-width: 30ch; }
.footer__title { margin-bottom: var(--space-sm); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-xs); }
.footer li { color: var(--color-ink); }
.footer li a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.footer li a:hover { color: var(--color-mark); }
.footer__note { margin-block-start: var(--space-2xl); font-size: var(--text-sm); }
.footer__note p { color: var(--color-muted); max-width: none; }

/* ---------- instructor: sign-in and click-to-edit ---------- */
.footer__button { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; color: var(--color-ink); font: inherit; cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.footer__button:hover { color: var(--color-mark); }
.footer__button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.dialog { width: min(26rem, calc(100% - 2 * var(--space-md))); padding: 0; border: 0; border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink); }
.dialog::backdrop { background: var(--color-scrim); }
.dialog__form { display: grid; gap: var(--space-md); padding: var(--space-xl); }
.dialog h2 { font-size: var(--text-2xl); margin-bottom: var(--space-xs); }
.dialog__field { display: grid; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.dialog__field .input { flex: none; width: 100%; }
.dialog__error { min-height: 1lh; font-size: var(--text-sm); color: var(--color-error); }
/* no gap is held open for a message that is not there */
.gate__form .dialog__error:empty { display: none; }
.dialog__cancel { border: 0; background: none; font: 500 var(--text-md)/1 var(--font-body); cursor: pointer; min-height: 44px; }

.is-editing .is-editable { outline: 1px dashed var(--color-muted); outline-offset: 4px; border-radius: var(--space-2xs); cursor: text; }
.is-editing .is-editable:hover { outline-color: var(--color-ink); }
.is-editing .is-editable:focus { outline: 2px solid var(--color-focus); }
.is-editing .is-editable.is-unsaved { outline: 2px solid var(--color-error); }
.is-editing body { padding-block-end: var(--space-3xl); }
.editbar { position: fixed; z-index: var(--z-toast); inset-inline: var(--space-sm); inset-block-end: var(--space-sm); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-lg); max-width: 60rem; margin-inline: auto; padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg); border-radius: var(--radius-card); font-size: var(--text-sm); }
.editbar__who { font-weight: 500; color: var(--color-ink); }
.editbar__status { flex: 1 1 12rem; color: var(--color-ink-2); }
.editbar__status.is-problem { color: var(--color-error); font-weight: 500; }
.editbar__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.editbar .btn--quiet { background: var(--color-paper-2); }
.editbar .btn--quiet:hover { background: var(--color-paper-3); }

/* hotspots while editing: drag a dot, edit its note, add or remove one */
.is-editing .hotspot { cursor: grab; touch-action: none; }
.is-editing .hotspot:active { cursor: grabbing; }
.hotspot-add { position: absolute; z-index: 4; inset-block-start: var(--space-md); inset-inline-start: var(--space-md); min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; }
.hotspot-add:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.hotspot__remove { justify-self: start; min-height: 32px; padding: 0; border: 0; background: none; color: var(--color-error); font: 500 var(--text-sm)/1 var(--font-body); text-decoration: underline var(--rule-hair); text-underline-offset: 0.3em; cursor: pointer; }
.is-editing .dock { display: none; }
.replace { position: absolute; z-index: 4; inset-block-start: var(--space-md); inset-inline-end: var(--space-md); min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; }
.replace:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.is-editing .photo__swap { display: none; }

/* ---------- course page ---------- */
.btn--quiet { background: var(--color-paper-2); color: var(--color-ink); }
.btn--quiet:hover { background: var(--color-paper-3); }
.nav__back { font-size: var(--text-sm); }
.course-page h1 { font-size: var(--text-display-s); line-height: 1; letter-spacing: -0.04em; }
.course-page .panel { background: var(--color-paper-2); }
/* fields on a tinted panel are lighter than it, so they can be seen */
.course-page .panel .input { flex: none; width: 100%; background: var(--color-paper); box-shadow: inset 0 0 0 1px var(--color-rule); }
.course-page .panel .input:hover { background: var(--color-paper); }
.course-page .panel .btn--quiet { background: var(--color-paper-3); }
.course-page .panel .btn--quiet:hover { background: var(--color-rule); }
select.input { appearance: auto; }

.gate { padding-block: var(--space-3xl) 0; }
/* someone already signed in: hold the sign-in form back until their own screen is ready */
.is-returning .gate { display: none; }
.is-returning main { min-height: 100vh; }
.gate__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: center; }
.gate__text { grid-column: 1 / span 6; display: grid; gap: var(--space-lg); }
.gate__form { grid-column: 8 / span 5; display: grid; gap: var(--space-md); padding: var(--space-xl); }
.gate__form .btn { justify-self: start; }
.gate__note { font-size: var(--text-sm); color: var(--color-muted); }

.course, .desk { padding-block: var(--space-2xl) 0; }
.course__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md) var(--space-xl); margin-bottom: var(--space-lg); }
.course__top > div { display: grid; gap: var(--space-sm); }
.course__out, .course__next { border: 0; background: none; min-height: 44px; font: 500 var(--text-md)/1 var(--font-body); cursor: pointer; }
.course__bar { height: var(--space-xs); margin-bottom: var(--space-2xl); border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
.course__bar span { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); transform-origin: left; transform: scaleX(0); transition: transform var(--dur-long) var(--ease-out); }
.course__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: start; }
.course__list { grid-column: 1 / span 4; display: grid; gap: var(--space-2xs); }
.course__module { margin-block: var(--space-md) var(--space-xs); font: 500 var(--text-sm)/1.4 var(--font-body); letter-spacing: 0; color: var(--color-muted); }
.course__module:first-child { margin-block-start: 0; }
.lesson { display: flex; align-items: center; gap: var(--space-sm); min-height: 52px; padding: var(--space-xs) var(--space-md); border: 0; border-radius: var(--radius-control); background: none; color: var(--color-ink); font: 500 var(--text-md)/1.3 var(--font-body); text-align: start; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.lesson:hover { background: var(--color-paper-2); }
.lesson[aria-current="true"] { background: var(--color-ink); color: var(--color-paper); }
.lesson:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.lesson__mark { flex: 0 0 auto; width: var(--space-lg); height: var(--space-lg); border-radius: var(--radius-pill); box-shadow: inset 0 0 0 2px var(--color-muted); transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.lesson.is-done .lesson__mark { background: var(--color-accent); box-shadow: inset 0 0 0 2px var(--color-accent), inset 0 0 0 6px var(--color-paper); }
.course__player { grid-column: 5 / span 8; display: grid; gap: var(--space-lg); }
.player { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius-card); background: var(--color-ink); color: var(--color-paper); overflow: hidden; }
.player iframe { width: 100%; height: 100%; border: 0; }
.player p { color: inherit; }
.course__lesson { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-lg); }
.course__lesson > div:first-child { flex: 1 1 20rem; display: grid; gap: var(--space-sm); }
.course__lesson h2 { font-size: var(--text-2xl); line-height: 1.1; }
#lesson-done[aria-pressed="true"] { background: var(--color-accent); }

/* The instructor desk is a working screen: steady type sizes, even spacing, one section at a time. */
.desk h1 { font-size: var(--text-3xl); }
.desk h2 { font-size: var(--text-xl); line-height: 1.2; }
.desk h3 { font-size: var(--text-lg); line-height: 1.2; }
.desk__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
.desk__links { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.tabs { display: flex; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-paper-2); width: fit-content; max-width: 100%; }
.tab { min-height: 44px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-ink-2); font: 500 var(--text-md)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.tab:hover { color: var(--color-ink); }
.tab[aria-selected="true"] { background: var(--color-ink); color: var(--color-paper); }
.tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.desk__status { min-height: 1lh; margin-block: var(--space-md) var(--space-lg); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); max-width: none; }
.desk__status.is-problem { color: var(--color-error); }
.desk__area { display: grid; gap: var(--space-lg); }
.desk__head { display: grid; gap: var(--space-2xs); }
.desk__empty { padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink-2); max-width: none; }
.desk .input { flex: none; width: 100%; }
.btn--danger:hover { background: var(--color-error); color: var(--color-paper); }

/* students: the list beside the form that adds to it */
.desk__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: var(--space-xl) var(--gap-columns); align-items: start; }
.desk__main { display: grid; gap: var(--space-md); min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.table th, .table td { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-block-end: var(--rule-hair) solid var(--color-rule); text-align: start; vertical-align: middle; }
.table thead th { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.table tbody th { font-weight: 500; }
.table td { color: var(--color-ink-2); }
.student-row__progress { white-space: nowrap; }
.meter { display: inline-block; width: 5rem; height: var(--space-xs); margin-inline-end: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; vertical-align: middle; }
.meter span { display: block; height: 100%; background: var(--color-accent); transform-origin: left; }
.table .student-row__actions { text-align: end; white-space: nowrap; padding-inline-end: 0; }
.student-row__actions .btn + .btn { margin-inline-start: var(--space-2xs); }
.student-add { display: grid; gap: var(--space-md); padding: var(--space-lg); position: sticky; top: var(--space-4xl); }
.student-add__pair { display: grid; gap: var(--space-md); }

/* lessons: one module per panel, one lesson per row */
.modules { display: grid; gap: var(--space-lg); }
.module-edit { display: grid; gap: var(--space-md); padding: var(--space-lg); }
.module-edit__head { display: flex; align-items: end; gap: var(--space-md); }
.module-edit__title { flex: 1 1 auto; }
.module-edit__foot { display: flex; }
.lesson-edit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(9rem, 2fr) auto; gap: var(--space-sm) var(--space-md); align-items: end; padding-block-start: var(--space-md); border-block-start: var(--rule-hair) solid var(--color-rule); }
.lesson-edit__tip { grid-column: 1 / span 3; }
.desk__bar { position: sticky; bottom: var(--space-sm); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); padding: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper); box-shadow: 0 0 0 1px var(--color-rule); width: fit-content; max-width: 100%; }
.desk__dirty { padding-inline: var(--space-xs) var(--space-md); font-size: var(--text-sm); font-weight: 500; color: var(--color-error); }

/* settings: what it is on the left, its fields on the right */
.settings { display: grid; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-md) var(--gap-columns); padding-block: var(--space-lg); border-block-start: var(--rule-hair) solid var(--color-rule); }
.setting__about { display: grid; align-content: start; gap: var(--space-2xs); }
.setting__about p { font-size: var(--text-sm); }
.desk .setting__name { font-size: var(--text-lg); line-height: 1.2; }
.setting__fields { display: grid; gap: var(--space-md); justify-items: start; max-width: 32rem; }
.setting__fields .dialog__field { width: 100%; }

/* ---------- narrow screens ---------- */
@media (max-width: 60rem) {
  :root { --field-pad: var(--space-xl); }
  .hero__grid { row-gap: var(--space-xl); padding-block-end: var(--space-2xl); }
  .offer { padding-block-start: var(--space-xl); }
  .hero__text, .hero__visual, .offer__choices, .offer__field, .routes__side, .routes__map, .quiz__controls, .quiz__score { grid-column: 1 / -1; }
  .photo--hero { min-height: 0; }
  .photo--inset { inset-inline-start: var(--space-sm); inset-block-end: calc(-1 * var(--space-xl)); width: 44%; }
  .photo--inset .chip { display: none; }
  .nav__links { display: none; }
  /* the booking bar at the foot of the screen carries this button instead */
  .nav__end:has(.menu) .btn { display: none; }
  .menu { display: block; }
  /* a solid panel: glass inside the glass bar cannot blur what is behind it, so the page showed through */
  .menu__panel { background: var(--color-paper); border-color: var(--color-rule); box-shadow: var(--shadow-card); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__row { padding-inline: var(--space-md) var(--space-xs); min-height: 56px; }
  .wordmark { font-size: min(var(--text-xl), 6.6vw); }
  .wordmark--large { font-size: min(var(--text-3xl), 10.5vw); }
  .head--split { grid-template-columns: minmax(0, 1fr); }
  .gate__text, .gate__form, .course__list, .course__player { grid-column: 1 / -1; }
  .course__player { order: -1; }
  .desk__split { grid-template-columns: minmax(0, 1fr); }
  .student-add { position: static; }
  .setting { grid-template-columns: minmax(0, 1fr); }
  .lesson-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* on narrower screens the tip comes before the remove button */
  .lesson-edit__tip { grid-column: 1 / -1; order: 4; }
  .lesson-edit__for { grid-column: 1; order: 3; }
  .lesson-edit__remove { justify-self: start; order: 5; }
  .nav__back { display: none; }
  .map { min-height: 0; }
  .tips { position: static; max-width: none; margin-block-start: var(--space-md); background: var(--color-paper-2); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bento > .photo { grid-column: span 6; }
  .tile { grid-column: 1 / -1; }
  .quotes { grid-template-columns: minmax(0, 1fr); }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--gap-columns); }
  .dock { position: fixed; z-index: var(--z-sticky); inset-inline: var(--gutter); inset-block-end: max(var(--space-sm), env(safe-area-inset-bottom)); display: flex; align-items: center; gap: var(--space-xs); max-width: 26rem; margin-inline: auto; padding: var(--space-xs); border-radius: var(--radius-pill); transition: transform var(--dur-long) var(--ease-out), opacity var(--dur-short) var(--ease-out), visibility 0s; }
  .dock .btn { flex: 1 1 auto; }
  .dock .btn--quiet { flex: 0 0 auto; }
  /* out of the way while the hero's own button, the booking block or the footer is on screen */
  .js .dock:not(.is-shown) { transform: translateY(150%); opacity: 0; visibility: hidden; transition: transform var(--dur-long) var(--ease-in), opacity var(--dur-short) var(--ease-out), visibility 0s var(--dur-long); }
  .footer { padding-block-end: var(--space-2xl); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  /* rhythm: less air under a heading and inside the coloured blocks */
  :root { --field-pad: var(--space-lg); --gutter: 20px; }
  .head { gap: var(--space-xs); margin-bottom: var(--space-lg); }
  /* hero: the headline on two lines, the action, and both cars, all on the first screen */
  .hero__grid { row-gap: var(--space-lg); padding-block: var(--space-xl) var(--space-2xl); }
  .hero__text { gap: var(--space-md); }
  .hero__text h1 { max-width: none; font-size: clamp(2.5rem, 12.3vw, 3rem); line-height: 1; letter-spacing: -0.04em; }
  .hero__text .lead { max-width: none; font-size: clamp(1rem, 4.6vw, 1.125rem); text-wrap: balance; }
  .hero__text .actions { gap: var(--space-sm) var(--space-md); margin-block-start: var(--space-2xs); }
  /* the rating keeps a finger-sized target without holding the rows around it apart */
  .hero__text a.rating { min-height: 0; padding-block: var(--space-sm); margin-block: calc(-1 * var(--space-sm)); }
  .photo--hero { aspect-ratio: 3 / 2; }
  .photo--hero .chip { inset-block-start: var(--space-sm); inset-inline-start: var(--space-sm); }
  .switch { inset-block-end: var(--space-xs); inset-inline-end: var(--space-xs); }
  .switch button { padding: 0 var(--space-sm); }
  /* the other car, small, hanging off the lower corner as it does on a wide screen */
  .photo--inset { inset-inline-start: var(--space-xs); inset-block-end: calc(-1 * var(--space-lg)); width: 30%; box-shadow: 0 0 0 4px var(--color-paper); }
  /* too small to hold the photo button while editing; both photographs can be replaced in the cars section */
  .is-editing .photo--inset { display: none; }

  /* booking: each group is a row of equal buttons under its label */
  .offer { padding-block-start: 0; }
  .offer__choices { padding-block: var(--space-lg); }
  .offer__choices .lead { margin-bottom: 0; }
  .seg { display: grid; grid-template-columns: repeat(var(--seg-cols, 2), minmax(0, 1fr)); }
  .seg--3 { --seg-cols: 3; }
  .seg legend { float: none; width: 100%; padding-block-end: var(--space-xs); }
  .seg label { flex-direction: column; justify-content: center; min-height: 52px; padding: var(--space-xs) var(--space-sm); line-height: 1.25; text-align: center; }
  .seg label small { margin-inline-start: 0; }
  .seg__more { display: none; }
  .row__label { width: 100%; }
  .row .input { flex: 1 1 7rem; }
  .row .input[type="date"] { flex-basis: 100%; }
  .row .input--short { flex: 0 0 10.5rem; }
  .offer__field { gap: var(--space-lg); }
  /* with text enlarged, the price block and its button stay inside the screen */
  .offer__field, .price, .offer__send { grid-template-columns: minmax(0, 1fr); }
  .btn { max-width: 100%; padding-block: var(--space-xs); line-height: 1.2; white-space: normal; text-align: center; }
  .price { gap: var(--space-sm); }

  /* cars: the details as a short list, name on the left and value on the right */
  .grid2 { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); }
  .specs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block-start: 0; border-block-start: 0; }
  .specs div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-sm); border-block-start: var(--rule-hair) solid var(--color-rule); }
  .specs dd { text-align: end; }
  .cell--type { grid-template-rows: none; gap: var(--space-xs); padding: var(--space-lg); min-height: 0; }
  .cell--type h3 { font-size: var(--text-2xl); }
  .cell--type + .cell--type { margin-block-start: calc(-1 * var(--space-md)); }
  .hotspot__note { inset-inline-start: var(--space-sm); inset-block-start: auto; inset-block-end: calc(var(--space-md) + 44px); max-width: calc(100% - 2 * var(--space-sm)); }

  /* learn the area: the map, then the four spots numbered like its pins, then the chosen tip */
  .routes { row-gap: var(--space-md); }
  .routes__side, .routes__map { display: contents; }
  .routes .head, .map, .spots, .tips { grid-column: 1 / -1; }
  .routes .head { order: 1; margin-bottom: var(--space-xs); }
  .map { order: 2; }
  .spots { order: 3; counter-reset: spot; justify-items: stretch; gap: 0; }
  .spots label { counter-increment: spot; display: flex; align-items: center; gap: var(--space-sm); min-height: 52px; border-block-end: var(--rule-hair) solid var(--color-rule); font-size: var(--text-lg); line-height: 1.2; letter-spacing: -0.02em; color: var(--color-ink-2); }
  .spots label::before { content: counter(spot); flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); letter-spacing: 0; transition: background-color var(--dur-short) var(--ease-out); }
  .spots label:hover { transform: none; }
  .spots input:checked + label { color: var(--color-ink); }
  .spots input:checked + label::before { background: var(--color-mark); }
  .tips { order: 4; margin-block-start: 0; }
  /* the chosen spot is already named in the list above the tip */
  .tip h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* readiness: the score sits above the sliders, so it is in view while they move */
  .quiz { row-gap: var(--space-lg); }
  .quiz__controls { display: contents; }
  .quiz .head, .quiz .range, .quiz .seg, .quiz__score { grid-column: 1 / -1; }
  .quiz .head { order: 1; margin-bottom: 0; }
  .quiz__score { order: 2; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-md); padding: var(--space-lg) var(--space-md); }
  .quiz .range, .quiz .seg { order: 3; }
  .score { gap: var(--space-2xs); }
  .score__figure { min-width: 2ch; font-size: 4.5rem; }
  .score__label { font-size: var(--text-sm); }
  .score__foot { gap: var(--space-xs); }

  /* passes: the two figures side by side, then the photographs */
  .tile { grid-column: span 6; order: -1; gap: var(--space-md); padding: var(--space-md); }
  .figure { font-size: clamp(2.25rem, 11vw, 3rem); font-variant-numeric: tabular-nums; }
  .tile__label { font-size: var(--text-sm); line-height: 1.4; }

  .quotes { gap: var(--space-sm); }
  .quote { gap: var(--space-md); padding: var(--space-lg); }
  .quote blockquote p { font-size: 1.125rem; }

  .posts { gap: var(--space-lg) var(--gap-columns); }
  .post:nth-child(n + 5) { display: none; }
  .post__text { font-size: var(--text-sm); }

  .footer { padding-block-start: var(--space-2xl); }
  .footer__grid > div:nth-child(2) { grid-column: 1 / -1; }
  .footer ul { gap: 0; }
  .footer li a, .footer__button { min-height: 44px; }
  .footer li:not(:has(a, button)) { padding-block: var(--space-xs); }
  .footer__note { margin-block-start: var(--space-xl); }

  /* editing on a phone: a shorter bar, so more of the page stays in view */
  .editbar { gap: var(--space-xs); padding: var(--space-sm); }
  .editbar__who { display: none; }
  .editbar__status { flex-basis: 100%; }
  .editbar__actions { width: 100%; }
  .editbar__actions .btn { flex: 1 1 auto; min-height: 40px; padding-inline: var(--space-sm); }

  /* course page */
  .gate { padding-block-start: var(--space-xl); }
  .gate__text { gap: var(--space-sm); }
  .gate__form { padding: var(--space-lg); }
  .course, .desk { padding-block-start: var(--space-lg); }
  .course__bar { margin-bottom: var(--space-lg); }

  .lesson-edit { grid-template-columns: minmax(0, 1fr); }
  .lesson-edit__tip, .lesson-edit__for { grid-column: auto; }
  .tab { padding: 0 var(--space-md); }
  .module-edit__head { flex-wrap: wrap; }
  /* the student table becomes one block per student */
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-sm); border-block-end: var(--rule-hair) solid var(--color-rule); }
  .table th, .table td { padding: 0; border: 0; }
  .table tbody th { grid-column: 1 / -1; }
  .table .student-row__actions { grid-column: 1 / -1; text-align: start; padding-block-start: var(--space-xs); }
}

/* fingers need a taller target than a line of text: the extra is added around text links without moving anything */
@media (pointer: coarse) {
  .link, .quote figcaption a { padding-block: var(--space-sm); margin-block: calc(-1 * var(--space-sm)); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .price, .tip, .menu__panel, .hotspot__note { animation: none; }
  .btn:hover, .btn:active, .spots label:hover, .cell:hover > .photo, .bento > .photo:hover, .post:hover .post__frame, .photo--inset:hover, .pin.is-on { transform: none; }
  .js #hero-cars img { transition: none; }
  .course__bar span, .quiz__score { transition: none; }
}
