/* === Check Engine Light — Shared Article Styles === */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff;
  --bg-subtle: #fafaf9;
  --bg-muted: #f5f4f2;
  --border: #e7e5e1;
  --border-strong: #d4d1cb;
  --ink: #0a0a0a;
  --ink-1: #1f1f1f;
  --ink-2: #52525b;
  --ink-3: #8a8a93;
  --accent: #e85d1a;
  --accent-soft: #fff2e8;
  --accent-deep: #c4420d;
  --red: #dc2626;
  --green: #16a34a;
  --amber: #d97706;
  --shadow-xs: 0 1px 2px rgba(10,10,10,0.04);
  --shadow-sm: 0 1px 3px rgba(10,10,10,0.06), 0 1px 2px rgba(10,10,10,0.04);
  --shadow-md: 0 4px 12px rgba(10,10,10,0.06), 0 2px 4px rgba(10,10,10,0.04);
  --shadow-lg: 0 12px 32px rgba(10,10,10,0.08), 0 4px 12px rgba(10,10,10,0.05);
  --shadow-xl: 0 24px 48px rgba(10,10,10,0.12), 0 8px 16px rgba(10,10,10,0.06);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* === NAV === */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 12px; min-height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  color: var(--ink); transition: opacity 0.2s var(--ease); white-space: nowrap;
}
.logo:hover { opacity: 0.7; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--ink) 0%, #3a3a3a 100%);
  position: relative; display: grid; place-items: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.1);
}
.logo-mark::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px rgba(232,93,26,0.6);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px;
  transition: all 0.15s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--bg-muted); }
.nav-links a.active { color: var(--ink); background: var(--bg-muted); }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; font-size: 18px;
  line-height: 1; color: var(--ink);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  padding: 10px 0; font-family: 'Geist Mono', monospace;
  font-size: 12px; color: var(--ink-3);
}
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: '/'; color: var(--ink-3); opacity: 0.6; }
.breadcrumbs a { color: var(--ink-2); transition: color 0.15s var(--ease); }
.breadcrumbs a:hover { color: var(--accent-deep); }
.breadcrumbs li:last-child { color: var(--ink); font-weight: 500; }

/* === ARTICLE HEAD === */
.article-head {
  padding: 64px 0 40px;
  position: relative; overflow: hidden;
}
.article-head::before {
  content: ''; position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(232,93,26,0.08) 0%, transparent 60%);
  pointer-events: none; z-index: -1;
}
.article-head-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.code-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; background: var(--ink);
  color: #fff; border-radius: 100px;
  font-family: 'Geist Mono', monospace;
  font-size: 18px; font-weight: 600; letter-spacing: 0.05em;
  margin-bottom: 24px; box-shadow: var(--shadow-md);
}
.code-badge::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
h1.article-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: clamp(38px, 5.5vw, 60px);
  line-height: 1.04; letter-spacing: -0.025em;
  margin-bottom: 20px; color: var(--ink);
}
h1.article-title i { font-style: italic; color: var(--accent-deep); }
.article-lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-2);
  max-width: 640px; margin: 0 auto 32px;
}
.article-meta {
  display: flex; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 720px; margin: 32px auto 0;
  font-family: 'Geist Mono', monospace;
  font-size: 12px; color: var(--ink-3);
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; }
.article-meta strong { color: var(--ink); font-weight: 600; }
.article-meta .sep { color: var(--ink-3); opacity: 0.4; }

/* === QUICK FACTS === */
.quick-facts {
  max-width: 920px; margin: 48px auto 0;
  padding: 32px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.qf-title {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-deep);
  margin-bottom: 18px; font-weight: 600;
}
.qf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.qf-item { padding-right: 20px; border-right: 1px solid var(--border); }
.qf-item:last-child { border-right: none; }
.qf-item .qf-label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.qf-item .qf-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px; font-weight: 400;
  color: var(--ink); line-height: 1.2; letter-spacing: -0.01em;
}
.qf-item .qf-value small {
  display: block;
  font-family: 'Geist', sans-serif;
  font-size: 12px; color: var(--ink-3);
  margin-top: 2px; font-weight: 400;
}

/* === LAYOUT === */
.article-layout {
  max-width: 1100px; margin: 56px auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}
.toc {
  position: sticky; top: 88px;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc-title {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-3);
  margin-bottom: 14px; font-weight: 500;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px;
  padding: 8px 0;
  font-size: 14px; color: var(--ink-2);
  line-height: 1.4;
  transition: color 0.15s var(--ease);
}
.toc a:hover { color: var(--accent-deep); }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--ink-3);
  font-weight: 500; flex-shrink: 0; min-width: 20px;
}

