/* Top bar, right side: only a red magnifying glass (search) and a red moon (night) — no social icons, no ⌘K pill */
html body header.top .social{display:none!important}
html body header.top .topsearch,html body header.top .nightbtn{
  all:unset;position:relative;display:grid!important;place-items:center;width:38px!important;height:38px!important;margin:0!important;padding:0!important;
  cursor:pointer;color:#C4000C!important;background:none!important;border:0!important;box-shadow:none!important;clip-path:none!important;filter:none!important}
html body header.top .topsearch kbd,html body header.top .topsearch span:not(:has(svg)){display:none!important}
html body header.top .topsearch::before,html body header.top .topsearch::after{content:none!important}
html body header.top :is(.topsearch,.nightbtn,.psearch) :is(svg,.ic){width:25px!important;height:25px!important;stroke:currentColor!important;stroke-width:1.7!important;color:#C4000C!important}
html body header.top .topsearch{margin-left:auto!important}
html body header.top .nightbtn{margin-left:4px!important}
/* hover: the same pale cut-corner tile as the word buttons */
html body header.top :is(.topsearch,.nightbtn)::after{content:""!important;position:absolute;inset:0;z-index:-1;background:rgba(28,27,25,.075);opacity:0;transition:opacity .22s;
  clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px)}
@media (hover:hover){html body header.top :is(.topsearch,.nightbtn):hover::after{opacity:1}}
html body header.top :is(.topsearch,.nightbtn){isolation:isolate}
html.night body header.top :is(.topsearch,.nightbtn,.psearch),html.night body header.top :is(.topsearch,.nightbtn,.psearch) :is(svg,.ic){color:#E2584F!important}
/* phones: the desktop search hides and the phone search button shows (its own rule) — just make it the same red icon */
html body header.top .psearch{background:none!important;border:0!important;box-shadow:none!important;color:#C4000C!important}
@media (max-width:900px){html body header.top .topsearch{display:none!important}}
/* the profile sits at the far right on every screen: a plain circle that holds your photo (or your initial; empty when signed out) */
html body header.top .topme{display:inline-grid!important;place-items:center;width:38px!important;height:38px!important;padding:0!important;margin-left:4px;
  border:0!important;background:none!important;box-shadow:none!important;text-decoration:none}
html body header.top .topme .av{display:inline-grid!important;width:32px!important;height:32px!important;font-size:14px!important;transition:box-shadow .2s}
html body header.top .topme .av-empty{background:color-mix(in srgb,var(--ink) 8%,transparent)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 16%,transparent)}
html body:is(.psh-page) header.top .topme .av-empty,html.bk-tint:not(.bk-tint-light) body header.top .topme .av-empty{background:rgba(243,237,226,.14)!important;box-shadow:inset 0 0 0 1px rgba(243,237,226,.5)}
@media (hover:hover){html body header.top .topme:hover .av{box-shadow:0 0 0 2px var(--paper,#F0EBE2),0 0 0 3px #C4000C}}
/* a photo fills the circle wherever the avatar appears */
.av.has-photo{background-size:cover!important;background-position:center!important;color:transparent!important;font-size:0!important}
/* Profile: click the big circle to add or change the photo */
.avpick{position:relative;display:inline-block;cursor:pointer;border-radius:50%;flex:none}
.avpick-hint{position:absolute;inset:0;display:grid;place-items:center;border-radius:50%;background:rgba(28,27,25,.55);color:#FAF3E3;
  font:500 12px/1.1 "EB Garamond",Garamond,serif;letter-spacing:.06em;text-align:center;opacity:0;transition:opacity .2s;pointer-events:none}
.avpick:hover .avpick-hint,.avpick:focus-within .avpick-hint{opacity:1}
/* the user, 2026-11-17: hovering or pressing search turned it into a solid red square that hid the red glass (all.css's old
   red search stamp still painted this layer). The tile is always the pale veil: darker than the page on light grounds,
   lighter than the page on dark ones (night, dark book tints) — the icon always shows through */
html body header.top :is(.topsearch,.nightbtn)::after{inset:0!important;background:rgba(28,27,25,.075)!important;background-blend-mode:normal!important;
  clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px)!important}
html body header.top .topsearch::before{content:none!important}
html body header.top :is(.topsearch,.nightbtn):active::after{opacity:1!important;background:rgba(28,27,25,.12)!important}
html body header.top :is(.topsearch,.nightbtn):focus-visible::after{opacity:1!important}
html body header.top :is(.topsearch,.nightbtn):focus{outline:none}
html.night body header.top :is(.topsearch,.nightbtn)::after,
html.bk-tint:not(.bk-tint-light) body header.top :is(.topsearch,.nightbtn)::after{background:rgba(255,255,255,.12)!important}
html.night body header.top :is(.topsearch,.nightbtn):active::after,
html.bk-tint:not(.bk-tint-light) body header.top :is(.topsearch,.nightbtn):active::after{background:rgba(255,255,255,.2)!important}
html body header.top .topsearch{filter:none!important}
