/* Keep the original visual design; only give each major section a viewport-sized stage. */
html:has(.public-workspace) {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

.public-workspace {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.public-hero,
.public-hero-visual,
.public-process,
.public-principles,
.public-form-panel,
.public-status-stage {
    min-height: 100svh;
    scroll-snap-align: start;
}

.public-hero {
    display: grid;
    position: relative;
    max-width: none;
    min-height: calc(100svh - 88px);
    margin: 0;
    align-content: center;
    overflow: hidden;
    isolation: isolate;
}

.public-hero > :not(.public-hero-beams) {
    position: relative;
    z-index: 1;
}

.public-hero-beams {
    position: absolute;
    inset: -22% -4%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.public-hero-beams::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 51%, rgb(255 255 255 / 90%) 0 20%, rgb(255 255 255 / 55%) 43%, transparent 72%);
}

.public-hero-beams i {
    position: absolute;
    top: -28%;
    width: clamp(48px, 5.4vw, 104px);
    height: 160%;
    border-radius: 50%;
    opacity: 0.34;
    filter: blur(7px);
    transform: rotate(17deg);
    animation: public-beam-drift 9s ease-in-out infinite alternate;
    will-change: transform;
}

.public-hero-beams i:nth-child(1) { left: 2%; background: linear-gradient(90deg, transparent, rgb(119 235 216 / 66%), transparent); animation-delay: -7s; animation-duration: 10s; }
.public-hero-beams i:nth-child(2) { left: 18%; background: linear-gradient(90deg, transparent, rgb(171 222 255 / 72%), transparent); animation-delay: -3s; animation-duration: 13s; }
.public-hero-beams i:nth-child(3) { left: 34%; background: linear-gradient(90deg, transparent, rgb(214 185 255 / 62%), transparent); animation-delay: -10s; animation-duration: 15s; }
.public-hero-beams i:nth-child(4) { left: 50%; background: linear-gradient(90deg, transparent, rgb(130 237 219 / 54%), transparent); animation-delay: -1s; animation-duration: 12s; }
.public-hero-beams i:nth-child(5) { left: 64%; background: linear-gradient(90deg, transparent, rgb(183 218 255 / 70%), transparent); animation-delay: -8s; animation-duration: 14s; }
.public-hero-beams i:nth-child(6) { left: 78%; background: linear-gradient(90deg, transparent, rgb(221 190 255 / 62%), transparent); animation-delay: -4s; animation-duration: 11s; }
.public-hero-beams i:nth-child(7) { left: 92%; background: linear-gradient(90deg, transparent, rgb(127 232 215 / 58%), transparent); animation-delay: -6s; animation-duration: 16s; }

@keyframes public-beam-drift {
    from { transform: translate3d(-8vw, -2%, 0) rotate(17deg) scaleX(0.82); }
    to { transform: translate3d(10vw, 3%, 0) rotate(17deg) scaleX(1.16); }
}

.public-hero-visual {
    display: grid;
    align-items: center;
    margin-bottom: 0;
}

.public-process,
.public-form-panel {
    display: grid;
    align-content: center;
}

.public-principles,
.public-status-stage {
    align-items: center;
}

.public-status-stage {
    display: grid;
}

.public-status-section {
    width: min(calc(100% - 64px), 1320px);
    margin: 0 auto;
}

.public-workbench .public-form-panel {
    min-height: calc(100svh - 88px);
}

/* The workbench is one viewport with two functional tabs. */
html:has(.public-workbench) {
    scroll-snap-type: none;
}

.public-workbench .public-tab-workspace {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(22px, 3.2vh, 34px);
    min-height: calc(100svh - 88px);
    padding: clamp(28px, 4vh, 44px) 32px;
    background: #f5f6f7;
}

.public-workbench-header {
    display: flex;
    width: min(100%, 680px);
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    margin: 0 auto;
}

.public-workbench-title {
    text-align: center;
}

.public-workbench-title h1 {
    margin: 8px 0 8px;
    color: #11131c;
    font-size: clamp(1.85rem, 2.5vw, 2.65rem);
    font-weight: 640;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.public-workbench-title > p:last-child {
    color: #686c76;
    font-size: 0.86rem;
}

.public-tab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 5px;
    border: 1px solid #e1e3e7;
    border-radius: 999px;
    background: #e9ebee;
}

.public-tab-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #626671;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    transition: background 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}

.public-tab-button span {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

.public-tab-button.is-active {
    background: #11131c;
    color: #fff;
    box-shadow: 0 8px 20px rgb(17 19 28 / 16%);
}

.public-tab-button:focus-visible {
    outline: 3px solid #a8eadf;
    outline-offset: 2px;
}

.public-workbench .public-tab-panel {
    width: 100%;
    align-self: start;
    min-height: 0;
    scroll-snap-align: none;
}

.public-workbench .public-form-panel {
    align-content: start;
    padding: 0;
    background: transparent;
}

.public-workbench .public-form-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 680px);
    min-height: 0;
}

