:root {
    --auth-ink: #17251f;
    --auth-muted: #64736c;
    --auth-line: #dce5e0;
    --auth-surface: #ffffff;
    --auth-soft: #f2f7f4;
    --auth-green: #0f7657;
    --auth-green-dark: #07513c;
    --auth-green-deep: #082f25;
    --auth-danger: #b42318;
    --auth-danger-soft: #fff1f0;
    --auth-success: #087443;
    --auth-success-soft: #ecfdf3;
    --auth-warning: #8a4b08;
    --auth-warning-soft: #fff7e7;
    --auth-info: #175cd3;
    --auth-info-soft: #eff8ff;
    --auth-radius: 18px;
    --auth-shadow: 0 24px 70px rgba(11, 61, 46, .16);
}

*, *::before, *::after { box-sizing: border-box; }

html { min-width: 320px; background: #e9f1ed; }

body {
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(15, 118, 87, .11), transparent 32rem),
        #e9f1ed;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
a { color: var(--auth-green); text-underline-offset: 3px; }
a:hover { color: var(--auth-green-dark); }

.auth-stage {
    display: grid;
    min-height: 100svh;
    padding: clamp(16px, 3vw, 42px);
    place-items: center;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(330px, .9fr) minmax(480px, 1.1fr);
    width: min(1120px, 100%);
    min-height: min(720px, calc(100svh - 48px));
    overflow: hidden;
    background: var(--auth-surface);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
}

.auth-hero {
    position: relative;
    display: flex;
    min-height: 100%;
    overflow: hidden;
    padding: clamp(30px, 5vw, 58px);
    color: #fff;
    background:
        linear-gradient(155deg, rgba(5, 78, 57, .08), rgba(1, 25, 19, .3)),
        var(--auth-green-deep);
    flex-direction: column;
    isolation: isolate;
}

.auth-hero::before {
    position: absolute;
    z-index: -1;
    right: -90px;
    bottom: 80px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 70px;
    content: "";
    transform: rotate(28deg);
}

.auth-hero__glow {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(1px);
    pointer-events: none;
}

.auth-hero__glow--top {
    top: -110px;
    right: -90px;
    width: 290px;
    height: 290px;
    background: rgba(63, 211, 159, .22);
}

.auth-hero__glow--bottom {
    bottom: -150px;
    left: -130px;
    width: 340px;
    height: 340px;
    background: rgba(15, 118, 87, .48);
}

.auth-brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 760;
    letter-spacing: -.02em;
    text-decoration: none;
}

.auth-brand:hover { color: #fff; }

.auth-brand__mark {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 8px;
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
    grid-template-columns: 1fr 1fr;
}

.auth-brand__mark span {
    display: block;
    border: 2px solid #fff;
    border-radius: 2px;
}

.auth-brand__mark span:last-child { background: #fff; border-color: #fff; }

.auth-hero__content { margin: auto 0; padding: 48px 0; }

.auth-kicker {
    margin: 0 0 14px;
    color: #8de9c8;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-hero__title {
    max-width: 540px;
    margin: 0;
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    font-weight: 780;
    letter-spacing: -.055em;
    line-height: 1.03;
}

.auth-hero__text {
    max-width: 480px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: clamp(.98rem, 1.4vw, 1.08rem);
}

.auth-benefits {
    display: grid;
    margin: 30px 0 0;
    padding: 0;
    gap: 12px;
    list-style: none;
}

.auth-benefits li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .88); }
.auth-benefits span { display: grid; width: 24px; height: 24px; color: #b8f5df; background: rgba(255, 255, 255, .1); border-radius: 999px; font-size: .78rem; place-items: center; }
.auth-hero--features .auth-hero__content { padding: 32px 0; }
.auth-hero--features .auth-benefits { margin: 0; }

.auth-hero__footer { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .55); font-size: .82rem; }
.auth-hero__footer a { color: rgba(255, 255, 255, .74); }

.auth-content { display: grid; min-width: 0; padding: clamp(28px, 5.5vw, 72px); place-items: center; }
.auth-content__inner { width: min(460px, 100%); }

.auth-mobile-brand { display: none; margin-bottom: 32px; }

