/* Sign-in dialog (partials/signin-dialog.php): brand art left, email-code steps right; a bottom sheet on phones. */
html:has(.orymera-signin[open]) { overflow: hidden; }
.orymera-signin { width: min(880px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; overflow: auto; border: 0; border-radius: var(--orymera-r-lg); background: var(--orymera-night); box-shadow: var(--orymera-shadow-2); color: var(--orymera-ink); }
/* The dialog itself is night and the panel brings its own paper, so the rounded, anti-aliased edges never show a light seam around the dark art. */
/* Layout lives on the dialog itself, not on [open]: close() removes [open] at once, and the exit must keep the same shape while it fades. */
.orymera-signin { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: min(560px, calc(100dvh - 48px)); }
.orymera-signin[open] { display: grid; }
.orymera-signin::backdrop { background: color-mix(in srgb, var(--orymera-night) 38%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25); }
/* Opening rises and fades in; closing fades back a little faster. display/overlay stay discrete so the exit is seen. */
.orymera-signin, .orymera-signin::backdrop { opacity: 0; transition: opacity 180ms ease, transform 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
.orymera-signin { transform: translateY(12px) scale(.98); }
.orymera-signin[open], .orymera-signin[open]::backdrop { opacity: 1; transition-duration: 280ms; transition-timing-function: cubic-bezier(.2, .8, .2, 1); }
.orymera-signin[open] { transform: none; }
@starting-style {
    .orymera-signin[open], .orymera-signin[open]::backdrop { opacity: 0; }
    .orymera-signin[open] { transform: translateY(12px) scale(.98); }
}
/* Closing: shell.js holds .is-closing while the dialog is still open, so the exit plays in every browser, then closes it. */
.orymera-signin.is-closing, .orymera-signin.is-closing::backdrop { opacity: 0; transition-duration: 200ms; transition-timing-function: cubic-bezier(.4, 0, 1, 1); }
.orymera-signin.is-closing { transform: translateY(8px) scale(.98); }

.orymera-signin__art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 34px; background: var(--orymera-night); color: var(--orymera-on-night-strong); }
.orymera-signin__art::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--orymera-night-2) 78%, transparent)); content: ''; }
.orymera-signin__art > * { position: relative; z-index: 1; }
/* The artwork leaves its bottom third near-black for the copy laid over it. */
/* It starts 48px down so the logo clears the eclipse ring; its top edge fades into the night behind it. */
.orymera-signin__art > .orymera-signin__art-image { position: absolute; inset: 48px 0 0; z-index: 0; -webkit-mask-image: linear-gradient(transparent, black 48px); mask-image: linear-gradient(transparent, black 48px); }
.orymera-signin__art-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.orymera-signin__logo { width: 132px; height: auto; }
.orymera-signin__art-copy { max-width: 26ch; }
.orymera-signin__art-copy p { margin: 0; color: var(--orymera-on-night); font-size: 15px; line-height: 1.6; }
.orymera-signin__art-copy p:first-child { margin-bottom: 10px; color: var(--orymera-on-night-strong); font: 400 26px / 1.25 var(--orymera-display); letter-spacing: -.01em; }

.orymera-signin__panel { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 56px 44px 36px; background: var(--orymera-paper-bright); }
.orymera-signin__close { position: absolute; top: 14px; right: 14px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--orymera-label); cursor: pointer; }
.orymera-signin__close:hover { background: var(--orymera-accent-wash); color: var(--orymera-ink); }
.orymera-signin h2 { margin: 0 0 8px; color: var(--orymera-ink); font: 400 30px / 1.2 var(--orymera-display); letter-spacing: -.015em; }
.orymera-signin h2:focus { outline: none; }
.orymera-signin__lede { margin: 0 0 28px; color: var(--orymera-text-muted); font-size: 15px; line-height: 1.6; }
/* Google's dark sign-in button, in Google's own branding colours (the only literal colours in this file). */
.orymera-signin__google { box-sizing: border-box; display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 12px; border: 1px solid #8e918f; border-radius: var(--orymera-r-button); background: #131314; color: #e3e3e3; font: 600 16px var(--orymera-body); text-decoration: none; }
.orymera-signin__google:hover { background: #2a2a2c; }
.orymera-signin__google:focus-visible { outline: var(--orymera-focus); outline-offset: 3px; }
.orymera-signin__google-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #fff; }
.orymera-signin__or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--orymera-label); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-family: var(--orymera-mono); }
.orymera-signin__or::before, .orymera-signin__or::after { flex: 1; height: 1px; background: var(--orymera-rule); content: ''; }
.orymera-signin__label { display: block; margin-bottom: 8px; color: var(--orymera-label); font-size: 15px; font-weight: 600; }
.orymera-signin__input { box-sizing: border-box; width: 100%; height: 50px; padding: 12px 14px; border: 1px solid var(--orymera-rule-strong); border-radius: var(--orymera-r-sm); background: var(--orymera-card); color: var(--orymera-ink); font: 16px var(--orymera-body); }
.orymera-signin__input[aria-invalid="true"] { border-color: var(--orymera-accent-deep); }
.orymera-signin .orymera-button { width: 100%; margin-top: 14px; }
.orymera-signin :is(.orymera-signin__input, .orymera-signin__close, .orymera-signin__link, .orymera-signin__fine a):focus-visible { outline: var(--orymera-focus); outline-offset: 3px; }

