:root {
    --telos-ink: #122233;
    --telos-ink-soft: #526675;
    --telos-paper: #fffefd;
    --telos-paper-warm: #f5f2eb;
    --telos-night: #050c14;
    --telos-night-soft: #0c1d2a;
    --telos-line: #d8e1df;
    --telos-coral: #e95b52;
    --telos-coral-soft: #fbe5e1;
    --telos-teal: #55aaa2;
    --telos-teal-light: #8fc8c2;
    --telos-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --telos-serif: Georgia, "Times New Roman", Times, serif;
    color-scheme: light;
    font-family: var(--telos-sans);
    color: var(--telos-ink);
    background: var(--telos-paper);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }

.telos-auth-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--telos-paper);
}

.telos-auth-body a { color: inherit; }
.telos-auth-body :focus-visible { outline: 3px solid var(--telos-coral); outline-offset: 3px; }

.telos-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.04fr) minmax(460px, .96fr);
}

.telos-auth-brand {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 4.5rem);
    display: flex;
    flex-direction: column;
    color: var(--telos-paper-warm);
    background:
        radial-gradient(circle at 83% 22%, rgba(85, 170, 162, .22), transparent 31%),
        radial-gradient(circle at 18% 80%, rgba(233, 91, 82, .15), transparent 31%),
        linear-gradient(145deg, var(--telos-night) 0%, var(--telos-night-soft) 100%);
}

.telos-auth-wordmark { position: relative; z-index: 2; width: 156px; display: block; }
.telos-auth-wordmark img, .telos-auth-mobile-brand img { display: block; width: 100%; height: auto; }

.telos-auth-brand-copy {
    position: relative;
    z-index: 2;
    width: min(590px, 92%);
    margin: auto 0;
    padding: clamp(4rem, 12vh, 8rem) 0;
}

.telos-auth-brand-copy h2 {
    margin: 0;
    font-family: var(--telos-serif);
    font-size: clamp(3rem, 5.6vw, 5.8rem);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.045em;
}

.telos-auth-brand-copy > p:last-child {
    max-width: 510px;
    margin: 2rem 0 0;
    color: rgba(243, 240, 232, .72);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    line-height: 1.65;
}

.telos-auth-content {
    min-height: 100vh;
    padding: clamp(2rem, 5vw, 6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(rgba(18, 34, 51, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 34, 51, .025) 1px, transparent 1px),
        var(--telos-paper);
    background-size: 42px 42px;
}

.telos-auth-mobile-brand { display: none; }
.telos-auth-card { width: min(100%, 470px); margin: auto; }
.telos-auth-card-heading { margin-bottom: 2.25rem; }

.telos-auth-content > .flash {
    width: min(100%, 470px);
    margin: 0 auto 1.25rem;
    padding: .9rem 1rem;
    border: 1px solid var(--telos-line);
    border-radius: .55rem;
    font-size: .88rem;
    line-height: 1.45;
}

.telos-auth-content > .flash-success,
.telos-auth-content > .flash-notice {
    color: #236a63;
    background: #edf7f5;
    border-color: rgba(45, 121, 116, .22);
}

.telos-auth-content > .flash-error {
    color: #a63b35;
    background: var(--telos-coral-soft);
    border-color: rgba(185, 69, 62, .24);
}

.telos-auth-card-heading h1 {
    margin: 0;
    font-family: var(--telos-serif);
    color: var(--telos-ink);
    font-size: clamp(2.7rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.045em;
}

.telos-auth-card-heading > p {
    margin: 1rem 0 0;
    color: var(--telos-ink-soft);
    font-size: 1rem;
    line-height: 1.6;
}

.telos-auth-form { display: grid; gap: 1.35rem; }

.telos-auth-errors {
    margin: 0;
    padding: .9rem 1rem;
    color: #a63b35;
    background: var(--telos-coral-soft);
    border: 1px solid rgba(185, 69, 62, .24);
    border-radius: .55rem;
    font-size: .9rem;
    line-height: 1.45;
}

ul.telos-auth-errors { padding-left: 2.15rem; }
.telos-auth-field { min-width: 0; }

.telos-auth-field > label {
    display: block;
    margin-bottom: .55rem;
    color: var(--telos-ink);
    font-size: .9rem;
    font-weight: 650;
}

.telos-auth-field input {
    width: 100%;
    min-height: 3.35rem;
    padding: .85rem 1rem;
    color: var(--telos-ink);
    background: rgba(255, 255, 255, .88);
    border: 1px solid #bdc9c6;
    border-radius: .55rem;
    box-shadow: 0 1px 1px rgba(18, 34, 51, .035);
    font: inherit;
    font-size: 1rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.telos-auth-field input::placeholder { color: #899895; }
.telos-auth-field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--telos-teal);
    box-shadow: 0 0 0 4px rgba(85, 170, 162, .14);
}

.telos-auth-password { position: relative; }
.telos-auth-password input { padding-right: 4.5rem; }

.telos-auth-reveal {
    position: absolute;
    top: 50%;
    right: .65rem;
    min-width: 3.1rem;
    min-height: 2.15rem;
    padding: 0 .6rem;
    color: #2d7974;
    background: transparent;
    border: 0;
    border-radius: .35rem;
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
    transform: translateY(-50%);
    cursor: pointer;
}

.telos-auth-field-error { color: #a63b35; font-size: .8rem; }
.telos-auth-field-error ul { margin: .45rem 0 0; padding-left: 1.15rem; }

.telos-auth-submit {
    width: 100%;
    min-height: 3.45rem;
    margin-top: .35rem;
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--telos-night);
    background: var(--telos-teal-light);
    border: 1px solid var(--telos-teal-light);
    border-radius: .55rem;
    box-shadow: 0 .75rem 1.8rem rgba(85, 170, 162, .22);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.telos-auth-submit:hover { background: var(--telos-teal); border-color: var(--telos-teal); transform: translateY(-1px); }
.telos-auth-submit:focus-visible { outline-color: var(--telos-night); }
.telos-auth-submit span:last-child { font-size: 1.25rem; }

.telos-auth-footer {
    width: min(100%, 470px);
    margin: auto auto 0;
    padding-top: 3rem;
    display: flex;
    gap: 1.25rem;
    color: #7a8986;
    font-size: .75rem;
}

.telos-auth-footer a { text-decoration: none; }
.telos-auth-footer a:hover { color: var(--telos-ink); }

@media (max-width: 900px) {
    .telos-auth-shell { display: block; }
    .telos-auth-brand { display: none; }
    .telos-auth-content { min-height: 100vh; padding: 2rem clamp(1.25rem, 7vw, 4rem); }
    .telos-auth-mobile-brand { width: 126px; margin: 0 auto 3rem; display: block; }
    .telos-auth-card { margin: auto; }
    .telos-auth-footer { margin-top: auto; }
}

@media (max-width: 520px) {
    .telos-auth-content { padding-top: 1.5rem; padding-bottom: 1.5rem; }
    .telos-auth-mobile-brand { margin-bottom: 2.25rem; }
    .telos-auth-card-heading { margin-bottom: 1.75rem; }
    .telos-auth-card-heading h1 { font-size: 2.65rem; }
    .telos-auth-footer { flex-wrap: wrap; padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
