@import url('/css/mdx-tokens.css?v=2');   /* shared warm-neutral design tokens (single source; marketing pages get them here) */
@import url('/css/mdx-base.css?v=2');   /* central: multilingual fonts application + circular-flag language switcher */

/* Shared MarketDX marketing nav — ONE source of truth (homepage, playground, any future page).
   Ivory floating pill + black logo, self-contained colors (works on light OR dark pages).
   Pages: <link> this, drop a <div id="mdx-nav"></div>, and load /js/site-nav.js. Add top padding
   to your own hero/content to clear the fixed nav (~100px). */
.nav-wrap{position:fixed;top:24px;left:0;right:0;z-index:999;display:flex;justify-content:center;pointer-events:none}
.nav-inner{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;width:100%;max-width:1440px}
.nav-inner .logo{grid-column:1;pointer-events:auto;width:56px;height:56px;border-radius:18px;overflow:hidden;background:#000;box-shadow:var(--shadow-std);margin-left:32px;justify-self:start;display:block}
.nav-inner .logo img{width:100%;height:100%;object-fit:cover;display:block}
.nav-inner .pill{pointer-events:auto;display:flex;align-items:center;gap:28px;background:#fff;border-radius:9999px;padding:9px 12px 9px 28px;box-shadow:var(--shadow-std);font-size:15px;font-weight:500;justify-self:center}
/* app nav (plain links, no black .live CTA): symmetric padding so it isn't left-heavy */
.nav-inner .pill:not(:has(.live)){padding:9px 28px}
.nav-inner .pill a{color:#000;text-decoration:none;font-weight:700}.nav-inner .pill a:hover{opacity:.6}
.nav-inner .pill a.cur{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:2px}
.nav-inner .pill .live{display:flex;align-items:center;gap:8px;background:#000;color:#F7F6F2;border-radius:9999px;padding:9px 18px;font-weight:700}.nav-inner .pill .live:hover{opacity:1;filter:brightness(1.15)}
.nav-right{grid-column:3;justify-self:end;margin-right:32px}
.nav-burger{display:none;pointer-events:auto;width:46px;height:46px;border-radius:14px;background:#fff;box-shadow:var(--shadow-std);border:none;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.nav-burger span{display:block;width:20px;height:2px;background:#000;border-radius:2px}
.nav-menu{display:none;position:fixed;top:86px;left:16px;right:16px;z-index:998;background:#fff;border-radius:24px;box-shadow:var(--shadow-std);padding:14px;flex-direction:column;gap:2px;pointer-events:auto}
.nav-menu a{padding:13px 16px;border-radius:14px;text-decoration:none;color:#000;font-weight:700;font-size:16px}
.nav-menu .nm-primary{background:#000;color:#F7F6F2;text-align:center;margin-top:6px}
.nav-menu.open{display:flex}
@media(max-width:760px){ .nav-inner .pill{display:none} .nav-burger{display:flex} }
/* language switcher + suggestion banner styles now live in the central /css/mdx-base.css */

/* ── account chip (top-right) + Portfolio dropdown — SINGLE SOURCE. Rendered by account.js /
   nav.js on the app (taste) pages; every one of them loads THIS file. Was duplicated in
   portfolio/css/taste.css and inline in explore/index.html — both removed. Tokens
   (--success/--error/--shadow/…) resolve from taste-core.css. Unused on marketing pages. ── */
.auth-chip{pointer-events:auto;display:inline-flex;align-items:center;gap:8px;background:#fff;border-radius:var(--pill);padding:9px 16px;box-shadow:var(--shadow-std);font-size:13px;font-weight:700;color:var(--black);cursor:pointer;transition:opacity .15s}
.auth-chip:hover{opacity:.72}
.auth-chip.guest{color:var(--muted)}
.auth-chip .dot{width:8px;height:8px;border-radius:50%;background:var(--dim)}
.auth-chip .dot.on{background:var(--success)}
.auth-chip .avatar{width:22px;height:22px;border-radius:50%;background:var(--black);color:var(--ivory);
  display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex:none}
.auth-chip img.avatar{object-fit:cover;background:none}
/* unread-inbox badge — small red count pill, shown on the account chip AND the dropdown Inbox row */
.nb-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--error,#d23b3b);color:#fff;font-size:11px;font-weight:800;line-height:1}
.auth-chip .nb-badge{margin-left:2px}
.chip-menu button .nb-badge{margin-left:auto}   /* push to the RIGHT edge of the Inbox menu row */
.chip-wrap{position:relative;pointer-events:auto}
.chip-menu{position:absolute;right:0;top:52px;background:var(--bg);border-radius:16px;box-shadow:var(--shadow);
  padding:8px;min-width:210px;display:none;z-index:60}
.chip-menu.open{display:block}
.chip-menu .cm-head{padding:9px 12px 11px;border-bottom:1px solid var(--border-medium);margin-bottom:6px}
.chip-menu .cm-name{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip-menu .cm-sub{color:var(--muted);font-size:12px;font-weight:500;margin-top:1px}
.chip-menu button{display:flex;align-items:center;gap:10px;width:100%;border:none;background:none;text-align:left;
  padding:11px 12px;border-radius:10px;font:inherit;font-weight:600;font-size:14px;cursor:pointer;color:var(--black)}
.chip-menu button:hover{background:var(--ivory)}
.chip-menu button svg{width:16px;height:16px;opacity:.7;flex:none}
.chip-menu button.danger{color:var(--error)}
/* align-self:stretch → the dropdown wrapper fills the pill's content height, so the menu (top:100%+…)
   anchors to the pill BOTTOM, not the vertically-centered 15px button. Without this the gap under the
   pill = 12 − (pillHeight − 15)/2, and pillHeight varies with each language's font metrics → the submenu
   sat a different distance below the nav per language. Now the gap is constant across en/th/ja. */
.nav-drop{position:relative;display:flex;align-items:center;align-self:stretch}
.nav-drop-btn{border:none;background:none;font:inherit;font-weight:700;font-size:15px;color:var(--black);
  cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:0;line-height:1}
.nav-drop-btn:hover{opacity:.6}
.nav-drop-btn.on{background:var(--black);color:var(--ivory);border-radius:var(--pill);padding:9px 16px}
.nav-drop-btn.on:hover{opacity:1;filter:brightness(1.18)}
.nav-drop-btn .caret{transition:transform .2s ease}
.nav-drop.open .nav-drop-btn .caret{transform:rotate(180deg)}
.nav-drop-menu{position:absolute;top:calc(100% + 12px);left:50%;transform:translateX(-50%) translateY(-6px);
  background:var(--bg);border-radius:16px;box-shadow:var(--shadow);padding:8px;min-width:186px;
  display:flex;flex-direction:column;gap:2px;opacity:0;pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;z-index:70}
.nav-drop.open .nav-drop-menu{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0)}
.nav-drop-menu a{padding:10px 14px;border-radius:10px;text-decoration:none;color:var(--black);
  font-weight:700;font-size:14px;white-space:nowrap;display:flex;align-items:center;gap:9px}
.nav-drop-menu a:hover{background:var(--ivory)}
.nav-drop-menu a.cur{background:var(--ivory)}
.nav-drop-menu a svg{width:15px;height:15px;opacity:.6;flex:none}

/* ══════ SEARCH nav-mode (desktop pill ↔ textbox · mobile centered bar) ══════
   Lives HERE (not in the lazy-loaded mdx-search.css) so it applies SYNCHRONOUSLY on first paint —
   otherwise .ns-field/.ns-mob (always in the nav DOM) flash unstyled for a beat = broken nav (FOUC).
   The full-page results panel CSS stays in mdx-search.css (loaded lazily on first 🔍 open). */
.ns-sic{width:32px;height:32px;border-radius:9999px;background:#f2efe9;display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer;color:var(--dark-warm)}
.ns-sic:hover{background:#e9e5dd}
.ns-sic svg{width:17px;height:17px}
/* the pill in SEARCH mode: menu links + the 🔍 button hidden, input shown (same pill width) */
.pill.searching .nav-drop,.pill.searching > a,.pill.searching > .nav-drop-menu,.pill.searching .ns-sic{display:none!important}
.ns-field{display:none;flex:1;align-items:center;gap:11px;min-width:0}
.pill.searching .ns-field{display:flex}
.pill.searching{gap:11px;box-sizing:border-box}   /* border-box → the JS-locked offsetWidth is exact */
.ns-field .ns-in{flex:1;min-width:0;border:none;outline:none;background:transparent;font-family:inherit;font-size:15px;font-weight:600;color:var(--dark-warm)}
.ns-field .ns-in::placeholder{color:var(--dim);font-weight:500}
.ns-field .ns-mag{flex:none;opacity:.5;display:flex}
.ns-field .ns-x{width:30px;height:30px;border-radius:9999px;background:var(--dark-warm);color:#fff;display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer;font-size:15px;line-height:1;border:none}
/* while a query is in flight the ✕ becomes a spinner — hide the glyph, spin a ring */
.pill.mdxs-loading .ns-x,.ns-mob.mdxs-loading .ns-mx{color:transparent;position:relative}
.pill.mdxs-loading .ns-x::after,.ns-mob.mdxs-loading .ns-mx::after{content:'';position:absolute;inset:0;margin:auto;width:14px;height:14px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:ns-spin .6s linear infinite}
@keyframes ns-spin{to{transform:rotate(360deg)}}
/* MOBILE bar (pill hidden ≤760): CENTERED; tap expands toward — not over — the logo, reveals ✕, hides burger */
.ns-mob{display:none}
@media(max-width:760px){
  .ns-mob{display:flex;grid-column:2;justify-self:center;align-items:center;gap:9px;width:min(210px,52vw);box-sizing:border-box;background:#fff;border:1px solid var(--card-border-color);border-radius:9999px;padding:10px 15px;box-shadow:0 6px 20px rgba(0,0,0,.06);pointer-events:auto;cursor:text}
  .ns-mob .ns-mag{flex:none;opacity:.5;display:flex}
  .ns-mob .ns-min{flex:1;min-width:0;width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:16px;font-weight:600;color:var(--dark-warm)}
  .ns-mob .ns-min::placeholder{color:var(--dim);font-weight:500}
  .ns-mob .ns-mx{display:none;margin-left:auto;width:26px;height:26px;border-radius:9999px;background:var(--dark-warm);color:#fff;align-items:center;justify-content:center;flex:none;font-size:13px;line-height:1;cursor:pointer;border:none}
  /* SEARCH ACTIVE (any page, mobile): nav becomes a FLEX ROW = logo + stretched box on ONE line. Grid
     column-spanning dropped the box below the logo (ตกบรรทัด) — flex never wraps. */
  .nav-inner:has(.ns-mob.active){display:flex;align-items:center;gap:14px;padding-right:16px}
  .nav-inner:has(.ns-mob.active) .logo{flex:none;margin-left:32px}
  .nav-inner:has(.ns-mob.active) .nav-cluster{display:none}
  .nav-inner:has(.ns-mob.active) .nav-burger,.nav-inner:has(.ns-mob.active) .nav-burger2{display:none!important}
  .ns-mob.active{flex:1 1 auto;width:auto;min-width:0;margin:0}
  .ns-mob.active .ns-mx{display:flex}
  /* the bar is logo · box · burger with EVEN spacing: 24px outer margins both sides (the burger's), 12px gaps, the
     box stretching between. It was 1fr|auto|1fr with the box centred at a fixed width and the logo on the desktop
     32px margin → 6px from the logo vs 24px from the burger (lopsided). */
  .nav-inner{grid-template-columns:auto minmax(0,1fr) auto;column-gap:12px}
  .nav-inner:has(.ns-mob.active){gap:12px}   /* = the grid's column-gap → tapping the box grows it RIGHTWARD only (its left edge never moves) */
  .nav-inner .logo{margin-left:24px}
  .ns-mob{justify-self:stretch;width:auto;min-width:0}
  .nav-inner:has(.ns-mob.active) .logo,.nav-inner.ns-full .logo{margin-left:24px}
}

/* /search PAGE — the nav is JUST logo + ONE stretched search box (reuse the existing .ns-mob input, don't
   render a new one). Override the 3-col GRID with a simple FLEX ROW so logo + box are ALWAYS on one line
   (grid column/row spanning kept dropping one of them to a 2nd line). Hide the pill / hamburger / cluster. */
.nav-inner.ns-full{display:flex;align-items:center;gap:14px;padding-right:28px}
.nav-inner.ns-full .logo{margin-left:32px;flex:none}
.nav-inner.ns-full .pill{display:none}
.nav-inner.ns-full .nav-cluster{display:none}
.nav-inner.ns-full .nav-burger,.nav-inner.ns-full .nav-burger2{display:none!important}
.nav-inner.ns-full .ns-mob{display:flex;flex:1 1 auto;width:auto;min-width:0;margin:0;order:2;
  align-items:center;gap:9px;background:#fff;border:1px solid var(--card-border-color);border-radius:9999px;padding:10px 15px;box-shadow:0 6px 20px rgba(0,0,0,.06);pointer-events:auto;cursor:text;box-sizing:border-box}
.nav-inner.ns-full .ns-mob .ns-mag{flex:none;opacity:.5;display:flex}
.nav-inner.ns-full .ns-mob .ns-min{flex:1;min-width:0;width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:16px;font-weight:600;color:var(--dark-warm)}
.nav-inner.ns-full .ns-mob .ns-min::placeholder{color:var(--dim);font-weight:500}
.nav-inner.ns-full .ns-mob .ns-mx{display:none}   /* no close ✕ on the dedicated /search page (would leave a blank page) */

/* top-bar chrome = frosted glass: 50% white + gaussian backdrop blur (the page bg blurs through). */
.nav-inner .pill, .nav-burger, .auth-chip, .mdx-langs {
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
