/* AutoTruth — Apple-HIG Obsidian Cockpit Design System */
:root {
  --bg: #0B0E14;
  --bg-elev: #131823;
  --bg-elev2: #1A2130;
  --bg-well: #0E121A;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #F5F7FA;
  --text-2: #B7C0D1;
  --muted: #828D9F;
  --amber: #FF9F0A;
  --amber-bg: rgba(255, 159, 10, 0.14);
  --emerald: #30D158;
  --emerald-bg: rgba(48, 209, 88, 0.14);
  --crimson: #FF453A;
  --crimson-bg: rgba(255, 69, 58, 0.15);
  --info: #0A84FF;
  --info-bg: rgba(10, 132, 255, 0.15);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --tab-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(600px 320px at 50% -80px, rgba(255, 159, 10, 0.085), transparent 65%),
    radial-gradient(460px 280px at 90% 10%, rgba(48, 209, 88, 0.05), transparent 60%);
  background-attachment: fixed;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px);
  position: relative;
}

/* Top Brand Header */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  margin-top: calc(-1 * env(safe-area-inset-top));
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 12px rgba(255, 159, 10, 0.22);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.pro-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 159, 10, 0.45);
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.22), rgba(255, 159, 10, 0.08));
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pro-pill-btn.is-pro {
  border-color: rgba(48, 209, 88, 0.45);
  background: var(--emerald-bg);
  color: var(--emerald);
}

/* Views */
.tab-view {
  display: none;
  padding: 14px 16px 24px;
  animation: fadeUp 0.18s ease-out;
}
.tab-view.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Banner & Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 14px;
}

.card-tight {
  padding: 13px 14px;
  border-radius: var(--radius-lg);
}

.hero-scan-card {
  background: linear-gradient(145deg, #171E2E 0%, #101521 62%, rgba(255, 159, 10, 0.11) 100%);
  border: 1px solid rgba(255, 159, 10, 0.28);
  position: relative;
  overflow: hidden;
}

.hero-scan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--amber);
  margin-bottom: 4px;
}

.hero-h1 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.hero-desc {
  margin: 0 0 13px;
  font-size: 13px;
  color: var(--text-2);
}

.scan-btn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }
.btn-amber {
  background: linear-gradient(135deg, #FFB340, #FF9F0A);
  color: #0B0E14;
  box-shadow: 0 6px 20px rgba(255, 159, 10, 0.28);
}
.btn-emerald {
  background: linear-gradient(135deg, #3EE367, #30D158);
  color: #07150B;
  box-shadow: 0 6px 20px rgba(48, 209, 88, 0.26);
}
.btn-crimson {
  background: linear-gradient(135deg, #FF5E55, #FF453A);
  color: #FFFFFF;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-block { width: 100%; }

/* Search Input */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.input, .select {
  width: 100%;
  background: var(--bg-well);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-wrap .input {
  padding-left: 39px;
  padding-right: 36px;
}
.input:focus, .select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 159, 10, 0.18);
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: none;
}
.search-clear.visible { display: grid; place-items: center; }

/* Filter Pills */
.pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.pill-row::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-red { background: var(--crimson); box-shadow: 0 0 8px var(--crimson); }
.dot-amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot-info { background: var(--info); box-shadow: 0 0 8px var(--info); }
.dot-emerald { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

.pill.active {
  background: rgba(255, 159, 10, 0.18);
  border-color: var(--amber);
  color: #FFF;
}
.pill.active[data-color="red"] {
  background: var(--crimson-bg);
  border-color: var(--crimson);
}
.pill.active[data-color="info"] {
  background: var(--info-bg);
  border-color: var(--info);
}

/* Dashboard Lights 3-Column Cockpit Grid */
.lights-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 0 2px 10px;
}

.lights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.light-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
}
.light-tile:active { transform: scale(0.96); }
.light-tile:hover { border-color: var(--border-strong); background: var(--bg-elev2); }

.light-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--bg-well);
  border: 1px solid var(--border);
}
.light-icon-ring svg {
  width: 34px;
  height: 34px;
}

.c-red { color: var(--crimson); }
.c-amber { color: var(--amber); }
.c-info { color: var(--info); }
.c-emerald { color: var(--emerald); }

.ring-red {
  border-color: rgba(255, 69, 58, 0.36);
  background: radial-gradient(circle at center, rgba(255, 69, 58, 0.16), var(--bg-well) 74%);
  filter: drop-shadow(0 0 8px rgba(255, 69, 58, 0.32));
}
.ring-amber {
  border-color: rgba(255, 159, 10, 0.34);
  background: radial-gradient(circle at center, rgba(255, 159, 10, 0.14), var(--bg-well) 74%);
  filter: drop-shadow(0 0 8px rgba(255, 159, 10, 0.26));
}
.ring-info {
  border-color: rgba(10, 132, 255, 0.34);
  background: radial-gradient(circle at center, rgba(10, 132, 255, 0.14), var(--bg-well) 74%);
}

