/* hodgeconjecture.com
   One serif family, one accent, paper and ink. Tokens first; nothing inline. */

:root {
  --paper: #ecebe4;
  --paper-2: #e3e2da;
  --ink: #1e2328;
  --ink-2: #4b5157;
  --rule: #c9c8bf;
  --accent: #4a5d8a;
  --accent-ink: #2f3f66;
  --refuted: #8a4a4a;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --measure: 66ch;
  --wide: 60rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1c1f22;
    --paper-2: #23272b;
    --ink: #e4e1d8;
    --ink-2: #a7a59c;
    --rule: #3a3f45;
    --accent: #9aa9d1;
    --accent-ink: #c0cbe8;
    --refuted: #c98a8a;
  }
}
:root[data-theme="dark"] {
  --paper: #1c1f22;
  --paper-2: #23272b;
  --ink: #e4e1d8;
  --ink-2: #a7a59c;
  --rule: #3a3f45;
  --accent: #9aa9d1;
  --accent-ink: #c0cbe8;
  --refuted: #c98a8a;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: "onum", "pnum", "kern";
}
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 0.12em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
pre { overflow-x: auto; padding: 0.8rem 1rem; border: 1px solid var(--rule); background: var(--paper-2); line-height: 1.45; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 0.5rem; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-variation-settings: "opsz" 72; }
h2 { font-size: 1.5rem; margin-top: 2.6rem; }
h3 { font-size: 1.15rem; margin-top: 1.6rem; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
small, .small { font-size: 0.86rem; color: var(--ink-2); }
em { font-style: italic; }
sup, sub { line-height: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 0.5rem 1rem; }
.skip:focus { left: var(--gutter); z-index: 10; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.6rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.site-head .name { font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin-left: auto; }
.site-head nav a { color: var(--ink-2); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* Hero */
.hero { padding: 3.2rem 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding-top: 4rem; } }
.hero h1 { margin-bottom: 1rem; }
.verdict { font-size: 1.25rem; margin-bottom: 1.2rem; }
.verdict b { font-weight: 500; }
.lede { font-size: 1.05rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 1.4rem; }
.hero-actions a { font-size: 1rem; }

/* Hodge diamond, set in type */
.diamond { justify-self: center; text-align: center; line-height: 1; padding: 0.6rem 0 0; }
.diamond .row { display: flex; justify-content: center; gap: 1.3rem; margin: 0.42rem 0; }
.diamond .h { font-size: 1.05rem; color: var(--ink-2); font-variant-numeric: oldstyle-nums; min-width: 2.6ch; }
.diamond .h sup { font-size: 0.6em; color: inherit; }
.diamond .h.pp { color: var(--accent); border-bottom: 1px solid var(--accent); }
.diamond figcaption { margin-top: 1rem; font-size: 0.86rem; color: var(--ink-2); max-width: 30ch; margin-left: auto; margin-right: auto; line-height: 1.4; }

/* Counters: one sentence, numbers from the ledger */
.counts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0; margin: 2rem 0 0; font-size: 1.05rem; }
.counts .n { font-variation-settings: "opsz" 36; font-size: 1.25rem; }
.counts .as-of { display: block; }

/* Ladder */
.ladder { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--rule); }
.ladder li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0 0.8rem; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ladder .mark { font-size: 1rem; line-height: 1; position: relative; top: 0.1rem; }
.ladder .mark.checked { color: var(--accent); }
.ladder .mark.refuted { color: var(--refuted); }
.ladder .mark.open, .ladder .mark.stated, .ladder .mark.dead { color: var(--ink-2); }
.ladder .title { margin: 0; }
.ladder .meta { color: var(--ink-2); font-size: 0.86rem; margin: 0.15rem 0 0; }
.ladder .meta code { font-size: 0.9em; }
.ladder .note { margin: 0.3rem 0 0; font-size: 0.95rem; }
.legend { color: var(--ink-2); font-size: 0.86rem; margin-top: 0.8rem; }
.legend span { display: inline-block; white-space: nowrap; margin-right: 1.1rem; }
.legend .checked { color: var(--accent); }
.legend .refuted { color: var(--refuted); }

/* Record and people */
.two { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .two { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.record { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.record li { padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.record li:last-child { border-bottom: 1px solid var(--rule); }
.record .when { color: var(--ink-2); font-size: 0.86rem; }
.people { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
.people li { display: flex; align-items: center; gap: 0.5rem; }
.people img { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper-2); }
.people .count { color: var(--ink-2); font-size: 0.86rem; }
.quiet { color: var(--ink-2); }

/* Join */
.join { border: 1px solid var(--rule); background: var(--paper-2); padding: 1.3rem 1.4rem; margin-top: 1rem; }
.join p:first-child { margin-top: 0; }
.join pre { background: var(--paper); margin-bottom: 0.6rem; }
.join button { font: inherit; font-size: 0.92rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); padding: 0.3rem 0.8rem; cursor: pointer; }
.join button:hover { border-color: var(--ink-2); }

/* Prose pages */
.prose { padding: 2.8rem 0 1rem; }
.prose h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); margin-bottom: 1.2rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.5rem 0.8rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 500; border-bottom-color: var(--ink-2); }
.qa dt { font-weight: 500; margin-top: 1.4rem; }
.qa dd { margin: 0.3rem 0 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 1.4rem 0 2.4rem; color: var(--ink-2); font-size: 0.9rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.site-foot a { color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .join button { transition: border-color 120ms ease; }
}
