/* The top bar and the footer, shared by /inside, /privacy, /confirmed and the
   404. The bar is the home page's (site.css, .topnav), same structure and
   words, in these pages' ink on paper: the wordmark by OMAKO, Tour, How it
   works, Roadmap and FAQ, the way back to the handheld where the home page
   has the way here, GitHub with its stars, Join the waitlist. On a phone: the
   wordmark, Join and the menu (chrome.js). */

:root { --gb0: #0f380f; --gb3: #9bbc0f; --gb-d: #306230; --pad: clamp(16px, 4vw, 48px); --nav-h: 68px; --mute: color-mix(in srgb, var(--ink) 66%, var(--paper)); }

/* ---- top bar ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topnav {
  position: sticky; z-index: 20; top: 0;
  min-height: var(--nav-h);
  padding: env(safe-area-inset-top, 0px) max(36px, env(safe-area-inset-right, 0px)) 0 max(36px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 28px;
  background: var(--paper); color: var(--ink); border-bottom: var(--rule-md) solid var(--ink);
  font-family: var(--font-text);
}
.topnav-mark { display: flex; align-items: flex-end; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.wm { display: block; flex: none; width: 144px; height: 42px; }
.by { padding-bottom: 4px; font: 400 12px/1 var(--font-mono); color: var(--mute); letter-spacing: .06em; }
.topnav-links { display: flex; gap: 24px; }
.topnav-links a { padding: 8px 0 6px; font: 600 15px/1 var(--font-text); color: var(--mute); text-decoration: none; }
.topnav-links a:hover { color: var(--ink); }
.grow { flex: 1; }
.topnav .cta, .navmenu .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; cursor: pointer;
  font: 700 15px/1 var(--font-text); color: var(--ink); text-decoration: none; white-space: nowrap;
  background: transparent; border: 1px solid var(--ink);
}
.topnav .cta:hover, .navmenu .cta:hover { background: var(--ink); color: var(--paper); }
/* Join: the handheld's green, as on the home page */
.topnav .cta-solid, .navmenu .cta-solid { background: var(--gb3); color: var(--gb0); border-color: var(--gb3); box-shadow: 3px 3px 0 var(--gb-d); }
.topnav .cta-solid:hover, .navmenu .cta-solid:hover { background: #a9ca1e; color: var(--gb0); border-color: #a9ca1e; }
.topnav .cta-solid:active, .navmenu .cta-solid:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gb-d); }
.cta-gh svg { flex: none; fill: currentColor; }
.stars { display: inline-flex; align-items: center; gap: 3px; font: 700 12px/1 var(--font-mono); color: var(--mute); }
.cta:hover .stars { color: inherit; }
.star-cv { width: 16px; height: 16px; image-rendering: pixelated; }
.topnav .topnav-join-s { display: none; }
.burger {
  display: none; flex: none; width: 42px; height: 42px; padding: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 1px solid var(--ink);
}
.burger i { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform .15s, opacity .15s; }
.burger[aria-expanded="true"] i:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(3) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
.topnav :focus-visible, .navmenu :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 1199px) { .topnav { gap: 20px; } .topnav .by { display: none; } }
/* tablets and phones: the wordmark, Join, and the menu, as on the home page */
@media (max-width: 1023px) {
  :root { --nav-h: 60px; }
  .topnav { gap: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .topnav .topnav-links, .topnav .topnav-full, .topnav .topnav-gh, .topnav .topnav-join { display: none; }
  .topnav .topnav-join-s { display: inline-flex; min-height: 40px; padding: 0 14px; font-size: 14px; }
  .burger { display: flex; }
  .wm { width: 96px; height: 28px; }
}
/* the menu (phones, tablets) */
.navmenu {
  position: fixed; z-index: 19; left: 0; right: 0; bottom: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background: var(--paper); color: var(--ink);
}
.navmenu[hidden] { display: none; }
.navmenu-links { display: flex; flex-direction: column; }
.navmenu-links a {
  padding: 14px 0; border-bottom: 1px solid var(--ink);
  font: 800 26px/1 var(--font-display); font-stretch: 112%; color: var(--ink); text-decoration: none;
}
.navmenu-sub { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) { .burger i { transition: none; } }

/* ---- footer ---- */
/* Back to the handheld, in the footer: a DS button in the handheld's green,
   a pixel arrow that nudges back on hover, and a tiny pixel handheld. */
.back-btn { gap: 8px; background: var(--gb0); color: var(--gb3); font: 700 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.back-arrow { transform: scaleX(-1); }
.back-btn:hover .back-arrow { animation: back-nudge .5s steps(1) infinite; }
@keyframes back-nudge { 50% { translate: -3px 0; } }
.hh-icon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill-rule='evenodd' d='M2 0h8v11h-1v1h-7zM3 1h6v5h-6zM4 7h1v1h-1zM3 8h3v1h-3zM4 9h1v1h-1zM8 7h1v1h-1zM7 8h1v1h-1z'/%3E%3C/svg%3E"); }
.gh-btn svg { flex: none; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .back-btn:hover .back-arrow { animation: none; } }
.foot { display: grid; gap: 14px; padding: 28px var(--pad) 36px; border-top: 4px solid var(--ink); background: var(--paper); color: var(--ink); }
.sig { display: inline-flex; align-items: center; gap: 10px; width: max-content; font: 400 18px/1 var(--font-text); text-decoration: none; color: inherit; }
.sig svg { width: 28px; height: 28px; fill: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px; }
.foot p { margin: 0; max-width: 110ch; font: 500 13px/1.6 var(--font-mono); }
.foot p a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
