/* I Sell Teslas — shared styles (static, mobile-first) */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --text: #1a1c1e;
  --muted: #5a6169;
  --accent: #c8102e;
  --accent-hover: #a50d25;
  --accent-soft: rgba(200, 16, 46, 0.08);
  --border: #e2e0d8;
  --ok: #1a7a4c;
  --ok-soft: rgba(26, 122, 76, 0.1);
  --warn: #8a5a00;
  --warn-soft: rgba(138, 90, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --max: 760px;
  --max-wide: 920px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(26, 28, 30, 0.04), 0 4px 16px rgba(26, 28, 30, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 1.02rem;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap { width: min(100% - 1.5rem, var(--max)); margin-inline: auto; }
.wrap-wide { width: min(100% - 1.5rem, var(--max-wide)); margin-inline: auto; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 245, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 0.85rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav-cta {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* Banner / disclaimer */
.disc-banner {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Hero */
.hero { padding: 2rem 0 1.5rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
}
h1 {
  font-size: clamp(1.7rem, 5.5vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
  font-weight: 750;
}
.lede {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 1.35rem;
  max-width: 38rem;
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  letter-spacing: -0.025em;
  margin: 0 0 0.65rem;
  line-height: 1.25;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.015em;
}
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Path cards (buy / sell) */
.path-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
@media (min-width: 640px) {
  .path-grid { grid-template-columns: 1fr 1fr; }
}
.path-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.path-card:hover {
  border-color: #c8c5bb;
  transform: translateY(-1px);
  color: inherit;
}
.path-card .path-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.path-card h2 { margin-bottom: 0.4rem; font-size: 1.35rem; }
.path-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.path-card .arrow {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Cards / sections */
.section { padding: 0.5rem 0 2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card-soft {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
}
.card-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}
@media (min-width: 560px) {
  .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .card-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Lists */
ul.clean, ol.clean {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
ul.clean li, ol.clean li { margin-bottom: 0.4rem; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.check-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.7rem;
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}
@media print {
  .check-list li::before { border-color: #999; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff !important;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff !important; }
.btn-secondary {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: #bdbab0; color: var(--text) !important; }
.btn-ghost {
  background: transparent;
  color: var(--muted) !important;
  border: 1px solid transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.5rem 0.75rem;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 0;
}
.btn-block { width: 100%; }

/* Tags / pills */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-muted { background: var(--surface-2); color: var(--muted); }

/* Callouts */
.callout {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.callout-ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}
.callout-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}
.callout strong { display: block; margin-bottom: 0.2rem; }

/* Offer cards (soft monetization) */
.offer {
  border: 1px dashed #c8c5bb;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin: 1.25rem 0;
}
.offer .price {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0.5rem;
}
.offer .price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.placeholder-note {
  font-size: 0.78rem;
  color: var(--warn);
  margin-top: 0.5rem;
}

/* Forms (find.html) */
.chat-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-log {
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.bubble {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.bubble.bot {
  background: var(--surface-2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}
.choice-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}
.choice-btn:hover { border-color: var(--accent); color: var(--accent); }
.choice-btn:disabled { opacity: 0.5; cursor: default; }
.profile-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 1rem 0;
  max-height: 280px;
  overflow: auto;
}

/* Resource / affiliate cards */
.resource-item {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.resource-item:last-child { border-bottom: none; }
.resource-item h3 { margin: 0; }
.resource-meta { font-size: 0.82rem; color: var(--muted); }

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.footer-legal { max-width: 42rem; line-height: 1.5; }
.footer-legal p { margin: 0 0 0.55rem; }

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.stack > * + * { margin-top: 0.75rem; }
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 1.75rem 0;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.88rem;
  margin: 0 0 1.25rem;
}
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

@media print {
  .site-header, .site-footer, .no-print, .btn-row, .offer, .disc-banner { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card, .card-soft { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
