/* ==========================================================================
   Sign-in and account security pages.
   sa-*  The studio (staff): a dark brand panel with a picture beside the form. Uses the app.css tokens.
   rl-*  The reader (families): bunting, a bubbly title and a cartoon scene. Bright and playful, in Malay.
   acct-*, pw-*, setup-*  Account settings: side menu, cards, change password and authenticator setup.
   ao-*  The result of a link opened from an email, such as confirm email change.
   ========================================================================== */

/* Full-bleed sign-in pages drop the centred auth column from MainLayout. */
.auth-shell:has(.sa-split, .rl-page) { padding: 0; background: none; align-items: stretch; }
.auth-shell:has(.sa-split, .rl-page) > .auth-brand,
.auth-shell:has(.sa-split, .rl-page) > .auth-footer { display: none; }
.auth-main:has(.sa-split, .rl-page) { max-width: none; }

/* ---------- Studio ---------- */
.sa-split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sa-aside {
    flex: 1 1 32rem; min-width: 0;
    display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
    padding: 3rem 3.5rem; background: var(--brand-900); color: #ece9ff;
}
/* On wide screens the panel grows well past its content, so keep the brand, pitch and picture in a centred column. */
.sa-aside > * { width: 100%; max-width: 32.5rem; margin-inline: auto; }
.sa-brand { display: flex; align-items: center; gap: .75rem; color: #fff; font-size: 1.15rem; font-weight: 750; text-decoration: none; }
.sa-brand:hover { color: #fff; }
.sa-eyebrow { margin: 0 0 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffb39f; }
.sa-headline { margin: 0 0 1rem; max-width: 32rem; color: #fff; font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.12; font-weight: 750; letter-spacing: -.02em; }
.sa-lead { margin: 0; max-width: 32rem; color: #c9c4f2; font-size: 1.05rem; line-height: 1.6; }
.sa-picture { display: block; width: 100%; max-width: 520px; height: auto; margin-inline: auto; }
.sa-legal { margin-block: 0; color: #a7a1d9; font-size: .8rem; }

.sa-form-side { flex: 1 1 28rem; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; background: var(--surface-muted); }
.sa-form { width: 100%; max-width: 25rem; }
.sa-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.sa-title { margin: 0 0 .35rem; font-size: 1.85rem; font-weight: 700; letter-spacing: -.015em; }
.sa-subtitle { margin: 0; color: var(--ink-500); }
.sa-input { height: 3rem; }
.sa-mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }
.sa-btn { min-height: 3.1rem; }
.sa-divider { display: flex; align-items: center; gap: .75rem; color: var(--ink-500); font-size: .85rem; }
.sa-divider::before, .sa-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sa-note { display: flex; gap: .6rem; padding: .75rem .9rem; border-radius: .65rem; background: var(--brand-100); color: var(--brand-700); font-size: .82rem; line-height: 1.5; }
.sa-note .icon { margin-top: .15rem; }
.sa-links { color: var(--ink-500); font-size: .9rem; text-align: center; }
.sa-links p { margin: 0 0 .4rem; }
.sa-links a { font-weight: 600; }
.sa-links-left { padding-top: 1rem; border-top: 1px solid var(--line); text-align: left; }
.sa-icon-tile { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: var(--brand-100); color: var(--brand-600); }
.sa-otp {
    height: 3.5rem; padding-left: .5em; text-align: center;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 650; letter-spacing: .5em;
}

/* On a phone the brand panel becomes a slim header so the form is on screen straight away. */
@media (max-width: 767.98px) {
    .sa-split { flex-direction: column; flex-wrap: nowrap; }
    .sa-aside { flex: none; gap: .75rem; padding: 1.25rem 1.25rem 1.5rem; }
    .sa-eyebrow, .sa-lead, .sa-picture, .sa-legal { display: none; }
    .sa-headline { margin: 0; font-size: 1.35rem; }
    .sa-form-side { flex: 1 0 auto; align-items: flex-start; padding: 1.75rem 1.25rem 2.5rem; }
}

/* ---------- Reader ---------- */
.rl-page { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 30% 70%, #5b21b6 0, transparent 55%), radial-gradient(ellipse at 90% 20%, #be185d 0, transparent 45%), linear-gradient(180deg, #0b0630, #1a0b52); color: #1f2430; font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif; font-size: 1.05em; }
.rl-page a { color: #6d28d9; font-weight: 800; text-decoration: none; }
.rl-page a:hover { color: #4c1d95; text-decoration: underline; }
/* Night sky: everything here is decoration behind the content. Stars cover the whole page; the planets, the shooting star and the sparkles
   sit in the same places as the approved design, measured in --u (1px at a 1440 x 900 window, scaled to fit the window). */
.rl-page { --u: min(100vw / 1440, 100vh / 900); }
.rl-page::before, .rl-page::after { content: ""; position: absolute; left: 0; top: 0; z-index: -1; border-radius: 50%; background: #fff; pointer-events: none; }
.rl-page::before { width: 2px; height: 2px; opacity: .8; box-shadow: 57vw 71vh #cfc0ff, 57vw 65vh #ffd9ec, 24vw 23vh #ffd9ec, 60vw 80vh #ffd9ec, 23vw 12vh #cfc0ff, 38vw 18vh #fff, 68vw 88vh #ffe9a8, 5vw 76vh #cfc0ff, 57vw 83vh #ffe9a8, 78vw 83vh #fff, 79vw 1vh #ffd9ec, 8vw 7vh #fff, 24vw 30vh #ffd9ec, 3vw 59vh #fff, 56vw 75vh #fff, 66vw 29vh #ffe9a8, 37vw 63vh #fff, 84vw 10vh #cfc0ff, 83vw 35vh #cfc0ff, 70vw 10vh #ffe9a8, 32vw 40vh #fff, 65vw 36vh #fff, 8vw 72vh #fff, 51vw 13vh #fff, 49vw 8vh #fff, 87vw 0vh #fff, 26vw 6vh #cfc0ff, 48vw 90vh #cfc0ff, 53vw 9vh #ffd9ec, 80vw 25vh #ffe9a8, 34vw 43vh #fff, 39vw 42vh #fff, 52vw 97vh #fff, 17vw 31vh #ffe9a8, 12vw 1vh #fff, 59vw 62vh #fff, 87vw 71vh #fff, 57vw 65vh #fff, 93vw 16vh #cfc0ff, 82vw 49vh #fff, 50vw 53vh #fff, 0vw 34vh #ffd9ec, 38vw 2vh #fff, 23vw 50vh #ffd9ec, 82vw 73vh #fff, 5vw 18vh #fff, 56vw 33vh #fff, 98vw 78vh #fff, 37vw 49vh #fff, 9vw 11vh #fff, 74vw 81vh #fff, 1vw 76vh #fff, 47vw 79vh #cfc0ff, 16vw 75vh #cfc0ff, 73vw 17vh #cfc0ff, 23vw 80vh #fff, 39vw 29vh #ffd9ec, 31vw 92vh #fff, 20vw 94vh #ffe9a8, 70vw 25vh #ffe9a8, 49vw 61vh #ffd9ec, 10vw 53vh #fff, 13vw 13vh #fff, 65vw 32vh #fff, 94vw 90vh #cfc0ff, 32vw 53vh #ffd9ec, 62vw 37vh #ffd9ec, 22vw 92vh #fff, 16vw 29vh #cfc0ff, 71vw 83vh #ffd9ec, 78vw 9vh #fff, 27vw 26vh #ffe9a8, 2vw 8vh #fff, 52vw 57vh #fff, 7vw 5vh #fff, 36vw 47vh #ffd9ec, 73vw 16vh #fff, 46vw 17vh #cfc0ff, 42vw 84vh #ffe9a8, 88vw 66vh #ffd9ec, 17vw 75vh #fff, 2vw 60vh #fff, 89vw 39vh #fff, 2vw 76vh #ffe9a8, 9vw 61vh #fff, 93vw 39vh #fff, 17vw 9vh #fff, 57vw 69vh #fff, 94vw 5vh #ffe9a8, 94vw 90vh #fff, 43vw 45vh #fff, 87vw 60vh #fff, 53vw 3vh #cfc0ff, 73vw 1vh #ffd9ec, 84vw 48vh #cfc0ff; }
.rl-page::after { width: 3.5px; height: 3.5px; opacity: .95; box-shadow: 74vw 1vh #ffd9ec, 9vw 10vh #fff, 81vw 14vh #fff, 53vw 93vh #fff, 49vw 94vh #ffe9a8, 74vw 58vh #cfc0ff, 59vw 69vh #fff, 66vw 96vh #ffd9ec, 3vw 39vh #ffd9ec, 11vw 61vh #fff, 29vw 89vh #fff, 63vw 78vh #ffe9a8, 62vw 32vh #fff, 47vw 38vh #fff, 86vw 78vh #fff, 66vw 21vh #fff, 84vw 56vh #cfc0ff, 30vw 41vh #cfc0ff, 85vw 32vh #fff, 81vw 55vh #fff, 27vw 49vh #fff, 74vw 40vh #fff, 17vw 17vh #cfc0ff, 44vw 5vh #ffe9a8, 8vw 35vh #fff, 14vw 57vh #cfc0ff, 35vw 27vh #cfc0ff, 48vw 80vh #ffd9ec, 63vw 86vh #fff, 91vw 79vh #cfc0ff, 41vw 9vh #fff, 35vw 77vh #fff, 86vw 90vh #fff, 73vw 45vh #fff, 83vw 72vh #fff, 82vw 17vh #cfc0ff, 58vw 24vh #fff, 98vw 34vh #fff, 99vw 18vh #fff, 80vw 14vh #cfc0ff, 13vw 80vh #ffd9ec, 83vw 81vh #fff, 9vw 87vh #fff, 25vw 60vh #fff, 22vw 91vh #fff; }
.rl-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.rl-nebula { position: absolute; display: block; border-radius: 50%; filter: blur(60px); }
.rl-nebula-pink { left: -8vw; bottom: -6vh; width: 55vw; height: 36vh; background: #ec4899; opacity: .3; }
.rl-nebula-cyan { right: -8vw; bottom: -8vh; width: 48vw; height: 32vh; background: #22d3ee; opacity: .22; }
.rl-planet { position: absolute; display: block; border-radius: 50%; }
.rl-planet-sun { right: -3vw; top: -10vh; width: 21vw; min-width: 9em; aspect-ratio: 1; background: radial-gradient(circle at 30% 30%, #ffd54a, #f97316 60%, #c2410c); box-shadow: 0 0 80px rgba(249, 115, 22, .5); }
.rl-planet-green { left: -6vw; bottom: 3vh; width: 18vw; min-width: 8em; aspect-ratio: 1; background: radial-gradient(circle at 35% 30%, #a7f3d0, #10b981 55%, #047857); box-shadow: 0 0 70px rgba(16, 185, 129, .45); }
.rl-planet-pink { right: 22vw; bottom: -4vh; width: 9.7vw; min-width: 5em; aspect-ratio: 1; background: radial-gradient(circle at 30% 30%, #fbcfe8, #ec4899 60%, #9d174d); }
.rl-saturn { position: absolute; left: 49vw; top: 10vh; width: 5.3vw; min-width: 2.2em; aspect-ratio: 1; border-radius: 50%; background: #ff9f1c; box-shadow: inset -.5vw -.3vw 0 #f97316; }
.rl-saturn::before { content: ""; position: absolute; left: -57%; top: 24%; width: 214%; height: 52%; border: max(4px, .5vw) solid #ffd54a; border-radius: 50%; transform: rotate(-18deg); }
.rl-shoot { position: absolute; left: 25vw; top: 4.5vh; width: 15vw; height: 5px; border-radius: 5px; background: linear-gradient(90deg, transparent, #fff); transform: rotate(21deg); transform-origin: left center; }
.rl-shoot::after { content: ""; position: absolute; right: -4px; top: -4px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.rl-spark { position: absolute; display: block; left: calc(var(--x) / 14.4 * 1%); top: calc(var(--y) / 9 * 1%); width: calc(var(--s) * 1px); height: calc(var(--s) * 1px); background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.rl-body { position: relative; flex: 1 0 auto; width: 100%; max-width: 1400px; margin: 0 auto; padding: 1.25em 2em 1em; }
.rl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5em; }

.rl-scene { position: relative; flex: 1 1 34em; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .25em; }
.rl-hero { position: relative; z-index: 1; align-self: flex-start; width: min(25em, 100%); padding: .5em 0 0 .5em; }
.rl-title { margin: 0; }
.rl-title svg { display: block; width: 100%; overflow: visible; }
.rl-title-shadow, .rl-title-face { font-family: "Cherry Bomb One", "Nunito", "Trebuchet MS", sans-serif; font-size: 88px; font-weight: 900; stroke-linejoin: round; }
.rl-title-shadow { fill: #fff; stroke: #fff; stroke-width: 20px; }
.rl-title-face { paint-order: stroke; stroke: #4c1d95; stroke-width: 10px; }
.rl-tagline { max-width: 24em; margin: .75em 0 0; color: #eadfff; font-size: 1.3em; font-weight: 700; line-height: 1.5; }
.rl-art { display: block; width: min(100%, 36em); height: auto; aspect-ratio: 660 / 520; }

/* Legal links under the sign-in card. */
.rl-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: .35em 1.1em; width: fit-content; max-width: calc(100% - 2em); margin: 0 auto 1.25em; padding: .6em 1.4em; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: .9em; }
.rl-page .rl-legal a { min-height: 1.75em; display: inline-flex; align-items: center; }

.rl-card { flex: 0 1 27em; min-width: 0; padding: 2.5em 2.25em; border: 0; border-radius: 2em; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 7px rgba(255, 255, 255, .14); }
.rl-form { display: flex; flex-direction: column; gap: 1em; }
.rl-form-title { margin: 0; color: #4c1d95; font-family: "Nunito", "Trebuchet MS", sans-serif; font-size: 2.1em; font-weight: 900; letter-spacing: -.01em; }
.rl-form-lead { margin: .2em 0 0; color: #545b6b; }
.rl-field { display: flex; flex-direction: column; gap: .4em; }
.rl-field label { font-size: .9em; font-weight: 700; }
.rl-input { height: 3.2em; padding: 0 1.1em; border: 2px solid #e9d5ff; border-radius: 1em; background: #faf5ff; color: #1f2430; font: inherit; font-size: 1em; }
.rl-input:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 5px rgba(168, 85, 247, .22); }
.rl-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5em 1em; }
.rl-page .rl-forgot { font-size: .85em; font-weight: 700; white-space: nowrap; }
.rl-check { display: flex; align-items: center; gap: .7em; font-size: .9em; font-weight: 600; cursor: pointer; }
.rl-check input { width: 1.35em; height: 1.35em; margin: 0; accent-color: #7c3aed; }
.rl-btn-primary, .rl-btn-secondary { border-radius: 999px; font: inherit; cursor: pointer; }
.rl-btn-primary {
    min-height: 3.2em; border: 0; background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%); color: #fff;
    font-size: 1em; font-weight: 800; letter-spacing: .01em;
    box-shadow: 0 4px 0 #5b21b6, 0 10px 18px -10px rgba(124, 58, 237, .6);
    transition: transform .08s ease, box-shadow .08s ease;
}
.rl-btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #5b21b6; }
.rl-btn-secondary { min-height: 3.2em; border: 2px solid #e9d5ff; background: #fff; color: #4c1d95; font-size: 1em; font-weight: 700; }
.rl-btn-secondary:hover { background: #faf5ff; }
.rl-btn-primary:focus-visible, .rl-btn-secondary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.rl-btn-link { display: grid; place-items: center; text-decoration: none; }
.rl-page a.rl-btn-link, .rl-page a.rl-btn-link:hover { color: #fff; text-decoration: none; }
.rl-foot { margin: 0; color: #545b6b; font-size: .95em; text-align: center; }

/* Phone-only pieces: hidden on larger screens, where the big scene is shown instead. */
.rl-blocks, .rl-mini { display: none; }
.rl-legal-in { display: none; }

@media (max-width: 519.98px), (max-width: 767.98px) and (max-height: 799.98px) {
    .rl-body { padding: 4.2em 1em 1em; }
    .rl-legal { flex-wrap: nowrap; gap: .5em .7em; max-width: calc(100% - 1em); padding: .9em 1em; font-size: 2.55vw; white-space: nowrap; }
    .rl-page .rl-legal a { min-height: 0; }
    /* The back link shares the top row with the language switch instead of sitting on its own line. */
    .rl-page > .rd-langswitch::before { display: none; }
    .rl-page > .rd-langswitch a { min-width: 2.5em; min-height: 0; height: 100%; padding: 0 .6em; display: inline-flex; align-items: center; justify-content: center; }
    .rl-row { gap: .5em; }
    /* The scene and its big title are replaced by alphabet blocks and a small mascot in the card, so the form
       starts on the first screen instead of below a 15em picture. */
    .rl-scene { display: none; }
    .rl-blocks { display: flex; gap: .4em; padding: .1em .25em calc(.7em + 3px); }
    .rl-block { display: grid; place-items: center; width: 2.4em; height: 2.4em; border: 3px solid #5b21b6; border-radius: .7em; color: #fff; font-size: 1.35em; font-weight: 900; }
    .rl-block-0 { background: #f0447f; transform: rotate(-6deg); }
    .rl-block-1 { background: #3b82f6; transform: rotate(4deg); }
    .rl-block-2 { background: #ffe27a; color: #5b21b6; transform: rotate(-3deg); }
    .rl-block-3 { background: #22c55e; transform: rotate(5deg); }
    .rl-page > .rd-langswitch { top: 12px; height: 44px; box-sizing: border-box; padding: 4px; align-items: center; }
    .rl-card { position: relative; flex-basis: 100%; padding: 1.5em 1.25em; border-radius: 1.5em; }
    .rl-mini { display: block; position: absolute; top: 1.1em; right: 1.1em; width: 4em; height: 4em; }
    .rl-form-title, .rl-form-lead { padding-right: 4.5em; }
    .rl-form-title { font-size: 1.7em; }
}


/* Large phones and small tablets in portrait: the full-width card made the fields and buttons huge, so the card is narrower and its
   contents a little smaller, and it stays centred under the blocks. */
@media (min-width: 520px) and (max-width: 767.98px) and (max-height: 799.98px) {
    .rl-card { flex-basis: auto; width: min(100%, 25em); margin: 0 auto; font-size: .82em; padding: 1.4em 1.2em; }
    .rl-input { height: 2.9em; }
    .rl-btn-secondary { min-height: 2.9em; }
    .rl-blocks { justify-content: center; }
    /* The policy links under the page were sized for a phone's width (2.55vw), which is far too big on a tablet. */
    .rl-legal { font-size: 1.7vw; padding: .65em 1.1em; }
}


/* Tablets (768px and wider, and tall portrait tablets from 520px such as a Xiaomi pad, so every tablet shows the same page): the scene and the sign-in card sit side by side in portrait and landscape. Everything is scaled with the font size so the
   small picture, the title and the card keep their proportions, and the form is on the first screen. */
@media (min-width: 768px) and (max-width: 1099.98px), (min-width: 520px) and (max-width: 767.98px) and (min-height: 800px) {
    .rl-page { font-size: clamp(11px, 1.9vw, 16px); }
    .rl-body { padding: 5em 1.5em 1em; }
    .rl-row { flex-wrap: nowrap; gap: 1.2em; align-items: center; }
    .rl-scene { flex: 1 1 0; min-width: 0; }
    .rl-hero { align-self: center; width: min(19em, 100%); padding: 0; text-align: center; }
    .rl-title { width: 100%; }
    .rl-tagline { margin: .4em auto 0; font-size: 1.15em; text-align: center; }
    .rl-art { display: block; width: 100%; max-width: 26em; }
    .rl-card { flex: 0 1 22em; min-width: 0; padding: 2em 1.6em .9em; }
    /* The back link shares the top row with the language switch, as on a phone. */
    .rl-page > .rd-langswitch::before { display: none; }
    .rl-page > .rd-langswitch { top: 12px; height: 44px; box-sizing: border-box; padding: 4px; align-items: center; }
    .rl-page > .rd-langswitch a { min-width: 2.75em; min-height: 0; height: 100%; padding: 0 .7em; display: inline-flex; align-items: center; justify-content: center; }
    .rl-body { padding-top: 4.5em; }
    /* The policy links move into the card, under the form, as one short line; the pill under the page is hidden. */
    /* The sign-in is shorter than a tall tablet, so it sits in the middle of the free height instead of leaving all the empty sky below it. */
    .rl-body { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding-bottom: calc(4.5em + 48px); /* centring halves this, so the card sits about 24px higher than with the plain 4.5em */ }
    .rl-legal { display: none; }
    .rl-legal-in { display: flex; flex-wrap: nowrap; justify-content: center; gap: .3em .9em; margin-top: 1.5em; padding-top: .7em; border-top: 1px solid #ece4fb; font-size: .8em; white-space: nowrap; }
    .rl-page .rl-legal-in a { min-height: 0; }
}

/* Below the desktop layout the small decorations (ringed planet, shooting star, sparkles) are left out so they never sit behind the form. */
@media (max-width: 1099.98px) { .rl-saturn, .rl-shoot, .rl-spark { display: none; } }

/* Desktop: the page is laid out exactly like the approved design, a 1440 x 900 scene scaled to fit the window (--u is 1px at that size). */
@media (min-width: 1100px) and (min-height: 560px) {
    .rl-page { font-size: calc(16.8 * var(--u)); }
    .rl-sky { left: 50%; top: 50%; right: auto; bottom: auto; width: calc(1440 * var(--u)); height: calc(900 * var(--u)); transform: translate(-50%, -50%); overflow: visible; }
    .rl-nebula { filter: blur(calc(60 * var(--u))); }
    .rl-nebula-pink { left: calc(-120 * var(--u)); top: calc(520 * var(--u)); bottom: auto; width: calc(800 * var(--u)); height: calc(320 * var(--u)); }
    .rl-nebula-cyan { left: calc(760 * var(--u)); top: calc(600 * var(--u)); right: auto; bottom: auto; width: calc(700 * var(--u)); height: calc(300 * var(--u)); }
    .rl-planet-sun { left: calc(1120 * var(--u)); top: calc(-90 * var(--u)); right: auto; width: calc(300 * var(--u)); min-width: 0; }
    .rl-planet-green { left: calc(-80 * var(--u)); top: calc(560 * var(--u)); bottom: auto; width: calc(260 * var(--u)); min-width: 0; }
    .rl-planet-pink { left: calc(1010 * var(--u)); top: calc(700 * var(--u)); right: auto; bottom: auto; width: calc(140 * var(--u)); min-width: 0; }
    .rl-saturn { left: calc(702 * var(--u)); top: calc(92 * var(--u)); width: calc(76 * var(--u)); min-width: 0; }
    .rl-saturn::before { left: -75%; top: 24%; width: 250%; height: 52%; border-width: calc(7 * var(--u)); }
    .rl-shoot { left: calc(360 * var(--u)); top: calc(40 * var(--u)); width: calc(228 * var(--u)); }
    .rl-spark { left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--s) * var(--u)); height: calc(var(--s) * var(--u)); }

    .rl-body { flex: none; width: calc(1440 * var(--u)); height: calc(900 * var(--u)); max-width: none; margin: auto; padding: 0; }
    .rl-row, .rl-scene { display: contents; }
    .rl-hero { position: absolute; left: calc(70 * var(--u)); top: calc(112 * var(--u)); width: calc(480 * var(--u)); padding: 0; }
    .rl-title { width: calc(400 * var(--u)); }
    .rl-tagline { max-width: calc(470 * var(--u)); margin: calc(14 * var(--u)) 0 0 calc(14 * var(--u)); font-size: calc(21 * var(--u)); font-weight: 600; text-wrap: balance; }
    .rl-art { position: absolute; left: calc(242.5 * var(--u)); top: calc(385 * var(--u)); width: calc(549.7 * var(--u)); height: calc(433 * var(--u)); aspect-ratio: auto; }
    .rl-card { position: absolute; left: calc(900 * var(--u)); top: calc(120 * var(--u)); width: calc(440 * var(--u)); padding: calc(36 * var(--u)) calc(40 * var(--u)) calc(28 * var(--u)); border-radius: calc(32 * var(--u)); font-size: calc(15 * var(--u)); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 calc(7 * var(--u)) rgba(255, 255, 255, .14); }
    .rl-page > .rd-langswitch { padding: calc(4 * var(--u)); font-size: calc(14 * var(--u)); }
    .rl-page > .rd-langswitch a { min-width: calc(44 * var(--u)); min-height: calc(36 * var(--u)); }
    .rl-page > .rd-langswitch { top: calc(40 * var(--u)); right: calc(50% - 650 * var(--u)); transform-origin: top right; }
    .rl-legal { position: absolute; left: 50%; bottom: calc(16 * var(--u)); transform: translateX(-50%); margin: 0; max-width: none; padding: calc(9 * var(--u)) calc(22 * var(--u)); gap: calc(4 * var(--u)) calc(14 * var(--u)); font-size: calc(13 * var(--u)); white-space: nowrap; }
    .rl-page .rl-legal a { min-height: 0; }
}
/* ---------- Account settings ---------- */
.acct-layout { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .acct-layout { grid-template-columns: minmax(0, 1fr); } }
.acct-side { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.acct-who { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 1.25rem 1.25rem; text-align: center; }
.acct-who-banner { align-self: stretch; height: 5.5rem; margin: 0 -1.25rem; background: radial-gradient(circle at 90% 0, rgba(255, 255, 255, .2) 0, transparent 40%), linear-gradient(100deg, var(--brand-900) 0%, #5b45e0 70%, #ff8ad0 100%); }
.acct-avatar { flex: none; display: grid; place-items: center; width: 5.5rem; height: 5.5rem; margin-top: -2.75rem; border-radius: 50%; border: 5px solid var(--surface); background: linear-gradient(145deg, #ffe27a, #ff8ad0); color: var(--brand-900); font-size: 1.9rem; font-weight: 800; position: relative; }
.acct-who-name { margin-top: .6rem; font-size: 1.2rem; font-weight: 750; overflow-wrap: anywhere; }
.acct-who-meta { color: var(--ink-500); font-size: .85rem; overflow-wrap: anywhere; }
.acct-role { display: inline-block; margin-top: .6rem; padding: .15rem .75rem; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); font-size: .75rem; font-weight: 700; }
.acct-who-since { margin-top: .5rem; color: var(--ink-500); font-size: .75rem; }
.acct-nav { display: flex; flex-direction: column; gap: .9rem; padding: .75rem; border-top: 1px solid var(--line); }
.acct-nav ul { display: flex; flex-direction: column; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.acct-nav-label { display: block; padding: 0 .8rem .3rem; color: var(--ink-500); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.acct-nav-link { display: flex; align-items: center; gap: .7rem; min-height: 2.6rem; padding: 0 .8rem; border-radius: .7rem; color: var(--ink-700); font-size: .92rem; font-weight: 600; text-decoration: none; }
.acct-nav-link:hover { background: var(--brand-50); color: var(--ink-900); }
.acct-nav-link.active { background: var(--brand-100); color: var(--brand-700); }
.acct-nav-link > span:not(.badge-pill) { flex: 1; }
.acct-switch > summary { display: none; list-style: none; }
.acct-switch > summary::-webkit-details-marker { display: none; }
/* Below 900 px: the profile card shrinks to a short row (thin banner, small avatar, name, role) and the section menu is a dropdown button inside the same card that shows the current section, so the form starts near the top. */
@media (max-width: 900px) {
    .acct-who { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; column-gap: .9rem; padding: 0 1rem 1rem; text-align: left; }
    .acct-who-banner { flex: 0 0 calc(100% + 2rem); height: 2.25rem; margin: 0 -1rem .9rem; }
    .acct-avatar { width: 3.5rem; height: 3.5rem; margin-top: -2.4rem; border-width: 4px; font-size: 1.2rem; }
    .acct-who-name { flex: 1 1 8rem; min-width: 0; margin-top: 0; font-size: 1.05rem; }
    .acct-who-meta { flex: 0 0 100%; margin-top: .15rem; }
    .acct-role { margin-top: .4rem; }
    .acct-who-since { margin: .4rem 0 0 auto; }
    .acct-switch { border-top: 1px solid var(--line); }
    .acct-switch > summary { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; font-weight: 700; cursor: pointer; }
    .acct-switch-label { flex: 1; }
    .acct-switch-chev { color: var(--ink-500); font-size: 1rem; line-height: 1; transition: transform .15s; }
    .acct-switch[open] .acct-switch-chev { transform: rotate(180deg); }
    .acct-switch[open] > summary { border-bottom: 1px solid var(--line); }
    .acct-switch .acct-nav { border-top: 0; }
}
.acct-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.acct-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.acct-stack > .acct-panel { flex: none; }
.acct-stack .acct-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .5rem; }
@media (max-width: 560px) { .acct-stack .acct-list { grid-template-columns: minmax(0, 1fr); } }
.acct-stack .acct-form { max-width: none; }
.acct-stack .acct-list li { padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; }
.acct-stack .acct-list li:last-child { border-bottom: 1px solid var(--line); }

.acct-card { padding: 1.75rem; }
.acct-card > .panel-subtitle { margin-bottom: 1.25rem; }
.acct-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1.25rem; }
.acct-row > .acct-card { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; }
.acct-push { margin-top: auto; }
.acct-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.acct-form .acct-actions { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.acct-grow { flex: 1 1 16rem; min-width: 0; }
.acct-hint { margin: .35rem 0 0; color: var(--ink-500); font-size: .78rem; }
.acct-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.1rem; }

.acct-ico { flex: none; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .65rem; background: var(--brand-100); color: var(--brand-600); }
.acct-ico.lg { width: 3rem; height: 3rem; border-radius: .9rem; }
.acct-ico.ok { background: var(--ok-100); color: var(--ok-600); }
.acct-ico.warn { background: var(--warn-100); color: var(--warn-600); }
.acct-ico.info { background: var(--info-100); color: var(--info-600); }
.acct-ico.danger { background: var(--danger-100); color: var(--danger-600); }

.acct-score { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.acct-score-n { color: var(--ink-500); font-size: .85rem; font-weight: 700; }
.acct-bar { height: .55rem; margin: .7rem 0 .4rem; border-radius: 999px; background: var(--brand-100); overflow: hidden; }
.acct-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7b5cff, #19b58a); }

.acct-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.acct-list li { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.acct-list li:last-child { border-bottom: 0; }
.acct-list-text { flex: 1; min-width: 0; }
.acct-list-title { font-size: .9rem; font-weight: 600; }
.acct-list-sub { color: var(--ink-500); font-size: .78rem; }
.acct-list a { font-size: .82rem; font-weight: 600; }

.acct-status { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; padding: 1.5rem 1.75rem; }
.acct-status-text { flex: 1 1 18rem; min-width: 0; }
.acct-status-text h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.acct-status-text p { margin: .25rem 0 0; color: var(--ink-500); font-size: .9rem; }
.badge-pill.lg { padding: .3rem .8rem; font-size: .8rem; }

.acct-method { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface-muted); }
.acct-method + .acct-method { margin-top: .75rem; }
.acct-method-text { flex: 1 1 14rem; min-width: 0; }
.acct-method-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 700; }
.acct-method-sub { margin-top: .15rem; color: var(--ink-500); font-size: .82rem; }

.acct-count { display: flex; align-items: baseline; gap: .4rem; }
.acct-count strong { font-size: 2rem; line-height: 1.1; }
.acct-count span { color: var(--ink-500); font-size: .9rem; }
.acct-meter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .25rem; margin: .6rem 0 1.25rem; }
.acct-meter span { height: .4rem; border-radius: 1rem; background: var(--line); }
.acct-meter span.on { background: var(--ok-600); }
.acct-meter.low span.on { background: var(--danger-600); }
.acct-meter.mid span.on { background: #d98a00; }
.acct-tile { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; padding: .85rem; border-radius: .75rem; background: var(--surface-muted); }

.acct-danger { border-color: #f3c2bf; }
.acct-danger .panel-title { color: var(--danger-600); }
.acct-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.5rem 1.75rem; }
.acct-banner > div { flex: 1 1 18rem; min-width: 0; }
.acct-banner p { margin: .25rem 0 0; color: var(--ink-500); font-size: .9rem; }
.btn-outline-danger { --bs-btn-color: var(--danger-600); --bs-btn-border-color: var(--danger-600); --bs-btn-hover-bg: var(--danger-600); --bs-btn-hover-border-color: var(--danger-600); }

.acct-split { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.acct-split > div { flex: 1 1 16rem; min-width: 0; display: flex; flex-direction: column; }
.acct-checks { padding: 1rem 1.25rem; border-radius: .75rem; background: var(--surface-muted); }
.acct-checks h3 { margin: 0 0 .25rem; color: var(--ink-500); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.acct-checks ul { margin: 0; padding: 0; list-style: none; }
.acct-checks li { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); color: var(--ink-700); font-size: .875rem; }
.acct-checks li:last-child { border-bottom: 0; }
.acct-checks .icon { flex: none; color: var(--ok-600); }
.acct-confirm { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.acct-confirm > div { flex: 1 1 15rem; max-width: 22rem; }
.acct-note { display: flex; gap: .6rem; margin: 1rem 0 0; padding: .75rem .9rem; border-radius: .65rem; background: var(--warn-100); color: #7a4300; font-size: .85rem; line-height: 1.5; }
.acct-note .icon { flex: none; margin-top: .15rem; }
.acct-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.acct-codes code { display: block; padding: .6rem .75rem; border-radius: .6rem; background: var(--brand-50); color: var(--brand-700); font-size: .95rem; letter-spacing: .06em; text-align: center; }

.acct-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; }
.acct-panel { flex: 999 1 26rem; min-width: 0; padding: 1.75rem; }
.acct-summary { flex: 1 1 16rem; min-width: 0; }
.acct-summary dl { margin: 0 0 1rem; }
.acct-summary dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.acct-summary dt { font-weight: 500; color: var(--ink-700); }
.acct-summary dd { margin: 0; color: var(--ink-500); }
.acct-summary a { font-size: .9rem; font-weight: 600; }
.acct-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 30rem; }
.badge-pill { padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-pill.ok { background: var(--ok-100); color: #0f6e4b; }
.badge-pill.warn { background: var(--warn-100); color: var(--warn-600); }

.pw-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin-top: .6rem; }
.pw-meter span { height: .35rem; border-radius: 1rem; background: var(--line); transition: background-color .15s; }
.pw-meter[data-strength="1"] span:nth-child(-n+1) { background: var(--danger-600); }
.pw-meter[data-strength="2"] span:nth-child(-n+2) { background: #d98a00; }
.pw-meter[data-strength="3"] span:nth-child(-n+3) { background: var(--ok-600); }
.pw-meter[data-strength="4"] span { background: var(--ok-600); }
.pw-label { min-height: 1.2em; margin: .35rem 0 0; font-size: .82rem; font-weight: 600; }
.pw-label[data-strength="1"] { color: var(--danger-600); }
.pw-label[data-strength="2"] { color: var(--warn-600); }
.pw-label[data-strength="3"], .pw-label[data-strength="4"] { color: var(--ok-600); }
.pw-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .4rem 1rem; margin: 0; padding: .85rem 1rem; border-radius: .75rem; background: var(--surface-muted); color: var(--ink-500); font-size: .85rem; list-style: none; }
.pw-rules li::before { content: ""; display: inline-block; width: .85rem; height: .85rem; margin-right: .5rem; border: 2px solid var(--ink-300); border-radius: 50%; vertical-align: -.1em; }
.pw-rules li.met { color: var(--ink-700); }
.pw-rules li.met::before { border-color: var(--ok-600); background: var(--ok-600); box-shadow: inset 0 0 0 2px #fff; }

.setup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.setup-steps li { display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border-radius: .75rem; background: var(--surface-muted); color: var(--ink-500); font-size: .9rem; font-weight: 600; }
.setup-steps li.done { background: var(--ok-100); color: #0f6e4b; }
.setup-steps li[aria-current] { background: var(--brand-100); color: var(--brand-700); }
.setup-num { display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border: 2px solid var(--ink-300); border-radius: 50%; background: #fff; font-size: .8rem; font-weight: 700; }
.setup-steps li.done .setup-num { border-color: var(--ok-600); background: var(--ok-600); color: #fff; }
.setup-steps li[aria-current] .setup-num { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }
.setup-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2rem; }
.setup-qr { flex: none; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.setup-qr img { display: block; }
.setup-detail { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.setup-heading { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; }
.setup-key { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.setup-key kbd { flex: 1 1 14rem; padding: .7rem .9rem; border-radius: .6rem; background: var(--brand-50); color: var(--brand-700); font-size: 1rem; letter-spacing: .06em; box-shadow: none; }
.setup-verify { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.setup-verify-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.setup-verify-row .form-control { flex: 1 1 12rem; width: auto; }

/* ---------- Email link results (confirm account, confirm email change) ---------- */
.ao-wrap { width: 100%; max-width: 30rem; margin: 0 auto; }
.app-content .ao-wrap { padding-top: clamp(0rem, 6vh, 3rem); }
.ao-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; box-shadow: var(--shadow); text-align: center; }
.ao-hero {
    display: flex; justify-content: center; padding: 1.75rem 1rem .75rem;
    background: radial-gradient(90% 120% at 50% 0%, #3a2c8f 0%, var(--brand-900) 70%);
}
.ao-hero svg { display: block; max-width: 100%; height: auto; }
.ao-body { padding: 1.75rem 1.5rem 2rem; }
.ao-eyebrow { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ao-ok .ao-eyebrow { color: var(--ok-600); }
.ao-error .ao-eyebrow { color: var(--danger-600); }
.ao-title { margin: 0 0 .6rem; font-size: 1.6rem; font-weight: 750; letter-spacing: -.015em; }
.ao-message { margin: 0 auto; max-width: 24rem; color: var(--ink-500); line-height: 1.6; }
.ao-chip {
    display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; margin-top: 1.1rem; padding: .45rem .9rem;
    border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); font-weight: 600; font-size: .9rem;
}
.ao-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ao-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.6rem; }
.ao-actions .btn { min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 650; }
.ao-footnote { margin: 1rem 0 0; color: var(--ink-500); font-size: .85rem; text-align: center; }
@media (min-width: 576px) { .ao-body { padding: 2rem 2.5rem 2.5rem; } }

/* Show-password button (password-toggle.js) */
.pw-field { position: relative; display: block; width: 100%; }
.pw-field > input { width: 100%; padding-right: 3.2rem; }
.pw-toggle { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .65; cursor: pointer; }
.pw-toggle:hover { opacity: 1; }
.pw-toggle:focus-visible { outline: 3px solid currentColor; outline-offset: 1px; opacity: 1; }

@font-face { font-family: "Cherry Bomb One"; font-style: normal; font-weight: 400 900; font-display: swap; src: local("Cherry Bomb One"), url("fonts/cherry-bomb-one-latin-400.woff") format("woff"); }

/* The install-the-app buttons under the sign-in form (InstallButtons, styled in reader.css). */
.rl-install { margin-top: 1.25em; padding-top: 1em; border-top: 2px dashed #eadfb8; text-align: center; }
/* Nothing to install once the app is installed or is the thing that is open: the whole block, line and spacing included, goes. */
@media (display-mode: standalone) { .rl-install { display: none; } }
.app-installed .rl-install { display: none; }
.rl-install p { margin: 0 0 .6em; font-size: .85em; font-weight: 700; color: #6b5d99; }
.rl-install .app-install { font-size: 1em; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.rl-install .app-install-btn { height: 2.8rem; justify-content: flex-start; gap: .4rem; padding: 0 .6rem; border-width: 2px; }
.rl-install .app-install-btn svg { width: 1.2rem; height: 1.2rem; }
.rl-install .app-install-btn small { font-size: .52rem; }
.rl-install .app-install-btn b { font-size: .78rem; }
/* .rl-page a paints links purple; the install buttons keep their own look: dark words on a white pill. */
.rl-page a.app-install-btn, .rl-page a.app-install-btn:hover { color: #fff; font-weight: 900; text-decoration: none; }
.rl-page a.app-install-btn small { font-weight: 800; }

/* With no "keep me signed in" box beside it, the forgot-password link stays on the right. */
.rl-options .rl-forgot { margin-left: auto; }
