.demo-hero-section {
    position: relative;
}

.demo-hero-section__intro {
    max-width: 860px;
}

.demo-hero-section__eyebrow,
.demo-hero__eyebrow,
.demo-dashboard__eyebrow,
.demo-guideline__eyebrow,
.demo-question__meta {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f6b85;
}

.demo-hero-section__headline {
    font-size: clamp(2rem, 4.4vw, 3.65rem);
    line-height: 1.08;
    font-weight: 800;
    color: #060928;
}

.demo-hero-section__summary {
    font-size: 1.05rem;
    color: #5f6b85;
}

.demo-hero {
    position: relative;
}

.demo-hero__frame {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    border-radius: 28px;
    border: 1px solid rgba(28, 37, 64, 0.1);
    background:
        radial-gradient(circle at top left, rgba(223, 237, 255, 0.88), transparent 34%),
        linear-gradient(180deg, rgba(249, 252, 255, 0.96), rgba(241, 247, 252, 0.96));
    box-shadow: 0 24px 60px rgba(10, 24, 54, 0.12);
    padding: 1.2rem 1.2rem 0;
}

.demo-hero__chrome {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.demo-hero__chrome-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(96, 109, 133, 0.22);
}

.demo-hero__header {
    padding: 0.25rem 0.6rem 0;
}

.demo-hero__stage-title {
    min-height: 2.3rem;
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    font-weight: 800;
    color: #060928;
}

.demo-hero__viewport {
    position: relative;
    min-height: 470px;
    padding: 1rem 0.25rem 0;
}

.demo-hero__stage {
    width: 100%;
}

.demo-hero[data-enhanced="true"] .demo-hero__viewport {
    isolation: isolate;
}

.demo-hero[data-enhanced="true"] .demo-hero__stage {
    position: absolute;
    inset: 1rem 0.25rem 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.demo-hero[data-enhanced="true"] .demo-hero__stage.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.demo-question,
.demo-dashboard,
.demo-guideline {
    height: 100%;
}

.demo-question__panel,
.demo-dashboard__panel,
.demo-guideline__panel {
    height: 100%;
    border-radius: 22px;
    border: 1px solid rgba(28, 37, 64, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(10, 24, 54, 0.08);
}

.demo-question__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 2.4vw, 2.4rem);
}

.demo-question__prompt {
    max-width: 820px;
    font-size: clamp(1.2rem, 2vw, 1.75rem);
    line-height: 1.25;
    color: #060928;
}

.demo-question__options {
    display: grid;
    gap: 0.75rem;
}

.demo-question__option {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.92);
    color: #060928;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.demo-question__option:hover,
.demo-question__option:focus-visible {
    border-color: rgba(54, 124, 235, 0.52);
    background: rgba(54, 124, 235, 0.08);
    box-shadow: 0 0 0 3px rgba(54, 124, 235, 0.12);
    outline: none;
}

.demo-question__option.is-selected,
.demo-question__option.custom-option.selected {
    border-color: rgba(45, 108, 202, 0.6);
    background: rgba(54, 124, 235, 0.14);
    box-shadow: 0 0 0 3px rgba(54, 124, 235, 0.14);
}

.demo-question__actions {
    display: flex;
    justify-content: flex-start;
}

.demo-question__submit {
    min-width: 148px;
    border-radius: 15px;
    border-style: solid;
    border-color: var(--bs-btn-color);
}

.demo-dashboard__panel {
    display: flex;
    flex-direction: column;
    padding: 1.5rem clamp(1rem, 2vw, 1.75rem);
}

.demo-dashboard__title,
.demo-guideline__title {
    font-size: clamp(1.12rem, 1.9vw, 1.42rem);
    font-weight: 700;
    color: #060928;
}

