/* ==========================================================================
   Ryno Systems — Blog article supplement
   Loaded after style.css on /blog/ article pages. Extends the article
   styles with tables, code blocks, blockquotes, ordered lists, and the
   related-articles grid.
   ========================================================================== */

/* ---------- Article header ---------- */
.article-header .post-meta { justify-content: center; flex-wrap: wrap; }
.article-header h1 { font-feature-settings: "cv01", "ss03"; }

/* ---------- Ordered lists ---------- */
.article-body ol {
  margin: 0 0 1.35rem 1.5rem;
  list-style: decimal;
}
.article-body ol li {
  padding-left: 0.35rem;
  margin-bottom: 0.6rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.article-body ol li::marker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.92em;
}
.article-body li ul { margin: 0.6rem 0 0; }

/* ---------- Inline code ---------- */
.article-body :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

/* ---------- Code blocks ---------- */
.article-body pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.35rem;
  overflow-x: auto;
}
.article-body pre code {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
}

/* ---------- Tables ---------- */
.article-body .table-wrap {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article-body table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.article-body th {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-glow);
  white-space: nowrap;
}
.article-body td {
  padding: 0.7rem 1rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tbody tr { transition: background var(--t-fast); }
.article-body tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.article-body td strong { color: var(--white); }

/* ---------- Blockquotes ---------- */
.article-body blockquote {
  background: var(--card);
  border: 1px solid var(--border-glow);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.article-body blockquote p { margin: 0 0 0.75rem; color: var(--text); font-size: 1rem; }
.article-body blockquote p:last-child { margin-bottom: 0; }

/* ---------- H4 + footnote-ish small text ---------- */
.article-body h4 { font-size: 1.05rem; margin: 1.5rem 0 0.6rem; }
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ---------- Inline "Related" pointer ---------- */
.related-inline {
  font-family: var(--mono);
  font-size: 0.88rem;
  margin: 1.5rem 0;
}
.related-inline a { text-decoration: none; }
.related-inline a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Related articles grid ---------- */
.related {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}
.related > h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.related-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.5rem;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t);
}
.related-card:hover {
  background: var(--card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
}
.related-card h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0.4rem 0 0.5rem;
  color: var(--white);
}
.related-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  flex-grow: 1;
  margin-bottom: 0.9rem;
}
.related-card .post-meta { margin-bottom: 0.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .article-body table { font-size: 0.86rem; }
  .article-body th, .article-body td { padding: 0.6rem 0.75rem; }
  .article-body pre { padding: 0.9rem 1rem; }
}