/* === PROSE === */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-1); }
.prose > section { margin-bottom: 56px; }
.prose h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 34px;
  letter-spacing: -0.02em; line-height: 1.15;
  color: var(--ink); margin-bottom: 14px;
  scroll-margin-top: 88px;
}
.prose h2 i { font-style: italic; color: var(--accent-deep); }
.section-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-deep);
  font-weight: 500; margin-bottom: 10px; display: block;
}
.prose h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 600; font-size: 22px;
  margin-top: 1.6em; margin-bottom: 0.4em;
  color: var(--ink); letter-spacing: -0.015em;
  line-height: 1.25;
}
.prose h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-deep);
  margin-top: 1.4em; margin-bottom: 0.5em;
}
.prose p { margin-bottom: 1.1em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose ul, .prose ol { margin: 0.8em 0 1.4em 0; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.88em;
  padding: 2px 7px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent-deep); font-weight: 500;
}
.prose a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(196,66,13,0.3);
  transition: border-color 0.15s var(--ease);
}
.prose a:hover { border-bottom-color: var(--accent-deep); }

/* === CALLOUTS === */
.callout {
  padding: 20px 24px; border-radius: var(--radius);
  margin: 1.6em 0;
  font-size: 15px; line-height: 1.6;
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid;
}
.callout-info { background: #f0f7ff; border-color: #cce1ff; color: #1e3a8a; }
.callout-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.callout-danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.callout-tip { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.callout-icon {
  flex-shrink: 0; width: 22px; height: 22px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  font-family: 'Geist Mono', monospace; color: #fff;
}
.callout-info .callout-icon { background: #2563eb; }
.callout-warn .callout-icon { background: #d97706; }
.callout-danger .callout-icon { background: #dc2626; }
.callout-tip .callout-icon { background: #16a34a; }
.callout-body strong { display: block; margin-bottom: 4px; color: inherit; font-weight: 600; }

/* === STEPS === */
.steps { counter-reset: step; margin: 1.6em 0; }
.step-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  counter-increment: step;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(232,93,26,0.2);
  color: var(--accent-deep);
  display: grid; place-items: center;
  font-family: 'Geist Mono', monospace;
  font-weight: 600; font-size: 12px;
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.step-body h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 20px;
  margin: 0 0 6px; line-height: 1.25;
  letter-spacing: -0.015em;
}
.step-body p {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-2); margin: 0 0 8px;
}

/* === DATA TABLE === */
.data-table {
  width: 100%; border-collapse: collapse;
  margin: 1.4em 0; font-size: 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.data-table th, .data-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.data-table th {
  background: var(--bg-subtle);
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-3); font-weight: 500;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td.label { font-weight: 500; color: var(--ink); }
.data-table td.price { font-family: 'Geist Mono', monospace; color: var(--ink-1); }
.data-table td.bad { color: var(--red); font-weight: 500; }
.data-table td.good { color: var(--green); font-weight: 500; }

/* === CAUSE BARS === */
.cause-bars { margin: 1.6em 0; }
.cause-bar { margin-bottom: 16px; }
.cause-bar-head {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: 8px;
}
.cause-bar-name { font-size: 15px; font-weight: 500; color: var(--ink); }
.cause-bar-pct {
  font-family: 'Geist Mono', monospace;
  font-size: 14px; color: var(--accent-deep); font-weight: 600;
}
.cause-bar-track {
  height: 8px; background: var(--bg-muted);
  border-radius: 4px; overflow: hidden;
}
.cause-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: 4px;
  transition: width 1s var(--ease);
}
.cause-bar p {
  font-size: 13px; color: var(--ink-2);
  margin-top: 6px !important; line-height: 1.5;
}

/* === COMPARE CARDS === */
.compare-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin: 1.6em 0;
}
.compare-card {
  padding: 22px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.15s var(--ease);
}
.compare-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.compare-card.good { border-left: 3px solid var(--green); }
.compare-card.bad { border-left: 3px solid var(--red); }
.compare-card .cc-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600; margin-bottom: 8px;
}
.compare-card.good .cc-label { color: var(--green); }
.compare-card.bad .cc-label { color: var(--red); }
.compare-card h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px; font-weight: 400;
  color: var(--ink); margin: 0 0 8px !important;
  text-transform: none; letter-spacing: -0.015em;
  line-height: 1.25;
}
.compare-card p { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* === AUTHOR BOX === */
.author-box {
  max-width: 760px; margin: 56px auto 0;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 64px 1fr;
  gap: 18px; align-items: center;
}
.author-box-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #fff2e8 0%, #ffd4b0 100%);
  display: grid; place-items: center;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px; color: var(--accent-deep);
}
.author-box-info .author-kicker {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-deep);
  font-weight: 500; margin-bottom: 4px;
}
.author-box-info .author-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px; color: var(--ink);
  letter-spacing: -0.015em; margin-bottom: 2px;
}
.author-box-info .author-bio { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.author-box-info a { color: var(--accent-deep); font-weight: 500; }

/* === RELATED GUIDES === */
.related { max-width: 1100px; margin: 72px auto 0; padding: 0 24px; }
.related-head { text-align: center; margin-bottom: 32px; }
.related-kicker {
  font-family: 'Geist Mono', monospace; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-deep); margin-bottom: 14px; font-weight: 500;
}
.related-head h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: clamp(28px, 3.5vw, 36px);
  letter-spacing: -0.02em; color: var(--ink);
}
.related-head h2 i { font-style: italic; color: var(--accent-deep); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card {
  display: block; padding: 24px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none; color: inherit;
  transition: all 0.25s var(--ease);
}
.related-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.related-tag {
  display: inline-block; padding: 3px 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; border-radius: 100px;
  font-weight: 500; margin-bottom: 12px;
}
.related-card h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 20px;
  letter-spacing: -0.015em; line-height: 1.25;
  margin-bottom: 8px; color: var(--ink);
}
.related-card p {
  font-size: 13px; line-height: 1.55;
  color: var(--ink-2); margin-bottom: 12px;
}
.related-arrow {
  font-family: 'Geist Mono', monospace;
  font-size: 12px; color: var(--accent-deep);
  font-weight: 500; transition: transform 0.2s var(--ease);
}
.related-card:hover .related-arrow { transform: translateX(3px); }

