/* Life Free, Don't Join — calm civic editorial, entirely in grey.
   No JavaScript anywhere on this site; everything below is CSS. */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- the greys ---------- */
:root {
  --paper: #f5f4f1;      /* surface */
  --paper-2: #edece8;    /* raised surface */
  --ink: #1c1b19;        /* primary text */
  --ink-2: #55544f;      /* secondary text */
  --ink-3: #8b8a84;      /* muted text / soft marks */
  --hair: #dddcd7;       /* hairlines */
  --hair-2: #cfceca;     /* slightly stronger hairline */
  --serif: "Newsreader", "Charter", "Iowan Old Style", "Georgia", serif;
  --measure: 43rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161615;
    --paper-2: #1e1e1c;
    --ink: #ecebe7;
    --ink-2: #b5b4ae;
    --ink-3: #82817c;
    --hair: #2a2a28;
    --hair-2: #343432;
  }
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.05rem, 0.97rem + 0.35vw, 1.17rem);
  line-height: 1.72;
  font-weight: 380;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- skip link & progress ---------- */
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .5rem 1rem; z-index: 10; font-size: .9rem;
}
.skip:focus { left: 0; }

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--ink); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 5;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--hair); }
.site-head-inner {
  max-width: 72rem; margin: 0 auto; padding: 1.1rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; align-items: baseline;
}
.wordmark {
  font-weight: 560; font-size: 1.02rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-head nav { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; margin-left: auto; }
.site-head nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 460;
  padding: .15rem 0; border-bottom: 1px solid transparent;
}
.site-head nav a:hover { color: var(--ink); }
.site-head nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- main column ---------- */
main { flex: 1; width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem 4rem; }

/* ---------- masthead ---------- */
.masthead { padding: clamp(3.5rem, 9vw, 6.5rem) 0 1rem; text-align: center; }
.mast-kicker {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 460; margin-bottom: 1.6rem;
}
.mast-title {
  font-size: clamp(2.7rem, 9vw, 4.9rem); line-height: 1.04;
  font-weight: 420; letter-spacing: -0.015em;
}
.mast-title em { font-style: italic; font-weight: 480; }
.mast-tagline { margin-top: 1.5rem; font-size: 1.22rem; color: var(--ink-2); }
.mast-tagline em { color: var(--ink); }

/* ---------- page head ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 0; }
.kicker {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 460; margin-bottom: .8rem;
}
.page-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.1rem); font-weight: 440; line-height: 1.12; letter-spacing: -0.012em; }
.page-meta { margin-top: .7rem; font-size: .85rem; color: var(--ink-3); font-style: italic; }

/* ---------- prose ---------- */
.prose { padding-top: 1.2rem; }
.prose p { margin: 0 0 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose em { font-style: italic; }
.prose strong { font-weight: 580; }
.prose h2 {
  font-size: 1.65rem; font-weight: 480; line-height: 1.25; letter-spacing: -0.008em;
  margin: 2.8rem 0 1rem; padding-top: 2.2rem; border-top: 1px solid var(--hair);
}
.prose h3 { font-size: 1.25rem; font-weight: 540; margin: 2.1rem 0 .8rem; }
.prose blockquote:not(.epigraph) {
  margin: 1.6rem 0; padding-left: 1.4rem; border-left: 2px solid var(--hair-2);
  color: var(--ink-2); font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2.6rem auto; width: 38%; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.4rem; }
.prose li { margin-bottom: .45rem; }

.lede {
  font-size: 1.28rem; line-height: 1.6; color: var(--ink-2);
  font-weight: 380; margin: 1.4rem 0 2.2rem !important;
}
.lede a { color: inherit; }

/* home */
.home .lede { text-align: left; }
.home h2 { text-align: center; border-top: 0; }
.home h2::before {
  content: ""; display: block; width: 38%; margin: 0 auto 2.2rem;
  border-top: 1px solid var(--hair);
}

/* ---------- epigraph ---------- */
.epigraph {
  margin: 3.2rem auto 3.6rem; max-width: 34rem; text-align: center;
}
.epigraph p { font-size: 1.3rem; line-height: 1.55; font-style: italic; color: var(--ink); }
.epigraph footer { margin-top: 1rem; font-size: .85rem; color: var(--ink-3); font-style: normal; }

/* ---------- articles (tenets) ---------- */
.tenet { margin: 2.6rem 0; padding-top: 2.2rem; border-top: 1px solid var(--hair); }
.tenet:first-of-type { border-top: 0; padding-top: .6rem; }
.tenet header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: .8rem; }
.tenet-n {
  font-size: .95rem; color: var(--ink-3); font-weight: 460;
  letter-spacing: .08em; min-width: 2.2rem;
}
.tenet h3 { font-size: 1.42rem; font-weight: 520; line-height: 1.3; letter-spacing: -0.006em; }
.tenet-body { color: var(--ink); }
.tenet-body p { margin-bottom: 1.1rem; }
.tenet-body p:last-child { margin-bottom: 0; }

