/* LaneLasso: highway signage meets a quiet working tool.
   Brand blue and navy come from the logo; green stays for pickups and the lane sign. */

:root {
  --brand: #0f66e0;         /* LaneLasso blue: primary actions, active states */
  --brand-deep: #0b52b8;
  --brand-text: #0d5ccc;    /* brand blue for text and links */
  --brand-wash: #e7effc;
  --brand-navy: #0b2257;
  --sign: #0b6b45;          /* guide-sign green: pickups and the lane sign */
  --sign-deep: #08573a;
  --sign-wash: #e3efe8;
  --dest: #1f4e8c;          /* interstate-shield blue: deliveries */
  --dest-wash: #e3eaf4;
  --amber: #b8740a;         /* reflector amber: the lane you're looking at */
  --amber-wash: #f6ead4;

  --ink: #12203a;           /* logo navy, softened for text */
  --ink-2: #44516b;
  --ink-3: #5d6a82;
  --line: #dde3ec;
  --line-strong: #c2cad8;

  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --bg: #eef1ec;            /* map background beyond the coastline */
  --land: #dfe4dc;
  --land-line: #f7f9f5;
  --coast: #c5cdc2;
  --hub: #7c8a82;
  --halo: #f2f4ef;
  --scrim: rgba(20, 28, 24, 0.48);

  --font: 'Overpass', 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --panel-w: 440px;
  --topbar-h: 60px;
  --shadow-float: 0 1px 2px rgba(20, 28, 24, 0.08), 0 6px 18px rgba(20, 28, 24, 0.10);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sign: #12805a;
    --sign-deep: #0e6c4b;
    --sign-wash: #173126;
    --dest: #5b8bd0;
    --dest-wash: #1a2639;
    --amber: #f0aa2e;
    --amber-wash: #3a2e17;
    --brand: #2a6fd8;
    --brand-deep: #1f5fc4;
    --brand-text: #7fb0ff;
    --brand-wash: #16243d;
    --ink: #e6ebf5;
    --ink-2: #b1bbce;
    --ink-3: #8d98ae;
    --line: #263044;
    --line-strong: #364159;
    --surface: #111826;
    --surface-2: #19212f;
    --bg: #111613;
    --land: #262f2a;
    --land-line: #151b18;
    --coast: #3a4640;
    --hub: #8a978f;
    --halo: #1f2723;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, p { margin: 0; }

button, input, select { font: inherit; color: inherit; }

a { color: var(--brand-text); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-md);
  text-decoration: none;
}
.skip-link:focus { top: 10px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Top bar ---------- */

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand { gap: 8px; }
.brand picture { display: contents; }
.brand-mark { height: 46px; width: auto; flex: none; }
.brand-word { height: 24px; width: auto; flex: none; margin-top: 2px; }

.modes { display: flex; gap: 4px; height: 100%; }
.modes a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms, border-color 150ms;
}
.modes a:hover { color: var(--ink); }
.modes a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.plan-status { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text); font-weight: 700; }
.plan-status svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Workspace ---------- */

.workspace {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  height: calc(100dvh - var(--topbar-h));
}

.panel {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 28px 48px;
  outline: none;
  scrollbar-gutter: stable;
}

