/* tally-stick.fyi: one stylesheet for every page of both hosts (tally-stick.fyi, witness.tally-stick.fyi).
   Dark by default; light when the reader picks it (theme.js stores the choice per browser).
   The one loud thing is the notched rule in the header. Everything else stays quiet. */
:root {
  --bg: #1c1914; --surface: #231f19; --card: #26221b; --soft: #2e2921; --line: #3d372d;
  --fg: #ebe4d3; --mute: #a99f8b; --link: #95b6e4;
  --wood: #c69c5d; --wood-dim: #7d6440; --accent: #d9b56a;
  --ok: #86c99a; --okbg: #1b3024; --bad: #ee907f; --badbg: #3e1f1a; --warn: #dfb65f; --warnbg: #3a2d12;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page: 1080px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f4ee; --surface: #fffdf8; --card: #fffdf8; --soft: #efece3; --line: #dcd9cf;
  --fg: #1c1b18; --mute: #6c6a62; --link: #1b4f9c;
  --wood: #b08a4a; --wood-dim: #d8c7a4; --accent: #8a6d1f;
  --ok: #1f7a3d; --okbg: #e3f2e8; --bad: #a8261c; --badbg: #f9e3df; --warn: #8a5a00; --warnbg: #fbf0d6;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--soft); border-radius: 4px; padding: .08em .35em; }
pre { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 13px; }
pre code { background: none; padding: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: .005em; }
h1 { font-size: 32px; margin: 6px 0 10px; }
h2 { font-size: 22px; margin: 34px 0 8px; }
h3 { font-size: 16px; margin: 22px 0 6px; font-weight: 650; }
h1 .muted, h2 .muted, h1 small { font-family: var(--sans); font-weight: 400; font-size: .5em; letter-spacing: 0; }
p { margin: 0 0 12px; }
.mute, .muted, .k { color: var(--mute); }
.small { font-size: 13.5px; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
.lede { font-size: 17.5px; color: var(--mute); max-width: 68ch; line-height: 1.55; }
.prose { max-width: 72ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; margin: .5em 0 1.5em; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mute); font-weight: 600; }
input, select, textarea { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); max-width: 100%; }
button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); cursor: pointer; }
button:hover { border-color: var(--mute); }
details summary { cursor: pointer; color: var(--mute); }
.ok { color: var(--ok); } .bad { color: var(--bad); }

/* page frame: every page sits in the same column under the same header */
.page { max-width: var(--page); margin: 0 auto; padding: 26px 20px 60px; }
.site-foot { max-width: var(--page); margin: 0 auto; padding: 18px 20px 40px; color: var(--mute); font-size: 13.5px; border-top: 2px solid var(--wood-dim); }
.site-foot p { max-width: 80ch; }

/* ---------------------------------------------------------------- the header */
header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-inner { max-width: var(--page); margin: 0 auto; padding: 0 20px; }
.site-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 14px 0 10px; }
.site-name { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--fg); letter-spacing: .01em; }
.site-name:hover { text-decoration: none; }
.site-mark { width: 38px; height: 16px; flex: 0 0 auto; }
.site-mark .wood { fill: var(--wood); } .site-mark .cut { fill: var(--surface); } .site-mark .split { stroke: var(--surface); stroke-width: 1.2; }
.site-tag { color: var(--mute); font-size: 14px; font-style: italic; }
.site-search { margin-left: auto; display: flex; gap: 6px; }
.site-search input { width: 250px; padding: 4px 10px; font-size: 14px; }
.site-search button { padding: 4px 12px; font-size: 14px; }
.theme-toggle { display: none; padding: 3px 11px; font-size: 13px; border-radius: 999px; color: var(--mute); background: transparent; }
.js .theme-toggle { display: inline-block; }
.theme-toggle:hover { color: var(--fg); }

/* the menu: one row of notches along a hazel rule, the society's questions first and the instruments after;
   the page you are on is cut deeper. Scrolls sideways when narrow. */
nav.notches { position: relative; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; border-top: 2px solid var(--wood); margin: 0 -20px; padding: 0 20px; }
nav.notches::-webkit-scrollbar { display: none; }
nav.notches a { flex: 0 0 auto; position: relative; padding: 9px 14px 11px; color: var(--mute); font-size: 14.5px; white-space: nowrap; }
nav.notches a::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 8px; background: var(--wood); }
nav.notches a:hover { color: var(--fg); text-decoration: none; }
nav.notches a:hover::before { height: 12px; }
nav.notches a.on, nav.notches a[aria-current="page"] { color: var(--fg); font-weight: 600; }
nav.notches a.on::before, nav.notches a[aria-current="page"]::before { width: 3px; height: 20px; }
nav.notches a.on::after, nav.notches a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--fg); }
nav.notches a:focus-visible { outline-offset: -3px; }
@media (prefers-reduced-motion: no-preference) { nav.notches a, nav.notches a::before { transition: color .15s, height .15s; } }
@media (max-width: 860px) { .site-tag { display: none; } }
@media (max-width: 640px) { .site-search { order: 3; width: 100%; margin-left: 0; } .site-search input { flex: 1; width: auto; } .theme-toggle { margin-left: auto; } h1 { font-size: 27px; } .page { padding-top: 20px; } }

/* ---------------------------------------------------------------- the front door */
.ledger { list-style: none; margin: 14px 0 8px; padding: 0 0 0 22px; border-left: 3px solid var(--wood); max-width: 820px; }
.ledger li { position: relative; display: grid; grid-template-columns: 7.5em 1fr; gap: 2px 18px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger li::before { content: ""; position: absolute; left: -25px; top: 50%; width: 14px; height: 3px; background: var(--wood); }
.ledger .q { font-family: var(--serif); font-size: 20px; line-height: 1.3; color: var(--fg); }
.ledger a.q:hover { color: var(--link); text-decoration: none; }
.ledger .name { font-size: 13.5px; color: var(--mute); }
.ledger .what { grid-column: 2; color: var(--mute); font-size: 14.5px; }
@media (max-width: 640px) { .ledger li { grid-template-columns: 1fr; } .ledger .what { grid-column: 1; } }
