/* Homepage shared styles — escape marketing site */

/* Screen-reader-only utility — visually hidden, accessible to assistive
   tech and SEO crawlers. Used for H1s on JS-rendered pages (e.g. /11pm)
   where the visual headline comes from the game's first scene. */
/* Skip-to-content link — first focusable element on every page.
   Visually hidden until tab-focused. Lets screen-reader and
   keyboard users bypass the global nav on every page load. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink-1);
  color: #0B0B0E;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 200ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--blue, #4DA3FF);
  outline-offset: 2px;
}
/* Don't show focus ring on the wrapper div when targeted by skip-link.
   The browser sets focus there but visible outline would be jarring. */
#main-content:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  /* synced with iOS app — Escape/Utilities/EscapeColors.swift */
  --bg: #0B0B0E;
  --bg-elev: #15151A;
  --bg-blog: #1A1A1E;
  --bg-overlay: rgba(11, 11, 14, 0.72);
  --ink-1: #FFFFFF;
  --ink-2: #A1A1AA;
  --ink-3: #6B6B75;
  --ink-4: #4A4A52;
  --ink-blog: #EDE8DC;
  --ink-blog-2: #B8B3A8;
  --blue: #4DA3FF;
  --blue-hi: #7CBCFF;
  --amber: #F59E0B;
  --green: #4ADE80;
  --warn: #F87171;
  --line-1: #1F1F26;
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Iowan Old Style', 'Apple Garamond', Charter, Georgia, 'Times New Roman', serif;
  --container: 1180px;
  --reading: 640px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 180ms var(--ease); }
a:hover { opacity: 0.7; }
::selection { background: var(--blue); color: var(--bg); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.hairline { height: 1px; background: var(--line-1); border: 0; margin: 0; }

/* ---------- type primitives ---------- */
.display {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 0; text-wrap: balance; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; margin: 0; text-wrap: balance; }
.h3 { font-size: 1.375rem; line-height: 1.3; font-weight: 500; margin: 0; }
.body-lg { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; margin: 0; }
.body { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.small { font-size: 0.875rem; line-height: 1.4; color: var(--ink-3); margin: 0; }
.eyebrow {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); margin: 0;
}
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), backdrop-filter 240ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg-overlay);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line-1);
}
.nav-inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: grid;
  /* 4 columns: brand | nav-links | nav-search | nav-getapp.
     nav-burger is display:none on desktop so it doesn't claim a cell.
     Pre-search-button era this was 3 columns; adding the search trigger
     without bumping this caused get-app to wrap to a second row at
     1280px+ widths (visible on standard MacBook displays). */
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; color: var(--ink-1); }

