/* PolyTOE — лендинг и auth-панель (hero + вход/регистрация). Перенос из прототипа. */
.registration-shell {
    position: relative;
    z-index: 2;
    width: min(1360px, calc(100% - 28px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 12px 0;
    display: grid;
    align-items: center;
}

.registration-page {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.52fr);
    gap: 14px;
    align-items: stretch;
}

.registration-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(470px, 0.98fr) minmax(380px, 1.02fr);
    grid-template-rows: auto auto 1fr;
    gap: 18px 30px;
    align-items: start;
    isolation: isolate;
    background:
        radial-gradient(circle at 14% 18%, rgba(85, 200, 255, 0.18), transparent 34%),
        radial-gradient(circle at 58% 48%, rgba(134, 240, 191, 0.13), transparent 30%),
        radial-gradient(circle at 82% 74%, rgba(85, 200, 255, 0.1), transparent 28%),
        linear-gradient(160deg, rgba(8, 29, 38, 0.97), rgba(5, 14, 20, 0.99));
}

.registration-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%, transparent 72%, rgba(255, 255, 255, 0.02)),
        linear-gradient(rgba(177, 223, 241, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(177, 223, 241, 0.01) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
    pointer-events: none;
}

.registration-hero .hero-kicker {
    grid-column: 1 / -1;
}

.hero-copy {
    display: grid;
    gap: 14px;
    position: relative;
    z-index: 1;
    align-self: start;
    max-width: 580px;
}

.hero-copy h1 {
    margin: 0;
    font-family: Bahnschrift, "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: clamp(2.95rem, 3.85vw, 4.25rem);
    line-height: 0.95;
    max-width: 580px;
    text-wrap: nowrap;
}

.hero-copy h1 span {
    white-space: nowrap;
}

.hero-subtitle {
    margin: 0;
    max-width: 430px;
    color: var(--muted);
    font-size: clamp(1rem, 1.3vw, 1.22rem);
    line-height: 1.45;
}

.hero-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 17px;
    position: relative;
    z-index: 1;
    align-self: start;
    grid-column: 1 / 2;
    max-width: 470px;
}

.hero-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    align-items: center;
}

.hero-step-num {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    border: 1px solid rgba(92, 207, 244, 0.82);
    background: rgba(6, 23, 32, 0.42);
    color: #67d8ff;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 22px rgba(85, 200, 255, 0.22), inset 0 0 12px rgba(85, 200, 255, 0.08);
}

.hero-step:nth-child(2) .hero-step-num {
    border-color: rgba(255, 211, 109, 0.82);
    background: rgba(35, 26, 11, 0.36);
    color: #ffd36d;
    box-shadow: 0 0 22px rgba(255, 196, 82, 0.2), inset 0 0 12px rgba(255, 196, 82, 0.07);
}

.hero-step:nth-child(3) .hero-step-num {
    border-color: rgba(255, 139, 104, 0.82);
    background: rgba(38, 15, 18, 0.34);
    color: #ff8b68;
    box-shadow: 0 0 22px rgba(255, 115, 111, 0.18), inset 0 0 12px rgba(255, 115, 111, 0.07);
}

.hero-step:nth-child(4) .hero-step-num {
    border-color: rgba(112, 239, 194, 0.82);
    background: rgba(10, 35, 30, 0.34);
    color: #70efc2;
    box-shadow: 0 0 22px rgba(104, 238, 199, 0.18), inset 0 0 12px rgba(104, 238, 199, 0.07);
}

.hero-step strong {
    display: block;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.hero-step span:not(.hero-step-num) {
    display: block;
    color: var(--muted);
    font-size: 0.81rem;
    line-height: 1.35;
}

.hero-showcase {
    position: relative;
    z-index: 1;
    grid-column: 2 / 3;
    grid-row: 2 / 4;
    min-height: 500px;
    align-self: stretch;
    margin-left: 2px;
}

.hero-showcase::before {
    content: "";
    position: absolute;
    inset: 10% 5% 10% 2%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(85, 200, 255, 0.12), transparent 58%),
        radial-gradient(circle at 68% 38%, rgba(134, 240, 191, 0.11), transparent 40%);
    filter: blur(14px);
    opacity: 0.72;
}

