:root {
  --bg: #061018;
  --bg-elev: #121c28;
  --card: rgba(8, 14, 22, 0.82);
  --border: #3a4a5c;
  --text: #f5f8fc;
  --text-dim: #b0bac6;
  --accent: #4f9cf9;
  --accent-hover: #6cb0ff;
  --accent-glow: rgba(79, 156, 249, 0.4);
  --cyan: #8be0ff;
  --danger: #ff5c5c;
  --warn: #ffb84d;
  --ok: #3ecf8e;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --type-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.55);
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --gloss-border-top: #c8f4ff;
  --gloss-border-bot: #6bb4ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -12%, rgba(79, 156, 249, 0.38) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at -8% 20%, rgba(0, 200, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 65% 45% at 108% 28%, rgba(79, 156, 249, 0.2) 0%, transparent 55%),
    linear-gradient(135deg, transparent 42%, rgba(139, 224, 255, 0.07) 49%, transparent 56%),
    linear-gradient(180deg, #061018 0%, #0a121a 45%, #050a10 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath fill='none' stroke='%238be0ff' stroke-opacity='0.22' stroke-width='1' d='M28 1.5 L51 14.5 L51 33.5 L28 46.5 L5 33.5 L5 14.5 Z'/%3E%3C/svg%3E");
  background-size: 56px 48px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, rgba(0,0,0,0.7) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, rgba(0,0,0,0.7) 0%, transparent 75%);
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  top: -30%;
  left: 8%;
  width: 56px;
  height: 160%;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(80, 190, 255, 0.12) 20%,
    rgba(180, 235, 255, 0.35) 48%,
    rgba(79, 156, 249, 0.15) 78%,
    transparent 100%
  );
  transform: rotate(-32deg);
  filter: blur(8px);
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .home-hero__glass { animation: none; }
  .vtype-btn::after,
  .btn-primary,
  .mic-btn { transition: none; }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(79, 156, 249, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
    rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(200, 240, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 40;
}

.maintenance-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: rgba(79, 156, 249, 0.12);
  border-bottom: 1px solid rgba(79, 156, 249, 0.35);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.maintenance-banner__icon {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.maintenance-banner__text {
  margin: 0;
}

.form--maintenance .btn-primary,
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.maintenance-inline-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(79, 156, 249, 0.35);
  background: rgba(79, 156, 249, 0.08);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.paywall-checkout--disabled {
  display: none !important;
}

.maintenance-paywall-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 184, 77, 0.35);
  background: rgba(255, 184, 77, 0.08);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.brand { display: flex; flex-direction: column; gap: 2px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo-mark-wrap {
  /* Diago piston tile already has its own rounded square — no extra chrome */
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}
.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}
.logo-wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #4f9cf9;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(79, 156, 249, 0.45);
}
.logo-ai {
  color: #4f9cf9;
  font-weight: 700;
}
.logo-mark {
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  font-size: 20px;
}
.tagline { font-size: 12px; color: var(--text-dim); }
.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.footer-brand img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.footer-brand span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.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; } }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-hero {
  text-align: center;
  padding: 8px 0 4px;
}

.home-hero__glass {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 40px) clamp(20px, 4vw, 36px);
  border-radius: 18px;
  border: 1.5px solid rgba(79, 156, 249, 0.7);
  border-top-color: var(--gloss-border-top);
  border-bottom-color: var(--gloss-border-bot);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 32%),
    linear-gradient(145deg, rgba(22, 36, 54, 0.78) 0%, rgba(8, 14, 22, 0.62) 100%);
  box-shadow:
    0 0 36px rgba(79, 156, 249, 0.32),
    0 14px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(200, 245, 255, 0.4),
    inset 0 -1px 0 rgba(160, 210, 255, 0.35);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  animation: heroRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-hero__glass::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 10%;
  right: 10%;
  height: 70%;
  background: radial-gradient(circle at 50% 0%, rgba(79, 156, 249, 0.35), transparent 65%);
  pointer-events: none;
  animation: heroSheen 7s ease-in-out infinite alternate;
}

.home-hero__headline {
  position: relative;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #4f9cf9;
  text-shadow: 0 0 28px rgba(79, 156, 249, 0.55), 0 0 48px rgba(79, 156, 249, 0.25);
}

.home-hero__tagline {
  position: relative;
  margin: 0 auto 8px;
  max-width: 520px;
  font-size: clamp(18px, 2.8vw, 22px);
  line-height: 1.45;
  color: #f2f7fc;
  font-weight: 600;
  text-shadow: var(--type-shadow);
}

