/* The Proof Index — one stylesheet for all three pages.
   Identity: a ruled record sheet. Pale ledger-green paper, carbon ink,
   ballpoint blue for anything you can act on, tick boxes for yes/no. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/fraunces-normal-latin.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-normal-latin.woff2) format("woff2"); }

:root {
  --paper: #EDF1EA;        /* ledger paper */
  --sheet: #FAFBF8;        /* a record laid on the paper */
  --ink: #17212B;          /* carbon ink */
  --ink-2: #36424C;        /* body text */
  --ink-3: #54606A;        /* labels, secondary */
  --rule: #C5CFC4;         /* ledger rules */
  --rule-strong: #74837A;  /* field borders */
  --blue: #1D3F9E;         /* ballpoint blue: links, actions */
  --blue-deep: #152F7A;
  --marker: #F6E27A;       /* highlighter, used once per page at most */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --margin-col: 12rem;     /* notebook margin that holds section headings */
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink-2); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
strong { color: var(--ink); font-weight: 600; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; color: #fff; }

/* ---------- Header and footer ---------- */

.site-head { border-bottom: 3px double var(--ink); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; width: 1.6rem; height: 1.6rem; }
.brand-name { font: 600 1.2rem/1.1 var(--display); font-variation-settings: "opsz" 36; letter-spacing: -0.01em; }
.brand-site { font-size: 0.8125rem; color: var(--ink-3); }
.site-nav { display: flex; gap: 1.5rem; margin-left: -0.1rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-size: 0.9375rem; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current] { border-bottom-color: var(--ink); }

.site-foot { border-top: 3px double var(--ink); margin-top: 1rem; padding: 1.5rem 0 3rem; font-size: 0.875rem; color: var(--ink-3); }
.site-foot p { margin: 0.25rem 0; max-width: var(--measure); }

/* ---------- Page opening ---------- */

main { padding: 0 0 3rem; }
.opening { padding: 3.25rem 0 2.75rem; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 { font-weight: 600; font-size: clamp(2.1rem, 6.2vw, 3.6rem); line-height: 1.05; letter-spacing: -0.012em; word-spacing: 0.04em; font-variation-settings: "opsz" 144; max-width: 17em; text-wrap: balance; }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: var(--measure); margin: 1.5rem 0 0; }
.lede + .lede { margin-top: 0.75rem; }

/* The request itself, set as the line that gets sent. */
.ask { margin: 1.1rem 0; padding: 0.15rem 0 0.15rem 1.1rem; border-left: 3px solid var(--blue); max-width: 34rem; font: italic 400 clamp(1.35rem, 3.6vw, 1.75rem)/1.3 var(--display); font-variation-settings: "opsz" 48; color: var(--ink); }

/* ---------- Record slip: labelled fields, like the header of a lab report ---------- */

.sheet { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 2px; }
.opening .sheet { margin-top: 2.25rem; }

.fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
.fields > div { padding: 0.7rem 1rem 0.8rem; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }
.fields dt { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-3); }
.fields dd { margin: 0.15rem 0 0; color: var(--ink); font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; }
.fields .wide { grid-column: 1 / -1; }

.status { margin: 0; padding: 0.75rem 1rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--ink); }
.status mark { background: var(--marker); color: var(--ink); font-weight: 600; padding: 0.1em 0.35em; margin-right: 0.15em; border-radius: 1px; }

/* ---------- Sections: heading in the margin, entry beside it ---------- */

.sec { border-top: 1px solid var(--rule); padding: 2.25rem 0 2.5rem; }
.sec > h2 { font-weight: 600; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.015em; font-variation-settings: "opsz" 36; margin-bottom: 1rem; }
.sec-body { max-width: var(--measure); }
.sec-body ul { margin: 0; padding-left: 1.15rem; }
.sec-body li { margin: 0.4rem 0; }
.small { font-size: 0.9375rem; color: var(--ink-3); }

/* ---------- Steps (a real sequence, so it is numbered) ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 1.1rem 0 1.2rem 3.25rem; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1.05rem; width: 2.1rem; height: 2.1rem; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--sheet); color: var(--ink); font: 600 1.15rem/2rem var(--display); text-align: center; }
.steps li:first-child::before { top: -0.05rem; }
.steps h3 { font-weight: 600; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; font-variation-settings: "opsz" 36; margin-bottom: 0.3rem; }

/* ---------- Commitments: the one inked block ---------- */

