/* Components built on tokens.css */

.pro-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--pro-bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--pro-line);
}
.pro-topbar .pro-row { flex-wrap: wrap; justify-content: flex-end; gap: 6px 8px; }
.pro-topbar .pro-row .pro-btn { padding: 8px 12px; font-size: 13px; }
@media (max-width: 640px) {
  .pro-topbar-inner { min-height: 52px; padding: 8px 14px; }
  .pro-topbar .pro-brand { font-size: 14px; }
  .pro-topbar .pro-brand-mark { width: 30px; height: 30px; font-size: 11px; }
  .pro-topbar #pro-health { display: none; }
  .pro-topbar .pro-row .pro-btn { padding: 7px 10px; font-size: 12.5px; }
}
.pro-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pro-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--pro-ink);
  letter-spacing: -0.02em;
}
.pro-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--pro-ink);
  color: var(--pro-bg);
  display: grid;
  place-items: center;
  font-family: var(--pro-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pro-brand-soft);
  color: var(--pro-brand-dark);
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.pro-pill--ok { background: var(--pro-ok-soft); color: var(--pro-ok); }
.pro-pill--warn { background: var(--pro-warn-soft); color: var(--pro-warn); }
.pro-pill--danger { background: var(--pro-danger-soft); color: var(--pro-danger); }
.pro-pill--muted { background: var(--pro-surface-2); color: var(--pro-muted); border: 1px solid var(--pro-line); }
.pro-pill--brand {
  background: color-mix(in srgb, var(--pro-brand) 16%, var(--pro-surface));
  color: var(--pro-brand-dark);
}
.login-err,
#login-err {
  color: var(--pro-danger);
}
.tech-trade-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pro-brand);
  text-transform: uppercase;
}

.pro-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.pro-hero {
  padding: var(--pro-space-6) 0 var(--pro-space-5);
}
.pro-hero h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 600;
  margin: 0 0 12px;
}
.pro-hero .lead {
  color: var(--pro-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 0 20px;
}

.pro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--pro-t), box-shadow var(--pro-t), background var(--pro-t);
}
.pro-btn:active { transform: scale(0.98); }
.pro-btn:focus-visible {
  outline: 2px solid var(--pro-brand);
  outline-offset: 2px;
}
.pro-btn--primary {
  background: var(--pro-brand);
  color: var(--pro-brand-ink, #fff);
}
.pro-btn--primary:hover { background: var(--pro-brand-dark); }
.pro-btn--dark { background: var(--pro-ink); color: var(--pro-bg); }
.pro-btn--ghost {
  background: var(--pro-surface);
  color: var(--pro-ink);
  border: 1px solid var(--pro-line);
}
.pro-btn--ghost { border-color: var(--pro-line-2); }
.pro-btn--ghost:hover { border-color: var(--pro-ink); background: var(--pro-surface-2); }
.pro-btn--ok { background: var(--pro-ok); color: #fff; }
.pro-btn--lg { padding: 16px 22px; font-size: 16px; }
.pro-btn--block { width: 100%; }

.pro-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-lg);
  padding: var(--pro-space-5);
  transition: box-shadow var(--pro-t), border-color var(--pro-t), transform var(--pro-t);
}
.pro-card:hover {
  border-color: var(--pro-line-2);
}
.pro-card-link.pro-card:hover { box-shadow: var(--pro-shadow); }
.pro-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.pro-card p {
  margin: 0;
  color: var(--pro-muted);
  font-size: 0.95rem;
}

.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--pro-space-4);
}

.pro-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.pro-card-link:hover { transform: translateY(-2px); }

.pro-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pro-stat strong {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--pro-ink);
}
.pro-stat span { font-size: 13px; color: var(--pro-muted); }

.pro-empty {
  text-align: center;
  padding: var(--pro-space-8) var(--pro-space-5);
  color: var(--pro-muted);
}
.pro-empty svg { margin-bottom: 12px; opacity: 0.7; }
.pro-empty h3 { color: var(--pro-ink); margin: 0 0 8px; }

