/* OBD2: Check Engine Reset — checkenginereset.com
   Charcoal + light sections + restrained amber Check Engine accent.
   Mobile-first, no framework, no web fonts. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink:        #0C0F14;
  --ink-2:      #141922;
  --ink-3:      #1E2632;
  --ink-line:   #2A3341;

  --paper:      #FFFFFF;
  --paper-2:    #F4F5F7;
  --line:       #E2E6EB;

  --text:       #12161C;
  --text-2:     #545C69;
  --text-inv:   #F3F5F8;
  --text-inv-2: #A6B0BE;

  --amber:      #F5A524;
  --amber-soft: #FFF4E0;
  --amber-deep: #7A4E00;
  --ok:         #2E9E6B;

  --wrap: 1120px;
  --radius: 14px;
  --radius-lg: 22px;

  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;  --s9: 6rem;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--amber); color: var(--ink); padding: var(--s3) var(--s4);
  font-weight: 650; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- sections ---------- */
.section { padding-block: var(--s8); }
.section--dark { background: var(--ink); color: var(--text-inv); }
.section--dark p { color: var(--text-inv-2); }
.section--tint { background: var(--paper-2); }
.section__head { max-width: 46rem; margin-bottom: var(--s6); }
.section__head p { margin-top: var(--s4); font-size: 1.0625rem; color: var(--text-2); }
.section--dark .section__head p { color: var(--text-inv-2); }

.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber-deep); margin-bottom: var(--s3);
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--amber); }

h1, .h1 { font-size: clamp(2.15rem, 6.2vw, 3.6rem); font-weight: 760; }
h2, .h2 { font-size: clamp(1.65rem, 4vw, 2.4rem); font-weight: 720; }
h3, .h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); font-weight: 680; letter-spacing: -0.012em; }

.lede { font-size: clamp(1.06rem, 2.1vw, 1.22rem); color: var(--text-2); }
.section--dark .lede { color: var(--text-inv-2); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 15, 20, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--text-inv);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); font-weight: 700; letter-spacing: -0.015em; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font-size: 0.98rem; white-space: nowrap; }
.brand__name b { font-weight: 760; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: var(--s5); list-style: none; }
.site-nav a { text-decoration: none; font-size: 0.95rem; color: var(--text-inv-2); font-weight: 550; }
.site-nav a:hover { color: var(--text-inv); }
.site-nav a.is-cta {
  background: var(--amber); color: var(--ink); font-weight: 700;
  padding: 0.5rem 1rem; border-radius: 999px;
}
.site-nav a.is-cta:hover { background: #ffb949; color: var(--ink); }

.nav-toggle {
  margin-left: auto; display: none; align-items: center; gap: 0.5rem;
  background: transparent; border: 1px solid var(--ink-line); color: var(--text-inv);
  border-radius: 10px; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.9rem; cursor: pointer;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { margin-left: 0; display: none; width: 100%; padding-bottom: var(--s4); }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--ink-line); }
  .site-nav a { display: block; padding: 0.85rem 0; font-size: 1rem; }
  .site-nav a.is-cta { text-align: center; margin-top: var(--s3); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.35rem; border-radius: 12px; border: 1px solid transparent;
  font-weight: 680; font-size: 1rem; line-height: 1.2; text-decoration: none;
  min-height: 52px; cursor: pointer; transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--amber); color: #17130A; }
