/* ── Geo Atlas shared design tokens (mirrors :root in index.html) ── */
:root {
  --ink: #0d1b2a;
  --ink2: #1b3a5c;
  --sky: #1565c0;
  --sky2: #1e88e5;
  --gold: #e8a020;
  --gold2: #f5c842;
  --green: #1b5e20;
  --green2: #27ae60;
  --red: #c62828;
  --bg: #eef2f8;
  --card: #fff;
  --border: #c8d4e4;
  --muted: #4a6080;
  --radius: 12px;
  --sh: 0 2px 14px rgba(13, 27, 42, 0.10);
  --t: .2s cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f5f9;
    --ink2: #cbd5e1;
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
    --muted: #94a3b8;
    --sh: 0 2px 14px rgba(0, 0, 0, 0.5);
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Georgia', Times, serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── .card (matches game) ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--sh);
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.card:hover { box-shadow: 0 4px 20px rgba(13, 27, 42, 0.15); }

/* ── Blog layout ── */
.blog-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ── Sticky nav ── */
.blog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, var(--ink), var(--ink2));
  position: sticky;
  top: 0;
  z-index: 100;
}
.blog-nav-logo {
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--gold2);
  letter-spacing: 0.03em;
}
.blog-nav-logo span { color: #fff; }
.blog-nav-right { display: flex; align-items: center; gap: 1rem; }

/* ── Lang toggle ── */
.lang-toggle { font-size: 0.82rem; display: flex; align-items: center; gap: 0.3rem; }
.lang-toggle a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 4px;
  transition: background var(--t);
}
.lang-toggle a:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.lang-toggle a.active { background: var(--gold); color: var(--ink); font-weight: 700; }
.lang-toggle .sep { color: rgba(255, 255, 255, 0.3); }

/* ── Back to game link in nav ── */
.back-link {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 10px;
  border-radius: 6px;
  transition: background var(--t);
}
.back-link:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ── Footer ── */
.blog-footer {
  margin-top: 3rem;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.blog-footer a { color: var(--sky); text-decoration: none; }
.blog-footer a:hover { text-decoration: underline; }

/* ── Typography ── */
h1 { font-size: 1.8rem; margin: 1.5rem 0 0.5rem; color: var(--ink); }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; color: var(--ink); border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.3rem; color: var(--ink2); }
p  { line-height: 1.75; margin: 0.5rem 0 0.9rem; }
ul, ol { padding-left: 1.5rem; line-height: 1.75; margin-bottom: 0.9rem; }
li { margin-bottom: 0.25rem; }
a  { color: var(--sky); }
a:hover { color: var(--sky2); }
strong { color: var(--ink); }

/* ── Tables ── */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.88rem; }
th, td { border: 1px solid var(--border); padding: 0.45rem 0.8rem; text-align: left; }
th { background: var(--bg); font-weight: 700; color: var(--ink2); }

/* ── Blog-specific components ── */
.breadcrumb { font-size: 0.78rem; color: var(--muted); margin: 1rem 0 0.4rem; }
.breadcrumb a { color: var(--sky); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.post-date { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.25rem; }

.lang-notice {
  font-style: italic;
  color: var(--muted);
  font-size: 0.83rem;
  border-left: 3px solid var(--border);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
}

.screen-link {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.45rem 1rem;
  background: var(--sky);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--t);
}
.screen-link:hover { background: var(--sky2); color: #fff; }

/* ── Blog index grid ── */
.blog-grid { display: grid; gap: 0.75rem; margin-bottom: 2rem; }
.blog-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  padding: 0.9rem 1rem;
  text-decoration: none;
  display: block;
  transition: box-shadow var(--t), transform var(--t);
}
.blog-card:hover { box-shadow: 0 4px 20px rgba(13, 27, 42, 0.15); transform: translateY(-1px); }
.blog-card-title { font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; }
.blog-card-excerpt { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.blog-card-date { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }

/* ── Section header in blog index ── */
.section-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.3rem;
  margin: 1.5rem 0 0.75rem;
}

/* ── Post content divider ── */
.post-divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Back-to-blog link at bottom of post ── */
.back-to-blog { color: var(--sky); text-decoration: none; font-size: 0.88rem; }
.back-to-blog:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .blog-wrap { padding: 0 0.9rem 2.5rem; }
  h1 { font-size: 1.45rem; }
  .blog-nav { padding: 0.6rem 0.9rem; }
  .back-link { display: none; } /* save space; footer has the link */
}

/* ── Post hero image ── */
.post-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.5rem 0 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

/* ── Inline screenshots inside post body ── */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.25rem auto;
  box-shadow: 0 2px 14px rgba(0,0,0,.12);
  display: block;
}
.post-body img + em {   /* italic text immediately after img = caption */
  display: block;
  text-align: center;
  font-size: .78rem;
  color: #6b90b8;
  margin-top: -.75rem;
  margin-bottom: 1.25rem;
}
