:root {
    color-scheme: light;
    --frame: #303033;
    --ink: #202027;
    --muted: #777385;
    --paper: #fbfaff;
    --lavender: #d9c8f3;
    --violet: #7646a4;
    --blue: #506ad1;
    --red: #d3414b;
    --grid: rgba(75, 57, 105, .12);
    --mono: "IBM Plex Mono", monospace;
    --sans: "Cairo", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--frame); }
body {
    min-height: 100dvh;
    margin: 0;
    padding: clamp(20px, 4.65vw, 64px) clamp(16px, 4.8vw, 72px) 34px;
    background: var(--frame);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.auth-shell { width: min(100%, 1440px); margin: 0 auto; }
.auth-stage {
    position: relative;
    min-height: clamp(530px, 43vw, 660px);
    overflow: hidden;
    isolation: isolate;
    background: #030304;
    border: 1px solid rgba(181, 171, 204, .08);
    box-shadow: 0 24px 65px rgba(0, 0, 0, .26);
}
.scene-art {
    position: absolute;
    inset: 0 0 15px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 14% 43%, rgba(83, 75, 89, .22), transparent 40%),
        linear-gradient(90deg, #060608 0%, #050506 53%, #08080a 100%);
}
.scene-art::before {
    position: absolute;
    inset: 0 34% 0 0;
    content: "";
    opacity: .48;
    background:
        repeating-linear-gradient(0deg, transparent 0 4px, rgba(228, 220, 241, .08) 4px 5px),
        repeating-linear-gradient(90deg, transparent 0 29px, rgba(203, 194, 215, .04) 29px 30px);
    mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
}
.scene-art::after {
    position: absolute;
    left: -4%;
    bottom: 8%;
    width: 60%;
    height: 30%;
    content: "";
    background: radial-gradient(ellipse at 24% 100%, rgba(174, 25, 39, .24), transparent 65%);
}
.code-field {
    position: absolute;
    top: 7%;
    left: 3%;
    width: 52%;
    overflow: hidden;
    color: #aaa6b0;
    font: 500 clamp(8px, .82vw, 12px)/1.83 var(--mono);
    letter-spacing: .07em;
    opacity: .2;
    transform: perspective(420px) rotateY(8deg);
    mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}
.code-field div:nth-child(2n) { color: #c7c0d0; transform: translateX(18px); }
.code-field div:nth-child(3n) { color: #b3424c; }
.scene-grid {
    position: absolute;
    left: 2%;
    bottom: 5%;
    width: 54%;
    height: 26%;
    background:
        radial-gradient(circle, rgba(210, 39, 52, .36) 1px, transparent 1.5px) 0 0 / 8px 8px,
        linear-gradient(180deg, transparent, rgba(186, 26, 41, .08));
    opacity: .42;
    mask-image: linear-gradient(90deg, #000, transparent 94%);
}
.trace-line { position: absolute; inset: 0 auto 0 2%; width: 66%; height: 100%; overflow: visible; }
.trace-glow, .trace-core, .trace-dim { fill: none; vector-effect: non-scaling-stroke; }
.trace-glow { stroke: rgba(222, 44, 58, .25); stroke-width: 11; }
.trace-core { stroke: var(--red); stroke-width: 2.1; }
.trace-dim { stroke: rgba(211, 65, 75, .32); stroke-width: 1; stroke-dasharray: 4 7; }
.scene-caption, .scene-coordinate {
    position: absolute;
    z-index: 1;
    color: rgba(205, 198, 214, .48);
    font: 9px var(--mono);
    letter-spacing: .16em;
}
.scene-caption { left: 3.4%; bottom: 5.4%; display: flex; gap: 25px; }
.scene-coordinate { left: 3.4%; top: 5%; letter-spacing: .05em; opacity: .5; }

.auth-composition {
    position: relative;
    z-index: 2;
    margin: 64px 7.5% 96px auto;
    width: min(40%, 510px);
    min-width: 420px;
}
.auth-paper {
    position: relative;
    z-index: 2;
    min-height: 452px;
    padding: 27px 37px 20px;
    overflow: hidden;
    border: 1px solid rgba(100, 79, 133, .17);
    background: var(--paper);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .32), 0 2px 0 rgba(255, 255, 255, .85) inset;
}
.paper-grid {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .65;
    pointer-events: none;
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 14px 14px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.45), transparent 68%);
}
.paper-header { display: flex; justify-content: space-between; align-items: center; direction: ltr; }
.act-lockup { display: flex; align-items: center; gap: 8px; }
.act-symbol { display: inline-flex; align-items: end; gap: 2px; height: 23px; padding: 4px 5px; background: var(--violet); }
.act-symbol i { display: block; width: 3px; background: #f4edff; transform: skew(-20deg); }
.act-symbol i:nth-child(1) { height: 8px; }
.act-symbol i:nth-child(2) { height: 14px; }
.act-symbol i:nth-child(3) { height: 10px; }
.act-wordmark { color: #322342; font: 600 19px/1 var(--mono); letter-spacing: -.07em; }
.act-wordmark small { display: block; margin-top: 4px; color: #877a91; font: 500 7px var(--mono); letter-spacing: .08em; }
.portal-tag { color: #8a8095; font-size: 10px; }
.portal-tag b { margin-left: 4px; color: var(--violet); font: 500 9px var(--mono); }
.auth-intro { margin: 23px 0 17px; }
.eyebrow { color: var(--violet); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.auth-intro h1 { margin: 3px 0 1px; color: #24212b; font-size: clamp(23px, 2.1vw, 29px); font-weight: 700; line-height: 1.45; }
.auth-intro p { margin: 0; color: #777284; font-size: 12px; }

#clerk-auth { min-height: 160px; width: 100%; max-width: none; }
.loading-state {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #777284;
    font-size: 12px;
}
.loading-lines { display: grid; width: 100%; gap: 9px; }
.loading-lines i {
    display: block;
    height: 13px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(111, 81, 149, .08), rgba(111, 81, 149, .18), rgba(111, 81, 149, .08));
    background-size: 200% 100%;
    animation: loading-sheen 1.8s ease-in-out infinite;
}
.loading-lines i:nth-child(2) { width: 72%; }
.loading-lines i:nth-child(3) { height: 34px; margin-top: 5px; background: rgba(92, 69, 133, .13); }
@keyframes loading-sheen { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.field { margin: 0 0 13px; }
.field label { display: block; margin-bottom: 5px; color: #484352; font-size: 11px; font-weight: 700; }
.field input {
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid #d7d2df;
    border-radius: 2px;
    outline: 0;
    background: rgba(255,255,255,.88);
    color: #26212d;
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus { border-color: #71519b; box-shadow: 0 0 0 3px rgba(113,81,155,.13); }
.password-field { position: relative; }
.password-field input { padding-left: 48px; }
.password-toggle {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 7px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #625b70;
    cursor: pointer;
}
.password-toggle:hover { background: #ece8f1; color: #484352; }
.password-toggle:focus-visible { outline: 2px solid #71519b; outline-offset: 1px; }
.password-toggle svg { display: block; width: 100%; height: 100%; }
.password-toggle [hidden] { display: none; }
.submit-button {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    justify-content: space-between;
    padding: 9px 15px;
    border: 1px solid #553479;
    border-radius: 2px;
    background: #604088;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease;
}
.submit-button:hover { background: #4f326f; }
.submit-button:active { transform: translateY(1px); }
.submit-button:focus-visible, .mode-switches button:focus-visible, .change-account:focus-visible, .home-link:focus-visible { outline: 3px solid #a28bc5; outline-offset: 3px; }
.button-arrow { font: 16px var(--mono); }
.notice {
    margin: 0 0 12px;
    padding: 9px 11px;
    border-right: 3px solid #b53945;
    background: #fff0f0;
    color: #76252d;
    font-size: 11px;
    line-height: 1.7;
}
.notice:empty { display: none; }
.mode-switches { min-height: 30px; margin-top: 10px; text-align: center; }
.mode-switches button, .change-account {
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #62417f;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.signed-in-state { padding: 12px 0 2px; }
.signed-in-state p { margin: 0 0 10px; color: #4c4555; font-size: 12px; }
.change-account { display: block; margin: 9px auto 0; color: #746c7d; }
.dashboard-link { margin-top: 10px; }
.paper-footnote {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(101, 78, 126, .16);
    color: #90899a;
    font-size: 9px;
}
.footnote-rule { width: 14px; height: 2px; background: var(--violet); }
.footnote-id { margin-right: auto; color: #aaa3b3; font: 8px var(--mono); letter-spacing: .08em; }
.paper-backdrop {
    position: absolute;
    z-index: 1;
    top: -24px;
    height: 76px;
    border: 1px solid rgba(126, 98, 163, .18);
    background-color: #e8dff4;
    background-image: linear-gradient(rgba(97, 72, 126, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(97, 72, 126, .14) 1px, transparent 1px);
    background-size: 11px 11px;
}
.paper-backdrop--left { right: 7%; width: 85%; }
.paper-backdrop--right { top: 19px; right: -8%; width: 17%; height: 112px; }
.paper-mark { position: absolute; top: 9px; left: 12px; color: #61437c; font: 600 9px var(--mono); }
.chart-bar { position: absolute; bottom: 10px; width: 9px; background: rgba(67, 116, 171, .55); }
.bar-a { left: 49%; height: 18px; }.bar-b { left: 52%; height: 30px; }.bar-c { left: 55%; height: 23px; }.bar-d { left: 58%; height: 38px; background: rgba(131, 75, 160, .5); }
.stage-steps { position: absolute; z-index: 1; right: 3%; bottom: -64px; width: 75%; height: 86px; direction: ltr; }
.stage-steps span { position: absolute; right: 0; bottom: 0; width: 100%; height: 14px; border: 1px solid rgba(161, 154, 193, .62); background: linear-gradient(180deg, #6674b4 0 3px, #1c1c24 3px 100%); box-shadow: 0 0 0 4px #08080a; }
.stage-steps span:nth-child(2) { right: 9%; bottom: 18px; width: 82%; }
.stage-steps span:nth-child(3) { right: 18%; bottom: 36px; width: 64%; }
.stage-edge { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; height: 16px; background: #09090b; border-top: 2px solid #506ad1; }
.stage-edge span { position: absolute; inset: 4px 0 auto; height: 1px; background: #8e65ae; }
.stage-edge span + span { inset-block-start: 8px; background: rgba(207, 62, 77, .62); }

.act-info {
    display: grid;
    grid-template-columns: minmax(130px, 210px) minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 133px;
    margin-top: 39px;
    padding: 23px clamp(22px, 3.8vw, 52px);
    background: #050506;
    color: #ddd9e2;
}
.info-heading { display: flex; align-items: center; gap: 12px; }
.info-kicker { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid #76509d; color: #d9c5f1; font: 600 11px var(--mono); }
.info-heading h2 { margin: 0; color: #e9e4ed; font-size: 16px; font-weight: 600; }
.act-info p { max-width: 670px; margin: 0; color: #aaa5b0; font-size: 12px; line-height: 1.95; }
.home-link { display: flex; align-items: center; gap: 12px; color: #d3c5e4; font-size: 11px; text-decoration: none; white-space: nowrap; }
.home-link span:last-child { color: #a27bc2; font: 15px var(--mono); }
.home-link:hover { color: #fff; }

/* Clerk's hosted-free, in-page widget inherits the illustrated paper surface. */
#clerk-auth .cl-rootBox { width: 100%; }
#clerk-auth .cl-card, #clerk-auth .cl-cardBox { width: 100%; max-width: 100%; box-shadow: none; }
#clerk-auth .cl-card { padding: 0; border: 0; border-radius: 0; background: transparent; }
#clerk-auth .cl-headerTitle { color: #24212b; font-family: var(--sans); }
#clerk-auth .cl-headerSubtitle, #clerk-auth .cl-formFieldHintText { color: #777284; font-family: var(--sans); }
#clerk-auth .cl-formFieldLabel { color: #484352; font-family: var(--sans); font-size: 12px; }
#clerk-auth .cl-formFieldInput { min-height: 42px; border-color: #d7d2df; border-radius: 2px; background: #fff; color: #26212d; font-family: var(--sans); }
#clerk-auth .cl-formButtonPrimary { min-height: 43px; border-radius: 2px; background: #604088; font-family: var(--sans); }
#clerk-auth .cl-socialButtonsBlockButton { border-color: #d7d2df; border-radius: 2px; background: rgba(255,255,255,.8); }
#clerk-auth .cl-socialButtonsBlockButtonText, #clerk-auth .cl-footerActionText { color: #484352; font-family: var(--sans); }
#clerk-auth .cl-footerActionLink { color: #604088; font-family: var(--sans); }
#clerk-auth .cl-dividerText { color: #777284; font-family: var(--sans); }

@media (min-width: 1500px) {
    .auth-stage { min-height: 650px; }
    .auth-paper { padding: 32px 42px 24px; }
    .auth-intro { margin-top: 29px; }
}
@media (max-width: 850px) {
    body { padding: 22px 20px 25px; }
    .auth-stage { min-height: 760px; }
    .scene-art { inset-bottom: 15px; }
    .auth-composition { margin: 64px auto 96px; width: min(84%, 500px); min-width: 0; }
    .scene-caption { bottom: 2.5%; }
    .scene-coordinate { top: 2.5%; }
    .stage-steps { width: 74%; }
    .act-info { grid-template-columns: 1fr auto; gap: 15px 20px; margin-top: 24px; }
    .act-info p { grid-column: 1 / -1; grid-row: 2; }
    .home-link { justify-self: end; }
}
@media (max-width: 520px) {
    body { padding: 12px 10px 18px; }
    .auth-stage { min-height: 720px; }
    .auth-composition { width: calc(100% - 30px); }
    .auth-paper { min-height: 0; padding: 22px 19px 17px; }
    .auth-intro { margin: 20px 0 13px; }
    .auth-intro h1 { font-size: 25px; }
    .auth-intro p { font-size: 11px; }
    .portal-tag { font-size: 9px; }
    #clerk-auth { min-height: 164px; }
    .paper-backdrop { top: -18px; height: 56px; }
    .paper-backdrop--right { top: 20px; }
    .stage-steps { right: 0; width: 90%; }
    .scene-art::before { right: 0; }
    .code-field { width: 83%; font-size: 9px; }
    .scene-grid { width: 82%; }
    .trace-line { width: 89%; }
    .scene-caption { left: 4%; flex-direction: column; gap: 5px; font-size: 7px; }
    .scene-coordinate { left: 4%; font-size: 7px; }
    .act-info { grid-template-columns: 1fr; gap: 11px; margin-top: 18px; padding: 20px 18px; }
    .info-heading { grid-row: 1; }
    .act-info p { grid-column: 1; grid-row: 2; font-size: 11px; }
    .home-link { justify-self: start; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