.nav-links {
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
}
.nav-links a {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: color 200ms ease, background 200ms ease;
}
.nav-links a:hover { color: var(--ink-1); background: rgba(255,255,255,0.025); }
.nav-links a.is-active { color: var(--ink-1); background: rgba(77,163,255,0.08); }
.nav-links a.is-active::after {
  content: ''; position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 1px; background: #4DA3FF;
}
.nav-label { font-weight: 500; }
.nav-hint {
  font-size: 10px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.nav-hint::before { content: '·'; margin-right: 6px; color: var(--ink-4); opacity: 0.7; }
.nav-links a:hover .nav-hint { color: var(--ink-3); }

.nav-getapp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: var(--ink-1);
  color: #0B0B0E;
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 200ms ease, background 200ms ease;
}
.nav-getapp:hover { transform: translateY(-1px); background: #fff; }
.nav-getapp-glyph { display: inline-flex; }

/* Search trigger in the nav. Sits next to "Get the app" on desktop.
   Hidden on mobile (the modal is reachable from the burger drawer). */
.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}
.nav-search:hover { border-color: rgba(255,255,255,0.25); color: var(--ink-1); background: rgba(255,255,255,0.04); }
.nav-search:focus-visible { outline: 2px solid var(--blue, #4DA3FF); outline-offset: 2px; }
.nav-search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--ink-3);
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (max-width: 900px) {
  .nav-links a { padding: 8px 10px; }
  .nav-hint { display: none; }
}
@media (max-width: 720px) {
  /* Hide search trigger on mobile — burger drawer surfaces it instead. */
  .nav-search { display: none; }
}

/* ============================================================
   Search modal (Pagefind site search)
   Lazy-loads pagefind-ui.js + pagefind-ui.css on first open.
   ============================================================ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 8vh, 110px) 20px 20px;
  overflow-y: auto;
}
.search-modal[hidden] { display: none; }
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,11,14,0.78);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}
.search-modal-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  background: var(--bg-elev, #15151A);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.search-modal-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 14px;
  padding-right: 36px;
}
.search-modal-foot {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.search-modal-foot kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--ink-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  margin: 0 1px;
}
.search-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, color 200ms ease;
}
.search-modal-close:hover { background: rgba(255,255,255,0.06); color: var(--ink-1); }

/* Pagefind UI overrides — match the site palette. The default theme is
   light; we tune the CSS variables Pagefind exposes for full dark-mode. */
#pagefind-search {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--ink-1);
  --pagefind-ui-text: var(--ink-1);
  --pagefind-ui-background: var(--bg-elev, #15151A);
  --pagefind-ui-border: rgba(255,255,255,0.10);
  --pagefind-ui-tag: rgba(255,255,255,0.05);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 10px;
  --pagefind-ui-image-border-radius: 6px;
  --pagefind-ui-image-box-ratio: 3 / 2;
  --pagefind-ui-font: inherit;
}
#pagefind-search .pagefind-ui__search-input {
  background: rgba(255,255,255,0.04);
  color: var(--ink-1);
  border-color: rgba(255,255,255,0.10);
}
#pagefind-search .pagefind-ui__search-input:focus {
  border-color: var(--blue, #4DA3FF);
  outline: none;
}
#pagefind-search .pagefind-ui__result-link { color: var(--ink-1); text-decoration: none; }
#pagefind-search .pagefind-ui__result-link:hover { color: var(--blue, #4DA3FF); opacity: 1; }
#pagefind-search .pagefind-ui__result-excerpt { color: var(--ink-2); }
#pagefind-search .pagefind-ui__result-excerpt mark {
  background: rgba(77,163,255,0.18);
  color: var(--ink-1);
  padding: 0 2px;
  border-radius: 2px;
}
#pagefind-search .pagefind-ui__message { color: var(--ink-3); }
#pagefind-search .pagefind-ui__results-area { max-height: 50vh; overflow-y: auto; padding-right: 4px; }
#pagefind-search .pagefind-ui__result { border-color: rgba(255,255,255,0.06); padding: 14px 0; }
#pagefind-search .pagefind-ui__button {
  background: rgba(255,255,255,0.06);
  color: var(--ink-1);
  border: 1px solid rgba(255,255,255,0.10);
}
#pagefind-search .pagefind-ui__button:hover { background: rgba(255,255,255,0.10); }
/* Mobile nav layout (.nav-inner / .nav-links / .nav-getapp) lives in
   the "Mobile hamburger + drawer" block below — kept in one place to
   avoid two conflicting @media (max-width: 720px) rules. */

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-1);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.pill:hover { border-color: var(--line-3); background: rgba(255,255,255,0.02); }
.pill .arrow { display: inline-block; transition: transform 240ms var(--ease); }
.pill:hover .arrow { transform: translateX(3px); }
.text-link { color: var(--blue); font-size: 14px; font-weight: 500; }
.text-link:hover { opacity: 0.7; }

/* ---------- app store badge ---------- */
.appstore { height: 52px; display: inline-block; }
.appstore img { height: 100%; width: auto; }

/* ---------- reveals ---------- */
.reveal {
  opacity: 1; transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- atmospheric backgrounds ---------- */
.atmos {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  z-index: 0;
}
.atmos::before, .atmos::after {
  content: ''; position: absolute; inset: -10%;
  background: radial-gradient(40% 40% at 18% 8%, rgba(59,130,246,0.08), transparent 60%);
}
.atmos::after {
  background: radial-gradient(50% 50% at 85% 90%, rgba(245,158,11,0.04), transparent 60%);
}

/* ---------- film grain ---------- */
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 0;
}

