/* The Curated Sky — design system: "The Night Observatory"
   Dark, celestial, a little whimsical. Deep-space navy, starlight text,
   moon-gold accents, constellation lines, glowing verdict seals. */

:root {
  --night: #070b16;
  --night-2: #0b1122;
  --card: #101828;
  --card-2: #0d1425;
  --ink: #ece7d9;
  --ink-soft: #9aa3c0;
  --line: #263053;
  --gold: #d9b36c;
  --gold-soft: rgba(217, 179, 108, .14);
  --violet: #9a8cd0;
  --violet-deep: #2a2350;
  --star: #fff8e1;
  --doc: #5fc98a;
  --unres: #e0a34e;
  --cont: #e07b4e;
  --unsub: #8b93a8;
  --debunk: #e06c5f;
  --spec: #b49ae0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .45);
  --glow: 0 0 18px rgba(217, 179, 108, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  background:
    radial-gradient(1100px 500px at 85% -5%, rgba(154, 140, 208, .12), transparent 60%),
    radial-gradient(900px 480px at 8% 12%, rgba(64, 110, 180, .10), transparent 60%),
    radial-gradient(700px 700px at 50% 110%, rgba(217, 179, 108, .06), transparent 60%),
    var(--night);
  min-height: 100vh;
}

/* starfield — two layers of tiny stars */
body::before, body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 12% 22%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 68% 8%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 84% 34%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 32% 64%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 55% 48%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 22% 82%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 76% 72%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 44% 12%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 92% 58%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 6% 46%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 60% 90%, var(--star) 100%, transparent 0),
    radial-gradient(1px 1px at 28% 34%, var(--star) 100%, transparent 0);
  opacity: .8;
}
body::after {
  background-image:
    radial-gradient(2px 2px at 18% 68%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 72% 26%, var(--gold) 100%, transparent 0),
    radial-gradient(2px 2px at 48% 78%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 88% 12%, var(--star) 100%, transparent 0),
    radial-gradient(2px 2px at 36% 8%, var(--star) 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 8% 30%, var(--gold) 100%, transparent 0);
  opacity: .55;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .38; } to { opacity: .52; } }

main, header.site, footer.site { position: relative; z-index: 1; }

::selection { background: rgba(217, 179, 108, .35); color: #fff; }

h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; line-height: 1.2; margin: 0 0 .5em;
  color: var(--ink);
}
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--gold); }

