/* antiempire.org
   Palette drawn from old colonial atlases: pale sea paper, navy survey ink,
   and the pink that marked imperial territory. Pink = the imperial past;
   ink/teal = the present. Keep that meaning consistent in charts. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --paper: #e7edec;      /* atlas sea */
  --paper-raised: #f2f5f4;
  --ink: #1b2433;        /* survey navy */
  --ink-soft: #4f5a69;
  --rule: #b9c4c6;
  --empire: #b2385a;     /* imperial pink, deep enough for text */
  --empire-fill: #f0bcc8;/* imperial pink, as on the old maps */
  --now: #2d6a70;        /* the present */
  --now-fill: #b9d6d6;

  --sans: "Archivo", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --measure: 36rem;
  --wide: 62rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); }
body {
  margin: 0;
  font: 400 1.125rem/1.6 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--empire); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--paper-raised); padding: 0.4rem 0.8rem; z-index: 10; }

/* Header */
.site-header {
  max-width: var(--wide); margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  align-items: baseline; justify-content: space-between;
  font-family: var(--sans);
}
.site-name {
  font-weight: 800; font-stretch: 75%; font-size: 1.35rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.site-nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

main { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 5rem; }

/* Home: hero */
.hero { padding: clamp(3rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 {
  font-family: var(--sans);
  font-weight: 850; font-stretch: 68%;
  font-size: clamp(3rem, 9.5vw, 7.25rem);
  line-height: 0.92; letter-spacing: -0.015em;
  margin: 0 0 2rem; max-width: 11ch;
}
.hero p { max-width: var(--measure); margin: 0 0 1rem; font-size: 1.2rem; color: var(--ink-soft); }

/* Home: then / now pairs — the signature element.
   Each row joins a historical essay to its present-day tracker page. */
.pairs { border-top: 2px solid var(--ink); }
.pairs-head, .pair {
  display: grid; grid-template-columns: 1fr 4rem 1fr; align-items: start;
}
.pairs-head {
  font-family: var(--sans); font-stretch: 75%; font-weight: 700; font-size: 1.05rem;
  padding: 0.75rem 0;
}
.pairs-head .then { color: var(--empire); }
.pairs-head .now { color: var(--now); grid-column: 3; }

.pair { border-top: 1px solid var(--rule); padding: 1.5rem 0 1.75rem; }
.pair .then, .pair .now { padding-left: 1rem; }
.pair .then { border-left: 6px solid var(--empire-fill); }
.pair .now  { border-left: 6px solid var(--now-fill); }
.pair .join {
  align-self: center; height: 0; border-top: 1px solid var(--ink-soft);
  margin: 0 0.5rem;
}
.pair h3 {
  font-family: var(--sans); font-weight: 700; font-stretch: 85%;
  font-size: 1.45rem; line-height: 1.15; margin: 0 0 0.35rem;
}
.pair p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.pair .status { display: block; margin-top: 0.6rem; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.pair a { text-decoration: none; }
.pair a:hover h3 { text-decoration: underline; }
.pair .mobile-label { display: none; }

@media (max-width: 40rem) {
  .pairs-head { display: none; }
  .pair { grid-template-columns: 1fr; gap: 1rem; }
  .pair .join { display: none; }
  .pair .mobile-label { display: block; font-family: var(--sans); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.2rem; }
  .pair .then .mobile-label { color: var(--empire); }
  .pair .now .mobile-label { color: var(--now); }
}

/* Prose pages (essays, tracker, about) */
.article-head { padding: clamp(2.5rem, 7vw, 5rem) 0 2rem; max-width: 46rem; }
.article-head h1 {
  font-family: var(--sans); font-weight: 800; font-stretch: 72%;
  font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 0.98; letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.article-head .dek { font-size: 1.3rem; line-height: 1.45; color: var(--ink-soft); margin: 0; }
.article-head .kind { font-family: var(--sans); font-weight: 700; font-size: 0.95rem; margin: 0 0 0.75rem; }
.article-head .kind.then { color: var(--empire); }
.article-head .kind.now { color: var(--now); }

.prose { max-width: var(--measure); }
.prose h2 {
  font-family: var(--sans); font-weight: 700; font-stretch: 85%;
  font-size: 1.6rem; line-height: 1.2; margin: 2.75rem 0 0.75rem;
}
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }

/* Charts may run wider than the text column. */
figure.chart { margin: 2.5rem 0; max-width: var(--wide); }
figure.chart .plot { overflow-x: auto; }
figure.chart figcaption { max-width: var(--measure); font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); margin-top: 0.75rem; }
figure.chart figcaption strong { color: var(--ink); font-family: var(--sans); font-weight: 700; }
figure.chart .source { display: block; margin-top: 0.35rem; font-size: 0.85rem; }

.sources { max-width: var(--measure); margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.sources h2 { font-family: var(--sans); font-size: 1.1rem; margin: 0 0 0.5rem; }

/* Footer */
.site-footer {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 3rem;
  font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft);
}
.site-footer::before { content: ""; display: block; border-top: 1px solid var(--rule); margin-bottom: 2rem; }
.site-footer p { margin: 0; max-width: var(--measure); }
