/* Blog styling. Shares the warm RoadAtlas palette used by the route pages
   (see SHARED_CSS in scripts/gen-static-pages.mjs) plus article + card layout.
   Generated blog pages link this file; it is a plain cached static asset. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ede0b8;
  --surface: #f8f0d8;
  --border: rgba(90, 48, 16, 0.18);
  --text: #2e1a08;
  --muted: rgba(46, 26, 8, 0.55);
  --accent: #c87000;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

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

header {
  background: #1c1208;
  border-bottom: 1px solid rgba(200, 128, 0, 0.28);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-name { font-size: 17px; font-weight: 800; color: #f0e4c0; letter-spacing: -0.3px; }
.brand-name span { color: #c87000; }

.breadcrumb {
  padding: 12px 24px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.sep { opacity: .5; }

.container { max-width: 760px; margin: 0 auto; padding: 40px 24px; width: 100%; }

footer {
  background: #1c1208;
  color: rgba(240, 228, 192, 0.45);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  margin-top: auto;
  border-top: 1px solid rgba(200, 128, 0, 0.15);
}
footer a { color: rgba(200, 112, 0, 0.7); }
.footer-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

.eyebrow, .post-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ── Index ────────────────────────────────────────────────────────────── */
.blog-index h1 { font-size: 34px; font-weight: 900; letter-spacing: -.6px; line-height: 1.12; margin-bottom: 10px; }
.blog-intro { font-size: 16px; color: var(--muted); line-height: 1.7; margin-bottom: 32px; max-width: 60ch; }
.blog-empty { color: var(--muted); }

.post-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .12s; }
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-card a { display: flex; flex-direction: column; height: 100%; color: var(--text); text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg); }
.post-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card-cat { font-size: 9px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; color: var(--accent); }
.post-card h2 { font-size: 18px; font-weight: 800; line-height: 1.25; }
.post-card-excerpt { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.post-card-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Post ─────────────────────────────────────────────────────────────── */
.blog-post h1 { font-size: 38px; font-weight: 900; letter-spacing: -.7px; line-height: 1.08; margin-bottom: 10px; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.post-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin-bottom: 28px; background: var(--surface); }

.post-body { font-size: 17px; line-height: 1.8; color: var(--text); }
.post-body h2 { font-size: 25px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; margin: 38px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.post-body h3 { font-size: 19px; font-weight: 800; margin: 26px 0 8px; }
.post-body h4 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-inline-start: 26px; }
.post-body li { margin-bottom: 7px; }
.post-body a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(200, 112, 0, 0.4); text-underline-offset: 2px; }
.post-body a:hover { text-decoration-color: var(--accent); }
.post-body strong { font-weight: 800; }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0 20px; display: block; }
.post-body code { background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.post-body pre { background: #1c1208; color: #f0e4c0; border-radius: 10px; padding: 16px; overflow-x: auto; margin: 0 0 20px; }
.post-body pre code { background: none; border: 0; color: inherit; padding: 0; }

.post-body blockquote {
  border-inline-start: 3px solid var(--accent);
  background: rgba(200, 112, 0, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 0 0 20px;
  color: rgba(46, 26, 8, 0.82);
  font-size: 16px;
}
.post-body blockquote p { margin: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 22px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.post-body th, .post-body td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.post-body th { background: rgba(200, 112, 0, 0.1); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.post-body tbody tr:last-child td, .post-body tbody tr:last-child td { border-bottom: 0; }

.section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: var(--muted); margin: 40px 0 14px; padding-bottom: 7px; border-bottom: 2px solid var(--accent); display: inline-block; }

/* Related routes */
.related-routes { margin-top: 40px; }
.rr-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 0; }
.rr-list a { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; color: var(--text); text-decoration: none; }
.rr-list a:hover { border-color: var(--accent); }
.rr-thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.rr-text { min-width: 0; }
.rr-text strong { display: block; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-text span { display: block; font-size: 11px; color: var(--muted); }

.back-link { margin-top: 36px; font-size: 14px; font-weight: 700; }

@media (max-width: 600px) {
  .container { padding: 24px 16px; }
  .blog-post h1 { font-size: 28px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 22px; }
  .post-grid { grid-template-columns: 1fr; }
}
