/* Personal card; mobile home uses height-aware density. Quiz styles unchanged. */
.app-shell{--header:60px;--nav:74px}.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr));max-width:460px}.bottom-nav :is(button,a){font-size:12px;min-width:0}.identity .header-monogram{display:none}.app-shell[data-home=true] .identity img{display:none}.app-shell[data-home=true] .header-monogram{display:grid;place-items:center;flex:0 0 36px;height:36px;border:1px solid #fff4c84d;border-radius:12px;color:#ffe2a7;font-size:13px;font-weight:600;background:#113c392e}.app-shell[data-home=true] .identity strong{font-size:14px;font-weight:500;letter-spacing:0}.app-shell[data-home=true] .identity small{display:none}.app-shell[data-home=true] .identity{gap:10px}
.screen[data-kind=home]{overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#c4dfcf55 transparent;-webkit-overflow-scrolling:touch;display:block;padding:8px 0 20px;scroll-padding-bottom:15px}.home-board{display:flex;flex-direction:column;gap:18px;width:100%;min-width:0}.personal-intro{padding:6px 2px 2px}.profile-top{display:flex;align-items:center;gap:18px;min-width:0}.profile-photo{display:block;flex:0 0 clamp(116px,34vw,154px);width:clamp(116px,34vw,154px);aspect-ratio:1;border-radius:24px;border:1px solid #ffedbda6;padding:4px;background:linear-gradient(135deg,#fff3d130,#d8ffee10);box-shadow:0 6px 24px #103b3920;overflow:hidden;animation:none!important;transform:none!important}.profile-photo img{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:contain;object-position:center;border-radius:19px;animation:none!important;transform:none!important;transition:none!important}.profile-copy{min-width:0;position:relative;padding:8px 0;text-shadow:0 1px 12px #052e3450}.profile-copy:before{content:'';position:absolute;z-index:-1;inset:-12px -8px;background:radial-gradient(ellipse at 30% 50%,#153c3c4d,transparent 75%);pointer-events:none}.profile-label{font-size:12px;line-height:1.4;color:#fff0c6;margin-bottom:9px}.profile-copy h1{font-size:clamp(26px,7.6vw,35px);line-height:1.02;letter-spacing:-.9px;font-weight:600;text-transform:uppercase;max-width:9ch;margin:0 0 11px;color:#fff9ec}.profile-description{font-size:13px;line-height:1.45;color:#fcf4e2;max-width:23ch}.social-links{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:17px}.social-button{display:grid;place-items:center;width:48px;height:48px;min-width:48px;border-radius:50%;border:1px solid #ffffed54;background:linear-gradient(140deg,#f5ffe930,#ffffff0b),#0b423d2d;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:inset 0 1px #ffffee24}.social-mark{width:26px;height:26px;stroke:none!important;fill:none}.social-button:active{transform:scale(.96);background-color:#ffffff28}
.connect-grid,.support-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.connect-card{padding:17px 18px;border-radius:23px;min-height:113px;display:flex;flex-direction:column;gap:8px}.connect-symbol{display:flex;justify-content:space-between;align-items:center}.connect-symbol .arrow{width:18px;height:18px;opacity:.8}.connect-card h2{font-size:21px;line-height:1.2;font-weight:500;letter-spacing:-.45px;color:var(--ink)}.link-description{font-size:12px;line-height:1.35;color:#eff6ed}.section-label{font-size:13px;font-weight:500;line-height:1.4;letter-spacing:.3px;margin:0 0 9px;color:#fff6df;text-shadow:0 1px 8px #06352c88}.support-card{display:flex;align-items:center;gap:10px;min-height:86px;padding:13px 12px;border-radius:21px;background:linear-gradient(135deg,#ffe8b51a,#ffffff0b),#124a403a;border-color:#ffedb944}.support-symbol{display:grid;place-items:center;flex:0 0 27px;height:31px;color:#ffe5b3}.support-symbol .icon{width:23px;height:23px}.revolut-mark{font-size:25px;font-weight:700;color:#fff}.support-card strong{display:block;font-size:14px;line-height:1.25;font-weight:600;letter-spacing:-.15px}.support-card small{display:block;font-size:12px;line-height:1.35;color:#edeadd;margin-top:5px}.secondary-home{display:flex;flex-direction:column;gap:10px}.home-secondary{display:flex;align-items:center;gap:13px;padding:15px 17px;border-radius:20px;min-height:67px;background:linear-gradient(110deg,#e7ffed13,#ffffff04),#123f3940}.home-secondary>svg:first-child{color:#e7e4bf}.home-secondary strong{display:block;font-weight:500;font-size:16px;line-height:1.35}.home-secondary small{font-size:12px;line-height:1.4;color:var(--muted);display:block;margin-top:3px}.home-secondary .arrow{margin-left:auto;width:18px}.home-secondary:hover,.connect-card:hover,.support-card:hover{border-color:#ffe6a37a}.home-secondary:active,.connect-card:active,.support-card:active{transform:scale(.99)}
.screen[data-kind=question] .answer-grid{display:flex;flex-direction:column;gap:10px}.screen[data-kind=question] .answer-grid .answer{justify-content:flex-start;text-align:left;padding:15px 18px;min-height:52px;font-size:16px}.screen[data-kind=question] .answer-grid .answer:before{display:block}.auto-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.auto-footer .button{min-width:100px}.auto-hint{font-size:12px;line-height:1.4;color:#f5f0df;text-align:right;max-width:170px}.screen[data-advancing=true] .answer{pointer-events:none;opacity:.68}.screen[data-advancing=true] .answer[aria-pressed=true]{opacity:1;box-shadow:inset 0 0 0 1px #ffedb678;background-color:#6f8a6266}.screen[data-advancing=true] .answer:before{transition:none}.auto-footer .button:disabled{opacity:.6}
@media(max-width:359px){.home-board{gap:14px}.profile-top{gap:13px}.profile-photo{flex-basis:110px;width:110px;border-radius:21px}.profile-copy h1{font-size:26px}.profile-description{font-size:12px}.profile-label{font-size:12px;margin-bottom:7px}.social-links{gap:13px;margin-top:14px}.connect-card{padding:15px;min-height:103px}.connect-card h2{font-size:19px}.support-grid{gap:9px}.support-card{padding:12px 10px;gap:7px}.support-symbol{flex-basis:24px}.support-card strong{font-size:14px}.tabs button{font-size:12px}}
@media(min-height:820px) and (min-width:360px){.app-shell{--header:68px;--nav:79px}.home-board{gap:22px}.personal-intro{padding-top:10px}.profile-photo{flex-basis:clamp(128px,34vw,160px);width:clamp(128px,34vw,160px)}.social-links{margin-top:20px}.connect-card{padding:21px;min-height:125px}.support-card{min-height:91px;padding:15px}.home-secondary{min-height:72px}}
@media(min-width:650px){.app-shell{max-width:1000px}.screen{max-width:880px}.home-board{display:grid;grid-template-columns:1fr 1fr;gap:23px 27px;padding-top:18px}.personal-intro{grid-column:1;grid-row:1/4;align-self:start}.profile-top{align-items:flex-start;flex-direction:column;gap:20px}.profile-photo{width:clamp(132px,17vw,168px);flex-basis:auto}.profile-copy h1{font-size:clamp(35px,4vw,45px);max-width:10ch}.profile-description{font-size:15px;max-width:30ch}.profile-label{font-size:14px}.social-links{justify-content:flex-start;margin-top:20px;gap:12px}.connect-grid,.support-section,.secondary-home{grid-column:2}.connect-card{padding:18px;min-height:118px}.support-card{min-height:89px}.secondary-home{gap:12px}.bottom-nav{max-width:460px}.screen[data-kind=question] .answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.screen[data-kind=question] .answer-grid .answer{justify-content:center;text-align:center}.screen[data-kind=question] .answer-grid .answer:before{display:none}}
@media(orientation:landscape) and (max-height:540px){.app-shell{--header:52px;--nav:59px}.home-board{display:grid;padding-top:5px;grid-template-columns:1fr 1fr;gap:15px 24px}.profile-top{flex-direction:row;gap:13px;align-items:center}.profile-photo{width:100px;flex-basis:100px}.profile-copy h1{font-size:26px}.profile-label{font-size:12px}.profile-description{font-size:12px}.social-links{margin-top:12px;gap:12px}.social-button{width:44px;height:44px;min-width:44px}.connect-card{min-height:100px;padding:13px}.connect-card h2{font-size:19px}.support-card{min-height:82px;padding:11px;gap:7px}.personal-intro{position:sticky;top:0}.screen[data-kind=question] .answer-grid{display:flex;gap:6px}.screen[data-kind=question] .answer-grid .answer{min-height:44px;padding:10px 14px;font-size:14px;justify-content:flex-start}.screen[data-kind=question] .answer-grid .answer:before{display:block}.auto-footer .button{min-height:44px;padding:10px}.bottom-nav{max-width:430px}.bottom-nav :is(button,a){gap:6px}.auto-hint{max-width:none}.question-counter{font-size:12px}}
@media(prefers-reduced-motion:reduce){.social-button:active,.home-secondary:active,.connect-card:active,.support-card:active{transform:none}}
@media(orientation:portrait) and (max-height:700px){
 .screen[data-kind=question] .answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .screen[data-kind=question] .answer-grid .answer{font-size:14px;justify-content:center;text-align:center;padding:13px 7px;min-height:52px}
 .screen[data-kind=question] .answer-grid .answer:before{display:none}
}
.bottom-nav svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* Homepage only: retain every element and fit the mobile viewport by spacing. */
@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home]{padding:4px 0 6px}
 .screen[data-kind=home] .home-board{gap:clamp(10px,1.6svh,16px)}
 .screen[data-kind=home] .personal-intro{padding:2px 2px 0}
 .screen[data-kind=home] .profile-copy{padding:4px 0}
 .screen[data-kind=home] .social-links{margin-top:12px}
 .screen[data-kind=home] .connect-card{padding:13px 16px;min-height:100px;gap:6px}
 .screen[data-kind=home] .support-card{padding:11px 12px;min-height:80px}
 .screen[data-kind=home] .section-label{margin-bottom:7px}
 .screen[data-kind=home] .secondary-home{gap:8px}
 .screen[data-kind=home] .home-secondary{padding:10px 13px;min-height:61px;gap:10px}
 .screen[data-kind=home] .home-secondary>span{min-width:0;flex:1}
 .screen[data-kind=home] .home-secondary[data-route=tests] strong{font-size:15px;line-height:1.3}
}
@media(max-width:649px) and (orientation:portrait) and (max-height:740px){
 .app-shell[data-home=true]{--header:56px;--nav:70px}
 .screen[data-kind=home]{padding-top:0;padding-bottom:2px}
 .screen[data-kind=home] .home-board{gap:7px}
 .screen[data-kind=home] .profile-top{gap:13px}
 .screen[data-kind=home] .profile-photo{width:112px;flex-basis:112px}
 .screen[data-kind=home] .profile-label{margin-bottom:6px}
 .screen[data-kind=home] .profile-copy h1{margin-bottom:7px}
 .screen[data-kind=home] .social-links{margin-top:7px;gap:14px}
 .screen[data-kind=home] .social-button{width:44px;height:44px;min-width:44px}
 .screen[data-kind=home] .connect-card{padding:9px 12px;min-height:88px;gap:4px}
 .screen[data-kind=home] .connect-card h2{font-size:20px}
 .screen[data-kind=home] .support-card{padding:8px 10px;gap:8px;min-height:74px}
 .screen[data-kind=home] .section-label{margin-bottom:5px}
 .screen[data-kind=home] .secondary-home{gap:6px}
 .screen[data-kind=home] .home-secondary{padding:8px 11px;min-height:57px;gap:9px}
}

@media(max-width:649px) and (orientation:portrait) and (min-height:640px){
 .screen[data-kind=home]{overflow:visible}
}
@media(max-width:649px) and (orientation:portrait) and (min-height:881px){
 .screen[data-kind=home] .home-board{gap:20px}
 .screen[data-kind=home] .personal-intro{padding:8px 2px 2px}
 .screen[data-kind=home] .social-links{margin-top:18px}
 .screen[data-kind=home] .connect-card{padding:19px;min-height:120px;gap:8px}
 .screen[data-kind=home] .support-card{padding:14px;min-height:88px}
 .screen[data-kind=home] .home-secondary{padding:13px 15px;min-height:68px}
}
@media(max-width:649px) and (orientation:portrait) and (max-height:660px){
 .screen[data-kind=home] .home-board{gap:5px}
 .screen[data-kind=home] .connect-card{padding-top:7px;padding-bottom:7px;min-height:84px}
 .screen[data-kind=home] .support-card{padding-top:6px;padding-bottom:6px;min-height:70px}
 .screen[data-kind=home] .home-secondary{padding-top:6px;padding-bottom:6px;min-height:53px}
}

/* Requested home emphasis and fixed book recommendation pages. */
.screen[data-kind=home]{overflow:hidden}
.screen[data-kind=home] .home-secondary[data-route=tests]{min-height:86px;padding:16px 14px;border-color:#f9e5a84d;background:linear-gradient(135deg,#ffe6a620,#bdffee0e),#053e3c5c}
.screen[data-kind=home] .home-secondary[data-route=tests] strong{font-size:16px;line-height:1.35}
.book-recommendation{display:flex;flex-direction:column;flex:none;align-items:center;gap:12px;padding:14px;width:100%;height:min(480px,var(--book-page-height));border-color:#f9e5a84d}
.book-recommendation img{display:block;width:100%;flex:1;min-height:0;object-fit:contain;border-radius:12px}
.book-caption{width:100%;flex:none;display:flex;align-items:center;gap:12px}
.book-caption>span{flex:1;min-width:0}
.book-caption small{display:block;font-size:11px;line-height:1.4;color:var(--gold);margin-bottom:4px}
.book-caption strong{display:block;font-size:16px;font-weight:500;line-height:1.35}
.book-caption .arrow{width:20px;flex:none}
.book-recommendation:active{background-color:#ffffff28}
@media(max-height:740px){.screen[data-kind=home] .home-secondary[data-route=tests]{min-height:76px;padding:12px 11px}}

/* Requested vertical rhythm: distribute only the available mobile space. */
@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home] .home-board{height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,.65fr) auto minmax(0,1fr) auto minmax(0,1.4fr) auto minmax(8px,.5fr);gap:0}
 .screen[data-kind=home] .personal-intro{grid-row:1}
 .screen[data-kind=home] .connect-grid{grid-row:3}
 .screen[data-kind=home] .support-section{grid-row:5}
 .screen[data-kind=home] .secondary-home{grid-row:7}
}
.screen[data-kind=next] .page-content:not(:has(.book-recommendation)){margin-block:auto}

/* Compact lower home action group; free viewport space stays above it. */
@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home] .home-board{grid-template-rows:auto minmax(0,1fr) auto auto auto minmax(8px,.05fr);row-gap:clamp(0px,calc((var(--app-vh,100dvh) - 620px)*.08),16px)}
 .screen[data-kind=home] .support-section{grid-row:4}
 .screen[data-kind=home] .secondary-home{grid-row:5}
}
.community-page{height:var(--community-page-height);width:100%;display:flex;flex-direction:column;gap:12px;min-height:0;flex:none}
.community-image{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:12px;border-color:#f9e5a84d}
.community-image img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;border-radius:12px}
.community-page .support-grid{flex:none}
.community-page .support-card{min-width:0}
.screen .content{touch-action:pan-y pinch-zoom}