.hero-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72%;
    aspect-ratio: 1;
    border: 1px dashed rgba(177, 223, 241, 0.14);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-14deg);
    pointer-events: none;
    opacity: 0.56;
}

.hero-orbit-two {
    width: 54%;
    border-color: rgba(134, 240, 191, 0.13);
    transform: translate(-50%, -50%) rotate(22deg);
}

.hero-connector {
    position: absolute;
    z-index: 0;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(101, 219, 255, 0.28), rgba(128, 242, 194, 0.18), transparent);
    box-shadow: 0 0 14px rgba(85, 200, 255, 0.1);
    pointer-events: none;
}

.hero-connector-a {
    top: 31%;
    left: 32%;
    width: 34%;
    transform: rotate(12deg);
}

.hero-connector-b {
    top: 56%;
    left: 24%;
    width: 44%;
    transform: rotate(-28deg);
}

.hero-connector-c {
    top: 70%;
    right: 18%;
    width: 30%;
    transform: rotate(24deg);
}

.hero-glass-card {
    position: absolute;
    display: grid;
    gap: 7px;
    width: min(218px, 44%);
    min-height: 108px;
    padding: 13px;
    border: 1px solid rgba(177, 223, 241, 0.16);
    border-radius: 17px;
    background:
        linear-gradient(180deg, rgba(18, 47, 60, 0.58), rgba(6, 22, 31, 0.54)),
        rgba(255, 255, 255, 0.035);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.26),
        0 0 30px rgba(85, 200, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
}

.hero-card-assignment {
    top: 7%;
    left: 13%;
    transform: rotate(-1.5deg);
}

.hero-card-materials {
    top: 25%;
    right: 2%;
    transform: rotate(1.2deg);
}

.hero-card-work {
    left: 4%;
    bottom: 20%;
    transform: rotate(1deg);
}

.hero-card-result {
    right: 10%;
    bottom: 6%;
    transform: rotate(-1.1deg);
}

.hero-card-kicker {
    color: var(--accent-green);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}

.hero-glass-card strong {
    display: block;
    color: #f2fbff;
    font-size: 0.84rem;
    line-height: 1.25;
}

.hero-glass-card dl,
.hero-glass-card ul {
    margin: 0;
    padding: 0;
}

.hero-glass-card dl div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hero-glass-card dt,
.hero-glass-card small,
.hero-glass-card li {
    color: var(--muted);
    font-size: 0.74rem;
}

.hero-glass-card dd {
    margin: 0;
    color: var(--accent);
    font-size: 1.22rem;
    font-weight: 900;
}

.hero-glass-card ul {
    display: grid;
    gap: 5px;
    list-style: none;
}

.hero-glass-card li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-card-link {
    width: fit-content;
    color: #dffcff;
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(134, 240, 191, 0.5);
    text-underline-offset: 4px;
}

.hero-card-status {
    width: fit-content;
    border: 1px solid rgba(85, 200, 255, 0.22);
    border-radius: 999px;
    padding: 5px 9px;
    color: #dff7ff;
    background: rgba(85, 200, 255, 0.09);
    font-size: 0.7rem;
    font-weight: 800;
}

.hero-card-status.checked {
    border-color: rgba(134, 240, 191, 0.28);
    background: rgba(134, 240, 191, 0.1);
}

.hero-steps {
    display: grid;
    gap: 35px;
    margin-top: 8px;
}

.hero-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    align-items: center;
}

.hero-step:nth-child(2) {
    margin-top: 0;
}

.hero-step:nth-child(3) {
    margin-top: 0;
}

.hero-step:nth-child(4) {
    margin-top: 0;
}

.hero-step strong {
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.hero-step-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 17px;
    border: 2px solid var(--accent);
    color: var(--accent);
    background: rgba(85, 200, 255, 0.05);
}

.hero-step--warm .hero-step-num {
    border-color: var(--accent-warm);
    color: var(--accent-warm);
    background: rgba(255, 200, 87, 0.05);
}

.hero-step--hot .hero-step-num {
    border-color: var(--accent-hot);
    color: var(--accent-hot);
    background: rgba(255, 122, 89, 0.05);
}

.hero-step--green .hero-step-num {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(134, 240, 191, 0.05);
}

