:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66706c;
  --paper: #f3f1ea;
  --surface: #fffefa;
  --line: #d9d7ce;
  --green: #174f43;
  --green-soft: #dce9e2;
  --amber: #b26021;
  --amber-soft: #f8e9d5;
  --red: #ad372b;
  --red-soft: #f5ded9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 79, 67, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 79, 67, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}

.site-header,
main {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 32, 29, 0.18);
}

.wordmark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

.prototype-label,
.historical-badge span,
.evidence-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.7);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

main { padding: 72px 0 96px; }

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.community-uk,
.indicator-uk {
  margin-bottom: 0;
  color: var(--muted);
}

.historical-badge {
  flex: 0 0 220px;
  padding: 18px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
}

.historical-badge span {
  min-height: 0;
  margin-bottom: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
}

.historical-badge strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.25;
}

.assessment-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.result-card,
.freshness-card,
.evidence-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(31, 39, 36, 0.05);
}

.result-card { padding: clamp(24px, 5vw, 48px); }

.indicator-heading {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
}

.indicator-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.indicator-heading h2,
.section-heading h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 48px 0 42px;
}

.score {
  display: flex;
  align-items: baseline;
  min-width: 168px;
  font-family: Georgia, "Times New Roman", serif;
}

.score strong {
  color: var(--red);
  font-size: 6.2rem;
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.75;
}

.score span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 1.25rem;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 11px;
}

.result-status small,
.result-status strong { display: block; }
.result-status small { margin-bottom: 3px; color: var(--muted); }

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px var(--red-soft);
}

.threshold-track {
  position: relative;
  height: 8px;
  margin-bottom: 17px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--green) 50% 100%);
}

.threshold-marker {
  position: absolute;
  top: -5px;
  left: 0;
  width: 18px;
  height: 18px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.threshold-minimum {
  position: absolute;
  right: 50%;
  bottom: 14px;
  transform: translateX(50%);
  color: var(--muted);
  font-size: 0.72rem;
}

.threshold p { margin-bottom: 0; color: var(--muted); font-size: 0.88rem; }

.freshness-card {
  padding: 30px;
  border-top: 4px solid var(--amber);
}

.unknown-mark {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 34px 0 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
}

.freshness-card h2 {
  margin-bottom: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.freshness-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }

.metadata-list,
.evidence-meta { margin: 27px 0 0; }

.metadata-list div,
.evidence-meta div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

dt { color: var(--muted); font-size: 0.8rem; }
dd { margin: 0; font-size: 0.84rem; font-weight: 700; text-align: right; }

.evidence-section { margin-top: 72px; }

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

.section-heading h2 { margin-bottom: 0; font-size: 2.7rem; }

.evidence-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
}

.evidence-index {
  padding-top: 34px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

.evidence-body { padding: clamp(28px, 5vw, 48px); }

.evidence-type {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-body h3 {
  margin-bottom: 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.evidence-meta a { color: var(--green); }
.loading { color: var(--muted); }
.error { padding: 24px; border: 1px solid var(--red); background: var(--red-soft); }

@media (max-width: 760px) {
  .site-header,
  main { width: min(100% - 28px, 1120px); }
  main { padding-top: 44px; }
  .hero { align-items: start; flex-direction: column; }
  .historical-badge { width: 100%; flex-basis: auto; }
  .assessment-grid { grid-template-columns: 1fr; }
  .score-row { align-items: start; flex-direction: column; }
  .section-heading { align-items: start; flex-direction: column; }
  .evidence-card { grid-template-columns: 48px minmax(0, 1fr); }
  .evidence-index { font-size: 0.75rem; }
  .metadata-list div,
  .evidence-meta div { align-items: start; flex-direction: column; gap: 4px; }
  dd { text-align: left; }
}
