/* Long-form article layer — loaded on top of site.css */

/* Long-form prose sits directly on the page background rather than inside a
   panel, so the rain has to come down a lot or the text fights with it. */
:root[data-theme="matrix"] body.article { --rain-opacity: .06 }

.article { font-family: var(--font-sans); line-height: 1.72 }
.article .wrap { max-width: 780px }

.topnav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 28px;
  font-family: var(--font-mono); font-size: .82rem;
}
.topnav a { color: var(--muted); text-decoration: none }
.topnav a:hover { color: var(--accent) }
.topnav .theme-btn { position: static }

.kicker { font-family: var(--font-mono); color: var(--accent); font-size: .82rem; margin: 0 0 8px }
.article h1 {
  font-family: var(--font-sans); font-size: 2rem; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.2;
}
.subtitle { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px }

.meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-family: var(--font-mono); font-size: .76rem; color: var(--muted);
  padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}

/* Table of contents — long reference pages (policies, specs) where readers
   arrive looking for one section rather than reading top to bottom. */
.toc {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; padding: 14px 18px; margin: 0 0 32px;
}
.toc-title {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}
.toc ol { margin: 0; padding-left: 20px; font-size: .92rem }
.toc li { margin-bottom: 4px }
.toc a { color: var(--key); text-decoration: none }
.toc a:hover { color: var(--accent) }

/* Anchored headings must clear the fixed reading-progress bar when jumped to. */
.article h2[id] { scroll-margin-top: 20px }

.callout {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: 6px; padding: 12px 16px;
  font-size: .92rem; color: var(--muted); margin: 24px 0;
}
.callout b, .callout strong { color: var(--fg) }
.callout.warn { border-left-color: var(--warn) }

.article h2 {
  font-family: var(--font-sans); font-size: 1.32rem; font-weight: 700;
  margin: 44px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; margin: 28px 0 8px }
.article p { color: var(--fg); margin: 0 0 14px }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px }
.article li { margin-bottom: 7px }
.article a { color: var(--key) }
.article a:hover { color: var(--accent) }
.article strong { color: var(--fg) }
.article em { color: var(--muted); font-style: italic }

.article code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--chip-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; color: var(--accent);
}

.article .term { margin: 22px 0 }
.article .term pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: .8rem; line-height: 1.6;
  color: var(--fg); text-shadow: none;
}
.article .term pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit }

table.data {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: .8rem;
  margin: 20px 0; display: block; overflow-x: auto;
}
table.data th, table.data td {
  border: 1px solid var(--border); padding: 7px 11px;
  text-align: left;
}
/* Keep labels on one line; let the prose column wrap so the table fits the
   page instead of needing a horizontal scroll it does not really need. */
table.data th, table.data td:first-child { white-space: nowrap }
table.data th { background: var(--panel-head); color: var(--accent); font-weight: 600 }
table.data td { color: var(--fg) }
table.data tr.highlight td { color: var(--accent); font-weight: 600 }

.article blockquote {
  margin: 20px 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent-dim);
  color: var(--muted); font-style: italic;
}

.next-links {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .82rem;
}
.next-links a {
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px;
  transition: .15s ease;
}
.next-links a:hover { color: var(--accent); border-color: var(--accent-dim) }

@media (max-width: 600px) {
  .article h1 { font-size: 1.55rem }
  .article .term pre { font-size: .72rem; padding: 12px }
}