.pro-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--pro-ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--pro-r);
  box-shadow: var(--pro-shadow-lg);
  font-size: 14px;
  font-weight: 500;
  max-width: 320px;
  animation: pro-slide-up 0.28s var(--pro-ease);
}
.pro-toast--ok { background: #065f46; }
.pro-toast--warn { background: #92400e; }
.pro-toast--danger { background: #991b1b; }
@keyframes pro-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.pro-skeleton {
  background: linear-gradient(90deg, var(--pro-surface-2) 25%, var(--pro-bg) 50%, var(--pro-surface-2) 75%);
  background-size: 200% 100%;
  animation: pro-shimmer 1.2s infinite linear;
  border-radius: 8px;
  min-height: 14px;
}
@keyframes pro-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pro-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--pro-ok);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}
.pro-status-dot--off { background: var(--pro-muted); box-shadow: none; }
.pro-status-dot--busy { background: var(--pro-warn); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2); }

.pro-progress {
  height: 8px;
  background: var(--pro-line);
  border-radius: 999px;
  overflow: hidden;
}
.pro-progress > i {
  display: block;
  height: 100%;
  background: var(--pro-brand);
  border-radius: 999px;
  transition: width 0.35s var(--pro-ease);
}

.pro-chat {
  max-width: 440px;
  margin: 0 auto;
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-lg);
  box-shadow: var(--pro-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}
.pro-chat-head {
  padding: 16px 18px;
  background: var(--pro-ink);
  color: var(--pro-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.pro-chat-head small { opacity: 0.75; display: block; margin-top: 2px; font-size: 12px; }
.pro-chat-body {
  flex: 1;
  padding: 16px;
  background: var(--pro-surface-2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pro-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  white-space: pre-wrap;
  animation: pro-msg-in 0.22s var(--pro-ease);
}
@keyframes pro-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.pro-msg--bot {
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.pro-msg--user {
  background: var(--pro-brand);
  color: var(--pro-brand-ink, #fff);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.pro-msg--sys {
  align-self: center;
  background: var(--pro-ok-soft);
  color: var(--pro-ok);
  border: 1px solid color-mix(in srgb, var(--pro-ok) 35%, var(--pro-line));
  font-size: 13px;
  max-width: 95%;
}
.pro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  background: var(--pro-surface-2);
}
.pro-chip {
  border: 1px solid var(--pro-line-2);
  background: var(--pro-surface);
  color: var(--pro-ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--pro-t), color var(--pro-t), transform var(--pro-t);
}
.pro-chip:hover {
  border-color: var(--pro-brand);
  color: var(--pro-brand-dark);
  transform: translateY(-1px);
}
.pro-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--pro-line);
  background: var(--pro-surface);
}
.pro-chat-input input {
  flex: 1;
  border: 1px solid var(--pro-line);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  background: var(--pro-surface);
  color: var(--pro-ink);
}
.pro-chat-input input:focus {
  outline: none;
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px var(--pro-brand-soft);
}

.pro-footer {
  border-top: 1px solid var(--pro-line);
  padding: 28px 0 40px;
  color: var(--pro-muted);
  font-size: 13px;
  margin-top: 48px;
}

.pro-gap {
  border-left: 3px solid var(--pro-brand);
  padding: 12px 16px;
  background: var(--pro-surface);
  border-radius: 0 var(--pro-r) var(--pro-r) 0;
  font-size: 14px;
  color: var(--pro-muted);
  margin: 16px 0;
}
.pro-gap strong { color: var(--pro-ink); }

/* Mobile sticky CTA */
.pro-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--pro-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--pro-line);
  gap: 8px;
  z-index: 40;
}
@media (max-width: 720px) {
  .pro-sticky-cta { display: flex; }
  .pro-sticky-cta .pro-btn { flex: 1; }
  .pro-body--sticky-pad { padding-bottom: 88px; }
}

/* Forms */
.pro-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-ink-2);
  margin: 0 0 6px;
}
.pro-input,
.pro-select,
.pro-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-sm);
  font: inherit;
  font-size: 15px;
  background: var(--pro-surface);
  color: var(--pro-ink);
  margin: 0 0 12px;
  transition: border-color var(--pro-t), box-shadow var(--pro-t);
}
.pro-input:focus,
.pro-select:focus,
.pro-textarea:focus {
  outline: none;
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px var(--pro-brand-soft);
}
.pro-textarea { min-height: 88px; resize: vertical; }
.pro-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .pro-form-row { grid-template-columns: 1fr; }
}
.pro-form-note {
  font-size: 13px;
  color: var(--pro-muted);
  margin: 8px 0 0;
}
.pro-field { margin-bottom: 4px; }