.btn--primary:hover { background: #ffb949; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(127,127,127,0.08); }
.btn--light { background: var(--ink); color: var(--text-inv); }
.btn--light:hover { background: #1b222c; }
.btn--outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn--outline:hover { border-color: #c9d0d8; background: var(--paper-2); }
.btn__icon { width: 20px; height: 20px; flex: none; }
.btn__label { display: flex; flex-direction: column; align-items: flex-start; }
.btn__label small { font-size: 0.68rem; font-weight: 600; opacity: 0.72; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3; }
.btn__label span { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }

.store-buttons { display: flex; flex-wrap: wrap; gap: var(--s3); }
.store-buttons .btn { flex: 1 1 15rem; }
@media (max-width: 480px) { .store-buttons .btn { flex-basis: 100%; } }
/* Store detection (progressive enhancement) — never hides the other platform. */
.platform-ios .store-buttons .btn[data-store="android"],
.platform-android .store-buttons .btn[data-store="ios"] { order: 2; }
.platform-ios .store-buttons .btn[data-store="android"].btn--primary,
.platform-android .store-buttons .btn[data-store="ios"].btn--primary { background: transparent; color: inherit; border-color: currentColor; opacity: 0.85; }

.note { font-size: 0.9rem; color: var(--text-2); margin-top: var(--s4); }
.section--dark .note { color: var(--text-inv-2); }

/* ---------- hero ---------- */
.hero {
  background: radial-gradient(120% 120% at 82% 0%, #1b2430 0%, var(--ink) 58%);
  color: var(--text-inv); padding-block: var(--s8) var(--s9); overflow: hidden;
}
.hero__grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.06fr 0.94fr; gap: var(--s8); } }
.hero h1 { margin-bottom: var(--s5); }
.hero__desc { font-size: clamp(1.06rem, 2.2vw, 1.22rem); color: var(--text-inv-2); margin-bottom: var(--s6); max-width: 34rem; }
.hero .note { margin-top: var(--s4); }

/* ---------- phone mockup ---------- */
.phone {
  width: min(300px, 82vw); margin-inline: auto;
  background: #05070A; border: 9px solid #232B36; border-radius: 40px;
  padding: 0.85rem; box-shadow: 0 30px 70px -25px rgba(0,0,0,0.85);
}
.phone__screen { background: #FFFFFF; border-radius: 26px; padding: 1.15rem 1rem 1.25rem; color: var(--text); }
.phone__status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 650; color: var(--ok); }
.phone__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.phone__warning {
  margin-top: 1.1rem; display: flex; align-items: center; gap: 0.6rem;
  background: var(--amber-soft); border: 1px solid #F6DDAE; border-radius: 12px; padding: 0.7rem 0.85rem;
}
.phone__warning svg { width: 26px; height: 26px; flex: none; }
.phone__warning span { font-size: 0.76rem; font-weight: 750; letter-spacing: 0.1em; color: var(--amber-deep); }
.phone__code { margin-top: 1.1rem; text-align: center; }
.phone__code b { display: block; font-family: var(--mono); font-size: 2.35rem; font-weight: 700; letter-spacing: -0.02em; }
.phone__code small { display: block; margin-top: 0.35rem; font-size: 0.83rem; line-height: 1.45; color: var(--text-2); }
.phone__action {
  margin-top: 1.25rem; background: var(--ink); color: var(--text-inv);
  border-radius: 12px; text-align: center; padding: 0.9rem; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
}
.phone__foot { margin-top: 0.7rem; text-align: center; font-size: 0.72rem; color: var(--text-2); }

/* ---------- value strip ---------- */
.strip { background: var(--ink-2); color: var(--text-inv); border-block: 1px solid var(--ink-line); padding-block: var(--s6); }
.strip__grid { display: grid; gap: var(--s5); }
@media (min-width: 640px) { .strip__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .strip__grid { grid-template-columns: repeat(4, 1fr); } }
.strip h3 { font-size: 1.02rem; margin-bottom: var(--s2); }
.strip p { font-size: 0.94rem; color: var(--text-inv-2); }
.strip__icon { width: 26px; height: 26px; color: var(--amber); margin-bottom: var(--s3); }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.section--dark .card { background: var(--ink-2); border-color: var(--ink-line); }
.card h3 { margin-bottom: var(--s3); }
.card p { font-size: 0.98rem; color: var(--text-2); }
.section--dark .card p { color: var(--text-inv-2); }

.card--link { text-decoration: none; display: block; transition: border-color .14s ease, transform .14s ease; }
.card--link:hover { border-color: #c9d0d8; transform: translateY(-2px); }
.section--dark .card--link:hover { border-color: #3a4657; }
.card--link .card__more { display: inline-block; margin-top: var(--s4); font-size: 0.92rem; font-weight: 650; color: var(--amber-deep); }
.section--dark .card--link .card__more { color: var(--amber); }

.steps { counter-reset: step; display: grid; gap: var(--s5); list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border: 1px solid var(--ink-line); border-radius: var(--radius); padding: var(--s5); background: var(--ink-2); }
.step__num {
  counter-increment: step; width: 34px; height: 34px; border-radius: 50%;
  background: var(--amber); color: #17130A; display: grid; place-items: center;
  font-weight: 760; font-size: 0.95rem; margin-bottom: var(--s4);
}
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: var(--s3); }

/* ---------- brand grid ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); list-style: none; }
@media (min-width: 560px) { .brand-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .brand-grid { grid-template-columns: repeat(5, 1fr); } }
.brand-grid li > * {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 58px; padding: 0.6rem 0.5rem; border: 1px solid var(--line);
  border-radius: 11px; background: var(--paper); font-weight: 620; font-size: 0.94rem;
  text-decoration: none; color: var(--text); height: 100%;
}
.brand-grid a:hover { border-color: var(--amber); background: var(--amber-soft); }
.brand-grid span { color: var(--text-2); }

/* ---------- adapters / platform ---------- */
.pill-list { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; margin-top: var(--s4); }
.pill-list li {
  border: 1px solid var(--ink-line); border-radius: 999px; padding: 0.45rem 0.95rem;
  font-size: 0.92rem; font-weight: 600; color: var(--text-inv);
}
.section--tint .pill-list li, .section:not(.section--dark) .pill-list li { border-color: var(--line); color: var(--text); }

.check-list { list-style: none; display: grid; gap: var(--s3); }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s3); align-items: start; font-size: 0.99rem; }
.check-list svg { width: 22px; height: 22px; color: var(--amber); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--s3); max-width: 52rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.faq summary {
  cursor: pointer; list-style: none; padding: var(--s4) var(--s5);
  font-weight: 650; font-size: 1.02rem; display: flex; justify-content: space-between; gap: var(--s4); align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--text-2); line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding: 0 var(--s5) var(--s5); color: var(--text-2); }

