/* the hidden attribute always wins over display rules (filters, no-JS buttons) */
[hidden]{display:none !important}
/* images never overflow their column (older browsers too) */
img{max-width:100%;height:auto}
/* a linked heading or source stops a little below the top edge */
:target{scroll-margin-top:24px}
.lw-header{container-type:inline-size}
.lw-header a:focus-visible,.lw-header button:focus-visible{outline:3px solid #27302A;outline-offset:3px;box-shadow:0 0 0 3px #E3C58C}
.lw-skip{position:absolute;left:16px;top:-120px;z-index:10}
.lw-skip:focus{top:12px}
.lw-navlink:hover{background:#F7F5EE}
.lw-navlink.is-current{background:#F7F5EE;box-shadow:inset 0 -4px 0 #3F5B45}
.lw-menu-btn{display:none}
.lw-menu-btn:hover{background:#F7F5EE !important}
/* the top bar: logo and sections on one row; every section on wide screens, the primary three and More on
   laptops, the Menu button on tablets and phones (sitemap.json "primary", docs/build/site_nav.py) */
.lw-nav{display:block;flex:0 1 auto}
.lw-navlist{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:2px}
.lw-navlist>li{position:relative;display:flex}
.lw-header .lw-navlink{padding:0 8px !important;font-size:17px !important;white-space:nowrap}
.lw-header .lw-navhomeicon{width:48px;justify-content:center;padding:0 !important;border-radius:50% !important}
.lw-header .lw-navlink.lw-navhomeicon.is-current{background:#3F5B45 !important;color:#fff !important;box-shadow:none !important;border-radius:50% !important}
.lw-wordmark{white-space:nowrap}
.lw-navlist>li.lw-navmore{display:none}
.lw-header .lw-navmore-btn{gap:4px;padding:0 10px 0 12px !important;border:0;background:none;font-family:inherit;cursor:pointer}
.lw-navmore-btn:hover,.lw-navmore-btn[aria-expanded="true"]{background:#F7F5EE !important}
.lw-navmore-btn.is-current{background:#F7F5EE !important;box-shadow:inset 0 -4px 0 #3F5B45;border-radius:12px 12px 0 0 !important}
.lw-navmore-btn svg{opacity:.65;transition:transform .15s}
.lw-navmore-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.lw-navmore-panel{position:absolute;top:calc(100% + 8px);right:0;z-index:5;width:max-content;max-width:min(560px,calc(100vw - 40px));display:grid;grid-template-columns:repeat(3,auto);gap:4px 20px;box-sizing:border-box;padding:16px 18px;border-radius:20px;background:#fff;box-shadow:0 0 0 1px #E2E0D2,0 16px 36px rgba(39,48,42,.14)}
.lw-navmore-h{margin:0 0 4px;font:600 19px/1.25 'Fraunces',Georgia,'Times New Roman',serif}
.lw-navmore-panel ul{list-style:none;margin:0;padding:0}
.lw-header .lw-navmore-panel a{display:flex;align-items:center;min-height:44px;color:#3F5B45;font-size:17px;font-weight:600;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:#A3BDA9}
.lw-header .lw-navmore-h a{color:#27302A;font-size:19px;font-weight:600;text-decoration:none}
.lw-header .lw-navmore-panel a:hover{color:#2C4332;text-decoration-color:#3F5B45}
.lw-header .lw-navmore-panel a[aria-current="page"]{color:#27302A;text-decoration:none}
@container (max-width:1379px){
.lw-navlist>li.lw-nav-sec{display:none}
.lw-navlist>li.lw-navmore{display:flex}
}
@container (max-width:999px){
.lw-wordmark{white-space:normal}
.lw-menu-btn{display:inline-flex}
.lw-nav{display:none;width:100%;flex-basis:100%}
.lw-nav.is-open{display:block;max-height:calc(100vh - 88px);max-height:calc(100dvh - 88px);overflow-y:auto;overscroll-behavior:contain}
.lw-nav .lw-navlist{display:none}
.lw-nav.is-open .lw-navmap{display:grid}
}
/* while the menu is open, the logo link says where it goes: a house and "Home" on a line under the logo (site_nav.py) */
.lw-homehint{display:none}
@container (max-width:999px){
.lw-header:has(.lw-nav.is-open) a:has(> .lw-wordmark){display:grid !important;grid-template-columns:auto 1fr;column-gap:10px;row-gap:2px}
.lw-header:has(.lw-nav.is-open) .lw-wordmark{align-self:center}
.lw-header:has(.lw-nav.is-open) .lw-homehint{grid-column:1 / -1;display:inline-flex;align-items:center;gap:6px;justify-self:start;white-space:nowrap;color:#3F5B45;font-size:17px;font-weight:700;line-height:1.3;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:#A3BDA9}
.lw-header .lw-homehint .lw-house{width:20px;height:20px;flex:none}
.lw-header:has(.lw-nav.is-open) a:has(> .lw-wordmark):hover .lw-homehint{color:#2C4332;text-decoration-color:#3F5B45}
}
/* ---- search (search.js; the button is added by site_nav.py) ---- */
.lw-search-btn{flex:none;order:2;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:none;color:#27302A;cursor:pointer}
.lw-search-btn:hover{background:#F7F5EE}
.lw-header .lw-nav{order:1}
@container (max-width:999px){.lw-search-btn{order:1}.lw-header .lw-menu-btn{order:2}.lw-header .lw-nav{order:3}}
.lw-search{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-width:none;max-height:min(84vh,780px);margin:7vh auto auto;padding:0;border:0;border-radius:20px;background:#fff;color:#27302A;box-shadow:0 24px 60px rgba(39,48,42,.3);font-family:'Atkinson Hyperlegible Next','Atkinson Hyperlegible',Verdana,sans-serif;font-size:18px;line-height:1.5;flex-direction:column;overflow:hidden}
.lw-search[open]{display:flex}
.lw-search::backdrop{background:rgba(39,48,42,.5)}
.lw-search-form{flex:none;margin:0;padding:18px 20px 12px;border-bottom:1px solid #E2E0D2}
.lw-search-form label{display:block;margin:0 0 8px;font:600 21px/1.25 'Fraunces',Georgia,'Times New Roman',serif}
.lw-search-row{display:flex;align-items:center;gap:8px;padding:0 4px 0 14px;border:2px solid #3F5B45;border-radius:14px;color:#3F5B45}
.lw-search-row:focus-within{box-shadow:0 0 0 3px #E3C58C;border-color:#27302A}
.lw-search-row svg{flex:none}
.lw-search-row input{flex:1;min-width:0;min-height:52px;margin:0;padding:0;border:0;background:none;font:inherit;font-size:19px;color:#27302A;outline:none}
.lw-search-row input::placeholder{color:#6F786F}
/* one close button is enough: hide the browser's own clear button */
.lw-search-row input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.lw-search-x{flex:none;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:none;color:#27302A;cursor:pointer}
.lw-search-x:hover{background:#F7F5EE}
.lw-search-x:focus-visible,.lw-search-btn:focus-visible{outline:3px solid #27302A;outline-offset:2px;box-shadow:0 0 0 5px #E3C58C}
.lw-search-status{flex:none;margin:0;padding:10px 24px 2px;font-size:16px;color:#56605A}
.lw-search-results{flex:1 1 auto;min-height:0;list-style:none;margin:0;padding:4px 10px 14px;overflow-y:auto;overscroll-behavior:contain}
.lw-search-results a{display:block;padding:12px 14px;border-radius:14px;color:#27302A;text-decoration:none}
.lw-search-results a:hover,.lw-search-results a:focus{background:#F7F5EE}
.lw-search-results a:focus-visible{outline:3px solid #27302A;outline-offset:-3px}
.lw-sr-title{display:block;font-weight:700;color:#3F5B45;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:#A3BDA9}
.lw-sr-where{display:block;margin-top:2px;font-size:15px;color:#6F786F}
.lw-sr-snip{display:block;margin-top:4px;font-size:16px;line-height:1.5;color:#56605A}
.lw-search mark{background:#F3E2BC;color:inherit;border-radius:3px;padding:0 1px}
/* the words searched for, marked on the page a result opens (search.js) */
mark.lw-find{background:#F3E2BC;color:#27302A;border-radius:3px;padding:0 2px;box-shadow:0 0 0 2px #E3C58C}
@media (max-width:600px){.lw-search{width:100vw;height:100vh;height:100dvh;max-height:none;margin:0;border-radius:0}}
/* the menu row stays at the top while reading; the language bar above it scrolls away (menu.js sets --lw-stick) */
.lw-page .lw-header{position:sticky !important;top:var(--lw-stick,0px);z-index:40}
.lw-header.is-stuck{box-shadow:0 1px 0 #E2E0D2,0 8px 24px rgba(39,48,42,.08)}
.lw-header>div:not(.lw-langbar){row-gap:0 !important}
/* jumps to a heading or a source land below the pinned menu */
html{scroll-padding-top:84px}
/* back to top: appears once the reader is well down the page (menu.js) */
.lw-totop{position:fixed;right:20px;bottom:20px;z-index:45;display:grid;place-items:center;width:56px;height:56px;border:0;border-radius:50%;background:#3F5B45;color:#fff;box-shadow:0 8px 22px rgba(39,48,42,.25);cursor:pointer;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .2s,transform .2s}
.lw-totop.is-on{opacity:1;transform:none;pointer-events:auto}
.lw-totop:hover{background:#2C4332}
.lw-totop:focus-visible{outline:3px solid #27302A;outline-offset:3px;box-shadow:0 0 0 6px #E3C58C}
.lw-totop svg{width:26px;height:26px}
@media (prefers-reduced-motion:reduce){.lw-totop{transition:none}}
.lw-footer{container-type:inline-size;border-top:1px solid #E2E0D2}
.lw-footer a{color:#3F5B45 !important;text-decoration-thickness:2px;text-underline-offset:4px}
.lw-footer a:hover{color:#2C4332 !important;text-decoration-thickness:3px}
.lw-footer a:focus-visible{outline:3px solid #27302A !important;outline-offset:3px;box-shadow:0 0 0 3px #E3C58C}
.lw-footer .lw-foot-fix{margin:12px 0 0;color:#56605A;text-wrap:pretty}
.lw-footer .lw-foot-fix a{font-weight:700;overflow-wrap:anywhere}
.lw-footer h2{margin:0;font:600 22px/1.3 'Fraunces',Georgia,'Times New Roman',serif}
.lw-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.lw-footer li a{display:inline-flex;align-items:center;min-height:0;padding-block:11px;line-height:1.3}

/* ---- language switch ---- */
.lw-langbar{background:#F7F5EE;border-bottom:1px solid #E2E0D2}
.lw-langbar-in{max-width:1280px;margin:0 auto;box-sizing:border-box;padding:6px 20px;padding:6px clamp(20px,5cqi,48px);display:flex;justify-content:flex-end;align-items:center;gap:10px;color:#3F5B45}
.lw-lang{display:inline-flex;list-style:none;margin:0;padding:3px;gap:2px;border-radius:999px;background:#FFFFFF;box-shadow:inset 0 0 0 1.5px #C9CDBF}
.lw-lang li{display:flex}
.lw-lang a,.lw-lang .is-current{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;padding:0 18px;border-radius:999px;font-family:'Atkinson Hyperlegible Next','Atkinson Hyperlegible',Verdana,sans-serif;font-size:18px;font-weight:700;line-height:1;text-decoration:none}
.lw-header .lw-lang a{color:#3F5B45}
.lw-header .lw-lang a:hover{background:#EEF0E4;color:#2C4332}
.lw-lang .is-current{background:#3F5B45;color:#FFFFFF}

/* ---- shared reading floor (site-wide; page CSS may refine, never shrink) ---- */
::selection{background:#E3C58C;color:#27302A}
main{caret-color:#3F5B45}
/* citations: a small, quiet raised number (menu.js drops the brackets); selecting it shows the source in a
   pop-up. The invisible 48px square around it is the click and tap area, and the line does not move. */
main a.lw-c{position:relative;display:inline-block;padding:1px 2px;margin:0 -1px;font-size:.66em;font-weight:700;line-height:1;vertical-align:.55em;color:#56605A;text-decoration:none;border-radius:5px}
main a.lw-c::after{content:"";position:absolute;left:50%;top:50%;width:48px;height:48px;transform:translate(-50%,-50%)}
main a.lw-c:hover,main a.lw-c[aria-expanded="true"]{background:#3F5B45;color:#fff !important}
main .lw-csep{font-size:.66em;font-weight:700;vertical-align:.55em;color:#56605A}
/* a number and the comma after it never part (menu.js) */
.lw-cglue{white-space:nowrap}
/* a status chip and its source number move as one; the chip text may wrap */
.lw-cunit{display:inline-flex;align-items:flex-start;gap:3px;max-width:100%}
.lw-cunit>:first-child{min-width:0}
main .lw-cunit>a.lw-c{flex:none;margin-top:-3px}
.lw-cunit-p{align-self:flex-end;margin-left:-2px}
.lw-cb{display:none}
main .lw-c-solo .lw-cb{display:inline}
/* a citation alone in a table cell or list of sources keeps full size, on the line */
main .lw-c-solo a.lw-c,main a.lw-c.lw-c-solo{font-size:inherit;vertical-align:baseline;font-weight:600;color:#3F5B45;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
main .lw-c-solo .lw-csep{font-size:inherit;vertical-align:baseline}
/* the source pop-up (menu.js) */
.lw-srcpop{position:absolute;z-index:60;width:min(400px,calc(100vw - 32px));box-sizing:border-box;padding:16px 18px 14px;border-radius:16px;background:#fff;color:#27302A;box-shadow:0 0 0 1px #E2E0D2,0 18px 40px rgba(39,48,42,.18);font-family:'Atkinson Hyperlegible Next','Atkinson Hyperlegible',Verdana,sans-serif;font-size:16px;line-height:1.5}
.lw-srcpop:focus{outline:none}
.lw-srcpop:focus-visible{outline:3px solid #27302A;outline-offset:2px}
.lw-srcpop-h{margin:0 0 6px;font-size:13px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#8C4A2F}
.lw-srcpop p{margin:0}
.lw-srcpop a{display:inline-flex;align-items:center;min-height:44px;color:#3F5B45;font-weight:700;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:#A3BDA9}
.lw-srcpop a:focus-visible{outline:3px solid #27302A;outline-offset:2px;box-shadow:0 0 0 3px #E3C58C}
.lw-srcpop-all{margin-top:6px !important;padding-top:4px;border-top:1px solid #E2E0D2}
/* a word, its citations and the closing punctuation stay on one line (docs/build/cite_nowrap.py) */
.lw-nw{white-space:nowrap}
/* the honey focus halo on every form control and disclosure, not only links */
main :is(input,select,textarea,summary,button):focus-visible{outline:3px solid #27302A;outline-offset:3px;box-shadow:0 0 0 3px #E3C58C}

/* ---- layout consistency (visual review) ---- */
/* padded panels end on the same right edge as the text column */
.lw-prose>*{box-sizing:border-box}
main .lw-prose :is(p,li){text-wrap:pretty}
/* headings and fold-out titles wrap in balanced lines, without a lone last word */
.lw-prose h3,.lw-fold>summary,.tr-more>summary{text-wrap:balance}
/* "On this page": two even columns, links top-aligned with even spacing */
main .lw-toc ul{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));align-items:start;gap:4px 32px}
main .lw-toc a{display:inline-block;min-height:0;min-width:44px;padding-block:8px;text-wrap:balance}
/* phones: logo, name and Menu share one row in both languages */
@container (max-width:480px){
.lw-header a:has(> .lw-wordmark){flex:1 1 0 !important;gap:10px !important}
.lw-header a:has(> .lw-wordmark) svg{width:48px;height:48px}
/* room for the site name on two lines beside Search and Menu */
.lw-header>div:not(.lw-langbar){column-gap:6px !important}
.lw-header .lw-search-btn{width:44px}
.lw-header .lw-menu-btn{padding:0 14px !important}
}
/* the current page in the menu: a straight bar under a rounded tab */
.lw-header .lw-navlink.is-current{border-radius:12px 12px 0 0 !important}
/* longer sub-page rows (four or more pages): balanced rows on desktops, a tidy two-column grid on phones */
@container (max-width:560px){
.lw-subnav:has(> li:nth-child(4)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.lw-page .lw-subnav:has(> li:nth-child(4)) .lw-pill{width:100%;justify-content:center;padding:8px 16px;border-radius:18px;line-height:1.25;text-align:center}
.lw-subnav:has(> li:nth-child(4))>li:last-child:nth-child(odd){grid-column:1/-1}
/* pills in one row share a height */
.lw-subnav:has(> li:nth-child(4))>li{display:flex}
.lw-page .lw-subnav:has(> li:nth-child(4)) .lw-pill{flex:1}
}

/* ---- navigation built from docs/site-data/sitemap.json (docs/build/site_nav.py) ---- */
/* the open menu: every section with its pages */
.lw-navmap{display:none;grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));gap:12px;padding:8px 0 20px}
.lw-navgrp{padding:14px 18px 8px;border-radius:20px;background:#F7F5EE}
.lw-navgrp.is-current{background:#EEF0E4;box-shadow:inset 0 0 0 2px #A3BDA9}
.lw-navgrp-h{margin:0 0 2px;font:600 21px/1.25 'Fraunces',Georgia,'Times New Roman',serif;color:#27302A}
.lw-navgrp ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(140px,100%),1fr));column-gap:16px;row-gap:8px;align-items:start}
.lw-header .lw-navgrp a{display:flex;align-items:center;min-height:44px;font-size:18px;font-weight:600;line-height:1.3;color:#3F5B45;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;text-decoration-color:#A3BDA9}
.lw-header .lw-navgrp a:hover{color:#2C4332;text-decoration-color:#3F5B45}
.lw-header .lw-navgrp a[aria-current="page"]{color:#27302A;font-weight:700;text-decoration:none}
.lw-header .lw-navgrp a[aria-current="page"]::before{content:"";flex:none;width:8px;height:8px;margin-right:8px;border-radius:50%;background:#D98E6A}
/* the label above each page title and the section pills (pages that had none get them too) */
.lw-top .lw-kicker{margin:0 0 12px;font-size:18px;font-weight:700;color:#3F5B45}
.lw-subnav{list-style:none;margin:20px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px 12px}
/* "Pages in this section" above the pills, styled like "On this page" (site_nav.py) */
.lw-page .lw-subnav-h{margin:20px 0 8px;font-size:18px;font-weight:700;line-height:1.4;color:#3F5B45}
.lw-page .lw-subnav-h+.lw-subnav{margin-top:0}
.lw-page .lw-subnav .lw-pill{display:inline-flex;align-items:center;min-height:48px;box-sizing:border-box;padding:0 20px;border:2px solid #3F5B45;border-radius:999px;background:#fff;color:#3F5B45;font-size:18px;font-weight:700;text-decoration:none}
.lw-page .lw-subnav .lw-pill:hover{background:#F7F5EE}
.lw-page .lw-subnav .lw-pill[aria-current="page"]{background:#3F5B45;color:#fff}
/* six pills sit in two even rows of three on wider screens */
@container (min-width:900px){.lw-subnav:has(> li:nth-child(6)):not(:has(> li:nth-child(7))){display:grid;grid-template-columns:repeat(3,max-content)}
.lw-page .lw-subnav:has(> li:nth-child(6)):not(:has(> li:nth-child(7))) .lw-pill{width:100%;justify-content:center}}
/* footer: the whole site map, section by section */
.lw-footer>div>div:has(> .lw-fmap){grid-template-columns:minmax(0,1fr) !important}
@container (min-width:1000px){.lw-footer>div>div:has(> .lw-fmap){grid-template-columns:minmax(240px,300px) minmax(0,1fr) !important}}
.lw-fmap{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(180px,100%),1fr));gap:44px 40px}
.lw-footer .lw-fmap h2{margin:0 0 6px;font-size:20px}
/* two-line links keep a clear gap from the next link */
.lw-footer .lw-fmap ul{gap:4px}
@container (max-width:420px){.lw-fmap{grid-template-columns:repeat(2,minmax(0,1fr));gap:36px 20px}}
/* footer spacing: less space above it (the padding is inline on every page, so it is overridden here), and the
   gap between section groups is clearly bigger than the gap between links */
.lw-footer>div{padding-top:40px !important;padding-top:clamp(40px,4cqi,56px) !important}
/* wide screens: the name and tagline sit above the map, and the six sections share one row */
@container (min-width:1200px){
.lw-footer>div>div:has(> .lw-fmap){grid-template-columns:minmax(0,1fr) !important;gap:28px !important}
.lw-fmap{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:28px}
}

/* ---- forced colours (Windows High Contrast): keep ticks, current pills and figures visible ---- */
@media (forced-colors:active){
.gd-tick input,.gd-opt input{forced-color-adjust:none;background:Canvas !important;border-color:CanvasText !important}
.gd-tick input:checked,.gd-opt input:checked{background:Highlight !important;border-color:Highlight !important;box-shadow:inset 0 0 0 4px Canvas}
.gd-opt:has(input:checked),.lw-page .lw-subnav .lw-pill[aria-current="page"],.lw-page .rs-seg button[aria-pressed="true"]{forced-color-adjust:none;background:Highlight !important;color:HighlightText !important;border-color:Highlight !important}
.tr-fig svg,.gd-fig svg{forced-color-adjust:none;background:#fff;border-radius:12px}
.lw-refs li:target{outline:3px solid Highlight}
}

/* ---- print: the content, without the site's navigation and on-screen tools ---- */
@media print{
.lw-skip,.lw-langbar,.lw-menu-btn,.lw-nav,.lw-totop,.lw-srcpop,.lw-search-btn,.lw-search,.lw-subnav,.lw-toc,.lw-footer,.lw-next,.lw-src-tools,.lw-back,.lw-jump,.rs-controls,.rs-countrow,.rs-empty,.rs-close{display:none !important}
/* on paper a link cannot be followed, so web addresses are written out (citations point to the numbered list) */
main a[href^="http"]:not(.lw-c)::after{content:" (" attr(href) ")";font-size:.85em;font-weight:400;word-break:break-all}
.lw-page .lw-header{position:static !important;box-shadow:none !important}
/* on paper a citation is the plain [N] that points to the numbered list */
main a.lw-c,main .lw-c-solo a.lw-c{font-size:inherit;font-weight:600;vertical-align:baseline;padding:0;margin:0;color:#27302A;text-decoration:none}
main a.lw-c::after{display:none}
.lw-cb{display:inline}
main .lw-csep{visibility:hidden;font-size:inherit;vertical-align:baseline;margin:0}
}
