/* onda · website layout. Loaded only at >= 1024px (media on the <link>), after styles.css, so phones never download or parse it.
   Same two families and the same type tokens as the app (General Sans body, Clash display): only the sizes of the display tokens
   step up, and the layout becomes a split page with a content column instead of a phone frame. */
@media (min-width: 1024px) {
  :root {
    --dx: clamp(48px, 6vw, 112px);                         /* page side margin */
    --wrap: min(1240px, calc(100vw - 2 * var(--dx)));      /* content width */
    --px: max(var(--dx), calc((100% - 1240px) / 2));       /* side padding that lines up with --wrap, for full-width bars */
    --gap-col: 64px;
    --gut: 32px;
    --pad: 24px;
    --r: 24px;
    --fs-h1-d: clamp(48px, min(4.1vw, 8.6vh), 72px);
    --fs-h2-d: clamp(40px, min(3.5vw, 7vh), 56px);
    --fs-lede: 20px;
    --wash-d:
      radial-gradient(60% 80% at 100% 0%, rgba(14, 143, 110, .26) 0%, rgba(62, 211, 164, .20) 38%, rgba(232, 255, 241, 0) 100%),
      radial-gradient(50% 60% at 0% 100%, rgba(184, 242, 214, .55) 0%, rgba(232, 255, 241, 0) 100%);
  }

  /* the app is the page: no phone frame */
  body { display: block; }
  #app { max-width: none; width: 100%; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
  .screen, #s-overview, #s-pass, .screen.ob, #s-done { background: var(--wash-d), var(--bg); }
  .screen:not(.screen-ov) .lockup { height: 28px; }
  .btn { transition: transform .15s var(--ease), opacity .2s, background .2s, box-shadow .2s; }
  .btn.primary:hover:not(:disabled) { background: #4ADBAE; box-shadow: 0 10px 24px -12px rgba(14, 143, 110, .6); }
  .btn.soft:hover { background: #A2E9C7; }
  .ptile:hover, .atile:hover, .chipb:hover:not(:disabled), .row:hover { transform: translateY(-1px); }
  .sub { font-size: 18px; max-width: 34ch; }

  /* ------------------------------------------------------------ opener: headline + points left, campaigns stage right */
  .screen-ov .ov {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); column-gap: clamp(48px, 5vw, 104px);
    grid-template-areas: "head vis" "feats vis" "foot vis"; grid-template-rows: auto auto auto;
    align-content: center; align-items: start; overflow-y: auto; padding: 88px var(--px) 48px;
  }
  .ov-top { position: absolute; top: 0; left: 0; right: 0; height: 88px; padding: 0 var(--px); }
  .ov-top .lockup { height: 30px; }
  .ov-head { grid-area: head; padding: 0; }
  .ov-h1 { font-size: var(--fs-h1-d); line-height: 1.02; letter-spacing: var(--ls-display); max-width: 15ch; }
  .ov-lede { margin-top: 22px; max-width: 36ch; font-size: var(--fs-lede); line-height: 1.45; }
  .ov-feats { grid-area: feats; margin: clamp(24px, 4.2vh, 40px) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: none; box-shadow: none; }
  .ov-feats li { align-items: flex-start; gap: 14px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .78); box-shadow: var(--shadow); }
  .ov-feats li + li { border-top: 0; }
  .ov-ico { width: 40px; height: 40px; }
  .ov-feats b { font-size: var(--fs-ui); line-height: 1.25; }
  .ov-feats small { display: block; margin-top: 3px; font-size: var(--fs-small); line-height: 1.35; }
  .ov-foot { grid-area: foot; padding: clamp(24px, 4.2vh, 40px) 0 0; }
  .ov-foot .btn { display: inline-flex; width: auto; min-width: 280px; padding: 0 44px; height: 60px; font-size: 17px; }
  .ov-vis {
    grid-area: vis; align-self: stretch; min-height: 420px; max-height: 640px; margin: 0; padding: 0; border-radius: 40px; overflow: hidden; position: relative; isolation: isolate;
    background-color: #0C3426;
    background-image:
      radial-gradient(90% 70% at 90% -10%, rgba(62, 211, 164, .50), rgba(62, 211, 164, 0) 60%),
      radial-gradient(80% 60% at -6% 108%, rgba(14, 143, 110, .55), rgba(14, 143, 110, 0) 62%),
      linear-gradient(162deg, #11443A 0%, #0A2D22 52%, #061B14 100%);
    box-shadow: inset 0 0 0 1px rgba(184, 242, 214, .10), inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 70px -40px rgba(6, 27, 20, .6);
  }
  .ov-vis::before { content: ""; position: absolute; z-index: -1; width: 120%; aspect-ratio: 1; left: -10%; bottom: -70%; border-radius: 50%; border: 1.5px solid rgba(184, 242, 214, .10); box-shadow: 0 0 0 70px rgba(184, 242, 214, .025), 0 0 0 140px rgba(184, 242, 214, .02); }
  .ov-cards { width: 318px; height: 144px; transform: none; zoom: 1.25; }
  @container (min-height: 196px) { .ov-cards { transform: none; } }
  @container (max-height: 150px) { .ov-cards { display: block; } }
  .mc { box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 24px 44px -20px rgba(0, 0, 0, .6); }
  @media (min-width: 1400px) { .ov-cards { zoom: 1.45; } }
  @media (max-height: 780px) { .ov-feats small { display: none; } .ov-feats li { align-items: center; } }
  @media (max-height: 640px) { .ov-lede { display: none; } .screen-ov .ov { padding-top: 76px; } }

  /* ------------------------------------------------------------ onboarding + email: question left, answers right */
  .screen.ob { justify-content: center; padding-bottom: 24px; }
  .ob .bar.ob-bar { position: absolute; top: 0; left: 0; right: 0; height: 88px; padding: 0 var(--px); gap: 14px; justify-content: flex-start; z-index: 2; }
  .ob-bar::before { content: ""; flex: 1 1 auto; order: -1; height: 28px; min-width: 104px; max-width: 104px; margin-right: auto; background: url("/brand/onda-lockup-light-tight.svg") left center / contain no-repeat; }
  .ob-bar .circ { width: 44px; height: 44px; }
  .ob-bar .seg { flex: 0 0 min(360px, 34vw); margin-right: 0; }
  .ob .confirm { left: var(--px); top: 96px; }
  .earn .ob-bar::before { max-width: 104px; }

  .screen.ob .body {
    flex: 0 1 auto; width: calc(var(--wrap) + 48px); max-width: 100%; margin: 0 auto; padding: 24px;
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr auto; column-gap: var(--gap-col); align-items: start; align-content: start;
  }
  .ob .h-ob { grid-column: 1; grid-row: 1; margin-top: 0; font-size: var(--fs-h2-d); max-width: 9em; line-height: 1.02; }
  .ob .body > .sub { grid-column: 1; grid-row: 2; margin-top: 18px; }
  .ob .ptiles, .ob .hlist, .ob .chips, .ob .atiles, .ob .rtiles, .ob .field { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
  .ob .body > .msg { grid-column: 2; grid-row: 3; }
  .ob .ptiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .ob .ptile { height: 72px; }
  .ob .atiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .ob .atile { min-height: 124px; }
  .ob .rtiles { gap: 12px; max-width: 560px; }
  .ob .rtile { min-height: 92px; padding: 16px 20px; }
  .ob .chips { gap: 12px; }
  .ob .chipb { height: 52px; padding: 0 20px 0 16px; border-radius: 26px; font-size: var(--fs-ui); }
  .ob .hlist { gap: 12px; max-width: 560px; }
  .ob .field { max-width: 560px; padding: 18px 24px 16px; }
  .ob .field input { height: 40px; font-size: 18px; }
  .screen.ob .foot {
    width: calc(var(--wrap) + 48px); max-width: 100%; margin: 0 auto; padding: 8px 24px 0; background: none;
    padding-left: calc((var(--wrap) - var(--gap-col)) * 5 / 12 + var(--gap-col) + 24px);
  }
  .ob .foot .btn { width: min(100%, 360px); justify-self: start; height: 60px; }
  .ob .foot-note { text-align: left; }

  /* profile ready */
  .done-wave { width: 180px; height: 180px; }
  .done-swell { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .done-h { font-size: var(--fs-h1-d); }
  .done-sum { font-size: 18px; }

  /* ------------------------------------------------------------ earnings: one wide headline, hero number left, the sources right */
  #s-earn { --fs-display: clamp(88px, min(8.4vw, 17vh), 148px); }
  #s-earn .earn-body {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 32px; row-gap: 16px;
    align-items: start; align-content: start; padding: 24px;
  }
  #s-earn .earn-h { grid-column: 1 / -1; margin: 0 0 8px; max-width: none; font-size: var(--fs-h2-d); line-height: 1.04; white-space: normal; }
  #s-earn .earn-hero { grid-column: 1; grid-row: 2 / 4; max-height: none; min-height: 400px; height: 100%; padding: 36px 36px 30px; border-radius: 36px; gap: 20px; }
  #s-earn .earn-fig > span { font-size: var(--fs-display); line-height: 1; }
  #s-earn .earn-per { margin-top: 12px; font-size: 20px; line-height: 28px; }
  #s-earn .earn-note { font-size: var(--fs-small); line-height: 20px; }
  #s-earn .earn-bar { height: 10px; }
  #s-earn .earn-card { grid-column: 2; grid-row: 2; padding: 8px 28px; border-radius: 28px; }
  #s-earn .earn-row { padding: 14px 0; }
  #s-earn .earn-sec { font-size: var(--fs-small); line-height: 20px; padding: 14px 0 2px; }
  #s-earn .earn-row + .earn-sec { padding-top: 16px; margin-top: 6px; }
  #s-earn .earn-row .k { font-size: var(--fs-ui); line-height: 22px; }
  #s-earn .earn-row .u { font-size: var(--fs-small); line-height: 19px; }
  #s-earn .earn-row .r { font-size: 28px; line-height: 32px; }
  #s-earn .earn-coin { grid-column: 2; grid-row: 3; align-self: end; padding: 4px 8px; display: flex; gap: 14px; font-size: var(--fs-small); line-height: 20px; }
  #s-earn .earn-coin b { width: 36px; height: 36px; font-size: var(--fs-small); }
  #s-earn .earn-tag { display: block; }
  #s-earn .foot { padding-left: calc((var(--wrap) - 32px) * 1.12 / 2.12 + 32px + 24px); }
  #s-earn .foot .btn { width: 100%; }
  @media (max-height: 760px) {
    #s-earn .earn-hero { min-height: 340px; padding: 28px; }
    #s-earn .earn-row { padding: 12px 0; }
  }

  /* ------------------------------------------------------------ pass: the ticket left, your link and sharing right */
  #s-pass { justify-content: center; padding-bottom: 24px; }
  #s-pass .bar { position: absolute; top: 0; left: 0; right: 0; height: 88px; padding: 0 var(--px); }
  #s-pass .bar-meta { font-size: var(--fs-body); }
  #s-pass .body-pass {
    flex: 0 1 auto; width: calc(var(--wrap) + 48px); max-width: 100%; margin: 0 auto; padding: 24px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 40px; row-gap: var(--gap); align-items: stretch;
  }
  .pass-top { padding: 32px 32px 30px; }
  .pass-num { margin-top: 28px; font-size: clamp(96px, min(9vw, 18vh), 156px); }
  .pass-who { font-size: var(--fs-body); }
  .pass-bottom { padding: 24px 32px 28px; gap: 24px; }
  .stat-n { font-size: 36px; }
  .pass-line { font-size: var(--fs-body); }
  .link-card { padding: 32px; }
  .link-card .pass-row .lbl { font-size: var(--fs-small); }
  .link-note { font-size: var(--fs-body); margin-top: 14px; }
  .linkbox { height: 60px; margin-top: 18px; padding: 0 10px 0 20px; }
  .link-text { font-size: var(--fs-ui); }
  .link-actions .btn.mini, .btn.mini { height: 44px; }
  #s-pass .foot { width: calc(var(--wrap) + 48px); max-width: 100%; margin: 0 auto; padding: 8px 24px 0; background: none; padding-left: calc((var(--wrap) - 40px) * 1.05 / 2 + 40px + 24px); }
  #s-pass .foot .btn { width: 100%; height: 60px; }
  #s-pass .body-pass .link-card { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; }
  #s-pass .body-pass .pass { grid-column: 1; grid-row: 1; align-self: start; }

  /* ------------------------------------------------------------ sheets become centred dialogs */
  .sheet-wrap { align-items: center; justify-content: center; }
  .sheet { width: min(560px, calc(100% - 48px)); margin: 0; padding: 24px 28px 20px; border-radius: 32px; transform: translateY(18px) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .25s; }
  .sheet-wrap.is-open .sheet { transform: none; opacity: 1; }
  .share-sheet { width: min(600px, calc(100% - 48px)); max-height: calc(100% - 64px); }
  .plats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; padding: 6px; }
  .plats li + li { border-top: 0; }
  .plats li { border-radius: 16px; }
  .plat:hover { background: var(--mint-1); }
  .share-sheet .go-steps { margin-top: 14px; }
  .go-media[data-fmt="story"] .go-frame { height: min(320px, 34vh); }
  .go-media[data-fmt="feed"] .go-frame { height: min(300px, 32vh); }
  .go-media[data-fmt="og"] .go-frame { width: 88%; }
  .toast { bottom: 48px; }
  .h-sheet { font-size: var(--fs-h2); }

  /* ------------------------------------------------------------ 404 */
  .nf-top { height: 88px; padding: 0 var(--px); }
  .nf-main { max-width: none; width: var(--wrap); padding: 0 0 14vh; }
  .nf-h { font-size: var(--fs-h1-d); max-width: 11em; margin-top: 16px; }
  .nf-btn { height: 60px; padding: 0 44px; margin-top: 36px; }
  .nf-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); column-gap: var(--gap-col); align-items: center; }
  .nf-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .nf-vis { display: flex; align-items: center; justify-content: center; min-height: 420px; max-height: 60vh; border-radius: 40px; color: #F2FFF8; position: relative; overflow: hidden; background-color: #0C3426;
    background-image: radial-gradient(90% 70% at 90% -10%, rgba(62, 211, 164, .50), rgba(62, 211, 164, 0) 60%), radial-gradient(80% 60% at -6% 108%, rgba(14, 143, 110, .55), rgba(14, 143, 110, 0) 62%), linear-gradient(162deg, #11443A 0%, #0A2D22 52%, #061B14 100%);
    box-shadow: inset 0 0 0 1px rgba(184, 242, 214, .10), 0 40px 70px -40px rgba(6, 27, 20, .6); }
  .nf-vis span { font-size: clamp(120px, 15vw, 260px); line-height: 1; letter-spacing: var(--ls-display-xl); text-shadow: 0 2px 40px rgba(62, 211, 164, .3); }
}

