/* The existing Valikon login, fitted to desktop, portrait and landscape viewports. */
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--workbench); }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.login-shell { position: fixed; inset: 0; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.login-scroll { height: 100%; overflow: auto; overscroll-behavior: none; scrollbar-width: thin; }
.login-layout { min-height: 100%; max-width: 1480px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.welcome, .login-panel { min-width: 0; border-radius: 24px; }
.welcome { display: flex; flex-direction: column; padding: clamp(28px, 4dvh, 44px) clamp(28px, 3.5vw, 50px); background: var(--sunken); border: 1px solid var(--line); }
.welcome-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.brand { display: block; width: max-content; }
.welcome .logo-lockup { width: clamp(160px, 24dvh, 240px); }
.welcome-copy { margin-block: auto; padding: 36px 0; }
.eyebrow { font-size: 11px; line-height: 1.5; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-ink); margin: 0 0 10px; }
.welcome h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; margin: 0 0 22px; text-wrap: balance; }
.welcome-copy > p:last-child { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 30ch; margin: 0; }
.welcome-foot { font-size: 12px; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 10px; }
.access-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.login-panel { background: var(--canvas); display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4dvh, 40px) clamp(24px, 3vw, 48px); }
.form-wrap { width: 100%; max-width: 410px; }
.form-wrap h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.035em; font-weight: 650; margin: 0 0 12px; text-wrap: balance; }
.form-intro { color: var(--muted); margin: 0 0 20px; }
.project-choice { padding: 0; border: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.project-choice legend { font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.choice { margin: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--fill); min-width: 0; min-height: 60px; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--sunken); }
.choice input { width: 17px; height: 17px; flex-shrink: 0; margin: 0; accent-color: var(--primary); }
.choice strong { display: block; font-size: 14px; line-height: 1.5; color: var(--ink); }
.choice small { display: block; font-size: 10px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.field { margin-bottom: 18px; }
label { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
input { display: block; width: 100%; height: 50px; background: var(--fill); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); padding: 0 17px; font-size: 16px; min-width: 0; }
input::placeholder { color: var(--subtle); }
input:focus { border-color: var(--primary-ink); }
input[aria-invalid="true"] { border-color: var(--danger-ink); }
.password-field { position: relative; }
.password-field input { padding-right: 60px; }
.password-field button { position: absolute; right: 3px; top: 3px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.password-field button:hover { background: var(--sunken); color: var(--ink); }
svg { width: 22px; height: 22px; }
.password-field svg, .submit svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-message { font-size: 13px; line-height: 1.5; color: var(--danger-ink); margin: 0 0 12px; overflow-wrap: anywhere; }
.login-message:empty { margin: 0; }
.submit { border: 0; border-radius: 12px; background: var(--primary); color: #fff; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 20px; font-size: 15px; font-weight: 650; }
.submit:hover { background: var(--primary-hover); }
.submit:disabled { cursor: wait; background: var(--fill); color: var(--muted); }
.form-foot { font-size: 12px; line-height: 1.5; color: var(--subtle); margin: 20px 0 0; }
.no-script { color: var(--primary-ink); font-size: 13px; }
@media (min-width: 701px) and (max-width: 1100px) {
 .welcome { padding-inline: 28px; }
 .welcome-top { gap: 16px; }
 .welcome .logo-lockup { width: 140px; }
 .welcome .theme-toggle svg { display: none; }
 .welcome h1 { font-size: 38px; }
 .welcome-copy > p:last-child { font-size: 16px; }
 .login-panel { padding-inline: 24px; }
 .form-wrap h2 { font-size: 27px; }
}
@media (max-width: 700px) {
 .login-shell { padding-inline: max(12px, env(safe-area-inset-right)); }
 .login-layout { display: flex; flex-direction: column; gap: 12px; }
 .welcome, .login-panel { border-radius: 18px; }
 .welcome { padding: 16px 20px; flex-shrink: 0; }
 .welcome-top { align-items: center; gap: 12px; }
 .welcome .logo-lockup { width: 104px; }
 .welcome-copy, .welcome-foot { display: none; }
 .welcome .theme-toggle { padding: 10px 12px; }
 .login-panel { flex: 1; padding: 24px; }
 .form-wrap > .eyebrow { display: none; }
 .form-wrap h2 { font-size: clamp(21px, 6vw, 26px); margin-bottom: 8px; }
 .form-intro { font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
 .project-choice { margin-bottom: 16px; gap: 8px; }
 .choice { padding: 10px; gap: 8px; }
 .choice small { font-size: 10px; }
 .field { margin-bottom: 14px; }
 label { margin-bottom: 6px; }
 input { height: 48px; }
 .password-field button { top: 2px; right: 2px; }
 .submit { min-height: 48px; }
 .form-foot { display: none; }
}
@media (max-width: 700px) and (max-height: 700px) {
 .login-shell { padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
 .login-layout { gap: 10px; }
 .welcome { padding: 10px 18px; }
 .welcome .logo-lockup { width: 88px; }
 .login-panel { padding: 18px 22px; }
 .choice { min-height: 48px; padding-block: 8px; }
 .choice small { display: none; }
 .project-choice { margin-bottom: 14px; }
 .field { margin-bottom: 12px; }
 input { height: 46px; }
 .password-field button { top: 1px; right: 1px; }
 .submit { min-height: 46px; }
}
@media (min-width: 701px) and (max-height: 650px) {
 .login-shell { padding: 10px; }
 .welcome, .login-panel { padding: 22px 28px; }
 .welcome .logo-lockup { width: 140px; }
 .welcome-copy { padding: 20px 0; }
 .welcome h1 { font-size: clamp(30px, 3.2vw, 44px); }
 .welcome-copy > p:last-child { font-size: 16px; }
 .form-wrap > .eyebrow, .form-foot { display: none; }
 .form-wrap h2 { font-size: 25px; margin-bottom: 8px; }
 .form-intro { font-size: 14px; margin-bottom: 14px; }
 .field { margin-bottom: 12px; }
 .project-choice { margin-bottom: 14px; }
 .choice { min-height: 48px; padding: 8px 10px; }
 input { height: 46px; }
 .password-field button { top: 1px; right: 1px; }
 .submit { min-height: 46px; }
}
@media (min-width: 701px) and (max-height: 460px) {
 .welcome { padding: 16px 20px; }
 .welcome .logo-lockup { width: 100px; }
 .welcome-top { flex-wrap: wrap; align-items: center; gap: 8px; }
 .welcome-copy { padding: 16px 0; }
 .welcome h1 { font-size: 28px; margin-bottom: 12px; }
 .welcome-copy > p:last-child, .welcome-foot { display: none; }
 .login-panel { padding: 16px 20px; }
 .form-wrap h2 { font-size: 21px; }
 .form-intro { display: none; }
 .project-choice legend { margin-bottom: 6px; }
 .choice small { display: none; }
 .project-choice { margin-bottom: 10px; }
 .field { margin-bottom: 10px; }
 label { font-size: 12px; margin-bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

@media (max-width: 700px) and (max-height: 700px) {
 .form-wrap:has(.login-message:not(:empty)) .form-intro { display: none; }
}
@media (min-width: 701px) and (max-height: 460px) {
 .form-wrap:has(.login-message:not(:empty)) .project-choice legend { display: none; }
 .form-wrap:has(.login-message:not(:empty)) .project-choice { margin-bottom: 8px; }
 .form-wrap:has(.login-message:not(:empty)) .field { margin-bottom: 8px; }
 .form-wrap:has(.login-message:not(:empty)) h2 { margin-bottom: 6px; }
 .login-panel:has(.login-message:not(:empty)) { padding-block: 13px; }
}

.login-shell { bottom: auto; height: var(--portal-height, 100dvh); }
