/* Shared reading theme: pale blue mathematical statements, pale green definitions, pale yellow examples,
   white proof steps and small serif text. Load after a page's own stylesheet. */
:root{--bg:#fff;--surface:#fff;--ink:#222;--muted:#666;--rule:#e6e6e6;
  --accent-soft:transparent;--prov-bg:transparent;--here-bg:transparent;--open-bg:transparent;
  --body:14px;--small:12.5px;--h1:20px;--h2:16px;--h3:14px}
html{font-size:14px}
body{background:#fff;color:var(--ink);font:14px/1.6 "Times New Roman",Times,serif}
main,main.hub,main.page{max-width:820px;margin:0 auto;padding:0 20px 40px}
header,body:has(>main.hub) header,body:has(>main.page) header{max-width:820px;margin:0 auto;padding:22px 20px 4px}
h1{font-size:20px;font-weight:600;margin:4px 0 6px}
h2{font:600 16px/1.35 "Times New Roman",Times,serif;border:0;padding:0;margin:26px 0 10px}
h3{font-size:14px;font-weight:600}
p,li{font-size:14px}
.kicker,.sub,.small{color:var(--muted)}
.site-nav,nav.top{background:#fff;box-shadow:none;border-bottom:1px solid var(--rule)}
.page-figure{display:none}
.tag{background:none!important;padding:0;border-radius:0;font-weight:500}
/* statements: one light transparent blue panel, no border */
.proposition,.proposition-cards>article{background:transparent;border:0;border-radius:6px;padding:12px 16px;margin:16px 0}
.proposition-cards{gap:14px}.proposition-cards>article{margin:0}
.button-link{background:none;border:0;padding:0;font:inherit;font-size:13px}
table.levels{background:none;border:0}
/* sections: same heading size, a thin rule between them */
.hub>section,.page>section{margin:0;padding:20px 0}
.hub>section+section,.page>section+section{border-top:1px solid var(--rule)}
.hub>section>h2,.page>section>h2{border:0;padding:0}
.definitions-toggle>summary{list-style:none;font:inherit}
.definitions-toggle>summary::-webkit-details-marker{display:none}
.definitions-toggle>summary>h2{display:block;margin:0;font:600 16px/1.35 "Times New Roman",Times,serif}
/* no box around a whole page; each proof step in its own thin untinted box */
.panel{background:none;border:0;border-radius:0;overflow:visible}
.panel-head{padding:0 0 6px;border:0}
.introduction-body{max-width:none;padding:0}
.proof-step,li.proof-step{background:#fff;border:1px solid var(--rule);border-radius:6px;padding:12px 16px;margin:14px 0}
.setting>summary{font:600 14px/1.5 "Times New Roman",Times,serif;color:var(--ink)}
nav.top .row{max-width:820px;padding:12px 20px}
nav.top+main{padding-top:24px}
.step-figure img{background:#fff}
.proposition-cards .katex-display{overflow-x:auto;overflow-y:hidden}
.hub>section>h2,.page>section>h2,.panel-head>h2{margin-top:0}
/* light only: the theme is white whatever the system setting */
:root{color-scheme:light}
section>h2,section.q>h2{font:600 16px/1.35 "Times New Roman",Times,serif}
/* other statement blocks: plain white boxes; the page's target statement gets the blue panel */
.stmt,.stmt[data-kind],.card,.knowl-box,.qa,.comment,.answer,.review,.mock-block,.mail,.gh{background:#fff;border:1px solid var(--rule);border-radius:6px}
.stmt.target,.verdict{background:transparent;border:0;border-radius:6px}
.key{background:none;border:0;padding:0}
.knowl-body{background:none;border-left:2px solid var(--rule);border-radius:0}
.edit{background:none;border-left:2px solid var(--rule)}
.status,td.done a.ai{background:none}
section.q{border-top:1px solid var(--rule)}
nav.site a.here,nav.site .util button[aria-pressed="true"]{background:none;font-weight:600}
@media (prefers-color-scheme:dark){mark.cg-hl{background:#fde68a}mark.cg-hl.cg-pending{background:#bfdbfe}}
/* status notes and status chips: plain text, the colour stays in the label */
.audit,.audit.ok,.audit.minor,.audit.error,.audit.inherited,.audit.corr{background:none;border:0;border-left:2px solid var(--rule);border-radius:0}
.prop-status,.prop-status.ok,.prop-status.proved,.prop-status.cond,.prop-status.fail,.prop-status.open{background:none}
.prop-card{background:transparent;border:0;border-radius:6px;padding:12px 16px}
details.orig{background:#fff}
/* claim blocks and side notes on explain pages: a plain box, or a plain rule for notes */
.claim,.claim.def,.claim.here,.claim.heur,.claim.prov,.claim.open{border:1px solid var(--rule);border-radius:6px;padding:10px 14px}
.dont,.summary,.quote,details.why>.body{background:none;border-left:2px solid var(--rule)}
/* Shared mathematical reading pages: quiet statements, locally grouped arguments. */
.prop-card .prop-statement,.prop-card .prop-math{background:none;border:0;padding:0}
.prop-card.tone-proved,.prop-card.tone-cond,.prop-card.tone-open{border:0}
.prop-card .prop-head,.prop-card .small{font-family:inherit}
.prop-parts li,.prop-parts li.proved,.prop-parts li.cond,.prop-parts li.open{border:0;border-radius:0;padding:0}
.prop-cards,.prop-card,.prop-stmt{min-width:0}
.table-wrap{max-width:100%;overflow-x:auto;overflow-y:hidden}
.katex{position:relative}.katex .katex-mathml{left:0;top:0;overflow:hidden}
.stmt,.stmt[data-kind],.claim{border-left-width:1px;padding:10px 14px;margin:14px 0}
.statement-group .stmt,.statement-group .claim,.statement-group .proposition{background:none;border:0;border-radius:6px}
.statement-group .stmt .stmt,.statement-group .claim .claim{background:none}
.stmt>details,.claim>details,.proposition>details{margin:8px 0 0}
.step-argument,.step-sources,details.proof{background:none;border:0;border-radius:0;padding:0}
.step-argument>summary,.step-sources>summary,details.proof>summary{font:inherit;color:#666;padding:3px 0}
.proof-phase{margin:26px 0 8px;border-bottom:1px solid var(--rule);padding-bottom:5px}
ol.steps{list-style:none;padding:0;counter-reset:step}
ol.steps>.proof-step{counter-increment:step}
ol.steps>.proof-step>h4::before{content:counter(step) ". ";color:#666}
.proof-step h4{font:600 var(--body)/1.5 "Times New Roman",Times,serif;margin:0 0 4px}
.proof-plan a{white-space:normal}.step-why{color:#666}
.subtabs{display:flex;flex-wrap:wrap;gap:5px 18px;list-style:none;padding:10px 20px;margin:0 auto;max-width:820px;border-bottom:1px solid var(--rule)}
.subtabs a[aria-current=page]{font-weight:600}
.katex-display{max-width:100%;overflow-x:auto;overflow-y:hidden}
.cd-figure{margin:18px 0}.cd-scroll{overflow-x:auto}.cd-scroll img{display:block;max-width:none;margin:auto}
figure{margin:18px 0}figure img{max-width:100%;height:auto}figcaption{font:var(--small)/1.5 "Times New Roman",Times,serif;color:#666;margin-top:6px}
table{max-width:100%}caption{text-align:left;font-weight:600;margin-bottom:6px}
.pager{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:26px 0 0;padding-top:12px;border-top:1px solid var(--rule)}
@media(max-width:560px){main,main.hub,main.page{padding-left:16px;padding-right:16px}.subtabs{padding-left:16px;padding-right:16px}.dict-table{display:block;overflow-x:auto}.proof-step,li.proof-step{padding:10px 12px}}
/* Apply the same reading scale to legacy explanation and generated run pages. */
body main,body main.hub,body main.page{box-sizing:border-box;width:100%;max-width:820px;min-width:0}
main h1,main h2,main h3,main h4,main h5{font-family:"Times New Roman",Times,serif;line-height:1.4}
body main h1{font-size:20px}body main h2,body main summary h2{font-size:16px;font-weight:600}
body main h3,body main h4,body main h5{font-size:14px}
main p,main li,main summary,main .lead,main .small,main .stmt-head,main .step-goal,main .step-why{font-family:"Times New Roman",Times,serif}
main .lead{font-size:14px;line-height:1.6}
main .small,main caption,main table.md{font-size:12.5px}
main table.md,main table.compare{font-family:"Times New Roman",Times,serif}
main>.card.problem{background:none;border:0;padding:0}
main .proposition,main .stmt.target,main .stmt.prop,main .claim.prop{background:transparent;border:0;border-radius:6px}
main .stmt[data-kind="def"],main .stmt[data-kind="definition"],main .claim.def,main .definition,main .def-box{background:rgba(92,184,125,.10);border:0;border-radius:6px;padding:10px 14px}
main .statement-group .stmt,main .statement-group .claim,main .statement-group .proposition{background:none;border:0}
main .statement-group .stmt .stmt,main .statement-group .claim .claim{background:none}
main .proof-step,main li.proof-step{background:#fff;border:1px solid var(--rule);border-radius:6px}
main .proof-step .role-label{background:none;border:0;padding:0}
main .stmt>details.proof,main .stmt>details.step-argument,main .proposition>details.proof{background:none;border:0;padding:0}
main .step-argument>summary,main .step-sources>summary,main details.proof>summary{font-family:inherit;font-size:14px;color:#666}
main .disclosure-context{font-size:12.5px;color:#666}
main .table-scroll,main .tablewrap{max-width:100%;overflow-x:auto;overflow-y:hidden}
main pre{max-width:100%;overflow-x:auto}
main .grid,main .two,main .cols,main .cards{min-width:0}
main .grid>*,main .two>*,main .cols>*,main .cards>*{min-width:0}
details.step>summary h2::before,details.definitions-toggle>summary h2::before{content:none}
main details.step{background:none;border:0;border-radius:0;padding:0}
main section+section{border-top:1px solid var(--rule)}
@media(max-width:560px){main .two,main .cols{grid-template-columns:minmax(0,1fr)}main .cards{grid-template-columns:minmax(0,1fr)}}

main .stmt.target{box-shadow:none}

/* Semantic colors: results blue, setup/definition/notation green, examples yellow; prose unshaded. */
body main .proposition,body main .prop-card,body main .stmt,body main .claim,body main .card,body main .verdict{background:none;box-shadow:none}
body main .setting,body main .definition,body main .def-box,body main .claim.def,body main :is(.stmt,.claim,.proposition,.card)[data-kind="def"],body main :is(.stmt,.claim,.proposition,.card)[data-kind="definition"],body main :is(.stmt,.claim,.proposition,.card)[data-kind="setup"]{background:rgba(92,184,125,.10);border:0;border-radius:6px;padding:10px 14px}
body main .example,body main .claim.ex,body main :is(.stmt,.claim,.proposition,.card)[data-kind="ex"],body main :is(.stmt,.claim,.proposition,.card)[data-kind="example"]{background:rgba(255,213,79,.12);border:0;border-radius:6px;padding:10px 14px}
body main .proof-step{background:none}
main{overflow-wrap:anywhere}
main .katex{overflow-wrap:normal}
main .proof-plan,main .proof-plan a{white-space:normal}
main .katex:not(.katex-display .katex){display:inline-block;max-width:100%;overflow-x:auto;overflow-y:hidden;vertical-align:middle}
main .katex-display{text-align:center}
main .katex-display>.katex{text-align:initial}
main .step-figure{max-width:100%}

/* Result statements own the blue box; surrounding prose and proof steps stay white. */
body main :is(.proposition,.prop-card,.stmt.target,.lemma,.corollary),
body main :is(.stmt,.claim,.card,.proposition)[data-kind="lemma"],
body main :is(.stmt,.claim,.card,.proposition)[data-kind="prop"],
body main :is(.stmt,.claim,.card,.proposition)[data-kind="proposition"],
body main :is(.stmt,.claim,.card,.proposition)[data-kind="cor"],
body main :is(.stmt,.claim,.card,.proposition)[data-kind="corollary"]{background:rgba(51,139,222,.07);border:0;border-radius:6px;padding:12px 16px}
body main :is(.stmt,.claim,.card,.proposition)[data-kind="notation"],body main .notation-block{background:rgba(92,184,125,.10);border:0;border-radius:6px;padding:10px 14px}

body main .notation:not([hidden]),body main .notation-block{background:rgba(92,184,125,.10);border:0;border-radius:6px;padding:10px 14px}
/* Every named proof step, and each numbered step inside a proof, has a white box. */
body main .proof-step,body main li.proof-step,
body main ol.argument-steps>li,
body main .proof>ol>li,body main .step-argument>ol>li,
body main .local-argument>ol>li{background:#fff;border:1px solid var(--rule);border-radius:6px;padding:12px 16px;margin:12px 0}
body main :is(.proof,.step-argument,.local-argument)>ol{padding-left:22px}
/* Comment-based reader reports. */
.preferences-report .theme-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(80px,2fr) 3em;gap:12px;align-items:center;margin:10px 0}
.preferences-report meter{width:100%;height:16px;accent-color:#338bde}
.preferences-report .preference-comment{padding:18px 0;border-top:1px solid var(--rule)}
.preferences-report .verbatim{white-space:pre-wrap}
.preferences-report select{font:inherit;max-width:100%;padding:4px 12px;background:white;border:1px solid var(--rule);border-radius:4px}
/* Reader-review examples: diagrams describe the mathematics within proof steps. */
.reader-review .question{padding-top:24px;margin-top:36px}
.reader-review .reader-comment{border-left:2px solid var(--rule);padding-left:14px;margin:16px 0}
.reader-review .reader-comment .verbatim{white-space:pre-wrap}
.reader-review .review-flow{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}
.reader-review .review-flow>div{flex:1 1 160px;border:1px solid var(--rule);border-radius:6px;padding:12px;min-width:0}
.reader-review .review-flow p{margin:4px 0}
.reader-review .review-control{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.reader-review select,.reader-review input{font:inherit;max-width:100%}
.reader-review .diagram-scroll{overflow-x:auto;max-width:100%}
.reader-review .degree-grid{display:grid;grid-template-columns:70px repeat(9,minmax(23px,1fr)) 30px;gap:4px;align-items:center;min-width:355px}
.reader-review .degree-row{display:contents}
.reader-review .degree-cell{text-align:center;padding:5px 0;border:1px solid var(--rule);border-radius:3px;color:#777}
.reader-review .degree-cell.occupied{background:rgba(51,139,222,.07);color:#222}
.reader-review .spectrum{display:grid;grid-template-columns:70px repeat(4,minmax(40px,1fr));gap:4px;max-width:480px}
.reader-review .spectrum>span{padding:7px;text-align:center;border:1px solid var(--rule)}
.reader-review .spectrum .corner{background:rgba(51,139,222,.07);font-weight:600}
.reader-review .spectrum .zero{color:#888}
.reader-review .proposed-edit{border-left:2px solid var(--rule);padding-left:12px}
.reader-review .proof-step h4 .number{font-weight:400;color:#666}
.reader-review ol.steps>.proof-step>h4::before{content:none}
/* Shared reader-page tabs, including pages without a workspace stylesheet. */
body.collaboration-page{max-width:none;margin:0;padding:0}
.collaboration-nav{position:relative;z-index:30;display:block;padding:0;border:0;border-bottom:1px solid var(--rule);background:#fff;box-shadow:none;font:14px/20px "Times New Roman",Times,serif}
.collaboration-nav .nav-bar{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:4px 20px;max-width:820px;margin:0 auto;padding:0 20px;list-style:none}
.collaboration-nav .nav-bar>li{display:flex;align-items:center;position:relative;margin:0;padding:0;list-style:none}
.collaboration-nav .nav-bar>li>a{display:block;padding:13px 0;color:var(--muted);text-decoration:none;font:inherit;white-space:nowrap}
.collaboration-nav .nav-bar>.nav-current>a{color:var(--ink);font-weight:600;border-bottom:2px solid #338bde}
.collaboration-nav .nav-bar>li>a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.collaboration-nav .nav-bar>li>a:focus-visible{outline:2px solid #338bde;outline-offset:3px}
.collaboration-nav+main,.collaboration-subtabs+main{padding-top:24px}
.collaboration-subtabs{box-sizing:border-box;gap:6px 18px;padding-top:10px;padding-bottom:10px}
body.reading-page a{color:#245d7a}
body.reading-page table{width:100%;border-collapse:collapse;margin:18px 0}
body.reading-page th,body.reading-page td{text-align:left;vertical-align:top;padding:8px 10px;border-bottom:1px solid var(--rule)}
body.reading-page th{font-weight:600;color:var(--muted)}
@media(max-width:560px){.collaboration-nav .nav-bar{gap:0 14px;padding:0 16px}.collaboration-nav .nav-bar>li>a{padding:10px 0}.collaboration-subtabs{padding-left:16px;padding-right:16px}}
.reader-review .proof-plan{margin:12px 0}.reader-review .proof-plan a{margin-right:16px}

/* Phone reading: retain the desktop theme, with readable text and usable controls. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(max-width:600px){
  :root{--body:16px;--small:14px;--h3:16px}
  body{font-size:16px;line-height:1.65;margin-left:0;margin-right:0}
  main p,main li,main summary,main .lead,main .small,main .stmt-head,main .step-goal,main .step-why{font-size:16px}
  body main h3,body main h4,body main h5,main .step-argument>summary,main .step-sources>summary,main details.proof>summary{font-size:16px}
  main .small,main caption,main table.md,main .disclosure-context{font-size:14px}
  main input,main select,main textarea{font-size:16px}
  main summary{padding-top:8px;padding-bottom:8px}
  main .grid,main .two,main .cols,main .cards{grid-template-columns:minmax(0,1fr)}
  main img,main video,main iframe{max-width:100%}
  main svg{max-width:100%;height:auto}
  nav .nav-bar,nav.site .inner{flex-wrap:wrap;white-space:normal}
  nav .th-home,nav .th-find{min-width:40px;min-height:40px}
  .collaboration-nav .nav-bar>li>a{min-height:44px;box-sizing:border-box}
}

.mobile-table-scroll{max-width:100%;overflow-x:auto;overflow-y:hidden}
/* HyperCube reading pages: preserve scientific display sizes inside local scrollers. */
.hypercube .scientific-scroll{max-width:100%;overflow-x:auto;overflow-y:hidden}
.hypercube .roadmap{overflow:hidden}
.hypercube .roadmap svg{min-width:760px;max-width:none}
.hypercube ol.steps{display:block;counter-reset:st;list-style:none;padding-left:0;color:var(--ink)}
.hypercube ol.steps>li{color:var(--ink);counter-increment:st}
.hypercube ol.steps>li::before{content:counter(st) ". ";font-weight:600}
.hypercube .lab-matrices{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:18px;min-width:660px;padding:8px 2px}
.hypercube .lab-matrices h3{text-align:center;margin:0 0 10px}
.hypercube .lab-matrices .matrix-svg{max-width:150px;min-width:120px;margin:auto}
.hypercube .matrix-svg text{font:var(--small)/1.2 Arial,sans-serif;fill:var(--ink)}
.hypercube .widget .panel{border-top:1px solid var(--rule);padding:14px 0;margin:14px 0}
.hypercube .ctrl label{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.hypercube .ctrl button,.hypercube nav button{min-height:36px}
.hypercube figure img{display:block;width:100%;height:auto}
.hypercube figure img.scientific-plot{min-width:620px;max-width:none}
.hypercube #cost-plot svg{min-width:620px;max-width:none}
.hypercube :focus-visible{outline:2px solid #338bde;outline-offset:3px}
.hypercube .source-extract{margin:16px 0;padding:10px 12px;border:1px solid var(--rule);border-radius:6px;background:white}
.hypercube .source-extract figure{margin:8px 0}
.hypercube .source-crop{min-width:620px;max-width:none}
.hypercube #motivation{padding-bottom:18px;border-bottom:1px solid var(--rule)}
@media(max-width:600px){
  main table{overflow-wrap:normal}
  main table th,main table td{min-width:7em}
  main table code{overflow-wrap:anywhere}
}

/* One navigation shell for Tools: primary pages and nested tabs in a left rail. */
body.tools-has-sidebar{display:block;box-sizing:border-box;width:auto;max-width:none;min-width:0;margin:0;padding:0 0 0 250px}
.tools-sidebar{box-sizing:border-box;position:fixed;inset:0 auto 0 0;z-index:60;width:250px;height:100vh;height:100dvh;display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--rule);font:14px/1.45 "Times New Roman",Times,serif;text-align:left}
.tools-sidebar *{box-sizing:border-box}
.tools-sidebar-top{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 14px;border-bottom:1px solid var(--rule)}
.tools-sidebar-top .th-home,.tools-sidebar-top .th-find{position:static!important;width:36px;min-height:36px;padding:6px!important;color:var(--ink)}
.tools-sidebar-top .th-find{margin-left:auto}
.tools-sidebar-toggle{display:none;min-height:36px;padding:6px 10px;border:1px solid var(--rule);border-radius:6px;background:#fff;color:var(--ink);font:inherit;cursor:pointer}
.tools-sidebar-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 10px 24px;scrollbar-width:thin}
.tools-sidebar nav,.tools-sidebar .site-nav.side{position:static!important;width:auto;max-width:none;height:auto;margin:0;padding:0;border:0;background:#fff;box-shadow:none;font:inherit}
.tools-sidebar :is(.nav-bar,.side-top,.side-list,.inner,.row,.subnav,.subtabs){display:flex!important;flex-direction:column;align-items:stretch;gap:2px;width:100%;max-width:none;min-width:0;margin:0;padding:0!important;overflow:visible;white-space:normal;list-style:none;border:0;box-shadow:none;font:inherit}
.tools-sidebar :is(.nav-bar,.side-list,.subtabs)>li{display:block;position:static;margin:0!important;padding:0;border:0;box-shadow:none!important;list-style:none}
.tools-sidebar :is(a,button,summary){font:inherit;white-space:normal;overflow-wrap:anywhere}
.tools-sidebar nav>a,
.tools-sidebar :is(.nav-bar,.side-list,.inner,.row,.subtabs)>a,
.tools-sidebar :is(.nav-bar,.side-list,.subtabs)>li>a,
.tools-sidebar :is(summary,button:not(.th-find):not(.th-home):not(.tools-sidebar-toggle)),
.tools-sidebar .tools-nav-group>a{display:block;width:100%;min-height:36px;margin:0;padding:8px 10px;border:0;border-left:2px solid transparent;border-radius:4px;background:none;color:var(--muted);text-align:left;text-decoration:none!important;box-shadow:none!important;cursor:pointer}
.tools-sidebar a:hover,.tools-sidebar summary:hover,.tools-sidebar button:hover{background:#f5f8fb;color:var(--ink);text-decoration:none!important}
.tools-sidebar :is(a,button,summary):focus-visible{outline:2px solid #338bde;outline-offset:-2px}
.tools-sidebar .tools-sidebar-body :is(a[aria-current="page"],a.here,.nav-current>a){border:0;border-left:2px solid #338bde;background:rgba(51,139,222,.07);color:var(--ink);font-weight:600;text-decoration:none!important;box-shadow:none!important}
.tools-sidebar .nav-home>a{font-weight:600;color:var(--ink)}
.tools-sidebar :is(.nav-menu,.subtabs,.subrow,.row.second,.side-grp ul){position:static!important;inset:auto!important;width:auto!important;min-width:0;max-width:100%;margin:2px 0 8px 12px;padding:0 0 0 8px!important;border:0;border-left:1px solid var(--rule);border-radius:0;background:#fff;box-shadow:none;list-style:none}
.tools-sidebar .subtabs{width:auto}
.tools-sidebar .subrow[hidden]{display:none!important}
.tools-sidebar .nav-menu a{display:block;padding:8px 10px;text-decoration:none!important}
.tools-sidebar .nav-menu li{margin:0;list-style:none}
.tools-sidebar :is(.nav-bar,.side-list,.tools-nav-group) summary{list-style:none}
.tools-sidebar summary::-webkit-details-marker{display:none}
.tools-sidebar :is(.nav-bar,.side-list,.tools-nav-group) summary::after{content:none}
.tools-sidebar :is(.nav-tab>details,.side-grp,.tools-nav-group)>summary::before{content:"›";display:inline-block;width:14px;margin:0 3px 0 0;border:0;transform:none;color:#666}
.tools-sidebar :is(.nav-tab>details,.side-grp,.tools-nav-group)[open]>summary::before{transform:rotate(90deg)}
.tools-sidebar .tools-nav-group>summary,.tools-sidebar .side-grp>summary.cur{color:var(--ink);font-weight:600}
.tools-sidebar :is(.side-body,.side-top){display:block!important}
.tools-sidebar :is(.side-menu,.th-li:empty,.side-find:empty){display:none!important}
.tools-sidebar :is(.util,.nav-cost,.side-cost){display:block;margin:8px 0 0!important;padding:8px 0 0;border-top:1px solid var(--rule);white-space:normal}
.tools-sidebar :is(.cost-menu,.nav-cost .cost-menu){position:static!important;inset:auto!important;box-sizing:border-box;width:100%!important;max-width:100%;min-width:0;margin:0;padding:8px;overflow-x:auto;white-space:normal;border:0;border-radius:0;box-shadow:none;font-size:12.5px}
.tools-sidebar .nav-cost summary{display:flex;flex-wrap:wrap;gap:2px 8px;min-height:36px}
.tools-sidebar .nav-long{position:static!important;display:inline;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal}
.tools-has-sidebar main{min-width:0}
@media(min-width:900px){.tools-has-sidebar main .stage{width:calc(100vw - 290px);max-width:calc(100vw - 290px)}}
@media(max-width:899px){
  body.tools-has-sidebar{padding:0}
  .tools-sidebar{position:sticky;inset:auto;top:0;width:100%;height:auto;border-right:0;border-bottom:1px solid var(--rule)}
  .tools-sidebar-top{min-height:52px;border-bottom:0}
  .tools-sidebar-toggle{display:block}
  .tools-sidebar-body{display:none;position:absolute;top:100%;left:0;width:min(300px,100vw);max-height:calc(100dvh - 60px);border:1px solid var(--rule);border-left:0;background:#fff;box-shadow:4px 8px 16px rgba(0,0,0,.08)}
  .tools-sidebar.is-open .tools-sidebar-body{display:block}
  .tools-sidebar :is(a,button,summary){min-height:44px}
}
/* Length-zero explanation and inline source passages. */
.lengthzero .page > details.topic { padding: 22px 0; border-top: 1px solid #e6e6e6; }
.lengthzero details.topic > summary { list-style: none; cursor: pointer; }
.lengthzero details.topic > summary::-webkit-details-marker { display: none; }
.lengthzero details.topic > summary h2 { display: inline; }
.lengthzero .roadmap, .lengthzero .mechanism-row, .lengthzero .page-map { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.lengthzero .roadmap a, .lengthzero .page-map a { border: 1px solid #e6e6e6; padding: 5px 9px; border-radius: 4px; }
.lengthzero .page-map a { flex: 1 1 205px; }
.lengthzero :is(.roadmap,.page-map) { display: block; overflow-x: auto; }
.lengthzero :is(.roadmap,.page-map) svg { display: block; max-width: none; }
.lengthzero a.map-node { display: flex; align-items: center; box-sizing: border-box; min-height: 80px; margin: 0; padding: 8px; color: #333; text-decoration: none; background: #fff; }
.lengthzero a.map-node[data-kind="def"] { background: rgba(92,184,125,.10); }
.lengthzero a.map-node[data-kind="prop"] { background: rgba(51,139,222,.07); }
.lengthzero a.map-node[data-kind="question"] { background: rgba(255,213,79,.12); }
.lengthzero .mechanism-row a { flex: 1 1 160px; text-align: center; }
.lengthzero .pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid #e6e6e6; }
.lengthzero .display-controls { text-align: right; }
.lengthzero .change { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 15px 0; }
.lengthzero .widget { border: 1px solid #e6e6e6; border-radius: 6px; padding: 16px; }
.lengthzero #chain-figure, .lengthzero #cost-plot { overflow-x: auto; }
.lengthzero #chain-picture svg { display: block; min-width: var(--chain-width, 375px); width: var(--chain-width, 375px); max-width: none; margin: 0 auto; }
.lengthzero #cost-plot svg { display: block; min-width: 640px; width: 100%; }
.lengthzero svg text { font-family: inherit; font-size: 14px; fill: #444; }
.lengthzero .exercise { margin: 22px 0; padding: 15px 0; border-top: 1px solid #e6e6e6; }
.lengthzero .exercise textarea { display: block; width: 100%; box-sizing: border-box; margin: 8px 0; padding: 10px; color: #222; background: #fff; border: 1px solid #ccc; font: inherit; }
.lengthzero .exercise label { display: block; }
.lengthzero .exercise .feedback { margin-top: 14px; }
.lengthzero :is(.change,.display-controls,.exercise) button { min-height: 36px; padding: 5px 8px; font: inherit; }
.lengthzero button:disabled { opacity: .5; cursor: default; }
.lengthzero .tag { margin-left: 8px; color: #49778b; }
.source-citation { margin: 10px 0; }
.source-citation > summary { color: #666; cursor: pointer; }
.source-transclusion { margin: 12px 0; padding: 14px; border: 1px solid #e6e6e6; border-radius: 5px; background: #fff; }
.source-excerpt { margin: 10px 0; padding: 3px 12px; border-left: 2px solid #d2b45f; background: rgba(255,213,79,.12); }
.source-excerpt p { margin: 6px 0; }
.source-cite { text-decoration-style: dotted; }
.source-cite + .source-cite { margin-left: .5em; }
.question-box { margin: 22px 0; padding: 16px; border: 1px solid #e6e6e6; border-radius: 6px; background: #fff; }
.question-box h3 { margin-top: 0; }
.lengthzero .stmt[data-kind="ex"] { background: rgba(255,213,79,.12); }
.lengthzero .stmt[data-kind="def"] { background: rgba(92,184,125,.10); }
@media (max-width:600px) {
  .lengthzero .widget, .source-transclusion, .question-box { padding: 12px; }
  .lengthzero .mechanism-row { flex-direction: column; align-items: stretch; }
  .lengthzero .mechanism-row a { flex-basis: auto; }
  .lengthzero .mechanism-row > span { text-align: center; transform: rotate(90deg); }
}

/* Length-zero pages use the same reading shell as their parent proof pages. */
.lengthzero { --accent-ink:#2667a8; }
.lengthzero *, .lattice-lab * { box-sizing:border-box; }
.lengthzero main { padding-top:20px; }
body.lengthzero main > header { display:block; max-width:none; padding:0 0 14px; }
.lengthzero main a { color:#2667a8; text-decoration:none; }
.lengthzero main a:hover { text-decoration:underline; }
.lengthzero main p { margin:9px 0; }
.lengthzero .page > details.topic > summary h2 { margin:0; }
.lengthzero main table { width:100%; border-collapse:collapse; }
.lengthzero main :is(th,td) { padding:8px 10px; text-align:left; vertical-align:top; border-bottom:1px solid var(--rule); }
.lengthzero main th { color:var(--muted); font-weight:600; }
.lengthzero .display-controls { margin:0; }
.lengthzero .display-controls button { border:0; padding:4px 0; background:none; color:var(--muted); cursor:pointer; }
.lengthzero .display-controls button:hover { color:var(--accent-ink); }
.lengthzero .tools-sidebar .nav-cost p { padding:0 10px; font-size:var(--small); }
.lengthzero .tools-sidebar .nav-menu a { color:var(--muted); }
.lengthzero .tools-sidebar .nav-menu a[aria-current="page"] { color:var(--ink); }
.lengthzero .mechanism-row a { padding:8px 0; }
.lengthzero .stmt-head { margin-top:0; }
.lengthzero :focus-visible { outline:2px solid #338bde; outline-offset:3px; }

/* Lattice coefficients: preserve legible marks in a contained phone scroller. */
.lattice-lab { margin:22px 0; padding:16px; border:1px solid var(--rule); border-radius:6px; }
#lattice-nodes svg { display:block; max-width:none; margin:8px auto; overflow:visible; }
#lattice-nodes text { fill:var(--muted); font-family:inherit; font-size:var(--small); }
#lattice-nodes .lattice-edge { fill:none; stroke:#aaa; stroke-width:1; }
#lattice-edge-tip path { fill:#aaa; }
#lattice-nodes circle { fill:#fff; stroke:#777; stroke-width:1; }
#lattice-nodes .selected circle { fill:#2667a8; stroke:#2667a8; stroke-width:2; }
#lattice-nodes .selected text { fill:#2667a8; font-weight:600; }
.lattice-controls { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.lattice-controls button { font:inherit; min-height:36px; padding:5px 9px; color:var(--ink); background:#fff; border:1px solid var(--rule); border-radius:4px; cursor:pointer; }
.lattice-controls button:disabled { opacity:.4; cursor:default; }
.lattice-scroll { max-width:100%; overflow-x:auto; }
#lattice-readout { min-height:88px; }
#lattice-coefficients { display:grid; grid-template-columns:80px repeat(3,minmax(48px,1fr)); gap:5px; min-width:260px; align-items:center; }
#lattice-coefficients > span { padding:5px 2px; }
#lattice-coefficients .coefficient-axis { white-space:nowrap; }
#lattice-coefficients :is(.coefficient-coordinate,.coefficient-power,.coefficient-cell) { text-align:center; }
#lattice-coefficients .coefficient-cell { color:#999; border:1px solid var(--rule); border-radius:3px; }
#lattice-coefficients .allowed { color:#2667a8; background:rgba(51,139,222,.10); }
@media(max-width:600px) { .lattice-lab { padding:12px; } }

/* Experiment 2 reading theme (explain-math-html assets/reading-theme.css, 1 Nov 2026): the rules these pages lacked.
   Disclosures are marker-free; all text in the reading column is the body serif; table cells use the body size and
   captions the small size; inline mathematics is 1.1em. */
summary{list-style:none!important;cursor:pointer}
summary::-webkit-details-marker{display:none}
summary::marker{content:""}
main :is(p,li,dt,dd,summary,caption,th,td,figcaption,label,blockquote,legend,.kicker,.lead,.stmt-head){font-family:"Times New Roman",Times,serif!important}
main :is(input,select,textarea,button){font-family:inherit}
main :is(th,td){font-size:var(--body)}
main :is(caption,figcaption,.kicker,.disclosure-context){font-size:var(--small)}
main .katex{font-size:1.1em}
/* Reading text set by older site stylesheets in a sans face: status tags, audit notes, pagers, part labels, hypothesis
   chips and legends. Widget controls (buttons, sliders, tree lanes) keep their UI face, as on the Experiment 2 tree. */
main :is(.tag,.audit,.pager,.part-label,.hyp-ref,.legend,.readout),
main :is(.audit,.pager,.part-label,.legend) :not(code,pre,kbd,samp,.katex,.katex *){font-family:"Times New Roman",Times,serif!important}
/* A sub-page group whose summary has only screen-reader text shows its page count in the sidebar (site-home.js). */
.tools-sidebar .tools-group-label{color:var(--muted)}