.hero-showcase {
    position: relative;
    flex: 0 0 740px;
    width: 740px;
    min-height: 500px;
    margin-left: -20px;
    transform: scale(0.68);
    transform-origin: left top;
}

.hero-showcase::before,
.hero-orbit,
.hero-connector {
    display: none;
}

.orbit-ring {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.orbit-ring--a {
    left: 51%;
    top: 46%;
    width: 104%;
    height: 64%;
    transform: translate(-50%, -50%) rotate(-12deg);
}

.orbit-ring--b {
    left: 50%;
    top: 63%;
    width: 96%;
    height: 74%;
    transform: translate(-50%, -50%) rotate(25deg);
}

.orbit-ring--c {
    left: 49%;
    top: 86%;
    width: 90%;
    height: 58%;
    transform: translate(-50%, -50%) rotate(-24deg);
}

.orbit-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(177, 223, 241, 0.2);
    border-radius: 50%;
}

.orbit-ring--b::before {
    border-color: rgba(134, 240, 191, 0.18);
}

.orbit-ring--c::before {
    border-color: rgba(85, 200, 255, 0.12);
}

.orbit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-dot--accent {
    background: var(--accent);
    box-shadow: 0 0 10px 2px rgba(85, 200, 255, 0.55);
}

.orbit-dot--green {
    background: var(--accent-green);
    box-shadow: 0 0 10px 2px rgba(134, 240, 191, 0.55);
}

/* Decorative dot positions (moved out of inline style attributes for CSP). */
.orbit-ring--a .orbit-dot:nth-child(1) { left: 85%; top: 14%; }
.orbit-ring--a .orbit-dot:nth-child(2) { left: 15%; top: 14%; }
.orbit-ring--a .orbit-dot:nth-child(3) { left: 100%; top: 50%; }
.orbit-ring--a .orbit-dot:nth-child(4) { left: 32%; top: 96%; }
.orbit-ring--b .orbit-dot:nth-child(1) { left: 68%; top: 3%; }
.orbit-ring--b .orbit-dot:nth-child(2) { left: 99%; top: 43%; }
.orbit-ring--b .orbit-dot:nth-child(3) { left: 50%; top: 100%; }
.orbit-ring--b .orbit-dot:nth-child(4) { left: 5%; top: 72%; }
.orbit-ring--c .orbit-dot:nth-child(1) { left: 92%; top: 22%; }
.orbit-ring--c .orbit-dot:nth-child(2) { left: 76%; top: 86%; }
.orbit-ring--c .orbit-dot:nth-child(3) { left: 24%; top: 86%; }
.orbit-ring--c .orbit-dot:nth-child(4) { left: 0%; top: 50%; }

.showcase-card {
    position: absolute;
    display: grid;
    gap: 13px;
    width: 330px;
    padding: 20px 22px;
    border: 1px solid rgba(177, 223, 241, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 45, 52, 0.42), rgba(9, 20, 25, 0.5));
    box-shadow: 26px 30px 46px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    transform-style: preserve-3d;
}

.showcase-card--task {
    top: 4px;
    left: 292px;
    z-index: 1;
    transform: perspective(650px) rotateY(-34deg) rotateX(5deg);
}

.showcase-card--materials {
    top: 224px;
    left: 4px;
    z-index: 2;
    width: 314px;
    background: linear-gradient(180deg, rgba(20, 45, 52, 0.44), rgba(9, 20, 25, 0.52));
    transform: perspective(650px) rotateY(32deg) rotateX(4deg);
}

.showcase-card--work {
    top: 290px;
    left: 352px;
    z-index: 3;
    width: 360px;
    background: linear-gradient(180deg, rgba(20, 45, 52, 0.46), rgba(9, 20, 25, 0.54));
    transform: perspective(650px) rotateY(-30deg) rotateX(4deg);
}

.showcase-card--result {
    top: 500px;
    left: 180px;
    z-index: 4;
    background: linear-gradient(180deg, rgba(20, 45, 52, 0.5), rgba(9, 20, 25, 0.58));
    transform: perspective(650px) rotateY(33deg) rotateX(4deg);
}

.showcase-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.showcase-card-head strong {
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.showcase-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: #dff0f6;
    flex: none;
}

