:root {
  --fg: #111;
  --muted: #555;
  --subtle: #888;
  --border: #e2e2e2;
  --bg-soft: #f7f7f8;
  --accent: #1a5fb4;
  --max-width: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg);
  line-height: 1.55;
  background: #fff;
}

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
header.site-header .container {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
header.site-header .brand {
  font-weight: 700; font-size: 1.1rem; color: var(--fg);
}
header.site-header nav a { margin-left: 1rem; color: var(--muted); font-size: 0.95rem; }
header.site-header nav a:hover { color: var(--accent); }

/* Main */
main { padding: 2rem 0 3rem; }
h1 { font-size: 1.9rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.tagline { color: var(--muted); margin: 0 0 1.5rem; }

/* Live data current-value display */
.current-value {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
}
.current-value .label { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.25rem; }
.current-value .value { font-size: 2.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.current-value .delta { color: var(--muted); margin-left: 0.5rem; font-size: 1rem; }

/* Tables */
table.data {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
  font-variant-numeric: tabular-nums;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
table.data th { background: var(--bg-soft); font-weight: 600; }
table.data td.num { text-align: right; }
table.data tr:hover td { background: #fafbfc; }

/* Definition block (Template B) */
.definition {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
}
.definition .term { font-weight: 700; }

/* Meta blocks (last updated, source, author) */
.meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1rem 0;
}
.meta a { color: var(--muted); text-decoration: underline; }

.author-credit {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.author-credit .name { color: var(--fg); font-weight: 600; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--subtle);
  font-size: 0.9rem;
}
footer.site-footer a { color: var(--subtle); }
footer.site-footer p { margin: 0.25rem 0; }

/* Responsive */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .current-value .value { font-size: 1.75rem; }
  header.site-header nav a { margin-left: 0.5rem; font-size: 0.85rem; }
}