/* Code / pre */
.pro-code {
  margin: 0;
  font-family: var(--pro-mono);
  font-size: 12px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: var(--pro-r);
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
}
.pro-code--soft {
  background: var(--pro-surface-2);
  color: var(--pro-ink);
  border: 1px solid var(--pro-line);
}

/* List / asset rows */
.pro-list-item {
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  padding: 12px 14px;
  margin: 8px 0;
  background: var(--pro-surface);
  font-size: 13.5px;
  transition: border-color var(--pro-t), box-shadow var(--pro-t);
}
.pro-list-item:hover {
  border-color: var(--pro-line-2);
  box-shadow: var(--pro-shadow-sm);
}
.pro-list-item[role="button"] { cursor: pointer; }
.pro-list-item[role="button"]:focus-visible {
  outline: 2px solid var(--pro-brand);
  outline-offset: 2px;
}
.pro-list-item.is-selected,
.pro-list-item.asset-active {
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px var(--pro-brand-soft);
}
.pro-list-item .meta { color: var(--pro-muted); font-size: 12.5px; margin-top: 4px; }
.pro-list-item .mono, .pro-list-item .id {
  font-family: var(--pro-mono);
  font-size: 12px;
  color: var(--pro-muted);
  font-variant-numeric: tabular-nums;
}
.pro-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #92400e;
  background: var(--pro-warn-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* Section spacing */
.pro-page { padding: 24px 0 64px; }
.pro-section { margin-bottom: 24px; }
.pro-stack { display: flex; flex-direction: column; gap: 12px; }
.pro-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pro-muted { color: var(--pro-muted); }
.pro-h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 8px;
}
.pro-lead {
  color: var(--pro-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 0 16px;
}

/* Loading overlay skeleton block */
.pro-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--pro-space-5);
}
.pro-loading .pro-skeleton { height: 14px; }
.pro-loading .pro-skeleton:nth-child(1) { width: 40%; height: 20px; }
.pro-loading .pro-skeleton:nth-child(2) { width: 90%; }
.pro-loading .pro-skeleton:nth-child(3) { width: 70%; }

/**
 * Field shell (tech PWA). Defaults are dark for unthemed demos.
 * Under html[data-mall-theme], theme-tools-parity.css remaps via surface mode
 * so light palettes are readable (same system as customer websites).
 */
.pro-body--field {
  --field-shell-bg: #0f172a;
  --field-shell-ink: #e2e8f0;
  --field-shell-muted: #94a3b8;
  --field-shell-surface: #1e293b;
  --field-shell-line: #334155;
  background: var(--field-shell-bg);
  color: var(--field-shell-ink);
}
.pro-body--field .pro-topbar {
  background: color-mix(in srgb, var(--field-shell-bg) 94%, transparent);
  border-bottom-color: var(--field-shell-line);
}
.pro-body--field .pro-brand { color: var(--field-shell-ink); }
.pro-body--field .pro-card {
  background: var(--field-shell-surface);
  border-color: var(--field-shell-line);
  color: var(--field-shell-ink);
}
.pro-body--field .pro-card p,
.pro-body--field .pro-muted,
.pro-body--field .pro-form-note { color: var(--field-shell-muted); }
.pro-body--field .pro-input,
.pro-body--field .pro-select,
.pro-body--field .pro-textarea {
  background: var(--field-shell-bg);
  border-color: var(--field-shell-line);
  color: var(--field-shell-ink);
}
.pro-body--field .pro-btn--ghost {
  background: transparent;
  border-color: var(--field-shell-line);
  color: var(--field-shell-ink);
}
.pro-body--field .pro-list-item {
  background: var(--field-shell-surface);
  border-color: var(--field-shell-line);
  color: var(--field-shell-ink);
}
.pro-body--field .pro-list-item.is-selected {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}
.pro-body--field .pro-footer {
  border-top-color: var(--field-shell-line);
  color: var(--field-shell-muted);
}

