/* ============================================================
   Insights Article Layout
   ============================================================ */

.insights-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.insights-article header h1 {
  color: #4E61A6;
  border-bottom: 2px solid #4E61A6;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.insights-article header .subtitle {
  font-size: 1.125rem;
  color: #64748b;
  margin-top: 4px;
}

/* Sections after the first get a top divider */
.insights-article section + section {
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: 30px;
}

.insights-article ul,
.insights-article ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.insights-article li {
  margin-bottom: 12px;
}

.insights-article footer {
  border-top: 1px solid #eee;
  font-size: 0.9em;
  color: #666;
  padding: 20px;
  margin-top: 30px;
}

.insights-article footer h3 {
  color: #444;
  font-size: 1.1em;
}

.insights-article footer ol {
  margin-top: 0;
}

.insights-article footer ul {
  margin-top: 0;
}

.insights-article footer li {
  margin-bottom: 8px;
}

.insights-article footer a,
.insights-article .ref-link {
  color: #0056b3;
  text-decoration: none;
  word-break: break-word;
}

.insights-article blockquote {
  margin: 20px 0;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-left: 5px solid #0056b3;
  font-style: italic;
  color: #555;
}

.insights-article .table-wrapper {
  margin: 20px 0;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  overflow: hidden;
}

.insights-article .cost-value {
  font-weight: bold;
  color: #28a745;
  vertical-align: top;
}

.insights-article .info-box {
  margin: 25px 0;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 20px;
}

.insights-article .info-box h3 {
  margin-top: 0;
  font-size: 1.1em;
  color: #0056b3;
}

.insights-article .label-fhir {
  font-weight: bold;
  color: #28a745;
}

.insights-article .label-openehr {
  font-weight: bold;
  color: #0056b3;
}

.insights-article .checklist {
  list-style-type: none;
  padding-left: 0;
  margin-top: 15px;
}

/* Dimension cards */
.insights-article .dimension-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.insights-article .dimension-card {
  padding: 16px;
  background-color: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
}

.insights-article .dimension-card h3 {
  font-size: 1.1em;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.insights-article .dimension-card p {
  margin: 0;
  color: #334155;
}

/* Numbered steps */
.insights-article .numbered-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: 12px;
  margin-top: 16px;
}

.insights-article .numbered-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.insights-article .step-badge {
  background-color: #eff6ff;
  color: #1d4ed8;
  font-weight: bold;
  border-radius: 50%;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.insights-article .step-content {
  margin: 4px 0 0 0;
}

/* Success blockquote variant */
.insights-article .blockquote-success {
  margin: 32px 0;
  padding: 20px;
  background-color: #f0fdf4;
  border-left: 4px solid #16a34a;
  border-radius: 0 8px 8px 0;
  font-style: normal;
  color: #166534;
}

.insights-article .blockquote-success .bq-label {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #14532d;
}

.insights-article .blockquote-success p:last-child {
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* ============================================================
   Terminal-style code blocks
   ============================================================ */

.insights-article .code-block {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3a3a3a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.insights-article .code-block::before {
  content: attr(data-lang);
  display: block;
  background: #1a1a1a;
  color: #75a4f9;
  padding: 7px 16px;
  font-size: 0.7rem;
  font-family: 'Courier New', Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid #3a3a3a;
}

.insights-article .code-block pre[class*="language-"] {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ============================================================
   Related Insights
   ============================================================ */

.related-insights {
  margin-top: 48px;
  border-top: 2px solid #e2e8f0;
  padding-top: 28px;
}

.related-insights h3 {
  font-size: 1.1em;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 18px 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.related-card {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  border-color: #4E61A6;
  box-shadow: 0 2px 8px rgba(78, 97, 166, 0.12);
  text-decoration: none;
  color: inherit;
}

.related-pillar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background-color: #4E61A6;
  padding: 7px 12px;
}

.related-level {
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.8;
  text-transform: capitalize;
}

.related-card p {
  margin: 0;
  font-size: 0.88em;
  color: #334155;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 12px;
}
