@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');
/* ——— The menu: an icon fixed beside the globe and day/night, opening into a small,
   quiet card under the icons ———
   Left to right at the top: menu, globe, day/night. Opened, the three lines turn into a
   cross and a compact card unfolds from the icon: five places in one column, a gold dot
   that follows the pointer and marks the page you are on. Replaces the old menu card. */
.room-controls .room-menu-toggle,.room-controls #room-menu{display:none!important}

/* The globe and day/night in their places on every page; the menu takes the third. */
.mode .dial,.mode .switch{right:calc(var(--band) / 2 - 16px)}
.project1-page .mode .lang{right:calc(var(--band) / 2 - 15px + 46px)}
body:not(.project1-page) > .room-controls .lang{right:54px}
@media (max-width:959px){
  .project1-page .mode .dial,.project1-page .mode .switch{right:calc(var(--band) / 2 - 16px + 10px)}
  .project1-page .mode .lang{right:calc(var(--band) / 2 - 15px + 56px)}
}

.nm-btn{all:unset;box-sizing:border-box;cursor:pointer;z-index:61;width:44px;height:44px;display:grid;place-items:center;color:var(--frame-fg);-webkit-tap-highlight-color:transparent}
.nm-btn svg{width:22px;height:22px;overflow:visible}
.nm-btn path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;fill:none;transition:d .45s cubic-bezier(.65,0,.35,1),opacity .25s,transform .45s cubic-bezier(.65,0,.35,1);transform-origin:12px 12px}
.nm-btn[aria-expanded="true"] .l1{d:path("M5 5 L19 19")}
.nm-btn[aria-expanded="true"] .l2{opacity:0;transform:scaleX(.2)}
.nm-btn[aria-expanded="true"] .l3{d:path("M5 19 L19 5")}
.nm-btn:focus-visible{outline:none}
.nm-btn:active svg{scale:.92}
/* Near the icon: the short lines lean in a little and hatch strokes flick out round it. */
.nm-btn .nm-ticks path{stroke-width:1.1;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .38s cubic-bezier(.3,.6,.3,1),opacity .2s;transition-delay:calc(var(--i) * .05s)}
.nm-btn:is(:hover,:focus-visible) .nm-ticks path{stroke-dashoffset:0;opacity:.75}
.nm-btn:is(:hover,:focus-visible):not([aria-expanded="true"]) .l2{d:path("M5 12 L20 12")}
.nm-btn:is(:hover,:focus-visible):not([aria-expanded="true"]) .l1{d:path("M4 6 L20 7")}
.nm-btn:is(:hover,:focus-visible):not([aria-expanded="true"]) .l3{d:path("M4 18 L20 17")}

/* The card: quiet and exact. Small strong capitals, generous rows, a soft shadow, and one small
   terracotta dot for where you are, which follows the pointer and the keys. */