/* Big action buttons (field) */
.pro-btn--xl {
  padding: 16px 18px;
  font-size: 1.05rem;
  border-radius: var(--pro-r-lg);
  width: 100%;
  margin: 8px 0;
  justify-content: space-between;
  text-align: left;
  position: relative;
}
.pro-btn--xl .xl-hint {
  font-family: var(--pro-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}
.pro-btn--arrive { background: var(--pro-status-arrived); color: #fff; }
.pro-btn--work { background: var(--pro-status-working); color: var(--pro-ink); }
.pro-btn--done { background: var(--pro-status-done); color: #fff; }
.pro-btn--cancel { background: transparent; color: var(--pro-danger); border: 1px solid var(--pro-line-2); font-size: 0.95rem; padding: 12px 16px; }
/* Current status: ring + check; not-yet-reachable steps: muted */
.pro-btn--xl.is-active {
  box-shadow: 0 0 0 3px var(--pro-surface), 0 0 0 5px currentColor;
}
.pro-btn--xl.is-active::after {
  content: "Current";
  font-family: var(--pro-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pro-btn--xl.is-active .xl-hint { display: none; }
.pro-btn--xl.is-past { opacity: 0.45; }
.pro-btn--xl[disabled] { opacity: 0.4; cursor: not-allowed; }
.pro-btn--xl:disabled:active { transform: none; }

/* Map chrome */
.pro-map {
  height: 340px;
  border-radius: var(--pro-r-lg);
  border: 1px solid var(--pro-line);
  overflow: hidden;
  box-shadow: var(--pro-shadow-sm);
  background: var(--pro-surface-2);
}
@media (max-width: 640px) {
  .pro-map { height: 280px; }
}
/* Tokenized Leaflet pins / clusters / popups (any map tool) */
.pro-map-pin {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pro-brand);
  border: 2px solid var(--pro-surface);
  box-shadow: 0 0 0 1px var(--pro-line-2), 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--pro-t);
}
.pro-map-pin:hover { transform: scale(1.15); }
.pro-map-pin.is-selected {
  width: 18px; height: 18px;
  background: var(--pro-warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pro-warn) 30%, transparent), 0 1px 3px rgba(0, 0, 0, 0.25);
}
.pro-map-cluster {
  background: var(--pro-ink);
  color: var(--pro-bg);
  border: 2px solid var(--pro-surface);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pro-mono); font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px var(--pro-line-2), 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.pro-map .leaflet-popup-content-wrapper {
  background: var(--pro-surface);
  color: var(--pro-ink);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  box-shadow: var(--pro-shadow);
  font-family: var(--pro-font);
  font-size: 13px;
}
.pro-map .leaflet-popup-content { margin: 10px 14px; line-height: 1.45; }
.pro-map .leaflet-popup-content b { font-weight: 600; }
.pro-map .leaflet-popup-content .mono { font-family: var(--pro-mono); font-size: 12px; color: var(--pro-muted); }
.pro-map .leaflet-popup-tip { background: var(--pro-surface); box-shadow: none; border: 1px solid var(--pro-line); }
.pro-map .leaflet-popup-close-button { color: var(--pro-muted); font-size: 16px; padding: 6px 6px 0 0; }
.pro-map .leaflet-container a.leaflet-popup-close-button:hover { color: var(--pro-ink); }
.pro-map .leaflet-control-zoom a {
  background: var(--pro-surface); color: var(--pro-ink); border-bottom-color: var(--pro-line);
}
.pro-map .leaflet-control-zoom a:hover { background: var(--pro-surface-2); }
.pro-map .leaflet-bar { border: 1px solid var(--pro-line-2); box-shadow: var(--pro-shadow-sm); }
.pro-map .leaflet-control-attribution {
  background: color-mix(in srgb, var(--pro-surface) 85%, transparent);
  color: var(--pro-muted); font-size: 10px;
}
.pro-map .leaflet-control-attribution a { color: var(--pro-muted); }

/* Slot / photo capture */
.pro-slot {
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-lg);
  padding: 14px;
  margin: 10px 0;
  background: var(--pro-surface);
  transition: border-color var(--pro-t), background var(--pro-t), box-shadow var(--pro-t);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
}
.pro-slot--ok { border-color: var(--pro-ok); background: var(--pro-ok-soft); }
.pro-slot--need { border-color: var(--pro-warn); }
.pro-slot--retake { border-color: var(--pro-danger); background: var(--pro-danger-soft); }
.pro-slot--note { grid-template-columns: 1fr; }
.pro-slot-preview {
  width: 72px;
  height: 72px;
  border-radius: var(--pro-r);
  border: 1px dashed var(--pro-line-2);
  background: var(--pro-surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--pro-muted);
  position: relative;
}
.pro-slot--ok .pro-slot-preview { border-style: solid; border-color: var(--pro-ok); }
.pro-slot--retake .pro-slot-preview { border-style: solid; border-color: var(--pro-danger); }
.pro-slot-preview img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pro-slot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.pro-slot-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.pro-slot-req {
  font-family: var(--pro-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pro-muted);
  border: 1px solid var(--pro-line-2);
  border-radius: 4px;
  padding: 1px 5px;
}
.pro-slot-state {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.pro-slot-state--need { background: var(--pro-warn-soft); color: var(--pro-warn); }
.pro-slot-state--ok { background: var(--pro-ok-soft); color: var(--pro-ok); }
.pro-slot-state--retake { background: var(--pro-danger-soft); color: var(--pro-danger); }
.pro-slot-state--opt { background: var(--pro-surface-2); color: var(--pro-muted); border: 1px solid var(--pro-line); }
.pro-slot-reason { font-size: 12.5px; color: var(--pro-danger); margin-top: 4px; }
.pro-slot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pro-slot-actions .pro-btn { padding: 9px 14px; font-size: 13px; border-radius: var(--pro-r); }
/* Keep the native file input functional + labelled, hide the chrome */
.pro-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.pro-file:focus-visible + .pro-btn,
.pro-file:focus-visible ~ .pro-slot-actions .pro-btn--camera {
  outline: 2px solid var(--pro-brand);
  outline-offset: 2px;
}
/* Complete gate */
.pro-gate {
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-lg);
  background: var(--pro-surface);
  padding: 16px;
  margin-top: 16px;
}
.pro-gate--blocked { border-color: color-mix(in srgb, var(--pro-warn) 50%, var(--pro-line)); }
.pro-gate--open { border-color: var(--pro-ok); background: color-mix(in srgb, var(--pro-ok) 10%, var(--pro-surface)); }
.pro-gate-why { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--pro-ink-2); }
.pro-gate-why li { margin: 2px 0; }
.pro-gate .pro-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* Reviews / trust for gateway */
.pro-stars {
  color: var(--pro-warn, #ca8a04);
  letter-spacing: 1px;
  font-weight: 700;
}
.pro-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

/* Focus visibility for a11y */
:focus-visible {
  outline: 2px solid var(--pro-brand);
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pro-brand);
  outline-offset: 2px;
}