.public-workbench .public-form-aside {
    display: none;
}

.public-workbench .public-form-body {
    padding: 34px 38px 38px;
}

.public-workbench-card-heading {
    margin-bottom: 28px;
}

.public-workbench-card-heading h2 {
    margin: 8px 0 8px;
    color: #11131c;
    font-size: 1.55rem;
    font-weight: 650;
    letter-spacing: -0.035em;
}

.public-workbench-card-heading > p:last-child {
    color: #686c76;
    font-size: 0.82rem;
}

.public-workbench #create-work-order-form > .field-grid,
.public-workbench #create-work-order-form > .inline-actions,
.public-workbench #create-result,
.public-workbench #work-order-details {
    width: min(100%, 760px);
    margin-right: auto;
    margin-left: auto;
}

.public-workbench #create-work-order-form > .field-grid {
    grid-template-columns: minmax(0, 1fr);
}

.public-workbench label {
    margin-bottom: 14px;
}

.public-workbench .public-details-heading {
    margin: 14px 0 14px;
    padding-top: 14px;
}

.public-workbench #work-order-details textarea {
    min-height: 96px;
}

.public-workbench #work-order-details > .primary-button {
    width: 100%;
}

.public-workbench .public-status-stage {
    align-content: start;
}

.public-workbench .public-status-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    width: min(100%, 680px);
    min-height: 0;
    margin: 0 auto;
    padding: 38px;
}

.public-workbench .public-status-copy h2 {
    margin-block: 10px;
    font-size: 2rem;
}

.public-workbench .public-status-copy > p:last-child {
    font-size: 0.82rem;
}

.public-workbench .public-status {
    padding: 28px;
    box-shadow: none;
}

.public-faq {
    padding-bottom: clamp(56px, 5vw, 80px);
}

@media (max-width: 960px) {
    html:has(.public-workspace) {
        scroll-snap-type: none;
    }

    .public-hero-visual,
    .public-process,
    .public-principles,
    .public-form-panel,
    .public-status-stage {
        min-height: auto;
        scroll-snap-align: none;
    }

    .public-workbench .public-tab-workspace {
        min-height: calc(100svh - 88px);
        padding-inline: 20px;
    }

    .public-workbench-header {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .public-tab-list {
        width: 100%;
    }

    .public-workbench .public-status-section {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .public-hero {
        min-height: calc(100svh - 88px);
    }

    .public-workbench .public-tab-workspace {
        min-height: calc(100svh - 72px);
        padding: 16px 12px 24px;
    }

    .public-workbench .public-form-body {
        padding: 24px 18px;
    }

    .public-workbench #create-work-order-form > .field-grid {
        grid-template-columns: 1fr;
    }

    .public-workbench .public-status-section {
        width: 100%;
        margin: 0;
    }
}

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

    .public-hero-beams i {
        animation: none;
    }
}
