:root {
    color-scheme: light;
    --navy: #0c447c;
    --blue: #185fa5;
    --mid: #378add;
    --pale: #e6f1fb;
    --page: #f4f8fd;
    --ink: #123b61;
    --muted: #5a7a99;
    --line: rgba(24, 95, 165, 0.18);
    --panel: #fff;
    --highlight: rgba(255, 255, 255, 0.62);
    --placeholder: #8299ad;
    --button-text: #fff;
    --field-text: #123b61;
    --logo-dot: #e6f1fb;
}

[data-theme="dark"] {
    color-scheme: dark;
    --navy: #e6f1fb;
    --blue: #9ac9f5;
    --mid: #85b7eb;
    --pale: #112d47;
    --page: #061625;
    --ink: #e6f1fb;
    --muted: #a9c1d7;
    --line: rgba(133, 183, 235, 0.24);
    --panel: #0b2238;
    --highlight: rgba(57, 103, 143, 0.24);
    --placeholder: #a9c1d7;
    --button-text: #061625;
    --field-text: #fff;
    --logo-dot: #042c53;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color 180ms ease, color 180ms ease;
}

a {
    color: var(--blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--mid);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    transform: translateY(-160%);
    background: var(--panel);
    border-radius: 4px;
    color: var(--navy);
}

.skip-link:focus {
    transform: translateY(0);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(390px, 1fr);
    gap: 28px;
    width: min(1120px, calc(100% - 64px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0;
    align-items: stretch;
}

.brand-panel,
.auth-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 620px;
    padding: 38px 40px;
    overflow: hidden;
    background-color: var(--pale);
    background-image: linear-gradient(135deg, var(--highlight), var(--pale));
}

.brand-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.language-select {
    min-height: 34px;
    max-width: 116px;
    padding: 5px 22px 5px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--field-text);
    -webkit-text-fill-color: var(--field-text);
    caret-color: var(--field-text);
    font: inherit;
    font-size: 11px;
}

.language-select:focus-visible {
    outline: 3px solid var(--mid);
    outline-offset: 2px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: var(--navy);
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
}

.brand-mark .logo-dot-el {
    fill: var(--logo-dot);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text span:first-child {
    color: var(--navy);
    font-size: 17px;
    font-weight: 600;
}

.logo-text span:last-child {
    color: var(--blue);
    font-size: 17px;
    font-weight: 300;
    letter-spacing: 3px;
}

.theme-toggle {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 4px 0 4px 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--ink);
}

.theme-toggle-track {
    position: relative;
    display: block;
    width: 34px;
    height: 20px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.theme-toggle-track span {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--blue);
    transition: transform 160ms ease;
}

[data-theme="dark"] .theme-toggle-track span {
    transform: translateX(14px);
}

.wordmark-light {
    color: var(--blue);
    font-weight: 300;
}

.brand-copy {
    max-width: 390px;
    margin: auto 0;
    padding: 64px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.5;
}

.brand-copy h1 {
    max-width: 360px;
    margin: 0;
    color: var(--navy);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.2;
}

.brand-description {
    max-width: 330px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
}

.brand-foot {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px clamp(32px, 6vw, 72px);
    background: var(--panel);
}

.auth-panel > .eyebrow {
    margin-bottom: 10px;
}

.auth-panel h2 {
    margin: 0;
    color: var(--navy);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
}

.panel-intro {
    margin: 10px 0 30px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: var(--ink);
    font-size: 12px;
    font-weight: 500;
}

.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--field-text);
    -webkit-text-fill-color: var(--field-text);
    caret-color: var(--field-text);
    font: inherit;
    font-size: 14px;
}

.form-field input::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.form-field input:focus-visible {
    border-color: var(--mid);
}

.action-primary,
.action-secondary {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
    cursor: pointer;
}

.action-primary {
    width: 100%;
    margin-top: 3px;
    background: var(--blue);
    color: var(--button-text);
}

.action-primary:hover {
    transform: translateY(-1px);
    background: var(--navy);
}

.action-secondary {
    background: var(--panel);
    color: var(--blue);
}

.action-secondary:hover {
    background: var(--pale);
}

.form-status {
    min-height: 1.5em;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.auth-switch a {
    font-weight: 600;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.home-panel {
    min-height: 620px;
}

.home-capabilities {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.home-capabilities li {
    display: grid;
    gap: 3px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.home-capabilities strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.home-capabilities span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.home-actions {
    display: grid;
    gap: 12px;
}

.home-panel .form-status {
    margin-top: 24px;
}

@media (max-width: 760px) {
    .auth-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        width: min(520px, calc(100% - 32px));
        min-height: 100vh;
        padding: 16px 0;
    }

    .brand-panel {
        min-height: 0;
        padding: 22px 24px;
    }

    .brand-tools {
        gap: 8px;
    }

    .brand-copy {
        padding: 36px 0 28px;
    }

    .brand-copy h1 {
        max-width: 460px;
        font-size: 31px;
    }

    .brand-description {
        margin-top: 10px;
        font-size: 14px;
    }

    .brand-foot {
        display: none;
    }

    .auth-panel,
    .home-panel {
        min-height: 0;
        padding: 32px 24px;
    }

    .auth-layout-signup .brand-copy {
        padding-bottom: 20px;
    }

    .auth-layout-signup .auth-panel {
        padding-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}