/* ---------- section spacing ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-tight { padding: clamp(60px, 8vw, 96px) 0; position: relative; }

/* ---------- footer ---------- */
.footer { padding: 80px 0 40px; border-top: 1px solid var(--line-1); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h6 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 14px; }
.footer .meta { color: var(--ink-3); font-size: 13px; max-width: 320px; line-height: 1.6; margin-top: 12px; }
.footer .bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; margin-top: 56px; border-top: 1px solid var(--line-1); color: var(--ink-3); font-size: 12px; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer .brand-col { grid-column: span 2; }
  .footer .bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ============================================================
   Footer (.promise) — global, used on every page
   ============================================================ */
.promise { background: var(--bg, #0B0B0E); padding: 96px 24px 56px; border-top: 1px solid var(--line-1); margin-top: 80px; }
.promise-inner { max-width: 1100px; margin: 0 auto; }
.promise-mark { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.promise-mark img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.promise-name { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-1); }
.promise-h { font-size: clamp(1.4rem, 2.8vw, 1.875rem); font-weight: 500; letter-spacing: -0.022em; line-height: 1.3; color: var(--ink-1); max-width: 720px; margin: 0 0 56px; text-wrap: balance; }
.promise-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; padding: 36px 0 0; border-top: 1px solid var(--line-1); }
.promise-cols .eyebrow { font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 16px; }
.promise-cols a { display: block; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 7px 0; line-height: 1.4; transition: color 200ms ease; }
.promise-cols a:hover { color: var(--ink-1); opacity: 1; }
.promise-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-1); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; font-size: 12px; color: var(--ink-4); letter-spacing: 0.02em; }
.promise-foot-dot { color: var(--ink-4); opacity: 0.55; }
@media (max-width: 720px) {
  .promise { padding: 72px 24px 48px; margin-top: 56px; }
  .promise-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .promise-h { margin-bottom: 40px; }
}
@media (max-width: 480px) {
  .promise-cols { grid-template-columns: 1fr; gap: 24px; }
}


/* ============================================================
   Sticky mobile install bar — fixed bottom, mobile-only,
   appears after the user has scrolled past the hero.
   Single-tap path to the App Store from anywhere in the site.
   Suppressed on /download.html and the immersive practice pages
   (see install_bar_pages_to_skip in scripts/build_site.py).
   ============================================================ */
.install-bar {
  display: none;             /* hidden on desktop AND until JS adds .install-bar-show */
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  z-index: 60;               /* above tab nav (49) and footer; below modal (100) */
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink-1);
  color: #0B0B0E;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  /* Slide up from below when revealed */
  transform: translate3d(0, calc(100% + 24px), 0);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22,0.61,0.36,1),
              opacity 320ms cubic-bezier(0.22,0.61,0.36,1);
}
.install-bar-glyph {
  display: inline-flex;
  flex: 0 0 auto;
}
.install-bar-label {
  flex: 1;
  font-weight: 500;
}
.install-bar-label strong { font-weight: 600; }
.install-bar-arrow {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.7;
}
.install-bar:hover { opacity: 0.95; }
.install-bar:hover .install-bar-arrow { opacity: 1; }

