/* Формы входа, регистрации и восстановления доступа. */
:root {
    --bg: #f8f7f3;
    --surface: #fffefb;
    --ink: #303b36;
    --muted: #647066;
    --line: #dedfd5;
    --control: #899181;
    --error: #9a3e32;
    --sidebar-width: 304px;
    --sidebar-gutter: 16px;
    --page-gutter: 28px;
    --orange: #ad5132;
    --accent-soft: #f5eee6;
    --sage: #e4eddf;
    --peach: #fae7d8;
    --blue: #e3edf3;
    --on-accent: #fff;
    --sage-ink: #4d6649;
    --selection-ink: #52634b;
    --peach-ink: #795234;
    --illustration-accent: #dbbd75;
    --toast-surface: #384738;
    --shadow-neutral: #0002;
    --shadow-soft: #303b3608;
    --shadow-auth: #303b3605;
    --shadow-form: #303b3604;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-in: cubic-bezier(.4, 0, 1, 1);
    --ease-spring: cubic-bezier(.34, 1.24, .64, 1);
    --dur-fast: 140ms;
    --dur-base: 220ms;
    --dur-slow: 320ms;
}

@supports (transition-timing-function: linear(0, 1)) {
    :root {
        --ease-spring: linear(0, .06 5%, .22 12%, .46 20%, .71 29%, .91 38%, 1.01 46%, 1.04 54%, 1.025 65%, 1.006 78%, .999 90%, 1);
    }
}

* {
    box-sizing: border-box
}

html {
    scrollbar-gutter: stable;
    overflow-x: clip
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 var(--font-body)
}

body.site-app { margin: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }

a {
    color: inherit;
    text-decoration: none
}

button, input, select, textarea {
    font: inherit
}

button, a, input, select, textarea {
    touch-action: manipulation
}

button, a {
    -webkit-tap-highlight-color: transparent
}

button {
    cursor: pointer
}

:focus {
    outline: none
}

html:not([data-pointer-focus]) :focus-visible {
    box-shadow: 0 3px 0 var(--ink) !important
}

@media (forced-colors: active) {
    html:not([data-pointer-focus]) :focus-visible {
        border-bottom: 2px solid Highlight !important
    }
}

h1, h2, h3, p {
    margin-top: 0
}

h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -1.3px
}

small, .small {
    font-size: 12px
}

.muted {
    color: var(--muted)
}

.topbar {
    height: 84px;
    display: grid;
    grid-template-columns:var(--sidebar-width) minmax(0, 1fr);
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-gutter) 0 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface)
}

.brand {
    display: flex;
    align-items: center
}

.topbar > .brand {
    height: 100%;
    padding: 0 var(--sidebar-gutter);
    border-right: 1px solid var(--line)
}

.brand-logo {
    display: block;
    width: 184px;
    height: auto
}

.brand-logo-compact {
    display: none
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--control);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 17px;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap
}

.button:hover {
    background: var(--accent-soft);
    color: var(--orange)
}

.primary {
    background: var(--orange);
    color: var(--on-accent);
    border-color: var(--orange)
}

.full {
    width: 100%
}

.centered {
    max-width: 720px;
    margin: 55px auto;
    padding: 0 20px
}

.form-card {
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px
}

.form-card h1 {
    font-size: 28px;
    margin: 22px 0
}

.form-card p {
    font-size: 14px
}

.form-card form p {
    margin-bottom: 20px
}

.form-card label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--control);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    min-height: 46px
}

.helptext {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 6px
}

.back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    color: var(--muted)
}

.form-footer {
    margin: 25px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px
}

.form-footer a {
    color: var(--orange)
}

.form-footer a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.auth-layout {
    display: grid;
    grid-template-columns:1fr 420px;
    gap: 100px;
    max-width: 1100px;
    padding: 80px 30px;
    margin: 0 auto;
    align-items: center
}

.auth-intro-title {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -1px;
    margin-bottom: 24px
}