.demo-dashboard__controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-dashboard__range-btn {
    border-radius: 999px;
    padding: 0.28rem 0.82rem;
    font-size: 0.82rem;
    border: 1px solid rgba(32, 84, 176, 0.38);
    background: rgba(54, 124, 235, 0.08);
    color: #315eaa;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.demo-dashboard__range-btn:hover,
.demo-dashboard__range-btn:focus-visible {
    border-color: rgba(32, 84, 176, 0.55);
    background: rgba(54, 124, 235, 0.16);
    color: #214f97;
    outline: none;
}

.demo-dashboard__range-btn.is-active {
    border-color: rgba(28, 78, 165, 0.9);
    background: linear-gradient(180deg, #3f84e3, #2f6ec6);
    color: #f7fbff;
}

.demo-dashboard__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.demo-dashboard__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(36, 40, 91, 0.06);
    color: #5f6b85;
    font-size: 0.82rem;
}

.demo-dashboard__legend-item::before {
    content: "";
    width: 16px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.demo-dashboard__legend-item--accuracy {
    color: #4ba27a;
}

.demo-dashboard__legend-item--rolling {
    color: #2d6cca;
}

.demo-dashboard__legend-item--cohort {
    color: #8a64d6;
}

.demo-dashboard__chart-wrap {
    position: relative;
    min-height: 300px;
    flex: 1 1 auto;
}

.demo-dashboard__chart {
    width: 100%;
    height: 100%;
}

.demo-guideline__panel {
    display: flex;
    flex-direction: column;
    padding: 1.4rem clamp(1rem, 2vw, 1.75rem);
}

.demo-guideline__context {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    background: rgba(54, 124, 235, 0.08);
    color: #315eaa;
    font-size: 0.82rem;
    font-weight: 600;
}

.demo-guideline__viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 320px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(28, 37, 64, 0.08);
    background: rgba(250, 252, 255, 0.82);
    padding: 1.2rem;
    scroll-behavior: auto;
}

.demo-guideline__document {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-guideline__paragraph {
    position: relative;
    margin: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    color: #394964;
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.72);
}

.demo-guideline__paragraph--target {
    color: #20304e;
    border: 1px solid transparent;
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.demo-guideline__paragraph--target.is-referenced {
    border-color: rgba(233, 148, 44, 0.42);
    box-shadow: inset 0 0 0 1px rgba(233, 148, 44, 0.4);
}

.demo-guideline__highlight {
    position: absolute;
    inset: 0.35rem;
    border-radius: 10px;
    background: rgba(255, 228, 123, 0.44);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 0;
}

.demo-guideline__paragraph--target {
    overflow: hidden;
}

.demo-guideline__paragraph--target,
.demo-guideline__paragraph--target * {
    position: relative;
    z-index: 1;
}

.demo-guideline__source {
    align-self: flex-start;
    margin-top: 1rem;
    border: 1px solid rgba(233, 148, 44, 0.36);
    border-radius: 14px;
    padding: 0.72rem 0.95rem;
    background: rgba(255, 243, 223, 0.75);
    color: #935417;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.demo-guideline__source:hover,
.demo-guideline__source:focus-visible {
    background: rgba(255, 239, 208, 0.96);
    border-color: rgba(233, 148, 44, 0.5);
    outline: none;
}

.demo-hero__footer {
    display: flex;
    justify-content: center;
    padding: 1rem 0 1.15rem;
}

.demo-hero__pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.demo-hero__dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(95, 107, 133, 0.35);
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.demo-hero__dot:hover,
.demo-hero__dot:focus-visible {
    background: rgba(49, 94, 170, 0.78);
    box-shadow: 0 0 0 4px rgba(54, 124, 235, 0.12);
    outline: none;
}

.demo-hero__dot.is-active {
    transform: scale(1.28);
    background: #2f6ec6;
}

.demo-hero__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(54, 124, 235, 0.08);
}

.demo-hero__progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #3f84e3, #2f6ec6);
    transform: scaleX(0);
    transform-origin: left center;
}

.demo-hero [role="button"],
.demo-hero button {
    cursor: pointer;
}

[data-bs-theme="dark"] .demo-hero-section__eyebrow,
[data-bs-theme="dark"] .demo-hero__eyebrow,
[data-bs-theme="dark"] .demo-dashboard__eyebrow,
[data-bs-theme="dark"] .demo-guideline__eyebrow,
[data-bs-theme="dark"] .demo-question__meta,
[data-bs-theme="dark"] .demo-hero-section__summary {
    color: #aab3e8;
}

[data-bs-theme="dark"] .demo-hero-section__headline,
[data-bs-theme="dark"] .demo-hero__stage-title,
[data-bs-theme="dark"] .demo-question__prompt,
[data-bs-theme="dark"] .demo-dashboard__title,
[data-bs-theme="dark"] .demo-guideline__title {
    color: #e6ebff;
}

[data-bs-theme="dark"] .demo-hero__frame {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(25, 48, 103, 0.36), transparent 34%),
        linear-gradient(180deg, rgba(16, 22, 65, 0.94), rgba(11, 15, 58, 0.96));
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.34);
}

[data-bs-theme="dark"] .demo-hero__chrome-dot {
    background: rgba(216, 220, 255, 0.22);
}

