/* Night Fog — design pass (Leo 2026-11-16), from the "Round 2 · Night Fog" board.
   Everything here is scoped to :root.nf, which the head script in render.ts sets whenever Night Fog is showing (chosen with
   the theme button, or the device's dark setting on a first visit). Bookman's Holiday and Don's Desk never load these rules.
   The falcon shows at every width (placed by nightfog.js); the deco frame and signature only on wide screens (≥1000px). Assets in /assets/nf/. */
@font-face{font-family:"Limelight";src:url(/fonts/limelight-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Monoton";src:url(/fonts/monoton-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
:root.nf{--deco:"Limelight","Oswald",Georgia,serif;--gold:#d2b471;--brass:linear-gradient(180deg,#dcc283 0%,#cfae66 45%,#c19e57 60%,#d2b471 100%);--goldline:rgba(210,180,113,.5);--goldfaint:rgba(210,180,113,.35);
  --bg:#0b0e18;--paper:#121a2c;--rule:#262e44;--quote:#141c2f;--muted:#8d877d}

/* night sky: a touch lighter at the top of the page, then deep night */
:root.nf body{background:linear-gradient(#0f1322,#0b0e18 260px) no-repeat,#0b0e18}

/* fog across the whole page, tiled (two layers with different tile sizes so the repeat doesn't show) and scrolling with
   the page; each layer drifts slowly sideways. Dimmed 25% (Leo 2026-11-16). */
:root.nf{overflow-x:clip}   /* so body (below) clips its own overflow instead of handing it to the window */
:root.nf body{position:relative;overflow-x:clip}
:root.nf body::before,:root.nf body::after{content:"";position:absolute;top:0;bottom:0;left:-90px;right:-90px;z-index:-1;pointer-events:none;opacity:.75}
:root.nf body::before{background:url(/assets/nf/fog-a.svg) 0 0/1920px 1400px repeat;animation:nf-drift-a 95s ease-in-out infinite alternate}
:root.nf body::after{background:url(/assets/nf/fog-b.svg) 300px 500px/1700px 1500px repeat;animation:nf-drift-b 130s ease-in-out infinite alternate}
@keyframes nf-drift-a{from{transform:translateX(-60px)}to{transform:translateX(60px)}}
@keyframes nf-drift-b{from{transform:translateX(70px)}to{transform:translateX(-70px)}}

/* billowing fog behind each post's text, fading out at every edge */
:root.nf .entry{position:relative}
:root.nf .entry::before{content:"";position:absolute;top:-34px;bottom:-34px;left:-80px;right:-80px;z-index:-1;pointer-events:none;
  background:url(/assets/nf/fog-post.svg) 0 0/1100px 700px repeat;opacity:.41;
  -webkit-mask-image:linear-gradient(to right,transparent,#000 17%,#000 83%,transparent),linear-gradient(transparent,#000 110px,#000 calc(100% - 110px),transparent);
  -webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 17%,#000 83%,transparent),linear-gradient(transparent,#000 110px,#000 calc(100% - 110px),transparent);mask-composite:intersect;
  animation:nf-drift-post 75s ease-in-out infinite alternate}
@keyframes nf-drift-post{from{transform:translateX(-18px)}to{transform:translateX(18px)}}
@media (prefers-reduced-motion:reduce){:root.nf body::before,:root.nf body::after,:root.nf .entry::before{animation:none}}

/* header: no paper band — the night sky and fog show through (no banner pictures: Leo 2026-11-16) */
:root.nf .masthead{position:relative;background:transparent;border-bottom:0;box-shadow:none}
:root.nf .masthead>*{position:relative;z-index:1}
/* brass (Leo 2026-11-18): every gold in Night Fog is the burnished brass of the post titles' gold leaf, not the old bright
   #d4af37 — solid #d2b471 (--gold), or the --brass gradient for lettering (site title, sidebar headings, post titles; one
   gradient per line via 1lh tiles); falcon.webp and vignette-nf.svg were recoloured to match */
/* title (trial, Leo 2026-11-17): Monoton — a neon sign over a nightclub door — in small caps (the lowercase runs are
   <span class="sc"> from render.ts, set at 78% in capitals) with a soft gold glow; sized to fill the width Limelight did */
:root.nf .brand strong{font-family:"Monoton",var(--deco);font-weight:400;text-transform:none;letter-spacing:.04em;color:var(--gold);
  background:var(--brass) 0 0/100% 1lh repeat-y;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 5px rgba(210,180,113,.45)) drop-shadow(0 0 14px rgba(210,180,113,.2)) drop-shadow(0 2px 8px rgba(0,0,0,.6));
  font-size:min(2.7rem,calc((100vw - 120px)/19.4));font-size:min(2.7rem,calc((100cqw - 94px)/19.4))}
:root.nf .brand strong .sc{font-size:.78em;text-transform:uppercase}
:root.nf .brand em{font:400 .75rem/1.3 var(--display);font-style:normal;text-transform:uppercase;letter-spacing:.3em;color:#c9c2b6;margin-top:10px}
/* under the tagline (Leo 2026-11-17): the desk vignette in gold — folio, ribbon, fedora and holstered .45 — standing on the
   menu's top rule like the falcon; replaces the Deco sunburst. --orn-x: see bookman.css. Picture: assets/nf/vignette-nf.svg */
:root.nf .masthead{--orn-x:1.8px}
:root.nf .brand>span::after{content:"";display:block;width:130px;aspect-ratio:103.6/42.1;margin:10px auto 9px;background:url(/assets/nf/vignette-nf.svg?v=5) center bottom/contain no-repeat}
/* narrow screens (Leo 2026-11-16): the title never drops below 1.5rem, so it stays readable on a phone; when one line would
   need it smaller, it wraps onto two balanced lines, kept clear of the light/dark button */
@media (max-width:999px){:root.nf .brand strong{white-space:normal;text-wrap:balance;line-height:1.15;font-size:max(1.5rem,min(2.7rem,calc((100vw - 120px)/19.4)));font-size:max(1.5rem,min(2.7rem,calc((100cqw - 94px)/19.4)))}
  :root.nf .brand{padding:0 2.7rem}
  :root.nf .brand em{font-size:min(.75rem,calc((100vw - 40px)/40));margin-top:6px}:root.nf .brand>span::after{margin:14px auto 12px;width:96px}
  :root.nf .masthead{--orn-x:19.3px}:root.nf .masthead>.wrap:first-child{padding-bottom:0}}

/* menu bar: Oswald capitals between two fine gold rules */
:root.nf .menu-desktop>li>a,:root.nf .menu-desktop>li>details>summary,:root.nf .menu-extra>li>details>summary{font-family:var(--display);font-weight:400;text-transform:uppercase;letter-spacing:.14em;font-size:.86rem}
:root.nf .menu{border-top:1px solid var(--goldline);border-bottom:1px solid var(--goldline);margin-top:0}
:root.nf .menu details ul,:root.nf .menu .xpanel{border-color:var(--goldfaint)!important}
:root.nf .theme-toggle{border-color:var(--goldfaint)}

/* the Maltese Falcon, standing on the menu's top rule just past the end of the tagline, at every width: nightfog.js sets its
   place and height from the header as laid out (top of the bird ~20px under the title at full size, in proportion on
   smaller screens) */
:root.nf .masthead::after{content:"";position:absolute;left:var(--fx,-999px);top:var(--fy,0);height:var(--fh,0);aspect-ratio:75/180;z-index:2;pointer-events:none;
  background:url(/assets/nf/falcon.webp?v=2) center bottom/contain no-repeat;filter:drop-shadow(0 0 3px rgba(210,180,113,.35))}
/* wide screens: the deco frame and diamond around the welcome picture */
@media (min-width:1000px){
  :root.nf .masthead>.wrap:first-child{padding-top:30px;padding-bottom:0}
  :root.nf .menu{max-width:1180px;margin:0 auto}
  :root.nf aside.sidebar .side-card.welcome figure{background:var(--quote);position:relative;border:1px solid var(--gold);padding:10px;margin-top:9px}
  :root.nf aside.sidebar .side-card.welcome figure::before{content:"";position:absolute;inset:4px;border:1px solid rgba(210,180,113,.4);pointer-events:none}
  :root.nf aside.sidebar .side-card.welcome figure::after{content:"";position:absolute;left:50%;top:-9px;width:16px;height:16px;background:var(--quote);border:1px solid var(--gold);transform:translateX(-50%) rotate(45deg)}
  :root.nf aside.sidebar .side-card.welcome figcaption{padding:0 .1rem}
}

/* Don's signature under the welcome text, signing off on it, at every width (Leo 2026-11-16): inside the frame beside the
   posts; smaller, scaling with the window, in the intro strip on narrower screens and phones */
:root.nf .side-card.welcome figcaption::after{content:"";display:block;width:84%;aspect-ratio:900/205;margin:14px auto 2px;background:url(/assets/nf/don-signature.webp?v=3) center/contain no-repeat}
:root.nf .intro-strip .side-card.welcome figcaption::after{width:min(100%,clamp(170px,30vw,220px));margin:.45rem auto 0}

/* intro strip (narrower screens and phones): the small welcome picture gets the same Deco frame as the wide-screen card —
   gold line, fine inner line, diamond on top (its place is set by nightfog.js as the picture changes size) */
:root.nf .intro-strip figure{position:relative}
:root.nf .intro-strip .side-card.welcome img{border:1px solid var(--gold);padding:6px;border-radius:0;outline:1px solid rgba(210,180,113,.4);outline-offset:-5px;background:transparent}
:root.nf .intro-strip figure::after{content:"";position:absolute;left:var(--nf-dx,-99px);top:-6px;width:11px;height:11px;background:var(--quote);border:1px solid var(--gold);transform:translateX(-50%) rotate(45deg);pointer-events:none}
:root.nf .intro-strip{padding-top:.8rem;background:var(--quote)}

/* posts */
:root.nf .archive-head h1{font-family:var(--deco);font-weight:400;letter-spacing:.03em;font-size:clamp(1.45rem,4.2vw,2.05rem);line-height:1.2}
/* post and page titles (Leo 2026-11-18): Bookman's Holiday's leather spine labels, in midnight-blue leather instead of red —
   same grain, same light-to-dark gradient, inset gilt ring, gilt double rules above and below, gold-leaf lettering —
   lettered in Night Fog's Limelight. The leather is 50% see-through (Leo 2026-11-18), so the fog and night blues show through a little
   Don's Desk's post and page editor draws its title as the same label: assets/desk.css ("post and page editor") — change both together. */
:root.nf .entry>h1,:root.nf .entry>h2{position:relative;max-width:620px;margin:22px auto 20px;padding:18px 34px 16px;text-align:center;
  font:400 clamp(1.35rem,4.2vw,2rem)/1.2 var(--deco);letter-spacing:.03em;color:#d2b471;border-radius:3px;
  background:radial-gradient(circle,rgba(0,0,0,.2) 0 .6px,transparent 1px) 0 0/4px 4px,radial-gradient(circle,rgba(255,255,255,.06) 0 .6px,transparent 1px) 2px 2px/5px 5px,radial-gradient(ellipse at 50% 30%,rgba(36,51,110,.5),rgba(21,31,74,.5) 60%,rgba(13,20,51,.5));
  box-shadow:inset 0 1px 0 rgba(200,215,255,.16),inset 0 -3px 8px rgba(0,0,0,.55),inset 0 0 0 5px rgba(21,31,74,.5),inset 0 0 0 6px rgba(190,152,66,.7),0 3px 8px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.07)}
:root.nf .entry>h1::before,:root.nf .entry>h1::after,:root.nf .entry>h2::before,:root.nf .entry>h2::after{content:"";position:absolute;left:40px;right:40px;height:5px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(176,138,62,.75) 14%,rgba(196,158,72,.85) 50%,rgba(176,138,62,.75) 86%,transparent) top/100% 1px no-repeat,
             linear-gradient(90deg,transparent,rgba(176,138,62,.75) 14%,rgba(196,158,72,.85) 50%,rgba(176,138,62,.75) 86%,transparent) bottom/100% 1px no-repeat}
:root.nf .entry>h1::before,:root.nf .entry>h2::before{top:-13px}
:root.nf .entry>h1::after,:root.nf .entry>h2::after{bottom:-13px}
:root.nf .entry>h2>a,:root.nf .entry>h1>.tt{background:linear-gradient(180deg,#dcc283 0%,#cfae66 45%,#c19e57 60%,#d2b471 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;text-decoration:none;filter:drop-shadow(0 -1px 0 rgba(0,0,0,.5)) drop-shadow(0 1px 0 rgba(255,214,170,.10))}
:root.nf .entry>h2>a:hover{background-image:linear-gradient(180deg,#ecd59a 0%,#dcbd74 45%,#cfab62 60%,#e0c27f 100%);color:transparent}
@media (max-width:600px){:root.nf .entry>h1,:root.nf .entry>h2{padding:14px 18px 12px}
  :root.nf .entry>h1::before,:root.nf .entry>h1::after,:root.nf .entry>h2::before,:root.nf .entry>h2::after{left:20px;right:20px}}
:root.nf .meta{font-family:var(--display);font-size:.78rem;letter-spacing:.14em;color:var(--muted)}
:root.nf .meta a{color:var(--muted)}
/* drop cap on the first paragraph of text in every post and page, whatever comes before it (marked by nightfog.js) */
:root.nf .entry .content p.dropcap::first-letter{float:left;font-family:var(--deco);color:var(--gold);font-size:3.6em;line-height:.8;padding:6px 8px 0 0}
:root.nf .entry{border-bottom-color:var(--goldfaint)}
:root.nf .pager,:root.nf .postnav{font-family:var(--display);letter-spacing:.06em}
:root.nf .archive-head{border-bottom:1px solid var(--goldfaint)}

/* sidebar headings in the Deco face, as on the board */
:root.nf .sidebar h2,:root.nf .side-h{font-family:var(--deco);font-weight:400;text-transform:none;letter-spacing:.02em;font-size:1.35rem;color:var(--gold);
  background:var(--brass) 0 0/100% 1lh repeat-y;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
:root.nf aside.sidebar .side-card+.side-card{border-top-color:var(--goldfaint)}

/* footer: no paper band */
:root.nf .foot{background:transparent;border-top:1px solid var(--goldfaint)}