.auth-intro > p:not(.eyebrow) {
    max-width: 340px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8
}

.intro-art {
    position: relative;
    height: 190px;
    margin-top: 30px
}

.intro-art > span {
    position: absolute;
    right: 55px;
    top: 0;
    font-size: 68px;
    color: var(--illustration-accent)
}

.intro-art > div {
    background: var(--sage);
    color: var(--sage-ink);
    padding: 18px 22px;
    width: 250px;
    border-radius: 12px;
    transform: rotate(-4deg);
    position: absolute;
    top: 20px;
    left: 0;
    box-shadow: 0 4px 15px var(--shadow-soft)
}

.intro-art small {
    font-size: 12px
}

.intro-art > div:last-child {
    background: var(--peach);
    color: var(--peach-ink);
    top: 103px;
    left: 55px;
    transform: rotate(4deg)
}

.auth-card {
    box-shadow: 0 15px 45px var(--shadow-auth)
}

.auth-intro-title, .form-card h1 {
    text-wrap: balance;
    overflow-wrap: break-word;
    min-width: 0
}

.messages {
    margin: 15px auto;
    max-width: 720px;
    overflow-wrap: anywhere;
    padding: 10px 20px;
    color: var(--selection-ink);
    background: var(--sage);
    border-radius: 8px
}

.cookie-notice {
    margin: 0 auto 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 4px 20px var(--shadow-neutral);
    font-size: 14px;
    line-height: 1.5
}

.cookie-notice[hidden] {
    display: none
}

.cookie-notice p {
    flex: 1 1 320px;
    margin: 0
}

.cookie-notice a {
    color: var(--orange);
    text-decoration: underline;
    text-underline-offset: 3px
}

.cookie-notice .button {
    flex-shrink: 0
}

.site-app:has(.cookie-notice:not([hidden])) .toast {
    bottom: max(var(--toast-bottom), 16px + env(safe-area-inset-bottom))
}

.toast {
    --toast-bottom: 25px;
    position: fixed;
    bottom: var(--toast-bottom);
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    overflow-wrap: anywhere;
    background: var(--toast-surface);
    color: var(--on-accent);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-neutral);
    z-index: 10
}

@media (prefers-reduced-motion: no-preference) {
    .toast[hidden] {
        opacity: 0;
        transform: translate(-50%, calc(100% + var(--toast-bottom)));
        pointer-events: none
    }
}

@media (min-width: 1101px) and (max-width: 1499px) {
    :root {
        --sidebar-width: 240px;
        --page-gutter: 24px
    }
}

@media (min-width: 1500px) {
    :root {
        --page-gutter: 64px
    }
}

@media (max-width: 1100px) {
    :root {
        --page-gutter: 20px;
    }
    .auth-layout {
        gap: 50px;
        padding-top: 60px
    }
    .auth-intro-title {
        font-size: 44px
    }
}

@media (max-width: 1100px) {
    .topbar {
        height: 70px;
        display: flex;
        padding: 0 var(--page-gutter)
    }
    .topbar > .brand {
        height: auto;
        padding: 0;
        border-right: 0
    }
    .auth-layout {
        display: block;
        max-width: 500px;
        padding: 32px var(--page-gutter)
    }
    .auth-intro {
        display: none
    }
    .form-card {
        padding: 26px
    }
    .centered {
        margin-top: 25px
    }
}

@media (prefers-reduced-motion: no-preference) {
    a, button {
        transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out)
    }
}

@media (max-width: 1100px) {
    input, textarea, select {
        font-size: 16px
    }
    .topbar {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 14px;
        padding-bottom: 14px
    }
}

.color-options .field-error {
    grid-column: 1 / -1
}

.field-error {
    display: block;
    color: var(--error);
    font-size: 13px;
    margin-top: 6px
}

input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
    border-color: var(--error)
}

@media (max-width: 600px) {
    .topbar {
        flex-wrap: wrap;
    }
}