.home-hero__support {
  position: relative;
  margin: 0 auto;
  max-width: 540px;
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.5;
  color: #e8edf4;
  font-weight: 500;
  text-shadow: var(--type-shadow);
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroSheen {
  from { transform: translateY(0) scale(1); opacity: 0.85; }
  to { transform: translateY(8px) scale(1.05); opacity: 1; }
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 12%),
    rgba(8, 14, 22, 0.82);
  border: 1.5px solid rgba(100, 140, 180, 0.45);
  border-top-color: rgba(200, 240, 255, 0.45);
  border-bottom-color: rgba(120, 180, 240, 0.55);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(160, 210, 255, 0.25);
  animation: heroRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

h1 { margin: 0 0 4px; font-size: 24px; }
.card-intro {
  text-align: center;
  margin-bottom: 8px;
}
.card-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fbff;
  text-shadow: var(--type-shadow);
}
.subtitle { margin: 0 auto 22px; max-width: 42rem; color: #d4dde8; font-size: 14px; line-height: 1.5; text-shadow: 0 1px 2px rgba(0,0,0,.85); }
.card-intro .quota-badge { margin: 4px auto 12px; }
.card-intro .diag-counter { margin: -8px auto 16px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #e8edf4;
  margin-bottom: 7px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.field-optional {
  font-size: 10px;
  font-weight: 400;
  color: #a8b4c0;
  opacity: 0.85;
  margin-left: 4px;
  text-transform: lowercase;
  letter-spacing: 0;
}

.group {
  border: 1px solid rgba(100, 140, 180, 0.35);
  border-radius: 12px;
  padding: 18px 18px 20px;
  margin: 0 0 18px;
  background: rgba(2, 4, 8, 0.28);
}
.group legend {
  padding: 0 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ecfff;
  text-shadow: var(--type-shadow);
}

.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"],
input[type="email"],
select {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 14%, transparent 42%),
    linear-gradient(180deg, #3f5874 0%, #2e445c 42%, #1e3044 100%);
  border: 1.5px solid #4f9cf9;
  border-top-color: var(--gloss-border-top);
  border-bottom-color: #8ec4ff;
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow:
    0 0 14px rgba(79, 156, 249, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(200, 235, 255, 0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
textarea { resize: vertical; }
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  border-color: #7eb6ff;
  box-shadow:
    0 0 20px rgba(79, 156, 249, 0.5),
    0 0 0 3px rgba(79, 156, 249, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
select { appearance: none; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #a0aebc; }

.desc-wrap {
  position: relative;
}
.desc-wrap textarea {
  padding-right: 48px;
  padding-bottom: 44px;
}
.mic-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  color: #e8f4ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 45%),
    rgba(8, 14, 22, 0.88);
  border: 1px solid rgba(158, 207, 255, 0.7);
  border-top-color: var(--gloss-border-top);
  box-shadow:
    0 0 10px rgba(79, 156, 249, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.mic-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9));
}
.mic-btn:hover {
  border-color: #4f9cf9;
  box-shadow: 0 0 14px rgba(79, 156, 249, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.mic-btn.is-listening {
  border-color: var(--danger);
  color: #ffb4b4;
  box-shadow: 0 0 14px rgba(255, 92, 92, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.mic-btn:disabled,
.mic-btn.is-unsupported {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Vehicle type selector ──────────────────────────────────── */
.vtype-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(2, 4, 8, 0.72);
}
.vtype-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  min-height: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 16%, transparent 48%),
    linear-gradient(180deg, #465d78 0%, #334860 40%, #243448 78%, #1a2838 100%);
  border: 1px solid #6a87a8;
  border-top-color: #d0e8ff;
  border-bottom-color: #9ec4ef;
  border-radius: 10px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-shadow: var(--type-shadow);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(200, 230, 255, 0.45);
}
.vtype-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.vtype-ico svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #4f9cf9;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vtype-btn:hover { color: #fff; border-color: var(--accent); }
.vtype-btn.is-active {
  color: #fff;
  border: 2px solid #4f9cf9;
  border-top-color: #7eb6ff;
  border-bottom-color: #9ec8ff;
  background:
    linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0.4) 62%, transparent 82%),
    linear-gradient(180deg, #0e1620 0%, #121c2a 40%, #182636 100%);
  box-shadow:
    0 0 16px rgba(79, 156, 249, 0.45),
    0 0 0 1px rgba(79, 156, 249, 0.5),
    inset 0 4px 10px rgba(0, 0, 0, 0.7),
    inset 0 -1px 0 rgba(160, 210, 255, 0.45);
  padding: 7px 11px;
}
.vtype-btn.is-active .vtype-ico svg { stroke: #7eb6ff; }

.form-positioning-note {
  margin: -8px 0 14px;
  font-size: 13px;
  color: #c5d0db;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.form-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.form-notice--aircraft {
  background: rgba(255, 180, 60, 0.1);
  border: 1px solid rgba(255, 180, 60, 0.35);
  color: var(--text);
}
.field-hint {
  margin: -2px 0 7px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; flex: 1 1 auto; }
.tab {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 88px;
  padding: 8px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
    linear-gradient(180deg, #2a3a4c 0%, #1a2838 100%);
  border: 1px solid #5a7290;
  border-top-color: #c0d8f0;
  border-bottom-color: #7aa0c8;
  border-radius: 10px;
  color: #e8edf4;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.tab:hover { color: #fff; }
.tab.is-active {
  color: #fff;
  border: 1.5px solid #4f9cf9;
  border-top-color: var(--gloss-border-top);
  border-bottom-color: var(--gloss-border-bot);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
    linear-gradient(180deg, #1a3a5c 0%, #122838 100%);
  box-shadow: 0 0 14px rgba(79, 156, 249, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cam-upload {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 28%, transparent 52%),
    linear-gradient(180deg, #2a4a6e 0%, #1a334e 100%);
  border: 1.5px solid #4f9cf9;
  border-top-color: var(--gloss-border-top);
  border-bottom-color: var(--gloss-border-bot);
  box-shadow:
    0 0 14px rgba(79, 156, 249, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(160, 210, 255, 0.35);
  white-space: nowrap;
}
.cam-upload svg {
  width: 15px;
  height: 15px;
  stroke: #e8f4ff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
}
.cam-upload__up {
  width: 12px !important;
  height: 12px !important;
  opacity: 0.95;
}
.cam-upload:hover {
  filter: brightness(1.06);
}

.drop-zone {
  margin-top: 16px;
  border: 2px dashed rgba(79, 156, 249, 0.45);
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(8, 14, 22, 0.55);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(79, 156, 249, 0.08);
}
.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: 12px;
  background: linear-gradient(180deg, #6bb4ff 0%, #4f9cf9 40%, #2870d8 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
  box-shadow:
    0 0 24px rgba(79, 156, 249, 0.45),
    0 8px 20px rgba(34, 102, 196, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(20, 60, 120, 0.35);
}
.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 20px 28px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}
.site-footer a {
  color: #b8c9da;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer a:hover {
  color: var(--accent-hover);
}
.site-footer .footer-ownership {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  opacity: 0.9;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28, 37, 48, 0.96);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  font-size: 13px;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.cookie-banner p { margin: 0; color: var(--text-dim); }
.cookie-banner a { color: var(--accent); }
.cookie-banner-btns { display: flex; gap: 8px; }
.cookie-btn {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.cookie-btn--accept { background: var(--accent); color: #fff; }
.cookie-btn--decline {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.hidden { display: none !important; }

/* VIN scan */
.vin-scan-block { margin-bottom: 12px; }
.vin-scan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.vin-scan-row #vin-input {
  flex: 1 1 200px;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field-hint {
  font-size: 12px;
  color: var(--text-dim, #888);
  margin: 6px 0 0;
  line-height: 1.4;
}
.vin-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim, #aaa);
  margin-top: 8px;
  cursor: pointer;
}
.vin-decode-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.vin-decode-status--ok {
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.25);
  color: var(--text, #e8e8e8);
}
.vin-decode-status--err {
  background: rgba(255, 100, 100, 0.08);
  border: 1px solid rgba(255, 100, 100, 0.25);
  color: #ffb4b4;
}
.vin-recalls-panel {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 180, 80, 0.08);
  border: 1px solid rgba(255, 180, 80, 0.22);
  font-size: 13px;
}
.vin-recalls-panel h4 { margin: 0 0 8px; font-size: 13px; }
.vin-recalls-panel ul { margin: 0; padding-left: 18px; }
.vin-recalls-panel li { margin-bottom: 6px; }
.car-identify-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-secondary--subtle {
  font-size: 13px;
}
.car-identify-status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  background: rgba(120, 200, 120, 0.08);
  border: 1px solid rgba(120, 200, 120, 0.2);
}
.car-identify-status--err {
  background: rgba(255, 100, 100, 0.08);
  border-color: rgba(255, 100, 100, 0.25);
  color: #ffb4b4;
}
.vin-scan-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  padding: 16px;
}
.vin-scan-modal__card {
  width: min(480px, 100%);
  background: var(--card, #1a1f28);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.vin-scan-modal__video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  max-height: 50vh;
  object-fit: cover;
}
.vin-scan-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.photo-confirm-preview {
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  background: #000;
  max-height: 360px;
  object-fit: contain;
}
.photo-confirm-name {
  font-size: 12px;
  color: var(--text-dim, #888);
  margin: 4px 0 0;
  word-break: break-all;
}


@media (max-width: 560px) {
  /* Layout */
  .grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .container { padding: 12px 14px 36px; gap: 14px; }

  .home-hero { padding: 0; }
  .home-hero__glass { padding: 22px 16px; border-radius: 16px; }
  .home-hero__headline { font-size: clamp(34px, 10vw, 44px); margin-bottom: 10px; }
  .home-hero__tagline { font-size: 17px; line-height: 1.4; margin-bottom: 6px; }
  .home-hero__support { font-size: 14px; line-height: 1.45; }

  /* Header */
  .site-header { padding: 12px 14px; flex-wrap: nowrap; gap: 10px; }
  .brand { gap: 2px; min-width: 0; flex: 1; }
  .logo-wordmark { font-size: 18px; }
  .logo-mark-wrap { width: 26px; height: 26px; border-radius: 5px; }
  .logo-icon { width: 26px; height: 26px; }
  .logo-icon { width: 20px; height: 20px; }
  .tagline { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .status {
    flex-shrink: 0;
    max-width: none;
    padding: 5px 10px;
  }
  .status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Vehicle type buttons — 2 columns on mobile */
  .vtype-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .vtype-btn {
    min-width: 0;
    width: 100%;
    font-size: 12px;
    padding: 9px 8px;
    white-space: normal;
    line-height: 1.25;
  }
  .vtype-btn.is-active { padding: 8px 7px; }
  .media-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tabs { width: 100%; }
  .cam-upload {
    justify-content: center;
    width: 100%;
  }
  .desc-wrap textarea { padding-bottom: 48px; }

  /* Form */
  .field-label { font-size: 13px; }
  select, input[type="text"], input[type="email"], textarea {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Submit button */
  .btn-primary { width: 100%; font-size: 16px; padding: 14px; }

  /* Results */
  .result-actions { width: 100%; flex-direction: column; }
  .result-actions .btn-secondary { flex: 1; min-width: 0; width: 100%; }
  .path-choices { grid-template-columns: 1fr; }

  /* Paywall modal */
  .paywall-box { padding: 24px 16px; }
  .paywall-price { font-size: 32px; }
  .paywall-restore-row { flex-direction: column; }
  .paywall-restore-row input { width: 100%; }
  .paywall-restore-row button { width: 100%; }

  /* Cancel modal */
  .cancel-row { flex-direction: column; }

  /* Footer */
  .site-footer { font-size: 11px; padding: 16px; }
}

@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: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}
.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);
  margin: auto;
}
.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;
}
.paywall-cancel a { color: var(--text-dim); text-decoration: underline; }
.paywall-restore { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.paywall-restore-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.paywall-restore-row { display: flex; gap: 8px; align-items: stretch; }
.paywall-restore-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.paywall-restore-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 156, 249, 0.15);
}
.paywall-restore-row button {
  padding: 10px 16px;
  background: rgba(79, 156, 249, 0.16);
  color: var(--text);
  border: 1px solid rgba(79, 156, 249, 0.45);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
}
.paywall-restore-row button:hover {
  background: rgba(79, 156, 249, 0.26);
  border-color: var(--accent);
}
.restore-msg { font-size: 12px; color: var(--text-dim); margin-top: 6px; min-height: 16px; }

.paywall-plan {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  position: relative;
}
.paywall-plan--featured {
  border-color: var(--accent);
  background: rgba(110, 168, 254, 0.06);
  padding-top: 26px;
}
.paywall-plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.paywall-plan .paywall-price { margin-bottom: 12px; }
.paywall-price--small { font-size: 24px; margin-bottom: 12px; }
.paywall-or {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0 14px;
}
.btn-pay-once {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
}

.retry-bonus-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.btn-retry-bonus {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-retry-bonus:hover { background: rgba(110, 168, 254, 0.1); }
.btn-retry-bonus:disabled { opacity: 0.7; cursor: default; }
