/* Spherical Chess — museum-print minimal.
   Ink on paper, one carmine accent, archival serif. */

:root {
  --paper: #f7f5f0;
  --ink: #1c1b18;
  --muted: #6f6a60;
  --hairline: #d9d4c9;
  --accent: #9e2b25;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191917;          /* charcoal gallery */
    --ink: #e7e4dc;
    --muted: #98938a;
    --hairline: #34322d;
    --accent: #d05c50;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  padding: 0 1.5rem;
}

::selection { background: var(--accent); color: var(--paper); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent); }

/* ---- hero ---- */

.hero {
  max-width: 60rem;
  margin: 0 auto;
  /* The sphere is the masthead — it opens the page on its own. */
  padding: 4.5rem 0 0;
  text-align: center;
}

#sphere {
  width: min(78vw, 26.5rem);
  height: auto;
  display: block;
  margin: 0 auto;
}

.placard {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  display: inline-block;
  max-width: 30rem;
}

.dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 auto 1.25rem;
}

h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.tombstone {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
}

.onview {
  margin-top: 1.4rem;
  font-size: 0.9375rem;
}

.play-link {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.play-link:hover {
  background: var(--accent);
  color: var(--paper);
}

.keynote {
  margin-top: 1.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- sections ---- */

main section {
  max-width: 33rem;
  margin: 0 auto;
  padding: 4.5rem 0 0;
}

h2 {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.6rem;
}

.numeral { color: var(--accent); margin-right: 0.35em; }

section p + p { margin-top: 1.05rem; }

.diagram {
  margin: 1.4rem 0;
  text-align: center;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.consequences {
  list-style: none;
  margin-top: 0.4rem;
}

.consequences li {
  padding: 0.85rem 0 0.85rem 1.4rem;
  position: relative;
}

.consequences li + li { border-top: 1px solid var(--hairline); }

.consequences li::before {
  content: "·";
  position: absolute;
  left: 0.15rem;
  color: var(--accent);
}

/* footnote references */

.fn {
  font-size: 0.66em;
  vertical-align: super;
  line-height: 0;
  text-decoration: none;
  color: var(--accent);
  margin-left: 0.1em;
}

/* ---- notes ---- */

.notes { font-size: 0.8438rem; color: var(--muted); }

.notes-head { border-bottom: none; padding-bottom: 0; margin-bottom: 1rem; }

.notes ol {
  list-style: none;
  counter-reset: note;
  border-top: 1px solid var(--hairline);
  padding-top: 1.2rem;
}

.notes li {
  counter-increment: note;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.7;
}

.notes li + li { margin-top: 0.7rem; }

.notes li::before {
  content: counter(note) ".";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.backref { text-decoration: none; color: var(--accent); margin-left: 0.25em; }

/* ---- footer ---- */

footer {
  max-width: 33rem;
  margin: 0 auto;
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.provenance {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.8;
}
.provenance a {
  color: inherit;
  text-decoration-color: var(--hairline);
}
.cta + .provenance { margin-top: 2rem; }

.cta {
  margin-top: 2.2rem;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}