.light-tile-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.light-tile-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 5px;
}
.tag-red { background: var(--crimson-bg); color: var(--crimson); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-info { background: var(--info-bg); color: #5AC8FA; }
.tag-emerald { background: var(--emerald-bg); color: var(--emerald); }

/* Quote Checker */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 6px 2px;
}

.seg-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: var(--bg-well);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 13px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.seg-btn.active {
  background: var(--bg-elev2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 159, 10, 0.35);
}

.money-input-wrap {
  position: relative;
  margin-bottom: 13px;
}
.money-prefix {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 800;
  color: var(--amber);
}
.money-input {
  padding-left: 34px;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.preset-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.preset-strip::-webkit-scrollbar { display: none; }
.preset-chip {
  flex: 0 0 auto;
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.28);
  color: #FF8A80;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Fair-Price Gauge */
.verdict-card {
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #161C2B 0%, #10141F 100%);
}
.verdict-card.v-ripoff { border-color: rgba(255, 69, 58, 0.55); box-shadow: 0 8px 30px rgba(255, 69, 58, 0.14); }
.verdict-card.v-high { border-color: rgba(255, 159, 10, 0.55); }
.verdict-card.v-fair { border-color: rgba(48, 209, 88, 0.5); }
.verdict-card.v-great { border-color: rgba(48, 209, 88, 0.7); box-shadow: 0 8px 30px rgba(48, 209, 88, 0.14); }

.gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 0 10px;
}
.gauge-svg {
  width: 248px;
  height: 136px;
  overflow: visible;
}
.gauge-needle {
  transform-origin: 120px 118px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 10px;
}
.vb-ripoff { background: var(--crimson); color: #FFF; box-shadow: 0 4px 16px rgba(255, 69, 58, 0.45); }
.vb-high { background: var(--amber); color: #0B0E14; }
.vb-fair { background: var(--emerald); color: #07150B; }
.vb-great { background: #30D158; color: #051A0A; box-shadow: 0 4px 16px rgba(48, 209, 88, 0.4); }

.overpay-callout {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.025em;
  font-family: var(--mono);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 12px 0;
}
.cost-box {
  background: var(--bg-well);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 12px;
}
.cost-box-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.cost-box-val {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--mono);
  margin-top: 3px;
}

.bar-row {
  margin: 10px 0;
}
.bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 5px;
}
.bar-track {
  height: 9px;
  background: var(--bg-well);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s ease;
}

.trap-box {
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.32);
  border-radius: 13px;
  padding: 12px 13px;
  margin: 12px 0;
  font-size: 13px;
  color: #FFE0B0;
}
.trap-box strong {
  color: var(--amber);
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.script-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.script-list li {
  background: var(--bg-well);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
}

/* OBD-II Codes */
.obd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.obd-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.obd-card.expanded {
  border-color: rgba(255, 159, 10, 0.45);
  background: #161C2A;
}
.obd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.obd-code-badge {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 159, 10, 0.14);
  color: var(--amber);
  border: 1px solid rgba(255, 159, 10, 0.34);
}
.obd-title {
  margin: 7px 0 4px;
  font-size: 14.5px;
  font-weight: 700;
}
.obd-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.obd-details {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  display: none;
}
.obd-card.expanded .obd-details { display: block; }

.wrenches {
  color: var(--emerald);
  letter-spacing: 1px;
}

/* NHTSA Recalls & Complaints */
.free-recall-banner {
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.2), rgba(48, 209, 88, 0.06));
  border: 1px solid rgba(48, 209, 88, 0.5);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.free-recall-banner h3 {
  margin: 0 0 4px;
  color: var(--emerald);
  font-size: 15.5px;
  font-weight: 800;
}

.recall-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--crimson);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.recall-camp {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--amber);
}
.recall-comp {
  font-size: 14px;
  font-weight: 800;
  margin: 4px 0 6px;
}
.recall-txt {
  font-size: 12.8px;
  color: var(--text-2);
  margin: 0 0 8px;
}
.recall-remedy {
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.26);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  color: #C9F7D5;
}

.complaint-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 8px;
}

/* Bottom Tab Bar (Apple HIG) */
.tab-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(13, 17, 25, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 60;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 12px;
  transition: color 0.15s ease;
}
.tab-btn svg {
  width: 22px;
  height: 22px;
}
.tab-btn.active {
  color: var(--amber);
}
.tab-btn[data-tab="pro"].active {
  color: var(--emerald);
}

/* Modals & Bottom Sheets */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
}
.modal-backdrop[hidden] { display: none !important; }

