/* ============================================================
   PLAYABLE KIT — Article / SEO page shell
   Built on top of the tokens and components in styles.css
   (site-nav, site-button, site-footer, --bg/--tx/--ac scales).
   Include styles.css BEFORE this file.
   ============================================================ */

body { padding-top: 28px; }

.article-shell {
  width: min(800px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 96px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.article-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tx-3);
  margin-bottom: 28px;
}
.article-crumbs a { color: var(--tx-2); transition: color 0.15s; }
.article-crumbs a:hover { color: var(--ac); }
.article-crumbs .sep { color: var(--tx-3); }
.article-crumbs .current { color: var(--tx-1); }

/* ── Header ─────────────────────────────────────────────────── */
.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px 5px 10px;
  border-radius: var(--r-pill);
  background: var(--ac-dim);
  border: 1px solid var(--ac-mid);
  color: var(--ac);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.article-kicker svg { width: 13px; height: 13px; flex: 0 0 auto; }

.article-shell h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
  color: var(--tx-0);
  margin-bottom: 18px;
}

.article-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--tx-2);
  max-width: 62ch;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--bd-1);
  font-size: 13.5px;
  color: var(--tx-3);
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Reading progress ───────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--ac);
  box-shadow: 0 0 12px rgba(212,255,30,0.5);
  z-index: 999;
  transition: width 0.1s linear;
}

/* ── Prose body ─────────────────────────────────────────────── */
.article-body { color: var(--tx-1); }

.article-body h2 {
  color: var(--tx-0);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 52px 0 16px;
  scroll-margin-top: 96px;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  color: var(--tx-0);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 30px 0 12px;
  scroll-margin-top: 96px;
}

.article-body p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 4px;
  padding-left: 22px;
  color: var(--tx-1);
  display: grid;
  gap: 10px;
  font-size: 16px;
  line-height: 1.7;
}
.article-body li::marker { color: var(--ac); }

.article-body strong { color: var(--tx-0); font-weight: 700; }

.article-body a {
  color: var(--purple, #a78bfa);
  text-decoration: none;
  background-image: linear-gradient(var(--purple, #a78bfa), var(--purple, #a78bfa));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
}
.article-body a:hover { color: #c4b5fd; }

.article-body code {
  font-family: "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.87em;
  background: var(--sf-2);
  border: 1px solid var(--bd-1);
  padding: 2px 7px;
  border-radius: 6px;
  color: #d4ff1e;
}

.article-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--ac-mid);
  color: var(--tx-2);
  font-style: italic;
}

/* ── Tables ─────────────────────────────────────────────────── */
.article-table-wrap {
  overflow-x: auto;
  margin: 24px 0 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--bd-1);
  background: var(--sf-0);
}
.article-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article-body th, .article-body td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--bd-1); vertical-align: top; }
.article-body th { background: var(--sf-1); color: var(--tx-0); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.article-body td { color: var(--tx-1); line-height: 1.6; }
.article-body tr:last-child td { border-bottom: none; }
.article-table-wrap .pass,
.article-body .p-check { color: var(--green); }
.article-table-wrap .fail,
.article-body .p-cross { color: var(--red); }

/* ── Folder-tree diagram (e.g. mintegral-folder-structure-explained) ── */
.article-body .p-tree {
  font-family: "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.75;
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin: 20px 0 24px;
  color: var(--tx-1);
  overflow-x: auto;
  white-space: pre;
}
.article-body .p-tree .dir { color: var(--purple, #a78bfa); font-weight: 700; }
.article-body .p-tree .entry,
.article-body .p-tree .file { color: var(--tx-0); font-weight: 700; }
.article-body .p-tree .cm,
.article-body .p-tree .comment { color: var(--tx-3); }

/* ── Numbered step list (e.g. convert-luna-playable-for-multiple-networks) ── */
.article-body .p-steps { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; }
.article-body .p-steps li {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
}
.article-body .p-steps .p-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--ac);
  color: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.article-body .p-steps div p { margin: 0; }
.article-body .p-steps strong { color: var(--tx-0); }

/* ── Callout ────────────────────────────────────────────────── */
.article-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  border-left: 3px solid var(--ac);
  margin: 28px 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--tx-2);
}
.article-callout svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--ac); margin-top: 1px; }
.article-callout strong { color: var(--tx-0); }
.article-callout a { color: var(--ac); background-image: linear-gradient(var(--ac), var(--ac)); }

/* ── CTA panel ──────────────────────────────────────────────── */
.article-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 44px 32px;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--sf-0) 0%, var(--bg-0) 100%);
  border: 1px solid var(--bd-1);
  margin-top: 56px;
}
.article-cta::before {
  content: "";
  position: absolute;
  top: -60%; left: 50%;
  width: 480px; height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212,255,30,0.10) 0%, transparent 68%);
  pointer-events: none;
}
.article-cta > * { position: relative; }
.article-cta h3 {
  color: var(--tx-0);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.article-cta p { color: var(--tx-2); font-size: 14.5px; max-width: 48ch; margin: 0 auto 24px; }
.article-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Related ────────────────────────────────────────────────── */
.article-related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--bd-1); }
.article-related h2 { margin-top: 0 !important; }
.article-related-grid { display: grid; gap: 10px; margin-top: 20px; }

.article-related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  color: var(--tx-1);
  font-size: 14.5px;
  font-weight: 600;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.article-related-card:hover {
  border-color: var(--bd-2);
  background: var(--sf-1);
  color: var(--tx-0);
  transform: translateX(3px);
}
.article-related-card:focus-visible {
  outline: none;
  border-color: var(--ac);
  box-shadow: 0 0 0 3px var(--ac-dim);
}
.article-related-card svg {
  width: 16px; height: 16px; flex: 0 0 auto;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  color: var(--tx-3);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}
.article-related-card:hover svg { transform: translateX(3px); color: var(--ac); }

/* ── Network reference grid (resources.html "Networks" section) ── */
.network-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 16px 0 32px;
}
.network-ref-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  color: var(--tx-1);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.network-ref-card:hover { border-color: var(--bd-2); background: var(--sf-1); color: var(--tx-0); transform: translateY(-1px); }
.network-ref-card:focus-visible { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-dim); }

/* ── Hub page: jump nav + link grid (resources.html) ───────── */
.article-shell.hub { width: min(1120px, calc(100% - 40px)); }

.article-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
}
.article-toc a {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  color: var(--tx-2);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.article-toc a:hover { color: var(--tx-0); border-color: var(--bd-2); background: var(--sf-1); }

.article-body .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.link-grid a {
  display: block;
  padding: 13px 16px;
  border-radius: var(--r);
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
  color: var(--tx-1);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.link-grid a:hover { border-color: var(--bd-2); background: var(--sf-1); color: var(--tx-0); transform: translateY(-1px); }
.link-grid a .tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.article-body .p-section-note { color: var(--tx-3); font-size: 14px; margin: -8px 0 16px; }

@media (max-width: 640px) {
  .article-shell { padding: 32px 0 72px; }
  .article-body h2 { margin-top: 40px; }
}
