:root {
  color-scheme: dark;
  color: #eef2f8;
  background: #0b1321;
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: #eef2f8;
  --muted: #b6c2d3;
  --accent: #c3deff;
  --surface: #121e30;
  --line: #2b3a51;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .23em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid #badbff; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 4.65rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); letter-spacing: -.025em; }
h3 { font-size: 1.2rem; line-height: 1.3; }
.wrap { width: min(1200px, calc(100% - 3.5rem)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; left: 1rem; top: -10rem; padding: .5rem 1rem; background: var(--surface); }
.skip:focus { top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; min-height: 2.75rem; color: var(--text); font-weight: 650; text-decoration: none; }
.star { flex: 0 0 1.75rem; color: #f0c797; text-align: center; font-size: 1.55rem; }
nav { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.7rem); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: .9375rem; text-decoration: none; white-space: nowrap; }
nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
nav .forum-link { color: var(--accent); border: 1px solid var(--line); border-radius: .4rem; padding-inline: .85rem; }

.hero {
  display: grid;
  align-items: end;
  min-height: clamp(24rem, 39vw, 32rem);
  margin-top: 2rem;
  padding: clamp(1.5rem, 5vw, 4.125rem);
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: linear-gradient(90deg, #0b1425 0%, #0b1425e8 28%, #0b142547 68%, #0b14251a),
    url("/assets/night-sky.webp") center / cover #141f33;
}
.hero-text p { max-width: 34rem; margin-top: 1.2rem; font-size: clamp(1rem, 2vw, 1.15rem); color: #d3deec; }
.hero h1 { font-size: clamp(2.6rem, 7.3vw, 5.65rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: .55rem 1rem; border: 1px solid #56718c; border-radius: .4rem;
  color: #eff5fd; background: #14233b; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background-color 160ms ease;
}
.button:hover { background: #263d5a; }
.button.primary { background: #c3deff; border-color: #c3deff; color: #0b1626; }
.button.primary:hover { background: #e5f1ff; }

.section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.section-head p, .page-head > p, .reading-body p, .article p { color: var(--muted); }
.section-head p { margin-top: .55rem; }
.text-link { display: inline-flex; align-items: center; min-height: 2rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; min-width: 0; padding: clamp(1.05rem, 2vw, 1.45rem);
  border: 1px solid var(--line); border-radius: .55rem; background: var(--surface);
}
.card-meta { color: #a9bfdc; font-size: .875rem; }
.card h3 { margin-top: .7rem; }
.card h3 a, .feature h2 a { color: var(--text); text-decoration: none; }
.card h3 a:hover, .feature h2 a:hover { color: var(--accent); text-decoration: underline; }
.card p { margin-top: .65rem; margin-bottom: 1rem; color: var(--muted); }
.card-address { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); color: #bccadd; font-size: .875rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem; }
.feature { border-top: 1px solid var(--line); padding-top: 1rem; }
.feature h2 { font-size: 1.5rem; }
.feature p { color: var(--muted); margin-top: .6rem; }
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-block: 1.4rem; color: var(--muted); font-size: .875rem;
}
.page-head { padding-top: clamp(2rem, 6vw, 4.5rem); margin-bottom: 2rem; }
.page-head > p { max-width: 51rem; margin-top: .85rem; font-size: clamp(1rem, 2vw, 1.12rem); }
.filter { display: flex; align-items: end; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
.filter label:first-child { flex: 1 1 15rem; max-width: 30rem; }
input, select { font: inherit; font-size: 1rem; color: var(--text); border: 1px solid #536984; border-radius: .4rem; min-height: 2.75rem; padding: .5rem .75rem; background: var(--surface); }
select { appearance: none; padding-right: 1.9rem; background: linear-gradient(45deg, transparent 50%, #b6c2d3 50%) right .9rem center / .35rem .35rem no-repeat, linear-gradient(135deg, #b6c2d3 50%, transparent 50%) right .55rem center / .35rem .35rem no-repeat, var(--surface); }
.filter .text-link { padding: .45rem .3rem; min-height: 2.75rem; }
.result-count { margin-bottom: .85rem; color: var(--muted); }
.empty { padding: 1.4rem; border: 1px solid var(--line); border-radius: .55rem; }
.empty p { margin-top: .5rem; color: var(--muted); }

.articles { display: grid; gap: 0; max-width: 58rem; }
.article { padding: 1.45rem 0; border-top: 1px solid var(--line); }
.article h2, .reading-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.article p { margin: .55rem 0 .45rem; }
.timeline .article { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 4.5fr); gap: 1rem; }
.period { color: #f0c797; font: 1.3rem/1.3 Georgia, serif; font-variant-numeric: tabular-nums; }
.reading { max-width: 54rem; padding-top: clamp(1.5rem, 5vw, 3.25rem); }
.reading .page-head { padding-top: 1.15rem; }
.reading .page-head .card-meta { margin: 0 0 .5rem; font-size: .875rem; }
.reading-body { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.reading-body section { margin-top: 2rem; }
.reading-body section p { margin-top: .55rem; }
.reading-body .location { color: var(--text); font-weight: 650; }
.sources { padding-left: 1.3rem; }
.sources li { padding-block: .2rem; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; justify-content: flex-start; gap: 0 1rem; padding-block: .45rem; }
  .cards, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 590px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { display: block; }
  nav { flex-wrap: wrap; gap: 0 .8rem; }
  nav a { min-height: 2.75rem; font-size: .875rem; }
  nav .forum-link { min-height: 2rem; padding-inline: .5rem; }
  .hero { min-height: 25rem; margin-top: 1rem; padding: 1.25rem; background-image: linear-gradient(90deg, #0b1425eb, #0b14258e), url("/assets/night-sky.webp"); background-position: 64% center; }
  .hero h1 { font-size: clamp(2.03rem, 9.3vw, 3.35rem); }
  .cards, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline .article { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
