:root {
    color-scheme: light dark;
    --bg: #f6f7fb;
    --panel: #ffffff;
    --text: #171923;
    --muted: #677084;
    --line: rgba(23, 25, 35, 0.11);
    --accent: #2458ff;
    --accent-text: #ffffff;
    --soft: #eef2ff;
    --danger: #c93535;
    --shadow: 0 22px 80px rgba(33, 41, 64, 0.13);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111318;
        --panel: #1a1f2a;
        --text: #f4f6fb;
        --muted: #a4acba;
        --line: rgba(244, 246, 251, 0.11);
        --accent: #8ea4ff;
        --accent-text: #10131d;
        --soft: #252c3a;
        --danger: #ff8b8b;
        --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
    color: var(--text);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
        var(--bg);
}

button, input { font: inherit; }

.site-shell {
    min-height: 100vh;
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
}

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 28px;
    padding: 22px 0 42px;
}

.topbar, .hero-grid, .auth-panel, .account-panel {
    width: 100%;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 850;
}

.brand-mark img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.top-actions, .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
    align-items: center;
    gap: 34px;
}

.hero-copy {
    display: grid;
    gap: 18px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

h1, h2 {
    margin: 0;
    line-height: 1.02;
    letter-spacing: 0;
}

h1 { font-size: clamp(44px, 8vw, 86px); }
h2 { font-size: 30px; }

.lead {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.48;
}

.lead.small {
    font-size: 15px;
}

.auth-panel, .account-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 96%, transparent);
    box-shadow: var(--shadow);
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    background: var(--soft);
}

.tab, .link-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.tab {
    min-height: 40px;
    border-radius: 7px;
    font-weight: 800;
}

.tab.is-active {
    background: var(--panel);
    color: var(--text);
}

.auth-form {
    display: none;
    gap: 12px;
}

.auth-form.is-active {
    display: grid;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    background: var(--panel);
    color: var(--text);
}

input:focus {
    border-color: var(--accent);
}

.solid-btn, .ghost-btn, .yandex-btn {
    min-height: 44px;
    border-radius: 8px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    cursor: pointer;
    text-decoration: none;
    font-weight: 850;
}

.solid-btn {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-text);
}

.ghost-btn, .yandex-btn {
    background: var(--panel);
    color: var(--text);
}

.large {
    min-height: 50px;
}

.message {
    min-height: 18px;
    margin: 0;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.35;
}

.message:empty { display: none; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.divider:before, .divider:after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.yandex-btn b {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #fc3f1d;
    color: #fff;
}

.yandex-btn[aria-disabled="true"] {
    opacity: .55;
    pointer-events: none;
}

.account-list {
    display: grid;
    gap: 8px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.account-row small {
    color: var(--muted);
}

@media (max-width: 760px) {
    .hero-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .top-actions {
        display: none;
    }

    h1 {
        font-size: 52px;
    }
}