.auth-heading { margin-bottom: 28px; }
.auth-eyebrow { margin: 0 0 8px; color: var(--auth-green); font-size: .77rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-heading h1 { margin: 0; font-size: clamp(1.85rem, 4vw, 2.5rem); letter-spacing: -.045em; line-height: 1.08; }
.auth-heading p { margin: 12px 0 0; color: var(--auth-muted); }

.auth-google {
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 37, 31, .05);
    font-weight: 700;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.auth-google:hover { color: var(--auth-ink); border-color: #9fb9ae; box-shadow: 0 8px 24px rgba(23, 37, 31, .08); transform: translateY(-1px); }
.auth-google img { width: 21px; height: 21px; }

.auth-divider { display: flex; margin: 24px 0; align-items: center; gap: 14px; color: var(--auth-muted); font-size: .8rem; text-align: center; }
.auth-divider::before, .auth-divider::after { height: 1px; background: var(--auth-line); content: ""; flex: 1; }

.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; }
.auth-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.auth-label { color: #283b33; font-size: .87rem; font-weight: 700; }
.auth-required { color: var(--auth-danger); }
.auth-help { margin: 0; color: var(--auth-muted); font-size: .79rem; }

.auth-control {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    color: var(--auth-ink);
    border: 1px solid #84958d;
    border-radius: 11px;
    outline: none;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-control::placeholder { color: var(--auth-muted); }
.auth-control:hover { border-color: #788a82; }
.auth-control:focus { border-color: var(--auth-green); box-shadow: 0 0 0 4px rgba(15, 118, 87, .12); }
.auth-control[aria-invalid="true"] { border-color: var(--auth-danger); }
select.auth-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #596b63 50%), linear-gradient(135deg, #596b63 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; padding-right: 38px; }

.auth-error { margin: 0; color: var(--auth-danger); font-size: .8rem; font-weight: 650; }

.auth-check { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; color: var(--auth-muted); font-size: .84rem; }
.auth-check input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--auth-green); }
.auth-check label { cursor: pointer; }
.auth-check .auth-error { grid-column: 2; }

.auth-button {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    padding: 13px 20px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: var(--auth-green);
    box-shadow: 0 10px 24px rgba(15, 118, 87, .2);
    cursor: pointer;
    font-weight: 760;
    text-decoration: none;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.auth-button:hover { color: #fff; background: var(--auth-green-dark); box-shadow: 0 12px 28px rgba(7, 81, 60, .25); transform: translateY(-1px); }
.auth-button:disabled { opacity: .58; cursor: not-allowed; transform: none; }

.auth-alert { margin: 0 0 18px; padding: 13px 15px; border: 1px solid transparent; border-radius: 11px; font-size: .88rem; }
.auth-alert--success { color: var(--auth-success); border-color: #abefc6; background: var(--auth-success-soft); }
.auth-alert--danger { color: var(--auth-danger); border-color: #fecdca; background: var(--auth-danger-soft); }
.auth-alert--warning { color: var(--auth-warning); border-color: #fedf89; background: var(--auth-warning-soft); }
.auth-alert--info { color: var(--auth-info); border-color: #b2ddff; background: var(--auth-info-soft); }

.auth-identity { display: flex; margin-bottom: 24px; padding: 13px 14px; align-items: center; gap: 12px; border: 1px solid var(--auth-line); border-radius: 12px; background: var(--auth-soft); }
.auth-identity img { width: 24px; height: 24px; }
.auth-identity__symbol { display: grid; width: 28px; height: 28px; flex: 0 0 28px; color: var(--auth-green); border-radius: 999px; background: #dff5eb; font-weight: 800; place-items: center; }
.auth-identity strong, .auth-identity span { display: block; overflow-wrap: anywhere; }
.auth-identity span { color: var(--auth-muted); font-size: .76rem; }

.auth-note { margin: 16px 0 0; color: var(--auth-muted); font-size: .8rem; text-align: center; }
.auth-note--panel { padding: 13px 14px; border-radius: 11px; background: var(--auth-soft); text-align: left; }
.auth-meta { margin-top: 26px; color: var(--auth-muted); font-size: .86rem; text-align: center; }
.auth-meta p { margin: 8px 0 0; }
.auth-meta a { font-weight: 700; }

:focus-visible { outline: 3px solid rgba(55, 191, 143, .55); outline-offset: 3px; }

.auth-entry-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
.auth-entry-home { display: grid; flex: 0 0 44px; min-height: 44px; border-radius: 10px; place-items: center; }
.auth-entry-home .auth-brand__mark { color: var(--auth-green); border-color: var(--auth-line); background: var(--auth-soft); }
.auth-entry-home .auth-brand__mark span { border-color: currentColor; }
.auth-entry-home .auth-brand__mark span:last-child { background: currentColor; }
.auth-entry-languages { display: flex; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.auth-entry-languages a { display: inline-flex; min-width: 44px; min-height: 44px; padding: 8px; align-items: center; justify-content: center; border-radius: 9px; color: var(--auth-muted); font-size: .8rem; font-weight: 700; text-decoration: none; }
.auth-entry-languages a[aria-current="page"] { color: var(--auth-green-dark); background: #dff5eb; box-shadow: inset 0 -2px var(--auth-green); }
.auth-entry-languages a:hover, .auth-entry-home:hover { background: var(--auth-soft); }
.auth-entry .auth-meta > a, .auth-entry .auth-meta > p:first-child > a { display: inline-flex; min-height: 44px; padding: 8px 4px; align-items: center; justify-content: center; }
.auth-entry .auth-note { line-height: 1.6; }

@media (max-width: 960px) {
    .auth-stage { display: block; padding: 0; }
    .auth-shell { grid-template-columns: 1fr; width: 100%; min-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
    .auth-hero { min-height: 250px; padding: 28px clamp(22px, 7vw, 58px); }
    .auth-hero__content { padding: 44px 0 28px; }
    .auth-hero__title { max-width: 650px; font-size: clamp(2rem, 7vw, 3.15rem); }
    .auth-hero__text { margin-top: 14px; }
    .auth-benefits { display: none; }
    .auth-hero--features { min-height: auto; }
    .auth-hero--features .auth-hero__content { margin: 0; padding: 18px 0; }
    .auth-hero--features .auth-benefits {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(4, auto);
        column-gap: clamp(12px, 4vw, 28px);
        row-gap: 10px;
    }
    .auth-hero--features .auth-benefits li { min-width: 0; align-items: flex-start; font-size: .9rem; }
    .auth-hero--features .auth-benefits span { flex: 0 0 24px; }
    .auth-hero__footer { display: none; }
    .auth-content { padding: clamp(38px, 8vw, 68px) clamp(22px, 9vw, 78px); }
}

@media (max-width: 640px) {
    .auth-hero { min-height: 218px; }
    .auth-hero__content { padding: 34px 0 16px; }
    .auth-hero__title { font-size: clamp(1.85rem, 9vw, 2.55rem); }
    .auth-hero__text { font-size: .92rem; }
    .auth-content { align-items: start; padding: 38px 22px 48px; }
    .auth-heading { margin-bottom: 24px; }
    .auth-heading h1 { font-size: 1.9rem; }
    .auth-field__row { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 960px) {
    /* Auth entry prioritizes the form; onboarding and desktop keep their existing hero. */
    .auth-entry .auth-shell { display: block; }
    .auth-entry .auth-hero { display: none; }
    .auth-entry .auth-content { display: block; padding: 24px 22px 32px; }
    .auth-entry .auth-content__inner { margin: 0 auto; }
    .auth-entry .auth-heading { margin-bottom: 20px; }
    .auth-entry .auth-field__row > a { display: inline-flex; min-height: 44px; align-items: center; }
    .auth-entry .auth-check { min-height: 44px; align-items: center; }
    .auth-entry .auth-check label { display: flex; min-height: 44px; align-items: center; }
}

@media (max-width: 360px) {
    .auth-hero { padding-right: 18px; padding-left: 18px; }
    .auth-content { padding-right: 18px; padding-left: 18px; }
    .auth-google { padding-right: 12px; padding-left: 12px; font-size: .91rem; }
    .auth-hero--features .auth-benefits { column-gap: 10px; }
    .auth-hero--features .auth-benefits li { gap: 7px; font-size: .82rem; }
    .auth-hero--features .auth-benefits span { width: 22px; height: 22px; flex-basis: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