/* wide monitors: a little more room, same grid */
@media (min-width: 1700px) {
  :root {
    --gap-col: 88px;
    --wrap: min(1400px, calc(100vw - 2 * var(--dx)));
    --px: max(var(--dx), calc((100% - 1400px) / 2));
    --fs-h1-d: clamp(60px, 4vw, 84px);
    --fs-h2-d: clamp(48px, 3.2vw, 64px);
  }
  #s-earn { --fs-display: clamp(120px, 8.4vw, 172px); }
  .ov-cards { zoom: 1.7; }
  .sub { font-size: 20px; }
  .ob .ptile { height: 76px; }
}

/* 3 Dec: brand leads form on desktop, one centred column that scrolls */
@media (min-width: 1024px) {
  #s-brand.screen.ob { justify-content: flex-start; padding-top: 88px; }
  #s-brand.screen.ob .body { display: block; width: min(600px, calc(100% - 48px)); margin: 0 auto; padding: 8px 24px 24px; }
  #s-brand .h-ob { max-width: none; font-size: var(--fs-h2-d); }
  #s-brand .body > .sub { margin-top: 12px; }
  #s-brand .bfields { margin-top: 24px; }
  #s-brand.screen.ob .foot { width: min(600px, calc(100% - 48px)); padding: 8px 24px 0; }
  #s-brand .foot .btn { width: 100%; max-width: none; height: 60px; }
}
