/* The page's layout: five ways to place the words as the page walks round the truck were tried; the owner picked 5,
   which the page uses unless ?layout= asks for another (0 is the earlier page). Every rule is scoped to
   html[data-layout="N"]. layouts.js adds each option's extra pieces and, with ?layout=, the switcher.
     1 Dispatch rail     the number and a call button never leave the screen; the words change beside them
     2 Captions          the truck fills the screen; the words sit in a band along the bottom
     3 Docked request    the tow request form stays open on the right the whole way down
     4 Callouts          the truck's facts are pinned to its parts with leader lines
     5 Intro, then page  the walk-around first, with the words over the sky; then an ordinary page */

/* ---------- the switcher (only with ?layout= in the address) ---------- */
.lay-switch {
  position: fixed; z-index: 40; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(5, 5, 6, .94); border: 1px solid var(--rule); box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  font: 650 .9rem/1 var(--font);
}
.lay-switch a { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border-radius: 999px; text-decoration: none; color: #d8d7d2; }
.lay-switch a:hover { color: #fff; background: rgba(243, 242, 238, .09); }
.lay-switch a[aria-current="page"] { background: var(--gold); color: #000; }
.lay-switch .name { padding: 0 14px 0 8px; color: var(--ink); white-space: nowrap; }
.lay-switch .step, .lay-switch .short { display: none; }
/* (kept clear of each layout's own fixed pieces) */
html:is([data-layout="1"], [data-layout="4"], [data-layout="5"]) .lay-switch { left: auto; right: 16px; }
html[data-layout="2"] .lay-switch { left: auto; right: 16px; bottom: auto; top: calc(var(--head-h) + 12px); }
html[data-layout="3"] .lay-switch { left: 50%; transform: translateX(-50%); }
@media (max-width: 760px) {
  /* on a phone: back, the option's number, next */
  .lay-switch, html[data-layout] .lay-switch { left: auto; right: 10px; top: auto; bottom: 12px; transform: none; gap: 0; }
  html:is([data-layout="1"], [data-layout="2"], [data-layout="3"]) .lay-switch { bottom: auto; top: calc(var(--head-h) + 8px); }
  .lay-switch .num, .lay-switch .name { display: none; }
  .lay-switch .step { display: grid; }
  .lay-switch .short { display: block; padding: 0 4px; color: var(--ink); white-space: nowrap; }
}

/* pieces only some layouts use */
.rail-bg, .rail-dispatch, .callbar, .formbar, .callouts, .sheet-close, .sheet-scrim { display: none; }

/* the bottom bars (layouts 1 and 3, phones) */
.callbar, .formbar {
  gap: 8px; position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #050506; border-top: 1px solid var(--rule);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, .5);
}
.callbar .btn, .formbar .btn { min-height: 50px; }
.callbar .btn-call, .formbar .btn-call { flex: 1; }

/* fixed text blocks that change with the stop (layouts 1 and 2): hidden until their stop is the one on screen
   (":is(..., #_)" only lifts a rule above the page's own "#work .panel" rule; nothing has that id) */
html:is([data-layout="1"], [data-layout="2"], [data-layout="5"]) .lay-fixed { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
html:is([data-layout="1"], [data-layout="2"], [data-layout="5"]) .is-active > .lay-fixed { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  html:is([data-layout="1"], [data-layout="2"], [data-layout="5"]) .lay-fixed { transform: none; transition: none; }
}

/* ======================= 1  Dispatch rail ======================= */
html[data-layout="1"] { --rail-w: clamp(360px, 31vw, 470px); --disp-h: 230px; }
@media (min-width: 761px) {
  html[data-layout="1"] .rail-bg { display: block; position: fixed; z-index: 9; left: 0; top: var(--head-h); bottom: 0; width: var(--rail-w); background: #060607; border-right: 1px solid var(--rule); }
  /* (the gold line down the rail's edge is how far round the truck you are) */
  html[data-layout="1"] .rail-bg::after { content: ""; position: absolute; right: -1px; top: 0; width: 2px; height: calc(var(--progress, 0) * 100%); background: var(--gold); }
  html[data-layout="1"] .rail-dispatch { display: grid; gap: 14px; position: fixed; z-index: 11; left: 0; top: var(--head-h); width: var(--rail-w); padding: 26px 32px 24px; border-bottom: 1px solid var(--rule); }
  html[data-layout="1"] .rail-dispatch .phone-big { font-size: clamp(2.1rem, 2.7vw, 2.8rem); }
  html[data-layout="1"] .rail-dispatch .actions { flex-wrap: nowrap; }
  html[data-layout="1"] .rail-dispatch .actions .btn { flex: 1; padding: 0 14px; }
  html[data-layout="1"] main :is(.lay-fixed, #_) {
    position: fixed; z-index: 12; left: 0; top: calc(var(--head-h) + var(--disp-h)); bottom: 0; width: var(--rail-w); max-width: none;
    padding: 28px 32px 32px; overflow-y: auto; display: grid; gap: 18px; align-content: start;
    background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none; color: var(--ink);
  }
  html[data-layout="1"] .hero .logo, html[data-layout="1"] .hero .actions { display: none; }
  html[data-layout="1"] .hero h1 { font-size: clamp(2rem, 2.6vw, 2.7rem); }
  html[data-layout="1"] .hero .lede, html[data-layout="1"] .hero .hint { color: #dcdbd6; }
  html[data-layout="1"] main h2 { font-size: clamp(1.55rem, 2vw, 2.1rem); }
  html[data-layout="1"] .services { grid-template-columns: 1fr; }
  /* (the rail already carries the number) */
  html[data-layout="1"] #contact .text .phone-big, html[data-layout="1"] #contact .text .muted { display: none; }
  html[data-layout="1"] footer { padding-left: calc(var(--rail-w) + var(--gutter)); }
}
@media (max-width: 760px) {
  html[data-layout="1"] .callbar { display: flex; }
  html[data-layout="1"] .bar .btn-call { display: none; }
  html[data-layout="1"] footer { padding-bottom: 100px; }
}

/* ======================= 2  Captions ======================= */
@media (min-width: 761px) {
  html[data-layout="2"] main :is(.lay-fixed, #_) {
    position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 50vh; overflow-y: auto;
    padding: 26px var(--gutter) 30px; display: grid; grid-template-columns: minmax(15rem, .85fr) 2fr; gap: 16px 56px; align-items: start; align-content: start;
    background: rgba(5, 5, 6, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 0; border-top: 1px solid var(--rule); border-radius: 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .35); text-shadow: none; color: var(--ink);
  }
  html[data-layout="2"] main :is(.lay-fixed, #_) > * { grid-column: 2; }
  html[data-layout="2"] main :is(.lay-fixed, #_) > :is(h1, h2, .head, .text) { grid-column: 1; grid-row: 1 / span 4; }
  html[data-layout="2"] .hero .logo { display: none; }
  html[data-layout="2"] .hero h1 { font-size: clamp(2.2rem, 3.2vw, 3.3rem); }
  html[data-layout="2"] .hero .lede, html[data-layout="2"] .hero .hint { color: #dcdbd6; }
  html[data-layout="2"] .specs { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: auto auto; column-gap: 36px; }
  html[data-layout="2"] .specs dt { padding: 10px 0 2px; }
  html[data-layout="2"] .specs dd { border-top: 0; padding: 0 0 4px; }
  html[data-layout="2"] .gallery { grid-template-columns: repeat(4, 1fr); }
  html[data-layout="2"] .services { grid-template-columns: repeat(3, 1fr); }
  html[data-layout="2"] .towns { grid-template-columns: repeat(4, 1fr); }
  html[data-layout="2"] #contact form { grid-template-columns: 1fr 1fr; align-items: end; }
  html[data-layout="2"] #contact form .row { grid-column: 1 / -1; }
}
/* (no footer: at the end it would sit over the truck, above the band) */
html[data-layout="2"] footer { display: none; }
@media (max-width: 760px) {
  html[data-layout="2"] main :is(.lay-fixed, #_) {
    position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 54vh; overflow-y: auto;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); gap: 14px; border-radius: 14px 14px 0 0;
    background: rgba(5, 5, 6, .95); border: 0; border-top: 1px solid var(--rule); text-shadow: none; color: var(--ink);
  }
  html[data-layout="2"] .hero .logo { display: none; }
  html[data-layout="2"] .hero h1 { font-size: 1.7rem; }
  html[data-layout="2"] .hero .lede { color: #dcdbd6; }
}

/* ======================= 3  Docked request ======================= */
@media (min-width: 761px) {
  html[data-layout="3"] { --dock-w: clamp(300px, 22vw, 350px); }
  html[data-layout="3"] main #contact > .panel {
    position: fixed; z-index: 12; top: calc(var(--head-h) + 16px); right: 24px; width: var(--dock-w); max-height: calc(100vh - var(--head-h) - 32px); overflow-y: auto;
    padding: 22px 22px 18px; gap: 16px; background: rgba(5, 5, 6, .92); transition: border-color .3s, box-shadow .3s;
  }
  /* (at the last stop the dock lights up: this is where the walk ends) */
  html[data-layout="3"] main #contact.is-active > .panel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 40px rgba(0, 0, 0, .4); }
  html[data-layout="3"] #contact h2 { font-size: 1.5rem; }
  html[data-layout="3"] #contact .text { gap: 8px; }
  html[data-layout="3"] #contact .phone-big { font-size: 1.9rem; }
  html[data-layout="3"] #contact form { gap: 12px; }
  html[data-layout="3"] #contact input, html[data-layout="3"] #contact select { min-height: 46px; }
  html[data-layout="3"] :is(.beat.right, .section.right) { justify-content: flex-start; }
  html[data-layout="3"] main :is(.panel, #work .panel) { width: min(100%, 26rem, 27vw); }
  html[data-layout="3"] .beat.hero > div { max-width: min(24rem, 27vw); }
  html[data-layout="3"] .hero .logo { width: min(220px, 20vw); }
  html[data-layout="3"] .hero h1 { font-size: clamp(2rem, 2.8vw, 2.9rem); }
  html[data-layout="3"] .services { grid-template-columns: 1fr; }
  html[data-layout="3"] footer { padding-right: calc(var(--dock-w) + 48px); }
}
@media (max-width: 760px) {
  html[data-layout="3"] .formbar { display: flex; }
  html[data-layout="3"] .bar .btn-call { display: none; }
  html[data-layout="3"] main #contact > .panel {
    position: fixed; z-index: 27; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto;
    padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; background: #060607;
    transform: translateY(105%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s;
  }
  html[data-layout="3"].sheet-open main #contact > .panel { transform: none; visibility: visible; transition-delay: 0s; }
  html[data-layout="3"] .sheet-close {
    display: grid; place-items: center; position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: rgba(243, 242, 238, .08); color: var(--ink); font: 400 1.6rem/1 var(--font); cursor: pointer;
  }
  html[data-layout="3"] .sheet-scrim { position: fixed; inset: 0; z-index: 26; background: rgba(0, 0, 0, .55); }
  html[data-layout="3"].sheet-open .sheet-scrim { display: block; }
  html[data-layout="3"] footer { padding-bottom: 100px; }
  @media (prefers-reduced-motion: reduce) { html[data-layout="3"] main #contact > .panel { transition: none; } }
}

/* ======================= 4  Callouts ======================= */
@media (min-width: 761px) {
  html[data-layout="4"] .callouts { display: block; position: fixed; inset: 0; z-index: 9; pointer-events: none; }
  html[data-layout="4"] .callouts svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  html[data-layout="4"] .callouts line { stroke: rgba(233, 177, 46, .9); stroke-width: 1.5; }
  html[data-layout="4"] .callouts circle { fill: var(--gold); stroke: rgba(0, 0, 0, .55); stroke-width: 3; paint-order: stroke; }
  html[data-layout="4"] .co {
    position: absolute; left: 0; top: 0; padding: 10px 14px 11px; border-radius: 3px; background: rgba(5, 5, 6, .88);
    border: 1px solid var(--rule); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); white-space: nowrap; color: var(--ink);
    font: 700 1rem/1.25 var(--font); font-stretch: 108%;
  }
  html[data-layout="4"] .co small { display: block; margin-bottom: 3px; color: var(--steel); font-weight: 500; font-size: .84rem; font-stretch: 100%; }
  /* the story cards stay at the top left while their stop is on screen (swapping as the walk moves on); their
     details are on the truck instead */
  html[data-layout="4"] main :is(.lay-fixed, #_) { position: fixed; z-index: 12; top: calc(var(--head-h) + 20px); left: var(--gutter); width: min(30rem, 38vw); gap: 14px; }
  html[data-layout="4"] .lay-fixed { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
  html[data-layout="4"] .is-active > .lay-fixed { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  html[data-layout="4"] #rig .specs, html[data-layout="4"] #lift .muted { display: none; }
}

/* ======================= 5  Intro, then page ======================= */
html[data-layout="5"] main :is(.lay-fixed, #_) {
  position: fixed; z-index: 12; top: calc(var(--head-h) + 28px); left: 0; right: 0; margin: 0 auto; width: min(46rem, calc(100vw - 2 * var(--gutter))); max-width: none;
  justify-items: center; text-align: center; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 18px rgba(0, 0, 0, .5);
}
html[data-layout="5"] .beat .lede, html[data-layout="5"] .beat .muted, html[data-layout="5"] .beat .hint { color: #fff; }
html[data-layout="5"] .beat .btn { text-shadow: none; }
html[data-layout="5"] .hero .logo, html[data-layout="5"] .hero .hint { display: none; }
/* The sections after the walk-around. Each link in the header lands with its section's heading just under the header
   (52 px below it): the section's top padding (--sec-pad) goes up behind the header. */
html[data-layout="5"] .section {
  --sec-pad: 64px; min-height: 0; display: block; background: #050506;
  padding: var(--sec-pad) var(--gutter); scroll-margin-top: calc(44px - var(--sec-pad));
}
/* The first section (what we tow) opens with a fade from the sunset into black above its heading (--first-pad deep);
   the fade ends 56 px above the heading, so after a jump from its link it stays tucked behind the header. */
html[data-layout="5"] .story + .section {
  --first-pad: 120px; padding-top: var(--first-pad); scroll-margin-top: calc(44px - var(--first-pad));
  background: linear-gradient(to bottom, rgba(5, 5, 6, 0), #050506 calc(var(--first-pad) - 56px));
}
/* (then the sections alternate black and a raised black) */
html[data-layout="5"] :is(#work, #contact, #reviews) { background: #0a0b0d; }
/* (with the reviews showing, the request box after them turns black again, so the sections keep alternating) */
html[data-layout="5"] #reviews:not([hidden]) + #contact { background: #050506; }
html[data-layout="5"] main :is(.section > .panel, #work .panel) {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 0; background: none; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; gap: 34px;
}
html[data-layout="5"] footer { background: #050506; }
@media (min-width: 761px) {
  html[data-layout="5"] .hero h1 { font-size: clamp(2.9rem, 5vw, 5rem); }
  html[data-layout="5"] .section { --sec-pad: clamp(84px, 9vw, 128px); }
  html[data-layout="5"] .story + .section { --first-pad: clamp(150px, 15vw, 210px); }
  html[data-layout="5"] .head h2 { font-size: clamp(2.8rem, 4.6vw, 4.4rem); line-height: 0.96; }
  /* service area: the heading, the state map across the page, then the locations beside the routes */
  html[data-layout="5"] main #area .area { row-gap: 44px; }
  html[data-layout="5"] .area-lists { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); column-gap: clamp(40px, 5vw, 72px); }
  html[data-layout="5"] .area-lists .towns { grid-template-columns: none; }
  html[data-layout="5"] .roads { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  html[data-layout="5"] .contact { grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
}
html[data-layout="5"] .area-map { display: block; }
/* recent jobs: the job photos in a mosaic of "plates", two on computers and five on phones. Like the slanted gold
   plate under "TOWING" in the logo, every plate leans forward (--lean, with --t its tangent); the photos inside stay
   upright. A plate is two grid rows tall: the lead photo takes two columns and two rows, the upright photos two rows,
   the small and wide ones one row (the upper or lower half of their plate). Every photo leans about the middle of its
   plate, so the slanted gaps between them stay even; the rows are as tall as a 4:3 photo one column wide (container
   units), and the gallery is inset by the lean's overhang (--over) so the plates' corners stay inside the page. */
html[data-layout="5"] #work .panel { container-type: inline-size; }
html[data-layout="5"] #work .gallery {
  --cols: 4; --gap: 14px; --lean: 8deg; --t: 0.1405;
  --k: calc(0.75 / var(--cols));
  --row: calc(var(--k) * (100cqi - var(--t) * var(--gap) - (var(--cols) - 1) * var(--gap)) / (1 + 2 * var(--k) * var(--t)));
  --over: calc((var(--row) + var(--gap) / 2) * var(--t));
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: var(--row);
  gap: var(--gap); padding-inline: var(--over);
}
html[data-layout="5"] #work .job {
  --h: var(--row);
  position: relative; display: block; overflow: hidden; border-radius: 3px; background: var(--raised);
  transform: skewX(calc(-1 * var(--lean)));
}
html[data-layout="5"] #work :is(.job-lead, .job-tall) { grid-row: span 2; --h: calc(2 * var(--row) + var(--gap)); }
html[data-layout="5"] #work :is(.job-lead, .job-wide) { grid-column: span 2; }
html[data-layout="5"] #work .job-upper { transform-origin: 50% calc(100% + var(--gap) / 2); }
html[data-layout="5"] #work .job-lower { transform-origin: 50% calc(var(--gap) / -2); }
html[data-layout="5"] #work .job .photo { position: absolute; inset: 0; aspect-ratio: auto; }
/* (each photo leans back by the same angle, so it shows upright, and is drawn wider than its frame by the lean, so it
   still fills the slanted corners) */
html[data-layout="5"] #work .job img {
  position: absolute; top: 0; left: calc(var(--h) * var(--t) / -2);
  width: calc(100% + var(--h) * var(--t)); height: 100%; max-width: none; transform: skewX(var(--lean));
}
/* (a photo under the mouse gets a gold edge to show it opens; one reached with the keyboard a thicker one, drawn over
   the photo, since the upright photo would cover an outline) */
html[data-layout="5"] #work .job .photo:focus-visible { outline: none; }
html[data-layout="5"] #work .job .photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--gold); transition: box-shadow .18s ease-out;
}
html[data-layout="5"] #work .job .photo:hover::after { box-shadow: inset 0 0 0 3px var(--gold); }
html[data-layout="5"] #work .job .photo:focus-visible::after { box-shadow: inset 0 0 0 4px var(--gold), inset 0 0 0 6px #000; }
@media (max-width: 760px) {
  html[data-layout="5"] #work .gallery { --cols: 2; --gap: 10px; }
  /* (the wide photos take two rows on a phone, a plate of their own, or they'd be thin strips) */
  html[data-layout="5"] #work .job-wide { grid-row: span 2; --h: calc(2 * var(--row) + var(--gap)); transform-origin: 50% 50%; }
}
/* services: the logo's own vocabulary. Its lettering leans forward and "TOWING" sits on a slanted gold plate, so here
   the heading and the six service names are set in the headline cut's heavy italic, each service's icon stands black
   on a small slanted gold plate (lit like the logo's, lighter at the top), and the photo's caption is a gold plate
   tag on its corner. The six sit on one board joined by hairlines; beside it the heading, the call buttons and the
   photo (wide screens), above it (medium), or all in one column (phones). */
html[data-layout="5"] main #services .services-panel {
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "fig" "list"; row-gap: 36px; column-gap: 0; align-items: start;
}
html[data-layout="5"] #services .head { grid-area: head; gap: 16px; }
html[data-layout="5"] #services .head p { color: #c9ccd1; font-size: clamp(1.1rem, 1.3vw, 1.25rem); text-wrap: pretty; hyphens: manual; }
html[data-layout="5"] #services .head p .nowrap { white-space: nowrap; }
html[data-layout="5"] #services .head .actions { margin-top: 8px; }
html[data-layout="5"] .services-figure { grid-area: fig; position: relative; display: block; }
html[data-layout="5"] .services-figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--raised); }
html[data-layout="5"] .services-figure figcaption {
  position: absolute; left: 16px; bottom: 16px; padding: 9px 16px; border-radius: 3px; transform: skewX(-12deg);
  background: linear-gradient(#f6c94f, #e0a51f); color: #000; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
html[data-layout="5"] .services-figure figcaption span { display: block; transform: skewX(12deg); font: italic 800 1.02rem/1.1 var(--font-display); }
html[data-layout="5"] .services {
  grid-area: list; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); border-top: 3px solid var(--gold); border-radius: 4px; overflow: hidden;
}
html[data-layout="5"] .services li { border-top: 0; padding: clamp(24px, 2.6vw, 36px); gap: 10px; align-content: start; background: linear-gradient(#111216, #0b0c0e); }
html[data-layout="5"] .svc-plate {
  display: grid; place-items: center; width: 64px; height: 46px; margin: 0 0 10px 6px; border-radius: 3px; transform: skewX(-12deg);
  background: linear-gradient(#f6c94f, #e0a51f); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16);
}
html[data-layout="5"] .services .svc-plate .svc-icon { width: 30px; height: 30px; margin: 0; color: #000; stroke-width: 2.1; transform: skewX(12deg); }
html[data-layout="5"] .services h3 { font-style: italic; font-weight: 800; font-size: clamp(1.45rem, 1.9vw, 1.75rem); line-height: 1.05; letter-spacing: -0.005em; }
html[data-layout="5"] .services p { color: #c3c7cc; font-size: 1.02rem; line-height: 1.55; max-width: 26em; }
/* how it works (the walk-around's second stop): on a computer the four steps stand side by side, each centred under
   its plate, and the gold line runs across from plate to plate; on a phone they run down the side (page styles) */
@media (min-width: 761px) {
  html[data-layout="5"] main #rig:is(.beat, #_) > .lay-fixed { width: min(62rem, calc(100vw - 2 * var(--gutter))); }
  html[data-layout="5"] .steps { --plate-w: 64px; --plate-h: 46px; --step-gap: clamp(18px, 2.4vw, 36px); grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--step-gap); margin-top: 8px; }
  html[data-layout="5"] .steps li { grid-template-columns: none; justify-items: center; text-align: center; row-gap: 6px; }
  html[data-layout="5"] .step-plate { grid-row: auto; margin-bottom: 12px; }
  html[data-layout="5"] .step-plate .svc-icon { width: 28px; height: 28px; stroke-width: 2.1; }
  html[data-layout="5"] .steps li:not(:last-child)::after {
    left: calc(50% + var(--plate-w) / 2 + 12px); right: auto; top: calc(var(--plate-h) / 2 - 1px); bottom: auto;
    width: calc(100% + var(--step-gap) - var(--plate-w) - 24px); height: 2px;
  }
  html[data-layout="5"] .steps h3 { font-size: clamp(1.3rem, 1.7vw, 1.55rem); }
  html[data-layout="5"] .steps p { max-width: 15.5em; }
}
@media (min-width: 1100px) {
  html[data-layout="5"] .specs { grid-template-columns: repeat(4, auto); width: auto; }
  html[data-layout="5"] .specs > div { padding: 16px 26px 17px; }
  html[data-layout="5"] .specs > div:nth-child(n) { border-top: 0; border-left: 1px solid var(--rule); }
  html[data-layout="5"] .specs > div:first-child { border-left: 0; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  html[data-layout="5"] main #services .services-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head fig" "list list"; column-gap: 40px; }
}
@media (min-width: 1100px) {
  html[data-layout="5"] main #services .services-panel {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr); grid-template-rows: auto 1fr; grid-template-areas: "head list" "fig list";
    column-gap: clamp(48px, 5vw, 80px); row-gap: 36px;
  }
  /* (the photo fills the column down to the board's foot, so the two end level) */
  html[data-layout="5"] .services-figure { align-self: stretch; min-height: 280px; }
  html[data-layout="5"] .services-figure img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-position: 55% 50%; }
}
@media (max-width: 760px) {
  /* (phones: one service under another, the icon beside its name to keep them short) */
  html[data-layout="5"] .services { grid-template-columns: minmax(0, 1fr); }
  html[data-layout="5"] .services li { grid-template-columns: 54px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 20px 18px; }
  html[data-layout="5"] .svc-plate { grid-row: span 2; width: 50px; height: 38px; margin: 2px 0 0 4px; }
  html[data-layout="5"] .services .svc-plate .svc-icon { width: 25px; height: 25px; }
  html[data-layout="5"] .services h3 { font-size: 1.4rem; }
  html[data-layout="5"] #services .head .actions .btn { flex: 1 1 auto; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  /* (medium screens: the routes under the locations, across the page, so their names don't wrap) */
  html[data-layout="5"] .area-lists { grid-template-columns: none; }
  html[data-layout="5"] .area-lists .towns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  html[data-layout="5"] main #area .area { gap: 30px; }
  html[data-layout="5"] .area-lists { grid-template-columns: none; }
  html[data-layout="5"] .area-lists .towns { grid-template-columns: 1fr 1fr; }
  html[data-layout="5"] .roads { grid-template-columns: none; }
  /* (on a phone the state is small: just the four locations are named on it, in bigger letters, and the roads lose
     their shields; the cities and routes are in the lists below) */
  html[data-layout="5"] .area-map .cities-map text, html[data-layout="5"] .area-map .shield { display: none; }
  html[data-layout="5"] .area-map .city-dot { r: 7px; }
  html[data-layout="5"] .area-map .roads-map path { stroke-width: 4; }
  html[data-layout="5"] .area-map .bases-map circle { r: 13px; stroke-width: 4; }
  html[data-layout="5"] .area-map .bases-map text { font-size: 40px; stroke-width: 9px; }
  html[data-layout="5"] main :is(.lay-fixed, #_) { top: calc(var(--head-h) + 14px); gap: 12px; }
  html[data-layout="5"] .specs { width: 100%; }
  html[data-layout="5"] .steps { width: min(100%, 22.5rem); --step-gap: 12px; }
  html[data-layout="5"] .hero h1 { font-size: 2.45rem; }
  html[data-layout="5"] .head h2 { font-size: 2.5rem; line-height: 1; }
}
