/* =========================================================
   smartcarmanuals.com — light theme, navy chrome, blue accents
   ========================================================= */
:root {
  /* Surfaces */
  --bg-base: #FFFFFF;
  --bg-surface-1: #F8FAFC;
  --bg-surface-2: #F1F5F9;
  --bg-surface-3: #E2E8F0;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverted: #FFFFFF;

  /* Brand: navy + blue */
  --navy: #1E3A8A;
  --navy-deep: #172554;
  --navy-mid: #1E40AF;
  --blue: #2563EB;
  --blue-bright: #3B82F6;
  --blue-soft: rgba(37, 99, 235, 0.08);
  --blue-glow: rgba(37, 99, 235, 0.20);
  --blue-on-navy: #93C5FD;

  /* State */
  --lime: #16A34A;
  --lime-soft: rgba(22, 163, 74, 0.10);
  --lime-bg: #DCFCE7;
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --coral: #DC2626;
  --coral-soft: rgba(220, 38, 38, 0.08);

  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --max: 1200px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-pill: 999px;

  /* Effects */
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 8px 24px rgba(15, 23, 42, 0.10), 0 0 0 1px var(--blue);
  --shadow-glow: 0 0 0 4px var(--blue-glow);

  --transition: 150ms ease-out;
}

/* =========================================================
   Reset + base
   ========================================================= */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-base); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
code, kbd, pre, samp { font-family: var(--font-mono); }
a { color: var(--blue); transition: color var(--transition); }
a:hover { color: var(--blue-bright); }
::selection { background: var(--blue); color: var(--text-inverted); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

/* =========================================================
   Header (dark navy chrome)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-deep);
  color: var(--text-inverted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-inverted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.site-header__brand .brand-mark {
  color: var(--blue-on-navy);
  font-size: 1.15rem;
  line-height: 1;
}
.site-header__brand:hover { color: var(--text-inverted); }
.site-header__brand:hover .brand-mark { color: #BFDBFE; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-block;
  position: relative;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
  border-radius: var(--r-sm);
  transition: color var(--transition), background-color var(--transition);
}
.site-nav a:hover {
  color: var(--text-inverted);
  background: rgba(255, 255, 255, 0.10);
}
.site-nav a[aria-current="page"] {
  color: var(--text-inverted);
  background: rgba(255, 255, 255, 0.12);
}
.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -2px;
  height: 2px;
  background: var(--blue-on-navy);
  border-radius: 2px;
}

.nav-toggle, .nav-toggle-label { display: none; }
@media (max-width: 768px) {
  .site-header__inner { gap: 12px; }
  .nav-toggle-label {
    display: inline-flex; align-items: center;
    margin-left: auto; cursor: pointer; color: var(--text-inverted);
  }
  .site-nav { display: none; width: 100%; margin-left: 0; margin-top: 8px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0;
  }
  .site-nav a[aria-current="page"]::after { display: none; }
  .nav-toggle:checked ~ .site-nav { display: block; }
}

/* =========================================================
   Layout & sections
   ========================================================= */
main { display: block; }
.section { padding: 56px 24px; }
.section--narrow .section__inner { max-width: 760px; }
.section__inner { max-width: var(--max); margin: 0 auto; }
.section--alt {
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.section[id] { scroll-margin-top: 80px; }

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; margin-top: 0; }
h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; color: var(--text-primary); }
h4 { font-size: 1.02rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; color: var(--text-primary); }
.section h1, .section > .section__inner > h2 { text-align: center; margin-bottom: 24px; }
.lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
  line-height: 1.6;
}

/* =========================================================
   Cards (manuals grid)
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.card__title { margin: 0 0 8px; color: var(--navy); font-size: 1.08rem; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.01em; }
.card__body { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; flex: 1; margin-bottom: 16px; }
.card__body em {
  color: var(--text-muted);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0;
}
.card__body p { margin: 0 0 4px; }
.card__body p strong { color: var(--text-primary); }
.card__cta {
  display: inline-block;
  padding: 9px 18px;
  background: var(--navy);
  color: var(--text-inverted);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  align-self: flex-start;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card__cta:hover {
  background: var(--navy-mid);
  color: var(--text-inverted);
  box-shadow: var(--shadow-glow);
}
.card__cta:active { transform: translateY(1px); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: var(--bg-surface-1);
  background-image: radial-gradient(ellipse 70% 60% at 50% 0%, var(--blue-soft), transparent 65%);
  color: var(--text-primary);
  padding: 72px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}
.hero__inner { max-width: 760px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0 0 16px;
  color: var(--navy);
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 auto 24px;
  max-width: 580px;
}
.hero p a { color: var(--blue); }
.hero p a.btn,
.hero p a.btn:link,
.hero p a.btn:visited,
.hero p a.btn:hover { color: var(--text-inverted); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--text-inverted);
  text-decoration: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
  font-family: var(--font-sans);
  cursor: pointer;
}
.btn:hover {
  background: var(--navy-mid);
  color: var(--text-inverted);
  box-shadow: var(--shadow-glow);
}
.btn:active { transform: translateY(1px); }
/* Force white text on `<a class="btn">` regardless of context (e.g. inside .resources where `a` is blue). */
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active { color: var(--text-inverted); }
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--ghost:hover {
  background: var(--blue-soft);
  color: var(--navy);
}
a.btn--ghost,
a.btn--ghost:link,
a.btn--ghost:visited,
a.btn--ghost:hover,
a.btn--ghost:active { color: var(--navy); }

/* =========================================================
   Embeds (iframes)
   ========================================================= */
.embed-host {
  width: 100%;
  border: 0;
  display: block;
  background: var(--bg-base);
  border-radius: var(--r-md);
}

/* =========================================================
   Series Key (model designations panel)
   ========================================================= */
