/*
 * Shared stylesheet for the static Quidsmith articles under /articles/.
 * These pages are plain HTML (no app bundle) so search engines and the AdSense crawler
 * can read the full content directly. Palette mirrors the in-game dark theme.
 */
:root {
  --bg-base: #0f0f0f;
  --bg-panel: #161616;
  --bg-hover: #1e1e1e;
  --text-primary: #e8e4dc;
  --text-secondary: #b6b0a4;
  --text-muted: #86807a;
  --accent-gold: #c69628;
  --accent-gold-bright: #e0b23c;
  --danger: #f06060;
  --success: #4caf6a;
  --border: #3a3a3a;
  --chart-grid: #262626;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace; }

a { color: var(--accent-gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.brand:hover { text-decoration: none; color: var(--accent-gold-bright); }
.site-header nav {
  display: flex;
  gap: 1.1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-header nav a { color: var(--text-secondary); }
.site-header nav a:hover { color: var(--text-primary); text-decoration: none; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-gold);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.9rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
h2 {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.02rem; color: var(--text-primary); margin: 1.5rem 0 0.5rem; }

p { color: var(--text-secondary); margin: 0 0 1rem; }
strong { color: var(--text-primary); font-weight: 600; }
ul, ol { color: var(--text-secondary); padding-left: 1.25rem; }
li { margin: 0.35rem 0; }

.byline {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.75rem;
}

.lead { font-size: 1.08rem; color: var(--text-primary); }

/* ---- Disclaimer banner ---- */
.disclaimer {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-panel);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin: 1.75rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.disclaimer strong { color: var(--accent-gold-bright); }

/* ---- Figures / charts ---- */
figure {
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  padding: 1rem 1rem 0.75rem;
}
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
}
.chart-label { fill: var(--text-muted); font-family: "JetBrains Mono", monospace; font-size: 11px; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.bar-gold { fill: var(--accent-gold); }
.bar-muted { fill: #4a4a4a; }
.line-gold { stroke: var(--accent-gold-bright); stroke-width: 2.5; fill: none; }
.line-muted { stroke: #6a6a6a; stroke-width: 2; fill: none; stroke-dasharray: 5 4; }
.area-gold { fill: rgba(198, 150, 40, 0.15); stroke: none; }
.dot-gold { fill: var(--accent-gold-bright); }

/* ---- Tables ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1.25rem 0;
}
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
td { color: var(--text-secondary); }
td.num { font-family: "JetBrains Mono", monospace; color: var(--text-primary); }

/* ---- Callouts ---- */
.callout {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.callout .k {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 0.4rem;
}
.callout p:last-child { margin-bottom: 0; }

/* ---- Ad box ---- */
.ad-wrap {
  margin: 2.25rem 0;
  text-align: center;
}
.ad-wrap .ad-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.ad-wrap ins { min-width: 250px; }

/* ---- Article cards (hub) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  padding: 1.1rem 1.15rem;
  transition: border-color 0.15s, background 0.15s;
}
.card:hover { border-color: var(--accent-gold); background: var(--bg-hover); text-decoration: none; }
.card .tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
}
.card h2 { font-size: 1rem; margin: 0.4rem 0 0.4rem; border: none; padding: 0; }
.card p { font-size: 0.85rem; margin: 0; color: var(--text-secondary); }

/* ---- Read more ---- */
.related {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}
.related .k {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.related ul { list-style: none; padding: 0; }
.related li { margin: 0.3rem 0; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
footer .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
footer a { color: var(--text-secondary); }
footer .links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; font-family: "JetBrains Mono", monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .site-header nav { gap: 0.75rem; }
  main { padding: 1.5rem 1rem 3rem; }
}