/* ========== Q2 signature components ========== */

/* Typing indicator (P1 chat) */
.pro-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.pro-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pro-muted);
  animation: pro-bounce 1.2s infinite ease-in-out;
}
.pro-typing i:nth-child(2) { animation-delay: 0.15s; }
.pro-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pro-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* On-call notify banner (P1) */
.pro-notify {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 90;
  background: color-mix(in srgb, var(--pro-ok) 78%, #000);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--pro-r);
  box-shadow: var(--pro-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.4s var(--pro-ease), opacity 0.4s var(--pro-ease);
  pointer-events: none;
}
.pro-notify.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.pro-notify-pulse {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  animation: pro-pulse-ring 1.5s ease-out infinite;
}
@keyframes pro-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.45); }
  70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Hours schedule panel (P1) */
.pro-hours {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  font-size: 13px;
  margin-top: 8px;
}
.pro-hours dt { color: var(--pro-muted); }
.pro-hours dd { margin: 0; font-weight: 500; text-align: right; font-family: var(--pro-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--pro-ink); }
.pro-hours .is-now { color: var(--pro-brand-dark); font-weight: 600; padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--pro-line); }

/* Tech avatars (P2) */
.pro-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: var(--pro-brand-dark);
}
.pro-avatar--sm { width: 22px; height: 22px; font-size: 10px; }
.pro-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.pro-avatar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pro-avatar-stack { display: flex; }
.pro-avatar-stack .pro-avatar {
  margin-left: -6px;
  border: 2px solid var(--pro-surface);
}
.pro-avatar-stack .pro-avatar:first-child { margin-left: 0; }

/* Trade chips */
.pro-trade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--pro-r-sm);
  border: 1px solid transparent;
}
.pro-trade--HVAC { background: color-mix(in srgb, var(--pro-hvac) 14%, var(--pro-surface)); color: var(--pro-hvac); border-color: color-mix(in srgb, var(--pro-hvac) 30%, transparent); }
.pro-trade--PLUMB { background: color-mix(in srgb, var(--pro-multi) 14%, var(--pro-surface)); color: var(--pro-multi); border-color: color-mix(in srgb, var(--pro-multi) 30%, transparent); }
.pro-trade--ELEC { background: color-mix(in srgb, var(--pro-warn) 14%, var(--pro-surface)); color: var(--pro-warn); border-color: color-mix(in srgb, var(--pro-warn) 30%, transparent); }

