/* Root portal only. Shared Motiva typography, palette and focus remain in app.css. */
.motiva-portal{position:relative;min-height:100svh;background:radial-gradient(ellipse at 6% 10%,#EEF4FB 0,#FFFFFF00 44%),radial-gradient(ellipse at 96% 94%,#FFF8ED 0,#FFFFFF00 44%),radial-gradient(ellipse at 96% 8%,#FFF1F2 0,#FFFFFF00 38%),var(--white);isolation:isolate}
.portal-language{position:absolute;top:1rem;right:1.5rem;z-index:45}
.portal-main{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;min-height:100svh;padding:6rem 1.5rem}
.portal-choices{display:flex;flex-direction:column;align-items:center;width:100%;max-width:22rem}
.portal-logo{width:16.5rem;max-width:100%;height:auto;margin:0 0 1.25rem}
.portal-subtitle-wrap{display:grid;justify-items:center;gap:.625rem;max-width:20rem;margin:0 0 1.75rem}
.portal-subtitle{margin:0;color:var(--muted);font-size:1.0625rem;line-height:1.5;font-weight:400;text-align:center;text-wrap:balance}
.portal-links{display:grid;gap:.75rem;width:100%;max-width:21.5rem}
.portal-choice{display:grid;grid-template-columns:2rem minmax(0,1fr) 1.125rem;align-items:center;gap:.875rem;min-height:3.25rem;width:100%;padding:.5rem 1rem;border:1px solid var(--navy);border-radius:.625rem;background:var(--navy);color:var(--white);font-size:1.125rem;font-weight:600;line-height:1.25;text-decoration:none;box-shadow:0 2px 5px #0C14230D;transition:background-color .18s,border-color .18s,transform .18s,box-shadow .18s}
.portal-choice:active{background:#101B2D;transform:translateY(0);box-shadow:none}
.portal-choice-icon{display:grid;place-items:center;width:2rem;height:2rem;border-radius:.5rem;background:#242333;color:var(--red);transition:background-color .18s,transform .18s}
.portal-choice-icon svg{width:1.5rem;height:1.5rem;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.portal-choice-arrow{width:1.125rem;height:1.125rem;color:#CBD3DE;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
.portal-continue{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;width:100%;max-width:20rem;margin:1.25rem 0 0;padding:0;color:var(--muted);font-size:.875rem;font-weight:400;line-height:1.45;text-align:center;text-wrap:balance}
.portal-continue span{max-width:16rem}
.portal-continue svg{flex:none;width:1.125rem;height:1.125rem;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.portal-copyright{position:absolute;left:1.25rem;right:1.25rem;bottom:1rem;z-index:1;margin:0;color:#6D7480;font-size:.75rem;font-weight:400;line-height:1.5;text-align:center}
@media(hover:hover) and (pointer:fine){.portal-choice:hover{background:#152236;border-color:#253547;transform:translateY(-2px);box-shadow:0 5px 12px #0C142312}.portal-choice:hover .portal-choice-arrow{transform:translateX(3px)}.portal-choice:hover .portal-choice-icon{background:#342735;transform:scale(1.04)}.portal-choice:active{transform:translateY(0);box-shadow:none}}
.portal-scene{position:fixed;inset:0;overflow:hidden;z-index:0;pointer-events:none;user-select:none}
.portal-waves{position:absolute;inset:0;width:100%;height:100%;stroke:var(--navy);stroke-width:1;opacity:.045}
.portal-waves path{vector-effect:non-scaling-stroke}
.portal-waves .portal-wave-accent{stroke:var(--red)}
.portal-star{position:absolute;width:1rem;height:1rem;stroke:var(--navy);stroke-width:1.2;opacity:.075}
.portal-star-one{left:7%;top:38%;width:.75rem;height:.75rem}
.portal-star-two{right:10%;top:40%}
.portal-star-three{left:32%;top:10%;stroke:var(--red)}
.portal-star-four{right:23%;bottom:11%;width:.75rem;height:.75rem;stroke:var(--red)}
.portal-motif{position:absolute;display:block;max-width:none;opacity:.045}
.portal-motif-flag{width:9.5rem;left:13%;top:15%;transform:rotate(-12deg);border-radius:.5rem;opacity:.055}
.portal-motif-map{width:20rem;right:7%;bottom:8%;transform:rotate(8deg);opacity:.035}
.portal-motif-book{width:7rem;right:17%;top:19%;transform:rotate(12deg);stroke:var(--navy);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.portal-motif-school{width:10rem;left:10%;bottom:13%;transform:rotate(-7deg);stroke:var(--navy);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.portal-motif-rosette{width:5.5rem;right:34%;bottom:10%;stroke:var(--red);stroke-width:1.3;opacity:.05}
.portal-motif-letter{left:23%;top:45%;font-size:5rem;font-weight:300;transform:rotate(-10deg);color:var(--navy)}
.portal-motif-math{right:25%;top:47%;font-size:5rem;font-weight:300;transform:rotate(12deg);color:var(--red)}
/* Hidden by default: disabled JS/storage/CSP fails open. CSS alone ends an enabled intro. */
.portal-intro{display:none;position:fixed;inset:0;z-index:100;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem;background:radial-gradient(ellipse at 10% 10%,#F4F7FC 0,#FFFFFF00 55%),radial-gradient(ellipse at 95% 95%,#FFF9F1 0,#FFFFFF00 45%),var(--white);pointer-events:none;user-select:none}
.portal-intro-enabled .portal-intro{display:flex;animation:portal-intro-fallback 2s ease both}
.portal-intro-enabled .portal-intro.is-leaving{animation:portal-intro-exit .18s ease both}
.portal-intro img{width:16.5rem;max-width:calc(100vw - 3rem);height:auto;animation:portal-logo-arrive .52s ease both}
.portal-intro-spinner{position:relative;display:block;width:2.625rem;height:2.625rem;border:3px solid #E6E8ED;border-top-color:var(--red);border-radius:50%;box-shadow:0 0 0 7px #E8393F06;animation:portal-spinner-turn .85s linear infinite}
.portal-intro-spinner::before{content:"";position:absolute;inset:5px;border:1.5px solid #DCE1E7;border-bottom-color:var(--navy);border-radius:50%;animation:portal-spinner-turn .6s linear reverse infinite}
.portal-intro-spinner::after{content:"";position:absolute;inset:-11px;border:1px solid #E8393F0A;border-radius:50%;box-shadow:0 0 18px #E8393F0A;animation:portal-spinner-halo 1.1s ease-in-out infinite alternate}
@keyframes portal-logo-arrive{from{opacity:0;transform:translateY(5px) scale(.98)}to{opacity:1;transform:none}}
@keyframes portal-spinner-turn{to{transform:rotate(360deg)}}
@keyframes portal-spinner-halo{from{opacity:.45;transform:scale(.97)}to{opacity:.8;transform:scale(1.02)}}
@keyframes portal-intro-fallback{0%,91%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}
@keyframes portal-intro-exit{from{opacity:1;visibility:visible}to{opacity:0;visibility:hidden}}
@media(max-width:48rem){.portal-motif-flag{left:5%;top:13%;width:7rem}.portal-motif-map{right:-5rem;bottom:8%;width:16rem}.portal-motif-book{right:4%;top:17%;width:5rem}.portal-motif-school{left:2%;bottom:10%;width:7rem}.portal-motif-letter{left:5%;top:45%;font-size:4rem}.portal-motif-math{right:4%;top:48%;font-size:4rem}.portal-motif-rosette{right:36%;bottom:7%;width:4rem}}
@media(max-width:25rem){.portal-main{padding:6rem 1.25rem}.portal-logo{width:15rem}.portal-subtitle{font-size:1rem}.portal-choice{padding:.5rem .875rem;gap:.75rem;font-size:1.0625rem}.portal-motif-flag{left:-1.5rem;top:13%;width:6rem}.portal-motif-book{right:-1.75rem;top:15%;width:5rem}.portal-motif-letter,.portal-motif-math{display:none}}
@media(prefers-reduced-motion:reduce){.portal-intro{display:none!important;animation:none}.portal-intro img,.portal-intro-spinner,.portal-intro-spinner::before,.portal-intro-spinner::after{animation:none}.portal-choice,.portal-choice-icon,.portal-choice-arrow{transition:none}.portal-choice:hover,.portal-choice:hover .portal-choice-icon,.portal-choice:hover .portal-choice-arrow{transform:none}}