/* One real one-time-code input sits invisibly over six display boxes, so paste and autofill just work. */
.orymera-signin__code { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.orymera-signin__code input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; opacity: 0; }
.orymera-signin__box { box-sizing: border-box; display: grid; flex: 1 1 0; max-width: 56px; aspect-ratio: 1; place-items: center; border: 1px solid var(--orymera-rule); border-radius: var(--orymera-r-md); background: var(--orymera-paper); color: var(--orymera-ink); font: 600 22px var(--orymera-body); font-variant-numeric: tabular-nums; }
.orymera-signin__box.is-filled { border-color: var(--orymera-rule-strong); background: var(--orymera-card); }
.orymera-signin__code:focus-within .orymera-signin__box.is-active { border: 1.5px solid var(--orymera-ink); background: var(--orymera-card); box-shadow: 0 0 0 3px var(--orymera-lilac-rule); }
.orymera-signin__code.is-invalid .orymera-signin__box { border-color: var(--orymera-accent-deep); }
.orymera-signin__dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--orymera-rule-strong); }

.orymera-signin__lede p { margin: 0; overflow-wrap: anywhere; }
.orymera-signin__lede strong { color: var(--orymera-ink); font-weight: 600; }
.orymera-signin__lede .orymera-signin__fine { margin-top: 4px; }
.orymera-signin__error { margin: 10px 0 0; color: var(--orymera-accent-deep); font-size: 15px; font-weight: 600; }
.orymera-signin__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; margin: 8px 0 0; }
.orymera-signin__link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--orymera-gold-deep); cursor: pointer; font: 600 14px var(--orymera-body); text-decoration: underline; text-underline-offset: .2em; }
.orymera-signin__link:hover { color: var(--orymera-ink); }
.orymera-signin__fine { margin: 22px 0 0; color: var(--orymera-label); font-size: 12px; line-height: 1.55; }
.orymera-signin__fine a { color: inherit; }

@media (max-width: 600px) {
    /* signin.js sets the visible height and the keyboard's overlap while the sheet is open. */
    .orymera-signin { width: 100%; max-height: calc(var(--orymera-signin-visible, 100dvh) - 24px); margin: auto 0 var(--orymera-signin-keyboard, 0px); border-radius: var(--orymera-r-lg) var(--orymera-r-lg) 0 0; }
    .orymera-signin { grid-template-columns: 1fr; min-height: 0; }
    /* Phones: the sheet itself never fades; it slides up from the screen edge and back down while the backdrop fades. */
    .orymera-signin { opacity: 1; transform: translateY(100%); }
    .orymera-signin[open] { transform: none; transition-duration: 340ms; }
    @starting-style { .orymera-signin[open] { transform: translateY(100%); } }
    .orymera-signin.is-closing { opacity: 1; transform: translateY(100%); transition-duration: 260ms; }
    .orymera-signin__art { min-height: 132px; justify-content: flex-end; padding: 22px 22px 18px; }
    /* The banner's eclipse sits in its right ~40%: centre it vertically and keep the headline in the dark left 60%. */
    .orymera-signin__art > .orymera-signin__art-image { inset: 0; -webkit-mask-image: none; mask-image: none; }
    .orymera-signin__art-image img { object-position: center; }
    .orymera-signin__art-copy { max-width: 60%; }
    .orymera-signin__art-copy p:last-child { display: none; }
    .orymera-signin__art-copy p:first-child { margin: 0; font-size: 21px; text-wrap: balance; }
    /* The banner is too short for both a logo and the headline; the dialog title already names Orymera. */
    .orymera-signin__logo { display: none; }
    .orymera-signin__panel { position: static; padding: 26px 22px 30px; }
    .orymera-signin h2 { font-size: 25px; }
    .orymera-signin__lede { margin-bottom: 22px; }
    .orymera-signin__close { top: 10px; right: 10px; z-index: 2; color: var(--orymera-on-night-strong); }
    .orymera-signin__close:hover { background: color-mix(in srgb, var(--orymera-night) 40%, transparent); color: var(--orymera-on-night-strong); }
    /* With the keyboard up the form needs the room: the banner goes, and the close button sits on paper. */
    .orymera-signin.is-keyboard .orymera-signin__art { display: none; }
    .orymera-signin.is-keyboard .orymera-signin__close { color: var(--orymera-label); }
}

@media (prefers-reduced-motion: reduce) {
    .orymera-signin, .orymera-signin[open], .orymera-signin.is-closing { transform: none; }
    @starting-style { .orymera-signin[open] { transform: none; } }
}