.site-app .topbar {
    display: flex;
    height: auto;
    min-height: 72px;
    gap: 20px;
    padding: 14px var(--page-gutter)
}

.site-app .topbar > .brand {
    height: auto;
    padding: 0;
    border: 0;
    margin-right: auto
}

.site-app .brand {
    flex-shrink: 0;
}

.site-app.yasno-ui :is(input, textarea, select)[aria-invalid="true"] {
    border-color: var(--error);
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        view-transition-name: none;
    }
}

.site-app .form-card {
    border-radius: 12px;
    box-shadow: 0 4px 22px var(--shadow-form);
}

.site-app .form-card p:not(.helptext), .site-app .form-card input:not([type="checkbox"]):not([type="radio"]), .site-app .form-card textarea, .site-app .form-card select {
    font-size: 16px;
}

.site-app .form-card h1, .site-app .form-card h2 {
    letter-spacing: -.7px;
    overflow-wrap: anywhere;
}

.site-app .form-card h1 {
    font-size: 28px;
    line-height: 1.25;
}

.site-app .form-card .back {
    color: var(--orange);
}

.site-app input[type="checkbox"], .site-app input[type="radio"] {
    accent-color: var(--orange);
}

.site-app .auth-intro-title {
    font-family: inherit;
    font-weight: 650;
    letter-spacing: -1.8px;
}

.site-app .auth-intro-title {
    font-size: 46px;
}

.site-app .intro-art > span {
    display: none;
}

@media (max-width: 600px) {
    .site-app .form-card {
        padding: 24px;
    }
    .site-app .form-card h1 {
        font-size: 25px;
    }
}

@media (max-width: 600px) {
    .site-app .topbar {
        position: relative;
        gap: 6px;
        padding: 13px 16px;
    }
    .site-app .brand-logo {
        display: none;
    }
    .site-app .brand-logo-compact {
        display: block;
        width: 148px;
    }
}

@media (max-width: 400px) {
    .site-app .topbar {
        gap: 4px;
    }
    .site-app .brand-logo-compact {
        width: 136px;
    }
}