/* ---------- header / nav ---------- */
header.site {
  background: rgba(7, 11, 22, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
.brand {
  font-family: Georgia, serif; font-size: 1.3rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
}
.brand::before { content: "☾ "; color: var(--gold); }
.brand small {
  display: block; font-family: ui-monospace, monospace; font-size: .62rem; font-weight: 400;
  letter-spacing: .22em; color: var(--ink-soft); margin-top: 2px;
}
nav.main { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a {
  color: var(--ink-soft); text-decoration: none; font-size: .86rem;
  padding: 7px 12px; border-radius: 999px; border: 1px solid transparent;
  transition: all .18s ease;
}
nav.main a:hover { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.03); }
nav.main a.active {
  color: var(--gold); border-color: rgba(217,179,108,.45);
  background: var(--gold-soft); box-shadow: var(--glow);
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 30px; text-align: center; position: relative; }
/* refined eclipse ring — an observatory instrument, not a cartoon moon */
.hero::before {
  content: ""; position: absolute; top: 30px; right: 7%;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid rgba(217, 179, 108, .55);
  box-shadow: 0 0 24px rgba(217, 179, 108, .18), inset 0 0 12px rgba(217, 179, 108, .08);
  opacity: .8;
}
.hero .kicker {
  font-family: ui-monospace, monospace; font-size: .72rem; letter-spacing: .28em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin-bottom: .3em;
  text-shadow: 0 0 40px rgba(217, 179, 108, .25);
}
.hero .thesis-line {
  font-family: Georgia, serif; font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-style: italic; color: var(--ink-soft); max-width: 640px; margin: 0 auto 8px;
}

/* stat strip — little constellation plaques */
.stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 30px 0 10px; }
.stat {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 24px; min-width: 140px; box-shadow: var(--shadow); text-align: center;
  position: relative;
}
.stat::before {
  content: "✦"; position: absolute; top: 6px; right: 10px;
  color: var(--gold); font-size: .7rem; opacity: .7;
}
.stat .num { font-family: Georgia, serif; font-size: 2.1rem; font-weight: 700; color: var(--gold); }
.stat .lbl { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- sections ---------- */
section.block { margin: 48px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.section-head h2::before { content: "✦ "; color: var(--gold); font-size: .72em; vertical-align: .12em; }
.section-head .sub { color: var(--ink-soft); font-size: .92rem; }

/* observation-log panels */
.folder {
  background: linear-gradient(165deg, rgba(16, 24, 40, .92), rgba(11, 17, 34, .92));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; position: relative; margin-top: 14px;
}
.folder::before {
  content: attr(data-tab); position: absolute; top: -13px; left: 18px;
  background: var(--night); color: var(--gold);
  font-family: ui-monospace, monospace; font-size: .66rem; letter-spacing: .2em;
  padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(217,179,108,.5);
  box-shadow: var(--glow); white-space: nowrap;
}

/* ---------- tier chips & verdict seals ---------- */
.tier {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1.5px solid currentColor;
  background: rgba(0,0,0,.35); white-space: nowrap;
}
.tier .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.t-DOCUMENTED, .t-CORROBORATED { color: var(--doc); }
.t-UNRESOLVED { color: var(--unres); }
.t-CONTESTED { color: var(--cont); }
.t-UNSUBSTANTIATED, .t-UNVERIFIABLE { color: var(--unsub); }
.t-DEBUNKED { color: var(--debunk); }
.t-SPECULATIVE { color: var(--spec); }
.tier[class*="UNVERIFIED"], .tier[class*="UNCORROBORATED"],
.stamp[class*="UNVERIFIED"], .stamp[class*="UNCORROBORATED"] { color: var(--unsub); }

/* verdict as a wax-seal stamp */
.stamp {
  display: inline-block; font-family: ui-monospace, monospace; font-weight: 700;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  border: 2px solid currentColor; border-radius: 999px; padding: 6px 14px;
  transform: rotate(-2deg); background: rgba(0,0,0,.4); white-space: nowrap;
  box-shadow: 0 0 14px rgba(0,0,0,.5), inset 0 0 10px rgba(255,255,255,.04);
}

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: linear-gradient(165deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px); border-color: rgba(217,179,108,.45);
  box-shadow: var(--shadow), var(--glow);
}
.card h3 { font-size: 1.08rem; margin: 0; }
.card .meta { font-size: .78rem; color: var(--ink-soft); font-family: ui-monospace, monospace; }
.card .cite {
  font-size: .76rem; color: var(--ink-soft);
  border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto;
}
.card .cite a { color: var(--gold); }

.new-flag {
  display: inline-block; background: var(--violet-deep); color: #d9cfff; font-size: .64rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(154,140,208,.5);
  transform: rotate(-1.5deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--gold); color: #14100a; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem; border: none; cursor: pointer;
  box-shadow: var(--glow); transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold); border: 1.5px solid rgba(217,179,108,.55); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: .8rem; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.chip {
  border: 1.5px solid var(--line); background: rgba(255,255,255,.03); color: var(--ink);
  border-radius: 999px; padding: 6px 14px; font-size: .82rem; cursor: pointer; font-weight: 600;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.on { background: var(--gold); color: #14100a; border-color: var(--gold); box-shadow: var(--glow); }
.chip .n { opacity: .65; font-weight: 400; }
input.search, select.pick {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px;
  font-size: .9rem; background: rgba(0,0,0,.35); color: var(--ink); min-width: 220px;
}
input.search::placeholder { color: var(--ink-soft); }
input.search:focus, select.pick:focus { outline: none; border-color: var(--gold); box-shadow: var(--glow); }
select.pick option { background: var(--night-2); color: var(--ink); }

/* ---------- feed ---------- */
.feed-item {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.feed-item:last-child { border-bottom: none; }
.feed-date { font-family: ui-monospace, monospace; font-size: .74rem; color: var(--gold); padding-top: 3px; }
.feed-tag {
  display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(217,179,108,.35);
  border-radius: 999px; padding: 2px 8px; margin-bottom: 4px;
}
.feed-item h4 { margin: 0 0 4px; font-size: 1rem; }
.feed-item p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.feed-item a.more { font-size: .82rem; color: var(--gold); font-weight: 600; }

/* ---------- verdict bars ---------- */
.vbar { margin: 10px 0; }
.vbar .row { display: flex; align-items: center; gap: 12px; margin: 8px 0; cursor: pointer; }
.vbar .lab { width: 150px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.vbar .track { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 999px; height: 22px; overflow: hidden; }
.vbar .fill { height: 100%; border-radius: 999px; transition: width .6s ease; box-shadow: 0 0 12px rgba(0,0,0,.4); }
.vbar .cnt { font-family: ui-monospace, monospace; font-size: .8rem; width: 40px; text-align: right; color: var(--ink-soft); }

/* ---------- timeline — a constellation trail ---------- */
.tl { position: relative; margin: 20px 0 0 8px; padding-left: 28px; }
.tl::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.tl-era {
  font-family: Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--gold);
  margin: 26px 0 8px -28px; padding-left: 28px; position: relative;
}
.tl-era::before {
  content: ""; position: absolute; left: 1px; top: 11px; width: 16px; height: 16px;
  border-radius: 50%; background: radial-gradient(circle, #fff8e1 30%, var(--gold) 70%);
  box-shadow: 0 0 12px var(--gold); border: none;
}
.tl-event {
  background: linear-gradient(165deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 12px; box-shadow: var(--shadow); position: relative;
}
.tl-event::before {
  content: ""; position: absolute; left: -24px; top: 21px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--night);
  border: 2px solid var(--ink-soft); box-shadow: 0 0 8px rgba(154,163,192,.6);
}
.tl-event .d { font-family: ui-monospace, monospace; font-size: .74rem; color: var(--gold); font-weight: 700; }
.tl-event h4 { margin: 4px 0 6px; font-size: 1rem; font-family: inherit; font-weight: 600; }
.tl-event .sig { font-size: .86rem; color: var(--ink-soft); }
.tl-event details { margin-top: 8px; font-size: .8rem; color: var(--ink-soft); }
.tl-event summary { cursor: pointer; color: var(--gold); font-weight: 600; }

/* ---------- spotlight — a nebula panel ---------- */
.spotlight {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  background:
    radial-gradient(500px 220px at 80% 20%, rgba(154, 140, 208, .22), transparent 65%),
    radial-gradient(400px 200px at 10% 90%, rgba(217, 179, 108, .10), transparent 60%),
    linear-gradient(160deg, #141b36, #0b1122);
  border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow);
}
.spotlight h3 { color: var(--ink); font-size: 1.4rem; }
.spotlight .finding { color: #cfc6a8; font-style: italic; font-family: Georgia, serif; }
.spotlight .btn { background: var(--gold); color: #14100a; }

/* ---------- explore cards ---------- */
.explore { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.explore a {
  background: linear-gradient(165deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.explore a:hover { transform: translateY(-3px); border-color: rgba(217,179,108,.5); box-shadow: var(--shadow), var(--glow); }
.explore .ico {
  font-size: 1.9rem; color: var(--gold); line-height: 1;
  text-shadow: 0 0 14px rgba(217, 179, 108, .45);
}
.explore h4 { margin: 8px 0 4px; font-size: 1rem; }
.explore p { margin: 0; font-size: .82rem; color: var(--ink-soft); }

/* ---------- changelog ---------- */
.log { font-size: .88rem; }
.log li { margin: 6px 0; }
.log .d { font-family: ui-monospace, monospace; color: var(--gold); font-size: .76rem; margin-right: 8px; }

/* ---------- footer ---------- */
footer.site {
  background: rgba(4, 6, 12, .9); color: var(--ink-soft); margin-top: 60px; padding: 36px 0;
  font-size: .85rem; border-top: 1px solid var(--line);
}
footer.site a { color: var(--gold); }
footer.site .rule { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: .78rem; }

/* ---------- thesis page ---------- */
.thesis-lede { font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.7; color: var(--ink); }
.lens { border-left: 3px solid var(--gold); padding: 6px 0 6px 20px; margin: 26px 0; }
.lens h3 { font-size: 1.25rem; }
.lens .caveat {
  background: rgba(154, 140, 208, .08); border: 1px dashed var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: .85rem; color: var(--ink-soft); margin-top: 10px;
}
.lens .caveat strong { color: var(--ink); }

.empty { text-align: center; color: var(--ink-soft); padding: 40px; font-style: italic; }
.count-line { font-size: .82rem; color: var(--ink-soft); font-family: ui-monospace, monospace; }

/* calm the sky for reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

@media (max-width: 640px) {
  .spotlight { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 1fr; }
  .vbar .lab { width: 110px; }
  .hero::before { right: 2%; width: 40px; height: 40px; }
}
