/* Levels grid */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.level {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  line-height: 1.35;
}
/* Color scale */
.level-0 { background:#f9dede; border-left:4px solid #d93025; }
.level-1 { background:#ffe9d5; border-left:4px solid #f57c00; }
.level-2 { background:#fff6cc; border-left:4px solid #f9ab00; }
.level-3 { background:#e6f4ea; border-left:4px solid #34a853; }
.level-4 { background:#e8f0fe; border-left:4px solid #4285f4; }
.level-5 { background:#f3e8fd; border-left:4px solid #9334e6; }

/* Tables */
table { width:100%; border-collapse:collapse; margin:1rem 0; }
th, td { border:1px solid #ddd; padding:0.5rem 0.75rem; text-align:left; }
th { background:#f6f8fa; }

/* Footer note */
.footer-note { border-top:1px solid #ddd; padding-top:8px; }


/* Question block */
.playbook blockquote{
  font-size:1.25rem;
  font-weight:600;
  border-left:4px solid #2a7ab0;
  background:#f3f9ff;
  padding:12px 16px;
  margin:12px 0 20px;
}
.playbook blockquote strong{margin-right:6px}

/* Guides secondary nav */
.guides-nav{margin:8px auto 16px; display:flex; flex-direction:column; gap:6px}
.guides-nav .pillars{text-align:center}
.guides-nav .pillars a{margin:0 6px}
.guides-nav .pager{display:flex; justify-content:space-between; align-items:center; gap:12px}
.guides-nav .pager .current{opacity:.75}
.guides-nav .pager a{white-space:nowrap}

/* Pager buttons (prev/next) */
.guides-nav .pager a{
  background:#e3f2fd;
  border:1px solid #1e88e5;
  color:#0d47a1;
  padding:8px 14px;
  border-radius:999px;
  font-weight:600;
}
.guides-nav .pager a.prev::before{content:"◄ "; font-size:1.05em}
.guides-nav .pager a.next::after{content:" ►"; font-size:1.05em}

/* --- Guides hub / pillar polish --- */
.guides-intro{
  font-size:1.15rem;
  line-height:1.6;
  margin:6px 0 18px;
  color:#445;
}

/* Pillar buttons */
.guides-nav .pillars{
  display:flex; flex-wrap:wrap; justify-content:center; gap:10px 12px;
  margin-bottom:8px;
}
.guides-nav .pillars a{
  display:inline-block;
  padding:8px 12px; border-radius:999px;
  border:1px solid #cfd8dc; background:#f8fbff; color:#0d47a1;
  text-decoration:none; font-weight:600; font-size:.95rem;
}
.guides-nav .pillars a:hover{ background:#eaf3ff; border-color:#90caf9 }

/* Cards for pillar pages */
.guide-cards{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px; margin:14px 0 24px;
}
.guide-card{
  border:1px solid #e0e0e0; border-left:6px solid #2a7ab0;
  border-radius:10px; background:#fff; padding:12px 14px;
}
.guide-card h4{ margin:0 0 6px; font-size:1.05rem }
.guide-card h4 a{ text-decoration:none; }
.guide-card p{ margin:0; color:#566; font-size:.95rem }

/* Pager pill buttons (reuse) */
.guides-nav .pager a{
  background:#e8f0fe; border:1px solid #1e88e5; color:#0d47a1;
  padding:8px 14px; border-radius:999px; font-weight:600;
}
.guides-nav .pager a.prev::before{content:"◄ "; font-size:1.05em}
.guides-nav .pager a.next::after{content:" ►"; font-size:1.05em}
/* ==== Playbook polish: tables & accents ==== */

/* Base table styling (applies only inside playbook pages) */
.playbook table{
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
  margin:14px 0 22px;
}
.playbook th, .playbook td{
  padding:10px 12px;
  border-bottom:1px solid #eef1f6;
  vertical-align:top;
}
.playbook thead th{
  background:#eaf3ff;
  color:#0d47a1;
  font-weight:700;
  border-bottom:1px solid #dbe6f5;
}
.playbook tbody tr:nth-child(odd){ background:#fafcff }
.playbook tbody tr:hover{ background:#f2f7ff }

/* Make first column more prominent (usually labels / “From → To” / Standard) */
.playbook td:first-child{
  font-weight:600;
  color:#37474f;
  width:28%;
  white-space:nowrap;
}

/* Subtle chips for emphasized text inside tables */
.playbook td strong{
  background:#eef4ff;
  padding:2px 6px;
  border-radius:8px;
  font-weight:700;
}

/* Link treatment inside tables */
.playbook td a{ color:#0d47a1; text-decoration:none }
.playbook td a:hover{ text-decoration:underline }

/* --- Table-specific tweaks by section heading that precedes them --- */
/* We can’t add classes in Markdown, so we style by heading text proximity */
.playbook h2 + table, .playbook h3 + table{ margin-top:10px }

/* How to Level Up (2-col): give actions column more room */
.playbook h2:contains("How to Level Up") + table td:nth-child(2),
.playbook h3:contains("How to Level Up") + table td:nth-child(2){ width:72% }

/* Low-Cost / Open-Source (3-col): let Tool breathe */
.playbook h2:contains("Low-Cost") + table td:nth-child(2),
.playbook h3:contains("Low-Cost") + table td:nth-child(2){ min-width:210px }

/* Compliance Mapping (2-col): make first column narrower, tighter rows */
.playbook h2:contains("Compliance Mapping") + table td:first-child,
.playbook h3:contains("Compliance Mapping") + table td:first-child{ width:24% }
.playbook h2:contains("Compliance Mapping") + table td,
.playbook h3:contains("Compliance Mapping") + table td{ padding-top:8px; padding-bottom:8px }

/* Tiny badge helpers (use **text** in markdown to benefit) */
.playbook .badge{
  display:inline-block; padding:2px 8px; border-radius:999px; font-size:.85rem;
  background:#e8f0fe; color:#0d47a1; border:1px solid #cfe0ff; font-weight:700;
}

/* Spacing polish around sections */
.playbook h2{ margin-top:28px }
.playbook ul{ margin:8px 0 20px; }

/* Pillar nav styling (Nirmata 8 aesthetic) */
.guides-nav { margin: 16px auto 20px; text-align: center; }
.guides-nav .pillars a {
  display: inline-block;
  margin: 4px 6px;
  padding: 6px 14px;
  background: #e8f0fe;
  color: #0d47a1;
  border: 1px solid #1e88e5;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.guides-nav .pillars a:hover { background: #d2e3fc; }
.guides-nav .pager { margin-top: 12px; }
.guides-nav .pager a {
  background: #e8f0fe;
  border: 1px solid #1e88e5;
  color: #0d47a1;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.guides-nav {
  margin: 20px auto 24px;
  text-align: center;
  flex-wrap: wrap;
}
.guides-nav .pillars a {
  display: inline-block;
  margin: 6px 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1e88e5;
  background: #e8f0fe;
  color: #0d47a1;
  font-weight: 600;
  text-decoration: none;
}
.guides-nav .pillars a.active {
  background: #1e88e5;
  color: #fff;
}

/* Nirmata 8 cards + pills (additive) */
.guides-nav{ margin:16px auto 20px; text-align:center; }
.guides-nav .pill{ display:inline-block; margin:6px 6px; padding:8px 14px; border-radius:999px; border:1px solid #1e88e5; background:#e8f0fe; color:#0d47a1; font-weight:600; text-decoration:none; }
.guides-nav .pill:hover{ background:#d2e3fc; }
.guides-nav .pill.active{ background:#1e88e5; color:#fff; }

.playbook-prevnext{ display:flex; align-items:center; justify-content:space-between; margin:10px 0 18px; }
.playbook-prevnext .pill.nav{ margin-left:8px; }

.question-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; margin:14px 0 6px; }
.q-card{ display:block; border:1px solid #d0d7de; border-radius:14px; padding:12px 14px; text-decoration:none; background:#f8fafc; }
.q-card:hover{ background:#f1f5f9; }
.q-code{ font-weight:700; color:#0d47a1; margin-bottom:4px; }
.q-title{ color:#334155; line-height:1.2; }

@media (max-width:640px){
  .guides-nav .pill{ margin:4px 4px; padding:7px 12px; }
  .question-cards{ grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); }
}

/* Nirmata 8 cards + pills (additive) */
.guides-nav{ margin:16px auto 20px; text-align:center; }
.guides-nav .pill{ display:inline-block; margin:6px 6px; padding:8px 14px; border-radius:999px; border:1px solid #1e88e5; background:#e8f0fe; color:#0d47a1; font-weight:600; text-decoration:none; }
.guides-nav .pill:hover{ background:#d2e3fc; }
.guides-nav .pill.active{ background:#1e88e5; color:#fff; }

.playbook-prevnext{ display:flex; align-items:center; justify-content:space-between; margin:10px 0 18px; }
.playbook-prevnext .pill.nav{ margin-left:8px; }

.question-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; margin:14px 0 6px; }
.q-card{ display:block; border:1px solid #d0d7de; border-radius:14px; padding:12px 14px; text-decoration:none; background:#f8fafc; }
.q-card:hover{ background:#f1f5f9; }
.q-code{ font-weight:700; color:#0d47a1; margin-bottom:4px; }
.q-title{ color:#334155; line-height:1.2; }

@media (max-width:640px){
  .guides-nav .pill{ margin:4px 4px; padding:7px 12px; }
  .question-cards{ grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); }
}
/* Global pill style so Prev/Next pills pick it up too */
.pill{
  display:inline-block;
  margin:6px 6px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid #1e88e5;
  background:#e8f0fe;
  color:#0d47a1;
  font-weight:600;
  text-decoration:none;
}
.pill:hover{ background:#d2e3fc; }
.pill.active{ background:#1e88e5; color:#fff; }

/* Prev/Next container on playbook pages */
.playbook-prevnext{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin:8px 0 12px;
}
.playbook-prevnext .btns{
  display:flex;
  gap:10px;
}
.pill.nav{
  margin:0;
  padding:8px 14px;
}
/* Prev at left edge of content; Next at right */
.playbook-prevnext{
  justify-content: space-between;
  margin: 10px 0 18px; /* keep existing spacing */
}
