/* NexiAxs UI - tokens + layout. No external assets; system font stack only. */

:root {
  /* Nexiway design system - values from the app's nx-tokens.css
     (slate ramp, Nexi iris accent) and the marketing site's brand
     tokens (the 667eea→764ba2 "route" gradient). Do not invent
     colors here: consistency with app.nexiway.net/nexiway.net is
     the design requirement. */
  --bg: #f8fafc;                /* nx-surface-2 */
  --card: #ffffff;              /* nx-surface   */
  --text: #0f172a;              /* nx-ink       */
  --muted: #64748b;             /* nx-muted     */
  --border: #e2e8f0;            /* nx-border    */
  --border-strong: #cbd5e1;     /* slate-300    */
  --chip-bg: #f1f5f9;           /* nx-hover     */
  --chip-bg-active: #e7e7fa;    /* accent-soft-ish */
  --accent: #5b5bd6;            /* Nexi iris - primary action accent */
  --accent-ink: #3f3fa8;        /* accent text on soft fills */
  --accent-soft: rgba(91, 91, 214, 0.12);
  --accent-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* the route gradient */
  --accent-contrast: #ffffff;
  --amber: #d97706;             /* Analysis amber (amber-600) */
  --amber-bg: #fef3e2;
  --amber-border: #f3d1a4;
  --ok: #16a34a;                /* green-600 */
  --ok-bg: #e7f6ec;
  --danger: #dc2626;            /* red-600 */
  --danger-bg: #fdecec;
  --shadow: 0 1px 2px rgba(23, 26, 38, 0.05), 0 8px 24px rgba(23, 26, 38, 0.06);
  --shadow-pop: 0 4px 10px rgba(23, 26, 38, 0.10), 0 16px 40px rgba(23, 26, 38, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; position: relative; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); flex: none; }

.env-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* The account chip + menu live in account-menu.css (shared with the admin console). */

/* ---------- Layout ---------- */

.app-main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 16px 24px 64px;
}

.layout-rail {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.rail { display: flex; flex-direction: column; gap: 4px; }
.rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.rail-item:hover { background: var(--chip-bg); text-decoration: none; }
.rail-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.rail-item[disabled], .rail-item[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}
.rail-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .layout-rail { grid-template-columns: 1fr; }
  .rail { flex-direction: row; flex-wrap: wrap; }
  .rail-item { width: auto; }
}

/* ---------- Cards & common ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card + .card { margin-top: 16px; }

.card-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-sub { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }

/* Service tabs - the P2P vs Internet mode switch on the quote card */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.card-head .card-title { margin: 0; }
.svc-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--chip-bg); border: 1px solid var(--border); border-radius: 10px;
}
.svc-tab {
  border: 0; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 650; padding: 7px 18px;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.svc-tab:hover { color: var(--text); }
.svc-tab.active {
  background: var(--card); color: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(23, 26, 38, 0.14);
}

/* Advanced expander: toggles sharing one row, each anchored left in
   its own half so the pair scans as two options, not one sentence. */
.toggle-row { align-items: center; }
.toggle-row .toggle { flex: 1 1 320px; min-height: 38px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
}
.field-label:first-child { margin-top: 0; }

.text-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 15px;
}
.text-input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.text-input.ok { border-color: var(--ok); }

select.text-input { width: auto; min-width: 120px; }

.input-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.input-hint:empty { display: none; }
.input-hint.ok { color: var(--ok); }
.input-hint.located { color: var(--text); }
.input-hint.warn { color: var(--amber); }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.chip:hover { background: var(--chip-bg); }
.chip[aria-pressed="true"], .chip.selected {
  background: var(--chip-bg-active);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 650;
}
.chip.small { min-height: 32px; padding: 4px 12px; font-size: 12.5px; }
.chip-custom-input { width: 110px; min-height: 44px; }

/* Segment control */
.segment {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.segment button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  color: var(--muted);
}
.segment button[aria-pressed="true"] {
  background: var(--card);
  color: var(--accent);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* CTA - the ONE gradient per screen */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-grad);
  color: var(--accent-contrast);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}
.cta:hover:not([disabled]) { filter: brightness(1.06); }
.cta[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  color: var(--text);
}
.btn:hover:not([disabled]) { background: var(--chip-bg); text-decoration: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.subtle { border-color: transparent; color: var(--muted); }

/* Expander */
.expander { border-top: 1px solid var(--border); margin-top: 12px; }
.expander > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  padding: 12px 0 4px;
}
.expander > summary::-webkit-details-marker { display: none; }
.expander > summary::before { content: "▸"; font-size: 11px; transition: transform 120ms ease; }
.expander[open] > summary::before { transform: rotate(90deg); }
.expander-body { padding: 4px 0 8px; }

