/* Styles for the generated static pages under /year/ and /century/.
   Kept separate from style.css because those pages share none of the app's
   layout -- no map, no slider, no filter rail -- and pulling in 840 lines of
   app CSS to render a list of events would be most of a stylesheet unused. */

:root {
  --bg: #000000;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-border: rgba(255, 255, 255, 0.09);
  --panel-border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --muted: #86868b;
  --accent: #2997ff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* ---- Chrome ---- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 24px;
  border-bottom: 1px solid var(--panel-border);
}

.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-nav a { font-size: 14px; }

.page-footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 13px;
}

.page-footer p { margin: 6px 0; }

/* Wraps rather than scrolls on narrow screens: four links is enough to overflow
   a phone at this font size, and a footer is the last place to hide a link. */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
}

.footer-tagline { margin-top: 12px; }

/* ---- Prose pages (/about/, /attribution/, /privacy/) ---- */

/* Narrower than the event lists. Those are scannable cards where a wide column
   is fine; this is continuous text, where anything past ~70 characters costs the
   reader the start of the next line. */
.prose-page {
  max-width: 680px;
  padding-bottom: 40px;
}

.prose-page h2 {
  margin: 36px 0 12px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.prose-page p { margin: 0 0 14px; }

.prose-page ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose-page li { margin-bottom: 8px; }

.prose-page strong { color: var(--text); font-weight: 600; }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 8px;
}

/* ---- Headings ---- */

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

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

h1 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.lead {
  font-size: 17px;
  color: #c7c7cc;
  margin: 0 0 24px;
  max-width: 62ch;
}

.section-note {
  font-size: 13px;
  color: var(--muted);
  margin: -6px 0 16px;
}

.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---- Call to action ---- */

.cta { margin: 0 0 8px; }

.cta-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.cta-btn:hover { background: #1a86f0; text-decoration: none; }

/* ---- Event lists ---- */

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.event-card {
  border: 1px solid var(--panel-border);
  border-left: 3px solid #888;
  border-radius: 12px;
  background: var(--panel);
  padding: 14px 16px;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

.event-year {
  font-weight: 700;
  color: var(--text);
}

/* The period an approximate event is really dated to, shown where the year would
   otherwise go. Muted and un-bolded so it doesn't compete with the exact dates in
   the "Around this time" list, which sit in the same slot. */
.event-year-approx {
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 1px 8px;
}

/* ---- Approximate-date section on a year page ---- */

/* Set apart from the year's real events above it: these only anchor to this year,
   they didn't happen in it. The rule and the inset say "different kind of thing"
   without needing another heading level to explain it. */
.approx-block {
  margin-top: 36px;
  padding-top: 8px;
  border-top: 1px solid var(--panel-border);
}

.approx-block > .section-note {
  max-width: 62ch;
  margin-bottom: 22px;
}

.approx-period {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin: 26px 0 12px;
}

.cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.event-summary {
  margin: 0 0 10px;
  font-size: 15px;
  color: #d8d8dd;
}

.event-link { font-size: 13px; }

/* ---- Century page ---- */

.highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.highlight-list a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
}

.highlight-list a:hover { border-color: var(--panel-border-strong); text-decoration: none; }

.hl-sample {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.year-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.year-grid a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
}

.year-grid a:hover { border-color: var(--panel-border-strong); text-decoration: none; }
.year-grid .n { font-size: 12px; color: var(--muted); }

/* ---- Navigation ---- */

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 44px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--panel-border);
  font-size: 15px;
  font-weight: 600;
}

.pager a { color: var(--text); }
.pager-next { text-align: right; }
.pager-up { color: var(--muted) !important; font-weight: 500; font-size: 14px; }

.pager span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.nearby h2 { font-size: 16px; margin: 32px 0 12px; }

.nearby ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
}

.nearby a:hover { border-color: var(--panel-border-strong); text-decoration: none; }
.nearby a span { color: var(--muted); font-size: 12px; }

@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .pager-up { grid-column: 1 / -1; order: 3; text-align: center; }
}