.series-key {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 28px;
}
.series-key__title {
  text-align: center;
  margin: 0 0 18px;
  font-size: 1.4rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
}
.series-key__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.series-key__item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 14px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-sm);
}
.series-key__code {
  font-family: var(--font-mono);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
}
.series-key__name {
  color: var(--text-primary);
  font-size: 0.92rem;
  flex: 1 1 auto;
  min-width: 0;
}
.series-key__years {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.series-key__suffix {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.series-key__suffix strong {
  font-family: var(--font-mono);
  color: var(--blue);
  font-weight: 700;
}

/* =========================================================
   Generations board (whiteboard-style explainer)
   ========================================================= */
.gen-board__formula {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}
.gen-board__formula strong {
  color: var(--navy);
  font-weight: 700;
}
.gen-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.gen-board__col-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}
.gen-board__list,
.gen-board__bodies,
.gen-board__examples {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gen-board__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border-subtle);
}
.gen-board__list li:last-child { border-bottom: 0; }
.gen-board__year {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.86rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.gen-board__arrow {
  color: var(--blue);
  font-weight: 700;
  font-family: var(--font-mono);
  flex: 0 0 auto;
  font-size: 1.05rem;
}
.gen-board__code {
  font-family: var(--font-mono);
  color: var(--blue);
  font-weight: 700;
  font-size: 1.05rem;
  flex: 0 0 auto;
  min-width: 38px;
}
.gen-board__note {
  color: var(--text-primary);
  font-size: 0.92rem;
  flex: 1 1 auto;
  min-width: 0;
}
.gen-board__bodies li {
  padding: 9px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--border-subtle);
}
.gen-board__bodies li:last-child { border-bottom: 0; }
.gen-board__codes-line {
  font-family: var(--font-mono);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: 6px;
  flex: 0 0 auto;
  letter-spacing: 0.02em;
}
.gen-board__body-text { color: var(--text-primary); flex: 1 1 auto; }
.gen-board__examples li {
  padding: 9px 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px dashed var(--border-subtle);
}
.gen-board__examples li:last-child { border-bottom: 0; }
.gen-board__examples strong {
  font-family: var(--font-mono);
  color: var(--blue);
  background: var(--blue-soft);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
}
@media (max-width: 700px) {
  .gen-board { grid-template-columns: 1fr; gap: 28px; }
}

/* =========================================================
   Resources list (Additional Resources, Communities)
   ========================================================= */
.resources { max-width: 760px; margin: 0 auto; color: var(--text-primary); }
.resources p { margin: 0 0 14px; color: var(--text-secondary); line-height: 1.7; }
.resources p strong { color: var(--text-primary); font-weight: 700; }
.resources p strong a { color: var(--text-primary); }
.resources p strong a:hover { color: var(--blue); }
.resources h3 {
  margin: 32px 0 12px;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.resources ul { margin: 8px 0 14px; padding-left: 1.3em; color: var(--text-secondary); }
.resources ul li { margin-bottom: 6px; }
.resources a { color: var(--blue); }

/* Community group entry: link + 1-line description, no harsh bolding */
.group-entry { margin: 0 0 14px; }
.group-entry__link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.group-entry__link:hover { color: var(--blue); text-decoration: underline; }
.group-entry__desc { display: block; color: var(--text-secondary); font-size: 0.92rem; margin-top: 2px; line-height: 1.5; }

/* =========================================================
   Callout (Cabrio advisory and similar)
   ========================================================= */
.callout {
  padding: 18px 20px;
  background: #FFFBEB;
  border-left: 3px solid var(--amber);
  border-top: 1px solid #FCE9B8;
  border-right: 1px solid #FCE9B8;
  border-bottom: 1px solid #FCE9B8;
  border-radius: var(--r-md);
}
.callout__title {
  margin: 0 0 6px;
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.callout__body { margin: 0 0 10px; color: var(--text-primary); }
.callout__body strong { color: var(--text-primary); }
.callout__meta { margin: 0; font-size: 0.92rem; color: var(--text-secondary); }
.callout__meta a { color: var(--blue); font-weight: 600; text-decoration: none; }
.callout__meta a:hover { text-decoration: underline; }

/* =========================================================
   AI Mechanic promo strip
   ========================================================= */
.ai-promo {
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}
.ai-promo::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 70%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--blue-soft), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}
.ai-promo__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
}
.ai-promo__icon-wrap {
  flex: 0 0 auto;
  color: var(--navy);
  display: inline-flex;
}
.ai-promo__icon { width: 96px; height: 64px; display: block; }
.ai-promo__copy { flex: 1 1 320px; min-width: 0; }
.ai-promo__heading {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ai-promo__sub { margin: 0; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.55; }
.ai-promo__cta {
  flex: 0 0 auto;
  display: inline-block;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--text-inverted);
  text-decoration: none;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.ai-promo__cta:hover {
  background: var(--navy-mid);
  color: var(--text-inverted);
  box-shadow: var(--shadow-glow);
}
.ai-promo__cta:active { transform: translateY(1px); }
@media (max-width: 540px) {
  .ai-promo { padding: 24px 18px; }
  .ai-promo__inner { gap: 18px; }
  .ai-promo__icon-wrap { display: none; }
  .ai-promo__cta { width: 100%; text-align: center; }
}

/* =========================================================
   Footer (dark navy)
   ========================================================= */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 36px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer__inner { max-width: var(--max); margin: 0 auto; text-align: center; }
.site-footer ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 8px;
  letter-spacing: 0.3px;
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--text-inverted); }
.site-footer__meta { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.site-footer__meta a { padding: 0; color: rgba(255, 255, 255, 0.75); }
.site-footer__meta a:hover { color: var(--blue-on-navy); }
