:root {
    --graphite: #10141b;
    --graphite-2: #1b212b;
    --ink: #202631;
    --muted: #687384;
    --line: #dce2ea;
    --soft: #f3f6fa;
    --white: #ffffff;
    --blue: #1f6feb;
    --blue-2: #0f56c3;
    --danger: #b42318;
    --transparent: transparent;
    --radius: 3px;
    --shadow: 0 18px 45px rgba(16, 20, 27, 0.15);
}

* { 
    box-sizing: border-box; 
}

[hidden] {
    display: none !important;
}

html {
    scroll-padding-top: 110px;
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: transparent;
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
}

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

img, svg { max-width: 100%; display: block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    color: var(--white);
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.btn:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn:disabled {
    color: #98a2b3;
    background: #eef2f6;
    border-color: #d0d5dd;
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    color: var(--graphite);
    background: var(--white);
    border-color: var(--muted);
}
.btn-secondary:hover {
    color: var(--graphite);
    background: var(--soft);
    border-color: var(--graphite);
}
.btn-ghost { color: var(--white); background: transparent; border-color: rgba(255, 255, 255, 0.42); }
.btn-small { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.danger { color: var(--white); background: var(--danger); border-color: var(--danger); }

.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3 { margin: 0 0 16px; line-height: 1.12; letter-spacing: 0; }
h1 { font-size: clamp(42px, 7vw, 82px); }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: 21px; }
p { margin: 0 0 18px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

input, select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #cbd4df;
    border-radius: var(--radius);
    font: inherit;
}

textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 111, 235, 0.16); border-color: var(--blue); }

.toast-region {
    position: fixed;
    right: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 1200;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 12px 12px 16px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(16, 20, 27, 0.24);
    pointer-events: auto;
    animation: toast-in 0.28s ease both;
}

.toast.is-leaving {
    animation: toast-out 0.2s ease both;
}

.toast p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.toast-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.toast-success .toast-indicator { background: #079455; }
.toast-error .toast-indicator { background: var(--danger); }

.toast-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.toast-close:hover { color: var(--ink); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 640px) {
    .toast-region {
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast.is-leaving {
        animation: none;
    }
}
