/* ═════════════════════════════════════════════════════════════════════════════
   Context Engineering Post — Custom Styles
   Extends post-guide.css Design System
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── SVG DIAGRAM OVERRIDES ─────────────────────────────────────────────────── */
.post-guide svg.diagram .box.clay {
  fill: var(--pg-accent-soft);
  stroke: var(--pg-accent);
} /* pg-* now memphis primary/soft via tokens+post-guide.css */

.post-guide svg.diagram .box.olive {
  fill: rgba(107, 140, 78, 0.12);
  stroke: #6B8C4E;
}

.post-guide svg.diagram .box.oat {
  fill: var(--pg-surface-2);
  stroke: var(--pg-border);
}

.post-guide svg.diagram .accent-text {
  fill: var(--pg-accent);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
}

.post-guide svg.diagram .olive-text {
  fill: #6B8C4E;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
}

.post-guide svg.diagram .label-small {
  fill: var(--pg-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.post-guide svg.diagram .arrow.clay {
  stroke: var(--pg-accent);
}

.post-guide svg.diagram .arrow.olive {
  stroke: #6B8C4E;
}

.post-guide svg.diagram .arrow.dashed {
  stroke-dasharray: 5 4;
}

/* ── CHECKLIST CUSTOM ──────────────────────────────────────────────────────── */
.post-guide .checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.post-guide .checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.6;
}

.post-guide .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--pg-border);
  border-radius: 4px;
  background: var(--pg-surface);
}

/* ── METRIC CARDS ──────────────────────────────────────────────────────────── */
.post-guide .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

/* Mobile code/table/diagram constraints + hints polish (per critique v2 P4 for key posts). */
@media (max-width: 640px) {
  pre, .diagram-container, .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .diagram-container::after,
  .table-wrap::after {
    opacity: 0.5;
    transform: scale(0.85);
  }
}
@media (max-width: 768px) {
  .post-guide .metric-grid {
    grid-template-columns: 1fr;
  }
}

.post-guide .metric-card {
  background: var(--pg-surface);
  border: 1px dashed var(--pg-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.post-guide .metric-card .metric-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--pg-accent);
  display: block;
  margin-bottom: 8px;
}

.post-guide .metric-card .metric-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pg-muted);
}

/* ── REFERENCE LINKS ───────────────────────────────────────────────────────── */
.post-guide .references {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px dashed var(--pg-border);
}

.post-guide .references li {
  margin-bottom: 12px;
  font-size: 15px;
}

.post-guide .references a {
  color: var(--pg-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--pg-accent-soft);
  transition: border-color 0.2s ease;
}

.post-guide .references a:hover {
  border-bottom-color: var(--pg-accent);
}