[data-bs-theme="dark"] .demo-question__panel,
[data-bs-theme="dark"] .demo-dashboard__panel,
[data-bs-theme="dark"] .demo-guideline__panel {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(11, 15, 58, 0.78);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

[data-bs-theme="dark"] .demo-question__option {
    background: rgba(17, 23, 72, 0.88);
    color: #e6ebff;
    border-color: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="dark"] .demo-question__option:hover,
[data-bs-theme="dark"] .demo-question__option:focus-visible {
    background: rgba(67, 143, 240, 0.2);
    border-color: rgba(137, 182, 255, 0.56);
    box-shadow: 0 0 0 3px rgba(67, 143, 240, 0.18);
}

[data-bs-theme="dark"] .demo-question__option.is-selected,
[data-bs-theme="dark"] .demo-question__option.custom-option.selected {
    background: rgba(67, 143, 240, 0.24);
    border-color: rgba(137, 182, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(67, 143, 240, 0.22);
}

[data-bs-theme="dark"] .demo-dashboard__range-btn {
    border-color: rgba(118, 166, 255, 0.34);
    background: rgba(67, 143, 240, 0.12);
    color: #c9dcff;
}

[data-bs-theme="dark"] .demo-dashboard__range-btn:hover,
[data-bs-theme="dark"] .demo-dashboard__range-btn:focus-visible {
    border-color: rgba(137, 182, 255, 0.6);
    background: rgba(67, 143, 240, 0.2);
    color: #e4edff;
}

[data-bs-theme="dark"] .demo-dashboard__range-btn.is-active {
    border-color: rgba(137, 182, 255, 0.8);
    background: linear-gradient(180deg, #4e92ee, #2f6ec6);
    color: #f5f8ff;
}

[data-bs-theme="dark"] .demo-dashboard__legend-item {
    background: rgba(255, 255, 255, 0.08);
    color: #d8dcff;
}

[data-bs-theme="dark"] .demo-guideline__context {
    background: rgba(67, 143, 240, 0.18);
    color: #d8e7ff;
}

[data-bs-theme="dark"] .demo-guideline__viewport {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 46, 0.76);
}

[data-bs-theme="dark"] .demo-guideline__paragraph {
    background: rgba(255, 255, 255, 0.04);
    color: #d3daf8;
}

[data-bs-theme="dark"] .demo-guideline__paragraph--target {
    color: #edf2ff;
}

[data-bs-theme="dark"] .demo-guideline__highlight {
    background: rgba(255, 228, 123, 0.26);
}

[data-bs-theme="dark"] .demo-guideline__paragraph--target.is-referenced {
    border-color: rgba(255, 178, 94, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 178, 94, 0.42);
}

[data-bs-theme="dark"] .demo-guideline__source {
    border-color: rgba(255, 178, 94, 0.32);
    background: rgba(111, 66, 16, 0.28);
    color: #ffd6a0;
}

[data-bs-theme="dark"] .demo-guideline__source:hover,
[data-bs-theme="dark"] .demo-guideline__source:focus-visible {
    background: rgba(139, 82, 17, 0.34);
    border-color: rgba(255, 178, 94, 0.48);
}

[data-bs-theme="dark"] .demo-hero__dot {
    background: rgba(170, 179, 232, 0.34);
}

[data-bs-theme="dark"] .demo-hero__dot:hover,
[data-bs-theme="dark"] .demo-hero__dot:focus-visible {
    background: rgba(137, 182, 255, 0.76);
    box-shadow: 0 0 0 4px rgba(67, 143, 240, 0.18);
}

[data-bs-theme="dark"] .demo-hero__dot.is-active {
    background: #79a7f2;
}

[data-bs-theme="dark"] .demo-hero__progress {
    background: rgba(67, 143, 240, 0.14);
}

@media (max-width: 991.98px) {
    .demo-hero__frame {
        min-height: 610px;
        border-radius: 24px;
    }

    .demo-hero__viewport {
        min-height: 430px;
    }

    .demo-question__panel,
    .demo-dashboard__panel,
    .demo-guideline__panel {
        border-radius: 18px;
    }
}

@media (max-width: 767.98px) {
    .demo-hero__frame {
        min-height: 700px;
        padding: 1rem 1rem 0;
    }

    .demo-hero__header {
        padding: 0.15rem 0.2rem 0;
    }

    .demo-hero__viewport {
        min-height: 520px;
        padding-top: 0.85rem;
    }

    .demo-hero[data-enhanced="true"] .demo-hero__stage {
        inset: 0.85rem 0 0;
    }

    .demo-question__panel,
    .demo-dashboard__panel,
    .demo-guideline__panel {
        padding: 1rem;
    }

    .demo-question__prompt {
        font-size: 1.12rem;
    }

    .demo-question__option {
        font-size: 0.95rem;
        padding: 0.85rem 0.9rem;
    }

    .demo-dashboard__panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-dashboard__controls {
        width: 100%;
    }

    .demo-dashboard__range-btn {
        flex: 1 1 calc(25% - 0.4rem);
        min-width: 0;
    }

    .demo-dashboard__chart-wrap {
        min-height: 260px;
    }

    .demo-guideline__viewport {
        min-height: 290px;
        padding: 0.9rem;
    }

    .demo-guideline__paragraph {
        padding: 0.78rem 0.82rem;
        line-height: 1.58;
    }

    .demo-guideline__source {
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .demo-hero-section__summary {
        font-size: 0.98rem;
    }

    .demo-hero__frame {
        min-height: 760px;
        border-radius: 20px;
    }

    .demo-hero__viewport {
        min-height: 575px;
    }

    .demo-dashboard__legend-item--cohort {
        display: none;
    }
}

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

    .demo-hero__progress-bar {
        transform: scaleX(1);
    }
}
