/* TRA Network: one stylesheet for every page. Asphalt ink on a light page, one accent (hazard amber), the system
   fonts, tap targets of 48 px or more. Amber is a fill only, never text on the light page: it fails contrast there.
   Contrast (WCAG AA): ink on paper 16.6:1, ink-2 on white 9.3:1, ink on amber 10.4:1, danger on white 7.7:1. */
:root {
  --ink: #15171b;
  --ink-2: #42474f;
  --paper: #f7f6f2;
  --card: #fff;
  --line: #d3d0c7;
  --field: #5f646c;
  --accent: #ffb81c;
  --danger: #a4161a;
  --danger-bg: #fff4f3;
  --dark-2: #1f2228;
  --dark-line: #3a3f47;
  --dark-muted: #c9ccd1;
  --radius: 12px;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  overflow-wrap: break-word;
}
h1, h2, h3 { margin: 0 0 .5em; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.35rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 3px; }
svg { flex: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.site-header :focus-visible, .band-dark :focus-visible, .home-area :focus-visible { outline-color: var(--accent); }
main:focus, [tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Set on <html> in <head> by site.js from config.js, before the first paint: nothing appears or vanishes later. */
html:not(.has-phone) .call-only,
html.has-phone .no-phone-only,
html:not(.has-turnstile) .turnstile-only { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -200px; z-index: 10;
  padding: .75rem 1rem; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--accent); color: var(--ink); font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 42rem; }
@media (min-width: 40rem) { :root { --gutter: 24px; } }

/* Header: asphalt, with an amber lane line along its edge */
.site-header { background: var(--ink); color: #fff; }
.site-header::after {
  content: ""; display: block; height: 6px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 34px, transparent 34px 58px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 48px; color: #fff; text-decoration: none; }
.mark { width: 40px; height: 40px; }
.brand-name { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.brand-sub { display: none; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); }
@media (min-width: 30rem) { .brand-sub { display: block; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 56px; padding: .7rem 1.25rem;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 24px; height: 24px; }
.btn-primary, .btn-call { background: var(--accent); box-shadow: 0 4px 0 var(--ink); }
.btn-primary:active, .btn-call:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-quiet { min-height: 48px; padding: .5rem .25rem; border-color: transparent; background: transparent; text-decoration: underline; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-head { min-height: 48px; padding: .5rem 1rem; border-color: var(--accent); background: var(--accent); }
.btn-head svg { width: 22px; height: 22px; }
@media (max-width: 399px) { .btn-head { min-width: 48px; padding: .5rem; } .head-label { display: none; } }
.btn-911 { border-color: var(--danger); background: var(--danger); color: #fff; }

/* Landing */
.hero { padding: 2rem 0 2.5rem; }
.hero-grid { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 60rem) {
  .hero { padding: 3.5rem 0 3.75rem; }
  .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 3rem; }
}
.eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.beacon { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--ink); flex: none; }
.lead { max-width: 38rem; font-size: 1.1875rem; color: var(--ink-2); }
.cta { display: grid; gap: 1rem; margin: 1.5rem 0 .9rem; }
@media (min-width: 36rem) { .cta { grid-template-columns: repeat(auto-fit, minmax(15rem, max-content)); align-items: stretch; } }
.btn-call { justify-content: flex-start; min-height: 76px; padding: .6rem 1.5rem; font-size: 1.375rem; }
.btn-call svg { width: 30px; height: 30px; }
.btn-call-text { display: grid; text-align: left; }
.btn-call-main { font-weight: 800; }
.btn-call-number { display: block; min-height: 1.3em; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.btn-request { min-height: 64px; font-size: 1.1875rem; }
html:not(.has-phone) .btn-request { min-height: 76px; background: var(--accent); box-shadow: 0 4px 0 var(--ink); font-size: 1.375rem; }
html:not(.has-phone) .btn-request:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.cta-note { font-size: 1rem; color: var(--ink-2); }

.card { padding: 1.25rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); }
.ready h2 { font-size: 1.375rem; }
.checklist { display: grid; gap: .75rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 2.2rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 1.4rem; height: 1.4rem;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--accent);
}
.checklist li::after {
  content: ""; position: absolute; left: .5rem; top: .35em; width: .4rem; height: .75rem;
  border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.safety { margin: 0; padding: .8rem 1rem; border-left: 5px solid var(--danger); background: var(--danger-bg); font-size: 1rem; }

.section { padding: 2.75rem 0; }
.section-white { background: var(--card); border-block: 2px solid var(--line); }
.section-intro { max-width: 40rem; color: var(--ink-2); }

/* How it works: the steps as mile markers */
.steps { display: grid; gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1.1rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); }
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; color: var(--ink-2); }
.marker {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 3.4rem; height: 4.6rem; border-radius: 9px;
  background: var(--ink); color: #fff; font-weight: 800;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px #fff;
}
.marker small { font-size: .6875rem; letter-spacing: .16em; }
.marker b { font-size: 1.9rem; line-height: 1; }
.home-area { display: grid; gap: .3rem; margin-top: 1.25rem; padding: 1.1rem 1.25rem; border-left: 8px solid var(--accent); border-radius: 16px; background: var(--ink); color: #fff; }
.home-area h3 { margin: 0; }
.home-area p { margin: 0; color: var(--dark-muted); }

/* The help it sends */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.services li { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: center; padding: 1.1rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
.svc-icon { display: grid; place-items: center; grid-row: span 2; width: 3.25rem; height: 3.25rem; border: 2px solid var(--ink); border-radius: 12px; background: var(--accent); }
.svc-icon svg { width: 30px; height: 30px; }
.services h3 { margin: 0; }
.services p { margin: 0; font-size: 1rem; color: var(--ink-2); }
@media (min-width: 64rem) {
  .services { grid-template-columns: repeat(5, 1fr); }
  .services li { grid-template-columns: 1fr; align-content: start; }
  .svc-icon { grid-row: auto; margin-bottom: .5rem; }
}

/* For repair shops: a dark band */
.band-dark { background: var(--ink); color: #fff; }
.band-dark .lead { color: var(--dark-muted); }
.eyebrow-dark { color: var(--accent); }
.shops-grid { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .shops-grid { grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; } }
.shop-points { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.shop-points li { padding: 1rem 1.1rem; border: 2px solid var(--dark-line); border-left: 6px solid var(--accent); border-radius: 12px; background: var(--dark-2); color: var(--dark-muted); }
.shop-points strong { display: block; margin-bottom: .15rem; font-size: 1.125rem; color: #fff; }

/* Footer */
.site-footer { padding: 2rem 0 1.25rem; border-top: 2px solid var(--ink); background: var(--card); font-size: 1rem; }
.footer-grid { display: grid; gap: 1rem 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.1fr 1fr 1fr; } }
.footer-brand { margin: 0 0 .35rem; }
address { font-style: normal; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-call a { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; font-weight: 700; }
.footer-call { margin: 0; }
.phone-slot { display: inline-block; min-width: 7.6em; font-variant-numeric: tabular-nums; }
.fine { margin: 1rem 0 0; font-size: .9375rem; color: var(--ink-2); }

/* Page heads (request, quote, pay, legal) */
.page-head { padding: 1.75rem 0 .25rem; }
.page-head .lead { margin-bottom: .75rem; }
.callout { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; font-weight: 700; }
.app-main { min-height: 100vh; min-height: 100svh; }

/* Forms */
.form { display: grid; gap: 1.25rem; margin: 1rem 0 2.5rem; }
.panel { padding: 1.1rem 1rem 1.25rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); }
@media (min-width: 36rem) { .panel { padding: 1.4rem 1.5rem 1.5rem; } }
.panel-title { display: flex; align-items: center; gap: .7rem; margin: 0 0 .25rem; font-size: 1.375rem; }
.panel-title::before {
  content: ""; width: .85rem; height: .85rem; flex: none;
  border: 2px solid var(--ink); border-radius: 3px; background: var(--accent); transform: rotate(45deg);
}
.field { display: grid; gap: .4rem; margin-top: 1.1rem; }
.field > label:not(.choice), .label { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.hint { margin: 0; font-size: 1rem; color: var(--ink-2); }
.opt { font-weight: 400; color: var(--ink-2); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; min-height: 56px; padding: .75rem .9rem;
  border: 2px solid var(--field); border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1.125rem;
}
textarea { min-height: 7rem; line-height: 1.45; resize: vertical; }
input:focus-visible, textarea:focus-visible { border-color: var(--ink); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger) !important; background: var(--danger-bg) !important; }
.error { margin: 0; padding: .1rem 0 .1rem .7rem; border-left: 4px solid var(--danger); color: var(--danger); font-size: 1rem; font-weight: 700; }
fieldset.group { min-width: 0; margin: 1.1rem 0 0; padding: 0; border: 0; }
fieldset.group > legend { margin: 0 0 .5rem; padding: 0; font-size: 1.0625rem; font-weight: 700; }
fieldset.group > .hint { margin-bottom: .6rem; }
fieldset.group > .error { margin-top: .6rem; }
/* 11.5rem fits a radio, an icon and "Electrical" without spilling: one column on a phone, two or three wider */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .6rem; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: .7rem; min-height: 56px; padding: .6rem .9rem;
  border: 2px solid var(--field); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer;
}
.choice input { width: 1.5rem; height: 1.5rem; margin: 0; flex: none; accent-color: var(--ink); }
.choice svg { width: 26px; height: 26px; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--accent); box-shadow: 0 3px 0 var(--ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.consent { align-items: flex-start; font-weight: 400; line-height: 1.5; }
.consent input { width: 1.75rem; height: 1.75rem; margin-top: .05rem; }
/* a ticked permission stays white (a paragraph on amber glares in the sun): the tick and a dark edge say it */
.consent:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.done .danger-box { margin: 0 0 1rem; }
.danger-box { margin-top: 1rem; padding: 1rem 1.1rem; border: 3px solid var(--danger); border-radius: 14px; background: var(--danger-bg); }
.danger-title { margin: 0 0 .35rem; font-size: 1.5rem; font-weight: 800; color: var(--danger); }
.gps-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.gps-status { margin: 0; font-size: 1rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.turnstile-slot { min-height: 65px; }
/* Turnstile's normal widget is a fixed 300 px: the panel is narrower than that below 375 px, so compact (150x140) there */
@media (max-width: 374px) { .turnstile-slot { min-height: 140px; } }
.submit-row { margin-top: 1.4rem; }
.status { min-height: 1.55em; margin: .75rem 0 0; font-weight: 700; }
.alert { margin-top: 1rem; padding: 1rem 1.1rem; border: 3px solid var(--danger); border-radius: 14px; background: var(--danger-bg); }
.alert p { margin: 0 0 .75rem; font-weight: 700; }
.alert p:last-child { margin: 0; }

/* Answers: done, tickets, amounts */
.done { margin: 1rem 0 2.5rem; padding: 1.4rem 1.25rem; border: 3px solid var(--ink); border-radius: 16px; background: var(--card); }
.done-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .75rem; }
.done-head h2 { margin: 0; }
.done-check { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--accent); }
.done-check svg { width: 26px; height: 26px; }
.ticket { display: grid; gap: .15rem; margin: 1rem 0; padding: .9rem 1rem; border: 2px dashed var(--ink); border-radius: 12px; background: var(--paper); }
.ticket-label { margin: 0; font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.ticket-ref { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 1.375rem; font-weight: 700; letter-spacing: .03em; }
.job-what { margin: .5rem 0 0; font-size: 1.375rem; }
.facts { display: grid; gap: .7rem; margin: 1rem 0; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font-size: .875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 0; }
.note { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 5px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--paper); font-size: 1rem; }
.money-input { position: relative; }
.money-input > span { position: absolute; top: 50%; left: .95rem; transform: translateY(-50%); font-weight: 700; color: var(--ink-2); pointer-events: none; }
.money-input > input { padding-left: 2rem; }
.actions { display: grid; gap: .9rem; margin-top: 1.4rem; }
@media (min-width: 36rem) { .actions { grid-template-columns: 1fr 1fr; } }
.stop-box { margin: 1.5rem 0 2.5rem; padding-top: 1rem; border-top: 2px solid var(--line); }
.stop-box p { margin: 0 0 .25rem; color: var(--ink-2); }
.amount { display: grid; gap: .2rem; margin: 1.1rem 0; }
.amount-label { font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.amount-value { font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.paid { margin: 1rem 0 0; padding: 1rem 1.1rem; border: 3px solid var(--ink); border-radius: 14px; background: var(--accent); font-size: 1.25rem; font-weight: 800; }
.pay-actions { display: grid; gap: .9rem; }

/* Legal drafts */
.prose { max-width: 44rem; padding-bottom: 3rem; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .45rem; }
.draft { display: inline-block; margin: 0 0 1rem; padding: .35rem .75rem; border: 2px dashed var(--ink); border-radius: 8px; background: var(--accent); font-weight: 800; }

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