/* article layout — load after style.css */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: start;
}

/* ---- title block ---- */
.article-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #3a3a3a;
}
.article-header h1 {
  margin: 6px 0 10px;
  font-size: 26px;
  line-height: 1.25;
}
.article-header p:not(.section-kicker) { color: #b4b4b4 !important; font-size: 15px !important; }

.article-meta {
  margin-top: 10px;
  color: #8a8a8a;
  font-size: 13px;
}
.meta-pill:not(:last-child)::after { content: " · "; }

/* ---- body text ---- */
.article-body h2 {
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #3a3a3a;
  font-size: 20px;
  scroll-margin-top: 16px;
}
.article-body > h2:first-child { margin-top: 0; }
.article-body h3 { margin: 24px 0 8px; font-size: 16px; }

.article-body ul,
.article-body ol { margin: 0 0 12px; padding-left: 22px; }
.article-body li { margin-bottom: 4px; }
.article-body strong { color: #fff; font-weight: normal; }

.article-body code {
  font: inherit;
  color: #8fc28f;
  overflow-wrap: anywhere;
}

.callout {
  margin: 16px 0;
  padding-left: 14px;
  border-left: 2px solid #8fc28f;
}
.callout p { margin: 0; }

.references {
  margin-top: 36px;
  font-size: 13px;
  color: #8a8a8a;
}
.references a { word-break: break-all; }

/* ---- pieces defined in per-article <style> blocks: flatten them ---- */
.article-body .data-table,
.article-body .bar-chart,
.article-body .stat-cell *,
.article-body .sample-grid li { font-family: inherit; }

.article-body .data-table { background: none; border: 0; font-size: 13px; }
.article-body .data-table th,
.article-body .data-table td { border-bottom: 1px solid #262626; padding: 6px 10px 6px 0; }
.article-body .data-table thead th,
.article-body .data-table .row-total td {
  background: none;
  font-weight: normal;
  color: #fff;
  border-bottom: 1px solid #3a3a3a;
}
.article-body .data-table .row-total td { border-top: 1px solid #3a3a3a; border-bottom: 0; }
.article-body .data-table .row-flag td { background: none; color: #8fc28f; }

.article-body .stat-cell {
  background: none;
  border: 1px solid #3a3a3a;
  border-radius: 0;
}
.article-body .stat-cell .stat-value { font-weight: normal; color: #fff; }

.article-body .bar-track { background: none; border: 1px solid #3a3a3a; border-radius: 0; }
.article-body .bar-fill { background: #8a8a8a; box-shadow: none; }
.article-body .bar-fill--accent { background: #8fc28f; }

.article-body .sample-grid li {
  background: none;
  border: 1px solid #3a3a3a;
  border-radius: 0;
  color: #d8d8d8;
}

/* ---- sidebar ---- */
.article-sidebar {
  font-size: 13px;
}
.sidebar-panel { margin-bottom: 24px; }
.sidebar-panel .section-kicker {
  display: block;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #3a3a3a;
}

.toc-list,
.sidebar-detail { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin-bottom: 4px; }

.sidebar-detail li { margin-bottom: 8px; }
.sd-label { display: block; color: #8a8a8a; text-transform: lowercase; }
.sd-value { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .article-layout { display: block; }
  .article-sidebar { margin-top: 40px; }
}

/* on phones, a table too wide for the screen scrolls sideways on its own
   instead of pushing the page wider */
@media (max-width: 760px) {
  .article-body .data-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
