:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --paper: #f5f2ea;
  --paper-deep: #e8e3d8;
  --surface: #fffdf8;
  --line: #d8d1c3;
  --teal: #0d766e;
  --teal-dark: #075b55;
  --coral: #b84a32;
  --gold: #d99b35;
  --blue: #2f6f9f;
  --shadow: 0 20px 55px rgba(16, 42, 67, 0.11);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 42, 67, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 67, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; }
button, input, select { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(245, 242, 234, 0.91);
  border-bottom: 1px solid rgba(16, 42, 67, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 33px;
  aspect-ratio: 1;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
}

.brand-mark::before {
  position: absolute;
  width: 6px;
  aspect-ratio: 1;
  background: var(--coral);
  border-radius: 50%;
  content: "";
}

.brand-mark span {
  position: absolute;
  width: 1px;
  height: 14px;
  background: var(--teal);
  transform-origin: 50% 100%;
}

.brand-mark span:nth-child(1) { transform: translateY(-7px); }
.brand-mark span:nth-child(2) { transform: rotate(120deg) translateY(-7px); }
.brand-mark span:nth-child(3) { transform: rotate(240deg) translateY(-7px); }
.brand-mark.mini { width: 26px; }

nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: center;
}

nav a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover, nav a:focus-visible { color: var(--teal); }
main { overflow: clip; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 7vw;
  align-items: center;
  min-height: 630px;
  padding: clamp(5rem, 10vw, 9rem) 7vw;
}

.hero-glow {
  position: absolute;
  top: -30%;
  left: -15%;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(13, 118, 110, 0.15), transparent 68%);
  pointer-events: none;
}

.hero-copy, .principles { position: relative; }

