/* iPad (regular width, 744px and wider). Phones (<744px) never load these rules.
   One layout for every iPad size and both orientations: it reflows by available width.
   Text keeps its reading size; extra width becomes more columns, not bigger type.
   Navigation is a floating tab bar at the top (iPadOS style). No phone column, no column edges. */
@media (min-width:744px){
  html[data-design=nebula]{--col:1240px;--pad:clamp(32px,4.4vw,64px)}

  /* Shell: the 720px+ framed phone column (border + darker panel) is removed; the ground stays full-bleed. */
  /* The shell spans the screen; each page centres its own column, so bars and backgrounds can run edge to edge. */
  html[data-design=nebula] .app{max-width:none;border-inline:0;background:none;box-shadow:none}
  html[data-design=nebula] .view{padding-inline:var(--pad);max-width:var(--col);margin-inline:auto}
  html[data-design=nebula] .topbar{margin-inline:calc(var(--pad)*-1);padding-inline:var(--pad);border-bottom:0;background:transparent}
  html.is-scrolled[data-design=nebula] .topbar{background:transparent;border-image:linear-gradient(180deg,#0b1225 0,#0b1225 calc(100% - 22px),#0b122500 100%) fill 0//0 100vmax}

  /* Floating top tab bar, centred on the same row as the page toolbar (b² left, settings right). */
  html[data-design=nebula] .tabs{top:calc(var(--safe-t) + 25px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);
    padding:5px;border:1px solid #9fb7d82e;border-radius:999px;background:#121d35d9;
    backdrop-filter:blur(20px) saturate(1.2);-webkit-backdrop-filter:blur(20px) saturate(1.2);box-shadow:0 12px 32px #0007}
  html[data-design=nebula] .tabs>.in{display:flex;gap:2px;max-width:none;height:auto}
  html[data-design=nebula] .tabs a{flex-direction:row;gap:7px;min-height:44px;padding:0 17px;border-radius:999px;color:#a9bad2}
  html[data-design=nebula] .tabs a span{font-size:14px;letter-spacing:.02em}
  html[data-design=nebula] .tabs a[aria-current=page]{background:#e3f1ff1f;color:#c4f7f1}
  html[data-design=nebula] .tabs a[aria-current=page] svg{transform:none}
  html[data-design=nebula] .tabs a:before{display:none}
  html[data-design=nebula] .view{padding-bottom:calc(56px + var(--safe-b))}
  html[data-design=nebula] .view.runner{padding-bottom:calc(116px + var(--safe-b))}

  /* Page toolbar row: mark only (the tagline lives on the welcome screen), settings at the right. */
  html[data-design=nebula] .view.n-page{padding-top:calc(var(--safe-t) + 26px)}
  html[data-design=nebula] .n-brand{min-height:54px;margin-bottom:44px;align-items:center}
  html[data-design=nebula] .n-brand .n-settings-link{margin:0;top:auto;align-self:center;transform:none}
  html[data-design=nebula] .n-brand .n-wordmark small{display:none}
  html[data-design=nebula] .n-page h1{font-size:clamp(38px,3.7vw,50px);letter-spacing:-1.4px;line-height:1.08}

  /* Task pages, settings and sheets keep a readable measure, centred. */
  html[data-design=nebula] .view.runner>:not(.topbar){max-width:820px;margin-inline:auto}
  html[data-design=nebula] .view.n-settings>:not(.topbar){max-width:720px;margin-inline:auto}
  html[data-design=nebula] .actionbar>.in{max-width:720px}
  /* A page transition can contain the fixed bar inside the page column; its fade must still run edge to edge. */
  html[data-design=nebula] .actionbar{background:none;border-image:linear-gradient(#0b132500,#0b1325ec 25%) fill 0//0 100vmax}
  html[data-design=nebula] dialog.sheet{max-width:min(560px,calc(100% - 64px));margin:auto;border-radius:26px}

  /* Home: hero on its own row, then two columns. */
  html[data-design=nebula] .n-home{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px;align-content:start;
    grid-template-areas:"brand brand" "kicker kicker" "title title" "ready ready" "date date" "base base" "nlabel nlabel" "next stats" "foot foot"}
  html[data-design=nebula] .n-home>.n-brand{grid-area:brand}
  html[data-design=nebula] .n-home>.n-kicker{grid-area:kicker}
  html[data-design=nebula] .n-home>h1{grid-area:title;margin-bottom:22px}
  html[data-design=nebula] .n-home>.n-readiness{grid-area:ready;margin-top:0;min-height:250px;padding:28px 30px}
  html[data-design=nebula] .n-home>.n-date{grid-area:date;padding-block:18px}
  html[data-design=nebula] .n-home>.n-baseline{grid-area:base;gap:12px}
  html[data-design=nebula] .n-home>.n-baseline a{padding:14px 16px;border:1px solid #7691ad37;border-radius:14px;background:#122239b0}
  html[data-design=nebula] .n-home>.n-section-label{grid-area:nlabel}
  html[data-design=nebula] .n-home>.n-link{grid-area:next;align-self:stretch;margin:0}
  html[data-design=nebula] .n-home>.n-stat-grid{grid-area:stats;margin:0}
  html[data-design=nebula] .n-home>.n-footnote{grid-area:foot;margin-top:22px}
  html[data-design=nebula] .n-home .n-readiness-copy p{max-width:none}
  /* The phone card's light sweep is sized for a 390px card; on a wide card it reads as a stripe. */
  html[data-design=nebula] .n-home .n-readiness-light,html[data-design=nebula] .n-home .n-readiness::after{display:none}

  /* Practice: skills and toolkit become grids. */
  html[data-design=nebula] .n-practice>.n-segment{max-width:440px}
  html[data-design=nebula] .n-skills-grid{gap:14px}
  html[data-design=nebula] .n-skills-grid a{padding:22px 20px}
  html[data-design=nebula] .n-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
  html[data-design=nebula] .n-tools>.n-section-title{grid-column:1/-1;margin-bottom:0}
  html[data-design=nebula] .n-tools .n-link+.n-link{margin-top:0}

  /* Sign-in screens paint no panel of their own: the full-screen ground and sky carry the backdrop, so no edges show. */
  html[data-design=nebula] .view.n-auth{background:none}

  /* Welcome: full-screen sky; a centred composition that fills the height. */
  html[data-design=nebula] .e-welcome .e-sky{position:fixed;inset:0;height:auto}
  html[data-design=nebula] .e-welcome .n-auth-aura{width:60%;left:20%;top:10%}
  html[data-design=nebula] .n-welcome{min-height:100dvh;justify-content:center;align-items:center;text-align:center;padding-block:48px}
  html[data-design=nebula] .n-welcome>*{width:100%;max-width:600px}
  html[data-design=nebula] .e-welcome .e-hero{flex:0 0 auto;min-height:360px;max-height:none;margin:0}
  html[data-design=nebula] .e-mark{width:196px;height:181px}
  html[data-design=nebula] .e-orbits{width:340px;height:340px}
  html[data-design=nebula] .n-welcome .n-auth-intro h1{font-size:clamp(46px,5vw,60px)}
  html[data-design=nebula] .n-welcome .n-auth-lead{font-size:17px}
  html[data-design=nebula] .n-welcome-benefits{margin:30px 0 36px}
  html[data-design=nebula] .n-welcome .n-auth-bottom{max-width:440px;margin-top:0}

  /* Sign-in: same centred column as welcome. */
  html[data-design=nebula] .e-login .e-sky,html[data-design=nebula] .n-login .e-sky{position:fixed;inset:0;height:auto}
  html[data-design=nebula] .view.n-auth:not(.n-welcome)>:not(.e-sky):not(.n-auth-aura){width:100%;max-width:480px;margin-inline:auto}

  /* Redeem page: one card, centred. */
  html[data-design=nebula] .view.runner.n-review-code>.panel{max-width:520px;margin:12vh auto 0}

  /* Pricing is a flex column: children must fill the readable column, and the bottom bar's fade runs edge to edge. */
  html[data-design=nebula] .view.runner.n-pricing{padding-bottom:0}
  html[data-design=nebula] .view.runner.n-pricing>:not(.topbar){width:100%}
  html[data-design=nebula] .n-pricing .pr-bar{margin:auto auto 0;padding-inline:0;background:none;
    border-image:linear-gradient(to top,var(--page) 72%,#0b132500) fill 0//0 100vmax}
  html[data-design=nebula] .n-pricing .pr-bar>*{max-width:480px;margin-inline:auto}
}

/* Wide iPad (landscape on 11" and 13"): skills in one row; home puts progress beside the next step. */
@media (min-width:1100px){
  html[data-design=nebula] .n-skills-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  html[data-design=nebula] .n-home{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);column-gap:28px;
    grid-template-areas:"brand brand" "kicker kicker" "title title" "ready nlabel" "ready next" "ready stats" "date date" "base base" "foot foot"}
  html[data-design=nebula] .n-home>.n-section-label{margin-top:0}
  html[data-design=nebula] .n-home>.n-link{margin:0}
  html[data-design=nebula] .n-home>.n-stat-grid{margin-top:12px}
  html[data-design=nebula] .n-home>.n-date{margin-top:14px}

  /* Welcome in landscape: mark left, words and action right. */
  html[data-design=nebula] .n-welcome{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);column-gap:72px;
    align-content:center;text-align:left;max-width:1120px;margin-inline:auto}
  html[data-design=nebula] .n-welcome>*{max-width:none}
  html[data-design=nebula] .n-welcome>.e-sky{grid-area:auto}
  html[data-design=nebula] .n-welcome>.e-hero{grid-column:1;grid-row:1/4}
  html[data-design=nebula] .n-welcome>.n-auth-intro{grid-column:2;grid-row:1}
  html[data-design=nebula] .n-welcome>.n-welcome-benefits{grid-column:2;grid-row:2;margin:28px 0 34px}
  html[data-design=nebula] .n-welcome>.n-auth-bottom{grid-column:2;grid-row:3;max-width:none}
}
