/* ═══════════════════════════════════════
   Orchard Blog — Design System
   Dark theme matching landing page
   ═══════════════════════════════════════ */

/* ── Reset & Base ─────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111;
  --bg-toc: #0d1117;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-dim: #6e6e73;
  --accent: #fa243c;
  --accent-dim: rgba(250, 36, 60, 0.15);
  --border: #1d1d1f;
  --border-subtle: #1a1a1e;
  --radius: 12px;
  --max-width: 720px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.8; text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }
code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Nav ──────────────────────────────── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.blog-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.blog-logo:hover { text-decoration: none; opacity: 1; }
.blog-nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}
.blog-nav-cta:hover {
  transform: scale(1.03);
  opacity: 1;
  text-decoration: none;
}

/* ── Main Content ────────────────────── */
.blog-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 6px; }

/* Header */
.blog-header { margin-bottom: 40px; }
.blog-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.blog-header h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 16px;
}
.blog-meta {
  font-size: 14px;
  color: var(--text-dim);
}
.blog-meta strong { color: var(--text-muted); }

/* TOC */
.blog-toc {
  background: var(--bg-toc);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 48px;
}
.blog-toc h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.blog-toc ol {
  padding-left: 20px;
  counter-reset: toc;
  list-style: none;
}
.blog-toc ol li {
  counter-increment: toc;
  position: relative;
  padding: 4px 0;
}
.blog-toc ol li::before {
  content: counter(toc) ".";
  position: absolute;
  left: -20px;
  color: var(--text-dim);
  font-size: 13px;
}
.blog-toc a {
  color: var(--text-muted);
  font-size: 14px;
}
.blog-toc a:hover { color: var(--accent); }

/* Quick Answer (troubleshooting article) */
.quick-answer {
  background: var(--accent-dim);
  border: 1px solid rgba(250, 36, 60, 0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
}
.quick-answer h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}
.quick-answer p {
  font-size: 15px;
  color: var(--text);
}

/* ── Article Content ─────────────────── */
.blog-article section {
  margin-bottom: 48px;
}
.blog-article h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  padding-top: 8px; /* anchor offset buffer */
}
.blog-article h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 24px;
}
.blog-article p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 16px;
}
.blog-article ul, .blog-article ol {
  color: var(--text-muted);
  padding-left: 24px;
  margin-bottom: 16px;
  font-size: 16px;
}
.blog-article li { margin-bottom: 8px; }
.blog-article li strong { color: var(--text); }
.blog-article em { color: var(--text); font-style: italic; }

/* Step blocks */
.step-block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.step-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.step-content p {
  font-size: 15px;
  margin-bottom: 0;
}

/* Disclaimer box */
.disclaimer-box {
  background: rgba(255, 190, 11, 0.08);
  border: 1px solid rgba(255, 190, 11, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
}
.disclaimer-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Comparison table */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead {
  background: var(--bg-toc);
}
thead th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td:first-child { color: var(--text); font-weight: 500; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 50%;
  transition: transform 0.2s;
}
.faq-item[open] summary::before {
  content: "−";
  transform: rotate(180deg);
}
.faq-item summary h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.faq-item > p,
.faq-item > div {
  padding: 0 20px 16px 56px;
}

/* ── CTA ─────────────────────────────── */
.blog-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(250,36,60,0.1) 0%, rgba(250,36,60,0.03) 100%);
  border: 1px solid rgba(250,36,60,0.2);
  border-radius: var(--radius);
  padding: 40px 24px;
  margin-top: 48px;
}
.blog-cta h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.blog-cta p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 24px;
}
.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250,36,60,0.3);
  text-decoration: none;
  opacity: 1;
}
.cta-micro {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ── Related ─────────────────────────── */
.blog-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.blog-related h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.blog-related ul { list-style: none; padding: 0; }
.blog-related li { margin-bottom: 8px; }
.blog-related a {
  font-size: 15px;
  color: var(--text-muted);
}
.blog-related a:hover { color: var(--accent); }

/* ── Author ──────────────────────────── */
.blog-author {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.blog-author p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}
.blog-author strong { color: var(--text-muted); }

/* ── Footer ──────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}
.blog-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.blog-footer p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.blog-footer a { color: var(--text-muted); }
.blog-footer-copy {
  font-size: 12px;
  color: #333;
  margin-top: 16px;
}

/* ── Blog Index Page ─────────────────── */
.blog-index-header {
  margin-bottom: 48px;
}
.blog-index-header h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.blog-index-header p {
  color: var(--text-dim);
  font-size: 16px;
}

.blog-card-list {
  display: grid;
  gap: 16px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
  opacity: 1;
}
.blog-card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 10px;
}
.blog-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.blog-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.blog-card-meta {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Responsive ──────────────────────── */
@media (max-width: 600px) {
  .blog-main { padding: 24px 16px 60px; }
  .blog-toc { padding: 16px; }
  .step-block { flex-direction: column; gap: 12px; }
  .faq-item > p,
  .faq-item > div { padding: 0 16px 16px 16px; }
  .blog-cta { padding: 28px 16px; }
  table { font-size: 13px; }
  thead th, tbody td { padding: 10px 12px; }
}
