/* The phone layout. Everything here sits inside one media query, so the
   desktop pages stay exactly as designed. */
.m-bar, .m-menu, .m-cart { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  body { padding-top: 60px; -webkit-text-size-adjust: 100%; }
  [data-m="topnav"] { display: none !important; }

  /* header */
  .m-bar { display: flex; align-items: center; gap: 10px; position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 60px; padding: 0 12px 0 14px; background: #0E2A24; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08); font-family: Rubik, sans-serif; }
  .m-logo { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; margin-right: auto; min-width: 0; }
  .m-logo img { height: 30px; width: auto; flex: none; }
  .m-logo span { font: 400 13.5px/1.05 'Archivo Black', sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
  .m-logo small { display: block; font: 700 9px/1.2 Rubik, sans-serif; letter-spacing: .16em; color: #E0A526; }
  .m-reg { flex: none; background: #E0A526; color: #1A1A1A; font: 800 14px/1 Rubik, sans-serif; padding: 11px 15px; border-radius: 999px; text-decoration: none; }
  .m-burger { flex: none; width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-content: center; gap: 5px; cursor: pointer; padding: 0; }
  .m-burger i { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .3s, opacity .2s; }
  .m-open .m-burger i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .m-open .m-burger i:nth-child(2) { opacity: 0; }
  .m-open .m-burger i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  /* menu */
  .m-menu { display: flex; flex-direction: column; position: fixed; inset: 60px 0 0; z-index: 89; background: #0E2A24; color: #fff; padding: 22px 22px calc(26px + env(safe-area-inset-bottom)); overflow-y: auto; font-family: Rubik, sans-serif; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .25s, transform .25s, visibility 0s .25s; }
  .m-open .m-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s; }
  .m-menu a.big { display: block; font: 400 30px/1 'Archivo Black', sans-serif; text-transform: uppercase; color: #fff; text-decoration: none; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .m-menu a.big.on { color: #E0A526; }
  .m-menu .small { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 20px 0; }
  .m-menu .small a { color: #CFE3DE; text-decoration: none; font-size: 15px; padding: 8px 0; }
  .m-menu .btns { display: grid; gap: 10px; margin-top: auto; padding-top: 10px; }
  .m-menu .btns a { display: block; text-align: center; padding: 16px; border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none; }
  .m-menu .btns .gold { background: #E0A526; color: #1A1A1A; }
  .m-menu .btns .line { border: 2px solid rgba(255,255,255,.7); color: #fff; }
  .m-open { overflow: hidden; }

  /* ---------- homepage ---------- */
  [data-m="hero"] { min-height: calc(100svh - 60px) !important; }
  [data-m="hero"] > div:last-child { padding: 40px 20px 34px !important; }
  [data-m="hero"] h1 { font-size: clamp(42px, 13vw, 60px) !important; }
  [data-m="hero"] [data-reveal] a { flex: 1 1 100%; text-align: center; }
  [data-m="herocap"] { display: none !important; }
  [data-m="hero"] > img { object-position: 74% 50% !important; }
  [data-m="chapters"] { display: block !important; margin-top: 28px !important; }
  [data-m="stage"] { display: none !important; }
  [data-m="steps"] { gap: 44px !important; padding: 0 !important; }
  [data-m="stageimg"] { display: block !important; margin: 0 0 18px; position: relative; }
  [data-m="stageimg"] img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; box-shadow: 0 18px 40px rgba(14,42,36,.18); }
  [data-m="stageimg"] figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(26,26,26,.75); color: #fff; font: 600 11.5px/1 Rubik, sans-serif; padding: 7px 10px; border-radius: 8px; }
  [data-chapter] > div:nth-child(2) { font-size: 54px !important; }
  [data-m="tiles"] { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  [data-m="tiles"] a > div { font-size: 12.5px !important; letter-spacing: .04em !important; word-break: normal !important; overflow-wrap: normal !important; hyphens: manual; line-height: 1.1 !important; padding: 10px !important; }
  [data-m="supportkick"] { line-height: 1.6 !important; margin-bottom: 14px !important; letter-spacing: .18em !important; }
  #support a { flex: 1 1 100%; text-align: center; }

  /* tighter vertical rhythm: desktop spacing reads as empty space on a phone */
  section[style*="padding: 96px 0px"], section[style*="padding: 88px 0px"], section[style*="padding: 80px 0px"] { padding-top: 52px !important; padding-bottom: 52px !important; }
  section[style*="padding: 0px 0px 96px"] { padding-bottom: 52px !important; }
  #miriam img { max-height: 58vh; object-fit: cover; object-position: 50% 25%; }
  [data-m="supportkick"] { position: relative; z-index: 1; }
  [data-m="supportkick"] + h2 { margin-top: 16px !important; line-height: .95 !important; }
  #support { min-height: 0 !important; }
  #support > div:last-child { padding-top: 90px !important; padding-bottom: 40px !important; }
  #faq > div { min-height: 0 !important; }

  /* every page: less side padding, nothing wider than the screen */
  section > div[style*="padding: 0px 32px"], section > div > div[style*="padding: 0px 32px"], footer > div, main[style*="padding: 0px 32px"], header[style*="32px"], section[style*="padding: 0px 32px"] { padding-left: 20px !important; padding-right: 20px !important; }
  header[style*="padding: 64px 32px"] { padding-top: 32px !important; }
  img { max-width: 100%; }

  [data-m="asktiles"] { gap: 8px !important; }
  [data-m="asktiles"] > div { padding: 14px 6px !important; }
  [data-m="asktiles"] > div > div:first-child { font-size: 22px !important; }
  [data-m="asktiles"] [data-pays] { font-size: 12px !important; }
  [data-ask] .ml-ring { width: 64px !important; height: 64px !important; margin-bottom: 4px !important; }
  [data-ask] .ml-cover { font-size: 11px !important; }
  [data-ask] .ml-badge { width: 22px; height: 22px; top: 6px; right: 6px; font-size: 12px; }

  /* ---------- after-school ---------- */
  [data-m="ascard"] > div { flex-direction: row !important; }
  [data-m="asimg"] { width: 112px !important; height: auto !important; min-height: 132px; }
  [data-m="ascard"] > div > div:last-child { padding: 12px 14px !important; gap: 4px !important; min-width: 0; }
  [data-m="ascard"] > div > div:last-child > div:nth-child(2) { font-size: 16px !important; min-height: 0 !important; }
  [data-m="ascard"] > div > div:last-child > div:nth-child(3) { min-height: 0 !important; font-size: 12.5px !important; }
  [data-m="ascard"] > div > div:last-child > div:last-child { padding-top: 6px !important; }
  [data-m="ascard"] > div > div:last-child > div:last-child > div { padding: 8px !important; font-size: 14px !important; }
  [data-m="panel"] { position: static !important; flex: 1 1 100% !important; min-width: 0 !important; padding: 20px !important; }
  .m-cart { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 80; display: flex; align-items: center; gap: 12px; background: #1A1A1A; color: #fff; border-radius: 16px; padding: 10px 10px 10px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.3); font-family: Rubik, sans-serif; transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .m-cart.show { transform: none; }
  .m-cart b { font: 400 22px/1 'Archivo Black', sans-serif; }
  .m-cart span { font-size: 13px; color: #CFCFCF; display: block; margin-top: 3px; }
  .m-cart a { margin-left: auto; background: #E0A526; color: #1A1A1A; font-weight: 800; font-size: 15px; padding: 13px 16px; border-radius: 12px; text-decoration: none; white-space: nowrap; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .m-menu, .m-cart, .m-burger i { transition: none; } }

/* The two card buttons stay on one line on phones. */
@media (max-width: 760px) {
  [data-m="ascard"] [data-btn] { box-sizing: border-box; height: 42px !important; display: flex !important; align-items: center; justify-content: center; font-size: 13.5px !important; padding: 0 4px !important; white-space: nowrap; }
  [data-m="ascard"] [data-btnrow] > div { padding: 0 !important; margin: 0 !important; }
}
