/* =========================================================
   MEME WORLD ASSET — shared shell
   The one header, top line, mobile menu and footer used by every route:
   the landing page, /launchpad and the token pages. Loaded last on both
   surfaces so the shell always looks identical, whatever the page skin is.
   ========================================================= */

:root {
  --mwa-cream: #F2EEE3;
  --mwa-card: #FFFEFB;
  --mwa-ink: #141414;
  --mwa-lime: #BFFF00;
  --mwa-lime2: #99CC00;
  --mwa-soft: #DDD8C9;
  --mwa-dim: #A9A79F;
  --mwa-mono: 'Kode Mono', 'SFMono-Regular', Consolas, monospace;
  --mwa-max: 1420px;
  --mwa-topline-h: 30px;
  --mwa-header-h: 72px;
  /* Everything that pins itself under the shell measures from here. */
  --mwa-shell-h: calc(var(--mwa-topline-h) + var(--mwa-header-h));
}

[hidden] { display: none !important; }

/* ================================================================ top line */

.mwa-topline {
  height: var(--mwa-topline-h);
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 max(20px, calc((100vw - var(--mwa-max)) / 2));
  border-bottom: 2px solid var(--mwa-ink);
  background: var(--mwa-cream);
  color: var(--mwa-ink);
  font: 600 10px var(--mwa-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mwa-topline span { overflow: hidden; text-overflow: ellipsis; }
.mwa-topline .topline-center { text-align: center; }
.mwa-topline span:last-child { text-align: right; }

/* ================================================================== header */

.mwa-header {
  height: var(--mwa-header-h);
  position: sticky;
  top: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 max(20px, calc((100vw - var(--mwa-max)) / 2));
  border-bottom: 2px solid var(--mwa-ink);
  background: rgba(242, 238, 227, .97);
  backdrop-filter: blur(10px);
  color: var(--mwa-ink);
}
.mwa-wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--mwa-ink);
  text-decoration: none;
}
.mwa-wordmark-box {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 2px solid var(--mwa-ink);
  background: var(--mwa-lime);
  box-shadow: 4px 4px 0 var(--mwa-ink);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.mwa-wordmark-box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mwa-wordmark-text { font: 700 10px/1.05 var(--mwa-mono); letter-spacing: .02em; }

.mwa-desktop-nav { display: flex; height: 100%; align-items: stretch; }
.mwa-desktop-nav a {
  display: flex;
  align-items: center;
  padding: 0 17px;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  color: var(--mwa-ink);
  font: 700 10px var(--mwa-mono);
  letter-spacing: .04em;
  text-decoration: none;
}
.mwa-desktop-nav a:hover { background: var(--mwa-card); border-color: var(--mwa-soft); }
.mwa-desktop-nav a[aria-current="page"] {
  background: var(--mwa-card);
  border-color: var(--mwa-soft);
  box-shadow: inset 0 -3px 0 var(--mwa-lime2);
}

.mwa-header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.mwa-chain-chip, .mwa-nav-button {
  height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--mwa-ink);
  background: var(--mwa-card);
  box-shadow: 3px 3px 0 var(--mwa-ink);
  color: var(--mwa-ink);
  font: 700 9px var(--mwa-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.mwa-chain-chip i {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--mwa-lime2);
}
.mwa-nav-button-solid { background: var(--mwa-lime); }
.mwa-nav-button:hover { background: #fff; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--mwa-ink); }
.mwa-nav-button-solid:hover { background: #D0FF3B; }
.mwa-nav-button:active, .mwa-chain-chip:active { transform: translate(3px, 3px); box-shadow: none; }

.mwa-mobile-menu-button {
  display: none;
  height: 40px;
  padding: 0 12px;
  border: 2px solid var(--mwa-ink);
  background: var(--mwa-card);
  box-shadow: 3px 3px 0 var(--mwa-ink);
  color: var(--mwa-ink);
  font: 700 10px var(--mwa-mono);
  letter-spacing: .05em;
}
.mwa-mobile-menu {
  display: none;
  position: fixed;
  z-index: 70;
  top: var(--mwa-shell-h);
  left: 0;
  right: 0;
  padding: 8px 20px 16px;
  background: var(--mwa-cream);
  border-bottom: 2px solid var(--mwa-ink);
  color: var(--mwa-ink);
  max-height: calc(100dvh - var(--mwa-shell-h));
  overflow-y: auto;
}
.mwa-mobile-menu.open { display: grid; }
.mwa-mobile-menu a {
  padding: 15px 0;
  border-bottom: 1px solid var(--mwa-soft);
  color: var(--mwa-ink);
  font: 700 11px var(--mwa-mono);
  letter-spacing: .05em;
  text-decoration: none;
}
.mwa-mobile-menu a:last-child { border-bottom: 0; }

/* ==================================================== launchpad search rail */

.launch-search-rail {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 12px max(20px, calc((100vw - var(--mwa-max)) / 2));
  border-bottom: 2px solid var(--mwa-ink);
  background: var(--mwa-cream);
}
.launch-search-rail .search-wrap { width: min(100%, 620px); }

/* ================================================================== footer */

.mwa-footer {
  margin-top: auto;
  padding: 34px max(20px, calc((100vw - var(--mwa-max)) / 2)) 38px;
  border-top: 2px solid var(--mwa-ink);
  background: var(--mwa-ink);
  color: var(--mwa-cream);
}
.mwa-footer-inner {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  gap: 26px 44px;
  align-items: start;
}
.mwa-footer-brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.mwa-footer-brand img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: cover; border: 2px solid var(--mwa-cream); }
.mwa-footer-brand span { display: flex; flex-direction: column; gap: 5px; }
.mwa-footer-brand b { font: 800 14px var(--mwa-mono); color: var(--mwa-lime); letter-spacing: .02em; }
.mwa-footer-brand small { font: 600 9px var(--mwa-mono); color: var(--mwa-dim); }
.mwa-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.mwa-footer-links a {
  font: 700 9px var(--mwa-mono);
  letter-spacing: .05em;
  color: var(--mwa-cream);
  text-decoration: none;
  white-space: nowrap;
}
.mwa-footer-links a:hover { color: var(--mwa-lime); }
.mwa-footer p {
  grid-column: 1;
  max-width: 900px;
  margin: 0;
  font: 500 9px/1.7 var(--mwa-mono);
  color: var(--mwa-dim);
}
.mwa-footer-year { grid-column: 2; justify-self: end; align-self: end; font: 700 9px var(--mwa-mono); color: var(--mwa-dim); }

/* ============================================================ breakpoints */

@media (max-width: 1120px) {
  .mwa-chain-chip { display: none; }
  .mwa-desktop-nav a { padding: 0 12px; }
  .mwa-nav-button { padding: 0 11px; }
}

@media (max-width: 900px) {
  .mwa-topline { grid-template-columns: 1fr 1fr; }
  .mwa-topline .topline-center { display: none; }
  /* On :root, not on the header: --mwa-shell-h is what the mobile menu and
     the launchpad's sticky rail measure from, and a local override here would
     leave them pinned 4px too low. */
  :root { --mwa-header-h: 68px; }
  .mwa-header { grid-template-columns: 1fr auto; }
  .mwa-desktop-nav,
  .mwa-header-actions > .mwa-nav-button,
  .mwa-header-actions > .wallet-wrap { display: none; }
  .mwa-mobile-menu-button { display: inline-flex; align-items: center; }
  .mwa-footer-inner { grid-template-columns: 1fr; }
  .mwa-footer-links { justify-content: flex-start; }
  .mwa-footer p, .mwa-footer-year { grid-column: 1; justify-self: start; }
}

@media (max-width: 620px) {
  .mwa-topline { font-size: 8px; padding: 0 12px; }
  .mwa-header { padding: 0 12px; }
  .mwa-wordmark-box { width: 38px; height: 38px; box-shadow: 3px 3px 0 var(--mwa-ink); }
  .mwa-footer { padding: 28px 14px 32px; }
  .mwa-footer-links { display: grid; grid-template-columns: 1fr 1fr; }
  .launch-search-rail { padding: 10px 12px; }
}

/* =========================================================
   Touch targets
   Every control the shell owns is reachable with a thumb: the footer nav was
   9px type with no padding, and the menu button sat just under the 44px floor.
   ========================================================= */
.mwa-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 0;
}
.mwa-mobile-menu-button { min-height: 44px; height: 44px; padding: 0 14px; }
.mwa-wordmark { min-height: 44px; }

@media (max-width: 620px) {
  /* One column reads better than two cramped ones once the rows are tall. */
  .mwa-footer-links { grid-template-columns: 1fr; gap: 0 20px; }
}

/* The two actions in the mobile menu are not navigation, so they do not look
   like the four links above them. */
.mwa-mobile-menu .mwa-menu-action {
  justify-content: center;
  margin-top: 10px;
  padding: 14px 16px;
  border: 2px solid var(--mwa-ink);
  border-bottom: 2px solid var(--mwa-ink);
  background: var(--mwa-card);
  box-shadow: 3px 3px 0 var(--mwa-ink);
  text-align: center;
}
.mwa-mobile-menu .mwa-menu-action-primary { background: var(--mwa-lime); }
.mwa-mobile-menu .mwa-menu-action:active { transform: translate(3px, 3px); box-shadow: none; }
