/* The one style sheet of the reading site. Every colour and size is defined here, once; nothing is fetched from
   elsewhere. Palette of the handout: ink #1F2933, muted #616E7C, accent #1C5D99, box #F3F6FA. The text face is the face
   of the notes (New Computer Modern Book), the Lean text is set in JetBrains Mono, as in the notes. */
@font-face { font-family: "NewCM"; src: url("vendor/fonts/NewCM10-Book.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "NewCM"; src: url("vendor/fonts/NewCM10-BookItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "NewCM"; src: url("vendor/fonts/NewCM10-Bold.otf") format("opentype"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("vendor/fonts/JetBrainsMono-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("vendor/fonts/JetBrainsMono-Bold.otf") format("opentype"); font-weight: 600 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #1F2933; --muted: #616E7C; --faint: #7B8794; --accent: #1C5D99; --accent-deep: #154A7C; --accent-soft: #E7EFF8;
  --box: #F3F6FA; --paper: #FFFFFF; --desk: #E6EAEF; --rule: #D6DDE5; --hair: #E9EDF2; --code-bg: #FBFCFD;
  --hl: #FFF1C1; --hl-gut: #F4DC8F; --hh: #FBE39A; --stmt: #8FB0D3; --sel: #EDF3FA;
  --good-bg: #E2F1E9; --good-ink: #1E5A3E; --grey-bg: #EEF1F4; --amber-bg: #FBF0D8; --amber-ink: #744A0C;
  --kw: #6A3D9A; --cm: #687582; --str: #1E6B56; --bad: #B42318;
  --serif: "NewCM", "Latin Modern Roman", "CMU Serif", "Computer Modern Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --measure: 35em; --gut: 3.4em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--serif); font-kerning: normal; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .82em; font-variant-ligatures: none; overflow-wrap: anywhere; hyphens: none; }
.nw { white-space: nowrap; } .nw code { white-space: normal; }
.skip { position: absolute; left: -999px; top: .5rem; } .skip:focus { left: .5rem; z-index: 20; background: var(--paper); padding: .4rem .7rem; font: .875rem var(--sans); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* the frame: the same on every page */
.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 2rem; padding: .7rem 1.5rem .6rem; border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; color: var(--ink); text-decoration: none; }
.brand b { font: 700 1.125rem var(--serif); letter-spacing: .01em; } .brand span { font-size: .8125rem; color: var(--muted); }
.id { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; }
.stamp { font-size: .75rem; color: var(--muted); opacity: 0; transition: opacity .4s; white-space: nowrap; } .stamp.on { opacity: 1; }
.stamp-commit::before { content: ' · '; white-space: pre; }
.stamp a { color: var(--muted); } .stamp a:hover { color: var(--accent); }
@media (max-width: 40rem) { .stamp-commit { display: none; } .stamp { white-space: normal; } }
.brand:hover b { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; font-size: .875rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .15rem 0; } .nav a:hover, .nav a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: .35em; }
.trail { padding: .55rem 1.5rem 0; font: .8125rem/1.5 var(--sans); color: var(--muted); }
.trail ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.trail li { max-width: 32rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail li + li::before { content: "›"; margin: 0 .45rem; color: var(--faint); }
.trail a { color: var(--muted); } .trail a:hover { color: var(--accent); }
main { display: block; max-width: 52rem; margin: 0 auto; padding: 1.2rem 1.5rem 4rem; }
body.wide main { max-width: 118rem; }
footer { border-top: 1px solid var(--rule); padding: 1rem 1.5rem 2rem; font: .75rem/1.6 var(--sans); color: var(--muted); }
footer p { max-width: 80rem; margin: 0; }

/* text */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: 2rem; line-height: 1.2; margin: .15rem 0 .5rem; }
h1.mono { font: 600 1.5rem/1.3 var(--mono); overflow-wrap: anywhere; } h1 .kindword { font: 600 .8125rem var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); vertical-align: .3em; margin-right: .3rem; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.4rem 0 .6rem; } h2 .dim { font-weight: 400; }
h3 { font-size: 1.125rem; line-height: 1.3; margin: 1.4rem 0 .4rem; }
p { margin: .5rem 0; }
.prose, .lede, .says, .summary, .claim { max-width: var(--measure); overflow-wrap: break-word; }
.lede { font-size: 1.1875rem; line-height: 1.55; } .lede p { margin: .4rem 0; }
.kicker { font: 600 .75rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem; }
.kicker a { color: inherit; }
.meta, .dim, .lab, .badge, .filter, table, button, input { font-family: var(--sans); }
.meta { font-size: .875rem; line-height: 1.55; color: var(--muted); margin: .35rem 0; }
.dim { font-size: .8125rem; color: var(--muted); }
.grey { color: var(--muted); } .bad { color: var(--bad); font-weight: 600; }
.lab { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .15rem; }
.head { margin: .4rem 0 1.6rem; }
.says, .summary { margin: .8rem 0; }
.summary { border-left: 3px solid var(--accent); padding: .05rem 0 .05rem .9rem; }
.kind { font: 600 .6875rem/1.4 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
a.go { font-family: var(--sans); font-size: .875rem; font-weight: 600; text-decoration: none; } a.go::after { content: " →"; } a.go:hover { text-decoration: underline; }
.meta a.go { font-size: inherit; font-weight: 500; }
a.in { font: .75rem var(--sans); color: var(--muted); }
button { font: 500 .8125rem/1.4 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .25rem .65rem; cursor: pointer; }
button:hover { border-color: var(--faint); } button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
input[type="search"], input[type="text"] { font: .875rem var(--sans); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: .3rem .55rem; background: var(--paper); }
.filter label { font-size: .875rem; color: var(--muted); display: inline-flex; gap: .6rem; align-items: center; }
.filter input { width: 18rem; max-width: 60vw; }
.scroll { overflow-x: auto; }
.mono { font-family: var(--mono); }
.katex { font-size: 1.02em; text-rendering: auto; }
.katex-display { margin: .5em 0; overflow-x: auto; overflow-y: hidden; }
.m-err { color: var(--bad); }

/* states */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; line-height: 1.4; padding: .06rem .5rem; border-radius: 999px; white-space: nowrap; vertical-align: .06em; }
.badge.note { background: var(--good-bg); color: var(--good-ink); } .badge.proofs { background: var(--amber-bg); color: var(--amber-ink); }
.badge.dossier { background: var(--accent-soft); color: var(--accent-deep); } .badge.unread { background: var(--grey-bg); color: var(--muted); }

/* lists and tables */
ul.plain, ol.plain { list-style: none; padding: 0; margin: 0; }
ul.cols { columns: 2 20rem; column-gap: 2rem; } ul.cols li { break-inside: avoid; padding: .1rem 0; font-size: .95rem; }
.dh { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .65rem; margin: 0; }
.dh code { font-size: .85rem; font-weight: 600; } .dh .dim { font-size: .75rem; }
ul.decls > li { border-top: 1px solid var(--hair); padding: .85rem 0 .7rem; } ul.decls .claim { margin: .3rem 0 .2rem; }
.links { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: .3rem 0; }
details.list { border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .85rem; margin: .55rem 0; background: var(--paper); }
details.list > summary { font: .9375rem var(--sans); }
details.list ul > li { border-top: 1px solid var(--hair); padding: .45rem 0; } details.list ul.cols > li { border: 0; }
summary { cursor: pointer; } summary::marker { color: var(--faint); }
details.own > summary, details.cases > summary { font: .8125rem var(--sans); color: var(--accent); margin: .25rem 0; }
details.cases li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: .2rem 1rem; padding: .35rem 0; border-top: 1px solid var(--hair); }
details.cases .claim { font-size: 1rem; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; font-size: .6875rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); padding: .45rem .6rem; }
td { padding: .45rem .6rem; border-bottom: 1px solid var(--hair); vertical-align: top; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule); font: .875rem/1.45 var(--sans); }
.pager a { text-decoration: none; max-width: 48%; } .pager a:hover { text-decoration: underline; } .pager a[rel="next"] { text-align: right; margin-left: auto; }