.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 89dvh;
  overflow-y: auto;
  background: #121722;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 18px 18px 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  position: relative;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.22);
  margin: -4px auto 14px;
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 32px;
}
.detail-icon-lg {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.detail-icon-lg svg { width: 44px; height: 44px; }

.section-h {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 7px;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13.5px;
}
.bullet-list li { margin-bottom: 5px; }

.code-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.code-chip {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(255, 159, 10, 0.34);
  cursor: pointer;
}

/* Camera Scanner Preview */
.scan-preview-frame {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: 16px;
  overflow: hidden;
  background: #070A0F;
  border: 1px solid rgba(255, 159, 10, 0.45);
  margin-bottom: 12px;
  display: grid;
  place-items: center;
}
.scan-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-reticle {
  position: absolute;
  width: 108px;
  height: 108px;
  border: 2px solid var(--amber);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 159, 10, 0.4);
  pointer-events: none;
}

/* Paywall Plans (Apple 3.1.2 Compliant) */
.plan-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 12px 0;
}
.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--bg-well);
  border: 1.5px solid var(--border);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
}
.plan-card.selected {
  border-color: var(--emerald);
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.14), rgba(19, 24, 35, 0.96));
}
.plan-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--emerald);
  color: #051A0A;
  margin-left: 6px;
}
.plan-price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  text-align: right;
}
.plan-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.legal-fineprint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 12px;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
}
.legal-links a, .legal-links button {
  color: var(--text-2);
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

/* Verdict PNG Share Preview */
.verdict-img-preview {
  width: 100%;
  max-height: 54dvh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: #070A0F;
  margin-bottom: 12px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px);
  transform: translateX(-50%) translateY(16px);
  background: rgba(26, 33, 48, 0.96);
  border: 1px solid rgba(255, 159, 10, 0.45);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--amber);
  animation: spin 0.75s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ===================== MULTI-SCANNER CAR INSPECTOR SUITE ===================== */
.scanner-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.scanner-tile {
  background: rgba(14, 18, 26, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  padding: 11px 11px 10px;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.scanner-tile:active { transform: scale(0.97); }
.scanner-tile.tile-crimson { border-color: rgba(255, 69, 58, 0.38); background: linear-gradient(145deg, rgba(255,69,58,0.12), rgba(14,18,26,0.92)); }
.scanner-tile.tile-emerald { border-color: rgba(48, 209, 88, 0.34); background: linear-gradient(145deg, rgba(48,209,88,0.10), rgba(14,18,26,0.92)); }
.scanner-tile.tile-amber { border-color: rgba(255, 159, 10, 0.34); background: linear-gradient(145deg, rgba(255,159,10,0.10), rgba(14,18,26,0.92)); }
.scanner-tile.tile-info { border-color: rgba(10, 132, 255, 0.34); background: linear-gradient(145deg, rgba(10,132,255,0.11), rgba(14,18,26,0.92)); }
.scanner-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.scanner-emoji { font-size: 20px; line-height: 1; }
.scanner-title { font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.scanner-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* Interactive Top-Down Car Blueprint SVG */
.blueprint-box {
  background: radial-gradient(circle at 50% 50%, #172030, #0A0E15 78%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
#car-blueprint-svg {
  width: 100%;
  max-width: 224px;
  height: auto;
  display: block;
}
.car-zone {
  fill: #1A2333;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1.8;
  cursor: pointer;
  transition: fill 0.15s ease, stroke 0.15s ease;
}
.car-zone:hover { fill: #253349; stroke: var(--amber); }
.car-zone.zone-selected {
  fill: rgba(255, 69, 58, 0.45);
  stroke: #FF453A;
  stroke-width: 2.6;
  filter: drop-shadow(0 0 8px rgba(255, 69, 58, 0.55));
}
.zone-lbl {
  fill: #CBD5E4;
  font-size: 8.5px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.04em;
}

.ins-box {
  border-radius: 13px;
  padding: 12px 13px;
  margin: 10px 0;
  border: 1px solid var(--border-strong);
}
.ins-emerald { background: rgba(48, 209, 88, 0.11); border-color: rgba(48, 209, 88, 0.42); color: #D7FBE2; }
.ins-amber { background: rgba(255, 159, 10, 0.12); border-color: rgba(255, 159, 10, 0.42); color: #FFE3B8; }
.ins-red { background: rgba(255, 69, 58, 0.13); border-color: rgba(255, 69, 58, 0.48); color: #FFD2CF; }

/* Condition & Swatch Chips */
.cond-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.cond-chip, .leak-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--bg-well);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  line-height: 1.2;
}
.cond-chip .dot, .swatch-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cond-chip.active, .leak-chip.active {
  background: rgba(255, 159, 10, 0.16);
  border-color: var(--amber);
  color: #FFF;
}
.score-big {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Used Car 10-Point Checklist Rows */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--bg-well);
  border: 1px solid var(--border);
  cursor: pointer;
}
.check-row.checked {
  background: rgba(255, 69, 58, 0.10);
  border-color: rgba(255, 69, 58, 0.42);
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--crimson);
  flex-shrink: 0;
}
.deduct-pill {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--crimson);
  background: var(--crimson-bg);
  padding: 3px 7px;
  border-radius: 7px;
  flex-shrink: 0;
}