/* Fine print */
.fine-print {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* Popover */
.popover-anchor { position: relative; display: inline-block; }
.popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 250px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 12px;
}
.popover .pop-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.popover .pop-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge.tech { background: var(--chip-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.neutral { background: var(--chip-bg); color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* Inline banners & toasts */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin: 14px 0;
}
.banner.error { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner.success { background: var(--ok-bg); color: var(--ok); }
.banner.warn { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.banner.warn > div > div + div { margin-top: 6px; }
/* A heads-up, not a problem: neutral surface, normal text, an accent rule. */
.banner.note { background: var(--chip-bg); color: var(--text); border-left: 3px solid var(--accent); font-size: 13px; align-items: flex-start; }
.banner.note .note-title { font-weight: 600; margin-bottom: 4px; }
.banner.note .note-line { color: var(--muted); }
.banner.note .note-line + .note-line { margin-top: 4px; }
.banner .btn { min-height: 36px; padding: 6px 14px; flex: none; }

.toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100; /* above Leaflet's panes (400) and controls (1000) */
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  box-shadow: var(--shadow-pop);
  animation: toast-in 160ms ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast-update { display: flex; align-items: center; gap: 12px; }
.toast-btn {
  background: var(--bg);
  color: var(--text);
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.toast-btn:hover { filter: brightness(0.95); }

/* ---------- Serviceability ---------- */

.provider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.provider-row:last-of-type { border-bottom: 0; }
/* Locked rows (no coverage / not onboarded): grey the checkbox + name so
   the row reads as inactive, but DON'T dim the whole row with opacity - the
   status-note carries the "why it can't be quoted" reason and must stay
   legible (a parent's opacity can't be lifted off a child). */
.provider-row.disabled .p-name { color: var(--muted); font-weight: 600; }
/* another way to buy the network above it: indented under its default */
.provider-row.alternate { padding-left: 28px; }
.provider-row.disabled input[type="checkbox"] { opacity: 0.5; }
.provider-row input[type="checkbox"] {
  /* Custom box instead of the browser's: the same look on every platform. */
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  flex: none;
  display: inline-grid; place-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.provider-row input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px;
  transform: scale(0);
  transition: transform 0.12s;
  background: var(--accent-contrast);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.provider-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.provider-row input[type="checkbox"]:checked::before { transform: scale(1); }
.provider-row input[type="checkbox"]:hover:not([disabled]) { border-color: var(--accent); }
.provider-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.provider-row input[type="checkbox"][disabled] { cursor: not-allowed; }
.provider-row .p-name { font-weight: 650; min-width: 140px; }
.provider-row .p-badges { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.honesty-caption { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ---------- Results ---------- */

.results-back { margin-left: auto; }
.results-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 6px; }
.results-header h2 { margin: 0; font-size: 19px; font-weight: 700; }
.results-meta { font-size: 13px; color: var(--muted); }

.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 16px;
}
.progress-track {
  flex: 1;
  max-width: 220px;
  height: 4px;
  border-radius: 2px;
  background: var(--chip-bg);
  overflow: hidden;
}
.progress-fill { height: 100%; background: var(--accent-grad); transition: width 400ms ease; }

.top-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 20px; }
.pick-card {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
}
.pick-card:hover { box-shadow: var(--shadow-pop); }
.pick-card .pick-tags { display: flex; gap: 6px; margin-bottom: 8px; }
.pick-card .pick-provider { font-weight: 700; font-size: 15px; }
.pick-card .pick-product { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pick-card .pick-price { margin-top: 10px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-card .pick-price .per { font-size: 12px; color: var(--muted); font-weight: 550; }
.pick-card .pick-lead { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Refine bar */
.refine-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  margin-bottom: 14px;
  font-size: 13.5px;
}
.refine-bar .refine-field { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.refine-bar label { color: var(--muted); font-weight: 550; }
.refine-bar input[type="number"] {
  width: 110px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.refine-bar select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 550;
  color: var(--muted);
  user-select: none;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.refine-bar .spacer { flex: 1; }

/* Result rows */
.result-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 1fr) minmax(150px, 1fr) minmax(0, 1.6fr);
  gap: 8px 18px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  margin-bottom: 10px;
}
.result-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.result-row .r-provider { font-weight: 700; }
.result-row .r-product { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.result-row .r-spec { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-row .r-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.result-row .r-price .per { font-size: 11.5px; font-weight: 550; color: var(--muted); }
.result-row .r-native { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-row .r-nrc { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-row .r-lead { font-size: 12.5px; color: var(--muted); }
.result-row .r-note { font-size: 12px; color: var(--amber); margin-top: 3px; }
.result-row .r-flags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

@media (max-width: 900px) {
  .result-row { grid-template-columns: 1fr 1fr; }
  .result-row .r-flags { justify-content: flex-start; }
}

.tail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.tail-row:last-child { border-bottom: 0; }
.tail-row .t-provider { font-weight: 650; color: var(--text); min-width: 140px; }
.tail-row .t-reason { flex: 1 1 220px; min-width: 0; }

.tail-toggle {
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  margin-top: 4px;
}
.tail-toggle:hover { background: var(--chip-bg); }

.empty-note { color: var(--muted); font-size: 13.5px; padding: 18px 4px; }

/* ---------- Confirm ---------- */

.confirm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  /* stretch (not start): the two cards share the taller column's height so
     the Logical-design card's bottom lines up with the detail panel's. */
  align-items: stretch;
}
/* The detail panel is the second `.card` sibling, so the stacked-cards
   `.card + .card` margin-top applies and shoves its top down 16px, breaking
   top alignment with the diagram card. Zero it for grid columns. */
.confirm-grid > .card + .card { margin-top: 0; }
@media (max-width: 900px) {
  .confirm-grid { grid-template-columns: 1fr; }
}

/* Direct child only: the logical-design SVG. Leaflet's nested map
   SVGs must keep their own sizing (a descendant selector here once
   collapsed the marker overlay to 0x0 and blew up the attribution
   flag). */
.diagram-card > svg { width: 100%; height: auto; display: block; }
.diagram-caption { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }

.detail-list { margin: 0; }
.detail-list .d-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.detail-list .d-row:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-weight: 550; flex: none; }
.detail-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.detail-list dd .sub { display: block; font-size: 11.5px; color: var(--muted); }
.detail-list dd.flag { color: var(--amber); font-weight: 600; }

.price-hero { padding: 4px 0 14px; }
.price-hero .amount { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.price-hero .per { font-size: 14px; color: var(--muted); font-weight: 550; }
.price-hero .native { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

.confirm-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- History ---------- */

.history-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.history-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.history-table td { padding: 12px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.history-table tbody tr { cursor: pointer; }
.history-table tbody tr:hover td { background: var(--chip-bg); }
.history-table tbody tr:last-child td { border-bottom: 0; }
.history-table .h-addr { font-weight: 600; }

.table-scroll { overflow-x: auto; }

/* ---------- Identity pick state ---------- */

.identity-pick { max-width: 440px; margin: 48px auto 0; text-align: center; }
.identity-pick .pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.identity-pick .pick-list button {
  min-height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--mono);
}
.identity-pick .pick-list button:hover { border-color: var(--accent); color: var(--accent); }

.noscript-note { padding: 40px 20px; text-align: center; color: var(--muted); }

.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.p-req { font-size: 12.5px; color: var(--ink); }

/* Loading skeleton */
.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--chip-bg) 25%, var(--border) 50%, var(--chip-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Last-mile geography map (confirm screen) */
.lastmile-map {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  /* Leaflet stacks its panes at z-index 400-1000 inside; a stacking context
     of our own keeps them under the top bar, menus and dialogs. */
  position: relative; z-index: 0; isolation: isolate;
  border: 1px solid var(--border, rgba(120, 120, 140, 0.25));
  margin-top: 4px;
}
.lastmile-map .leaflet-container { font: inherit; }
/* Leaflet controls must keep their intrinsic SVG sizes (the app's
   fluid-SVG diagram rules otherwise inflate them). */
.lastmile-map .leaflet-control-container svg { width: auto; height: 1em; }
/* Map endpoint pin labels */
.pin-label {
  font: 600 11px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: 0 1px 4px rgba(20, 20, 40, 0.25);
}
.pin-kind {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 1px 4px;
  margin-right: 3px;
  color: #fff;
}
.pin-site { background: #5b5bd6; }
.pin-pop { background: #764ba2; }
/* Coverage status annotations - deliberately NOT the chip idiom */
.status-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.status-note::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
}
.status-off::before { background: var(--danger); }
.status-maybe::before { background: var(--amber); }
.status-located::before { background: var(--muted); }
/* Custom bandwidth value + unit pair */
.bw-custom { display: inline-flex; gap: 6px; align-items: center; }
.bw-custom .chip-custom-input { width: 110px; }
.bw-custom .chip-custom-unit { width: auto; min-height: 44px; }
/* Field pairs (bandwidth + term side by side) */
.field-pair { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.field-pair > span { display: block; min-width: 160px; }

/* Address validation typeahead */
.typeahead-anchor { position: relative; }
.typeahead-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.typeahead-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; min-height: 44px;
  border: 0; background: transparent; cursor: pointer; font-size: 13.5px;
}
.typeahead-item:hover { background: var(--chip-bg); }
.typeahead-searching { padding: 9px 12px; font-size: 13px; color: var(--muted); }
.typeahead-item .ok-mark { color: var(--ok); font-weight: 700; }
.typeahead-item .loc-mark { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 4px; }
.typeahead-item .dc-mark { font-size: 11px; font-weight: 600; color: var(--accent-ink); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
/* the credit a suggestion's source asks for (OpenStreetMap, OneMap) */
.typeahead-item .typeahead-credit { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Recent searches strip */
.recent-zone { margin-top: 18px; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.recent-title { color: var(--muted); font-weight: 650; }
.recent-item { color: var(--accent); }

/* ---------- Projects ---------- */

.new-project { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.new-project .text-input { flex: 1; min-width: 220px; width: auto; }

.proj-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.proj-name {
  min-height: 44px;
  padding: 6px 10px;
  margin-left: -10px;
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: text;
  text-align: left;
}
.proj-name:hover { border-color: var(--border-strong); background: var(--chip-bg); }
.proj-name-input {
  /* the same box as .proj-name, so the title does not jump when editing */
  min-height: 44px; padding: 6px 10px; margin-left: -10px; max-width: 420px;
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
}
.proj-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.run-strip { margin: 0 0 18px; }

.site-add-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.site-add-row label.btn { cursor: pointer; }
.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; }
.import-skipped { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.p-ref { font-size: 12px; font-weight: 600; color: var(--ink-muted, inherit); letter-spacing: 0.01em; }
.p-edit-input { display: block; width: 100%; max-width: 260px; margin-bottom: 6px; font-size: 13px; }
.site-textarea {
  min-height: 96px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Project geography map (mirrors .lastmile-map, taller for many pins) */
.project-map {
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  position: relative; z-index: 0; isolation: isolate;
  border: 1px solid var(--border);
}
.project-map .leaflet-container { font: inherit; }
.project-map .leaflet-control-container svg { width: auto; height: 1em; }
/* Two-line project pin chip (Leaflet tooltip bg stays light in both themes) */
.proj-pin .proj-pin-name { display: block; font-weight: 700; }
.proj-pin .proj-pin-money { display: block; font-weight: 550; opacity: 0.75; font-variant-numeric: tabular-nums; }

/* Green companion to .status-off / .status-maybe */
.status-ok::before { background: var(--ok); }

/* Sites table - rows are not links here, unlike history */
.project-table td { vertical-align: top; }
.project-table .p-addr { font-weight: 600; }
.project-table tbody tr { cursor: default; }
.project-table tbody tr:hover td { background: transparent; }
.project-table .p-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.project-table .p-actions .btn { min-height: 44px; padding: 8px 12px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.offer-select { min-height: 44px; width: auto; max-width: 260px; font-size: 13px; }

.totals-strip {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.totals-strip strong { color: var(--text); font-weight: 700; }

/* Add-to-project panel (confirm screen) */
.addproj-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.addproj-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.addproj-row .text-input { width: auto; flex: 1; min-width: 180px; }
/* Login card */
.login-card { max-width: 440px; margin: 48px auto; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand .brand-mark { color: var(--accent); display: inline-block; margin-bottom: 8px; }
.login-fine { margin-top: 20px; text-align: center; }
/* Administration lives in the console in NexiWay control - the
   SPA's admin screen and its styles are gone. */
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
/* Must out-rank .btn:hover:not([disabled]) (0,3,0) - that rule swaps
   the background to chip-bg and left white-on-white invisible text. */
.btn.accent:hover:not([disabled]) {
  background: var(--accent); color: var(--accent-contrast); filter: brightness(1.08);
}

/* Brand devices shared with nexiway.net (route gradient family) */
.text-gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mesh-backdrop {
  background:
    radial-gradient(60rem 40rem at 75% -10%, rgba(118, 75, 162, 0.10), transparent 60%),
    radial-gradient(50rem 40rem at 10% 10%, rgba(102, 126, 234, 0.10), transparent 55%);
}

/* ---------- Landing v2 (app.nexiway.net /start reference) ---------- */
.greeting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 16px; }
/* Landing greeting harmonised with the NexiWay start page (.greet 28px/700,
   .greet-sub 14px) so the two products' landings read consistently. */
.greeting { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.greeting-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.company-chip {
  font-size: 12.5px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; white-space: nowrap;
}
.company-logo { display: block; height: 48px; max-width: 210px; object-fit: contain; object-position: right top; }

.hero-card { border: 2px solid var(--accent); border-radius: 16px; padding: 22px 30px 24px; }

/* Inline-labeled fields - the reference's "Bandwidth · 10 Gbps" idiom */
.infield {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--card); padding: 0 16px; min-height: 52px; flex: 1;
}
.infield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.infield > label { color: var(--muted); font-size: 14px; font-weight: 550; white-space: nowrap; }
.infield input, .infield select {
  border: 0; outline: 0; background: transparent; flex: 1;
  min-height: 50px; font-size: 15px; color: var(--text); min-width: 0;
}
.infield-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.infield-btn {
  border: 0; background: transparent; color: var(--text);
  font-size: 15px; min-height: 50px; cursor: pointer; text-align: left; width: 100%;
}
.infield .typeahead-list { left: -1px; right: -1px; }

/* Labeled parameter zones on the quote card: the address stays the one
   prominent field; the dropdown rows sit inside quiet slate panels so
   the card scans as address -> circuit -> delivery instead of a flat
   pile of same-weight boxes. */
.field-group {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px 10px;
  margin-top: 10px;
}
.field-group > .group-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin: 0 2px;
}
.field-group .infield-row { margin-top: 6px; }
.field-group .infield { border-color: var(--border); }
.field-group .infield:focus-within { border-color: var(--accent); }
.try-label { color: var(--muted); font-size: 12.5px; }

#submitZone { margin-top: 14px; }

.cta.solid { background: var(--accent); box-shadow: 0 8px 18px -8px rgba(91, 91, 214, 0.55); }
.cta.solid[disabled] { box-shadow: none; } /* same specificity as .cta[disabled]; keep its no-shadow */
.cta.wide { width: 100%; }

.alt-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted); font-size: 12.5px; margin: 10px 0 8px;
}
.alt-divider::before, .alt-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.alt-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.alt-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; min-height: 44px;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 12px; font-weight: 650; font-size: 13.5px; text-decoration: none;
}
.alt-tile:hover { text-decoration: none; filter: brightness(0.97); }

.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 10px;
}
.recent-box {
  border: 1.5px dashed var(--border-strong); border-radius: 12px;
  padding: 22px; text-align: center; font-size: 14px;
}
.recent-box.filled { border-style: solid; border-color: var(--border); background: var(--card); text-align: left; padding: 6px 8px; }
.recent-box.filled .recent-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 12px; min-height: 44px; border-radius: 8px; color: var(--text); text-decoration: none;
}
.recent-box.filled .recent-item:hover { background: var(--chip-bg); }
.recent-box .r-addr { font-weight: 600; }

.rail-ico { flex: none; opacity: 0.85; }
.rail-item { justify-content: flex-start; }
.rail-item .rail-tag { margin-left: auto; }
.rail-sep { height: 1px; background: var(--border); margin: 8px 4px; }
/* hidden must always win over class display rules (recorded trap) */
[hidden] { display: none !important; }

/* Short viewports (high zoom / small laptops): the whole quote card
   must stay above the fold. Tier 1 shrinks the greeting and rhythm;
   tier 2 drops the greeting and fine print entirely (user-approved
   last resort) rather than force scrolling. */
@media (max-height: 860px) {
  .app-main { padding-top: 8px; }
  .greeting-row { margin: 0 0 10px; align-items: center; }
  .greeting { font-size: 19px; }
  .greeting-sub { display: none; }
  .company-chip { padding: 5px 10px; font-size: 11.5px; }
  .company-logo { height: 36px; max-width: 160px; }
  .hero-card { padding: 14px 24px 14px; }
  .card-title { font-size: 17px; }
  .card-sub { margin-bottom: 8px; }
  .infield { min-height: 44px; }
  .infield input, .infield select, .infield-btn { min-height: 42px; }
  .field-group { padding: 6px 10px 8px; margin-top: 8px; }
  .field-group .infield-row { margin-top: 4px; }
  .expander { margin-top: 8px; }
  .expander > summary { min-height: 34px; }
  #submitZone { margin-top: 10px; }
  .cta.wide { min-height: 44px; }
  .alt-divider { margin: 8px 0; }
  .alt-tile { flex-direction: row; justify-content: center; gap: 8px; padding: 8px 12px; min-height: 40px; }
  .fine-print { margin-top: 8px; padding-top: 8px; font-size: 11px; }
}
@media (max-height: 700px) {
  .topbar { height: 46px; }
  .greeting-row { display: none; }
  .card-sub { display: none; }
  .chip.small { min-height: 28px; padding: 2px 10px; }
  .fine-print { display: none; }
  .alt-divider { display: none; }
  .alt-actions { margin-top: 8px; }
  .expander > summary { min-height: 30px; }
  #submitZone { margin-top: 8px; }

} /* closes @media (max-height: 700px) above, which ran to end of file */

/* ---------------- NexiWay hand-off window (/handoff, X1/X2) ---------------- */
.handoff-card { max-width: 920px; margin: 0 auto; border: 2px solid var(--accent); }
.handoff-loop { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 18px; }
.handoff-loop-title { margin: 0 0 4px; font-size: 16px; }
.handoff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.handoff-field { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--card); min-width: 0; }
.handoff-field.locked { background: var(--chip-bg); color: var(--muted); }
.handoff-field-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.handoff-field-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handoff-field select { flex: 1; border: 0; background: transparent; font: inherit; }
.handoff-lock { font-size: 12px; opacity: .7; }
.handoff-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.handoff-segment, .handoff-providers { border: 1px solid var(--border); border-radius: 8px; padding: 12px; min-width: 0; }
.handoff-segment-head { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.handoff-segment-route { background: var(--amber-bg); border: 1px solid var(--amber-border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; overflow-wrap: anywhere; }
.handoff-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.handoff-facts dt { color: var(--muted); }
.handoff-facts dd { margin: 0; text-align: right; font-weight: 600; }
.handoff-provider { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; }
.handoff-provider.disabled { color: var(--muted); }
.handoff-provider.alternate { padding-left: 24px; }
.handoff-provider span:last-child { margin-left: auto; font-size: 13px; }
.handoff-generate, .handoff-use { width: 100%; margin: 6px 0 12px; }
.handoff-quotes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.handoff-quote { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.handoff-quote:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.handoff-quote-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.handoff-quote-provider { font-weight: 600; }
.handoff-quote-detail { flex-basis: 100%; font-size: 13px; }
.handoff-quote-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 13px; }
.handoff-quote-price strong { font-size: 18px; }
.handoff-actions { display: flex; justify-content: center; margin-top: 18px; }
@media (max-width: 720px) {
  .handoff-grid, .handoff-columns { grid-template-columns: 1fr; }
}

/* Hand-off: the brief "taking you back" screen after the last loop is sent. */
.handoff-returning, .waitscreen { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(248, 250, 252, 0.88); }
.handoff-returning-box, .waitscreen-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 32px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); text-align: center; }
.handoff-spinner, .waitscreen-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: handoff-spin 0.8s linear infinite; }
@keyframes handoff-spin { to { transform: rotate(360deg); } }

/* Long names from NexiWay (PoP names, addresses) wrap inside the card instead
   of widening the page; locked one-line fields keep their ellipsis + title. */
.handoff-card { overflow-wrap: anywhere; }
.handoff-card .handoff-field-value { overflow-wrap: normal; }

/* ── App kit (2026-10-16): the console kit's controls for the app's own
   screens (ui/kit.mjs) - toolbar (search + segments), count pill, empty
   states, quiet row actions, and a confirm dialog of our own. ───────── */
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.srch {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-height: 42px;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 12px;
  background: var(--card); cursor: text; transition: border-color 0.15s, box-shadow 0.15s;
}
.srch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.srch svg { flex: none; color: var(--muted); }
.srch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 9px 0; font: inherit; font-size: 14px; color: var(--text); }
.srch input::-webkit-search-cancel-button { cursor: pointer; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button {
  border: 0; background: none; padding: 7px 12px; border-radius: 7px; min-height: 34px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.cnt { display: inline-block; vertical-align: middle; margin-left: 8px; background: var(--chip-bg); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }
.card-head .card-sub { margin: 0; flex-basis: 100%; }
.empty { padding: 42px 24px; text-align: center; color: var(--muted); }
.empty svg { width: 38px; height: 38px; opacity: 0.5; margin-bottom: 10px; }
.empty h4 { margin: 0 0 5px; font-size: 14.5px; color: var(--text); }
.empty p { margin: 0 auto 14px; font-size: 13px; max-width: 420px; line-height: 1.5; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover:not([disabled]) { background: var(--chip-bg); color: var(--text); }
.btn.ghost.danger { color: var(--danger); background: transparent; }
.btn.ghost.danger:hover:not([disabled]) { background: var(--danger-bg); color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.solid:hover:not([disabled]) { background: #b91c1c; border-color: #b91c1c; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.ov {
  position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; /* above toasts (1100) */
  padding: 20px; background: rgba(20, 18, 45, 0.5); backdrop-filter: blur(2px);
}
.ov.on { display: flex; }
.dialog {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 18px; padding: 24px;
  box-shadow: 0 40px 80px -30px rgba(30, 27, 57, 0.6); animation: toast-in 140ms ease;
}
.dialog h3 { margin: 0 0 6px; font-size: 17px; }
.dialog p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.dialog .acts { display: flex; gap: 9px; justify-content: flex-end; }
.dialog.wide { max-width: 560px; }
.dialog .pick { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; margin: 0 0 16px; }
.dialog .pick-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; color: var(--text); cursor: pointer;
}
.dialog .pick-row:hover, .dialog .pick-row:focus-visible { background: var(--chip-bg); border-color: var(--border); outline: 0; }
.dialog .pick-main { display: flex; flex-direction: column; min-width: 0; }
.dialog .pick-main b { font-weight: 600; }
.dialog .pick-main small { color: var(--muted); font-size: 12.5px; }
.dialog .pick-meta { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
/* Row actions: quiet, one line, so a table never jumps. */
.row-actions { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.history-table td.row-actions-cell { text-align: right; }
.project-table .p-actions { flex-wrap: nowrap; justify-content: flex-end; }
.project-table td:first-child { min-width: 240px; }
.project-table td:nth-child(2) { min-width: 200px; max-width: 360px; }
.project-table th:last-child, .project-table td:last-child { text-align: right; }
.project-table .p-actions .btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.project-table .p-actions .offer-select { min-height: 36px; padding: 4px 8px; font-size: 13px; max-width: 260px; }
.proj-actions .btn.ghost { min-height: 44px; }

/* A button at work (kit busy()): a spinner where its label was. The label only
   goes transparent, so the button keeps its size and the row its shape. A
   disabled button alone reads as "nothing happened" (CLAUDE.md "Waiting states"). */
button[aria-busy="true"], button[aria-busy="true"][disabled] { position: relative; cursor: progress; opacity: 0.85; }
button[aria-busy="true"]:not(.with-label) { color: transparent !important; }
button[aria-busy="true"]:not(.with-label) > * { visibility: hidden; }
button[aria-busy="true"]::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: handoff-spin 0.8s linear infinite; }
/* .with-label: the label says what is happening ("Checking availability…"),
   so it stays, with the spinner before it. */
button.with-label[aria-busy="true"]::after { content: none; }
button.with-label[aria-busy="true"]::before { content: ""; display: inline-block; vertical-align: -3px; width: 14px; height: 14px; margin-right: 8px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: handoff-spin 0.8s linear infinite; }
.cta[aria-busy="true"]::after, .btn.primary[aria-busy="true"]::after, .btn.accent[aria-busy="true"]::after, .btn.danger.solid[aria-busy="true"]::after,
.cta.with-label[aria-busy="true"]::before, .btn.primary.with-label[aria-busy="true"]::before, .btn.accent.with-label[aria-busy="true"]::before { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
/* An input saving its value (the project name). */
input[aria-busy="true"] { cursor: progress; opacity: 0.7; }
/* request-panel.mjs: opened from the Inbox, while the request loads. */
.req-opening { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.req-opening-spin { width: 14px; height: 14px; border-width: 2px; }
/* nav-wait.mjs: the screen while the browser leaves the page. */
.navwait { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(15, 23, 42, 0.45); color: #fff; font: 600 14px system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0.02em; cursor: progress; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.navwait-spinner { width: 44px; height: 44px; box-sizing: border-box; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: handoff-spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::after, button.with-label[aria-busy="true"]::before, .navwait-spinner { animation-duration: 2s; }
}
.dialog .field-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dialog .text-input { width: 100%; margin-bottom: 18px; }
.refine-bar .srch { flex: 1 1 220px; min-height: 40px; }
.refine-bar .srch input { font-size: 13.5px; }
.card-head .cta-link { margin-left: auto; }

/* A screen's way back, above its first card (History, Projects). */
.screen-nav { display: flex; gap: 8px; margin: 0 0 12px; }
.screen-nav .btn.ghost { margin-left: -14px; }

/* Hand-off: the editable customer-site box (the landing page's typeahead) */
.handoff-site input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: inherit; }
.handoff-site input:focus { outline: none; }
.handoff-site:focus-within { border-color: var(--accent); }
.handoff-site .typeahead-list { left: -1px; right: -1px; }
.handoff-site-hint { margin: -6px 0 10px; }
.handoff-generate-hint { margin: 6px 0 0; font-size: 13px; }

/* Quotes answered later: the rail's count, the inbox and the warning on results. */
.rail-count { margin-left: auto; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center; }
.rail-count[hidden] { display: none; }
.inbox-section { margin: 18px 0 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.inbox-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 8px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.inbox-row:hover { background: var(--chip-bg); text-decoration: none; }
.inbox-row.unread .inbox-text { font-weight: 600; }
.inbox-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.inbox-facts { color: var(--muted); font-size: 12.5px; }
.inbox-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.late-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; width: 100%; }
.late-note > div { flex: 1 1 260px; min-width: 0; }
.late-note strong { display: block; margin-bottom: 4px; }

/* ---------- Request tree (docs/PLAN_request_tree_api_hub.md 4.1.1) ---------- */
/* The request bar under the results header: reference, run picker, Offers | Timeline. */
.req-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 4px 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--border); }
.req-bar .spacer { flex: 1 1 auto; }
.ref-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer; font-size: 13px; }
.ref-chip:hover { background: var(--chip-bg); }
.ref-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ref-chip .ref-k { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em; }
.ref-chip .ref-v { font-family: var(--mono); font-weight: 600; letter-spacing: 0.03em; }
.ref-chip svg { color: var(--muted); }
.run-pick select { min-height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); padding: 4px 30px 4px 10px; font-size: 13px; max-width: 100%;
  appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.req-changed { color: var(--muted); font-size: 12.5px; }
.req-bar .seg .cnt { margin-left: 6px; padding: 1px 7px; font-size: 11px; }
/* The Timeline tab hides the offers; the Offers tab hides the timeline. */
.card[data-tab]:not([data-tab="offers"]) #topPicks, .card[data-tab]:not([data-tab="offers"]) #refineBar,
.card[data-tab]:not([data-tab="offers"]) #listZone, .card[data-tab]:not([data-tab="offers"]) #tailZone { display: none !important; }
.timeline-zone { padding: 4px 0 6px; }
.tl-block + .tl-block { margin-top: 22px; }
.tl-h { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--muted); }
.br-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.br { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.br-name { max-width: 100%; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.br-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.br-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 8px 0 8px 26px; }
.tl-dot { position: absolute; left: 0; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--border-strong); }
.tl-ok .tl-dot { border-color: var(--ok); }
.tl-warn .tl-dot { border-color: var(--amber); }
.tl-danger .tl-dot { border-color: var(--danger); }
.tl-accent .tl-dot { border-color: var(--accent); }
.tl-body { min-width: 0; overflow-wrap: anywhere; }
.tl-title { font-size: 14px; font-weight: 600; }
.tl-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tl-at { color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 2px; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; } .tl-at { padding-top: 0; } }
/* Inbox rows: an icon per kind of news. */
.inbox-row { flex-wrap: nowrap; align-items: flex-start; }
.inbox-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--chip-bg); color: var(--muted); margin-top: 1px; }
.inbox-ic.ic-late_offer { background: var(--ok-bg); color: var(--ok); }
.inbox-ic.ic-ended, .inbox-ic.ic-waiting { background: var(--amber-bg); color: var(--amber); }
.inbox-ic.ic-overdue { background: var(--danger-bg); color: var(--danger); }
.inbox-row .mono { font-family: var(--mono); font-size: 12px; }
@media (max-width: 640px) { .inbox-row { flex-wrap: wrap; } }

/* ---------- Conversations and documents (docs/PLAN_request_tree_api_hub.md 4.1.1) ---------- */
.req-new { display: inline-flex; align-items: center; gap: 6px; }
.seg .cnt.hot { background: var(--accent); color: var(--accent-contrast); }
/* Each offer: the row, and its Ask button beside it. */
.offer-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.offer-wrap + .offer-wrap { margin-top: 10px; }
.offer-wrap .result-row { margin: 0; }
.offer-ask { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 58px; padding: 6px 4px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 600; }
.offer-ask:hover { border-color: var(--accent); color: var(--accent); }
.offer-ask:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.offer-ask.has-talk { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.offer-ask.hot { background: var(--accent); color: var(--accent-contrast); }
.offer-ask .ask-n { font-variant-numeric: tabular-nums; }
.offer-ask[hidden] { display: none; }
/* Conversations tab */
.talk-list { display: flex; flex-direction: column; gap: 8px; }
.talk-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 16px; width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; color: var(--text); }
.talk-row:hover { border-color: var(--accent); }
.talk-row.hot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.talk-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.talk-title { font-weight: 650; font-size: 14px; }
.talk-sub, .talk-when { color: var(--muted); font-size: 12.5px; }
.talk-last { color: var(--text); font-size: 13px; opacity: 0.85; }
.talk-when { white-space: nowrap; }
/* Documents tab and file cards */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-src { color: var(--muted); font-size: 12px; margin: 0 0 4px 2px; }
.file-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.file-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--chip-bg); color: var(--muted); }
.file-ic.file-kmz, .file-ic.file-kml { background: var(--accent-soft); color: var(--accent-ink); }
.file-ic.file-pdf { background: var(--danger-bg); color: var(--danger); }
.file-ic.file-xlsx, .file-ic.file-csv { background: var(--ok-bg); color: var(--ok); }
.file-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-name { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: 12px; }
.file-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.file-map { grid-column: 1 / -1; height: 280px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); position: relative; }
.file-map-canvas { position: absolute; inset: 0; }
.file-map-note { position: absolute; left: 8px; bottom: 8px; z-index: 500; background: rgba(255, 255, 255, 0.92); border-radius: 6px; padding: 3px 8px; font-size: 12px; color: var(--muted); }
.file-map-note:empty { display: none; }
@media (max-width: 640px) { .file-card { grid-template-columns: auto minmax(0, 1fr); } .file-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* The conversation drawer */
body.cv-open { overflow: hidden; }
.cv-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.28); z-index: 9000; animation: cv-fade 0.15s ease-out; }
.cv-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 9001; background: var(--bg); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: cv-in 0.18s ease-out; }
@keyframes cv-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cv-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cv-drawer, .cv-scrim { animation: none; } }
@media (max-width: 900px) { .cv-drawer { width: 100vw; } }
.cv-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 14px; background: var(--card); border-bottom: 1px solid var(--border); }
.cv-head-main { flex: 1 1 auto; min-width: 0; }
.cv-kicker { color: var(--muted); font-size: 12px; font-weight: 600; }
.cv-kicker .mono { font-family: var(--mono); }
.cv-head h2 { margin: 3px 0 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.cv-about { color: var(--muted); font-size: 12.5px; margin-top: 3px; overflow-wrap: anywhere; }
.cv-head .badge { margin-top: 2px; white-space: nowrap; }
.cv-x { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.cv-x:hover { background: var(--chip-bg); color: var(--text); }
.cv-x:focus-visible { outline: 2px solid var(--accent); }
.cv-hold { margin: 12px 18px 0; font-size: 12.5px; }
.cv-msgs { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.cv-msgs.cv-empty { justify-content: center; text-align: center; }
.cv-msgs.cv-empty p { max-width: 320px; margin: 0 auto; font-size: 13px; }
.cv-msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.cv-msg.mine { align-self: flex-end; align-items: flex-end; }
.cv-msg.theirs { align-self: flex-start; }
.cv-meta { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); }
.cv-who { font-weight: 650; color: var(--text); }
.cv-bubble { padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cv-msg.mine .cv-bubble { background: var(--accent-soft); color: var(--text); border-bottom-right-radius: 4px; }
.cv-msg.theirs .cv-bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.cv-msg.failed .cv-bubble { box-shadow: inset 0 0 0 1px var(--danger); }
.cv-files { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 260px; }
.cv-delivery { font-size: 11.5px; color: var(--muted); }
.cv-msg.failed .cv-delivery { color: var(--danger); }
.cv-sys { align-self: center; color: var(--muted); font-size: 12px; text-align: center; }
.cv-compose { padding: 12px 18px 16px; background: var(--card); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cv-sup { min-height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); padding: 4px 10px; }
.cv-quick { gap: 6px; }
.cv-to { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.cv-text { width: 100%; min-height: 84px; max-height: 40vh; resize: vertical; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card); font-size: 14px; line-height: 1.45; }
.cv-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cv-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-picked:empty { display: none; }
.file-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--chip-bg); font-size: 12.5px; overflow-wrap: anywhere; }
.file-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; border-radius: 999px; }
.file-chip button:hover { color: var(--danger); }
.cv-err { color: var(--danger); font-size: 13px; }
.cv-actions { display: flex; align-items: center; gap: 10px; }
.cv-attach { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cv-hint { flex: 1 1 auto; color: var(--muted); font-size: 12px; text-align: right; }
@media (max-width: 640px) { .cv-hint { display: none; } }
.cv-note { margin: 0; color: var(--muted); font-size: 12px; }
.cv-closed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--card); border-top: 1px solid var(--border); }
.cv-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 0 18px 14px; background: var(--card); }