/* Day summary strip (P2) */
.pro-day-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin-bottom: 16px;
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  overflow: hidden;
}
.pro-day-card {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--pro-line);
  border-radius: 0;
  padding: 10px 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.pro-day-card:last-child { border-right: 0; }
.pro-day-card strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-family: var(--pro-mono);
  font-weight: 500;
}
.pro-day-card span { font-size: 12px; color: var(--pro-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-day-card--accent { box-shadow: inset 3px 0 0 var(--pro-brand); }
@media (max-width: 640px) {
  .pro-day-strip { grid-template-columns: 1fr 1fr; }
  .pro-day-card { border-bottom: 1px solid var(--pro-line); }
  .pro-day-card:nth-child(2n) { border-right: 0; }
}

/* Mobile bottom nav (P2 tech) */
.pro-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: none;
  background: color-mix(in srgb, var(--pro-surface) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--pro-line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
  gap: 4px;
}
.pro-bottom-nav a,
.pro-bottom-nav button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--pro-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px 4px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-radius: var(--pro-r);
  transition: color var(--pro-t), background var(--pro-t);
}
.pro-bottom-nav a:hover,
.pro-bottom-nav button:hover { color: var(--pro-ink); }
.pro-bottom-nav a.is-active,
.pro-bottom-nav button.is-active { color: var(--pro-brand); }
.pro-bottom-nav .pro-icon { width: 20px; height: 20px; }
/* In-frame mode: nav sits at the bottom of a .pro-phone frame instead of the viewport */
.pro-phone .pro-bottom-nav {
  position: sticky;
  bottom: 0;
  left: auto;
  right: auto;
  margin-top: auto;
  padding-bottom: 10px;
}
@media (max-width: 720px) {
  .pro-bottom-nav { display: flex; }
  .pro-body--nav-pad { padding-bottom: 72px; }
  .pro-phone .pro-bottom-nav { position: fixed; left: 0; right: 0; }
}

/* Progress ring (P4) */
.pro-ring {
  --pct: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--pro-brand) calc(var(--pct) * 1%), var(--pro-line) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.pro-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--pro-surface);
}
.pro-ring span {
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-family: var(--pro-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--pro-ink);
}
.pro-ring--ready {
  background: conic-gradient(var(--pro-ok) 100%, var(--pro-line) 0);
  box-shadow: 0 0 0 4px var(--pro-ok-soft);
}
.pro-ring--lg { width: 104px; height: 104px; }
.pro-ring--lg::before { inset: 9px; }
.pro-missing { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pro-missing li {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pro-warn-soft);
  color: var(--pro-warn);
  border: 1px solid color-mix(in srgb, var(--pro-warn) 30%, transparent);
  cursor: pointer;
}
.pro-missing li.is-retake { background: var(--pro-danger-soft); color: var(--pro-danger); border-color: color-mix(in srgb, var(--pro-danger) 30%, transparent); }

/* Thumbnail grid (P4) */
.pro-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.pro-thumb {
  aspect-ratio: 1;
  border-radius: var(--pro-r);
  border: 1px solid var(--pro-line);
  background: var(--pro-surface-2);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--pro-muted);
  text-align: center;
  padding: 6px;
  cursor: pointer;
  transition: border-color var(--pro-t), transform var(--pro-t);
}
.pro-thumb:hover { transform: translateY(-1px); border-color: var(--pro-line-2); }
.pro-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.pro-thumb--ok { border-color: var(--pro-ok); }
.pro-thumb--need { border-color: var(--pro-warn); border-style: dashed; }
.pro-thumb--retake { border-color: var(--pro-danger); }
.pro-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--pro-ink) 78%, transparent);
  color: var(--pro-bg);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 6px;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Split map layout (P3) */