.sec.commit { background: var(--ink); border-top: 0; border-radius: 2px; padding: 2rem 1.25rem 2.1rem; margin: 0 -1.25rem; }
.sec.commit + .sec { border-top: 0; }
.commit > h2 { color: #fff; }
.sec-body .commit-list { list-style: none; margin: 0; padding: 0; }
.sec-body .commit-list li { position: relative; margin: 0; padding: 0.95rem 0 0.95rem 2.4rem; border-top: 1px solid #3C4954; color: #D5DCD3; }
.commit-list li:first-child { border-top: 0; padding-top: 0; }
.commit-list li:last-child { padding-bottom: 0; }
.commit-list strong { color: #fff; }
/* A crossed box: the "no" column of a form. */
.commit-list li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 1.25rem; height: 1.25rem; border: 1.5px solid #fff; border-radius: 2px;
  background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%); }
.commit-list li:first-child::before { top: 0.25rem; }

/* ---------- Method: the four levels ---------- */

.levels { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: lvl; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 2px; }
.levels li { counter-increment: lvl; position: relative; padding: 0.95rem 1rem 1rem 5.5rem; border-top: 1px solid var(--rule); --on: var(--ink); --off: var(--rule); }
.levels li:first-child { border-top: 0; }
.levels li::before { content: "Level " counter(lvl); position: absolute; left: 1rem; top: 0.95rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink); line-height: 1.65rem; }
/* Four boxes, filled up to the level's place on the scale. */
.levels li::after { content: ""; position: absolute; left: 1rem; top: 2.65rem; width: 0.55rem; height: 0.55rem; background: var(--on);
  box-shadow: 0.8rem 0 0 var(--c2, var(--off)), 1.6rem 0 0 var(--c3, var(--off)), 2.4rem 0 0 var(--c4, var(--off)); }
.levels li:nth-child(n+2) { --c2: var(--on); }
.levels li:nth-child(n+3) { --c3: var(--on); }
.levels li:nth-child(n+4) { --c4: var(--on); }
.levels strong { display: block; font: 600 1.1875rem/1.3 var(--display); font-variation-settings: "opsz" 36; margin-bottom: 0.2rem; }

/* ---------- Home: round tally (totals only) ---------- */

.count { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); }
.count caption { caption-side: top; text-align: left; padding: 0 0 0.6rem; font-size: 0.875rem; color: var(--ink-3); }
.count th, .count td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); line-height: 1.4; vertical-align: baseline; }
.count th { text-align: left; font-weight: 600; color: var(--ink); }
.count td { text-align: right; width: 4.5rem; color: var(--ink); font: 600 1.375rem/1.2 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.count tr:last-child th, .count tr:last-child td { border-bottom: 0; }
.count .sub th { font-weight: 400; color: var(--ink-2); font-size: 0.9375rem; padding-left: 2.6rem; position: relative; }
.count .sub th::before { content: ""; position: absolute; left: 1.15rem; top: 50%; width: 0.6rem; height: 1px; background: var(--rule-strong); }
.count .sub td { font: 500 1rem/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.count-note { margin-top: 0.9rem; }

/* ---------- Follow: one field ---------- */

.follow { display: grid; gap: 0.5rem; }
.follow label { font-weight: 600; color: var(--ink); }
.follow-row { display: grid; gap: 0.6rem; }
.follow input[type=email] { width: 100%; min-height: 3.1rem; padding: 0.6rem 0.8rem; font: 500 1.0625rem/1.3 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--rule-strong); border-radius: 2px; }
.follow input::placeholder { color: #6B7780; opacity: 1; font-weight: 400; }
.follow input[type=email]:focus-visible { outline-offset: 0; border-color: var(--blue); }
.fund { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

/* ---------- Pledge: tally ---------- */

.tally-body { padding: 1.1rem 1rem 1.2rem; }
.tally-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.tally-total { font: 600 clamp(2.75rem, 11vw, 4rem)/1 var(--display); font-variation-settings: "opsz" 144; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: lining-nums; }
.tally-of { font-size: 1.0625rem; color: var(--ink); font-weight: 500; }
.tally-count { margin-left: auto; font-size: 0.9375rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* A graduated scale: marks at each quarter of the goal. */
.bar { position: relative; height: 1.25rem; margin: 0.9rem 0 0.6rem; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 1px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.6s ease-out; }
.bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(100% - 1px), var(--rule-strong) 0) 0 0 / 25% 100%; pointer-events: none; }
.tally-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.5rem; margin-top: 0.9rem; }
.tally-foot p { margin: 0; flex: 1 1 14rem; }

/* ---------- Pledge: cost ledger ---------- */

.ledger { width: 100%; border-collapse: collapse; margin: 1.25rem 0 0.9rem; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); font-size: 1rem; }
.ledger td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-2); vertical-align: top; line-height: 1.45; }
.ledger td:last-child { text-align: right; white-space: nowrap; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; padding-left: 0.5rem; }
.ledger tr:last-child td { border-bottom: 0; border-top: 3px double var(--ink); font-size: 1.125rem; }
.ledger tr:last-child td:last-child { font-weight: 600; }

