:root {
  --bg: #0f1419;
  --bg-elev: #171e26;
  --card: #1c2530;
  --border: #2a3644;
  --text: #e8edf2;
  --text-dim: #9aa7b4;
  --accent: #4f9cf9;
  --accent-hover: #6cb0ff;
  --danger: #ff5c5c;
  --warn: #ffb84d;
  --ok: #3ecf8e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1b2a3d 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.6);
  backdrop-filter: blur(8px);
}

.brand { display: flex; flex-direction: column; }
.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--accent), #8be0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-mark {
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  font-size: 20px;
}
.tagline { font-size: 12px; color: var(--text-dim); }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.status--ok .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status--bad .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.status--checking .dot { background: var(--warn); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.container {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

h1 { margin: 0 0 4px; font-size: 24px; }
.subtitle { margin: 0 0 22px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.field-optional {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
  opacity: 0.6;
  margin-left: 4px;
  text-transform: lowercase;
  letter-spacing: 0;
}

.group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 20px;
  margin: 0 0 18px;
}
.group legend {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.field { display: flex; flex-direction: column; }
.field--wide { grid-column: 1 / -1; }
.field + .field { margin-top: 0; }
.group .field:not(:last-child) { margin-bottom: 14px; }
.group .grid .field { margin-bottom: 0; }

textarea,
input[type="text"],
select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 156, 249, 0.15);
}
select { appearance: none; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #5c6b7a; }

.tabs { display: flex; gap: 8px; margin: 18px 0 0; }
.tab {
  flex: 1;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.15);
}

.drop-zone {
  margin-top: 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.06);
}
.drop-prompt { margin: 0; color: var(--text-dim); }
.link { color: var(--accent); text-decoration: underline; }
.file-name { margin: 10px 0 0; font-size: 13px; color: var(--text); }
.preview { margin-top: 14px; }
.preview img, .preview video {
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.btn-primary {
  margin-top: 22px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), #3d7fd6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }

.btn-secondary {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.1);
  color: var(--accent-hover);
}
.btn-secondary.is-success {
  border-color: var(--ok);
  color: var(--ok);
}

/* Result */
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  scroll-margin-top: 20px;
}
.result-head-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.result-head h2 { margin: 0; font-size: 22px; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.saved-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  background: rgba(79, 156, 249, 0.08);
  border: 1px solid rgba(79, 156, 249, 0.22);
}
.error-box--inline { margin-bottom: 16px; }
.media-note { font-size: 12px; color: var(--text-dim); }

/* Urgency banner */
.urgency {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.urg-icon { font-size: 26px; }
.urg-label { font-size: 17px; font-weight: 700; }
.urg-reason { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.urg--ok { background: rgba(62, 207, 142, 0.1); border-color: rgba(62, 207, 142, 0.4); }
.urg--ok .urg-label { color: var(--ok); }
.urg--warn { background: rgba(255, 184, 77, 0.1); border-color: rgba(255, 184, 77, 0.4); }
.urg--warn .urg-label { color: var(--warn); }
.urg--bad { background: rgba(255, 92, 92, 0.1); border-color: rgba(255, 92, 92, 0.4); }
.urg--bad .urg-label { color: var(--danger); }

/* Diagnosis cards */
.diag-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.diag-card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 700;
}
.diag-card-body { font-size: 15px; line-height: 1.55; }
.lead { margin: 0; font-size: 16px; }

.sev-row { display: flex; align-items: baseline; gap: 10px; }
.sev-num { font-size: 20px; font-weight: 700; }
.severity-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--border);
}
.severity-fill { height: 100%; border-radius: 999px; transition: width 0.5s; }