/* ---------- guide / article ---------- */
.breadcrumbs { font-size: 0.88rem; color: var(--text-2); padding-block: var(--s5) 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.breadcrumbs li::after { content: "/"; margin-left: 0.45rem; color: #b6bec8; }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--text-2); }

.article { padding-block: var(--s6) var(--s8); }
/* Narrower shell than marketing sections: keeps the reading measure centred on
   wide screens while related-guide cards still get room to sit two-up. */
.article > .wrap { max-width: 62rem; }
.article__head { max-width: 46rem; margin: 0 auto var(--s7); }
.article__head h1 { margin-bottom: var(--s5); }
.article__meta { margin-top: var(--s5); font-size: 0.88rem; color: var(--text-2); }
.prose { max-width: 46rem; margin-inline: auto; }
.prose h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem); margin-top: var(--s8); margin-bottom: var(--s5);
  padding-top: var(--s5); border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p { margin-bottom: var(--s5); font-size: 1.08rem; line-height: 1.72; }

.article-cta {
  margin: var(--s7) auto; padding: var(--s6); border-radius: var(--radius-lg);
  background: var(--ink); color: var(--text-inv); max-width: 46rem;
}
.article-cta h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 var(--s3); padding: 0; border: 0; }
.article-cta p { color: var(--text-inv-2); margin-bottom: var(--s5); font-size: 1rem; }

.related { margin-top: var(--s8); }
.related h2 { font-size: 1.4rem; margin-bottom: var(--s5); }
.brand-links { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin-top: var(--s4); }
.brand-links a {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.85rem; font-size: 0.9rem; text-decoration: none; color: var(--text-2);
}
.brand-links a:hover { border-color: var(--amber); color: var(--text); background: var(--amber-soft); }

/* ---------- guides hub ---------- */
.hub-group { margin-top: var(--s8); }
.hub-group__head { margin-bottom: var(--s5); max-width: 46rem; }
.hub-group__head h2 { margin-bottom: var(--s3); }
.hub-group__head p { color: var(--text-2); }
.brand-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s3); list-style: none; }
.brand-cards a {
  display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4);
  text-decoration: none; font-weight: 620; transition: border-color .14s ease;
}
.brand-cards a:hover { border-color: var(--amber); background: var(--amber-soft); }
.brand-cards small { display: block; font-weight: 500; color: var(--text-2); font-size: 0.85rem; margin-top: 0.2rem; }

/* ---------- legal pages ---------- */
.legal { padding-block: var(--s7) var(--s8); }
.legal .prose h2 { border-top: 0; padding-top: 0; margin-top: var(--s7); }
.legal .prose ul { margin: 0 0 var(--s5) 1.15rem; padding-left: 0.5rem; }
.legal .prose li { margin-bottom: var(--s2); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--text-inv); padding-block: var(--s7) var(--s6); }
.site-footer__grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.site-footer h2 { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-inv-2); margin-bottom: var(--s4); font-weight: 700; }
.site-footer ul { list-style: none; display: grid; gap: var(--s3); }
.site-footer ul a, .site-footer__about p a { color: var(--text-inv-2); text-decoration: none; font-size: 0.95rem; }
.site-footer ul a:hover, .site-footer__about p a:hover { color: var(--text-inv); }
.site-footer .store-buttons { margin-top: var(--s5); }
.site-footer .store-buttons .btn { flex-basis: 100%; }
.site-footer__about p { color: var(--text-inv-2); font-size: 0.95rem; margin-top: var(--s3); max-width: 26rem; }
.site-footer__bottom {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--ink-line);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  font-size: 0.85rem; color: var(--text-inv-2);
}
.site-footer__bottom p { max-width: 58rem; }

/* ---------- misc ---------- */
.center { text-align: center; }
.stack > * + * { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.hidden { display: none; }
