/* Final Mile — built for over-the-road drivers.
   Gunmetal and asphalt chrome, brushed-steel bevels kept subtle, and amber
   accents like a rig's clearance lights. High contrast so it reads in a cab. */
:root {
  --ink: #16191d;          /* asphalt */
  --ink-2: #22272d;        /* gunmetal */
  --ink-3: #343b44;        /* steel */
  --steel-4: #4b545e;
  --paper: #eef0f2;        /* cool off-white */
  --card: #ffffff;
  --line: #d6dadf;
  --line-2: #c3c9cf;
  --muted: #5f6873;
  --text: #16191d;
  --signal: #f5a524;       /* clearance-light amber */
  --signal-deep: #c47f0e;
  --go: #2f8a4c;
  --wait: #a86f08;
  --stop: #c0392b;
  --off: #8a929b;
  --link: #1f5fa8;
  --chrome: linear-gradient(180deg, #ffffff 0%, #eef1f4 38%, #d5dade 52%, #e8ebee 100%);
  --chrome-dark: linear-gradient(180deg, #3a414a 0%, #262b31 48%, #1b1f24 52%, #2a3037 100%);
  --brushed: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
  --radius: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(22, 25, 29, .08), 0 6px 18px rgba(22, 25, 29, .07);
  --topbar-h: 58px;
  --sidebar-w: 360px;
  --font-head: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue Condensed", "Segoe UI", system-ui, sans-serif;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-family: var(--font-head); }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
h3 { font-size: .98rem; font-weight: 700; letter-spacing: .03em; }
.num, td.num, .stat b { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .75rem; } .mt-2 { margin-top: 1rem; } .my-1 { margin: .75rem 0; }
.flex-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.text-go { color: var(--go); } .text-stop { color: var(--stop); }
.fw-normal { font-weight: 400; }
.list-tight { padding-left: 1.1rem; }

/* ---------------- Top bar: dark gunmetal with a chrome trim line ---------------- */
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
  background: var(--brushed), linear-gradient(180deg, #262b31 0%, #1a1e22 100%);
  color: #f1f3f5; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 0 #5b636c, 0 2px 0 #0d0f11, 0 6px 16px rgba(0, 0, 0, .25);
}
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark {
  width: 32px; height: 28px; border-radius: 5px; display: grid; place-items: center;
  background: var(--chrome); color: var(--ink); font: 900 .78rem/1 var(--font-head); letter-spacing: .06em;
  border: 1px solid #8d959e; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 0 0 2px #1a1e22, 0 0 0 3px var(--signal);
}
.nav { display: flex; gap: .2rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: #c9ced4; padding: .42rem .75rem; border-radius: 5px; white-space: nowrap; font: 700 .95rem/1.2 var(--font-head);
  letter-spacing: .07em; text-transform: uppercase; border: 1px solid transparent; }
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; border-color: #48505a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--signal), inset 0 1px 0 rgba(255, 255, 255, .08); }
.nav a.drive { color: var(--signal); }
.user { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: #c9ced4; }
.user form { margin: 0; }
.user a { color: #c9ced4; }
.linkish { background: none; border: 0; color: #c9ced4; cursor: pointer; font: inherit; padding: 0; }
.linkish:hover { color: #fff; text-decoration: underline; }
.linkish.danger { color: var(--stop); }
.svc-toggle { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .7rem; border-radius: 5px; cursor: pointer;
  background: var(--chrome-dark); color: #eef0f2; border: 1px solid #555d66; font: 700 .9rem/1 var(--font-head);
  letter-spacing: .07em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.svc-toggle[aria-expanded="true"] { border-color: var(--signal-deep); color: var(--signal); }

/* ---------------- Layout ---------------- */
.shell { min-height: calc(100dvh - var(--topbar-h)); }
.page { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; min-width: 0; }
.page-narrow { max-width: 460px; margin: 3rem auto; padding: 0 1rem; }
.full { height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); position: relative; min-width: 0; }
.map-fill { height: 100%; }
.split { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; height: calc(100dvh - var(--topbar-h)); min-width: 0; }
.split > .panel { overflow-y: auto; padding: 1rem; background: var(--card); border-right: 1px solid var(--line); }
.split > .map { min-height: 300px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head p { margin: .2rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* The services sidebar sits beside the page on wide screens and slides over it on smaller ones. */
@media (min-width: 1100px) {
  body.with-sidebar.sidebar-open .shell { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-w); }
  body.with-sidebar.sidebar-open .svc-sidebar { position: sticky; top: var(--topbar-h); height: calc(100dvh - var(--topbar-h)); }
  body.with-sidebar:not(.sidebar-open) .svc-sidebar { display: none; }
}
@media (max-width: 1099px) {
  .svc-sidebar { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: min(var(--sidebar-w), 92vw); z-index: 1500;
    transform: translateX(105%); transition: transform .2s ease; box-shadow: -10px 0 30px rgba(0, 0, 0, .25); }
  body.sidebar-open .svc-sidebar { transform: none; }
}

@media (max-width: 560px) {
  .topbar { gap: .45rem; padding: 0 .55rem; }
  .brand-name, .svc-toggle-label { display: none; }
  .nav a { padding: .4rem .45rem; font-size: .88rem; letter-spacing: .04em; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 45dvh auto; height: auto; }
  .split > .map { order: -1; height: 45dvh; }
  .split > .panel { border-right: 0; border-top: 1px solid var(--line); }
  .grid-2 { grid-template-columns: 1fr; }
  .user .who { display: none; }
}

/* ---------------- Cards, forms, buttons ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-top-color: #e7eaed; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; position: relative; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #c9ced4, #f4f6f8 30%, #aab1b8 60%, #e4e7ea); opacity: .9; }
.card > h2:first-child { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .1rem; }
.map-card { padding: 0; overflow: hidden; }
.map-card::before { display: none; }
.map-box { height: 420px; }
.map-box.tall { height: 560px; }

label { display: block; font-weight: 700; font-size: .82rem; margin: .65rem 0 .25rem; letter-spacing: .02em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=search],
input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: .58rem .7rem; border: 1px solid var(--line-2); border-radius: 6px; font: inherit; background: #fff; color: var(--text);
  box-shadow: inset 0 1px 2px rgba(22, 25, 29, .06);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--signal-deep); }
input[type=range] { width: 100%; accent-color: var(--signal-deep); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink-3); }
.helptext, .form-help { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.errorlist { color: var(--stop); margin: .25rem 0; padding-left: 1rem; font-size: .85rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.checkbox input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .9rem .9rem; margin: .9rem 0; }
legend { font: 800 .85rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 0 .35rem; color: var(--ink-3); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .2rem .8rem; margin: .3rem 0 0; padding: 0; list-style: none; }
.check-grid label { display: flex; align-items: center; gap: .4rem; font-weight: 500; margin: .15rem 0; font-size: .88rem; }
.check-grid input { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .95rem;
  border-radius: 6px; border: 1px solid #aeb5bc; background: var(--chrome); color: var(--text); font: inherit; font-weight: 700;
  font-size: .9rem; cursor: pointer; white-space: nowrap; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, .08), 0 1px 2px rgba(22, 25, 29, .12); }
.btn:hover { filter: brightness(1.03); border-color: #8f979f; text-decoration: none; }
.btn:active { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--chrome-dark); border-color: #0f1214; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .25); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-signal { background: linear-gradient(180deg, #ffc85c 0%, #f5a524 55%, #e0920f 100%); border-color: #b9770a; color: #1a1306;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 2px rgba(0, 0, 0, .2); }
.btn-danger { color: var(--stop); border-color: #e3b3ad; }
.btn-go { background: linear-gradient(180deg, #45a465, #2f8a4c); border-color: #23683a; color: #fff; }
.btn-stop { background: linear-gradient(180deg, #d4544a, #c0392b); border-color: #8f2a20; color: #fff; }
.btn-call { background: linear-gradient(180deg, #45a465, #2f8a4c); border-color: #23683a; color: #fff; }
.btn-sm { padding: .3rem .58rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-static { cursor: default; }
.inline-form { display: inline; margin: 0; }

/* ---------------- Status pills and badges ---------------- */
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 4px; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; border: 1px solid transparent; white-space: nowrap; }
.pill-validated { background: #e1f3e6; color: var(--go); border-color: #bfe3c9; }
.pill-pending { background: #fdf3d7; color: var(--wait); border-color: #f2dc9c; }
.pill-flagged { background: #fbe4e1; color: var(--stop); border-color: #f2c3bd; }
.pill-rejected { background: #eceef0; color: var(--off); border-color: #dadde1; }
.pill-best { background: var(--signal); color: var(--ink); }
.pill-gps { background: #e3e9f3; color: #2c4a7a; }
.pill-cat { background: var(--chrome); border-color: #b9c0c7; color: var(--ink-3); }
.badge { display: inline-block; padding: .05rem .4rem; border-radius: 3px; font-size: .68rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.badge-verified { background: #e1f3e6; color: var(--go); border: 1px solid #bfe3c9; }
.badge-ad { background: #fff3da; color: #8a5a00; border: 1px solid #f0cf86; }
.badge-here { background: var(--signal); color: var(--ink); }

/* Community trust badges: earned from other drivers' votes. */
.trust { display: inline-block; padding: 0 .38rem; border-radius: 3px; font: 800 .66rem/1.55 var(--font-head);
  letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; border: 1px solid; }
.trust-rookie { color: #6b737c; border-color: #cfd4d9; background: #f3f5f6; }
.trust-driver { color: #2c4a7a; border-color: #b9c8de; background: #eaf0f8; }
.trust-trusted { color: #1f6a3a; border-color: #b4dcc1; background: #e6f4ea; }
.trust-veteran { color: #1a1306; border-color: #b9770a; background: linear-gradient(180deg, #ffd27a, #f5a524); }
.trust-staff { color: #fff; border-color: #0f1214; background: var(--chrome-dark); }

.stars { color: var(--signal-deep); letter-spacing: .05em; }

/* ---------------- Tables & lists ---------------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 800 .74rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
tr.is-best td { background: #fff7e6; }
tr[data-route]:hover td { background: #f4f6f7; cursor: pointer; }
.table-wrap { overflow-x: auto; }

.attr-group { margin-bottom: .9rem; }
.attr-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .3rem; }
.attr { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.attr:last-child { border-bottom: 0; }
.attr-value { font-weight: 600; word-break: break-word; }
.attr-label { color: var(--muted); font-weight: 500; font-size: .85rem; }
.attr-meta { color: var(--muted); font-size: .75rem; }
.vote { display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 1.8rem; }
.vote form { margin: 0; }
.vote button { background: none; border: 0; cursor: pointer; color: #9aa1a9; font-size: .95rem; padding: 0 .2rem; }
.vote button:hover { color: var(--ink-3); }
.vote button.on-up { color: var(--go); }
.vote button.on-down { color: var(--stop); }
.vote button:disabled { cursor: default; opacity: .35; }
.vote .score { font-size: .8rem; font-weight: 800; }
.attr.downvoted, .comment.downvoted, .review.downvoted { opacity: .55; }

.comment, .review { display: grid; grid-template-columns: auto 1fr; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child, .review:last-child { border-bottom: 0; }
.comment-meta { color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.comment-meta b { color: var(--text); }
.comment-body { white-space: pre-wrap; margin-top: .2rem; }

.issues { margin: .4rem 0; padding: .6rem .8rem .6rem 1.8rem; background: #fbecea; border: 1px solid #f2c3bd; border-radius: 6px; color: #6e1b13; font-size: .85rem; }
.issues.note { background: #eef4fb; border-color: #c4d6ec; color: #1d3a63; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.stat { background: linear-gradient(180deg, #fbfcfc, #f1f3f5); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .6rem;
  box-shadow: inset 0 1px 0 #fff; }
.stat span { display: block; font: 800 .7rem/1.3 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat b { font-size: 1.15rem; }
.stat b .rec-indicator { display: inline-flex; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--stop); }

/* ---------------- Services: listing header, facts, ratings ---------------- */
.svc-title { display: flex; align-items: center; gap: .7rem; }
.svc-title .svc-icon { width: 46px; height: 46px; font-size: 1.5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; margin: 0; }
.facts div { background: linear-gradient(180deg, #fbfcfc, #f1f3f5); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; }
.facts dt { font: 800 .7rem/1.3 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: .1rem 0 0; font-weight: 700; word-break: break-word; }
.amenities { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .7rem 0 0; }
.amenities li { padding: .2rem .55rem; border-radius: 4px; background: var(--chrome); border: 1px solid #c3c9cf; font-size: .82rem; font-weight: 600; }
.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; margin-bottom: .6rem; }
.rating-big { text-align: center; }
.rating-big b { display: block; font: 800 2.4rem/1 var(--font-head); }
.rating-bars { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.rating-bars li { display: grid; grid-template-columns: 2.6rem 1fr 2rem; gap: .4rem; align-items: center; }
.rating-bars progress { width: 100%; height: .55rem; appearance: none; border: 0; border-radius: 3px; background: #e4e7ea; overflow: hidden; }
.rating-bars progress::-webkit-progress-bar { background: #e4e7ea; }
.rating-bars progress::-webkit-progress-value { background: var(--signal); }
.rating-bars progress::-moz-progress-bar { background: var(--signal); }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; margin: .2rem 0; padding: 0; border: 0; }
.star-input ul, .star-input div { display: contents; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { margin: 0; font-size: 1.7rem; line-height: 1; color: #c3c9cf; cursor: pointer; }
.star-input label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--signal); }
.star-input input:focus-visible + label { outline: 2px solid var(--signal-deep); outline-offset: 2px; }

/* ---------------- Services sidebar ---------------- */
.svc-sidebar { background: #f7f8f9; border-left: 1px solid var(--line-2); overflow-y: auto; padding: .9rem .9rem 1.5rem;
  display: flex; flex-direction: column; gap: .7rem; }
.svc-head { display: flex; align-items: center; justify-content: space-between; }
.svc-head h2 { margin: 0; }
.svc-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.svc-where { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--muted); }
.svc-help { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .55rem; border-radius: 6px;
  background: var(--chrome-dark); }
.svc-help-label { font: 800 .78rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin-right: .2rem; }
.svc-help-btn { padding: .32rem .55rem; border-radius: 4px; border: 1px solid #59616a; background: #2c3238; color: #fff;
  font: 700 .82rem/1.1 inherit; cursor: pointer; }
.svc-help-btn:hover, .svc-help-btn.is-on { border-color: var(--signal); color: var(--signal); }
.svc-search { margin: 0; }
.svc-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { padding: .25rem .55rem; border-radius: 4px; border: 1px solid #b9c0c7; background: var(--chrome); font: 600 .8rem/1.2 inherit;
  cursor: pointer; color: var(--ink-3); box-shadow: inset 0 1px 0 #fff; }
.chip.is-on { background: var(--chrome-dark); border-color: #0f1214; color: #fff; }
.svc-ads { border: 1px solid #f0cf86; border-radius: 8px; background: linear-gradient(180deg, #fffaf0, #fff4dd); padding: .5rem .6rem; }
.svc-ads-label { margin: 0 0 .3rem; font: 800 .72rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #8a5a00; }
.svc-list, .svc-ad-list { list-style: none; margin: 0; padding: 0; }
.svc-status { margin: 0; }
.svc-more { font-weight: 700; font-size: .88rem; }
.svc-card { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; padding: .65rem .1rem; border-bottom: 1px solid var(--line); }
.svc-card:last-child { border-bottom: 0; }
.svc-card.is-here { background: linear-gradient(90deg, rgba(245, 165, 36, .14), transparent 70%); border-radius: 6px; }
.svc-icon { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.2rem; border-radius: 7px;
  background: var(--chrome); border: 1px solid #b9c0c7; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, .1); }
.svc-body { min-width: 0; font-size: .86rem; }
.svc-name { font-weight: 800; color: var(--text); font-size: .95rem; }
.svc-meta, .svc-hours, .svc-amen { color: var(--muted); font-size: .8rem; }
.svc-rating { font-size: .82rem; }
.svc-tagline { margin-top: .2rem; font-weight: 700; color: #8a5a00; font-size: .82rem; }
.svc-actions { grid-column: 2; display: flex; gap: .35rem; margin-top: .3rem; }
.open24 { display: inline-block; padding: 0 .35rem; border-radius: 3px; background: var(--ink-2); color: var(--signal);
  font: 800 .68rem/1.5 var(--font-head); letter-spacing: .1em; }

/* Services page */
.svc-page { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; height: calc(100dvh - var(--topbar-h)); min-width: 0; }
.svc-page > .panel { overflow-y: auto; padding: 1rem; background: var(--card); border-right: 1px solid var(--line); }
.svc-page .filters label { margin-top: .5rem; }
@media (max-width: 860px) {
  .svc-page { grid-template-columns: 1fr; grid-template-rows: 40dvh auto; height: auto; }
  .svc-page > .map { order: -1; height: 40dvh; }
}

/* ---------------- Messages / toasts ---------------- */
.messages { position: fixed; top: calc(var(--topbar-h) + .5rem); right: .75rem; z-index: 2000; display: flex; flex-direction: column; gap: .4rem; max-width: 360px; }
.msg { padding: .6rem .9rem; border-radius: 6px; background: var(--ink-2); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-size: .9rem;
  border-left: 4px solid var(--signal); animation: fade 6s forwards; }
.msg.error { border-left-color: #ff7a6b; background: #4a1813; }
.msg.success { border-left-color: #6fd08f; }
.msg.warning { background: var(--signal); color: var(--ink); border-left-color: var(--ink); }
@keyframes fade { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ---------------- Map chrome ---------------- */
.map-toolbar { position: absolute; top: .75rem; left: 3.4rem; right: .75rem; z-index: 800; display: flex; flex-wrap: wrap; gap: .5rem; pointer-events: none; }
.map-toolbar > * { pointer-events: auto; }
.map-toolbar input[type=search] { max-width: 280px; box-shadow: var(--shadow); }
.map-toolbar .btn { box-shadow: var(--shadow); }
.map-toolbar .seg { display: inline-flex; border-radius: 6px; overflow: hidden; border: 1px solid #aeb5bc; box-shadow: var(--shadow); }
.map-toolbar .seg label { margin: 0; padding: .45rem .7rem; background: var(--chrome); font-size: .85rem; cursor: pointer; display: flex; gap: .35rem; align-items: center; }
.map-toolbar .seg label + label { border-left: 1px solid #c3c9cf; }
.map-toolbar .seg input { width: auto; }
.map-hint { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 800; background: var(--ink-2); color: #fff; padding: .5rem .9rem; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); }
.legend { background: rgba(255, 255, 255, .95); padding: .5rem .7rem; border-radius: 6px; box-shadow: var(--shadow); font-size: .8rem; line-height: 1.6; }
.legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: .4rem; }
.leaflet-popup-content { font-size: .88rem; }
.leaflet-popup-content .svc-card { border: 0; padding: 0; min-width: 230px; }

.dest-icon { background: none; border: 0; }
.dest-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink-2); border: 3px solid var(--signal); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.dest-pin::after { content: ""; position: absolute; width: 8px; height: 8px; background: var(--signal); border-radius: 50%; top: 8px; left: 8px; }
.device-dot { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .35), 0 2px 6px rgba(0, 0, 0, .3); }
.device-dot.inside { background: var(--signal-deep); box-shadow: 0 0 0 6px rgba(245, 165, 36, .35); }
.vertex { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--signal-deep); }
.vertex.first { border-color: var(--go); }
.loc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--signal); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.loc-dot.has-route { background: var(--go); }
.svc-pin { width: 32px; height: 32px; display: grid; place-items: center; font-size: 1rem; border-radius: 7px;
  background: var(--chrome); border: 1px solid #7d858e; box-shadow: 0 2px 6px rgba(0, 0, 0, .35), inset 0 1px 0 #fff; }
.svc-pin.is-ad { border-color: var(--signal-deep); box-shadow: 0 0 0 2px var(--signal), 0 2px 6px rgba(0, 0, 0, .35); }

/* ---------------- Drive mode ---------------- */
.drive-panel { position: absolute; z-index: 900; left: .75rem; bottom: .75rem; width: min(420px, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); overflow-y: auto; background: var(--card); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); border: 1px solid #aeb5bc; }
.drive-panel header { padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--chrome-dark); color: #fff; border-radius: 10px 10px 0 0; }
.drive-panel section { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.drive-panel section:last-child { border-bottom: 0; }
.drive-status { display: flex; align-items: center; gap: .5rem; font: 800 1rem/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.drive-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--off); }
.drive-status.watching .dot { background: #4c8ef7; animation: pulse 1.6s infinite; }
.drive-status.active .dot { background: var(--signal); animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, .6); } 100% { box-shadow: 0 0 0 10px rgba(245, 165, 36, 0); } }
.active-card { border: 2px solid var(--signal); border-radius: 8px; padding: .75rem; margin-bottom: .6rem; background: #fff8ea; }
.active-card h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.active-card .big { font: 800 1.8rem/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.active-card ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.active-card li { padding: .25rem 0; border-top: 1px dashed #f0d39a; font-size: .9rem; }
.active-card li b { color: var(--ink-3); font-weight: 600; margin-right: .3rem; }
.banner { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 950; background: var(--signal); color: var(--ink); font-weight: 800; padding: .7rem 1.1rem; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); text-align: center; max-width: calc(100% - 1.5rem); border: 1px solid #b9770a; }
@media (max-width: 860px) {
  .drive-panel { left: 0; right: 0; bottom: 0; width: 100%; max-height: 55%; border-radius: 10px 10px 0 0; }
}

/* ---------------- Recorder ---------------- */
.rec-indicator { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--stop); }
.rec-indicator::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--stop); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------------- Compare matrix ---------------- */
.matrix td, .matrix th { text-align: center; font-size: .8rem; }
.matrix td.same { background: #eceef0; }
.matrix td.agree { background: #e1f3e6; color: var(--go); font-weight: 700; }
.matrix td.differ { background: #fbecea; color: #6e1b13; }
.matrix th.rowhead { text-align: left; white-space: nowrap; text-transform: none; letter-spacing: 0; font: 600 .85rem/1.3 inherit; color: var(--text); }
.matrix th.rowhead .pill { font-size: .65rem; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: .3rem; }

.token { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ink); color: #ffd27a; padding: .6rem .8rem; border-radius: 6px; word-break: break-all; display: block; }
pre.code { background: var(--ink); color: #e5e7eb; padding: .8rem; border-radius: 6px; overflow-x: auto; font-size: .8rem; }
/* Map legend swatches (classes, not inline styles: the CSP blocks those) */
.legend i.lg-best { background: var(--signal); }
.legend i.lg-validated { background: var(--go); }
.legend i.lg-pending { background: var(--wait); }
.legend i.lg-flagged { background: var(--stop); }
.legend i.lg-fence { height: 0; border-top: 2px dashed var(--signal-deep); }

/* ---- Public home page (locations/landing.html) ---- */
.landing { max-width: 1100px; }
.ld-hero { padding: 2.5rem 1.5rem 2.25rem; margin: 0 0 1.75rem; border-radius: var(--radius); color: #e9ecef;
  background: var(--brushed), radial-gradient(900px 300px at 85% -20%, rgba(245, 165, 36, .28), transparent), var(--ink); }
.ld-hero h1 { max-width: 22ch; margin: .25rem 0 .75rem; font-size: clamp(1.9rem, 5vw, 3rem); color: #fff; }
.ld-kicker { margin: 0; font-family: var(--font-head); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.ld-lede { max-width: 46rem; margin: 0 0 1.25rem; font-size: 1.1rem; color: #c9ced4; }
.ld-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ld-section { margin: 0 0 1.75rem; }
.ld-section > h2 { margin-bottom: .9rem; font-size: 1.5rem; }
.ld-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.ld-steps .card, .ld-grid .card, .ld-faq .card { margin: 0; }
.ld-steps h3, .ld-grid h3 { margin: .35rem 0 .35rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.ld-steps p, .ld-grid p, .ld-faq p { margin: 0; color: var(--muted); }
.ld-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--signal); color: #1a1306; font-weight: 800; }
.ld-faq { display: grid; gap: .6rem; }
.ld-faq summary { cursor: pointer; list-style: none; }
.ld-faq summary::-webkit-details-marker { display: none; }
.ld-faq summary h3 { display: inline; margin: 0; font-size: 1.1rem; }
.ld-faq summary::after { content: "+"; float: right; font-weight: 800; color: var(--signal-deep); }
.ld-faq details[open] summary::after { content: "–"; }
.ld-faq details[open] summary { display: block; margin-bottom: .45rem; }
.ld-final { text-align: center; padding: 1.75rem 1rem; }
.ld-final .muted { margin: 0 0 1rem; }
.ld-final > h2:first-child { display: block; }
