/* Market selector + Learn menu + international notice.
   Works with <html data-market="NG|INTL"> (set before first paint) and
   <html class="js">. Without JavaScript the bar is hidden and BOTH market
   sections stay visible, so nothing is lost. */

/* ── Market bar (fixed under the nav) ─────────────────────── */
.market-bar { display: none; }
.js .market-bar {
  display: block;
  position: fixed; top: 58px; left: 0; right: 0;
  height: 44px;
  z-index: calc(var(--z-nav) - 2);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}
.js .nav-offset { padding-top: 102px; }          /* 58px nav + 44px bar */
.market-bar__inner {
  max-width: 960px; height: 100%; margin-inline: auto;
  padding-inline: var(--space-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.market-bar__label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); white-space: nowrap; }

.market-switch {
  display: inline-flex; padding: 2px; gap: 2px;
  border: 1px solid var(--color-border); border-radius: 999px; background: var(--bg-card);
}
.market-switch__opt {
  min-height: 32px; padding: 0 var(--space-4);
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: inherit; font-size: var(--text-xs); font-weight: 700; color: var(--text-body);
}
.market-switch__opt:hover { background: var(--color-sky-pale); }
.market-switch__opt:focus-visible { outline: 3px solid var(--color-sky); outline-offset: 2px; }
/* state is keyed on <html data-market>, so it is correct before any script runs */
html[data-market="NG"]   .market-switch__opt[data-market-set="NG"],
html[data-market="INTL"] .market-switch__opt[data-market-set="INTL"] {
  background: var(--color-blue); color: var(--color-white);
}
@media (max-width: 400px) {
  .market-bar__label { display: none; }
  .market-bar__inner { justify-content: center; }
}

/* footer copy of the switch */
.footer__market { margin-top: var(--space-4); display: none; }
.js .footer__market { display: block; }
.footer__market .market-switch { background: transparent; border-color: rgba(255,255,255,.25); }
.footer__market .market-switch__opt { color: rgba(255,255,255,.8); }
.footer__market .market-switch__opt:hover { background: rgba(255,255,255,.1); }
.footer__market-label { display: block; margin-bottom: var(--space-2); font-size: var(--text-xs); font-weight: 600; color: var(--text-on-dark-soft); }

/* ── Market-only content ──────────────────────────────────── */
.js[data-market="NG"]   [data-market-only="INTL"],
.js[data-market="INTL"] [data-market-only="NG"] { display: none !important; }

.market-notice {
  max-width: 960px; margin: var(--space-4) auto 0; padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border); border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-md); background: var(--bg-card);
  color: var(--text-body); font-size: var(--text-sm); line-height: 1.55;
}
.market-notice a { font-weight: 700; color: var(--link); }
main > .market-notice { width: calc(100% - 2 * var(--space-5)); }

/* ── Learn dropdown (desktop) ─────────────────────────────── */
.nav__menu { position: relative; list-style: none; }
.nav__menu > summary { list-style: none; cursor: pointer; }
.nav__menu > summary::-webkit-details-marker { display: none; }
.nav__menu > summary::after { content: "▾"; margin-left: 6px; font-size: .8em; }
.nav__menu[open] > summary { color: var(--color-white); background: rgba(255,255,255,.1); }
.nav__menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; padding: var(--space-2);
  list-style: none; background: var(--color-ink);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.nav__menu-link {
  display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: rgba(255,255,255,.8); text-decoration: none;
}
.nav__menu-link:hover, .nav__menu-link.is-active { background: rgba(255,255,255,.1); color: var(--color-white); }
.nav__link:focus-visible, .nav__menu-link:focus-visible, .nav__menu > summary:focus-visible { outline: 3px solid var(--color-sky); outline-offset: 2px; }

/* drawer sub-group */
.nav__drawer-group { padding: var(--space-3) var(--space-4) var(--space-1); font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.nav__drawer-link--sub { padding-left: var(--space-8); }

/* First-visit location question */
.mkt-prompt{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;flex-wrap:wrap;gap:var(--space-3,12px);align-items:center;justify-content:center;padding:12px 16px;background:var(--bg-elevated,#fff);color:var(--text-primary,#222);border-top:1px solid var(--border,#ddd);box-shadow:0 -4px 16px rgba(0,0,0,.08)}
.mkt-prompt__q{margin:0;font-size:.95rem}
.mkt-prompt__btns{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.has-sticky .mkt-prompt{bottom:64px}
.mkt-prompt .btn--ghost { color: var(--text-primary); border: 1.5px solid var(--color-border); background: transparent; }
.mkt-prompt .btn--ghost:hover { background: var(--color-surface-2); }
.mkt-prompt .btn { white-space: normal; text-align: center; }