:root {
  --bg: #fbfaf7;
  --fg: #1c1c1a;
  --muted: #5d5d57;
  --card: #ffffff;
  --line: #deddd5;
  --accent: #0b5d54;
  --accent-fg: #ffffff;
  --before: #fbf1ef;
  --after: #eef6f2;
  --before-line: #e5c9c3;
  --after-line: #bcd9cb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14150f;
    --fg: #ecebe4;
    --muted: #a5a49a;
    --card: #1c1d16;
    --line: #34352b;
    --accent: #5fc5b5;
    --accent-fg: #0b1512;
    --before: #26191a;
    --after: #14231d;
    --before-line: #4b2f2c;
    --after-line: #2a4a3d;
  }
  img.scan { filter: brightness(0.9); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin-top: 2.4em; }
h3 { font-size: 1.15rem; }
.nowrap { white-space: normal; }
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.brand { font-weight: 700; letter-spacing: .01em; }
.hero { padding: 48px 0 24px; }
.lead { font-size: 1.15rem; max-width: 40em; color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); }
.btn {
  display: inline-block; padding: .65em 1.2em; border-radius: 8px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 600;
  border: 2px solid var(--accent); margin: 0 .5em .5em 0;
}
.btn:hover, .btn:focus-visible { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-small { padding: .3em .8em; margin: 0; font-size: .9rem; }
.intro { max-width: 46em; color: var(--muted); }
.cmp { margin: 2.2em 0 3em; }
.what { max-width: 46em; }
.pair { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 820px) { .pair { grid-template-columns: 1fr 1fr; } }
.side { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); min-width: 0; }
.side > figcaption { padding: .5em .9em; font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--line); }
.before > figcaption { background: var(--before); border-color: var(--before-line); }
.after > figcaption { background: var(--after); border-color: var(--after-line); }
.before { border-color: var(--before-line); }
.after { border-color: var(--after-line); }
.cal, .ours { padding: .6em .9em; font-family: Georgia, "Times New Roman", serif; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.cal { max-height: 34em; overflow: auto; }
.cal p { margin: 0; text-indent: 0; }
.cal .calibre9, .cal .calibre11, .cal .calibre14, .cal .calibre16, .cal .calibre17,
.cal .calibre15, .cal .calibre8, .cal .calibre18, .cal .calibre19, .cal .calibre20 { margin: 0 !important; }
.ours p { margin: 0 0 .7em; }
.ours .equation { display: flex; align-items: center; justify-content: space-between; gap: 1em; overflow-x: auto; margin: .5em 0; }
.ours .equation math { font-size: 1.1em; }
.ours aside.footnote { margin: .3em 0 .8em; padding: .4em .8em; border-left: 3px solid var(--accent); font-size: .88rem; background: var(--after); }
.ours aside.footnote p { margin: 0; }
.ours sup a { text-decoration: none; font-weight: 700; padding: 0 .15em; }
img.scan { display: block; width: 100%; height: auto; }
.note { font-size: .88rem; color: var(--muted); margin-top: .6em; }
.cols { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cols { grid-template-columns: 1fr 1fr; } }
.waitlist { padding-bottom: 32px; }
.q { font-size: 1.25rem; font-weight: 600; padding: .6em .9em; border: 1px dashed var(--line); border-radius: 8px; background: var(--card); display: inline-block; max-width: 100%; }
#tally { width: 100%; border: 0; min-height: 320px; }
footer { border-top: 1px solid var(--line); margin-top: 3em; padding-bottom: 3em; font-size: .9rem; color: var(--muted); }
footer h2 { font-size: 1.1rem; margin-top: 1.6em; }
footer li { margin-bottom: .6em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.featlist { padding-left: 1.2em; max-width: 46em; }
.featlist li { margin-bottom: .5em; }
.toc-demo { margin-top: 1.5em; max-width: 36em; }
.toc-demo .ours { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.toc-demo ol { margin: 0; padding-left: 1.2em; }
