/* Sandbox tracking console */
:root {
  --ink: #0b0b0c;
  --ink-2: #3d4046;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --paper: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f3;
  --line: #e3e6ea;
  --line-strong: #cfd4da;
  --accent: #0891b2;
  --red: #d92d20;
  --red-bg: #fef3f2;
  --amber: #b54708;
  --amber-bg: #fffaeb;
  --green: #067647;
  --green-bg: #ecfdf3;
  --blue: #175cd3;
  --blue-bg: #eff8ff;
  --land: #e7eaee;
  --land-line: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --r: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* ---------- internal-use banner ---------- */
.internal-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.internal-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- wordmark ---------- */
.wordmark {
  color: #000;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark-xl { font-size: clamp(56px, 12vw, 104px); }
.wordmark-sm { font-size: 25px; }
.wordmark .tail {
  display: inline-block;
  width: .34em;
  height: .1em;
  margin-left: .06em;
  vertical-align: .12em;
  background: var(--accent);
  border-radius: 2px;
}

/* ================= SEARCH SCREEN ================= */
.search-screen {
  min-height: calc(100vh - 31px);
  display: grid;
  grid-template-rows: 1fr auto;
}
.search-screen[hidden] { display: none; }

.search-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 24px 6vh;
  text-align: center;
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 22px;
}
.hero-sub {
  margin: 18px 0 40px;
  color: var(--ink-2);
  font-size: 16px;
}

.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 620px;
}
.search-field {
  position: relative;
  flex: 1;
}
.search-field svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .02em;
  transition: border-color .15s, box-shadow .15s;
}
.search-input::placeholder { font-family: var(--font); letter-spacing: 0; color: var(--faint); }
.search-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(11, 11, 12, .07);
}
.btn-track {
  height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: transform .12s ease, background .15s;
}
.btn-track:hover { background: #24262b; }
.btn-track:active { transform: translateY(1px); }

.search-error {
  margin-top: 16px;
  min-height: 22px;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
}

.samples {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.samples-label {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 4px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--mono);
  font-size: 12.5px;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.chip .chip-tag {
  font-family: var(--font);
  font-size: 11px;
  color: var(--faint);
  margin-left: 7px;
}

.foot {
  padding: 18px 24px 26px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* ================= RESULTS SCREEN ================= */
.results-screen[hidden] { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .home {
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
}
.mini-form {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 460px;
}
.mini-form .search-input { height: 40px; font-size: 14px; padding-left: 40px; }
.mini-form .search-field svg { left: 13px; width: 16px; height: 16px; }
.mini-form .btn-track { height: 40px; padding: 0 18px; font-size: 14px; }
.topbar .who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.topbar .who .badge-id {
  font-family: var(--mono);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
}

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 22px 64px;
}

/* summary header */
.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.summary .tn-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.summary .tn {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  margin: 4px 0 10px;
}
.summary .headline {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.summary .headline .sub {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0;
}
.summary-right {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, max-content));
  gap: 14px 26px;
  max-width: 640px;
}
.kv .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}
.kv .v {
  font-size: 14.5px;
  font-weight: 550;
  margin-top: 3px;
}
.kv .v.mono { font-family: var(--mono); font-size: 13.5px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 13px 5px 10px;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid transparent;
}
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.st-delivered { color: var(--green); background: var(--green-bg); border-color: #abefc6; }
.st-transit   { color: var(--blue);  background: var(--blue-bg);  border-color: #b2ddff; }
.st-exception { color: var(--red);   background: var(--red-bg);   border-color: #fecdc9; }
.st-attempt   { color: var(--amber); background: var(--amber-bg); border-color: #fedf89; }
.st-info      { color: var(--ink-2); background: var(--surface);  border-color: var(--line); }

/* alert strip */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: var(--r);
  border: 1px solid #fecdc9;
  background: var(--red-bg);
  font-size: 14px;
  color: #912018;
}
.alert.amber { border-color: #fedf89; background: var(--amber-bg); color: #93370d; }
.alert strong { font-weight: 650; }
.alert .code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 5px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* progress stepper */
.stepper {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 26px 0 30px;
}
.step { min-width: 0; }
.step .rail {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
}
.step.done .rail { background: var(--ink); }
.step.current .rail { background: linear-gradient(90deg, var(--ink) 55%, var(--surface-2) 55%); }
.step.failed .rail { background: var(--red); }
.step .t {
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
}
.step.done .t, .step.current .t { color: var(--ink); }
.step.failed .t { color: var(--red); }
.step .d {
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--mono);
  margin-top: 2px;
}

/* layout columns */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1080px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--paper), #fcfcfd);
}
.card-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card-head .hint { font-size: 12px; color: var(--faint); }
.card-head .spacer { margin-left: auto; }

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  border: 0;
  background: none;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.seg button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- map ---------- */
.map-shell {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #fbfcfd 0%, #f4f6f8 100%);
}
#map {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(600px, 68vh);
  margin: 0 auto;
}
#map .state {
  fill: var(--land);
  stroke: var(--land-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
#map .route {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}
#map .route-dash {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  opacity: .6;
}
@media (prefers-reduced-motion: no-preference) {
  #map .route-dash { animation: flow 1.6s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -24; } }

#map .pt { cursor: pointer; }
#map .pt .halo { fill: #fff; opacity: .92; }
#map .pt .core { stroke: #fff; }
#map .pt .lbl {
  fill: #fff;
  font-family: var(--font);
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
#map .pt.type-info .core { fill: #667085; }
#map .pt.type-scan .core { fill: var(--accent); }
#map .pt.type-attempt .core { fill: #dc6803; }
#map .pt.type-exception .core { fill: var(--red); }
#map .pt.type-delivered .core { fill: var(--green); }
#map .pt.is-active .core, #map .pt:hover .core { stroke: #0b0b0c; }
#map .pulse { fill: var(--red); opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
  #map .pulse { animation: pulse 2.2s ease-out infinite; }
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .4; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

.map-tip {
  position: absolute;
  z-index: 12;
  min-width: 218px;
  max-width: 300px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(11, 11, 12, .96);
  color: #fff;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .5);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-10px) scale(.97);
  transition: opacity .12s ease, transform .12s ease;
}
.map-tip.show { opacity: 1; transform: translate(-50%, -100%) translateY(-14px) scale(1); }
.map-tip.below { transform: translate(-50%, 0) translateY(10px) scale(.97); }
.map-tip.below.show { transform: translate(-50%, 0) translateY(14px) scale(1); }
.map-tip .tip-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.map-tip .tip-letter {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: #fff;
  color: #0b0b0c;
  flex: none;
}
.map-tip .tip-when {
  font-family: var(--mono);
  font-size: 11px;
  color: #b9bec7;
  margin-left: auto;
  white-space: nowrap;
}
.map-tip .tip-code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.map-tip .tip-comment {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: #dfe3e8;
  background: rgba(255, 255, 255, .07);
  border-radius: 6px;
  padding: 6px 8px;
}
.map-tip .tip-comment.tip-exc { color: #ffb4a8; background: rgba(217, 45, 32, .22); }
.map-tip .tip-status { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.map-tip .tip-detail { font-size: 12.5px; color: #cfd3da; margin-top: 3px; }
.map-tip .tip-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  color: #cfd3da;
  display: grid;
  gap: 2px;
}
.map-tip .tip-meta .mono { font-family: var(--mono); font-size: 11.5px; color: #9aa1ab; }
.map-tip .tip-exc { color: #ffb4a8; font-weight: 600; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #fcfcfd;
  font-size: 12px;
  color: var(--muted);
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  outline: 2px solid #fff;
}
.map-legend .legend-hint { margin-left: auto; color: var(--faint); }
@media (max-width: 760px) {
  .map-legend .legend-hint { margin-left: 0; }
}

/* ---------- scan table ---------- */
.cols + .card { margin-top: 18px; }
.table-scroll { overflow-x: auto; }
.scan-table { width: 100%; border-collapse: collapse; }
.scan-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 9px 14px;
  background: #fcfcfd;
  border-bottom: 1px solid var(--line);
}
.scan-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f4;
  vertical-align: top;
  font-size: 13px;
}
/* keep the map letter visible while scrolling the wide table sideways */
.scan-table th:first-child,
.scan-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--paper);
  box-shadow: 1px 0 0 var(--line);
}
.scan-table th:first-child { background: #fcfcfd; }
.scan-table tr.row-exception td:first-child { background: #fffbfa; }
.scan-table tbody tr:hover td:first-child { background: var(--surface); }
.scan-table tbody tr.is-active td:first-child { background: #f0f4fb; }
.scan-table tr:last-child td { border-bottom: 0; }
.scan-table tbody tr { cursor: pointer; transition: background .12s; }
.scan-table tbody tr:hover { background: var(--surface); }
.scan-table tbody tr.is-active { background: #f0f4fb; box-shadow: inset 3px 0 0 var(--ink); }
.scan-table tr.row-exception { background: #fffbfa; }
.scan-table tr.row-exception:hover { background: var(--red-bg); }
.letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #667085;
}
.letter.type-scan { background: var(--accent); }
.letter.type-attempt { background: #dc6803; }
.letter.type-exception { background: var(--red); }
.letter.type-delivered { background: var(--green); }
.letter.no-geo { background: #b6bcc5; }
.code-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.code-chip.type-exception { background: var(--red-bg); border-color: #fecdc9; color: #b42318; }
.code-chip.type-attempt { background: var(--amber-bg); border-color: #fedf89; color: #93370d; }
.code-chip.type-delivered { background: var(--green-bg); border-color: #abefc6; color: var(--green); }

.cell-when { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.cell-when b { display: block; color: var(--ink); font-weight: 600; }
.cell-when.subtle { color: var(--faint); }
.cell-when.subtle b { color: var(--muted); font-weight: 500; }
.cell-status { min-width: 190px; }
.cell-status b { font-weight: 650; letter-spacing: .01em; }
.cell-status .detail { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cell-loc { white-space: nowrap; }
.cell-loc .fcode {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}
.cell-loc .fac { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: normal; }
.cell-user { white-space: nowrap; font-size: 13px; }
.cell-mono { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.cell-comment { min-width: 240px; max-width: 340px; }
.cell-comment .raw { font-family: var(--mono); font-size: 12px; color: var(--ink-2); word-break: break-word; }
.cell-comment .parsed { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- party cards ---------- */
.party .row {
  display: flex;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid #f0f2f4;
  font-size: 13.5px;
}
.party .row:last-child { border-bottom: 0; }
.party .row .lab {
  flex: none;
  width: 94px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding-top: 2px;
}
.party .row .val { min-width: 0; word-break: break-word; }
.party .row .val .name { font-weight: 650; }
.party .row .val.mono { font-family: var(--mono); font-size: 12.5px; }
.party .row .val a { color: var(--blue); text-decoration: none; }
.party .row .val a:hover { text-decoration: underline; }
.party .row .val .note {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  border-radius: 5px;
  padding: 1px 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.tagline.ok { background: var(--green-bg); border-color: #abefc6; color: var(--green); }
.tagline.warn { background: var(--amber-bg); border-color: #fedf89; color: var(--amber); }

.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.pkg-grid .cell {
  background: var(--paper);
  padding: 11px 14px;
}
.pkg-grid .cell .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.pkg-grid .cell .v { margin-top: 3px; font-size: 13.5px; font-weight: 550; }
.pkg-grid .cell .v.mono { font-family: var(--mono); font-size: 12.5px; }
.pkg-grid .cell.span2 { grid-column: 1 / -1; }
.pkg-grid .cell.warn-cell { background: var(--amber-bg); }
.pkg-grid .cell.warn-cell .k { color: var(--amber); }
.pkg-grid .cell.warn-cell .v { font-family: var(--mono); font-size: 12px; color: #93370d; }

.ph-note {
  padding: 9px 16px;
  background: var(--amber-bg);
  border-bottom: 1px solid #fedf89;
  color: #93370d;
  font-size: 12.5px;
}
.ph-note code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: rgba(255, 255, 255, .6);
  border-radius: 4px;
  padding: 0 4px;
}

/* ---------- narrow screens (handhelds in the field) ---------- */
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .wrap { padding: 18px 14px 48px; }
  .topbar { flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; }
  .mini-form { order: 3; flex-basis: 100%; max-width: none; }
  .topbar .who { font-size: 11.5px; }
  .summary { gap: 14px; }
  .summary-right { margin-left: 0; max-width: none; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .summary .tn { font-size: 20px; }
  .summary .headline { font-size: 17px; }
  .stepper { grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .party .row { flex-direction: column; gap: 3px; }
  .party .row .lab { width: auto; padding-top: 0; }
  .pkg-grid { grid-template-columns: 1fr; }
  .wordmark-sm { font-size: 21px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.map-tip .tip-parsed {
  display: block;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font);
  font-size: 12px;
  color: #fff;
}

/* ---------- customer lookup (search screen) ---------- */
.lookup {
  width: 100%;
  max-width: 820px;
  margin: 48px auto 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.lookup-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--paper), #fcfcfd);
}
.lookup-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.lookup-head span { font-size: 12.5px; color: var(--faint); }

.lookup-form {
  display: grid;
  grid-template-columns: 1fr 1.3fr .9fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}
.lk-field { display: block; min-width: 0; }
.lk-field span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 5px;
}
.lk-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.lk-field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 11, 12, .07);
}
.btn-lookup { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 8px; }

.lookup-results:not(:empty) { border-top: 1px solid var(--line); }
.lk-count {
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  background: #fcfcfd;
  border-bottom: 1px solid var(--line);
}
.lk-empty { padding: 16px; font-size: 13.5px; color: var(--muted); }
.lk-hit {
  display: flex;
  width: 100%;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #f0f2f4;
  background: var(--paper);
  text-align: left;
  transition: background .12s;
}
.lk-hit:last-child { border-bottom: 0; }
.lk-hit:hover { background: var(--surface); }
.lk-hit-main { display: grid; gap: 2px; min-width: 0; }
.lk-name { font-size: 14.5px; font-weight: 650; }
.lk-role {
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.lk-addr { font-size: 13px; color: var(--muted); }
.lk-hit-side { display: grid; gap: 5px; justify-items: end; flex: none; }
.lk-tn { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.lk-why { font-size: 11.5px; color: var(--faint); }

@media (max-width: 760px) {
  .lookup { margin-top: 32px; }
  .lookup-form { grid-template-columns: 1fr; }
  .btn-lookup { width: 100%; }
  .lk-hit { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lk-hit-side { justify-items: start; }
}

/* ---------- operator attribution ---------- */
.operator-note { display: inline-block; margin-top: 4px; color: var(--faint); }

.tn-alias {
  margin: -6px 0 10px;
  font-size: 12px;
  color: var(--faint);
}
.tn-alias[hidden] { display: none; }

#map .state-label {
  fill: #98a2b3;
  font-family: var(--font);
  font-weight: 650;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}
