/* ——— light mode for the blog pages ———
   Everything is driven by the four colour tokens; the few hard-coded tints are re-mapped here. */
html.light{--ink:#f4f3ef;--cream:#0b0b0c;--cream-dim:rgba(11,11,12,.62);--line-dark:rgba(11,11,12,.16);color-scheme:light}
html.light body{background:var(--ink);color:var(--cream)}
html.light nav.top ul li+li,html.light .posts li,html.light .refs li{border-color:rgba(11,11,12,.1)}
html.light article p{color:rgba(11,11,12,.86)}
html.light .refs li{color:rgba(11,11,12,.8)}
html.light .posts .q{color:var(--cream)}
html.light .posts a:hover .q,html.light article p a.src:hover{color:#000}
html.light article p a.src,html.light .refs a{text-decoration-color:rgba(11,11,12,.32)}
html.light article p a.src:hover,html.light .refs a:hover{text-decoration-color:var(--cream)}
html.light .refs::after{background:var(--cream);box-shadow:0 0 0 4px var(--ink),0 0 0 5px var(--cream)}
html.light nav.top ul{background:rgba(244,243,239,.92)}
html.light .sharepill{background:#0b0b0c;color:#f4f3ef;border-color:#0b0b0c}
html.light .sharepill.ghost{background:rgba(244,243,239,.94);color:#0b0b0c;border-color:rgba(11,11,12,.3)}
@media(hover:hover){html.light .sharepill:hover{background:#000;border-color:#000}html.light .sharepill.ghost:hover{background:#0b0b0c;color:#f4f3ef;border-color:#0b0b0c}}
html.light .sharemenu{background:rgba(244,243,239,.96);border-color:rgba(11,11,12,.18);box-shadow:0 14px 40px rgba(0,0,0,.18)}
html.light .sharemenu>*{color:#0b0b0c}html.light .sharemenu>*:hover{background:rgba(11,11,12,.08)}
html.light .sharetoast{background:rgba(244,243,239,.96);color:#0b0b0c;border-color:rgba(11,11,12,.18);box-shadow:0 10px 30px rgba(0,0,0,.18)}
html.light .hlpaint div{background:rgba(11,11,12,.12)}html.light .hlpaint .sel{background:rgba(11,11,12,.16)}
html.light .readbar{background:#0b0b0c}
html.light .ownsel ::selection,html.light .ownsel *::selection{background:rgba(244,243,239,.01)!important}
/* the toggle: a small sun/moon at the end of the nav (the name keeps the tabs pushed right) */
nav.top .name{margin-right:auto}
.themetoggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin-left:1.4rem;padding:0;border:1px solid var(--line-dark);border-radius:999px;background:none;color:var(--cream-dim);cursor:pointer;transition:color .2s,border-color .2s;-webkit-tap-highlight-color:transparent;vertical-align:middle}
.themetoggle:hover{color:var(--cream);border-color:var(--cream)}
.themetoggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.themetoggle .sun{display:none}html.light .themetoggle .sun{display:block}html.light .themetoggle .moon{display:none}
@media(max-width:760px){.themetoggle{margin-left:0;margin-right:.9rem;width:32px;height:32px}nav.top .menu{order:2}}   /* phones: toggle sits left of the menu button */
/* ——— frozen header on the blog pages ———
   The nav stays pinned while reading; the reading-progress bar (share.js) fills along its bottom edge. */
nav.top{position:sticky;top:0;z-index:35;background:var(--ink)}
nav.top::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--line-dark);pointer-events:none}
nav.top .wrap{padding-bottom:18px}
html{scroll-padding-top:96px}              /* footnote and anchor jumps land below the bar */
@media(max-width:760px){nav.top .wrap{padding-bottom:12px}html{scroll-padding-top:72px}}
