/* Mobile layout derived from the desktop screen. Keep the desktop effects and
   typography; reflow the controls instead of shrinking their fixed positions. */
@media (max-width: 700px) {
  html { scroll-padding-top: 76px; }
  .site {
    min-height: 100vh;
    background:
      radial-gradient(ellipse 340px 280px at 75% 275px, rgba(83, 27, 154, .29), transparent 76%),
      #080513;
  }
  .container, .hero, .header-inner { width: calc(100% - 32px); }

  .site-header {
    height: 72px;
    background: rgba(12, 7, 28, .94);
    border-bottom: 1px solid rgba(179, 123, 255, .12);
  }
  .header-inner { justify-content: space-between; }
  .brand { flex: 0 1 auto; gap: 12px; }
  .brand-mark { width: 35px; height: 38px; }
  .brand-name { width: min(208px, calc(100vw - 112px)); height: auto; }
  .mobile-menu-button {
    position: relative;
    z-index: 2;
    flex: none;
    width: 44px;
    height: 44px;
    align-items: center;
    border: 1px solid rgba(237, 231, 246, .2);
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
  }
  .header-nav {
    top: 72px;
    z-index: 10;
    gap: 0;
    padding: 8px;
    background: #1a102d;
  }
  .menu-open .header-nav { align-items: stretch; }
  .header-nav a { width: 100%; min-height: 48px; padding: 8px 12px; font-size: 14px; }

  .art { left: 0; top: 0; width: 100%; height: 570px; overflow: hidden; }
  .grid-art { left: 75px; top: 150px; width: 670px; opacity: .32; }
  .burst-art, .color-art, .blur-rectangle, .star, .particle { display: none; }
  .star--four, .star--seven, .star--eight,
  .star--four.star--backdrop, .star--seven.star--backdrop, .star--eight.star--backdrop {
    display: block;
  }
  .star--four { left: 8px; top: 347px; transform: scale(.52) rotate(-12deg); }
  .star--seven { left: calc(100% - 46px); top: 397px; }
  .star--eight { left: 43%; top: 285px; transform: scale(.65); }
  .particle--one { display: block; left: 20px; top: 274px; }

  .hero { height: 463px; }
  .hero-copy { padding-top: 29px; max-width: none; }
  .eyebrow { margin-bottom: 15px; font-size: 11px; line-height: 1.45; letter-spacing: 1.45px; }
  .hero h1 { font-size: clamp(35px, 9.7vw, 54px); line-height: 1.05; letter-spacing: -.055em; }
  .purple-text { margin-top: 2px; }
  .hero-description {
    max-width: min(335px, 92%);
    margin-top: 17px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(237, 231, 246, .7);
  }
  .hero-worker {
    left: calc(50% - 266px);
    right: auto;
    top: 196px;
    width: 532px;
    height: auto;
    opacity: 1;
  }

  .calculator-panel {
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 14px 14px;
    border-radius: 24px;
  }
  .calculator-controls { gap: 23px; padding: 0 2px; }
  .calculator-controls h2 { margin: 0 0 15px; font-size: 16px; line-height: 1.35; }
  .role-tabs {
    height: 44px;
    min-height: 44px;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .role-tabs::-webkit-scrollbar { display: none; }
  .role-tab { flex: 0 0 100px; min-width: 100px; font-size: 12px; scroll-snap-align: start; }
  .slider-list { gap: 19px; }
  .slider-field { font-size: 14px; }
  .slider-field > span:first-child { margin-bottom: 9px; }
  .slider-line { gap: 11px; }
  .slider-line output { min-width: 20px; font-size: 15px; }
  input[type=range] { height: 18px; }
  input[type=range]::-webkit-slider-thumb { width: 21px; height: 21px; }

  .result-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }
  .period-tabs {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    flex: none;
    width: 100%;
    height: 39px;
    gap: 4px;
  }
  .period-tab { min-width: 0; font-size: 10px; }
  .income-body { display: flex; flex-direction: column; min-width: 0; }
  .income-kicker,
  .income-value,
  .income-subtitle,
  .income-metrics,
  .comparison,
  .primary-button {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
  }
  .income-kicker {
    width: 100%;
    height: auto;
    min-height: 24px;
    margin: 19px 0 0;
    gap: 7px;
    font-size: clamp(10px, 2.7vw, 13px);
    letter-spacing: 1px;
  }
  .income-kicker img { left: -18px; top: -13px; }
  .income-kicker span { margin-left: 19px; }
  .income-value { height: auto; margin: 24px 0 0; font-size: clamp(34px, 10vw, 46px); line-height: 1.12; }
  .income-subtitle { height: auto; margin: 7px 0 0; font-size: 15px; line-height: 1.5; }
  .income-metrics {
    width: 100%;
    height: auto;
    margin: 25px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 8px;
  }
  .income-metrics div { min-width: 0; }
  .income-metrics strong { height: auto; font-size: 16px; line-height: 1.35; }
  .income-metrics span { height: auto; font-size: 14px; line-height: 1.45; }
  .comparison {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 23px;
    padding: 18px 20px 19px;
    border-radius: 19px;
  }
  .comparison-growth {
    position: relative;
    left: auto;
    top: auto;
    flex: none;
    width: auto;
    height: 30px;
    padding-left: 18px;
  }
  .comparison-growth img { left: -23px; top: -13px; width: 62.2px; height: 56.2px; }
  .comparison-growth strong { position: static; font-size: 24px; line-height: 30px; }
  .comparison > span:last-child {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    min-width: 0;
    gap: 4px;
  }
  .comparison > span:last-child strong { font-size: 16px; line-height: 1.35; }
  .comparison small { color: rgba(237, 231, 246, .72); font-size: 12px; line-height: 1.45; }
  .primary-button {
    flex: none;
    width: 100%;
    height: 46px;
    margin-top: 18px;
    font-size: 14px;
  }

  .feature-row { grid-template-columns: 1fr; gap: 18px; margin: 30px 10px 0; }
  .feature { gap: 14px; }
  .feature .sprite-icon { width: 63px; height: 63px; border-radius: 18px; }
  .feature .sprite-art {
    background-size: 248px 83px;
    background-position-x: calc(-5px + var(--sprite-index) * -58.3px);
  }
  .feature strong { font-size: 14px; }
  .feature small { font-size: 12px; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; margin-top: 32px; padding: 22px 16px; }
  .benefits h2 { font-size: 19px; }
  .benefit { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .benefit strong { font-size: 15px; }
  .benefit small { font-size: 11px; }

  .site-footer {
    width: 100%;
    min-height: 0;
    margin-top: 44px;
    padding: 50px clamp(32px, 12.8vw, 50px) max(50px, env(safe-area-inset-bottom));
    border: 0;
    background: transparent;
  }
  .footer-top { display: block; min-height: 0; }
  .footer-brand { width: 100%; }
  .footer-brand img { width: 118px; height: 129px; }
  .footer-brand p {
    width: min(290px, 100%);
    max-width: none;
    margin-top: 29.5px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -.02em;
  }
  .footer-links {
    display: block;
    width: 100%;
    margin: 102px 0 0;
    padding: 0;
  }
  .footer-links > div { gap: 19.5px; min-width: 0; white-space: normal; font-size: 14px; line-height: 21px; }
  .footer-links > div + div { display: none; }
  .footer-links strong { margin: 0; font-size: 14px; line-height: 21px; }
  .footer-links a { color: #696969; }
  .footer-bottom {
    display: block;
    margin-top: 90px;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
    line-height: 20px;
  }
  .footer-bottom span + span { display: none; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 34px; }
  .hero-worker { left: calc(50% - 246px); width: 492px; top: 204px; }
  .calculator-panel { padding-inline: 12px; }
  .period-tab { font-size: 9px; }
  .comparison { padding-inline: 16px; }
}
