/* ── Article CSS — DogeThrift blog ──
 * Inherits color tokens from the site palette. Designed to drop into
 * /blog/<slug>/index.html without touching homepage CSS.
 * Targets WCAG 2.2 AA on the dark theme.
 */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2128;
  --border: #30363d;
  --gold: #f0b429;
  --gold-dark: #c8930a;
  --gold-glow: rgba(240, 180, 41, 0.15);
  --green: #3fb950;
  --red: #f85149;
  --text: #e6edf3;
  --text-muted: #b1bac4;
  --text-faint: #9198a1;
  --radius: 12px;
  --radius-sm: 8px;
  --max-prose: 760px;
  --max-wide: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--gold);
  color: #000;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #000; }

/* Site nav (matches homepage) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.site-nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 1rem;
}
.site-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.site-logo svg { width: 28px; height: 28px; }
.site-logo span { color: var(--text); }
.site-nav-links { display: flex; gap: 1.5rem; font-size: 0.9rem; list-style: none; }
.site-nav-links a { color: var(--text-muted); text-decoration: none; }
.site-nav-links a:hover { color: var(--text); }

/* Disclosure bar */
.disclosure-bar {
  background: #111;
  border-bottom: 1px solid #1e1e1e;
  padding: 0.6rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.disclosure-bar strong { color: var(--gold); font-weight: 600; }
.disclosure-bar a { color: var(--text); }

/* Article main */
.article-main {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.article-h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.byline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.75rem;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.6rem;
  color: var(--text);
}
.article-body p { margin-bottom: 1.05rem; color: var(--text); }
.article-body ul, .article-body ol { margin: 0.5rem 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.45rem; color: var(--text); }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { color: var(--text); font-style: italic; }

.article-body figure { margin: 1.75rem 0; }
.article-body figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
.article-body figcaption {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  line-height: 1.55;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.article-body th, .article-body td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body th {
  background: var(--bg-card);
  font-weight: 700;
  color: var(--text);
}
.article-body tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
.article-body tbody tr:last-child td { border-bottom: none; }

/* Callout (sister site CTA, key rules, etc.) */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--gold);
}
.callout p { margin: 0; color: var(--text); }

.rule-line {
  border-left: 3px solid var(--gold);
  padding-left: 0.85rem;
  margin: 1.25rem 0;
  font-weight: 600;
  color: var(--text);
}

/* Tier headers in the article */
.tier-h {
  display: inline-block;
  background: var(--gold-glow);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Sources */
.sources {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2.25rem 0 1rem;
}
.sources h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sources ul { margin: 0 0 0 1.25rem; }
.sources li { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.sources li a { color: var(--text); }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold); }

/* Blog hub list */
.hub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
}
.hub-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.hub-card h2 {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.hub-card h2 a { color: var(--text); text-decoration: none; }
.hub-card h2 a:hover { color: var(--gold); }
.hub-card .hub-meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.hub-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav-links { display: none; }
  .article-main { padding: 1.75rem 1.25rem 3rem; }
  .article-body table { font-size: 0.85rem; }
  .article-body th, .article-body td { padding: 0.55rem 0.6rem; }
}