.nm-card{--nm-dot:#A9614E;position:fixed;z-index:90;min-width:168px;padding:6px;border-radius:10px;color:var(--frame-fg);
  background:color-mix(in srgb,var(--frame-bg) 88%,#fff 12%);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--frame-fg) 10%,transparent),0 18px 40px -12px rgba(0,0,0,.28),0 4px 12px -4px rgba(0,0,0,.12);
  transform-origin:calc(100% - 40px) 0;opacity:0;visibility:hidden;transform:translateY(-6px) scale(.97);
  transition:opacity .22s ease,transform .38s cubic-bezier(.22,1,.36,1),visibility 0s .38s}
:root[data-mode="night"] .nm-card{--nm-dot:#C9957F;background:color-mix(in srgb,var(--frame-bg) 92%,#fff 8%);box-shadow:0 0 0 1px rgba(255,255,255,.07),0 20px 44px -12px rgba(0,0,0,.6)}
.nm-card.open{opacity:1;visibility:visible;transform:none;transition:opacity .18s ease,transform .38s cubic-bezier(.22,1,.36,1),visibility 0s}
.nm-frame{display:none}
.nm-card::after{content:none}
.nm-card ul{list-style:none;margin:0;padding:0;position:relative}
.nm-card a{position:relative;display:flex;align-items:center;min-height:32px;padding:0 12px 0 24px;border-radius:6px;color:inherit;text-decoration:none;
  opacity:0;translate:0 -4px;transition:opacity .3s,translate .45s cubic-bezier(.22,1,.36,1),background-color .2s}
.nm-card a::before{content:none}
.nm-card a span{font:400 11.5px/1 'PT Mono','Courier New',monospace;letter-spacing:.06em;text-transform:uppercase;color:inherit;
  background:none;-webkit-background-clip:border-box;background-clip:border-box;transition:translate .35s cubic-bezier(.22,1,.36,1)}
.nm-card.open a{opacity:1;translate:0 0}
.nm-card.open li:nth-child(1) a{transition-delay:.03s}.nm-card.open li:nth-child(2) a{transition-delay:.06s}.nm-card.open li:nth-child(3) a{transition-delay:.09s}
.nm-card.open li:nth-child(4) a{transition-delay:.12s}.nm-card.open li:nth-child(5) a{transition-delay:.15s}
.nm-card a:hover,.nm-card a:focus-visible{background:color-mix(in srgb,var(--frame-fg) 7%,transparent);outline:none}
.nm-card a:hover span,.nm-card a:focus-visible span{translate:2px 0}
.nm-card a[aria-current] span{color:var(--nm-dot)}
.nm-dot{position:absolute;z-index:1;left:11px;top:0;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;background:var(--nm-dot);opacity:0;pointer-events:none;
  transition:transform .35s cubic-bezier(.22,1,.36,1),opacity .2s}
.nm-card.open .nm-dot.on{opacity:1}
@media (prefers-reduced-motion:reduce){.nm-card,.nm-card a,.nm-btn path,.nm-dot{transition-duration:.01ms!important;transition-delay:0s!important}}
/* On a phone the card spans the screen below the icons, with room for the thumb. */
@media (max-width:600px){.nm-card{min-width:176px}.nm-card a{min-height:38px}.nm-card a span{font-size:12px}}

/* Hand-drawn icons beside each place, in the podcast mic's line. */
.nm-card a{padding-left:22px;gap:10px}
.nm-ic{flex:none;width:17px;height:17px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round;opacity:.78;transition:opacity .25s,translate .35s cubic-bezier(.22,1,.36,1)}
.nm-ic .h{stroke-width:.8;opacity:.6;stroke-dasharray:1;stroke-dashoffset:0}
.nm-card a:is(:hover,:focus-visible) .nm-ic{opacity:1;translate:2px 0}
.nm-card a:is(:hover,:focus-visible) .nm-ic .h{animation:nm-hatch .5s cubic-bezier(.3,.6,.3,1) both}
.nm-card a:is(:hover,:focus-visible) .nm-ic .h:nth-of-type(2){animation-delay:.06s}
.nm-card a:is(:hover,:focus-visible) .nm-ic .h:nth-of-type(3){animation-delay:.12s}
.nm-card a:is(:hover,:focus-visible) .nm-ic .h:nth-of-type(4){animation-delay:.18s}
.nm-card a:is(:hover,:focus-visible) .nm-ic .h:nth-of-type(5){animation-delay:.24s}
@keyframes nm-hatch{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.nm-card a:is(:hover,:focus-visible) .nm-mic .d circle{animation:nm-blink 1.2s ease-in-out infinite}
.nm-mic .d circle:nth-child(2){animation-delay:.2s!important}.nm-mic .d circle:nth-child(3){animation-delay:.4s!important}
@keyframes nm-blink{0%,100%{opacity:1}40%{opacity:.15}}
.nm-card a[aria-current] .nm-ic{color:var(--nm-dot);opacity:1}
.nm-dot{left:8px}
@media (prefers-reduced-motion:reduce){.nm-ic .h,.nm-mic .d circle{animation:none!important}}

/* Phones: an app-like tab bar at the bottom, icons only; the ☰ button and card are not used. */
.nm-tabs{display:none}
@media (max-width:600px){
  .nm-btn,.nm-card{display:none!important}
  .nm-tabs{display:flex;position:fixed;z-index:95;left:0;right:0;bottom:0;justify-content:space-around;align-items:center;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));color:var(--frame-fg);
    background:color-mix(in srgb,var(--frame-bg) 90%,transparent);-webkit-backdrop-filter:saturate(1.2);
    border-top:1px solid color-mix(in srgb,var(--frame-fg) 12%,transparent)}
  :root[data-mode="night"] .nm-tabs{--nm-dot:#C9957F}
  .nm-tabs{--nm-dot:#A9614E}
  .nm-tabs a{position:relative;display:grid;place-items:center;width:52px;height:44px;color:inherit;-webkit-tap-highlight-color:transparent;outline:none}
  .nm-tabs .nm-ic{width:25px;height:25px;stroke-width:1.2}
  .nm-tabs a:active .nm-ic{scale:.88}
  .nm-tabs a:active .nm-ic .h{animation:nm-hatch .5s cubic-bezier(.3,.6,.3,1) both}
  .nm-tabs a[aria-current] .nm-ic{color:var(--nm-dot);opacity:1}
  .nm-tabs a[aria-current]::after{content:"";position:absolute;bottom:1px;width:4px;height:4px;border-radius:50%;background:var(--nm-dot)}
  .nm-tabs a[aria-current] .nm-mic .d circle{animation:nm-blink 1.4s ease-in-out infinite}
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
}