/* ---------- Pledge: form ---------- */

.msg { display: none; margin: 0 0 1.25rem; padding: 0.9rem 1rem; border: 1px solid; border-left-width: 4px; border-radius: 2px; background: var(--sheet); color: var(--ink); }
.msg.ok { border-color: var(--blue); }
.msg.err { border-color: #A3182F; color: #7C1023; background: #FCEEEE; }

.pledge { display: grid; gap: 1.5rem; padding: 1.25rem 1rem 1.4rem; scroll-margin-top: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field > label, .vote legend { font-weight: 600; color: var(--ink); font-size: 1rem; }
.hint { font-weight: 400; font-size: 0.875rem; color: var(--ink-3); }
.pledge input[type=email], .pledge input[type=number] { width: 100%; min-height: 3.1rem; padding: 0.6rem 0.8rem; font: 500 1.0625rem/1.3 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--rule-strong); border-radius: 2px; font-variant-numeric: tabular-nums; }
.pledge input::placeholder { color: #6B7780; opacity: 1; font-weight: 400; }
.pledge input[type=email]:focus-visible, .pledge input[type=number]:focus-visible { outline-offset: 0; border-color: var(--blue); }
.money { position: relative; max-width: 11rem; }
.money span { position: absolute; left: 0.8rem; top: 0; line-height: 3.1rem; font-weight: 500; color: var(--ink-3); pointer-events: none; }
.money input[type=number] { padding-left: 1.75rem; }

.vote { border: 0; margin: 0; padding: 0; min-width: 0; }
.vote legend { padding: 0; margin-bottom: 0.55rem; }
.opt { display: flex; gap: 0.85rem; align-items: flex-start; min-height: 3.75rem; padding: 0.85rem 0.9rem; margin-top: -1.5px; background: #fff; border: 1.5px solid var(--rule-strong); cursor: pointer; position: relative; }
.opt:first-of-type { margin-top: 0; border-radius: 2px 2px 0 0; }
.opt:last-of-type { border-radius: 0 0 2px 2px; }
.opt:hover { background: #F1F4FB; }
.opt:has(input:checked) { border-color: var(--blue); background: #E9EEFA; z-index: 1; }
.opt:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; z-index: 2; }
.opt input:focus-visible { outline: none; }
.opt-name { display: block; font-weight: 600; color: var(--ink); line-height: 1.35; }
.opt-note { display: block; font-size: 0.9375rem; color: var(--ink-3); line-height: 1.4; margin-top: 0.1rem; }

.pledge input[type=radio], .pledge input[type=checkbox] { flex: none; width: 1.4rem; height: 1.4rem; margin: 0.1rem 0 0; accent-color: var(--blue); cursor: pointer; }
.check { display: flex; gap: 0.85rem; align-items: flex-start; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); cursor: pointer; padding: 0.25rem 0; }

.actions { display: grid; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.7rem 1.75rem; font: 600 1.0625rem/1.2 var(--sans); color: #fff; background: var(--blue); border: 1.5px solid var(--blue); border-radius: 2px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn.quiet { background: transparent; color: var(--blue); }
.btn.quiet:hover { background: #E9EEFA; color: var(--blue-deep); }
.tally-foot .btn { flex: 1 1 100%; }
.hp { position: absolute; left: -9999px; }

/* ---------- Wider screens ---------- */

@media (min-width: 36rem) {
  .fields { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
  .fields .wide { grid-column: auto; }
  .tally-body, .pledge { padding-left: 1.5rem; padding-right: 1.5rem; }
  .pledge { padding-top: 1.5rem; padding-bottom: 1.6rem; }
  .fields > div, .status { padding-left: 1.5rem; padding-right: 1.5rem; }
  .actions { grid-template-columns: max-content max-content; }
  .follow-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .count th, .count td { padding-left: 1.5rem; padding-right: 1.5rem; }
  .count .sub th { padding-left: 3.1rem; }
  .count .sub th::before { left: 1.65rem; }
  .tally-foot .btn { flex: 0 0 auto; }
}

@media (min-width: 54rem) {
  .wrap { padding: 0 2rem; }
  .opening { padding: 4.5rem 0 3.5rem; }
  .sec { display: grid; grid-template-columns: var(--margin-col) minmax(0, var(--measure)); column-gap: 3rem; padding: 2.75rem 0 3rem; }
  .sec > h2 { margin: 0; padding-top: 0.1rem; }
  .sec.commit { margin: 0 -2rem; padding: 2.75rem 2rem 3rem; }
}

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

@media print {
  body { background: #fff; }
  .site-nav, .skip { display: none; }
}