@font-face {
    font-family: Onest;
    src: url('../fonts/onest/onest-0.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Onest;
    src: url('../fonts/onest/onest-1.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Onest;
    src: url('../fonts/onest/onest-2.woff2') format('woff2');
    font-weight: 600 800;
    font-display: swap;
}

.site-app.yasno-ui {
    --bg: #f6f6f3;
    --surface: #fff;
    --ink: #1b282b;
    --muted: #5a6668;
    --line: rgba(27, 40, 43, .10);
    --orange: #16665b;
    --orange-hover: #0f5249;
    --accent-soft: #eaf2ef;
    --control: #818d8a;
    --selection-ink: #1a4b41;
    --focus-soft: rgba(22, 102, 91, .32);
    --shadow-card: 0 2px 6px rgba(27, 40, 43, .04), 0 12px 32px rgba(27, 40, 43, .06);
    --shadow-button: 0 1px 2px rgba(22, 102, 91, .20), inset 0 1px 0 rgba(255, 255, 255, .18);
    --shadow-soft: rgba(27, 40, 43, .04);
    --shadow-auth: rgba(27, 40, 43, .05);
    --sidebar-width: 232px;
    --sidebar-gutter: 16px;
    --page-gutter: 28px;
    --toast-surface: #1b282b;
    --font-body: Onest, sans-serif;
    --font-display: var(--font-body);
    caret-color: var(--orange);
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.yasno-ui { --sage: #edf1e6; --sage-ink: #4c6430; --sage-marker: #7b8f50; --blue: #eaf1f6; --blue-ink: #345d70; --blue-marker: #52879b; --peach: #f7efe2; --peach-ink: #805722; --peach-marker: #ab7b3a; --lavender: #f0eaf5; --lavender-ink: #6e4b8c; --lavender-marker: #8a6ba6; }

.site-app.yasno-ui:not(.yasno-page) { --bg: #f6f6f3; background: var(--bg); font-size: 14px; line-height: 1.5; }

.site-app.yasno-ui:not(.yasno-page) .topbar { height: 68px; min-height: 68px; padding: 0 28px; gap: 24px; flex-wrap: nowrap; background: var(--surface); border-bottom: 1px solid var(--line); }

.site-app.yasno-ui:not(.yasno-page) .topbar > .brand { width: auto; height: auto; padding: 0; margin-right: auto; border: 0; }

.site-app.yasno-ui:not(.yasno-page) .brand-logo { display: block; width: 142px; height: auto; }

.site-app.yasno-ui:not(.yasno-page) .brand-logo-compact { display: none; }

.yasno-ui .centered { margin-block: 32px; padding-inline: 24px; }

.yasno-ui .form-card { min-width: 0; padding: 32px; border: 1px solid transparent; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }

.yasno-ui .form-card h1 { margin: 16px 0 24px; font-size: 28px; font-weight: 500; line-height: 1.25; letter-spacing: -.6px; }

.site-app.yasno-ui .form-card p:not(.helptext) { font-size: 14px; line-height: 1.6; }

.yasno-ui .form-card form p { margin-bottom: 20px; }

.yasno-ui .form-card label { font-size: 13px; font-weight: 500; }

.yasno-ui .form-card .back { display: inline-flex; margin-bottom: 4px; color: var(--orange); font-size: 13px; }

.yasno-ui .helptext { color: var(--muted); font-size: 12px; line-height: 1.6; }

.yasno-ui input, .yasno-ui textarea, .yasno-ui select { border-radius: 6px; border-color: var(--control); background-color: var(--surface); }

:where(.site-app) input[type="checkbox"] {
    --checkbox-size: 16px;
    appearance: none;
    display: grid;
    place-content: center;
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    min-height: 0;
    margin: max(0px, calc((1lh - var(--checkbox-size)) / 2)) 0 0;
    padding: 0;
    flex-shrink: 0;
    font-size: inherit;
    border: 1.5px solid var(--checkbox-color, var(--orange));
    border-radius: 5px;
    background: var(--surface);
    cursor: pointer;
}

.site-app input[type="checkbox"]:checked {
    background: var(--checkbox-color, var(--orange));
}

.site-app input[type="checkbox"]:checked::after {
    content: "";
    width: 8px;
    height: 5px;
    margin-top: -2px;
    border: solid var(--on-accent);
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

@media (forced-colors: active) {
    :where(.site-app) input[type="checkbox"] { appearance: auto; }
    .site-app input[type="checkbox"]:checked::after { content: none; }
}

.site-app .form-card .password-visibility:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: -16px 0 12px;
    cursor: pointer;
}

.site-app .password-visibility input[type="checkbox"] {
    margin: 0;
}

.yasno-ui .button { min-height: 44px; padding: 10px 16px; border-radius: 9px; font-size: 13px; font-weight: 500; line-height: 20px; }

.yasno-ui .button.primary { border-color: transparent; background: var(--orange); color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow-button); }

@media (hover: hover) {
    .yasno-ui .button.primary:hover { background: var(--orange-hover); }
}

.yasno-ui :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea):focus:where(:not([aria-invalid="true"])) { border-color: var(--orange); }

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
    .yasno-ui :is(.button, input, textarea, select, a) { transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
    .yasno-ui .button:not(:disabled):active { transform: translateY(1px) scale(.985); }
}

.site-app .button:disabled, .site-app .button:disabled:hover { border-color: var(--line); background: var(--line); color: var(--muted); opacity: 1; cursor: default; }

.yasno-ui .auth-layout { gap: 56px; padding-block: 48px; }

.site-app.yasno-ui .auth-intro-title { font-size: 40px; font-weight: 500; line-height: 1.2; letter-spacing: -1.2px; }

.yasno-ui .auth-card h1 { margin: 0 0 20px; font-size: 26px; letter-spacing: -.6px; }

.auth-page .centered { max-width: 520px; }

@media (min-width: 681px) and (min-height: 800px) {
    .auth-page :is(.auth-layout, .centered) { margin-block: auto; padding-block: 32px; }
}

.auth-page .form-card a:not(.button) { text-decoration: underline; text-underline-offset: 3px; }

.auth-card .auth-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin: -8px 0 12px; font-size: 13px; }
.site-app .auth-tools .password-visibility:not([hidden]) { min-height: 44px; margin: 0; }
.auth-page .form-card :is(.auth-tools a, .form-footer a, .back) { display: inline-flex; align-items: center; min-height: 44px; }
.auth-page .form-card a:not(.button):hover { color: var(--orange); }

.auth-page .form-card > form + p { margin-top: 12px; }

.reset-warning { margin-block: 16px; padding: 16px; border-radius: 6px; background: var(--peach); color: var(--peach-ink); font-size: 14px; }
.yasno-ui .form-card .reset-warning p { margin: 8px 0 0; }

.yasno-ui .intro-art > div { border: 1px solid transparent; border-radius: 12px; background: var(--surface); color: var(--orange); box-shadow: var(--shadow-card); }

.yasno-ui .intro-art > div:last-child { background: var(--accent-soft); color: var(--selection-ink); }

.yasno-ui .messages { border: 1px solid var(--line); border-radius: 6px; background: var(--accent-soft); color: var(--ink); }

@media (max-width: 600px) {
    .site-app.yasno-ui:not(.yasno-page) .topbar { height: 64px; min-height: 64px; padding-inline: 16px; gap: 12px; }
    .site-app.yasno-ui:not(.yasno-page) .brand-logo { width: 120px; }
    .yasno-ui .centered { margin-block: 20px; padding-inline: 16px; }
    .yasno-ui .form-card { padding: 20px; }
    .yasno-ui .form-card h1 { margin-block: 12px 20px; font-size: 24px; }
    .yasno-ui .auth-layout { padding: 24px 16px; }
    .site-app.yasno-ui .auth-intro-title { font-size: 30px; }
}

@media (max-width: 359px) {
    .site-app.yasno-ui:not(.yasno-page) .topbar { gap: 8px; }
    .site-app.yasno-ui:not(.yasno-page) .brand-logo { width: 104px; }
}

.auth-page .form-card > h1:first-child { margin-top: 0; }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 20px var(--page-gutter); background: var(--surface); }

.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; max-width: 1440px; margin-inline: auto; }

.site-footer-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; flex: 0 1 260px; min-width: 0; }

.site-footer-brand > a { color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; }

.site-footer-brand > span { color: var(--muted); font-size: 13px; }

.site-footer-brand > small { flex-basis: 100%; color: var(--muted); font-size: 12px; }

.site-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 24px; max-width: 750px; }

.site-footer-links a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; color: var(--muted); font-size: 13px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }

.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }


.site-app.yasno-ui { display: flex; flex-direction: column; min-height: 100dvh; }

.site-app.yasno-ui .topbar > .brand { min-width: 44px; min-height: 44px; }

.site-app.yasno-ui ::selection { color: var(--on-accent); background: var(--orange); }

.site-app > :is(main, .app-layout) { width: 100%; }

.registration-documents { color: var(--muted); font-size: 12px; line-height: 1.7; }

.registration-documents a { color: var(--ink); text-underline-offset: 3px; }

@media (max-width: 1023px) {
    .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-footer-brand { flex-basis: auto; }
    .site-footer-brand > small { flex-basis: auto; }
    .site-footer-links { justify-content: flex-start; gap: 0 20px; }
}

@media (max-width: 600px) {
    .site-footer { padding: 16px 20px; }
    .site-footer-inner { gap: 8px; }
}
