:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #213c40;
  background: #f3f6f5;
  --teal: #155e63;
  --accent: #7c3f65;
  --tint: #f7edf3;
  --muted: #587175;
  --line: #dce5e2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.app-shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); }
.product-brand { display: flex; align-items: center; gap: 12px; padding: 24px 18px; color: var(--teal); }
.product-brand-mark { display: grid; grid-template-columns: repeat(2, 12px); gap: 4px; flex: none; }
.product-brand-mark b { width: 12px; height: 12px; border: 2px solid currentColor; }
.product-brand-wordmark { line-height: 1.15; }
.product-brand-wordmark strong { display: block; font-size: 23px; letter-spacing: -.6px; }
.product-brand-wordmark small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.product-icon { width: 16px; height: 16px; }
.workspace-nav { padding: 12px; }
.nav-label { margin: 0 10px 8px; color: var(--muted); font-size: 11px; font-weight: bold; }
.workspace-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 12px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 14px; }
.workspace-nav a + a { margin-top: 3px; }
.workspace-nav a:hover { background: #f3f6f5; }
.workspace-nav a[aria-current=page] { background: var(--tint); color: var(--accent); box-shadow: inset 3px 0 var(--accent); font-weight: 700; }
.workspace-nav svg, .primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 12px 28px; border-bottom: 3px solid var(--accent); background: #fff; }
.topbar-actions, .controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mobile-product-brand { display: none; }
.content { width: min(100%, 1440px); margin: 0 auto; padding: 28px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading p { margin: 0; color: var(--muted); }
.page-heading .eyebrow { color: var(--accent); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 8px 0; font-size: clamp(28px, 3.3vw, 38px); letter-spacing: -.7px; line-height: 1.12; }
h2 { margin: 0 0 12px; font-size: 19px; }
h3 { font-size: 15px; }
p { line-height: 1.55; }
button, select { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; background: #fff; color: inherit; font: inherit; font-size: 13px; }
button { cursor: pointer; }
button:hover { background: var(--tint); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.primary:hover { background: #663351; }
.ghost { border-color: transparent; }
.language { min-width: 96px; }
.workspace { display: grid; grid-template-columns: minmax(214px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.card { min-width: 0; margin: 0 0 18px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sign-in { border-top: 3px solid var(--accent); max-width: 480px; }
.journeylist select { display: block; width: 100%; margin: 6px 0 10px; }
.journey { display: block; width: 100%; margin: 8px 0; overflow-wrap: anywhere; text-align: left; }
.journey span { display: block; margin-top: 4px; color: var(--muted); }
.journey[aria-current=true] { border-color: var(--accent); background: var(--tint); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice, .error { padding: 12px 14px; border-radius: 8px; background: var(--tint); color: #663351; }
.error { background: #fff1dc; color: #743c0c; }
.metrics, .addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.metric, .addresses > div { padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.addresses h3, .addresses p { margin: 0; }
.metric dt { color: var(--muted); font-size: 13px; }
.metric dd { margin: 5px 0 0; font-size: 25px; font-weight: 700; }
.id { font-family: monospace; font-size: 13px; overflow-wrap: anywhere; }
.route { width: 100%; height: 280px; background: var(--tint); border-radius: 8px; }
.route-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.route-grid { stroke: #ebdce6; stroke-width: 1; }
.route-start { fill: #326449; stroke: #fff; }
.route-end { fill: var(--accent); stroke: #fff; }
.route-break { fill: none; stroke: #7e5008; stroke-width: 2; }
.break, .interval { border-top: 1px solid var(--line); padding: 12px 0; }
.break p, .interval p { margin: 4px 0; }
.state { color: var(--accent); font-weight: 700; }
.trip-map { position: relative; width: 100%; height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #e2e7eb; }
.trip-map > svg.route { height: 100%; border-radius: 0; }
.map-controls { margin-top: 12px; }
.map-controls button { flex: 1; }
.trip-map canvas:focus-visible { outline: 3px solid #28649a; outline-offset: -4px; }
#status:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .app-shell { display: flex; flex-direction: column; }
  .main { display: contents; }
  .sidebar { order: 1; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .product-brand, .nav-label, .current-page-title { display: none; }
  .topbar { position: static; padding: 10px 16px; flex-wrap: wrap; min-height: 64px; }
  .topbar-actions { margin-left: auto; }
  .mobile-product-brand { display: block; }
  .mobile-product-brand .product-brand { padding: 0; gap: 9px; }
  .mobile-product-brand .product-brand-mark { grid-template-columns: repeat(2, 9px); gap: 3px; }
  .mobile-product-brand .product-brand-mark b { width: 9px; height: 9px; }
  .mobile-product-brand strong { font-size: 18px; }
  .workspace-nav { display: flex; gap: 6px; padding: 6px 16px; }
  .workspace-nav a + a { margin-top: 0; }
  .content { order: 2; padding: 20px 16px; }
}
@media (max-width: 480px) {
  .page-heading { align-items: start; flex-direction: column; gap: 12px; }
  .addresses { grid-template-columns: 1fr; }
  .trip-map { height: 300px; }
}