/* ---------- Ordered with the supplier (docs/PLAN_request_tree_api_hub.md 5, P6) ---------- */
.order-card .order-title { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.order-card .order-sub { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.order-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; }
.order-ref { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; font-size: 12.5px; color: var(--muted); }
.order-done { display: flex; align-items: center; gap: 12px; }
.order-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.order-main { flex: 1 1 auto; min-width: 0; }

/* "Did you mean" + map pin before a quote (ui/address-confirm.mjs) */
.addr-confirm {
  position: relative;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.addr-confirm-head { font-size: 14px; padding-right: 32px; margin-bottom: 10px; overflow-wrap: anywhere; }
.addr-confirm-sub { color: var(--muted); }
.addr-confirm-body { display: flex; flex-direction: column; gap: 6px; }
.addr-choice {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 44px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); font-size: 14px; cursor: pointer;
}
.addr-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.addr-choice-label { overflow-wrap: anywhere; }
.addr-confirm-map { height: 300px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: crosshair; }
.addr-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn.primary:hover:not([disabled]) { background: var(--accent-ink); }
.addr-confirm-close {
  position: absolute; top: 6px; right: 6px; width: 36px; height: 36px;
  border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; border-radius: 8px;
}
.addr-confirm-close:hover { background: var(--chip-bg); color: var(--text); }
.addr-choice .ok-mark { flex: none; font-size: 12px; font-weight: 650; color: var(--ok); }

/* Optional map while typing, and what suppliers got on the results (ui/address-used.mjs) */
.link-btn {
  border: 0; background: none; padding: 4px 2px; min-height: 32px;
  color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.link-btn:hover { color: var(--accent); }
.addr-hint-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.addr-hint-row .input-hint { flex: 1 1 auto; min-width: 0; }
.addr-hint-row .input-hint:empty { display: none; }
.addr-map-btn { flex: none; margin-left: auto; }
.addr-map-btn.on { color: var(--ok); }
.addr-map-zone:empty { display: none; }
.addr-map-zone .addr-confirm { margin: 8px 0 4px; }
.addr-used {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  margin: 4px 0 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: 13px;
}
.addr-used-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; flex: 1 1 420px; min-width: 0; }
.addr-used-row strong { overflow-wrap: anywhere; }
.addr-used-label, .addr-used-note { color: var(--muted); }
.addr-used-row.approx .addr-used-note { color: var(--amber); font-weight: 600; }
.addr-used #changeAddr { margin-left: auto; }

/* The space a company's shared files take, under the conversation box. */
.cv-space.full { color: var(--danger, #b42318); }

/* The release line under the portal (ui/app-version.mjs) */
.app-version { text-align: center; font-size: 11px; color: var(--muted); padding: 16px 12px 24px; }