.showcase-icon--green {
    background: rgba(134, 240, 191, 0.12);
    color: var(--accent-green);
}

.showcase-card-meta {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.showcase-card-meta span:last-child {
    white-space: nowrap;
}

.showcase-skeleton {
    display: grid;
    gap: 6px;
}

.showcase-skeleton-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.showcase-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #eaf6fb;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
}

.showcase-pill--end {
    justify-self: end;
}

.showcase-file-list {
    display: grid;
    gap: 8px;
}

.showcase-file-list span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d7e7ee;
    font-size: 0.88rem;
    white-space: nowrap;
}

.showcase-file-list svg {
    flex: none;
    color: var(--muted);
}

.showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-green);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
}

.showcase-muted {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.showcase-muted--sm {
    font-size: 0.82rem;
}

.showcase-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d7e7ee;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.showcase-status--green {
    color: var(--accent-green);
}

.showcase-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    flex: none;
}

.showcase-progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.showcase-progress-fill {
    height: 100%;
    width: 68%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-green));
}

.showcase-grade {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.showcase-grade span {
    color: var(--muted);
    font-size: 0.88rem;
}

.showcase-grade strong {
    font-size: 1.62rem;
    font-weight: 800;
    color: var(--accent-green);
    white-space: nowrap;
}

.showcase-grade strong em {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    font-style: normal;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    color: var(--muted);
}

.auth-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.auth-row a {
    font-size: 0.86rem;
    white-space: nowrap;
    flex: none;
}

.auth-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent-green);
    outline: none;
    box-shadow: none;
}

.auth-row input[type="checkbox"]:focus,
.auth-row input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: none;
}

.registration-main input:not([type="checkbox"]),
.registration-main input:not([type="checkbox"]):valid {
    color: var(--text);
    background: rgba(4, 14, 20, 0.72);
    caret-color: var(--text);
}

.registration-main input:not([type="checkbox"]):focus {
    color: var(--text);
    background: rgba(4, 14, 20, 0.82);
}

.registration-main input:-webkit-autofill,
.registration-main input:-webkit-autofill:hover,
.registration-main input:-webkit-autofill:focus,
.registration-main input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(4, 14, 20, 0.82) inset;
    box-shadow: 0 0 0 1000px rgba(4, 14, 20, 0.82) inset;
    border-color: rgba(166, 218, 245, 0.22);
    transition: background-color 9999s ease-in-out 0s;
}

#loginForm .auth-primary-action {
    margin-top: 6px;
}

.registration-main .verification-hint {
    font-size: 0.76rem;
    white-space: normal;
    overflow-wrap: break-word;
}

.registration-panel.registration-main {
    padding: 18px;
    display: grid;
    gap: 14px;
    align-content: start;
}

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

@media (max-width: 980px) {
    .registration-page {
        grid-template-columns: 1fr;
    }

    .registration-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-copy h1 {
        max-width: 100%;
    }

    .hero-showcase {
        grid-column: 1;
        grid-row: auto;
        min-height: 420px;
        margin-left: 0;
    }

    .hero-steps {
        grid-column: 1;
        width: 100%;
        max-width: 100%;
    }

    .hero-step {
        width: 100%;
        max-width: 100%;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hero-step strong {
        min-width: 0;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }
}

@media (max-width: 720px) {
    .registration-shell {
        width: min(100% - 16px, 1240px);
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .registration-panel.registration-main,
    .registration-hero {
        padding: 16px;
    }

    .auth-form,
    .hero-steps {
        grid-template-columns: 1fr;
    }

    .registration-field.full {
        grid-column: auto;
    }

    .hero-copy h1 {
        font-size: 2.6rem;
    }

    .hero-copy h1 span {
        white-space: normal;
    }

    .hero-showcase {
        display: none;
    }

    .registration-actions .primary {
        min-width: 0;
        width: 100%;
    }

    #loginForm .auth-primary-action {
        margin-top: 0;
    }

    .registration-hero .hero-steps,
    .registration-hero .hero-step {
        width: 100%;
        max-width: 100%;
    }

    .registration-hero .hero-step {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .registration-hero .hero-step strong {
        min-width: 0;
        max-width: 100%;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }
}