.pro-split-map {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pro-split-map--sticky > :first-child { position: sticky; top: 76px; }
@media (max-width: 900px) {
  .pro-split-map { grid-template-columns: 1fr; }
  .pro-split-map--sticky > :first-child { position: static; }
}
.pro-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.pro-map-toolbar .pro-btn { padding: 9px 14px; font-size: 13.5px; }
.pro-cluster-badge {
  background: var(--pro-ink);
  color: var(--pro-bg);
  border-radius: 999px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--pro-mono);
  font-size: 12px;
  font-weight: 500;
  border: 2px solid var(--pro-surface);
  box-shadow: var(--pro-shadow);
}
/* Filter chips as toggles (aria-pressed) */
.pro-chip[aria-pressed="true"] {
  background: var(--pro-ink);
  color: var(--pro-bg);
  border-color: var(--pro-ink);
}
.pro-chip[aria-pressed="true"]:hover { color: var(--pro-bg); transform: none; }
.pro-chip--sm { padding: 6px 10px; font-size: 12px; }

/* Review cards (P5) */
.pro-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.pro-review {
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  padding: 16px;
  box-shadow: var(--pro-shadow-sm);
}
.pro-review blockquote {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--pro-ink-2);
  line-height: 1.45;
}
.pro-review cite {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  color: var(--pro-muted);
  font-weight: 600;
}

/* Before / after (P5 DM0 story) */
.pro-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .pro-ba { grid-template-columns: 1fr; }
}
.pro-ba-card {
  border-radius: var(--pro-r-lg);
  padding: 20px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pro-ba-card::before {
  content: attr(data-label);
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.35);
  padding: 4px 8px;
  border-radius: 6px;
}
.pro-ba-card--before {
  background: linear-gradient(160deg, #334155, #64748b);
}
.pro-ba-card--after {
  background: linear-gradient(160deg, var(--pro-brand-dark, #14532d), var(--pro-brand, #16a34a));
}
.pro-ba-card h4 { margin: 0 0 4px; font-size: 1rem; }
.pro-ba-card p { margin: 0; font-size: 13px; opacity: 0.9; }

/* Sample transcript accordion */
.pro-transcript {
  max-width: 440px;
  margin: 16px auto;
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  background: var(--pro-surface);
  overflow: hidden;
}
.pro-transcript summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pro-transcript summary::-webkit-details-marker { display: none; }
.pro-transcript[open] summary { border-bottom: 1px solid var(--pro-line); }
.pro-transcript-body {
  padding: 12px 16px 16px;
  font-size: 13px;
  color: var(--pro-muted);
  line-height: 1.55;
}
.pro-transcript-body .line { margin: 6px 0; }
.pro-transcript-body .who { font-weight: 700; color: var(--pro-ink); }

/* ========== Q3 case strips + walkthrough ========== */
.pro-case-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.pro-case {
  background: var(--pro-surface);
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r-lg);
  padding: 18px;
  box-shadow: var(--pro-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--pro-t), transform var(--pro-t);
}
.pro-case:hover { box-shadow: var(--pro-shadow); transform: translateY(-2px); }
.pro-case-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pro-brand-dark);
}
.pro-case h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.pro-case p { margin: 0; color: var(--pro-muted); font-size: 0.92rem; flex: 1; }
.pro-case-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 12px; color: var(--pro-muted);
}
.pro-walk {
  max-width: 640px;
  margin: 0 auto;
}
.pro-walk-step {
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-r);
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--pro-surface);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  opacity: 0.55;
  transition: opacity 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pro-walk-step.is-active {
  opacity: 1;
  border-color: var(--pro-brand);
  box-shadow: 0 0 0 3px var(--pro-brand-soft);
}
.pro-walk-step.is-done { opacity: 0.9; }
.pro-walk-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pro-surface-2); border: 1px solid var(--pro-line);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.pro-walk-step.is-active .pro-walk-num {
  background: var(--pro-brand); color: #fff; border-color: var(--pro-brand);
}
.pro-walk-step.is-done .pro-walk-num {
  background: var(--pro-ok); color: #fff; border-color: var(--pro-ok);
}
.pro-walk-timer {
  height: 4px; background: var(--pro-line); border-radius: 999px; overflow: hidden; margin: 12px 0 20px;
}
.pro-walk-timer > i {
  display: block; height: 100%; width: 0%;
  background: var(--pro-brand);
  transition: width 0.2s linear;
}
.pro-stack-cmd {
  font-family: var(--pro-mono);
  font-size: 12px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: 12px;
  overflow: auto;
  margin: 12px 0;
}