/* Causes */
.causes { list-style: none; margin: 0; padding: 0; }
.cause { padding: 12px 0; border-bottom: 1px solid var(--border); }
.cause:first-child { padding-top: 0; }
.cause:last-child { border-bottom: none; padding-bottom: 0; }
.cause-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cause-name { font-weight: 600; }
.cause-exp { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.prob {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
}
.prob--high { background: rgba(255, 92, 92, 0.16); color: var(--danger); }
.prob--med { background: rgba(255, 184, 77, 0.16); color: var(--warn); }
.prob--low { background: rgba(62, 207, 142, 0.16); color: var(--ok); }

/* OBD codes */
.codes { display: flex; flex-wrap: wrap; gap: 8px; }
.code-chip {
  font-family: "Consolas", "SF Mono", ui-monospace, monospace;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 8px;
}

/* Repair type */
.repair-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.repair-reason { font-size: 14px; color: var(--text-dim); flex: 1; min-width: 200px; }

.path-intro {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}
.path-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.path-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.path-choice:hover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.08);
}
.path-choice.is-active {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.14);
  box-shadow: 0 0 0 1px rgba(79, 156, 249, 0.25);
}
.path-choice-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.path-choice-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
}
.path-panel {
  margin-top: 18px;
}
.path-panel .diag-card:first-child {
  margin-top: 0;
}
.cost-diy-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.badge--ok { background: rgba(62, 207, 142, 0.16); color: var(--ok); }
.badge--warn { background: rgba(255, 184, 77, 0.16); color: var(--warn); }
.badge--bad { background: rgba(255, 92, 92, 0.16); color: var(--danger); }

/* Cost */
.parts { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.parts th, .parts td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.parts th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-dim); }
.parts .cost { text-align: right; white-space: nowrap; }
.cost-summary { display: flex; flex-direction: column; gap: 8px; }
.cost-item { display: flex; justify-content: space-between; font-size: 15px; }
.cost-item span { color: var(--text-dim); }
.cost-total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 2px;
  font-size: 17px;
}
.cost-total strong { color: var(--accent); }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 8px; line-height: 1.5; }