@media (max-width: 720px) {
  .install-bar { display: inline-flex; }
  .install-bar.install-bar-show {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* If the user prefers reduced motion, skip the slide-up — the bar
   just fades in. */
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .install-bar { transition: opacity 200ms ease; transform: none; }
}

/* ============================================================
   Mobile hamburger + drawer
   Default: BOTH hidden on every viewport. Only the @media block
   below at max-width: 720px flips them to visible. This guarantees
   no leakage onto desktop or wide tablets, regardless of CSS load
   order or class state.
   ============================================================ */

.nav-burger { display: none; }
.nav-drawer { display: none; }

/* Body scroll lock when drawer is open — works at any size,
   harmless if drawer never opens */
body.no-scroll { overflow: hidden; }

@media (max-width: 720px) {
  /* --- Burger button ---
     Three absolutely-positioned bars inside a 44×44 button. Top + bottom
     bars sit ±7px from center; on close, both collapse to center with a
     ±45° rotation so the X always meets cleanly at one point.            */
  .nav-burger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease;
  }
  .nav-burger:hover { background: rgba(255,255,255,0.06); }
  .nav-burger:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .nav-burger-line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 2px;
    margin-left: -11px;       /* horizontal centering */
    margin-top: -1px;          /* vertical centering of the 2px bar */
    background: var(--ink-1);
    border-radius: 2px;
    transform-origin: center center;
    transition: transform 260ms cubic-bezier(0.22,0.61,0.36,1),
                opacity 180ms ease;
  }
  .nav-burger-line:nth-child(1) { transform: translateY(-7px); }
  .nav-burger-line:nth-child(2) { transform: translateY(0); }
  .nav-burger-line:nth-child(3) { transform: translateY(7px); }

  /* Open state — top + bottom collapse to dead center, then rotate.
     Order matters: rotate first, translate is 0 so they coincide exactly. */
  .drawer-open .nav-burger-line:nth-child(1) { transform: rotate(45deg); }
  .drawer-open .nav-burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .drawer-open .nav-burger-line:nth-child(3) { transform: rotate(-45deg); }

  /* --- Nav layout (4 columns: brand | empty | burger | get-app) ---
     Explicit grid-column on burger + get-app is REQUIRED. nav-links is
     display:none on mobile, which removes it from grid auto-placement
     entirely. Without explicit columns, the remaining 3 children would
     fill columns 1-2-3 and the burger would land mid-bar instead of on
     the right. */
  .nav-inner {
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
  }
  .brand { grid-column: 1; }
  .nav-links { display: none; }
  /* .nav-search is display:none at this breakpoint — out of grid flow. */
  .nav-burger { grid-column: 3; }
  .nav-getapp { grid-column: 4; padding: 7px 12px; font-size: 12px; }

  /* --- Drawer panel (only renders on mobile) --- */
  .nav-drawer {
    display: block;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    z-index: 49;
    background: rgba(11, 11, 14, 0.96);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 280ms cubic-bezier(0.22,0.61,0.36,1),
                transform 280ms cubic-bezier(0.22,0.61,0.36,1),
                visibility 0s 280ms;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .drawer-open .nav-drawer {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 280ms cubic-bezier(0.22,0.61,0.36,1),
                transform 280ms cubic-bezier(0.22,0.61,0.36,1),
                visibility 0s 0s;
  }

  .nav-drawer-inner {
    padding: 32px 28px max(48px, env(safe-area-inset-bottom, 48px));
    max-width: 720px;
    margin: 0 auto;
  }
  .drawer-nav { display: flex; flex-direction: column; }
  .drawer-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 22px 4px;
    border-bottom: 1px solid var(--line-1);
    text-decoration: none;
    color: var(--ink-1);
    transition: opacity 200ms ease;
  }
  .drawer-link:hover, .drawer-link:active { opacity: 0.65; }
  /* Drawer search button — a square icon-only tap target sitting above
     the nav links. No label (per design): a magnifying glass speaks for
     itself. Bordered chip so it reads as a button, not part of the menu. */
  .drawer-search {
    width: 56px;
    height: 56px;
    margin: 0 0 14px;
    padding: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-1);
    transition: background 200ms ease, border-color 200ms ease;
    align-self: flex-start;
  }
  .drawer-search:hover, .drawer-search:active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
    opacity: 1;
  }
  .drawer-search:focus-visible { outline: 2px solid var(--blue, #4DA3FF); outline-offset: 2px; }
  .drawer-search-icon { display: inline-flex; }
  .drawer-label {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1;
  }
  .drawer-hint {
    font-size: 12px;
    color: var(--ink-3);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
  }
  .drawer-foot {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line-1);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    font-size: 13px;
    color: var(--ink-3);
  }
  .drawer-foot a { color: var(--ink-2); text-decoration: none; transition: color 200ms ease; }
  .drawer-foot a:hover { color: var(--ink-1); opacity: 1; }
  .drawer-foot-dot { color: var(--ink-4); }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .nav-drawer { transition: opacity 100ms ease, visibility 0s; transform: none; }
  /* Reduced-motion users: skip the rotation. Bars still snap to their
     three positions, line 2 just fades. */
  .nav-burger-line { transition: opacity 100ms ease; }
}