/* the front page and the chapters */
.hero { margin: 1.2rem 0 2rem; } .hero h1 { font-size: 2.6rem; margin-bottom: .6rem; }
.facts { font: .8125rem/1.6 var(--sans); color: var(--muted); }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1.5rem 0 1rem; padding: 1rem 1.2rem; background: var(--box); border-radius: 10px; }
.ways h3 { margin: 0 0 .25rem; font-size: 1rem; } .ways p { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--ink); }
ol.chapters { list-style: none; margin: .6rem 0 0; padding: 0; }
.ch { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; padding: 1.15rem 0 1rem; border-top: 1px solid var(--rule); }
.chn { font: 700 1.35rem/1.45 var(--serif); color: var(--accent); text-align: right; }
.ch h3 { margin: 0; font-size: 1.35rem; } .ch h3 a { color: var(--ink); text-decoration: none; } .ch h3 a:hover { color: var(--accent); text-decoration: underline; }
.ch .meta { margin: .15rem 0 .4rem; } .ch .meta a { color: var(--muted); }
ol.notes { list-style: none; margin: .4rem 0 0; padding: 0; }
li.note { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem 1.2rem; padding: .28rem 0; border-top: 1px dotted var(--rule); }
li.note:first-child { border-top: 0; }
li.note .nt { font-size: 1.0625rem; line-height: 1.4; text-decoration: none; } li.note .nt:hover { text-decoration: underline; }
li.note .pp { font: .8125rem var(--sans); color: var(--muted); white-space: nowrap; } li.note .pp a { color: var(--muted); }
ul.outline { flex-basis: 100%; margin: .1rem 0 .35rem; padding-left: 1.2rem; font-size: .9375rem; line-height: 1.45; color: var(--muted); }
ul.outline b { font-weight: 400; color: var(--ink); }
.ublock { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: .4rem; }
.ublock h2 { margin: .8rem 0 .2rem; } .ublock h2 a { color: var(--ink); text-decoration: none; } .ublock h2 a:hover { color: var(--accent); }
.uid { display: block; font: 600 .75rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
ul.notes > li { padding: .25rem 0; }
.library details { border-top: 1px solid var(--rule); margin-top: 2.4rem; padding-top: .6rem; }
.library summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.library summary::-webkit-details-marker { display: none; }
.library summary h2 { margin: .4rem 0; } .library summary h2::before { content: "▸ "; color: var(--accent); font-size: .8em; }
.library details[open] summary h2::before { content: "▾ "; }

/* Lean text: one component everywhere */
figure.code { margin: .55rem 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--code-bg); overflow: hidden; }
figure.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 1.75rem; padding: .18rem .35rem .18rem .75rem; background: var(--box); border-bottom: 1px solid var(--rule); font: .75rem/1.5 var(--sans); color: var(--muted); }
figure.code .cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
figure.code .acts { display: flex; gap: .3rem; flex: none; } figure.code .acts button { font-size: .6875rem; padding: .02rem .45rem; border-radius: 5px; }
pre.lean { position: relative; margin: 0; padding: .5rem 0; overflow: auto; max-height: 26rem; font: 400 .8125rem/1.62 var(--mono); tab-size: 2; white-space: pre; font-variant-ligatures: none; color: #1B2530; }
pre.lean code { display: inline-block; min-width: 100%; font: inherit; overflow-wrap: normal; }
pre.lean code > span { display: block; min-height: 1.62em; padding-right: 1.2rem; counter-increment: ln; scroll-margin-top: 30vh; }
pre.lean code > span::before { content: counter(ln); display: inline-block; position: sticky; left: 0; width: var(--gut); margin-right: .9em; padding-right: .7em; text-align: right; color: #9AA5B1; background: var(--code-bg); border-right: 1px solid var(--hair); -webkit-user-select: none; user-select: none; font-variant-numeric: tabular-nums; }
pre.lean code > span.s::before { box-shadow: inset 3px 0 0 var(--stmt); }
pre.lean code > span.hl, pre.lean code > span:target { background: var(--hl); } pre.lean code > span.hh { background: var(--hh); }
pre.lean code > span.hl::before, pre.lean code > span.hh::before, pre.lean code > span:target::before { background: var(--hl-gut); color: var(--ink); }
pre.lean.wrap code { display: block; min-width: 0; }
pre.lean.wrap code > span { position: relative; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: calc(var(--gut) + .9em + (var(--ind, 0) + 2) * 1ch); text-indent: calc((var(--ind, 0) + 2) * -1ch); }
pre.lean.wrap code > span::before { position: absolute; left: 0; top: 0; bottom: 0; margin: 0; text-indent: 0; }
pre.lean b { font-weight: inherit; color: var(--kw); } pre.lean i { font-style: normal; color: var(--cm); }
pre.lean .st { color: var(--str); } pre.lean .sr { color: var(--bad); background: #FDE8E6; font-weight: 700; }
body.src main { max-width: 76rem; } body.src figure.code pre.lean { max-height: none; overflow-y: visible; }

/* proof mode: the tree beside the declaration */
.proof-head { max-width: 52rem; }
.proofmode { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.leanpane { position: sticky; top: .6rem; min-width: 0; } .leanpane pre.lean { max-height: calc(100vh - 6.5rem); }
.leanpane > .dim { margin: .3rem 0; }
.treebar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .45rem 0; background: var(--paper); border-bottom: 1px solid var(--hair); margin-bottom: .4rem; }
.treebar .keys { margin-left: auto; font: .75rem var(--sans); color: var(--muted); }
ol.tree, ol.tree ol { list-style: none; margin: 0; padding: 0; }
ol.tree ol { margin-left: 1.15rem; padding-left: .75rem; border-left: 1px solid var(--rule); }
li[role="treeitem"] { outline: none; }
.node { border-radius: 7px; padding: .4rem .65rem .5rem .35rem; margin: .1rem 0; cursor: pointer; transition: background-color .12s; }
.node:hover { background: #F6F8FB; }
li[aria-selected="true"] > .node { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
li[role="treeitem"]:focus-visible > .node { outline: 2px solid var(--accent); outline-offset: -2px; }
.row { display: flex; align-items: baseline; gap: .55rem; font: .8125rem/1.5 var(--sans); color: var(--muted); }
.tw { flex: none; width: 1.1rem; text-align: center; color: var(--accent); cursor: pointer; font-size: .75rem; }
.tw::before { content: "▾"; } [aria-expanded="false"] > .node .tw::before { content: "▸"; }
li[role="treeitem"]:not([aria-expanded]) > .node > .row::before { content: "•"; flex: none; width: 1.1rem; text-align: center; color: #B5BEC8; font-size: .75rem; }
.sid { font: 600 .8125rem var(--mono); color: var(--ink); }
.row .ll { margin-left: auto; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; } .row .ll:hover { color: var(--accent); text-decoration: underline; }
.row .sub { color: var(--accent); } [aria-expanded="true"] > .node .row .sub { display: none; }
.sb { padding-left: 1.65rem; }
.sb .claim { font-size: 1.0625rem; line-height: 1.55; margin: .15rem 0 .25rem; max-width: 40em; }
.sb p { margin: .2rem 0; }
.fact code { display: inline-block; background: var(--box); border: 1px solid var(--hair); border-radius: 5px; padding: .06rem .4rem; font-size: .78rem; overflow-wrap: anywhere; }
.fact .lab, .uses .lab { display: inline; margin-right: .45rem; }
.uses, .second { font: .8125rem/1.5 var(--sans); color: var(--muted); } .uses code { font-size: .78rem; }
.second { font-family: var(--serif); font-size: .9375rem; }
.excerpt { margin: .45rem 0 .2rem; } .excerpt pre.lean { max-height: 18rem; }

/* reading mode: the note beside its Lean text */
body.readpage { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.readpage .top { padding-top: .45rem; padding-bottom: .4rem; }
body.readpage .trail { padding-top: .35rem; }
body.readpage main { flex: 1; min-height: 0; width: 100%; max-width: none; padding: .45rem .75rem .6rem; }
body.readpage footer { display: none; }
.reading { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 1fr); gap: .9rem; height: 100%; min-height: 0; }
.viewer { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid var(--rule); border-radius: 9px; background: var(--desk); overflow: hidden; }
.vbar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .3rem .5rem; background: var(--paper); border-bottom: 1px solid var(--rule); font: .8125rem var(--sans); }
.vbar button { min-width: 2rem; padding: .15rem .5rem; } .vbar .zoomval { min-width: 3.6rem; font-variant-numeric: tabular-nums; }
.vbar .pageno { margin-left: .6rem; color: var(--muted); } .vbar .pageno input { width: 3.2rem; text-align: right; padding: .12rem .35rem; margin: 0 .15rem; font-variant-numeric: tabular-nums; }
.vbar .dl { margin-left: auto; font-weight: 600; text-decoration: none; } .vbar .dl::before { content: "↓ "; }
.vbar.fallback button, .vbar.fallback .pageno { display: none; }
.pdfscroll { flex: 1; min-height: 0; overflow: auto; padding: 1rem; outline: none; overscroll-behavior: contain; }
.pdfscroll:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.pages { --scale-round-x: 1px; --scale-round-y: 1px; display: flex; flex-direction: column; align-items: center; gap: 1rem; min-width: min-content; }
.pg { position: relative; flex: none; width: calc(var(--fit, 46rem) * var(--zoom, 1) * var(--pw) / var(--pwmax, var(--pw))); aspect-ratio: var(--pw) / var(--ph); background: #fff; box-shadow: 0 1px 2px rgba(31, 41, 51, .16), 0 0 0 1px rgba(31, 41, 51, .07); }
.pg > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pg:not(.drawn)::after { content: "Page " attr(data-n); position: absolute; inset: 0; display: grid; place-items: center; font: .875rem var(--sans); color: #A9B3BE; }
.pdfframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.fallnote { margin: 0; padding: .45rem .75rem; font: .8125rem/1.5 var(--sans); color: var(--ink); background: var(--amber-bg); border-bottom: 1px solid var(--rule); }
/* the text of a page, invisible, for selecting and finding (the rules of PDF.js's own viewer) */
.textLayer { position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 1;
  --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); }
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer > :not(.markedContent), .textLayer .markedContent span:not(.markedContent) { z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height)); --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }
.textLayer .markedContent { display: contents; }
.textLayer span[role="img"] { -webkit-user-select: none; user-select: none; cursor: default; }
.textLayer ::selection { background: rgba(28, 93, 153, .26); } .textLayer br::selection { background: transparent; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; -webkit-user-select: none; user-select: none; }
.textLayer.selecting .endOfContent { top: 0; }
.pg.pointing, .pg.pointing .textLayer span { cursor: pointer; }
/* the statements and LEAN lines on a page */
.marks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rg { position: absolute; border-radius: 3px; transition: background-color .12s; }
.rg::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--accent); opacity: .22; transition: opacity .12s; }
.rg.hover { background: rgba(28, 93, 153, .045); } .rg.hover::before { opacity: .65; }
.rg.on { background: rgba(28, 93, 153, .07); } .rg.on::before { opacity: 1; }
.band { position: absolute; border-radius: 3px; }
.band.free::before { content: ""; position: absolute; left: 0; top: 1px; bottom: 1px; width: 3px; border-radius: 2px; background: #B08A2E; opacity: .3; }
.band.hover { background: rgba(176, 138, 46, .1); }
.band.on { background: rgba(242, 196, 66, .26); } .band.free.on::before { opacity: 1; }
.plink { position: absolute; z-index: 3; pointer-events: auto; border-radius: 2px; }
.plink:hover { background: rgba(28, 93, 153, .12); } .plink.lean:hover, .plink.lean.on { box-shadow: inset 0 -2px 0 var(--accent); background: rgba(28, 93, 153, .1); }
.flash { position: absolute; left: 0; right: 0; height: 2.2%; z-index: 2; pointer-events: none; background: rgba(242, 196, 66, .35); animation: fade 1.6s ease-out forwards; }
@keyframes fade { to { opacity: 0; } }
/* the column beside the pages */
.side { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side-head { flex: none; padding: 0 .2rem .55rem; border-bottom: 1px solid var(--rule); }
.side-head h1 { font-size: 1.3rem; line-height: 1.25; margin: .05rem 0 .2rem; }
.side-head .meta { font-size: .8125rem; margin: .15rem 0; } .side-head .meta code { font-size: .75rem; }
.picker { display: flex; gap: .35rem; margin-top: .5rem; }
.picker button { font-size: 1rem; padding: .2rem .6rem; }
.picker .cur { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; text-align: left; font-size: .875rem; }
.picker .cur b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .picker .cur small { color: var(--muted); white-space: nowrap; }
.picker .cur::after { content: "▾"; color: var(--muted); margin-left: .2rem; } .picker .cur[aria-expanded="true"]::after { content: "▴"; }
.stmts { list-style: none; margin: .45rem 0 0; padding: .3rem; max-height: 42vh; overflow: auto; border: 1px solid var(--rule); border-radius: 7px; columns: 2 12rem; column-gap: .5rem; }
.stmts li { break-inside: avoid; }
.stmts a { display: flex; justify-content: space-between; gap: .6rem; padding: .16rem .45rem; border-radius: 4px; font: .8125rem/1.45 var(--sans); color: var(--ink); text-decoration: none; }
.stmts a small { color: var(--muted); white-space: nowrap; } .stmts a:hover { background: var(--box); } .stmts a.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.side-body { flex: 1; min-height: 0; overflow: auto; padding: .7rem .35rem 1.2rem .15rem; outline: none; overscroll-behavior: contain; }
.sel h2 { margin: 0 0 .1rem; font-size: 1.35rem; } .sel .meta { margin: 0 0 .3rem; } .hint { color: var(--muted); font-size: 1rem; }
.dchips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .35rem 0 .7rem; }
.dchips button { font: .75rem/1.4 var(--mono); padding: .15rem .5rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dchips button .k { font: 600 .625rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-right: .35rem; }
article.decl { border-top: 1px solid var(--hair); padding-top: .55rem; }
article.decl .dh .name { font-size: .9375rem; }
article.decl .meta { font-size: .8125rem; }
article.decl .says { font-size: 1.0625rem; line-height: 1.55; margin: .55rem 0; }
.says.clamped { max-height: 9.4em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent); }
button.more { border: 0; background: none; padding: 0; margin: -.2rem 0 .2rem; font-size: .8125rem; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.tabs { display: flex; align-items: flex-end; gap: .2rem; border-bottom: 1px solid var(--rule); margin: .9rem 0 .65rem; }
.tabs [role="tab"] { border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; background: none; margin-bottom: -1px; padding: .35rem .8rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.tabs [role="tab"] small { font-weight: 400; color: var(--faint); margin-left: .2rem; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.tabs [role="tab"][data-none] { color: var(--faint); font-weight: 500; }
.tabs .open { margin-left: auto; padding: 0 .2rem .4rem; font: .8125rem var(--sans); text-decoration: none; } .tabs .open:hover { text-decoration: underline; }
.panel .summary { font-size: 1rem; margin: .2rem 0 .7rem; }
.panel pre.lean { max-height: none; }
.panel .treebar { position: static; padding: .2rem 0 .4rem; }
.panel .sb .claim { font-size: 1rem; }
.side .pager { margin-top: 2rem; }

@media (max-width: 62rem) {
  .proofmode { display: block; } .leanpane { position: static; margin-top: 1.5rem; }
  body.readpage { height: auto; display: block; overflow: visible; }
  .reading { display: block; height: auto; }
  .viewer { height: 78vh; height: 78dvh; } .side { margin-top: 1rem; } .side-body { overflow: visible; }
  .ways { grid-template-columns: 1fr; }
  details.cases li { display: block; }
}
@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  main { padding: 1rem 1rem 3rem; } .top, .trail { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 1.65rem; } .hero h1 { font-size: 2rem; }
  .ch { grid-template-columns: 2rem minmax(0, 1fr); gap: 0 .6rem; }
  .treebar .keys { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .top .nav, .trail, .treebar, figure.code .acts, .vbar, .picker, .stmts, .tabs .open { display: none; }
  body.readpage { height: auto; display: block; overflow: visible; } .reading, .proofmode { display: block; height: auto; }
  pre.lean { max-height: none; overflow: visible; white-space: pre-wrap; }
}
