/* ===========================================================================
   $mBUDDY token surfaces — Math Buddies: Wilderness Trail
   Same palette + type as the rest of the trail (pine / blaze / ochre / forest).
   Loaded AFTER each page's own stylesheet so it may override, but every
   override here is deliberately scoped (media-scoped for .foot-grid) so the
   page's own breakpoints keep working.
   =========================================================================== */
.tok-band {
  --mb-pine: #1B2A22;
  --mb-paper: #F4EFE2;
  --mb-blaze: #C2481B;
  --mb-ochre: #C9911B;
  --mb-body: 'Lexend', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --mb-display: 'Zilla Slab', 'Rockwell', 'Roboto Slab', Georgia, serif;
  background: var(--mb-pine);
  color: #E7EDE6;
  font-family: var(--mb-body);
  padding: 74px 0 70px;
  position: relative;
  overflow: hidden;
  border-top: 2px solid #0F1A14;
}
.tok-band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23F4EFE2' stroke-width='1.2' opacity='0.055'%3E%3Cpath d='M-20 70 C 70 30, 150 120, 250 84 S 400 20, 470 62'/%3E%3Cpath d='M-20 160 C 70 120, 150 210, 250 174 S 400 110, 470 152'/%3E%3Cpath d='M-20 250 C 70 210, 150 300, 250 264 S 400 200, 470 242'/%3E%3Cpath d='M-20 340 C 70 300, 150 390, 250 354 S 400 290, 470 332'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
}
.tok-band .wrap { position: relative; }
.tok-head { max-width: 780px; margin-bottom: 38px; }
.tok-eyebrow {
  font-family: var(--mb-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #E4C173;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.tok-eyebrow::before {
  content: '';
  width: 26px;
  height: 4px;
  background: var(--mb-blaze);
  display: inline-block;
}
.tok-band h2 {
  font-family: var(--mb-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.07;
  letter-spacing: -.01em;
  color: #fff;
  margin: 0 0 16px;
}
.tok-lede { font-size: 17.5px; line-height: 1.62; color: #C9D6C9; max-width: 66ch; margin: 0; }
.nb { white-space: nowrap; }

.tok-grid { display: grid; grid-template-columns: 1.35fr .92fr; gap: 26px; align-items: start; }
.tok-copy-col h3 {
  font-family: var(--mb-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9FB3A4;
  margin: 4px 0 14px;
}
.tok-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tok-card {
  background: rgba(6, 20, 12, .42);
  border: 1px solid rgba(201, 214, 198, .22);
  border-radius: 10px;
  padding: 20px 20px 18px;
}
.tok-num { font-weight: 600; font-size: 11px; letter-spacing: .14em; color: #E4C173; }
.tok-card h4 {
  font-family: var(--mb-display);
  font-size: 20px;
  line-height: 1.15;
  color: #fff;
  margin: 6px 0 8px;
}
.tok-card p { font-size: 14.2px; line-height: 1.58; color: #BECCBF; margin: 0; }

/* --- contract address card ------------------------------------------------ */
.tok-ca {
  background: rgba(4, 16, 9, .55);
  border: 1px solid rgba(201, 214, 198, .3);
  border-radius: 14px;
  padding: 24px 22px 22px;
}
.tok-ca-eyebrow {
  font-family: var(--mb-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #E7EDE6;
  opacity: .78;
  margin: 0 0 8px;
}
.tok-ca-chain { font-size: 13px; font-weight: 600; color: #E4C173; margin: 0 0 14px; }
.tok-well {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #D7E1D6;
  background: rgba(0, 0, 0, .32);
  border: 1px dashed rgba(201, 214, 198, .34);
  border-radius: 8px;
  padding: 13px 14px;
  min-height: 66px;
  overflow-wrap: break-word;
}
.tok-well[data-live="1"] {
  border-style: solid;
  border-color: rgba(228, 193, 115, .55);
  color: #fff;
  font-size: 14px;
  letter-spacing: .02em;
  word-break: break-all;
}
/* Gated state = caption with a lock glyph, NO ring (an outline reads as an
   active button). The live state gets the paper pill. Keep min-height so the
   row does not jump on launch day. */
.tok-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #C9D6C9;
  font-family: var(--mb-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  min-height: 24px;
  cursor: pointer;
  text-align: left;
}
.tok-btn .tok-lock { width: 13px; height: 13px; flex: none; opacity: .85; }
.tok-btn:hover { color: #fff; }
.tok-ca[data-token-state="coming-soon"] .tok-btn {
  opacity: .78;
  font-weight: 500;
  font-size: 12.5px;
  cursor: default;
}
.tok-ca[data-token-state="live"] .tok-btn,
.tok-ca[data-token-state="live"] .tok-btn:hover {
  background: var(--mb-paper);
  color: var(--mb-pine);
  padding: 10px 14px;
  border-radius: 6px;
  min-height: 38px;
}
.tok-ca[data-token-state="live"] .tok-btn .tok-lock { display: none; }
.tok-status {
  min-height: 18px;
  margin: 9px 0 0;
  font-family: var(--mb-body);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: #E4C173;
}
.tok-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 16px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(201, 214, 198, .18);
}
.tok-facts dt {
  font-family: var(--mb-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #AFC0B3;
  margin: 0 0 5px;
}
.tok-facts dd { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.3; color: #E7EDE6; }
.tok-foot { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: #B7C5BA; }
.tok-foot a, .tok-links a { color: #E4C173; font-weight: 600; text-decoration: none; }
.tok-foot a:hover, .tok-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.tok-fomo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid rgba(228, 193, 115, .35);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(201, 145, 27, .15), rgba(194, 72, 27, .1));
}
.tok-fomo p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #E7EDE6; max-width: 68ch; }
.tok-fomo strong { color: #fff; }
.tok-fomo .btn { border-color: #6C7F70; color: #F4EFE2; background: transparent; box-shadow: 0 3px 0 #55665B; }
.tok-fomo .btn:hover { border-color: #F4EFE2; box-shadow: 0 2px 0 #F4EFE2; background: transparent; }

/* launch-day steps: three lines that make the "pay in $mBUDDY" idea concrete */
.tok-steps { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(201, 214, 198, .18); }
.tok-steps li { list-style: none; display: flex; align-items: baseline; gap: 9px; font-size: 13px; line-height: 1.4; color: #C9D6C9; margin: 0 0 11px; }
.tok-steps li::before { content: none; }
.tok-steps li:last-child { margin-bottom: 0; }
.tok-steps span {
  font-family: var(--mb-body); font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  color: #1B2A22; background: #E4C173; border-radius: 50%;
  width: 17px; height: 17px; display: inline-grid; place-items: center; flex: none;
}

/* --- compact token strip on every non-home page --------------------------- */
.tok-strip .tok-strip-in { align-items: start; }
.tok-strip-in { display: grid; grid-template-columns: 1.25fr .85fr; gap: 30px; align-items: start; }
.tok-strip h2 { font-size: clamp(26px, 3.4vw, 36px); }
.tok-strip .tok-lede { font-size: 16.5px; }
.tok-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 0; font-size: 14px; }

/* --- pricing: the $mBUDDY CTA is a second-tier control while the CA is unset ---
   It stays a real link (it jumps to the contract-address card), so it must not
   impersonate the primary CTA: ghost outline, and the label says "at launch". */
.btn-tokgate {
  background: transparent;
  color: var(--pine, #1B2A22);
  border-color: var(--pine, #1B2A22);
  box-shadow: 0 3px 0 var(--pine, #1B2A22);
  font-weight: 600;
}
.btn-tokgate:hover { background: rgba(27, 42, 34, .06); box-shadow: 0 2px 0 var(--pine, #1B2A22); }
.btn-tokgate small { font-weight: 500; opacity: .8; font-size: 12.5px; }

/* footer: the ticker keeps its own casing (h4s are uppercased by the page CSS,
   which would turn $mBUDDY into $MBUDDY) + the X mark on the handle link */
.foot-col h4.tok-col-head {
  text-transform: none;
  letter-spacing: .08em;
  font-size: 12px;
}
.foot-col a.tok-col-x { display: inline-flex; align-items: center; gap: 6px; }
.foot-col a.tok-col-x svg { width: 11px; height: 11px; fill: currentColor; flex: none; }

/* Safety net: an un-sized <svg> in a nav takes its intrinsic (viewBox) size and can blow the
   whole masthead up to several hundred px on a layout whose nav is a plain block. Every icon
   we inject is capped here regardless of which nav class it landed in. */
.masthead nav a svg, .head-links a svg, footer nav a svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.masthead nav a.tok-nav-opt, .head-links a.tok-nav-opt { display: inline-flex; align-items: center; gap: 5px; }

/* --- navbar ticker + X handle -------------------------------------------- */
/* The ticker is ALL CAPS with a leading $ in a sentence-case row: the $ sits
   above cap height and reads a notch larger, so drop ~1px + .02em tracking.
   Both items carry .navlink so they inherit the mobile nav's own rules. */
.masthead nav a.navlink.tok-nav { font-size: 13px; letter-spacing: .02em; color: #E4C173; }
.masthead nav a.navlink.tok-nav:hover { color: #fff; border-bottom-color: var(--mb-ochre, #C9911B); }
.masthead nav a.navlink.tok-x { display: inline-flex; align-items: center; gap: 6px; }
.masthead nav a.navlink.tok-x svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.head-links a.tok-nav { color: var(--blaze, #C2481B); }
.head-links a.tok-nav-opt { display: inline-flex; align-items: center; gap: 5px; }
.head-links a.tok-nav-opt svg { width: 12px; height: 12px; fill: currentColor; }
footer nav a.tok-nav { color: #E8BB64; font-weight: 600; }

/* --- footer five-column grid (scoped so page breakpoints still win) ------- */
@media (min-width: 901px) {
  .foot-grid { grid-template-columns: 1.35fr .9fr .9fr .9fr .9fr; }
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  .tok-grid, .tok-strip-in { grid-template-columns: 1fr; }
  .tok-band { padding: 56px 0 54px; }
}
@media (max-width: 620px) {
  .tok-cards { grid-template-columns: 1fr; }
  .tok-band h2 { font-size: 30px; }
  .tok-facts { grid-template-columns: 1fr; }
  .tok-fomo { flex-direction: column; align-items: flex-start; }
}

/* --- phones: the worksheets/blog header row is a plain series of links, so the handle's
   text label is what overflows a 390px screen. Keep the glyph (it has an aria-label),
   drop the label, and tighten the row. */
@media (max-width: 560px) {
  .head-links { gap: 12px; }
  .head-links a.tok-nav-opt .tok-x-label { display: none; }
  .head-links a.tok-nav-opt svg { width: 14px; height: 14px; }
  .head-links a.tok-nav { font-size: 12.5px; }
  .masthead nav a.navlink.tok-x .tok-x-label { display: inline; }
}
@media (max-width: 400px) {
  .head-links { gap: 9px; }
  .head-links a, .head-links a.tok-nav { font-size: 11.5px; }
}

/* Gated copy control: a caption, not a button. Reads as unavailable at a glance while
   still explaining itself in the adjacent well; the live state restores the paper pill. */
.tok-ca[data-token-state="coming-soon"] .tok-btn {
  opacity: .78;
  font-weight: 500;
  font-size: 12.5px;
  cursor: default;
}