/* === FAQ === */
.faq-section { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; padding: 20px 0;
  display: flex; justify-content: space-between;
  align-items: center; cursor: pointer;
  background: none; border: none; text-align: left;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 20px;
  letter-spacing: -0.015em; line-height: 1.3;
  color: var(--ink); gap: 20px;
}
.faq-toggle {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-muted);
  display: grid; place-items: center;
  font-size: 14px; color: var(--ink-2);
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  font-family: 'Geist Mono', monospace;
}
.faq-item.on .faq-toggle {
  background: var(--ink); color: #fff;
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s var(--ease);
  font-size: 15px; line-height: 1.65; color: var(--ink-2);
}
.faq-item.on .faq-a { max-height: 500px; padding-bottom: 20px; }

/* === FOOTER === */
footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 56px 0 40px; margin-top: 80px;
}
.footer-inner {
  max-width: 720px; margin: 0 auto;
  text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 16px;
}
.footer-icon { display: flex; align-items: center; justify-content: center; }
.footer-icon .logo-mark { width: 42px; height: 42px; border-radius: 10px; }
.footer-icon .logo-mark::before { width: 14px; height: 14px; }
.footer-brand-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 28px;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}
.footer-desc {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.6; max-width: 480px; margin: 0;
}
.footer-nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  justify-content: center; align-items: center; margin-top: 8px;
}
.footer-nav a {
  padding: 8px 16px; font-size: 14px; color: var(--ink-2);
  border-radius: 6px; transition: all 0.15s var(--ease);
  position: relative;
}
.footer-nav a:hover { color: var(--ink); background: var(--bg-muted); }
.footer-nav a:not(:last-child)::after {
  content: '·'; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%); color: var(--ink-3); opacity: 0.5;
}
.footer-copy {
  margin-top: 8px; padding-top: 20px;
  border-top: 1px solid var(--border); width: 100%;
  font-family: 'Geist Mono', monospace; font-size: 12px;
  color: var(--ink-3); letter-spacing: 0.01em;
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; max-height: none; }
  .qf-grid { grid-template-columns: repeat(2, 1fr); }
  .qf-item { border-right: none; }
  .qf-item:nth-child(1), .qf-item:nth-child(2) {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: 12px;
    box-shadow: var(--shadow-lg); align-items: stretch;
    max-height: 70vh; overflow-y: auto; z-index: 100;
  }
  .nav-links.open a { padding: 12px 14px; border-radius: 6px; }
  .menu-toggle { display: block; flex-shrink: 0; }
  .article-head { padding: 48px 0 32px; }
  .article-layout { margin: 32px auto; padding: 0 20px; }
  .prose h2 { font-size: 28px; }
  .quick-facts { padding: 24px; }
  .compare-cards { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; text-align: center; }
  .author-box-avatar { margin: 0 auto; }
  .footer-nav { gap: 2px; }
  .footer-nav a { padding: 6px 10px; font-size: 13px; }
}