/* Readable glass surfaces; original result and question layouts stay intact. */
.screen:not([data-kind=result]):not([data-kind=question]):not([data-kind=triage]) .glass{background-color:#073c3bb8}
.screen[data-kind=home] :is(.connect-card,.support-card,.home-secondary){background-color:#073c3bb8}
.screen:not([data-kind=result]):not([data-kind=question]) :is(.connect-grid,.support-grid,.test-list,.secondary-home){gap:12px}
.screen :is(a,button){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
.screen :is(a,button):active:not(:disabled){box-shadow:inset 0 0 0 1px #ffedb678;filter:brightness(1.08)}
.screen :is(a,button):focus-visible{outline-offset:-3px}
.book-caption .book-cta{display:block;margin-top:7px;font-size:13px;font-weight:600;color:#fff0be}
.community-image{flex-direction:column;gap:9px}
.community-image img{flex:1;height:0}
.community-cta{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;flex:none;font-size:16px;line-height:1.35;font-weight:600;color:var(--ink)}
.page-controls>span{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center}
.swipe-hint{font-size:11px;line-height:1.2;color:#fff4d6;white-space:nowrap}
.type-word{white-space:nowrap}
.type-letter{animation:type-reveal .01s both;animation-delay:var(--type-delay)}
@keyframes type-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.type-letter{animation:none}.screen :is(a,button){transition:none}}
@media(prefers-contrast:more){.screen .glass{background-color:#073c3bf2!important;border-color:#fff0be}.screen small{color:#fff9ec}}

.typing-accessible{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* Extra text size consumes spacing first; never shrink the user's text. */
@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home][data-density] .home-board{row-gap:4px;grid-template-rows:auto minmax(0,1fr) auto auto auto 4px}
 .screen[data-kind=home][data-density] .profile-photo{width:88px;flex-basis:88px}
 .screen[data-kind=home][data-density] .profile-top{gap:10px}
 .screen[data-kind=home][data-density] .connect-card{min-height:0;padding:8px 10px;gap:3px}
 .screen[data-kind=home][data-density] .support-card{min-height:0;padding:7px 9px;gap:7px}
 .screen[data-kind=home][data-density] .home-secondary[data-route=tests]{min-height:0;padding:9px 11px}
 .screen[data-kind=home][data-density=tight] .home-board{row-gap:2px}
 .screen[data-kind=home][data-density=tight] .profile-photo{width:72px;flex-basis:72px}
 .screen[data-kind=home][data-density=tight] .social-links{margin-top:4px}
 .screen[data-kind=home][data-density=tight] .connect-card{padding:5px 9px}
 .screen[data-kind=home][data-density=tight] .support-card{padding:5px 8px}
 .screen[data-kind=home][data-density=tight] .section-label{margin-bottom:3px}
}

@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home][data-density=tight] :is(.connect-grid,.support-grid){gap:8px}
 .screen[data-kind=home][data-density=tight] .connect-card{padding:4px;gap:2px}
 .screen[data-kind=home][data-density=tight] .support-card{padding:4px;gap:4px}
 .screen[data-kind=home][data-density=tight] .profile-copy{padding:0}
 .screen[data-kind=home][data-density=tight] .profile-copy h1{margin-bottom:3px}
 .screen[data-kind=home][data-density=tight] .home-secondary[data-route=tests]{padding:5px 7px;gap:6px}
 .screen[data-kind=home][data-density=tight] .personal-intro{padding:0}
}

@media(max-width:649px) and (orientation:portrait){
 .screen[data-kind=home][data-density=tight] .connect-card{position:relative}
 .screen[data-kind=home][data-density=tight] .connect-symbol{position:absolute;top:6px;right:6px}
 .screen[data-kind=home][data-density=tight] .connect-symbol>.icon:not(.arrow){display:none}
}