/* ---------- signature dots ---------- */
.sig { display: flex; justify-content: center; gap: .7rem; padding: 2.6rem 0 0; }
.end-sig { padding: 3rem 0 1rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.d1 { background: var(--ink); }
.d2 { background: var(--ink-3); }
.d3 { background: var(--hair-2); }

/* ---------- footnotes ---------- */
.footnotes { margin-top: 3rem; font-size: .88rem; color: var(--ink-2); }
.footnotes hr { width: 38%; margin: 2.4rem auto; }
.footnotes ol { margin-left: 1.2rem; }
.footnotes li { margin-bottom: .6rem; line-height: 1.55; }
a[href^="#fn:"] { text-decoration: none; font-size: .72em; vertical-align: super; line-height: 0; padding: 0 .1em; color: var(--ink-2); font-weight: 560; }
a.footnote-backref { text-decoration: none; }

/* ---------- next link ---------- */
.next { margin-top: 3.5rem; border-top: 1px solid var(--hair); padding-top: 1.6rem; text-align: right; }
.next a { text-decoration: none; color: var(--ink); display: inline-block; }
.next-label {
  display: block; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .3rem;
}
.next-title { font-size: 1.25rem; font-weight: 500; font-style: italic; }
.next a:hover .next-title { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }
.next-title::after { content: " →"; font-style: normal; color: var(--ink-3); }

/* ---------- essay list ---------- */
.essay-list { margin-top: 1rem; }
.essay-card {
  display: block; text-decoration: none; color: inherit;
  padding: 1.6rem 0; border-top: 1px solid var(--hair);
}
.essay-card h2 { font-size: 1.45rem; font-weight: 500; margin-bottom: .45rem; letter-spacing: -0.006em; }
.essay-card p { color: var(--ink-2); font-size: .98rem; line-height: 1.6; }
.essay-card .essay-meta { margin-top: .5rem; font-size: .82rem; color: var(--ink-3); font-style: italic; }
.essay-card:hover h2 { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }

/* ---------- lexicon entries ---------- */
.entry { margin: 2.4rem 0; padding-top: 2rem; border-top: 1px solid var(--hair); }
.entry:first-of-type { border-top: 0; }
.entry-term { font-size: 1.35rem; font-weight: 560; letter-spacing: .005em; }
.entry-pos { font-size: .9rem; font-weight: 380; font-style: italic; color: var(--ink-3); margin-left: .25rem; }
.entry-body { margin-top: .6rem; }

/* ---------- field guide species ---------- */
.species { margin: 2.6rem 0; padding: 1.8rem 0 0; border-top: 1px solid var(--hair); }
.species header { margin-bottom: .8rem; }
.species-n {
  font-size: .8rem; letter-spacing: .18em; color: var(--ink-3);
  font-weight: 460;
}
.species-n::before { content: "No. "; }
.species h2 { font-size: 1.5rem; font-weight: 520; margin: .2rem 0 .2rem; }
.species-habitat { font-size: .88rem; font-style: italic; color: var(--ink-3); }

/* ---------- questions in grey ---------- */
.gq { margin: 2.5rem 0; padding-top: 2rem; border-top: 1px solid var(--hair); }
.gq h2 { font-size: 1.32rem; font-weight: 540; margin-bottom: .7rem; }
.gq-n { color: var(--ink-3); font-weight: 440; margin-right: .3rem; }
.gq-body { color: var(--ink); }

/* ---------- charts ---------- */
.chart { margin: 2.6rem 0 3rem; }
.chart figcaption { margin-bottom: 1rem; }
.chart figcaption strong { display: block; font-size: 1.12rem; font-weight: 560; }
.chart figcaption > span { display: block; font-size: .85rem; color: var(--ink-3); margin-top: .25rem; }
.chart-legend { display: flex; gap: 1.7rem; flex-wrap: wrap; margin-top: .55rem !important; }
.key { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--ink-2); }
.key-line { width: 22px; height: 0; border-top: 2.5px solid; display: inline-block; }
.k-ind { border-color: var(--ink); }
.k-dem { border-color: var(--ink-2); }
.k-rep { border-color: var(--ink-3); }
.key-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.k-then { border: 2px solid var(--ink-3); background: transparent; }
.k-now { background: var(--ink); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--hair); stroke-width: 1; }
.chart .axis { stroke: var(--hair-2); stroke-width: 1; }
.chart .tick text, .chart .val, .chart .dlab text, .chart .row-lab {
  font-family: var(--serif); fill: var(--ink-3); font-size: 13px;
}
.chart .row-lab { fill: var(--ink-2); font-size: 14px; }
.chart .row-lab .lab-mut { fill: var(--ink-3); font-size: 12.5px; font-style: italic; }
.chart .s-ind { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .s-dem { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .s-rep { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt circle { stroke: var(--paper); stroke-width: 2; }
.chart .p-ind circle { fill: var(--ink); }
.chart .p-dem circle { fill: var(--ink-2); }
.chart .p-rep circle { fill: var(--ink-3); }
.chart .dlab .lab-ind { fill: var(--ink); font-weight: 560; }
.chart .dlab .lab-mut { fill: var(--ink-2); }
.chart .dlab .lab-val { font-weight: 620; }
.chart .db { stroke: var(--hair-2); stroke-width: 2.5; }
.chart .then { fill: var(--paper); stroke: var(--ink-3); stroke-width: 2; }
.chart .now { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.chart .val { fill: var(--ink-2); font-size: 13.5px; }
.chart .now-val { fill: var(--ink); font-weight: 600; }

.chart-table { margin-top: .6rem; font-size: .88rem; }
.chart-table summary { cursor: pointer; color: var(--ink-3); font-style: italic; }
.chart-table summary:hover { color: var(--ink); }
.chart-table table { border-collapse: collapse; margin-top: .8rem; width: 100%; }
.chart-table caption { text-align: left; color: var(--ink-3); font-size: .82rem; margin-bottom: .4rem; }
.chart-table th, .chart-table td { text-align: left; padding: .35rem .8rem .35rem 0; border-bottom: 1px solid var(--hair); font-weight: 400; }
.chart-table thead th { font-weight: 560; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.chart-table td { font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--hair); margin-top: 2rem;
  padding: 2.6rem 1.25rem 3.2rem; text-align: center;
}
.site-foot .sig { padding: 0 0 1.4rem; }
.foot-tag { font-style: italic; color: var(--ink-2); margin-bottom: 1.4rem; }
.foot-nav { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: 1.4rem; }
.foot-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; font-weight: 460;
}
.foot-nav a:hover { color: var(--ink); }
.foot-note { font-size: .84rem; color: var(--ink-3); margin-bottom: .4rem; }
.foot-note a { color: var(--ink-2); text-decoration: none; }
.foot-note a:hover { text-decoration: underline; }

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }

/* ---------- 404 ---------- */
.notfound .page-head h1 { font-size: clamp(4rem, 14vw, 7rem); color: var(--ink-3); font-weight: 300; }

/* ---------- print ---------- */
@media print {
  :root {
    --paper: #ffffff; --paper-2: #ffffff; --ink: #000000;
    --ink-2: #333330; --ink-3: #666660; --hair: #ccccc7; --hair-2: #bbbbb6;
  }
  .site-head nav, .progress, .skip, .next, .foot-nav { display: none !important; }
  body { font-size: 11pt; }
  main { max-width: 100%; padding: 0; }
  .prose a { text-decoration: none; }
  .chart-table[open] summary { display: none; }
  .chart-table { display: block; }
  .site-foot { border-top: 1px solid var(--hair); }
  .tenet, .species, .gq, .entry { break-inside: avoid; }
}

/* component h2s do not take the prose section rule */
.prose .entry-term, .prose .species h2, .prose .gq h2 {
  border-top: 0; padding-top: 0;
}
.prose .species h2 { margin: .25rem 0 .2rem; }
.prose .gq h2 { margin: 0 0 .7rem; }
.prose .entry-term { margin: 0; }
