/* Reading view for the presentation apps on phones and small tablets.
   present.js sets body.mobile below 900 px width or 500 px height: the slides stand
   in one column 640 to 900 px wide, zoomed to the screen width, fully built; each slide
   fades in as it scrolls into view. Tabs stay tappable. */

#mhead { display: none; }
html:has(body.mobile) { height: auto; overflow: auto; }
body.mobile { height: auto; overflow: visible; background: #fff; }
.mobile #viewport { position: static; display: block; }
.mobile #stage { position: static; height: auto; transform: none !important; }
.mobile :is(#bar, #tip, #chapflash, #intro, #laser, .trail, #blackout, #overview, #help, #toast) { display: none !important; }

/* bar on top: Holding wordmark, deck name, PDF */
.mobile #mhead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: rgb(255 255 255 / 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
#mhead img { height: 26px; width: auto; flex: none; }
#mhead span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; color: var(--grey); }
#mhead a { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }

/* every slide: a section in the column, content flowing top to bottom */
.mobile .slide { position: relative; inset: auto; width: 100%; height: auto; display: flex; flex-direction: column; overflow: hidden; visibility: visible; opacity: 0; transform: translateY(24px); animation: none !important; transition: opacity 700ms var(--ease), transform 900ms var(--ease); }
.mobile .slide.is-active { opacity: 1; transform: none; }
.mobile .slide [data-step] { opacity: 1; transform: none; }
.mobile .pad { position: static; inset: auto !important; left: auto !important; right: auto !important; order: 1; display: block; padding: 64px 44px 56px; }
.mobile .foot { position: static; order: 9; height: 76px; padding: 0 44px; grid-template-columns: 1fr auto auto; gap: 18px; font-size: 17px; }
.mobile .foot .logo { height: 34px; }
.mobile .foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 17px !important; }
.mobile .foot .ch { margin-left: 14px; font-size: 17px; }
.mobile .dark .foot { border-top: 1px solid rgb(255 255 255 / 0.2); }

/* pictures: full width on top, team photographs in their rounded frame */
.mobile .photo { position: relative; inset: auto !important; width: auto !important; height: 400px !important; order: 0; flex: none; margin: 0; border-radius: 0; }
.mobile .photo.round { margin: 48px 44px 0; height: 380px !important; border-radius: 32px; }
.mobile :is(.s-title, .s-end) .photo.round { order: 2; margin: 0 44px 56px; }

/* type */
.mobile .h1, .mobile .s-title .h1 { font-size: 92px !important; }
.mobile .h2, .mobile .slide .h2 { font-size: 48px !important; line-height: 1.08; }
.mobile .sub { font-size: 27px !important; max-width: none; }
.mobile .eyebrow { font-size: 19px; white-space: normal; }
.mobile .eyebrow + :is(.h1, .h2, blockquote) { margin-top: 24px; }
.mobile :is(.h1, .h2) + .sub { margin-top: 24px; }

/* title and closing */
.mobile .s-title .mark { position: static; order: 0; width: 38px; margin: 56px 44px 0; }
.mobile .s-title .pad { padding-top: 32px; }
.mobile .s-end .pad { padding-top: 56px; }
.mobile .s-end blockquote { font-size: 46px; }
.mobile .s-end blockquote b { font-size: 32px; }

/* elements that sat freely on the stage now follow the text */
.mobile :is(.question, .lead-quote, .verdict, .matrix, .journey-k, .journey, .hub) { position: relative; inset: auto; width: auto; order: 2; }
.mobile .question { margin: 0 44px 56px; }
.mobile .lead-quote { margin: 0 44px 56px; font-size: 34px; }
.mobile .verdict { display: none; margin: 0 44px 48px; flex-wrap: wrap; font-size: 24px; }
.mobile .verdict.on { display: flex; }
.mobile .p-check .verdict { margin: 24px 0 0; }
.mobile .matrix { height: 560px; margin: 24px 44px 64px; width: auto; right: auto; top: auto; }
.mobile .journey-k { margin: 0 44px 20px; }
.mobile .journey { margin: 0 44px 56px; grid-template-columns: 1fr 1fr; gap: 36px 32px; }
.mobile .journey::before { display: none; }
.mobile .journey li { padding-top: 84px; }
.mobile .journey .dot { background: var(--red); color: #fff; }
.mobile .hub { zoom: 0.69; width: 800px; height: 800px; right: auto; top: auto; margin: 0 auto 56px; }

/* grids: two columns where cards stay short, one where text runs long */
.mobile :is(.agenda, .checks, .tools, .cases, .tiles4, .forms, .model, .flow, .journey, .topic-grid, .mods, .canvas9) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mobile :is(.lessons, .why3, .compare, .road, .roles-wrap, .task, .modules, .packs, .goals, .weeks) { grid-template-columns: 1fr; }
.mobile .agenda { margin-top: 48px; }
.mobile .agenda button { min-height: 300px; }
.mobile .patterns li { font-size: 26px; }
.mobile .check { min-height: 0; padding: 32px 30px; }
.mobile .check h3 { font-size: 34px; hyphens: auto; overflow-wrap: anywhere; }
.mobile .check p { font-size: 24px; margin-top: 12px; }
.mobile .tools { gap: 20px; }
.mobile .tool h3 { font-size: 30px; }
.mobile .flow { gap: 10px; }
.mobile .flow li { clip-path: none !important; margin: 0; border-radius: 20px; padding: 20px 24px; }
.mobile .flow .v { padding-left: 0; font-size: 28px; }
.mobile .case { min-height: 220px; }
.mobile .case h3 { font-size: 34px; }
.mobile .s-case .h2 { margin-top: 16px; }
.mobile .compare { gap: 0; }
.mobile .compare .arrow { height: 90px; transform: rotate(90deg); }
.mobile .seg-tabs { display: flex; flex-wrap: wrap; border-radius: 28px; }
.mobile .seg-tabs button { font-size: 20px !important; padding: 12px 20px !important; }
.mobile .tiles4 li { min-height: 0; }
.mobile .road3 > li { min-height: 0; }
.mobile .s-pack .verdict { margin: 0 44px 48px; }

/* AI Ninjas programme */
.mobile .lessons > li { min-height: 200px; grid-template-columns: 170px 1fr; }
.mobile .agenda-cards > li { min-height: 220px; }
.mobile .agenda-cards button { min-height: 200px; grid-template-columns: 170px 1fr; }
.mobile .model button { min-height: 220px; }
.mobile .model li::after { display: none; }
.mobile .model { gap: 36px 20px; }
.mobile .goals li { font-size: 26px; }
.mobile .mods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mobile .mods button { grid-template-columns: 36px 1fr; padding: 16px 18px; }
.mobile .mods button[aria-selected="true"] { transform: none; }
.mobile .mods .area { display: none; }
.mobile .mods .nm { font-size: 22px; }
.mobile .s-modules .panel { min-height: 0; padding: 36px 40px; }
.mobile .s-modules .panel .ico { width: 56px; height: 56px; right: 36px; top: 34px; }
.mobile .s-modules .panel h3 { font-size: 38px; max-width: 540px; }
.mobile .forms li { min-height: 0; }
.mobile .result p:last-child { font-size: 30px; }
.mobile .why3 .card { min-height: 0; }
.mobile .track b { font-size: 19px; }
.mobile .stage5 .panel.on { grid-template-columns: 1fr; height: auto; gap: 28px; }
.mobile .stage5 .pic { height: 320px; }
.mobile .p-check .checks { grid-template-columns: 1fr 1fr; }
.mobile .p-check .check { min-height: 220px; }
.mobile .weeks { gap: 44px; }
.mobile .role-row > span { font-size: 22px; padding: 14px 18px; }
.mobile .role-head, .mobile .role-row { grid-template-columns: 1fr 48px 1fr; }
.mobile .factor p:not(.k) { font-size: 30px; }
.mobile .uc-head .bignum { font-size: 120px; }
.mobile .uc-head .h2 { font-size: 42px !important; }
.mobile .uc-head { gap: 24px; }
.mobile .uc-compare { grid-template-columns: 1fr; }
.mobile .uc-compare .arrow { height: 64px; transform: rotate(90deg); }
.mobile .s-connect .pad { padding-bottom: 24px; }

/* narrow column: text a little larger, so it reads at phone size */
.mobile :is(.patterns li, .goals li, .x-list li, .flow-list li, .steps li, .num-list li, .rules li, .ticks li, .weeks ul li, .s-modules .panel li, .compare li, .ideas li) { font-size: 27px; }
.mobile :is(.lessons p, .agenda-cards p, .forms p, .tool p, .s-toolset .tool li, .road p, .journey p) { font-size: 24px; }
.mobile .foot { font-size: 18px; }

/* details */
.mobile .slide :is(p, li) { overflow-wrap: break-word; }
.mobile :is(.tools, .weeks, .checks, .cases, .forms, .agenda, .tiles4, .role-row) :is(p, li, span) { hyphens: auto; }
.mobile .slide :is(h1, h2, h3) { hyphens: manual; }
.mobile .weeks h3 { font-size: 30px; }
.mobile .uc-head { grid-template-columns: 1fr; gap: 12px; }
.mobile .uc-head .bignum { font-size: 96px; line-height: 0.9; }
.mobile .check h3 { font-size: 30px !important; hyphens: manual !important; overflow-wrap: normal !important; }
.mobile .s-case .kicker { flex-wrap: wrap; gap: 10px 16px; }
.mobile .matrix .pt.hit span { left: auto; right: 44px; font-size: 22px; }
.mobile .slide { scroll-margin-top: 96px; }
