:root {
  color-scheme: light dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --accent: #0071e3;
  --surface: #fff;
  --field: #f5f5f7;
  --map-bg: #f7f9fc;
  --map-empty: #edf1f6;
  --map-line: #a4b3c32a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: var(--surface);
}
.wordmark {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-size: 20px;
}
.wordmark span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
}
.private {
  color: var(--muted);
  font-size: 12px;
}
main {
  max-width: 1228px;
  margin: auto;
  padding: 32px 24px 0;
}
h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.7px;
  margin: 0;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0;
}
h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}
.intro {
  margin-bottom: 24px;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
input,
select,
button {
  font: inherit;
}
input,
select {
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 11px;
  font-size: 13px;
  min-height: 38px;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 13px;
  padding: 10px 16px;
  min-height: 38px;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
}
.status {
  margin: 16px 0 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.status.warning {
  color: #9c6617;
}
.access {
  padding: 20px 0;
  display: flex;
  gap: 12px;
  align-items: end;
}
.access[hidden] {
  display: none;
}
.access p {
  font-size: 11px;
  color: var(--muted);
  max-width: 260px;
  margin: 0;
}
.access input {
  width: 310px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 24px;
  gap: 16px;
}
.metrics div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  background: var(--surface);
}
.metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.metrics strong {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}
.map-section,
.discovery,
.journey-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.section-heading select {
  font-size: 12px;
  background: var(--field);
}
.time-filter {
  margin: 24px 0 20px;
}
.time-filter > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 12px;
  color: var(--muted);
}
.time-filter strong {
  color: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.time-filter label {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
}
.time-filter input {
  accent-color: var(--accent);
  padding: 0;
  min-height: 22px;
  background: transparent;
  border: 0;
  cursor: ew-resize;
}
.time-filter p,
.footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.map-shell {
  background: var(--map-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  overflow: hidden;
}
canvas {
  display: block;
  height: 440px;
  width: 100%;
  max-width: 420px;
  margin: auto;
  object-fit: contain;
}
.map-shell p {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
}
.map-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 14px;
}
.map-legend i {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #bdd6f3, #0071e3);
  border-radius: 4px;
}
.event-list {
  margin-top: 16px;
}
.event-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.event-row > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 12px;
}
.bar {
  height: 3px;
  background: var(--field);
  margin-top: 10px;
  border-radius: 5px;
}
.bar i {
  display: block;
  height: 100%;
  background: #69a7e8;
  border-radius: 5px;
}
.quality {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.quality p {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
.journey-section {
  margin-top: 20px;
}
.customer-form {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 22px 0;
}
.customer-form label {
  flex: 1;
}
.journey {
  display: grid;
  gap: 0;
  max-height: 500px;
  overflow: auto;
}
.journey-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.journey-row time {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.journey-row strong {
  font-size: 13px;
  font-weight: 500;
}
.journey-row p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.path-view {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  gap: 20px;
  margin-top: 20px;
}
.path-view svg {
  width: 180px;
  height: 270px;
  flex-shrink: 0;
}
.path-view p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.lede {
  font-size: 15px;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 24px;
}
footer {
  padding: 24px 0 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid #0071e380;
  outline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #f5f5f7;
    background: #000;
    --muted: #98989d;
    --line: #38383a;
    --surface: #1c1c1e;
    --field: #2c2c2e;
    --map-bg: #17191e;
    --map-empty: #242b36;
    --map-line: #95a4be25;
  }
  .status.warning {
    color: #e6b45e;
  }
}
@media (max-width: 780px) {
  header {
    padding: 0 20px;
  }
  main {
    padding: 24px 16px 0;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .metrics div {
    padding: 18px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
  .customer-form {
    flex-wrap: wrap;
  }
  .customer-form label {
    flex-basis: 100%;
  }
  .access {
    flex-wrap: wrap;
  }
  .access input {
    max-width: 80vw;
  }
  .path-view {
    flex-direction: column;
  }
  footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
