/* Shared layout for Visaify blog articles (post header, TOC, body, callouts).
   New articles link this instead of carrying their own copy. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1C3461;
  --primary-hover: #2d5a9e;
  --primary-light: rgba(28,52,97,.08);
  --accent: #0ea5e9;
  --bg: #ffffff;
  --bg2: #f8fafc;
  --sur: #f1f5f9;
  --brd: rgba(28,52,97,.12);
  --brd2: rgba(28,52,97,.22);
  --tx1: #0f172a;
  --tx2: #475569;
  --tx3: #94a3b8;
  --green: #10b981;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --r: 14px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tx1);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  height: 56px;
  display: flex;
  align-items: center;
}
.navbar-inner {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}
.nav-name {
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Post header ── */
.post-header {
  background: linear-gradient(135deg, var(--primary) 0%, #2d5a9e 100%);
  color: #fff;
  padding: 60px 20px 52px;
}
.post-header-inner {
  max-width: 700px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.4); }
.post-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}
.post-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  flex-wrap: wrap;
}
.post-byline strong { color: rgba(255,255,255,0.85); }

/* ── Layout ── */
.post-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
  flex: 1;
}

/* ── Table of contents ── */
.toc {
  position: sticky;
  top: 72px;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 20px;
}
.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx3);
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc ol li a {
  font-size: 13px;
  color: var(--tx2);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.15s;
}
.toc ol li a:hover { color: var(--primary); }

/* ── Article body ── */
.post-body {
  max-width: 700px;
}
.post-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--tx1);
  margin: 40px 0 14px;
  letter-spacing: -0.02em;
  scroll-margin-top: 72px;
}
.post-body h2:first-child { margin-top: 0; }
.post-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--tx2);
  margin-bottom: 16px;
}
.post-body ul, .post-body ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.post-body li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--tx2);
  margin-bottom: 6px;
}
.post-body strong { color: var(--tx1); }
.post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.post-body a:hover { color: var(--primary-hover); }

.callout {
  background: var(--bg2);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.callout.warning {
  border-left-color: #ef4444;
  background: rgba(239,68,68,0.05);
}
.callout.tip {
  border-left-color: var(--green);
  background: rgba(16,185,129,0.05);
}
.callout p { margin-bottom: 0; }
.callout p + p { margin-top: 8px; }

.example-box {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 20px 24px;
  margin: 24px 0;
}
.example-box .example-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ── Related tools & More articles ── */
.post-footer-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--brd);
}
.pf-card {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 22px;
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pf-card:hover {
  box-shadow: 0 4px 18px rgba(28,52,97,0.1);
  border-color: var(--brd2);
}
.pf-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tx3);
  margin-bottom: 8px;
}
.pf-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.35;
}
.pf-desc {
  font-size: 0.82rem;
  color: var(--tx3);
  margin-top: 6px;
  line-height: 1.5;
}

.disclaimer-box {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-top: 40px;
}
.disclaimer-box p {
  font-size: 0.83rem;
  color: var(--tx3);
  line-height: 1.65;
  margin-bottom: 0;
}
.disclaimer-box strong { color: var(--tx2); }

/* ── Footer ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 40px 20px 28px;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.footer-brand-text { font-size: 14px; color: rgba(255,255,255,0.7); }
.footer-brand-text strong { color: #fff; display: block; font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-nav a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; transition: color 0.15s; }
.footer-nav a:hover { color: #fff; }
.footer-disclaimer { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.65; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-copy a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-copy a:hover { color: rgba(255,255,255,0.8); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 32px;
  }
  .toc {
    position: static;
    margin-bottom: 32px;
  }
  .post-footer-cards {
    grid-template-columns: 1fr;
  }
}

/* Tables (comparison and score tables in articles) */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.post-body table { width: 100%; border-collapse: collapse; font-size: .95em; line-height: 1.5; }
.post-body th, .post-body td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border-bottom: 1px solid rgba(127,127,127,.25);
}
.post-body thead th {
  font-weight: 700; font-size: .85em; letter-spacing: .02em;
  border-bottom: 2px solid rgba(127,127,127,.4);
}
.post-body tbody tr:nth-child(even) { background: rgba(127,127,127,.05); }

/* Grid children must be allowed to shrink, or a wide table widens the page on phones */
.post-layout > * { min-width: 0; }
