/* Shared foundation. Each theme sets the custom properties and its own layout on top. */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font-body);font-size:var(--fs-body,1.0625rem);line-height:1.65;-webkit-font-smoothing:antialiased;overflow-x:hidden}
img,svg{max-width:100%;height:auto;display:block}
a{color:var(--link,var(--primary));text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--focus,var(--accent));outline-offset:2px}
h1,h2,h3,h4{font-family:var(--font-head);line-height:1.2;color:var(--heading,var(--fg));text-wrap:balance}
p{text-wrap:pretty}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:var(--fg);color:var(--bg);padding:.6rem 1rem}
.skip-link:focus{left:1rem;top:1rem}
.wrap{width:min(100% - 2rem,var(--max,72rem));margin-inline:auto}

/* Prose */
.prose{max-width:var(--measure,42rem);min-width:0}
.prose>*{max-width:100%}
.prose>*+*{margin-top:1.1em}
.prose h2{font-size:clamp(1.4rem,1.1rem + 1.2vw,1.85rem);margin-top:2.2em;scroll-margin-top:5rem}
.prose h3{font-size:1.25rem;margin-top:1.8em;scroll-margin-top:5rem}
.prose ul,.prose ol{padding-left:1.3em}
.prose li+li{margin-top:.4em}
.prose code{font-size:.9em;background:var(--surface);padding:.1em .35em;border-radius:4px}
.prose figure{margin:1.5em 0}
.prose figcaption{font-size:.875rem;color:var(--muted);margin-top:.5em}
.prose blockquote{margin:1.5em 0;padding:0 1.2em;font-style:italic;color:var(--muted)}
.table-wrap{overflow-x:auto;margin:1.5em 0;border:1px solid var(--border);border-radius:var(--radius,8px)}
.table-wrap table{border-collapse:collapse;width:100%;font-size:.95rem;min-width:28rem}
.table-wrap th,.table-wrap td{text-align:left;padding:.65rem .8rem;border-bottom:1px solid var(--border);vertical-align:top}
.table-wrap thead th{background:var(--surface);font-weight:700}
.table-wrap tbody tr:last-child td{border-bottom:0}
.checklist{list-style:none;padding:0!important}
.checklist li{display:flex;gap:.7rem;align-items:flex-start}
.checklist .box{flex:0 0 1.2rem;height:1.2rem;margin-top:.25rem;border:2px solid var(--primary);border-radius:4px;display:grid;place-items:center;font-size:.8rem;color:var(--primary)}
.callout{padding:1rem 1.2rem;border-radius:var(--radius,8px);background:var(--surface);border:1px solid var(--border)}
.callout p{margin:0}
.callout-safety,.callout-warning{border-color:var(--danger,#b42318);background:color-mix(in srgb,var(--danger,#b42318) 7%,var(--bg))}
.callout-quick-answer,.callout-key-takeaway{border-color:var(--primary)}

/* Shared components */
.breadcrumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.35rem;padding:0;margin:0;font-size:.85rem;color:var(--muted)}
.breadcrumbs li+li::before{content:"/";margin-right:.35rem;opacity:.6}
.breadcrumbs a{color:inherit}
.toc{border:1px solid var(--border);border-radius:var(--radius,8px);padding:1rem 1.2rem;background:var(--surface)}
.toc-title{margin:0 0 .5rem;font-weight:700;font-size:.9rem;text-transform:uppercase;letter-spacing:.06em}
.toc ol{margin:0;padding-left:1.2em;font-size:.95rem}
.toc li+li{margin-top:.25rem}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.6rem;margin:0}
.facts div{background:var(--surface);border-radius:var(--radius,8px);padding:.7rem .9rem}
.facts dt{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.facts dd{margin:.15rem 0 0;font-weight:600}
.search-form{display:flex;gap:.5rem;max-width:36rem}
.search-form input{flex:1;min-width:0;font:inherit;padding:.7rem .9rem;border:1px solid var(--border);border-radius:var(--radius,8px);background:var(--bg);color:var(--fg)}
.search-form button{font:inherit;font-weight:600;padding:.7rem 1.1rem;border:0;border-radius:var(--radius,8px);background:var(--primary);color:var(--on-primary,#fff);cursor:pointer}
.search-results{margin-top:1.5rem}
.search-count{color:var(--muted)}
.search-list{list-style:none;padding:0}
.search-list li{padding:1rem 0;border-bottom:1px solid var(--border)}
.search-list span{display:block;font-size:.8rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.search-list p{margin:.3rem 0 0}
.archive-list{list-style:none;padding:0}
.archive-list li{display:flex;gap:1rem;padding:.55rem 0;border-bottom:1px solid var(--border);flex-wrap:wrap}
.archive-list time{color:var(--muted);min-width:9.5rem;font-size:.9rem}
.ad-slot{margin:2rem 0;min-height:100px}
.cookie-notice{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:50;max-width:30rem;display:flex;gap:1rem;align-items:center;background:var(--fg);color:var(--bg);padding:.8rem 1rem;border-radius:var(--radius,8px);box-shadow:0 8px 30px rgba(0,0,0,.2);font-size:.9rem}
.cookie-notice p{margin:0}
.cookie-notice a{color:inherit}
.cookie-notice button{font:inherit;font-weight:700;border:0;border-radius:6px;padding:.4rem .9rem;background:var(--bg);color:var(--fg);cursor:pointer}
.related-list{list-style:none;padding:0;margin:0}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:root{--bg:#faf6ec;--fg:#22303c;--muted:#5b6670;--primary:#3d5a3a;--accent:#d49a3a;--rust:#b5562c;--surface:#f1ead9;--border:#ddd3bd;--link:#2f5a2c;--font-head:"Libre Baskerville",Georgia,serif;--font-body:"Source Sans 3",system-ui,sans-serif;--radius:4px;--max:70rem;--measure:40rem;--fs-body:1.1rem}
body{background-image:repeating-linear-gradient(transparent 0 31px,rgba(201,217,210,.35) 31px 32px)}
.jhead{border-bottom:3px double var(--fg);background:var(--bg)}
.jhead-in{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 0 .6rem;flex-wrap:wrap}
.logo svg{width:15rem}
.entry{font-family:var(--font-head);font-style:italic;color:var(--muted);margin:0}
.jnav ul{list-style:none;display:flex;gap:1.6rem;padding:.6rem 0;margin:0 auto;flex-wrap:wrap}
.jnav a{color:var(--fg);text-decoration:none;font-weight:600;font-size:.95rem}
.jnav a:hover{color:var(--rust);text-decoration:underline}
.nav-toggle{display:none;font:inherit;font-family:var(--font-head);font-style:italic;background:none;border:1px solid var(--fg);padding:.3rem .9rem;color:var(--fg)}
@media (max-width:720px){.nav-toggle{display:block}.jnav{display:none}.jnav.is-open{display:block}.jnav ul{flex-direction:column;gap:.7rem}.entry{display:none}}
main{padding:2.5rem 0 4rem}
.label{font-size:.75rem;text-transform:uppercase;letter-spacing:.18em;font-weight:700;color:var(--rust);margin:0}
.spread{display:grid;grid-template-columns:1fr 1.2fr;gap:3rem;align-items:start;padding-bottom:2rem;border-bottom:1px solid var(--border)}
.spread .month{font-family:var(--font-head);font-size:clamp(2.8rem,2rem + 3vw,4.4rem);margin:.2rem 0 .6rem;font-style:italic;font-weight:400}
.note{font-family:var(--font-head);font-size:1.12rem;line-height:1.7;border-left:3px solid var(--accent);padding-left:1rem}
.lead{margin-top:2rem}
.lead h2{font-size:1.5rem;margin:.4rem 0}
.lead h2 a{color:var(--fg);text-decoration:none}
.lead h2 a:hover{text-decoration:underline}
.plate img{border:1px solid var(--fg);padding:6px;background:#fff;box-shadow:3px 4px 0 var(--border)}
.caption{font-family:var(--font-head);font-style:italic;font-size:.9rem;color:var(--muted);margin-top:.6rem}
@media (max-width:820px){.spread{grid-template-columns:1fr}}
.rule-h{font-size:1.3rem;font-style:italic;font-weight:400;margin:3rem 0 1rem;padding-bottom:.4rem;border-bottom:1px solid var(--fg)}
.entries{list-style:none;padding:0;margin:0}
.entry-row{display:grid;grid-template-columns:9rem 1fr auto;gap:1.2rem;padding:1.1rem 0;border-bottom:1px dotted var(--muted)}
.entry-row time{font-family:var(--font-head);font-style:italic;color:var(--muted);font-size:.92rem}
.entry-row a{font-family:var(--font-head);font-weight:700;font-size:1.15rem;color:var(--fg);text-decoration:none}
.entry-row a:hover{color:var(--link);text-decoration:underline}
.entry-row p{margin:.3rem 0 0;color:var(--muted)}
.cat{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;color:var(--primary);white-space:nowrap}
@media (max-width:700px){.entry-row{grid-template-columns:1fr}.cat{justify-self:start}}
.chapters{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(19rem,1fr));gap:.2rem 2rem}
.chapters a{display:grid;grid-template-columns:2.5rem 1fr;gap:.1rem .8rem;padding:.9rem 0;border-bottom:1px solid var(--border);text-decoration:none;color:var(--fg)}
.roman{grid-row:span 2;font-family:var(--font-head);color:var(--rust);font-size:1.2rem}
.chapters strong{font-family:var(--font-head)}
.chapters em{color:var(--muted);font-size:.95rem}
.chapters a:hover strong{text-decoration:underline}
.j-head{max-width:46rem;margin:1rem 0 1.5rem}
.j-head h1{font-size:clamp(1.9rem,1.4rem + 2.2vw,2.9rem);margin:.5rem 0}
.dek{font-family:var(--font-head);font-style:italic;font-size:1.15rem;color:var(--muted)}
.meta{font-size:.9rem;color:var(--muted)}
.journal>.plate{margin:0 0 2.5rem;max-width:52rem}
.j-body{display:grid;grid-template-columns:minmax(0,40rem) 17rem;gap:3.5rem;align-items:start}
.margin{position:sticky;top:1rem;display:grid;gap:1.2rem;font-size:.95rem}
.margin-note{background:#fffdf6;border:1px solid var(--border);padding:1rem;transform:rotate(.6deg);box-shadow:2px 3px 0 var(--border)}
.margin-note .facts{grid-template-columns:1fr;margin-top:.6rem}
.margin-note .facts div{background:transparent;padding:.3rem 0;border-bottom:1px dotted var(--border);border-radius:0}
.toc{background:transparent;border:0;border-left:2px solid var(--accent);border-radius:0;padding:.2rem 0 .2rem 1rem}
@media (max-width:960px){.j-body{grid-template-columns:1fr}.margin{position:static;order:-1}}
.prose h2{font-weight:400;font-style:italic}
.callout{background:#fffdf6;border:1px solid var(--accent);border-radius:0}
.callout-safety,.callout-warning{border-color:var(--rust)}
.table-wrap{background:#fffdf6;border-radius:0}
.page-head h1,.simple-page h1{font-size:clamp(1.9rem,1.4rem + 2vw,2.7rem);font-style:italic;font-weight:400}
.lede{font-family:var(--font-head);font-style:italic;color:var(--muted)}
.jfoot{border-top:3px double var(--fg);padding:2.5rem 0 1.5rem;background:var(--surface)}
.jfoot-in{display:grid;grid-template-columns:2fr 1fr;gap:2rem}
.jfoot svg{width:14rem}
.jfoot ul{list-style:none;padding:0;margin:0;display:grid;gap:.45rem}
.jfoot a{color:var(--fg)}
.small{font-size:.85rem;color:var(--muted)}
@media (max-width:700px){.jfoot-in{grid-template-columns:1fr}}
