.landing-story-product-feature .neo-landing-feature-link {
    color: var(--landing-story-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.landing-story-product-feature .neo-landing-feature-link:hover,
.landing-story-product-feature .neo-landing-feature-link:focus-visible {
    color: var(--landing-story-ink);
    text-decoration-thickness: 2px;
}

.neo-dashboard-demo {
    container-type: inline-size;
    padding: 0;
    color: var(--landing-story-ink);
    text-align: left;
}

.neo-demo-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 24px 24px 18px;
}

.neo-demo-controls-heading h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 650;
    line-height: 1.25;
}

.neo-demo-watch-video-link {
    display: block;
    width: fit-content;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    background: transparent;
    color: var(--landing-story-accent);
    font: inherit;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.neo-demo-watch-video-link:hover,
.neo-demo-watch-video-link:focus-visible {
    color: var(--landing-story-ink);
    text-decoration-thickness: 2px;
}

.neo-demo-watch-video-link:focus-visible {
    outline: 2px solid var(--landing-story-accent);
    outline-offset: 3px;
}

.neo-demo-video-popover {
    display: none;
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(96vw, 1100px);
    max-width: 96vw;
    max-height: 92vh;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.neo-demo-video-popover:popover-open {
    display: block;
}

.neo-demo-video-popover::backdrop {
    background: rgb(0 0 0 / 0.78);
}

.neo-demo-video-popover.is-inline {
    display: block;
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 18px 0;
}

.neo-demo-video-popover video {
    display: block;
    width: 100%;
    max-height: 92vh;
    background: #000;
}

.neo-demo-controls-heading p {
    max-width: 58ch;
    margin: 6px 0 0;
    color: var(--landing-story-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.neo-demo-controls-heading .neo-demo-resize-hint {
    margin-top: 8px;
    font-size: 0.75rem;
}

.neo-demo-controls-selection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.neo-demo-controls-selection .neo-demo-description-label {
    display: block;
    width: fit-content;
    min-width: 0;
    max-width: min(58ch, 100%);
    justify-self: start;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #cdebd9;
    border-radius: 0.5rem;
    background: #e9f7ef;
    color: #146c43;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

:root.dark-mode .neo-demo-controls-selection .neo-demo-description-label {
    border-color: #3e7652;
    background: #173b2a;
    color: #b5e5c4;
}

.neo-demo-mobile-resize-hint {
    display: none;
}

.neo-dashboard-demo[data-compact="true"] .neo-demo-mobile-resize-hint {
    display: inline;
}

.neo-demo-profile-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.neo-demo-button {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--landing-story-accent);
    border-radius: 999px;
    background: var(--landing-story-accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    transition: opacity 160ms ease-out, filter 160ms ease-out, box-shadow 160ms ease-out;
}

.neo-demo-button[data-active="false"] {
    opacity: 0.62;
}

.neo-demo-button:hover:not(:disabled) {
    filter: brightness(0.92);
}

.neo-demo-button:focus-visible {
    outline: 2px solid var(--landing-story-ink);
    outline-offset: 3px;
}

.neo-demo-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.neo-demo-button[data-active="true"] {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--landing-story-accent);
    opacity: 1;
}

:root.dark-mode .neo-demo-button {
    color: var(--landing-story-paper);
}

:root.dark-mode .neo-demo-button[data-active="true"] {
    box-shadow: 0 0 0 2px var(--landing-story-paper), 0 0 0 4px var(--landing-story-accent);
}

.neo-demo-mobile-edit {
    margin-inline: auto;
    border-color: var(--landing-story-ink);
    background: var(--landing-story-ink);
}

.neo-demo-mobile-edit[data-active="false"] {
    opacity: 1;
}

.neo-demo-mobile-edit:focus-visible {
    outline-color: var(--landing-story-accent);
}

.neo-demo-secondary-controls {
    display: none;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 16px;
}

.neo-dashboard-demo[data-compact="true"] .neo-demo-secondary-controls,
.neo-dashboard-demo[data-fallback="true"] .neo-demo-secondary-controls {
    display: flex;
}

.neo-demo-fallback {
    margin: 0;
    color: #7a3028;
    font-size: 0.875rem;
    line-height: 1.4;
}

.neo-demo-window {
    overflow: hidden;
    border-top: 1px solid var(--landing-story-line);
    background: #f3f6f8;
}

:root.dark-mode .neo-demo-window {
    background: #121212;
}

.neo-demo-window-bar {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--landing-story-line);
    background: #ffffff;
}

:root.dark-mode .neo-demo-window-bar {
    border-bottom-color: #2a2a2a;
    background: #000000;
}

.neo-demo-window-link {
    max-width: 100%;
    color: var(--landing-story-accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.neo-demo-window-link:hover {
    color: var(--landing-story-ink);
}

.neo-demo-grid-wrap {
    position: relative;
    padding: 14px;
}

.neo-demo-grid {
    min-height: 350px;
}

.neo-demo-grid .grid-stack-item-content.widget-shell
    > .widget-viewport.todo-widget-viewport,
.neo-demo-grid .grid-stack-item-content.widget-shell
    > .widget-viewport.notes-widget-viewport {
    container-type: size;
}

.neo-demo-grid .todo-widget-body,
.neo-demo-grid .notes-widget-container {
    --neo-demo-content-scale: calc(
        var(--widget-scale-factor) *
        clamp(
            var(--widget-scale-minimum),
            calc(
                1 + (
                    min(
                        calc(
                            100cqw / var(--widget-scale-reference-width)
                        ),
                        calc(
                            100cqh / var(--widget-scale-reference-height)
                        )
                    ) - 1
                ) * var(--widget-scale-growth)
            ),
            var(--widget-scale-maximum)
        )
    );
}

.neo-demo-grid .todo-widget-body {
    --todo-responsive-scale: var(--neo-demo-content-scale);
    --todo-responsive-checkbox-size: calc(
        18px * var(--todo-responsive-scale)
    );
}

.neo-demo-grid .notes-widget-container {
    --notes-responsive-scale: var(--neo-demo-content-scale);
}

.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-number,
.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-unit,
.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-event {
    flex-shrink: 0;
}

.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-number {
    line-height: 1;
}

.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-unit {
    margin-top: 0;
}

.neo-demo-grid .widget-contract-time-counter[gs-w="12"][gs-h="5"]
    .time-counter-widget-event {
    margin-top: 4px;
}

:root.dark-mode .neo-demo-grid {
    border-color: #121212;
    background: #121212;
}

.neo-dashboard-demo .widget-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
}

.neo-dashboard-demo[data-layout-editing="true"] .grid-stack-item-content.widget-shell > .widget-header {
    cursor: grab;
}

.neo-dashboard-demo .widget-header-options,
.neo-dashboard-demo .widget-controls-right,
.neo-dashboard-demo .progress-widget-control {
    display: none !important;
}

.neo-dashboard-demo[data-layout-editing="true"] .grid-stack-item-content.widget-shell > .widget-header:active {
    cursor: grabbing;
}

.neo-dashboard-demo[data-layout-editing="true"] .grid-stack > .grid-stack-item.ui-resizable-autohide:not(.ui-resizable-disabled) > .ui-resizable-se {
    display: block;
    opacity: 0.7;
}

.neo-dashboard-demo[data-layout-editing="true"] .grid-stack > .grid-stack-item.ui-resizable-autohide:not(.ui-resizable-disabled):hover > .ui-resizable-handle {
    display: block;
    opacity: 1;
}

.neo-dashboard-demo[data-layout-editing="true"][data-compact="true"] .grid-stack > .grid-stack-item.ui-resizable-autohide:not(.ui-resizable-disabled) > .ui-resizable-handle {
    display: block;
    width: 44px;
    height: 44px;
}

.neo-demo-caption {
    padding: 10px 18px 14px;
    color: var(--landing-story-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
}

.neo-dashboard-demo [hidden] {
    display: none !important;
}

.neo-demo-grid:not([data-grid-ready="true"]) {
    display: grid;
    grid-auto-rows: 64px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
}

.neo-demo-grid:not([data-grid-ready="true"]) > .grid-stack-item {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    grid-column: span 6;
    grid-row: span 4;
}

.neo-demo-grid:not([data-grid-ready="true"]) > [gs-w="12"] {
    grid-column: span 12;
}

.neo-demo-grid:not([data-grid-ready="true"]) > [gs-h="3"] {
    grid-row: span 3;
}

.neo-demo-grid:not([data-grid-ready="true"]) > [gs-h="5"] {
    grid-row: span 5;
}

.neo-demo-grid:not([data-grid-ready="true"]) > [gs-h="6"] {
    grid-row: span 6;
}

.neo-demo-grid:not([data-grid-ready="true"]) .grid-stack-item-content {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

@container (max-width: 1000px) {
    .neo-demo-grid:not([data-grid-ready="true"]) {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .neo-demo-grid:not([data-grid-ready="true"]) > .grid-stack-item {
        grid-column: span 3;
    }

    .neo-demo-grid:not([data-grid-ready="true"]) > [gs-w="12"] {
        grid-column: span 6;
    }
}

@container (max-width: 760px) {
    .neo-demo-controls {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px 16px 14px;
    }

    .neo-demo-controls-heading {
        width: 100%;
        text-align: center;
    }

    .neo-demo-controls-heading h2,
    .neo-demo-controls-heading .neo-demo-resize-hint {
        width: 100%;
        margin-inline: auto;
        text-align: center;
    }

    .neo-demo-watch-video-link {
        width: fit-content;
        margin: 6px auto 0;
        text-align: center;
    }

    .neo-demo-controls-selection {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 12px;
    }

    .neo-demo-controls-selection .neo-demo-description-label {
        justify-self: center;
        text-align: center;
    }

    .neo-demo-profile-buttons {
        width: 100%;
        justify-content: center;
    }

    .neo-demo-secondary-controls {
        flex-wrap: wrap;
        padding-inline: 16px;
    }

    .neo-demo-grid-wrap {
        padding: 10px;
    }

    .neo-demo-grid {
        min-height: 0;
    }

    .neo-demo-window-bar {
        padding-inline: 12px;
    }
}

@media (max-width: 760px) {
    .neo-demo-controls-heading {
        width: 100%;
        text-align: center;
    }

    .neo-demo-controls-heading h2,
    .neo-demo-controls-heading .neo-demo-resize-hint {
        width: 100%;
        margin-inline: auto;
        text-align: center;
    }

    .neo-demo-watch-video-link {
        margin: 6px auto 0;
        text-align: center;
    }
}

@container (max-width: 560px) {
    .neo-demo-grid:not([data-grid-ready="true"]) {
        grid-auto-rows: 64px;
        grid-template-columns: minmax(0, 1fr);
    }

    .neo-demo-grid:not([data-grid-ready="true"]) > .grid-stack-item,
    .neo-demo-grid:not([data-grid-ready="true"]) > [gs-w="12"] {
        grid-column: span 1;
    }
}

@container (max-width: 575px) {
    .neo-demo-profile-buttons {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .neo-demo-button {
        padding-inline: 9px;
        font-size: 0.8rem;
    }

    .neo-demo-profile-buttons .neo-demo-button {
        min-height: 52px;
        padding-inline: 6px;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .neo-demo-button {
        transition: none;
    }
}