/* Repair steps */
.repair-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: repair-step;
}
.repair-step {
  position: relative;
  counter-increment: repair-step;
  padding: 0 0 14px 44px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.repair-step:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.repair-step::before {
  content: counter(repair-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(79, 156, 249, 0.14);
  border: 1px solid rgba(79, 156, 249, 0.4);
  border-radius: 999px;
}
.repair-step-title { font-weight: 700; line-height: 1.4; }
.repair-step-detail { font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.repair-step-caution {
  font-size: 13px;
  color: var(--warn);
  margin-top: 6px;
  line-height: 1.5;
  border-left: 3px solid var(--warn);
  background: rgba(255, 184, 77, 0.08);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}
.repair-video-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.repair-video-link:hover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.12);
  color: var(--accent-hover);
}
.repair-video-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.loc-estimates {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.loc-estimate {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.loc-estimate:first-child { padding-top: 0; }
.loc-estimate:last-child { border-bottom: none; padding-bottom: 0; }
.loc-estimate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.loc-estimate-name { font-weight: 600; flex: 1; min-width: 160px; }
.loc-estimate-price {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.loc-estimate-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}
.loc-estimate-disclaimer,
.shop-complete-note {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}
.diy-warning {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--warn);
  background: rgba(255, 184, 77, 0.1);
  border: 1px solid rgba(255, 184, 77, 0.35);
}
.diy-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}
.diy-total-row strong { color: var(--accent); }
.stores-near--below { margin-top: 18px; }
.shop-store-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.shop-store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.shop-store-row:last-child { border-bottom: none; }
.shop-store-name {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.shop-store-name:hover { text-decoration: underline; }
.shop-store-price {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Shopping list */
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.shop-item:first-child { padding-top: 0; }
.shop-item:last-child { border-bottom: none; padding-bottom: 0; }
.shop-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.shop-item-name { font-weight: 600; font-size: 15px; }
.shop-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
}
.shop-type--part { background: rgba(79, 156, 249, 0.16); color: var(--accent); }
.shop-type--tool { background: rgba(255, 184, 77, 0.16); color: var(--warn); }
.shop-type--supply { background: rgba(62, 207, 142, 0.16); color: var(--ok); }
.shop-links { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-link {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.shop-link:hover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.12);
  color: var(--accent-hover);
}
.shop-hint { margin: 14px 0 0; font-size: 12px; color: var(--text-dim); }

.stores-near { margin-bottom: 18px; }
.stores-near-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.stores-map {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.map-fallback-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}
.map-fallback-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.map-fallback-link:hover { text-decoration: underline; }
.map-open-btn {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(79, 156, 249, 0.16);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.map-open-btn:hover {
  background: rgba(79, 156, 249, 0.28);
  color: var(--accent-hover);
}
.stores-price-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Mechanics near you */
.mechanics-intro {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}
.mechanics-map { margin-bottom: 12px; }
.mechanics-links { margin-bottom: 10px; }
.mechanics-disclaimer {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}
.mechanics-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(79, 156, 249, 0.04);
}

.disclaimer {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  border-left: 3px solid var(--warn);
  background: rgba(255, 184, 77, 0.06);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
}

.error-box {
  border-left: 3px solid var(--danger);
  background: rgba(255, 92, 92, 0.08);
  padding: 14px 16px;
  border-radius: 8px;
  color: #ffd2d2;
  font-size: 14px;
}

/* Diagnosis lead paragraph */
.diagnosis-lead {
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: rgba(79, 156, 249, 0.08);
  border: 1px solid rgba(79, 156, 249, 0.22);
  border-radius: 10px;
  white-space: pre-wrap;
}
.diagnosis-lead--streaming::after {
  content: "\2588";
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: streamCaret 0.9s step-end infinite;
}
@keyframes streamCaret {
  50% { opacity: 0; }
}
.stream-status {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.result.result--streaming .stream-status {
  animation: pulse 1.4s ease-in-out infinite;
}

.result.result--reveal {
  animation: resultReveal 0.45s ease both;
}
@keyframes resultReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading — mechanic bay animation */
.loading {
  text-align: center;
  color: var(--text-dim);
  padding: 28px 16px 22px;
  margin-bottom: 8px;
}
.mech-loader {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
}
.mech-bay {
  position: relative;
  width: 120px;
  height: 72px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(28, 37, 48, 0.9), rgba(23, 30, 38, 0.6));
}
.mech-tool {
  position: absolute;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.mech-tool--wrench {
  left: 10px;
  top: 22px;
  animation: mechWrench 1.6s ease-in-out infinite;
}
.mech-tool--gear {
  left: 46px;
  top: 8px;
  font-size: 30px;
  animation: mechGear 2.4s linear infinite;
}
.mech-tool--car {
  right: 8px;
  bottom: 10px;
  font-size: 28px;
  animation: mechCar 2s ease-in-out infinite;
}
@keyframes mechWrench {
  0%, 100% { transform: rotate(-25deg) translateY(0); }
  50% { transform: rotate(20deg) translateY(-4px); }
}
@keyframes mechGear {
  to { transform: rotate(360deg); }
}
@keyframes mechCar {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}
.loading-stage {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.loading-stage.is-fading { opacity: 0; }
.loading-hint { margin: 6px 0 0; font-size: 12px; color: var(--text-dim); }
.loading-sub { margin: 0; font-size: 12px; color: var(--text-dim); }

.site-footer {
  text-align: center;
  padding: 18px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.hidden { display: none !important; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .site-header { padding: 14px 18px; }
  .result-actions { width: 100%; }
  .result-actions .btn-secondary { flex: 1; min-width: 0; }
  .path-choices { grid-template-columns: 1fr; }
}

@media print {
  .site-header,
  .site-footer,
  .container > .card:first-of-type,
  #loading,
  .path-choices,
  .result-actions,
  .saved-note,
  .error-box--inline,
  .map-open-btn,
  .shop-links,
  .mechanics-links {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .result {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .diag-card,
  .urgency {
    break-inside: avoid;
    border-color: #ccc !important;
    background: #fff !important;
  }

  .stores-map {
    display: none !important;
  }

  .map-fallback-note {
    display: block !important;
    color: #333 !important;
  }

  .map-fallback-link {
    color: #000 !important;
    text-decoration: underline !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    word-break: break-all;
  }

  .repair-video-link::after {
    content: none;
  }
}

/* ── Paywall modal ──────────────────────────────────────────── */
.paywall-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.paywall-overlay.hidden { display: none; }

.paywall-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.paywall-icon { font-size: 48px; margin-bottom: 12px; }
.paywall-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.paywall-desc {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 20px;
  line-height: 1.5;
}
.paywall-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}
.paywall-price span { font-size: 16px; color: var(--text-dim); font-weight: 400; }
.paywall-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: inline-block;
}
.paywall-perks li {
  color: var(--text);
  font-size: 14px;
  padding: 4px 0;
}
.btn-subscribe {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-subscribe:hover { background: var(--accent-hover); }
.btn-subscribe:disabled { opacity: 0.6; cursor: not-allowed; }
.paywall-cancel {
  font-size: 12px;
  color: var(--text-dim);
  margin: 12px 0 0;
}