.map-wrap {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.map { position: absolute; inset: 0; }
.map-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.map-svg:active { cursor: grabbing; }

/* ---------- Map drawing: night mode in both themes ---------- */

.map-wrap {
  --m-bg: #0c1411;
  --m-land: #121e1a;
  --m-dot: #344840;
  --m-line: #1b2823;
  --m-coast: #2c3d35;
  --m-hub: #93a69c;
  --m-hub-major: #eef6f1;
  --m-label: #e3ece6;
  --m-label-quiet: #a3b4ab;
  --m-pickup: #34c98b;
  --m-delivery: #5e9dff;
  --m-hot: #ffb547;
  --m-lane: #3dd69b;
  --m-ink: #e8f0eb;
  --m-ink-2: #a8b7af;
  --m-glass: rgba(16, 26, 22, 0.78);
  --m-glass-line: rgba(255, 255, 255, 0.09);
  --m-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --sign-map: #0e7a50;
  background: radial-gradient(120% 90% at 55% 45%, #12201b 0%, var(--m-bg) 62%);
  color: var(--m-ink);
}

/* Day view: the same map in daylight, in the logo's navy. */
.map-wrap[data-map-theme="day"] {
  --m-bg: #eef2f7;
  --m-land: #e3e9f1;
  --m-dot: #c2cbd8;
  --m-line: #f6f8fb;
  --m-coast: #c3ccda;
  --m-hub: #7a869c;
  --m-hub-major: #12203a;
  --m-label: #12203a;
  --m-label-quiet: #56637b;
  --m-pickup: #0b8a57;
  --m-delivery: #1764d6;
  --m-hot: #d17a00;
  --m-lane: #0f9a63;
  --m-ink: #12203a;
  --m-ink-2: #44516b;
  --m-glass: rgba(255, 255, 255, 0.86);
  --m-glass-line: rgba(18, 32, 58, 0.1);
  --m-shadow: 0 1px 2px rgba(18, 32, 58, 0.06), 0 6px 18px rgba(18, 32, 58, 0.12);
  background: radial-gradient(120% 90% at 55% 45%, #f8fafc 0%, var(--m-bg) 62%);
}
.map-wrap[data-map-theme="day"] .lane.lane-overview { opacity: 0.15; }
.map-svg.is-pointing { cursor: pointer; }

.land-fill { fill: var(--m-land); }
.land-dots { fill: none; stroke: var(--m-dot); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.state-line { fill: none; stroke: var(--m-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.coast-line { fill: none; stroke: var(--m-coast); stroke-width: 1.1; vector-effect: non-scaling-stroke; }

.lane {
  fill: none;
  stroke: var(--m-lane);
  stroke-width: 1.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: opacity 150ms, stroke-width 150ms;
}
.lane.lane-overview { stroke-width: 0.8; opacity: 0.11; }
.lane.lane-draft { stroke-dasharray: 5 5; opacity: 0.95; }
.lane.lane-saved { opacity: 0.7; }
.lane.lane-match { stroke-width: 2.2; opacity: 0.9; }
.lane.lane-search { stroke: var(--m-ink); stroke-width: 1.6; stroke-dasharray: 2 6; opacity: 0.5; }
.lane.is-hot { stroke: var(--m-hot) !important; stroke-width: 3.2; opacity: 1; }
/* Moving dashes show which way freight runs on the lanes you're looking at. */
.lane.flow, .lane.is-hot { stroke-dasharray: 8 7; animation: lane-flow 1s linear infinite; }
@keyframes lane-flow { to { stroke-dashoffset: -15; } }
.lg .s0 { stop-color: var(--m-pickup); }
.lg .s1 { stop-color: var(--m-delivery); }

.arrow .chev { fill: none; stroke: var(--m-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0.75; }
.arrow.is-hot .chev { stroke: var(--m-hot); stroke-width: 2.4; opacity: 1; }

.ring { fill: var(--m-pickup); fill-opacity: 0.07; stroke: var(--m-pickup); stroke-opacity: 0.7; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ring.ring-delivery { fill: var(--m-delivery); stroke: var(--m-delivery); }

.hub { pointer-events: none; }
.hub .mark-c { fill: var(--m-hub); transition: fill 120ms; }
.hub.t1 .mark-c { fill: var(--m-hub-major); }
.hub .mark-s, .hub .mark-ring { display: none; }
.hub .mark-halo { fill: var(--m-hub-major); opacity: 0; }
.hub.t1 .mark-halo { opacity: 0.09; }
.hub.is-hover .mark-c { fill: var(--m-ink); }
.hub.is-pickup .mark-c { fill: var(--m-pickup); }
.hub.is-pickup .mark-halo { fill: var(--m-pickup); opacity: 0.28; }
.hub.is-delivery .mark-c { display: none; }
.hub.is-delivery .mark-s { display: block; fill: var(--m-delivery); }
.hub.is-delivery .mark-halo { fill: var(--m-delivery); opacity: 0.28; }
.hub.is-both .mark-c { fill: var(--m-pickup); }
.hub.is-both .mark-ring { display: block; fill: none; stroke: var(--m-delivery); stroke-width: 2.2; }
.hub.is-both .mark-halo { fill: var(--m-pickup); opacity: 0.22; }
.hub.is-dim { opacity: 0.3; }
.hub-label {
  display: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  fill: var(--m-label);
  paint-order: stroke;
  stroke: var(--m-bg);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.hub.t3 .hub-label { fill: var(--m-label-quiet); font-weight: 500; }
.hub.lbl .hub-label { display: block; }
.hub.is-pickup .hub-label, .hub.is-delivery .hub-label, .hub.is-both .hub-label { fill: var(--m-ink); font-weight: 800; }

.hover { opacity: 0; pointer-events: none; transition: transform 140ms var(--ease-out), opacity 120ms; }
.hover.on { opacity: 1; }
.hover-ring { fill: color-mix(in srgb, var(--m-ink) 8%, transparent); stroke: var(--m-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* ---------- The lane sign (the one loud thing) ---------- */

.lane-sign {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 32px);
  padding: 5px;
  background: var(--sign-map);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.45);
  color: #fff;
  pointer-events: none;
}
.lane-sign[hidden] { display: none; }
.lane-sign .sign-face {
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 10px 20px 9px;
  text-align: center;
}
.sign-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.sign-route svg { width: 30px; height: 18px; flex: none; }
.sign-route svg path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sign-details {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.92;
}
.sign-details span + span { padding-left: 18px; border-left: 1.5px solid rgba(255, 255, 255, 0.55); }
.lane-sign.is-entering { animation: sign-in 320ms var(--ease-out); }
@keyframes sign-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.map-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  pointer-events: none;
  padding: 3px;
  background: var(--sign-map);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.map-tip .tip-face { border: 1.5px solid #fff; border-radius: 5px; padding: 5px 10px 4px; }
.map-tip strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.map-tip span { display: block; font-size: 13px; opacity: 0.92; }

/* Floating map controls: frosted glass over the night map */
.map-hint, .legend, .ctrl-group {
  background: var(--m-glass);
  border: 1px solid var(--m-glass-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--m-shadow);
  color: var(--m-ink);
}

.map-hint {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.map-hint[hidden], .lane-sign:not([hidden]) ~ .map-hint { display: none; }
.map-hint .g-pickup { background: var(--m-pickup); }
.map-hint .g-delivery { background: var(--m-delivery); }

.legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--m-ink-2);
}
.legend:empty { display: none; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 22px; height: 12px; flex: none; overflow: visible; }

.map-ctrls {
  position: absolute;
  right: 16px;
  bottom: 64px; /* clears the "Powered by Netlify" badge in the corner */
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ctrl-group {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
}
.ctrl-group button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.ctrl-group button + button { border-top: 1px solid var(--m-glass-line); }
.ctrl-group button:hover { background: color-mix(in srgb, var(--m-ink) 8%, transparent); }
.ctrl-group button[aria-pressed="true"] { background: color-mix(in srgb, var(--m-ink) 16%, transparent); }
.ctrl-group svg { width: 18px; height: 18px; fill: none; stroke: var(--m-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Glyphs used in text ---------- */

.g-pickup, .g-delivery {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: none;
  vertical-align: baseline;
}
.g-pickup { background: var(--sign); border-radius: 50%; }
.g-delivery { background: var(--dest); border-radius: 2px; }

/* ---------- Panel typography ---------- */

.panel h1 {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.panel .lede {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 62ch;
}
.panel h2 { font-size: 19px; line-height: 1.25; font-weight: 700; }
.panel h3 { font-size: 15px; line-height: 1.3; font-weight: 700; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px 9px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, transform 80ms;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link-btn {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--brand-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn.danger { color: #b3261e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .link-btn.danger { color: #f2b8b5; }
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- Forms ---------- */

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.field > label, .field-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.field-help { font-size: 13px; color: var(--ink-3); }

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 16px;
  transition: border-color 150ms;
}
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input-num { width: 76px; text-align: center; padding-left: 6px; padding-right: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2 .field + .field { margin-top: 0; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* Segmented control built on native radios / checkboxes */
.seg-group { display: grid; gap: 6px; }
.seg-group > legend { font-size: 14px; font-weight: 700; margin-bottom: 6px; float: left; width: 100%; }
.seg {
  display: inline-flex;
  clear: both;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 6px 12px 4px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 120ms, color 120ms;
}
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
.seg input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 1px; }
.seg.seg-sm span { padding: 4px 9px 2px; font-size: 13px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }

/* Combobox */
.combo { position: relative; }
.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
  max-height: 280px;
  overflow-y: auto;
}
.combo-list[hidden] { display: none; }
.combo-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 7px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 15px;
}
.combo-list li .alias { color: var(--ink-3); font-size: 13px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--brand-wash); }
.combo-list li.is-picked { color: var(--ink-3); }
.combo-empty { padding: 10px; color: var(--ink-3); font-size: 14px; }

/* Market chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 3px 1px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.chip.pickup { background: var(--sign-wash); }
.chip.delivery { background: var(--dest-wash); }
.chip button {
  width: 26px;
  height: 26px;
  margin-top: -2px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}
.chip button:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.chip button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- Home ---------- */

.paths { margin-top: 28px; border-top: 1px solid var(--line); }
.path {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.path h2 { grid-column: 1; }
.path p { grid-column: 1; color: var(--ink-2); font-size: 15px; }
.path .btn { grid-column: 2; grid-row: 1 / span 2; }
.path:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin: 28px 0 0;
}
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { font-size: 14px; color: var(--ink-2); }
.stats dd { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }

.note {
  margin-top: 28px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Carrier home ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.how { list-style: none; counter-reset: how; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.how li { counter-increment: how; position: relative; padding: 18px 0 18px 42px; border-bottom: 1px solid var(--line); }
.how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 17px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding-top: 2px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 800;
}
.how h2 { font-size: 17px; }
.how p { margin-top: 2px; color: var(--ink-2); font-size: 15px; }

/* ---------- About ---------- */

.about { margin-top: 28px; border-top: 1px solid var(--line); }
.about section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.about h2 { font-size: 17px; }
.about p { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 62ch; }

/* ---------- Accounts ---------- */

.auth-form { display: grid; gap: 16px; margin-top: 20px; }
.auth-form .field + .field { margin-top: 0; }
.auth-form .link-btn { justify-self: start; }
.notice { padding: 12px 14px; border-radius: var(--r-md); background: var(--brand-wash); font-size: 15px; }
.form-error {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, #b3261e 10%, var(--surface));
  color: #8c1d18;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-error { color: #f2b8b5; }
}
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 72px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 4px 10px 2px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--brand-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-2); }
.tabs button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.account-line { margin-top: 14px; font-size: 14px; color: var(--ink-3); overflow-wrap: anywhere; }
.who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.save-status { margin-top: 6px; min-height: 21px; font-size: 14px; color: var(--ink-3); }
.modes a[hidden] { display: none; }

/* ---------- Carrier: company ---------- */

.company {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.company-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.company-summary h2 { font-size: 17px; }
.company-summary p { font-size: 14px; color: var(--ink-3); }
.company form { display: grid; gap: 14px; }
.company form .field + .field { margin-top: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.field-error { color: #b3261e; font-size: 13px; font-weight: 600; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  padding: 10px 12px 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  background: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-3);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 1px 6px 0;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  text-align: center;
}

/* Steps (a real sequence: pickup, delivery, capacity) */
.steps { list-style: none; margin: 8px 0 0; padding: 0; }
.step { position: relative; padding: 18px 0 20px 40px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-num {
  position: absolute;
  left: 0;
  top: 17px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  padding-top: 2px;
}
.step.is-active .step-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-done .step-num { border-color: var(--brand); color: var(--brand-text); }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-head h3 { font-size: 17px; }
.step-help { margin: 4px 0 12px; font-size: 14px; color: var(--ink-3); }
.step-pick {
  border: 0;
  background: none;
  padding: 2px 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-text);
  cursor: pointer;
}
.step.is-active .step-pick { color: var(--ink-3); cursor: default; }

/* Lane defaults + rows */
.defaults {
  margin-top: 4px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  display: grid;
  gap: 14px;
}
.defaults > legend {
  float: left;
  width: 100%;
  font-size: 14px;
  font-weight: 700;
}
.defaults-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; clear: both; }
.mini-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }

.lane-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.lane-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lane-row.is-hot { background: linear-gradient(90deg, var(--amber-wash), transparent 85%); }
.lane-top { display: flex; align-items: flex-start; gap: 10px; }
.lane-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; line-height: 1.3; }
.lane-name .arrow-glyph { color: var(--ink-3); font-weight: 600; padding: 0 3px; }
.lane-miles { font-size: 13px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.lane-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.lane-loads { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.lane-loads .input-num { min-height: 36px; padding-top: 6px; padding-bottom: 4px; width: 64px; font-size: 15px; }
.lane-edit { display: grid; gap: 12px; margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: var(--r-md); }
.badge-existing { font-size: 12px; font-weight: 700; color: var(--amber); }

.svc { display: inline-flex; align-items: center; gap: 6px; }
.svc svg { width: 18px; height: 12px; flex: none; }

.save-bar {
  position: sticky;
  bottom: -48px;
  margin: 16px -28px -48px;
  padding: 14px 28px 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.empty {
  margin-top: 18px;
  padding: 22px 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--ink-2);
  font-size: 15px;
}
.empty .btn { margin-top: 14px; }

.summary-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 15px; color: var(--ink-2); }
.summary-line strong { color: var(--ink); font-weight: 800; }

.group-head { margin-top: 22px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.group-head + .lane-list { margin-top: 8px; }

/* ---------- Shipper search ---------- */

.search-form { margin-top: 24px; display: grid; gap: 16px; }
.od-pair { position: relative; display: grid; gap: 12px; }
.od-pair .field + .field { margin-top: 0; }
.od-pair .input { padding-right: 48px; }
.combo-glyph { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input.has-glyph { padding-left: 32px; }
.swap-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.swap-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.swap-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.form-row { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: flex-end; }

.results { margin-top: 32px; }
.results-head { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.results-head h2 { font-size: 21px; }

.paywall {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--brand-wash);
  display: grid;
  gap: 12px;
}
.paywall p { font-size: 15px; color: var(--ink); }
.paywall-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.empty .paywall-actions { margin-top: 14px; }

.result-list { list-style: none; margin: 0; padding: 0; }
.result { padding: 16px 0 16px; border-bottom: 1px solid var(--line); }
.result.is-hot { background: linear-gradient(90deg, var(--amber-wash), transparent 85%); }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-name { font-size: 17px; font-weight: 800; line-height: 1.25; }
.result-name .hidden-name { filter: blur(7px); user-select: none; }
.result-sub { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.result-mc { white-space: nowrap; }
.results-head:focus { outline: none; }
.result-fit { margin-top: 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fit-exact { color: var(--sign); }
.fit-near { color: var(--ink-2); }
.fit-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 12px 0 0;
}
.result-stats div { display: flex; flex-direction: column-reverse; }
.result-stats dt { font-size: 12.5px; color: var(--ink-3); }
.result-stats dd { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.lock { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.lock svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.you-badge { display: inline-block; margin-left: 6px; padding: 1px 7px 0; border-radius: 999px; background: var(--amber-wash); color: var(--amber); font-size: 12px; font-weight: 800; vertical-align: 2px; }

.contact {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: grid;
  gap: 2px;
  font-size: 15px;
}
.contact a { font-weight: 700; }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--scrim);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-float);
  padding: 28px;
  animation: modal-in 220ms var(--ease-out);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h2 { font-size: 24px; font-weight: 800; }
.price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.price strong { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.price span { color: var(--ink-2); }
.plan-list { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 10px; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan-list svg { width: 18px; height: 18px; margin-top: 1px; flex: none; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.modal-actions { display: grid; gap: 10px; }
.fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ---------- Toasts ---------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 10px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  pointer-events: auto;
  animation: toast-in 200ms var(--ease-out);
}
.toast button {
  border: 0;
  background: none;
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 2px 0;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (min-width: 861px) {
  body { overflow: hidden; }
}

@media (max-width: 1100px) {
  :root { --panel-w: 400px; }
  .sign-route { font-size: 20px; }
}

@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .brand-mark { height: 40px; }
  .brand-word { height: 20px; }
  .modes a { padding: 0 10px; font-size: 14px; }
  .account { display: none; }
  /* Map sits above the panel on small screens */
  .workspace { display: flex; flex-direction: column; height: auto; }
  .map-wrap { order: -1; height: 50dvh; min-height: 320px; }
  .panel { overflow: visible; border-right: 0; padding: 22px 16px 40px; scrollbar-gutter: auto; }
  .panel h1 { font-size: 26px; }
  .save-bar { margin: 16px -16px -40px; padding: 12px 16px 16px; bottom: 0; }
  .legend { display: none; }
  .lane-sign { top: 10px; }
  .lane-sign .sign-face { padding: 7px 12px 6px; }
  .sign-route { font-size: 17px; gap: 8px; }
  .sign-route svg { width: 22px; }
  .sign-details { font-size: 13px; gap: 10px; }
  .sign-details span + span { padding-left: 10px; }
  .map-hint { top: 10px; font-size: 13px; }
  .map-ctrls { right: 10px; bottom: 56px; gap: 6px; }
  .ctrl-group button { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .brand-word { display: none; }
}

@media (max-width: 420px) {
  .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .lane.flow, .lane.is-hot { animation: none !important; }
}
