:root {
  color: #191714;
  background: #fbfaf6;
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --bg: #fbfaf6;
  --paper: #ffffff;
  --text: #191714;
  --muted: #676158;
  --line: #d8d1c4;
  --soft: #f2eee5;
  --accent: #c95d24;
  --accent-2: #4f7d64;
  --link: #174f8a;
  --shadow: 0 1px 0 rgb(25 23 20 / 0.08);
}

html[data-era="1999"] {
  --bg: #d8d8d8;
  --paper: #eeeeee;
  --text: #000000;
  --muted: #343434;
  --line: #808080;
  --soft: #ffffff;
  --accent: #cc3300;
  --accent-2: #006600;
  --link: #0000ee;
  --shadow: none;
  font-family: "Times New Roman", Times, serif;
}

html[data-era="2004"] {
  --bg: #eef1e7;
  --paper: #fffdf4;
  --text: #20201c;
  --muted: #5d6257;
  --line: #b8bba8;
  --soft: #e2e8d6;
  --accent: #b85124;
  --accent-2: #587d55;
  --link: #2e5b85;
  font-family: Verdana, Geneva, sans-serif;
}

html[data-era="2012"] {
  --bg: #f4f5f7;
  --paper: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --line: #d9dde3;
  --soft: #eef1f5;
  --accent: #d86f34;
  --accent-2: #3d8062;
  --link: #1967d2;
  --shadow: 0 2px 8px rgb(32 33 36 / 0.08);
  font-family: Arial, Helvetica, sans-serif;
}

html[data-era="2026"] {
  --bg: #f7f6f1;
  --paper: #fffffb;
  --text: #151515;
  --muted: #5c5b55;
  --line: #d7d3c8;
  --soft: #ece9df;
  --accent: #bd4f2a;
  --accent-2: #28705b;
  --link: #315f78;
  --shadow: 0 1px 16px rgb(21 21 21 / 0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

button,
select,
a {
  font: inherit;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: #ffdf8a;
  color: #15120d;
}

.site-shell {
  min-height: 100dvh;
  background:
    linear-gradient(90deg, rgb(25 23 20 / 0.035) 1px, transparent 1px),
    linear-gradient(var(--bg), var(--bg));
  background-size: 72px 72px, auto;
}

html[data-era="1999"] .site-shell {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 15px, rgb(0 0 0 / 0.035) 16px),
    var(--bg);
}

html[data-era="2026"] .site-shell {
  background:
    linear-gradient(90deg, rgb(189 79 42 / 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #f7f6f1, #efefe8);
  background-size: 80px 80px, auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, white);
  padding: 10px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.header-right a {
  color: inherit;
  text-decoration: none;
}

.era-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.era-picker span {
  color: var(--muted);
}

.era-picker select {
  max-width: 86px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  padding: 3px 5px;
  font-size: 12px;
}

.article {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 46px 0 80px;
}

.kicker,
.meta-line,
.data-eyebrow,
.article-footer,
figcaption,
.chart-caption {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 720px;
  color: var(--text);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
}

.deck {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  font-size: 12px;
}

.meta-line span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 4px 8px;
}

.prose {
  margin-top: 42px;
}

.prose p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.78;
}

.prose h2 {
  margin: 46px 0 16px;
  font-size: 29px;
  letter-spacing: 0;
  line-height: 1.16;
}

.prose blockquote {
  margin: 28px 0;
  border-left: 4px solid var(--accent);
  background: var(--soft);
  padding: 16px 18px;
  font-size: 19px;
  font-style: italic;
  line-height: 1.62;
}

.prose ul {
  display: grid;
  gap: 10px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.prose li {
  border-left: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--paper) 78%, var(--soft));
  padding: 10px 12px;
  font-size: 17px;
  line-height: 1.58;
}

.media-figure {
  margin: 34px 0;
}

.media-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.media-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.data-panel {
  margin: 34px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
  box-shadow: var(--shadow);
}

.data-panel h3 {
  margin: 5px 0 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.data-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric-card {
  min-width: 0;
  background: var(--paper);
  padding: 13px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.42;
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.bar-chart {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.bar-row div {
  min-width: 0;
}

.bar-row strong,
.bar-row small,
.bar-row span {
  display: block;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bar-row strong {
  font-size: 14px;
}

.bar-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bar-row span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.bar-row i {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--accent-2), var(--accent)) 0 0 / var(--bar-width) 100% no-repeat,
    var(--soft);
}

.chart-caption {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.timeline-panel ol {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-panel li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 14px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  padding: 12px;
}

.timeline-panel time {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.timeline-panel strong {
  font-size: 16px;
}

.timeline-panel span {
  grid-column: 2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.article-footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.era-extra {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.era-extra span,
.era-extra a {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  padding: 3px 6px;
  text-decoration: none;
}

html[data-era="1999"] .era-1999,
html[data-era="2004"] .era-2004,
html[data-era="2012"] .era-2012,
html[data-era="2026"] .era-2026 {
  display: flex;
}

html[data-era="1999"] .brand-mark,
html[data-era="1999"] .meta-line span,
html[data-era="1999"] .media-figure img,
html[data-era="1999"] .data-panel {
  border-radius: 0;
}

html[data-era="1999"] .site-header {
  position: static;
  background: #c0c0c0;
}

html[data-era="2004"] .brand-mark {
  background: #364b31;
}

html[data-era="2012"] .site-header {
  background: rgb(255 255 255 / 0.96);
}

html[data-era="2026"] .brand-mark {
  background: #151515;
}

.post-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.post-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px;
  color: var(--text);
  text-decoration: none;
}

.post-row small {
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    padding: 9px 12px;
  }

  .header-right {
    gap: 9px;
  }

  .article {
    width: min(100% - 24px, 760px);
    padding-top: 28px;
  }

  h1 {
    font-size: 39px;
    line-height: 1.05;
  }

  .deck {
    font-size: 18px;
  }

  .prose p {
    font-size: 17px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .timeline-panel li {
    grid-template-columns: 1fr;
  }

  .timeline-panel span {
    grid-column: 1;
  }
}

@media (max-width: 430px) {
  .brand small,
  .header-right > a,
  .era-picker span {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .data-panel {
    padding: 14px;
  }
}