.kicker, .eyebrow {
  margin: 0 0 0.9rem;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin-bottom: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.7rem, 8vw, 7.8rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

h1 span {
  display: block;
  color: var(--coral);
  font-style: italic;
}

.hero-intro {
  max-width: 620px;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 750;
}

.hero-detail {
  max-width: 680px;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.button {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  color: white;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover { background: var(--teal-dark); transform: translateY(-1px); }

.button:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #102a43;
}

.button.secondary { color: var(--teal-dark); background: transparent; }

.principles {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--ink);
  color: white;
  border-radius: 2px 38px 2px 38px;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.principles .eyebrow { color: #71d1c8; }

.principles h2 {
  margin-bottom: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.principles ul {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  color: #d9e2ec;
  font-size: 0.92rem;
}

.principles li span {
  color: #f8c471;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 5vw;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stats div { display: grid; gap: 0.25rem; padding: 1.7rem 2rem; }
.stats div + div { border-left: 1px solid var(--line); }

.stats strong {
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
}

.stats span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tracker, .source-directory { padding: clamp(5rem, 8vw, 8rem) 5vw; }

.section-heading {
  display: flex;
  gap: 3rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.section-heading > p { max-width: 610px; margin: 0; color: var(--ink-soft); }

.freshness {
  max-width: 630px;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
  font-size: 0.82rem;
}

.scan-health {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: #eef5f3;
  border: 1px solid #b9d7d2;
  border-radius: 10px;
}

.scan-health p,
.scan-health ul {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.scan-health ul {
  columns: 2;
  padding-left: 1.2rem;
}

.filters {
  padding: clamp(1rem, 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(16, 42, 67, 0.07);
}

.filters label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-field { position: relative; margin-bottom: 1rem; }

.search-field > span {
  position: absolute;
  bottom: 0.65rem;
  left: 1rem;
  color: var(--teal);
  font-size: 1.4rem;
}

input, select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  color: var(--ink);
  background: white;
  border: 1px solid #b8c2cc;
  border-radius: 9px;
}

input[type="search"] { min-height: 54px; padding-left: 3rem; font-size: 1.02rem; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 0.8rem;
}

.clear-button {
  margin-top: 1rem;
  padding: 0;
  color: var(--teal-dark);
  background: transparent;
  border: 0;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.results-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  margin-top: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.results-bar p { margin: 0; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 0.35rem; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.verified { background: var(--teal); }
.legend-dot.announced { background: var(--blue); }
.legend-dot.projected { background: var(--gold); }

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 4px 4px var(--radius) var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.event-card:hover {
  border-color: #9caea9;
  box-shadow: 0 16px 36px rgba(16, 42, 67, 0.09);
  transform: translateY(-2px);
}

.event-card[data-status="urgent"] { border-top-color: var(--coral); }
.event-card[data-status="archived"] { border-top-color: #9aa5b1; }
.event-card[data-status="unannounced"] { border-top-color: var(--gold); }

.card-topline, .card-heading, .deadline-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.status-pill, .confidence, .chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.status-pill {
  padding: 0.3rem 0.55rem;
  color: var(--teal-dark);
  background: #d9f0ec;
}

.status-urgent { color: #8b321e; background: #fee3da; }
.status-archived { color: #52616f; background: #e9ecef; }
.status-unannounced { color: #714b0b; background: #fbeacb; }

.confidence {
  position: relative;
  padding-left: 0.8rem;
  color: var(--ink-soft);
  text-transform: capitalize;
}

.confidence::before {
  position: absolute;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  content: "";
}

.confidence-announced::before { background: var(--blue); }
.confidence-projected::before { background: var(--gold); }
.card-heading { margin-top: 1.2rem; }

.card-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.card-heading .eyebrow { margin-bottom: 0.25rem; font-size: 0.64rem; }

.organization { margin: 0.55rem 0 1.1rem; color: var(--ink-soft); font-size: 0.82rem; }

.deadline-block {
  align-items: center;
  margin: 0 -0.45rem;
  padding: 0.85rem;
  background: #f1eee6;
  border-radius: 10px;
}

.deadline-block > div { display: grid; gap: 0.08rem; }
.deadline-kind, .deadline-block small { color: var(--ink-soft); font-size: 0.68rem; }
.deadline-block strong { font-size: 1rem; }
.countdown { flex: 0 0 auto; color: var(--teal-dark); font-size: 0.78rem; font-weight: 850; }

.event-facts {
  display: grid;
  gap: 0.42rem;
  margin: 1rem 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  list-style: none;
}

.event-facts li { display: grid; grid-template-columns: 1.2rem 1fr; gap: 0.2rem; }
.event-facts li span { color: var(--teal); }
.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }

.chip {
  padding: 0.22rem 0.5rem;
  color: #334e68;
  background: #e9eff3;
}

details {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

summary { color: var(--teal-dark); font-weight: 800; cursor: pointer; }

.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.9rem 0;
}

.date-grid div { min-width: 0; }
.date-grid dt { color: var(--ink-soft); font-size: 0.66rem; text-transform: uppercase; }
.date-grid dd { margin: 0; font-weight: 700; }
.provenance, .notes, .muted { color: var(--ink-soft); }
.notes { max-height: 8rem; overflow: auto; }

.source-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.loading-state, .empty-state, .error-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 3rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #9fb3c8;
  border-radius: var(--radius);
}

.loading-state p, .empty-state p, .error-state p { color: var(--ink-soft); }
.empty-state > span { color: var(--coral); font-family: Georgia, serif; font-size: 4rem; }

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--paper-deep);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }
.load-more { margin: 2rem auto 0; }
.load-more:not([hidden]) { display: flex; }

.source-directory { color: white; background: var(--ink); }
.source-directory .kicker { color: #71d1c8; }
.source-directory .section-heading > p { color: #bcccdc; }

.source-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #486581;
  border-left: 1px solid #486581;
}

.source-links a {
  display: grid;
  gap: 0.5rem;
  min-height: 130px;
  padding: 1.25rem;
  border-right: 1px solid #486581;
  border-bottom: 1px solid #486581;
  text-decoration: none;
  transition: background 150ms ease;
}

.source-links a:hover { background: #183d5d; }
.source-links strong { font-family: Georgia, serif; font-size: 1.25rem; }
.source-links span { align-self: end; color: #9fb3c8; font-size: 0.78rem; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 5vw;
  background: #091f33;
  color: #d9e2ec;
}

footer p { margin: 0.5rem 0 0; color: #9fb3c8; font-size: 0.78rem; }
.footer-brand { color: white; }
footer > a { color: #71d1c8; font-size: 0.85rem; }

noscript {
  display: block;
  padding: 1rem;
  color: white;
  background: #8b321e;
  text-align: center;
}

@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .site-header { min-height: 62px; }
  nav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 5rem 5vw; }
  .principles { transform: none; }
  .stats { grid-template-columns: repeat(2, 1fr); margin: 0; border-right: 0; border-left: 0; }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section-heading { display: grid; gap: 1.25rem; }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(3.25rem, 18vw, 5rem); }
  .hero { padding-top: 4rem; }
  .filter-grid, .results, .source-links { grid-template-columns: 1fr; }
  .scan-health ul { columns: 1; }
  .results-bar { align-items: flex-start; flex-direction: column; padding: 0.7rem 0; }
  .stats div { padding: 1.2rem; }
  .event-card { padding: 1.1rem; }
  footer { align-items: flex-start; flex-direction: column; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* The archived count in the result summary: a control, worded as prose. */
.link-button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.link-button:hover { color: var(--coral); }
.link-button:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* A record forwarded from an archived cycle to the next one. */
.forwarded-note {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid #9aa5b1;
  background: #f3f5f7;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.forwarded-note strong { color: var(--ink); }
