:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #586271;
  --line: #dce2ea;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --accent: #d3382f;
  --accent-2: #186f65;
  --accent-3: #2b63b7;
  --shadow: 0 18px 60px rgba(25, 35, 50, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 251, 0.94);
  backdrop-filter: blur(14px);
}

.nav-wrap,
.page-shell,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav > a,
.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.main-nav > a:hover,
.main-nav a.active,
.nav-item.active > a {
  color: var(--ink);
  background: #eaf0f6;
}

.nav-item {
  position: relative;
}

/* Padding bridge keeps the hover area continuous between the trigger and the dropdown */
.nav-item {
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.caret {
  font-size: 10px;
  opacity: 0.7;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 30;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  display: flex;
}

.dropdown a {
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.dropdown a:hover,
.dropdown a.active {
  color: var(--ink);
  background: #eaf0f6;
}

.search-pill {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  min-width: 220px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

.page-shell {
  padding: 42px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: stretch;
  min-height: 430px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
}

.description {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 12px 15px;
  font-weight: 800;
  background: var(--panel);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.garage-visual {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(211, 56, 47, 0.22), transparent 34%),
    linear-gradient(210deg, rgba(43, 99, 183, 0.22), transparent 40%),
    #1d242d;
  box-shadow: var(--shadow);
}

.garage-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.55;
}

.vehicle-card-visual {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 18px;
  color: #fff;
  background: rgba(15, 20, 28, 0.72);
}

.vehicle-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.vehicle-strip span {
  min-height: 72px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 26% 58%, #111 0 7px, transparent 8px),
    radial-gradient(circle at 75% 58%, #111 0 7px, transparent 8px),
    linear-gradient(0deg, transparent 46%, #dce2ea 47% 62%, transparent 63%),
    linear-gradient(110deg, #d3382f, #f1b44c);
}

.quick-grid,
.card-grid,
.metric-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.panel,
.resource-card,
.metric,
.note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resource-card h3,
.panel h2,
.section-title {
  margin: 0;
}

.resource-card p,
.panel p,
.note p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.6;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: #344052;
  background: #eef3f8;
}

code,
.tag {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #f1f5f9;
  border-radius: 7px;
  padding: 7px 9px;
}

.code-block {
  white-space: pre-wrap;
  overflow-x: auto;
  background: #111821;
  color: #edf4ff;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.55;
}

.steps {
  display: grid;
  gap: 10px;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-3);
  color: #fff;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  padding: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

.db-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vehicle-search {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
}

.vehicle-search:focus {
  outline: 2px solid var(--accent-3);
  outline-offset: 1px;
}

.db-count {
  color: var(--muted);
  font-size: 13px;
}

.class-row td {
  background: #eef3f8;
  color: #344052;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.class-row .db-count {
  text-transform: none;
  font-weight: 600;
}

.copy-btn {
  border: 1px solid var(--line);
  background: #f1f5f9;
  color: var(--accent-3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  background: #e3ecf8;
}

.copy-btn.copied {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.checklist {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  line-height: 1.65;
}

.error-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.error-list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 13px 15px;
}

.error-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.faq-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.external-link {
  color: var(--accent-3);
  font-weight: 700;
  font-size: 14px;
}

.external-link:hover {
  text-decoration: underline;
}

.meta-tag {
  align-self: flex-start;
  font-size: 12px;
}

.source-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

/* ---- Hero search ---- */
.hero-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 560px;
}

.hero-search input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 13px 15px;
  font-size: 16px;
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(25, 35, 50, 0.08);
}

.hero-search input:focus {
  outline: 2px solid var(--accent-3);
  outline-offset: 1px;
}

.hero-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 25;
  overflow: hidden;
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.suggestion:last-child {
  border-bottom: none;
}

.suggestion:hover {
  background: #eaf0f6;
}

.suggestion-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.suggestion-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.suggestion-empty {
  padding: 14px 15px;
  color: var(--muted);
}

/* ---- Vehicle card grid ---- */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(25, 35, 50, 0.14);
}

.vehicle-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8edf3;
  display: block;
}

.vehicle-card-ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(211, 56, 47, 0.2), transparent 40%),
    linear-gradient(210deg, rgba(43, 99, 183, 0.25), transparent 45%),
    #1d242d;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.vehicle-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px 15px;
}

.vehicle-card-body h3 {
  margin: 0;
  font-size: 16px;
}

.vehicle-card-body code {
  font-size: 13px;
}

.vehicle-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vehicle-card .copy-btn {
  margin-top: 2px;
  align-self: flex-start;
}

/* ---- Class tabs ---- */
.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.class-tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.class-tab:hover {
  color: var(--ink);
  border-color: #b9c4d2;
}

.class-tab.active {
  background: var(--accent-3);
  border-color: var(--accent-3);
  color: #fff;
}

.class-section {
  margin-top: 26px;
}

/* ---- Hero media (video embed) ---- */
.hero-media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #1d242d;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.hero-media iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  display: block;
  flex: 1;
  min-height: 340px;
}

.hero-media-note {
  padding: 12px 16px;
  color: #dfe8f2;
  background: rgba(15, 20, 28, 0.9);
  font-size: 13px;
}

.hero-media-note .external-link {
  color: #9db8e8;
}

.video-embed {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1d242d;
  box-shadow: var(--shadow);
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* ---- Entry cards ---- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(25, 35, 50, 0.14);
}

.entry-card img,
.entry-card-ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #e8edf3;
}

.entry-card-ph {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(211, 56, 47, 0.2), transparent 40%),
    linear-gradient(210deg, rgba(43, 99, 183, 0.25), transparent 45%),
    #1d242d;
  color: #fff;
  font-weight: 800;
}

.entry-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 15px;
}

.entry-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.price-tag {
  background: #e7f3ee;
  border-color: #b9dccb;
  color: #146c4c;
  font-weight: 800;
}

.table-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Footer related searches ---- */
.footer-inner p {
  margin: 0 0 10px;
}

.related-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.related-label {
  color: var(--muted);
  font-weight: 700;
}

.related-searches a {
  color: var(--accent-3);
  font-weight: 600;
}

.related-searches a:hover {
  text-decoration: underline;
}

.related-searches span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .card-grid,
  .metric-grid,
  .link-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .search-pill {
    display: none;
  }

  .vehicle-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .hero-media iframe {
    min-height: 220px;
  }
}
