/* obd.tools: the app's job-sheet look (ios/App/Sheet.swift) on the web:
   ruled cards on grey paper, labels in small spaced capitals, figures in
   monospace, and one orange for what matters. */
:root {
  --paper: #eceef1; --card: #ffffff; --ink: #15181d; --muted: #555d68;
  --rule: #e3e6ea; --edge: #d3d8de; --accent: #c2410c; --accent-fill: #c2410c;
  --highlight: #fff4ed; --shadow: 0 1px 2px rgba(21, 24, 29, .06), 0 8px 24px rgba(21, 24, 29, .06);
  --phone-shadow: 0 30px 60px -20px rgba(21, 24, 29, .35), 0 12px 24px -12px rgba(21, 24, 29, .2);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013; --card: #171a1f; --ink: #e7e9ec; --muted: #9aa1ab;
    --rule: #262a31; --edge: #2e333b; --accent: #fb923c; --highlight: #2a1a10;
    --shadow: none; --phone-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 1rem; max-width: 22ch; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

/* Field labels, as on the app's cards. */
.label { display: block; font: 600 .75rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.mark { width: 2rem; height: 2rem; }
.mark-bg { fill: #2D3742; stroke: var(--edge); stroke-width: 6; }
.mark-car { fill: #FFFFFF; }
.mark-ring { fill: #2D3742; }
.mark-badge { fill: #C2410C; }
.mark-tick { stroke: #FFFFFF; }
.links { display: flex; gap: 1.5rem; }
.links a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.links a:hover { color: var(--ink); }
@media (max-width: 559px) { .links a:not(:last-child) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1.25rem; border-radius: var(--radius); font-weight: 650; font-size: 1rem; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent-fill); color: #fff; }
.btn-quiet { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--card); }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 3rem; padding: .35rem 1.1rem; border-radius: var(--radius); border: 1px dashed var(--edge); color: var(--muted); font-weight: 700; font-size: 1rem; line-height: 1.15; cursor: default; }
.store small { font: 600 .62rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.fine { font-size: .875rem; color: var(--muted); margin: 0; }

/* Hero: the copy, and three phones like sheets on a bench. */
.hero { position: relative; overflow: hidden; padding: 3.5rem 0 4rem;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent 30%, var(--paper) 85%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 3rem; align-items: center; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--muted); margin-top: 1.25rem; max-width: 34rem; }
@media (min-width: 960px) {
  .hero { padding: 5rem 0 5.5rem; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}
.phones { position: relative; height: 34rem; max-width: 30rem; width: 100%; margin: 0 auto; }
.phone { margin: 0; position: absolute; width: 15rem; border-radius: 2.4rem; padding: .45rem; background: #15181d; box-shadow: var(--phone-shadow); }
.phone img { border-radius: 2rem; width: 100%; }
.phone-front { left: 50%; top: 0; transform: translateX(-50%); z-index: 2; }
.phone-back { top: 3.5rem; width: 13rem; opacity: .97; }
.phone-left { left: 0; transform: rotate(-6deg); }
.phone-right { right: 0; transform: rotate(6deg); }
.phone-solo { position: relative; margin: 0 auto; }
@media (max-width: 479px) {
  .phones { height: 27rem; }
  .phone { width: 12rem; }
  .phone-back { width: 10rem; top: 3rem; }
  .phone-left { left: 0; }
  .phone-right { right: 0; }
}

/* The strip of fields under the hero, like a card's top row. */
.strip { border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); background: var(--card); }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.fields div { padding: 1.1rem 1rem 1.2rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fields div:nth-child(2n) { border-right: 0; }
.fields div:nth-last-child(-n + 2) { border-bottom: 0; }
.fields dt { font: 600 .7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.fields dd { margin: 0; font-weight: 600; font-size: .98rem; }
@media (min-width: 800px) {
  .fields { grid-template-columns: repeat(4, 1fr); }
  .fields div { border-bottom: 0; padding: 1.25rem 1.5rem; }
  .fields div:nth-child(2n) { border-right: 1px solid var(--rule); }
  .fields div:last-child { border-right: 0; }
}

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-alt .card { background: var(--paper); box-shadow: none; }
@media (min-width: 960px) { .section { padding: 6rem 0; } }
.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; counter-reset: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { padding: 1.5rem; }
.steps h3 { margin: .9rem 0 .5rem; }
.steps p { color: var(--muted); margin: 0; }
.num { font: 700 .85rem/1 var(--mono); color: var(--accent); letter-spacing: .05em; padding: .35rem .5rem; border: 1px solid currentColor; border-radius: 4px; display: inline-block; }

.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 3px; background: var(--ink); }
.ticks li::after { content: ""; position: absolute; left: .42rem; top: .38rem; width: .32rem; height: .6rem; border: solid var(--card); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ticks-cards { margin: 0; gap: .75rem; }
.ticks-cards li { padding: 1rem 1rem 1rem 3rem; }
.ticks-cards li::before { left: 1rem; top: 1.2rem; }
.ticks-cards li::after { left: 1.42rem; top: 1.38rem; }
.section-alt .ticks li::after { border-color: var(--card); }

/* The example diagnosis, laid out like the app's report. */
.sheet { overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 2px solid var(--ink); }
.sheet-head .label { margin: 0; color: var(--ink); }
.code { font: 700 .9rem/1 var(--mono); color: var(--accent); background: var(--highlight); padding: .35rem .5rem; border-radius: 4px; }
.sheet-row { padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row .label { margin-bottom: .35rem; }
.sheet-row p, .sheet-row ul { margin: 0; }
.sheet-row ul { padding-left: 1.1rem; }
.sheet-row li { margin: .15rem 0; }
.finding { font-weight: 700; }
.meter { height: .4rem; background: var(--rule); border-radius: 99px; margin: .75rem 0 .35rem; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent-fill); border-radius: 99px; }
.meter-70 { width: 70%; }
.meter-label { font: 600 .75rem/1.4 var(--mono); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.sheet-fix { background: var(--highlight); }
.sheet-fix .muted { font-size: .9rem; margin-top: .25rem; }

.features { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 1.5rem; border-top: 3px solid var(--ink); }
.feature h3 { margin-bottom: .5rem; }
.feature p { color: var(--muted); margin: 0; }

/* Adapters: the feature cards with a link to the listing. */
.intro { max-width: 46rem; }
.adapter { display: flex; flex-direction: column; }
.adapter p { flex: 1; }
.adapter .btn { align-self: flex-start; margin-top: 1.25rem; min-height: 2.6rem; padding: .5rem 1rem; font-size: .95rem; }
.disclose { margin-top: 1.5rem; max-width: 46rem; }

/* Pricing, like the app's Balance card. */
.balance { padding: 0; overflow: hidden; }
.balance-head { display: flex; justify-content: space-between; padding: 1rem 1.25rem .25rem; }
.topup { display: flex; justify-content: space-between; align-items: center; margin: .6rem 1.25rem; padding: .95rem 1.1rem; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 650; }
.topup strong { font-family: var(--mono); font-weight: 700; }
.balance .fine { padding: .75rem 1.25rem 1.25rem; }

/* Questions */
.faq { max-width: 50rem; border-top: 1px solid var(--edge); margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--edge); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 650; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .95rem; font: 400 1.5rem/1 var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-right: 2rem; }

/* Footer */
.foot { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--rule); }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* The privacy policy and terms. */
.doc { max-width: 46rem; padding: 3rem 1rem 5rem; }
@media (min-width: 640px) { .doc { padding: 4rem 1.5rem 6rem; } }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: .5rem; }
.doc h2 { font-size: 1.3rem; margin: 2.5rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid var(--edge); max-width: none; letter-spacing: -0.01em; }
.doc p, .doc li { line-height: 1.65; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: .5rem 0; }
.doc .updated { font: 600 .75rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Code lookup and the shared diagnostic glossary. */
.code-jump { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.code-jump a { font-family: var(--mono); }
.doc section { scroll-margin-top: 5rem; }
.glossary dt { font-weight: 700; margin-top: 1rem; }
.glossary dd { margin: .25rem 0 1rem; color: var(--muted); }
