/* Shared styles for MD-Vis static content pages (guides, comparisons, blog).
   Hand-authored, framework-free. Light/dark via prefers-color-scheme. */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f172a;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --code-bg: #f1f5f9;
  --radius: 12px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --primary: #e2e8f0;
    --accent: #60a5fa;
    --accent-soft: #14223f;
    --code-bg: #131c30;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--primary); }
.brand img { width: 26px; height: 26px; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav .btn { color: #fff; }
@media (max-width: 560px) {
  .site-nav { gap: 14px; font-size: 13px; }
  .site-nav .hide-sm { display: none; }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }

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

/* Article */
main { padding: 8px 0 64px; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 18px 0 8px; color: var(--primary); }
h2 { font-size: 24px; margin: 40px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 28px 0 8px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 8px; }
p, li { font-size: 16.5px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

/* Tables (comparisons) */
.table-scroll { overflow-x: auto; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); font-weight: 600; }
td .yes { color: #16a34a; font-weight: 600; }
td .no { color: #dc2626; font-weight: 600; }

/* Cards (index pages) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.card {
  display: block;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: inherit;
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--primary); }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* CTA block */
.cta {
  margin: 40px 0 8px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  text-align: center;
}
.cta h2 { margin: 0 0 8px; }
.cta p { margin: 0 0 18px; color: var(--muted); }

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  margin: 10px 0;
  background: var(--surface);
}
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details > p { margin: 0 0 14px; color: var(--muted); }

/* Related links */
.related { margin: 36px 0 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.related h2 { margin: 0 0 10px; font-size: 18px; }
.related ul { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer h4 { color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .copy { margin-top: 28px; font-size: 13px; }
.updated { font-size: 13px; color: var(--muted); margin-top: 4px; }
