:root {
    --auth-ink: #10243f;
    --auth-ink-soft: #334c68;
    --auth-muted: #66788d;
    --auth-paper: #ffffff;
    --auth-paper-blue: #f5f9ff;
    --auth-line: rgba(30, 61, 96, 0.13);
    --auth-blue: #667eea;
    --auth-violet: #764ba2;
    --auth-pink: #f093fb;
    --auth-sky: #4facfe;
    --auth-cyan: #00f2fe;
    --auth-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    --auth-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.09), rgba(118, 75, 162, 0.06) 25%, rgba(240, 147, 251, 0.07) 50%, rgba(79, 172, 254, 0.08) 75%, rgba(0, 242, 254, 0.07));
    --auth-shadow-sm: 0 14px 38px rgba(31, 63, 105, 0.08);
    --auth-shadow-md: 0 28px 80px rgba(31, 63, 105, 0.14);
    --auth-page: min(1280px, calc(100vw - 48px));
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body.auth-page {
    position: relative;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-ink);
    /* index.html positions these at 4% / 11% of a ~6900px-tall page (≈274px /
       754px). Auth pages are short, so percentages would pull both glows up
       behind the nav bar — pin them at index's rendered offsets instead. */
    background:
        radial-gradient(circle at 8% 274px, rgba(138, 216, 255, 0.3), transparent 25rem),
        radial-gradient(circle at 92% 754px, rgba(229, 126, 201, 0.16), transparent 26rem),
        linear-gradient(180deg, #fbfdff 0%, #f7fbff 44%, #ffffff 100%);
    font-family: "Noto Sans KR", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.auth-page::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
    opacity: 0.42;
    background-image:
        linear-gradient(rgba(73, 105, 141, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(73, 105, 141, 0.055) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

body.auth-page::after {
    position: fixed;
    top: 18%;
    left: 44%;
    z-index: -1;
    width: min(760px, 70vw);
    height: min(760px, 70vw);
    pointer-events: none;
    border-radius: 50%;
    content: "";
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent 67%);
    filter: blur(24px);
}

body.auth-page h1,
body.auth-page h2,
body.auth-page h3,
body.auth-page p {
    margin-top: 0;
}

body.auth-page h1,
body.auth-page h2,
body.auth-page h3 {
    color: var(--auth-ink);
    font-family: "DM Sans", "Noto Sans KR", sans-serif;
}

body.auth-page p {
    color: var(--auth-muted);
}

/* Plain selector like index.html's, so .button-primary's white wins. */
.auth-page a {
    text-decoration: none;
}

a {
    color: inherit;
}

body.auth-page button,
body.auth-page input {
    font: inherit;
}

body.auth-page button,
body.auth-page a {
    -webkit-tap-highlight-color: transparent;
}

/* Deliberately low-specificity (like index.html's own .container rule) so
   .nav-shell's padding, declared later, wins on the header element. */
.auth-page .container {
    width: var(--auth-page);
    max-width: none;
    margin-inline: auto;
}

.container {
    padding-inline: 0;
}

.auth-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 300;
    padding: 10px 16px;
    color: #fff;
    border-radius: 10px;
    background: var(--auth-ink);
    transform: translateY(-180%);
}

.auth-skip-link:focus {
    transform: translateY(0);
}

/* Landing-page nav, copied verbatim from index.html's inline styles so the
   auth pages can use the exact same header markup and class names. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
    transition: padding 180ms ease;
}

.site-header.is-scrolled {
    padding-block: 8px;
}

.nav-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 8px 10px 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    background:
        linear-gradient(115deg,
            rgba(102, 126, 234, 0.075) 0%,
            rgba(118, 75, 162, 0.045) 25%,
            rgba(240, 147, 251, 0.045) 50%,
            rgba(79, 172, 254, 0.06) 75%,
            rgba(0, 242, 254, 0.05) 100%),
        rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 42px rgba(31, 63, 105, 0.08);
    backdrop-filter: blur(22px) saturate(145%);
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 11px;
    color: var(--auth-ink);
    font-family: "DM Sans", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand img {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 8px 14px rgba(40, 166, 198, 0.23));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--auth-ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--auth-ink);
    background: rgba(85, 119, 246, 0.07);
}

@media (min-width: 861px) {
    .nav-links .mobile-only {
        display: none;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-login {
    padding: 10px 14px;
    color: var(--auth-ink-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    color: inherit;
    font-weight: 800;
    line-height: 1;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button:focus-visible,
.mobile-toggle:focus-visible {
    outline: 3px solid rgba(85, 119, 246, 0.25);
    outline-offset: 3px;
}

.button-primary {
    color: #fff;
    background: var(--auth-gradient);
    background-size: 180% 180%;
    box-shadow: 0 14px 30px rgba(91, 104, 226, 0.26);
    animation: gradient-drift 8s ease infinite;
}

.button-primary:hover {
    box-shadow: 0 18px 36px rgba(91, 104, 226, 0.34);
}

.button-small {
    min-height: 44px;
    padding-inline: 18px;
    border-radius: 14px;
    font-size: 0.88rem;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    color: var(--auth-ink);
    background: rgba(85, 119, 246, 0.08);
    cursor: pointer;
}

@keyframes gradient-drift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.auth-main {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 92px);
    padding: 48px 0 72px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(430px, 0.76fr);
    gap: clamp(52px, 7vw, 100px);
    align-items: start;
}

.auth-story {
    position: relative;
    padding: 30px 0;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #5266c8;
    font-family: "DM Sans", "Noto Sans KR", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-kicker::before {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    content: "";
    background: var(--auth-gradient);
}

.auth-story h1 {
    max-width: 720px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 4.5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.065em;
    line-height: 1.06;
    word-break: keep-all;
}

.auth-story h1 .gradient-text {
    display: block;
    padding-right: 0.06em;
    color: transparent;
    background: var(--auth-gradient);
    background-size: 180% 180%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: auth-gradient-drift 8s ease infinite;
}

.auth-story-lede {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--auth-ink-soft) !important;
    font-size: 1rem;
    line-height: 1.82;
    word-break: keep-all;
}

.auth-process-card {
    position: relative;
    margin-top: 34px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 5%, rgba(240, 147, 251, 0.16), transparent 32%),
        radial-gradient(circle at 7% 90%, rgba(0, 242, 254, 0.13), transparent 32%),
        rgba(255, 255, 255, 0.72);
    box-shadow: var(--auth-shadow-md);
    backdrop-filter: blur(18px);
}

.auth-process-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-process-label {
    color: #5367cb;
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.auth-process-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #289d82;
    font-size: 0.66rem;
    font-weight: 800;
}

.auth-process-live::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    content: "";
    background: #2ccda4;
    box-shadow: 0 0 0 5px rgba(44, 205, 164, 0.11);
    animation: auth-pulse 1.8s ease infinite;
}

.auth-phase-rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 27px 0 25px;
}

.auth-phase-rail::before {
    position: absolute;
    top: 16px;
    right: 7%;
    left: 7%;
    z-index: 0;
    height: 2px;
    content: "";
    background: #dde6f1;
}

.auth-phase {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-phase b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 7px;
    color: #718196;
    border: 4px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    background: #e5ebf3;
    box-shadow: 0 0 0 1px rgba(42, 75, 112, 0.08);
    font-family: "DM Sans", sans-serif;
    font-size: 0.62rem;
}

.auth-phase span {
    color: #7a8a9d;
    font-size: 0.55rem;
    font-weight: 700;
    white-space: nowrap;
}

.auth-phase.is-complete b {
    color: #fff;
    background: #43b89a;
}

.auth-phase.is-current b {
    color: #fff;
    background: var(--auth-gradient);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
    animation: auth-node-breathe 2.8s ease infinite;
}

.auth-phase.is-current span {
    color: var(--auth-ink);
}

.auth-project-snapshot {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid rgba(42, 75, 112, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.auth-snapshot-icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    color: #fff;
    border-radius: 12px;
    background: var(--auth-gradient);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.auth-snapshot-copy small {
    display: block;
    color: var(--auth-muted);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.auth-snapshot-copy strong {
    display: block;
    margin-top: 3px;
    color: var(--auth-ink-soft);
    font-size: 0.77rem;
}

.auth-snapshot-progress {
    min-width: 70px;
    color: #5266c8;
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: right;
}

.auth-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 16px;
}

.auth-proof {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 45px;
    padding: 9px 10px;
    color: #536a82;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.4;
}

.auth-proof i {
    color: #2faf91;
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--auth-shadow-md);
    backdrop-filter: blur(22px) saturate(135%);
}

.auth-switch {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-bottom: 30px;
    padding: 5px;
    border: 1px solid rgba(42, 75, 112, 0.09);
    border-radius: 14px;
    background: #f3f7fc;
}

.auth-switch a,
.auth-switch span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 0 12px;
    color: #718196;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-switch .is-active {
    color: var(--auth-ink);
    background: #fff;
    box-shadow: 0 6px 18px rgba(31, 63, 105, 0.08);
}

.auth-card-kicker {
    margin-bottom: 8px;
    color: #5f70cc;
    font-family: "DM Sans", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-card-header {
    margin-bottom: 25px;
}

.auth-card-header h2 {
    margin-bottom: 9px;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

.auth-card-header p {
    margin-bottom: 0;
    color: var(--auth-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 22px rgba(31, 63, 105, 0.05);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.google-btn:hover:not(:disabled) {
    border-color: rgba(102, 126, 234, 0.28);
    box-shadow: 0 12px 28px rgba(31, 63, 105, 0.09);
    transform: translateY(-2px);
}

.google-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.auth-divider {
    position: relative;
    margin: 23px 0;
    text-align: center;
}

.auth-divider::before {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    content: "";
    background: var(--auth-line);
}

.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 12px;
    color: #7b8b9d;
    background: rgba(255, 255, 255, 0.96);
    font-size: 0.69rem;
    font-weight: 700;
}

.auth-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 12px;
    color: #9a3232;
    border: 1px solid rgba(197, 48, 48, 0.16);
    border-radius: 12px;
    background: rgba(255, 229, 229, 0.7);
    font-size: 0.75rem;
    line-height: 1.55;
}

.auth-message.is-success {
    color: #23785d;
    border-color: rgba(35, 120, 93, 0.16);
    background: rgba(216, 248, 235, 0.75);
}

.auth-message[hidden] {
    display: none;
}

.auth-form .form-group {
    margin-bottom: 17px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-form-grid .form-group {
    min-width: 0;
}

.auth-page .form-label {
    display: block;
    margin-bottom: 8px;
    color: #405873;
    font-size: 0.77rem;
    font-weight: 800;
}

.auth-page .form-label.required::after {
    color: #d96e83;
}

.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid rgba(42, 75, 112, 0.14);
    border-radius: 14px;
    background: rgba(247, 250, 254, 0.9);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-input-shell:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.09);
}

.auth-input-shell > i {
    width: 42px;
    flex: 0 0 42px;
    color: #8291a3;
    text-align: center;
    font-size: 0.78rem;
}

.auth-page .form-input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 13px 0 0;
    color: var(--auth-ink);
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    font-size: 0.86rem;
}

.auth-page .form-input:focus {
    border: 0;
    outline: none;
    box-shadow: none;
}

.auth-page .form-input::placeholder {
    color: #9aa7b5;
}

.password-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin-right: 3px;
    color: #7c8d9f;
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: #5266c8;
    background: rgba(102, 126, 234, 0.07);
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: -2px 0 8px;
}

.forgot-password a {
    color: #5266c8;
    font-size: 0.73rem;
    font-weight: 800;
}

.forgot-password a:hover {
    color: #764ba2;
}

.password-requirements {
    margin-top: 8px;
}

.password-rule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8290a1;
    font-size: 0.66rem;
    font-weight: 700;
}

.password-rule i {
    color: #aab5c1;
}

.password-rule.is-valid {
    color: #277b64;
}

.password-rule.is-valid i {
    color: #2eb397;
}

.auth-page .form-error {
    display: block;
    margin-top: 7px;
    color: #bc4a54;
    font-size: 0.69rem;
    font-weight: 700;
}

.auth-page .form-error[hidden] {
    display: none;
}

.auth-page .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 0.72rem;
    line-height: 1.6;
}

.auth-page .form-checkbox input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 2px;
    accent-color: #667eea;
}

.auth-page .form-checkbox label {
    margin: 0;
}

.auth-page .form-checkbox a {
    color: #5266c8;
    font-weight: 800;
}

.auth-page .form-checkbox .legal-text {
    color: #5266c8;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.btn-primary-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    margin-top: 5px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 15px;
    background: var(--auth-gradient);
    background-size: 180% 180%;
    box-shadow: 0 14px 30px rgba(91, 104, 226, 0.25);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    animation: auth-gradient-drift 8s ease infinite;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.signin-page .btn-primary-auth .button-label,
.signup-page .btn-primary-auth .button-label {
    font-weight: 900;
}

.btn-primary-auth:hover:not(:disabled) {
    box-shadow: 0 18px 36px rgba(91, 104, 226, 0.33);
    transform: translateY(-2px);
}

.btn-primary-auth:disabled,
.google-btn:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    color: #8492a2;
    font-size: 0.65rem;
}

.auth-security i {
    color: #38a98e;
}

.auth-card-footer {
    margin-top: 23px;
    padding-top: 21px;
    color: var(--auth-muted);
    border-top: 1px solid var(--auth-line);
    text-align: center;
    font-size: 0.76rem;
}

.auth-card-footer a {
    color: #5266c8;
    font-weight: 900;
}

.auth-card-footer a:hover {
    color: #764ba2;
}

.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: #7c8c9e !important;
    font-size: 0.7rem;
    font-weight: 700;
}

.auth-home-link:hover {
    color: var(--auth-ink) !important;
}

.auth-page-footer {
    padding: 0 0 34px;
}

.auth-page-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    color: #8492a1;
    border-top: 1px solid var(--auth-line);
    font-size: 0.66rem;
}

.auth-page-footer strong {
    color: #66788d;
    font-family: "DM Sans", sans-serif;
    letter-spacing: 0.08em;
}

.auth-page :focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.25);
    outline-offset: 3px;
}

@keyframes auth-gradient-drift {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes auth-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(44, 205, 164, 0.11);
    }

    50% {
        box-shadow: 0 0 0 9px rgba(44, 205, 164, 0.02);
    }
}

@keyframes auth-node-breathe {
    0%,
    100% {
        box-shadow: 0 7px 18px rgba(102, 126, 234, 0.23);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 10px 26px rgba(102, 126, 234, 0.34);
        transform: scale(1.06);
    }
}

/* Mirrors index.html's laptop-width gutter rule; also overrides the nav
   shell's own inline padding there, exactly like the landing page. */
@media (min-width: 861px) and (max-width: 1512px) {
    .container {
        padding-inline: clamp(16px, 1.5vw, 22px);
    }
}

@media (max-width: 1080px) {
    :root {
        --auth-page: min(100% - 36px, 980px);
    }

    .auth-layout,
    .signup-page .auth-layout {
        grid-template-columns: minmax(0, 0.9fr) minmax(430px, 0.82fr);
        gap: 38px;
    }

    .auth-story h1 {
        font-size: clamp(2.6rem, 4.8vw, 3.85rem);
    }

    .nav-links {
        gap: 0;
    }

    .nav-links a {
        padding-inline: 10px;
    }
}

@media (max-width: 860px) {
    .site-header {
        padding-top: 8px;
    }

    .nav-shell {
        min-height: 58px;
        padding-left: 14px;
        border-radius: 18px;
    }

    .mobile-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .nav-actions .nav-login,
    .nav-actions .button {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: none;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--auth-line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--auth-shadow-md);
        backdrop-filter: blur(18px);
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-links a {
        padding: 13px 14px;
    }

    .nav-links .mobile-only {
        display: flex;
    }

    .auth-main {
        align-items: flex-start;
        padding-top: 34px;
    }

    .auth-layout,
    .signup-page .auth-layout {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .auth-card {
        order: 1;
        width: min(100%, 580px);
        margin-inline: auto;
    }

    .auth-story,
    .signup-page .auth-story {
        position: static;
        top: auto;
        order: 2;
        width: min(100%, 680px);
        margin-inline: auto;
        padding-top: 0;
    }

    .auth-story h1 {
        font-size: clamp(2.4rem, 7.7vw, 3.55rem);
    }
}

@media (max-width: 620px) {
    :root {
        --auth-page: calc(100% - 28px);
    }

    .brand {
        font-size: 0.98rem;
    }

    .auth-main {
        min-height: auto;
        padding: 26px 0 58px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 25px;
    }

    .auth-switch {
        margin-bottom: 24px;
    }

    .auth-card-header h2 {
        font-size: 1.85rem;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-story h1 {
        font-size: clamp(2.25rem, 11vw, 3.05rem);
    }

    .auth-story-lede {
        font-size: 0.92rem;
    }

    .auth-process-card {
        padding: 19px;
        border-radius: 23px;
    }

    .auth-phase span {
        display: none;
    }

    .auth-phase-rail {
        margin-bottom: 19px;
    }

    .auth-project-snapshot {
        grid-template-columns: auto 1fr;
    }

    .auth-snapshot-progress {
        grid-column: 2;
        text-align: left;
    }

    .auth-proof-grid {
        grid-template-columns: 1fr;
    }

    .auth-proof {
        min-height: 40px;
    }

    .auth-page-footer .container {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
