:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5d6d65;
  --paper: #f4f0e6;
  --surface: #fffdf7;
  --line: #cfd7cc;
  --moss: #315b4e;
  --moss-deep: #21473c;
  --gold: #c7903d;
  --focus: #8a4f14;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, rgba(199, 144, 61, 0.17), transparent 27rem),
    linear-gradient(180deg, #f6f2e9 0%, var(--paper) 52%, #ebe8dd 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: var(--moss-deep); text-underline-offset: 0.2em; }
a:hover { color: var(--focus); }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header,
footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-header { padding: 1.25rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand span { display: grid; line-height: 1.15; }
.brand small { color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
nav a { font-weight: 650; text-decoration: none; }

main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.intro { max-width: 900px; padding: clamp(4rem, 10vw, 8rem) 0 3.2rem; }
.eyebrow,
.result-language {
  margin: 0 0 0.7rem;
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 { margin: 0; }
h1,
h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.04; }
h1 { font-size: clamp(3.1rem, 8vw, 6.7rem); letter-spacing: -0.05em; }
h1 em { color: var(--moss); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.15rem; }
.lead { max-width: 790px; margin: 1.7rem 0; color: #34463f; font-size: clamp(1.05rem, 2vw, 1.3rem); }

.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem 1.25rem; }
.intro-links a { font-weight: 700; }
.intro-links .primary-link {
  padding: 0.72rem 1rem;
  color: #fff;
  background: var(--moss-deep);
  border-radius: 999px;
  text-decoration: none;
}

.load-status {
  margin: 0 0 2.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 253, 247, 0.7);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.load-status.verified { border-color: #98af9d; color: var(--moss-deep); }
.load-status.failed { border-color: #caa98d; color: #743f24; }
.proof[hidden] { display: none; }

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  overflow: hidden;
}

.proof-strip article { padding: 1.15rem; border-right: 1px solid var(--line); }
.proof-strip article:last-child { border-right: 0; }
.proof-strip strong { display: block; color: var(--moss-deep); font-size: 1.45rem; }
.proof-strip span { color: var(--muted); font-size: 0.86rem; }

.results-section,
.link-section,
.boundary-section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-heading { max-width: 740px; margin-bottom: 2rem; }
.section-heading > p:last-child { color: var(--muted); }
.result-grid,
.boundary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }

.result-card,
.boundary-grid article,
.link-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(23, 35, 31, 0.055);
}

.result-card blockquote {
  min-height: 8rem;
  margin: 1.15rem 0;
  padding: 1rem;
  border-left: 3px solid var(--gold);
  background: #f5f0e4;
  white-space: pre-wrap;
}

dl { display: grid; gap: 0.6rem; margin: 0 0 1.15rem; }
dl div { display: grid; grid-template-columns: 5rem 1fr; gap: 0.7rem; }
dt { color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; overflow-wrap: anywhere; }
.result-card > a { font-weight: 750; }

.link-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.link-section > div:first-child p:last-child { max-width: 680px; color: var(--muted); }
.link-card { display: grid; justify-items: center; gap: 0.55rem; text-align: center; }
.link-card strong { color: var(--moss-deep); font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; }
.link-card span { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.link-card code { padding: 0.55rem 0.75rem; border-radius: 0.45rem; background: #e9eee7; overflow-wrap: anywhere; }

.boundary-grid ul { margin: 1rem 0 0; padding-left: 1.2rem; }
.boundary-grid li + li { margin-top: 0.45rem; }

.fallback,
.noscript-note {
  margin: 0 0 2rem;
  padding: 1.3rem;
  border: 1px dashed #aeb8ae;
  border-radius: 0.9rem;
  background: rgba(255, 253, 247, 0.64);
}

.fallback h2 { font-size: 1.55rem; }
.fallback p { color: var(--muted); }
.fallback a { display: inline-block; margin-right: 1.25rem; font-weight: 700; }

footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
footer a { font-weight: 700; }

@media (max-width: 760px) {
  .site-header,
  footer { align-items: flex-start; flex-direction: column; }
  .intro { padding-top: 3rem; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip article:nth-child(2) { border-right: 0; }
  .proof-strip article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .result-grid,
  .boundary-grid,
  .link-section { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
