/* MapScale blog — same design language as the homepage.
   Tokens are copied from index.html so the two never drift apart. */

:root {
  --bg:     #08080C;
  --line:   rgba(255,255,255,0.08);
  --accent: #6366F1;
  --text:   #F5F5FA;
  --muted:  #7A7A94;
  --sub:    #9898B0;
  --panel:  rgba(255,255,255,0.025);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--sub);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

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

/* ── nav ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 5%;
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,12,0.9);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 100;
}
.nav-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text);
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; flex-wrap: wrap; }
.nav-links a {
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem; font-weight: 700; letter-spacing: -0.2px;
  color: var(--sub);
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── hero ── */
.hero { padding: 88px 5% 56px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-bottom: 18px; text-wrap: balance; }
.hero p { font-size: 1.05rem; color: var(--sub); max-width: 60ch; }
.hero .meta, .meta { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.3px; }

.label, .topic-label, .vs-label, .verdict-label {
  display: inline-block;
  font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

/* ── article body ── */
.article { padding: 56px 0 72px; }
.article > * + * { margin-top: 20px; }
.article h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 52px; }
.article h3 { font-size: 1.15rem; margin-top: 34px; letter-spacing: -0.3px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 9px; }
.article strong { color: var(--text); font-weight: 600; }
.article img { max-width: 100%; height: auto; }

/* ── panels ── */
.verdict-box, .cost-box, .cta-box, .callout, .warning,
.winner-box, .phase-box, .vs-box, .toc, .checklist {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px 26px;
  margin: 32px 0;
  border-radius: 4px;
}
.verdict-box, .winner-box {
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.05);
}
.warning { border-color: rgba(232,117,102,0.35); background: rgba(232,117,102,0.05); }
.verdict-text { color: var(--text); font-size: 1rem; }
.cta-box { text-align: center; border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.07); }
.cta-box h3 { margin-bottom: 10px; }
.toc ul { list-style: none; padding-left: 0; }
.toc li { margin-bottom: 7px; }
.checklist { list-style: none; }

.cost-total, .total {
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
}

.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 50%;
  margin-right: 10px;
}

/* verdict colour coding */
.win, .ok, .good, .pick, .vs-good { color: #4CBE88; font-weight: 600; }
.tie { color: var(--muted); font-weight: 600; }
.vs-bad { color: #E87566; font-weight: 600; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px;
  background: var(--accent); color: #fff;
  font-size: 0.9rem; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; text-decoration: none; }

/* ── tables ── */
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  font-family: 'Syne', sans-serif; font-weight: 700; color: var(--text);
  font-size: 0.76rem; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(255,255,255,0.03);
}
td { color: var(--sub); }
tr:last-child td { border-bottom: none; }

/* ── blog index cards ── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 40px 0; }
.post-card { background: var(--bg); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; transition: background 0.2s; }
.post-card:hover { background: rgba(99,102,241,0.04); text-decoration: none; }
.post-card h3 { font-size: 1.05rem; }
.post-card p { font-size: 0.86rem; color: var(--sub); }
.read { font-size: 0.75rem; color: var(--accent); margin-top: auto; }
.tag {
  align-self: flex-start;
  font-size: 0.66rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); padding: 3px 9px;
}

.img-placeholder {
  border: 1px dashed var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 36px 20px;
  text-align: center;
  margin: 28px 0;
}

/* ── footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px 5%;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--sub); }

@media (max-width: 640px) {
  .hero { padding: 60px 5% 40px; }
  .article { padding: 40px 0 56px; }
  .nav { flex-direction: column; gap: 14px; align-items: flex-start; }
}

/* ── SCROLL CAPTURE ──
   Slides in from the corner once someone has actually read a chunk of the page.
   Deliberately not a full-screen overlay: Google demotes intrusive mobile
   interstitials, and blocking an article to demand an email is off-brand. */
.capture {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #101019;
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 10px;
  padding: 22px 22px 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  transform: translateY(140%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.42s cubic-bezier(0.22,1,0.36,1), opacity 0.32s ease, visibility 0.32s;
}
.capture.show { transform: translateY(0); opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .capture { transition: opacity 0.2s ease, visibility 0.2s; transform: none; }
}

.capture h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 7px;
}
.capture p { font-size: 0.82rem; line-height: 1.55; color: var(--sub); margin-bottom: 14px; }

.capture-row { display: flex; gap: 8px; }
.capture input[type="email"] {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 11px 12px;
  border-radius: 5px;
  outline: none;
}
.capture input[type="email"]:focus { border-color: rgba(99,102,241,0.6); }
.capture input::placeholder { color: var(--muted); }

.capture button.go {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 11px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.capture button.go:hover { opacity: 0.9; }
.capture button.go:disabled { opacity: 0.55; cursor: default; }

.capture-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}
.capture-close:hover { color: var(--text); }

.capture-note { font-size: 0.7rem; color: var(--muted); margin: 9px 0 0; }
.capture-done { font-size: 0.86rem; color: var(--sub); }

/* On a phone it sits flush to the bottom as a bar, never covering the article. */
@media (max-width: 560px) {
  .capture {
    right: 8px; left: 8px; bottom: 8px;
    width: auto;
    padding: 18px 18px 16px;
  }
}
