/* OBD Code Guide — light Apple-inspired UI */
:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #d2d2d7;
  --border-soft: #e8e8ed;
  --link: #0066cc;
  --link-hover: #004499;
  --green: #248a3d;
  --green-bg: #e8f8ed;
  --yellow: #b25000;
  --yellow-bg: #fff4e5;
  --red: #d70015;
  --red-bg: #ffe5e8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; color: var(--link-hover); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.35rem 4.5rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2.5rem;
  padding-bottom: 1.15rem;
}

header.site .brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
header.site .brand:hover { color: var(--text); text-decoration: none; }
header.site .brand span {
  color: var(--muted);
  font-weight: 400;
}

header.site nav {
  font-size: 0.94rem;
}
header.site nav a {
  margin-left: 1.1rem;
  color: var(--muted);
  text-decoration: none;
}
header.site nav a:first-child { margin-left: 0; }
header.site nav a:hover { color: var(--text); }

h1 {
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  color: var(--text);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.4rem 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

p { margin: 0.85rem 0; color: var(--text); }
ul, ol { padding-left: 1.2rem; margin: 0.75rem 0; }
li { margin: 0.4rem 0; }
strong { font-weight: 600; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.25rem 0;
  font-size: 0.94rem;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid var(--border-soft);
  padding: 0.85rem 1rem;
  vertical-align: top;
  text-align: left;
}
th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: none;
  color: var(--muted);
  letter-spacing: 0;
}
tr:last-child td { border-bottom: none; }
td:first-child { white-space: nowrap; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.88rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 980px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-soft);
  background: var(--bg-subtle);
  color: var(--text);
}
.pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill.g { background: var(--green-bg); border-color: #c6ebd1; color: #1b5e2a; }
.pill.g::before { background: var(--green); }
.pill.y { background: var(--yellow-bg); border-color: #ffe0b8; color: #8a4000; }
.pill.y::before { background: #ff9f0a; }
.pill.r { background: var(--red-bg); border-color: #ffc4cb; color: #a40010; }
.pill.r::before { background: var(--red); }

.card-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.card-list li {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin: 0.65rem 0;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}
.card-list li:hover { border-color: var(--border); }
.card-list a {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
  color: var(--text);
}
.card-list a:hover { color: var(--link); }
.card-list .sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.3rem;
  line-height: 1.4;
}
.tag {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

.disclaimer-page {
  white-space: pre-wrap;
  background: var(--bg-subtle);
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 0.95rem;
}

/* Decision table color labels (soft) */
strong.c-green { color: var(--green); font-weight: 600; }
strong.c-yellow { color: var(--yellow); font-weight: 600; }
strong.c-red { color: var(--red); font-weight: 600; }

main > p:first-of-type { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }

@media (max-width: 600px) {
  .wrap { padding: 1.5rem 1.1rem 3rem; }
  h1 { font-size: 1.65rem; }
  header.site { flex-direction: column; align-items: flex-start; }
  header.site nav a { margin-left: 0; margin-right: 1rem; }
  td:first-child { white-space: normal; }
}

/* Homepage type / prefix filters */
.filter-bar {
  margin: 0.25rem 0 1.5rem;
  padding: 0.85rem 0 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.filter-row + .filter-row {
  margin-top: 0.55rem;
}
.filter-pill {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 980px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-pill:hover {
  color: var(--text);
  border-color: var(--border);
}
.filter-pill:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.filter-pill.is-active {
  color: #fff;
  background: var(--link);
  border-color: var(--link);
}
.filter-pill.is-active:hover {
  color: #fff;
  background: var(--link-hover);
  border-color: var(--link-hover);
}
.filter-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1.5rem 0 0.5rem;
}
.code-section[hidden],
.filter-empty[hidden],
.card-list li[hidden] {
  display: none !important;
}

.filter-row-search {
  align-items: center;
  gap: 0.65rem;
}
.filter-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.filter-search {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 28rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  line-height: 1.35;
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-search::placeholder {
  color: var(--muted);
  opacity: 1;
}
.filter-search:hover {
  border-color: #c7c7cc;
}
.filter-search:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}
.filter-search::-webkit-search-decoration,
.filter-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}


/* FAQ + lead (SEO/GEO round 2026-11-01) */
p.lead {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  line-height: 1.45;
  margin: 0.85rem 0 0.65rem;
}
p.updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}
.faq {
  margin: 2.25rem 0 1.75rem;
  padding: 1.25rem 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.faq h2 {
  margin-top: 0;
}
.faq-item + .faq-item {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-soft);
}
.faq-item h3 {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.015em;
}
.faq-item p {
  margin: 0;
  color: var(--text);
}
