:root {
    --demo-bg: #06101c;
    --demo-panel: rgba(12, 27, 45, 0.88);
    --demo-panel-strong: rgba(15, 34, 56, 0.96);
    --demo-border: rgba(157, 205, 255, 0.16);
    --demo-border-strong: rgba(107, 219, 255, 0.44);
    --demo-text: #f5f9ff;
    --demo-muted: #9eb2c8;
    --demo-accent: #61d9ff;
    --demo-accent-rgb: 97, 217, 255;
    --demo-success: #6ce6b1;
    --demo-warning: #ffc66d;
    --demo-danger: #ff8ca8;
    --demo-radius-lg: 28px;
    --demo-radius-md: 18px;
    --demo-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.demo-showcase-page {
    min-width: 320px;
    margin: 0;
    color: var(--demo-text);
    background:
        radial-gradient(circle at 16% 8%, rgba(35, 158, 212, 0.18), transparent 34rem),
        radial-gradient(circle at 88% 32%, rgba(127, 89, 255, 0.13), transparent 32rem),
        linear-gradient(150deg, #07131f 0%, #06101c 48%, #091526 100%);
}

body.demo-showcase-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(121, 197, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(121, 197, 255, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.demo-main {
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 58px;
}

.demo-welcome {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 36px;
    min-height: 480px;
    padding: clamp(32px, 5vw, 70px);
    overflow: hidden;
    border: 1px solid var(--demo-border);
    border-radius: var(--demo-radius-lg);
    background:
        linear-gradient(135deg, rgba(21, 47, 76, 0.93), rgba(8, 21, 36, 0.96)),
        var(--demo-panel);
    box-shadow: var(--demo-shadow);
}

.demo-welcome::after {
    position: absolute;
    top: -160px;
    right: -120px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(var(--demo-accent-rgb), 0.2);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 64px rgba(var(--demo-accent-rgb), 0.035),
        0 0 0 130px rgba(var(--demo-accent-rgb), 0.02);
}

.demo-welcome-copy,
.demo-welcome-visual,
.demo-safety-banner {
    position: relative;
    z-index: 1;
}

.demo-welcome-copy {
    align-self: center;
    max-width: 850px;
}

.demo-kicker,
.demo-chapter-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--demo-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.demo-kicker span {
    font-size: 0.55rem;
    filter: drop-shadow(0 0 8px var(--demo-accent));
}

.demo-welcome h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.25rem, 5.5vw, 5.4rem);
    font-weight: 780;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.demo-subtitle {
    max-width: 760px;
    margin: 24px 0 0;
    color: #c2d2e2;
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    line-height: 1.75;
}

.demo-mode-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin-top: 30px;
}

.demo-mode-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 14px 16px;
    color: var(--demo-muted);
    text-decoration: none;
    border: 1px solid var(--demo-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.demo-mode-card > i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--demo-accent);
    border-radius: 13px;
    background: rgba(var(--demo-accent-rgb), 0.11);
}

.demo-mode-card span {
    display: grid;
    gap: 4px;
}

.demo-mode-card strong {
    color: var(--demo-text);
    font-size: 0.95rem;
}

.demo-mode-card small {
    color: inherit;
    font-size: 0.76rem;
    line-height: 1.45;
}

.demo-mode-card:hover,
.demo-mode-card:focus-visible,
.demo-mode-card.is-active {
    color: #c5d8e9;
    border-color: var(--demo-border-strong);
    background: rgba(var(--demo-accent-rgb), 0.09);
    outline: none;
}

.demo-mode-card:hover {
    transform: translateY(-2px);
}

.demo-mode-card.is-active {
    box-shadow: inset 0 0 0 1px rgba(var(--demo-accent-rgb), 0.18);
}

.demo-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.demo-button,
.demo-icon-button,
.demo-reset-link,
.demo-live-link,
.demo-chart-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    color: var(--demo-text);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.demo-button:hover,
.demo-icon-button:hover,
.demo-reset-link:hover,
.demo-live-link:hover,
.demo-chart-toolbar button:hover {
    transform: translateY(-1px);
    border-color: var(--demo-border-strong);
}

.demo-button:focus-visible,
.demo-icon-button:focus-visible,
.demo-reset-link:focus-visible,
.demo-live-link:focus-visible,
.demo-chart-toolbar button:focus-visible,
.demo-chapter-button:focus-visible {
    outline: 3px solid rgba(var(--demo-accent-rgb), 0.35);
    outline-offset: 3px;
}

.demo-button.is-primary {
    color: #03121b;
    font-weight: 800;
    border-color: transparent;
    background: linear-gradient(135deg, #7ce8ff, #57c9f2);
    box-shadow: 0 10px 28px rgba(64, 191, 232, 0.2);
}

.demo-button.is-secondary {
    background: rgba(255, 255, 255, 0.05);
}

.demo-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.demo-welcome-visual {
    display: grid;
    place-items: center;
    min-height: 320px;
}

.demo-orbit {
    position: relative;
    width: min(340px, 80vw);
    aspect-ratio: 1;
    border: 1px solid rgba(var(--demo-accent-rgb), 0.2);
    border-radius: 50%;
    box-shadow:
        inset 0 0 70px rgba(var(--demo-accent-rgb), 0.06),
        0 0 0 38px rgba(var(--demo-accent-rgb), 0.025),
        0 0 0 76px rgba(var(--demo-accent-rgb), 0.014);
}

.demo-orbit::before,
.demo-orbit::after {
    position: absolute;
    inset: 20%;
    border: 1px dashed rgba(var(--demo-accent-rgb), 0.25);
    border-radius: 50%;
    content: "";
    transform: rotate(28deg) scaleY(0.52);
}

.demo-orbit::after {
    transform: rotate(-28deg) scaleY(0.52);
}

.demo-orbit-core,
.demo-orbit-node {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--demo-accent-rgb), 0.35);
    border-radius: 50%;
    background: #0b2033;
    box-shadow: 0 0 28px rgba(var(--demo-accent-rgb), 0.16);
}

.demo-orbit-core {
    top: 50%;
    left: 50%;
    width: 96px;
    height: 96px;
    color: var(--demo-accent);
    font-size: 2.2rem;
    transform: translate(-50%, -50%);
}

.demo-orbit-node {
    width: 54px;
    height: 54px;
    color: #d9f6ff;
}

.demo-orbit-node.is-code {
    top: 3%;
    left: 42%;
}

.demo-orbit-node.is-device {
    top: 42%;
    right: 3%;
}

.demo-orbit-node.is-data {
    right: 44%;
    bottom: 3%;
}

.demo-orbit-node.is-ai {
    top: 42%;
    left: 3%;
}

.demo-welcome-stat {
    position: absolute;
    right: 4%;
    bottom: 2%;
    display: grid;
    padding: 14px 18px;
    border: 1px solid var(--demo-border);
    border-radius: 14px;
    background: rgba(6, 16, 28, 0.72);
    backdrop-filter: blur(14px);
}

.demo-welcome-stat strong {
    color: var(--demo-accent);
    font-size: 1.8rem;
}

.demo-welcome-stat span {
    color: var(--demo-muted);
    font-size: 0.72rem;
}

.demo-safety-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 12px 16px;
    color: #bed0e0;
    font-size: 0.86rem;
    line-height: 1.5;
    border: 1px solid rgba(108, 230, 177, 0.23);
    border-radius: 14px;
    background: rgba(46, 132, 103, 0.09);
}

.demo-safety-banner > i {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--demo-success);
    border-radius: 10px;
    background: rgba(108, 230, 177, 0.09);
}

.demo-safety-banner strong {
    color: #e6fff4;
}

.demo-console {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 300px;
    gap: 18px;
    margin-top: 22px;
    scroll-margin-top: 100px;
}

.demo-chapter-rail,
.demo-stage-shell,
.demo-guide {
    border: 1px solid var(--demo-border);
    border-radius: var(--demo-radius-md);
    background: var(--demo-panel);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.demo-chapter-rail,
.demo-guide {
    align-self: start;
    position: sticky;
    top: 84px;
}

.demo-chapter-rail {
    padding: 16px 10px 12px;
}

.demo-rail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 8px 14px;
    color: var(--demo-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-rail-heading strong {
    color: var(--demo-accent);
    letter-spacing: 0.04em;
}

.demo-chapter-list {
    display: grid;
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.demo-chapter-button {
    display: grid;
    grid-template-columns: 26px 32px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 62px;
    padding: 8px;
    color: var(--demo-muted);
    text-align: left;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.demo-chapter-button:hover {
    color: #d6e3f0;
    background: rgba(255, 255, 255, 0.035);
}

.demo-chapter-button.is-active {
    color: var(--demo-text);
    border-color: rgba(var(--demo-accent-rgb), 0.24);
    background: rgba(var(--demo-accent-rgb), 0.09);
}

.demo-chapter-index {
    color: #71879d;
    font: 700 0.64rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-chapter-button > i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--demo-accent);
    border-radius: 9px;
    background: rgba(var(--demo-accent-rgb), 0.08);
}

.demo-chapter-button > span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.demo-chapter-button strong,
.demo-chapter-button small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-chapter-button strong {
    font-size: 0.79rem;
}

.demo-chapter-button small {
    color: #7f94a9;
    font-size: 0.66rem;
}

.demo-reset-link {
    width: 100%;
    min-height: 38px;
    margin-top: 10px;
    padding: 0 10px;
    color: var(--demo-muted);
    font-size: 0.75rem;
    background: transparent;
}

.demo-stage-shell {
    min-width: 0;
    overflow: hidden;
}

.demo-stage-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--demo-border);
}

.demo-live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--demo-muted);
    font-size: 0.75rem;
    font-weight: 750;
}

.demo-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--demo-success);
    box-shadow: 0 0 12px rgba(108, 230, 177, 0.65);
}

.demo-stage-tools {
    display: flex;
    gap: 7px;
}

.demo-icon-button {
    min-height: 34px;
    padding: 0 11px;
    color: var(--demo-muted);
    font-size: 0.72rem;
    border-radius: 9px;
}

.demo-icon-button[aria-pressed="true"] {
    color: var(--demo-accent);
    border-color: rgba(var(--demo-accent-rgb), 0.28);
    background: rgba(var(--demo-accent-rgb), 0.09);
}

.demo-progress-track {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.demo-progress-track i {
    display: block;
    width: 12.5%;
    height: 100%;
    background: linear-gradient(90deg, var(--demo-accent), #8b9dff);
    box-shadow: 0 0 12px var(--demo-accent);
    transition: width 260ms ease;
}

.demo-stage {
    min-height: 620px;
}

.demo-chapter {
    --chapter-accent: 97, 217, 255;
    min-height: 620px;
    padding: clamp(22px, 3vw, 38px);
    animation: demo-chapter-in 320ms ease both;
}

.demo-chapter[hidden] {
    display: none;
}

.demo-tone-violet {
    --chapter-accent: 167, 132, 255;
}

.demo-tone-blue {
    --chapter-accent: 96, 166, 255;
}

.demo-tone-amber {
    --chapter-accent: 255, 198, 109;
}

.demo-tone-green {
    --chapter-accent: 108, 230, 177;
}

.demo-tone-rose {
    --chapter-accent: 255, 140, 168;
}

.demo-tone-indigo {
    --chapter-accent: 127, 148, 255;
}

.demo-tone-orange {
    --chapter-accent: 255, 169, 92;
}

@keyframes demo-chapter-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.demo-chapter-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.demo-chapter-eyebrow {
    margin-bottom: 10px;
    color: rgb(var(--chapter-accent));
    font-size: 0.66rem;
}

.demo-chapter-eyebrow span {
    padding-left: 10px;
    color: #8398ad;
    border-left: 1px solid rgba(var(--chapter-accent), 0.35);
}

.demo-chapter-header h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.demo-chapter-header p:last-child {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--demo-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.demo-chapter-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: rgb(var(--chapter-accent));
    font-size: 1.35rem;
    border: 1px solid rgba(var(--chapter-accent), 0.25);
    border-radius: 16px;
    background: rgba(var(--chapter-accent), 0.08);
}

.demo-visual {
    min-height: 335px;
    margin-top: 28px;
    padding: clamp(18px, 2.5vw, 28px);
    border: 1px solid rgba(var(--chapter-accent), 0.17);
    border-radius: 20px;
    background:
        radial-gradient(circle at 80% 0%, rgba(var(--chapter-accent), 0.08), transparent 45%),
        rgba(4, 13, 24, 0.42);
}

.demo-loop-visual {
    display: grid;
    grid-template-columns: repeat(7, auto);
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.demo-loop-node {
    display: grid;
    width: min(155px, 15vw);
    min-width: 112px;
    min-height: 160px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(var(--chapter-accent), 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.demo-loop-node > i {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: rgb(var(--chapter-accent));
    border-radius: 14px;
    background: rgba(var(--chapter-accent), 0.11);
}

.demo-loop-node strong {
    font-size: 0.88rem;
}

.demo-loop-node small {
    color: var(--demo-muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.demo-loop-arrow {
    color: rgba(var(--chapter-accent), 0.5);
    font-size: 0.7rem;
}

.demo-architecture-visual {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-content: center;
}

.demo-architecture-layer {
    position: relative;
    display: grid;
    min-height: 210px;
    align-content: end;
    gap: 9px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(var(--chapter-accent), 0.18);
    border-radius: 17px;
    background: linear-gradient(155deg, rgba(var(--chapter-accent), 0.12), rgba(255, 255, 255, 0.025));
}

.demo-architecture-layer::before {
    position: absolute;
    top: -28px;
    right: -18px;
    width: 110px;
    height: 110px;
    border: 1px solid rgba(var(--chapter-accent), 0.2);
    border-radius: 50%;
    content: "";
}

.demo-architecture-layer > span {
    position: absolute;
    top: 16px;
    left: 18px;
    color: rgba(var(--chapter-accent), 0.72);
    font: 800 0.72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-architecture-layer strong {
    font-size: 0.92rem;
}

.demo-architecture-layer small {
    color: var(--demo-muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.demo-architecture-bus {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    color: rgb(var(--chapter-accent));
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.demo-architecture-bus i {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--chapter-accent), 0.5));
}

.demo-architecture-bus i:last-child {
    background: linear-gradient(90deg, rgba(var(--chapter-accent), 0.5), transparent);
}

.demo-notebook-visual {
    display: grid;
    gap: 10px;
    align-content: center;
}

.demo-notebook-topline {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.demo-notebook-topline > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff7596;
}

.demo-notebook-topline > span:nth-child(2) {
    background: #ffc66d;
}

.demo-notebook-topline > span:nth-child(3) {
    margin-right: 9px;
    background: #6ce6b1;
}

.demo-notebook-topline strong {
    font-size: 0.78rem;
}

.demo-notebook-topline small {
    margin-left: auto;
    color: var(--demo-muted);
    font: 0.68rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-notebook-block {
    display: grid;
    grid-template-columns: 30px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px 14px;
    border: 1px solid rgba(var(--chapter-accent), 0.16);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.demo-notebook-block > span {
    color: #6f879d;
    font: 700 0.66rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-notebook-block > i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: rgb(var(--chapter-accent));
    border-radius: 11px;
    background: rgba(var(--chapter-accent), 0.09);
}

.demo-notebook-block > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.demo-notebook-block strong {
    font-size: 0.82rem;
}

.demo-notebook-block small {
    overflow: hidden;
    color: #8aa2ba;
    font: 0.67rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-notebook-block em {
    padding: 5px 8px;
    color: var(--demo-success);
    font-size: 0.63rem;
    font-style: normal;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(108, 230, 177, 0.08);
}

.demo-gate-visual {
    display: grid;
    gap: 22px;
    align-content: center;
}

.demo-gate-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.demo-gate-path span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 11px;
    color: #8298ad;
    font-size: 0.69rem;
    border: 1px solid var(--demo-border);
    border-radius: 10px;
}

.demo-gate-path > i {
    color: #516679;
    font-size: 0.6rem;
}

.demo-gate-path span.is-done {
    color: var(--demo-success);
    border-color: rgba(108, 230, 177, 0.2);
    background: rgba(108, 230, 177, 0.05);
}

.demo-gate-path span.is-active {
    color: var(--demo-warning);
    border-color: rgba(255, 198, 109, 0.35);
    background: rgba(255, 198, 109, 0.08);
    box-shadow: 0 0 24px rgba(255, 198, 109, 0.08);
}

.demo-gate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.demo-gate-grid > div {
    display: grid;
    min-height: 145px;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(var(--chapter-accent), 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.demo-gate-grid i {
    color: rgb(var(--chapter-accent));
    font-size: 1.15rem;
}

.demo-gate-grid strong {
    font-size: 0.8rem;
}

.demo-gate-grid small {
    color: var(--demo-muted);
    font-size: 0.69rem;
    line-height: 1.5;
}

.demo-simulation-visual {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
}

.demo-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-chart-toolbar > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--demo-success);
    font-size: 0.7rem;
    font-weight: 800;
}

.demo-chart-toolbar > span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--demo-success);
}

.demo-chart-toolbar button {
    min-height: 34px;
    padding: 0 12px;
    color: #c7ffe4;
    font-size: 0.7rem;
    border-color: rgba(108, 230, 177, 0.25);
    background: rgba(108, 230, 177, 0.07);
}

.demo-chart {
    width: 100%;
    height: 225px;
}

.demo-grid-lines path {
    fill: none;
    stroke: rgba(157, 205, 255, 0.12);
    stroke-width: 1;
}

#demo-chart-line {
    fill: none;
    stroke: rgb(var(--chapter-accent));
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 7px rgba(var(--chapter-accent), 0.42));
    transition: stroke-dashoffset 1.6s ease;
}

#demo-chart-point {
    fill: #06101c;
    stroke: rgb(var(--chapter-accent));
    stroke-width: 3;
    opacity: 0;
    transition: opacity 240ms ease 1.35s;
}

.demo-simulation-visual.is-running #demo-chart-line {
    animation: demo-chart-pulse 900ms ease-in-out infinite alternate;
}

.demo-simulation-visual.is-complete #demo-chart-point {
    opacity: 1;
}

@keyframes demo-chart-pulse {
    to {
        filter: drop-shadow(0 0 12px rgba(var(--chapter-accent), 0.68));
    }
}

.demo-metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.demo-metric-row > div {
    display: grid;
    gap: 5px;
    padding: 10px 13px;
    border: 1px solid rgba(var(--chapter-accent), 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
}

.demo-metric-row span {
    color: var(--demo-muted);
    font-size: 0.65rem;
}

.demo-metric-row strong {
    color: rgb(var(--chapter-accent));
    font: 750 0.84rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-evidence-visual {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: center;
}

.demo-run-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(var(--chapter-accent), 0.2);
    border-radius: 17px;
    background: rgba(var(--chapter-accent), 0.05);
}

.demo-run-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--demo-success);
    font-size: 0.67rem;
    font-weight: 800;
}

.demo-run-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--demo-success);
}

.demo-run-card > strong {
    overflow-wrap: anywhere;
    font: 750 0.84rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-run-card > small {
    color: var(--demo-muted);
    font-size: 0.7rem;
    line-height: 1.5;
}

.demo-run-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.demo-run-tags span {
    padding: 5px 7px;
    color: #d9c0ca;
    font: 0.6rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    border: 1px solid rgba(var(--chapter-accent), 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
}

.demo-evidence-ladder {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.demo-evidence-ladder::before {
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: 18px;
    width: 1px;
    content: "";
    background: rgba(var(--chapter-accent), 0.18);
}

.demo-evidence-ladder li {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 58px;
}

.demo-evidence-ladder li > i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #71889c;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    background: #0b1c2d;
}

.demo-evidence-ladder li.is-reached > i {
    color: rgb(var(--chapter-accent));
    border-color: rgba(var(--chapter-accent), 0.3);
}

.demo-evidence-ladder li > span {
    display: grid;
    gap: 4px;
}

.demo-evidence-ladder strong {
    font-size: 0.75rem;
}

.demo-evidence-ladder small {
    color: var(--demo-muted);
    font-size: 0.65rem;
    line-height: 1.4;
}

.demo-collaboration-visual {
    position: relative;
    min-height: 360px;
}

.demo-context-core,
.demo-context-node {
    position: absolute;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid rgba(var(--chapter-accent), 0.22);
    background: #0b1b2d;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.demo-context-core {
    top: 50%;
    left: 50%;
    width: 190px;
    height: 190px;
    gap: 7px;
    align-content: center;
    padding: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.demo-context-core::before,
.demo-context-core::after {
    position: absolute;
    inset: -44px;
    border: 1px dashed rgba(var(--chapter-accent), 0.18);
    border-radius: 50%;
    content: "";
}

.demo-context-core::after {
    inset: -88px;
}

.demo-context-core > i {
    color: rgb(var(--chapter-accent));
    font-size: 1.7rem;
}

.demo-context-core strong {
    font-size: 0.84rem;
}

.demo-context-core small {
    color: var(--demo-muted);
    font: 0.62rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-context-node {
    width: 124px;
    min-height: 68px;
    grid-template-columns: 28px 1fr;
    gap: 7px;
    padding: 10px;
    border-radius: 14px;
}

.demo-context-node i {
    color: rgb(var(--chapter-accent));
}

.demo-context-node strong {
    font-size: 0.68rem;
}

.demo-context-node.is-workspace {
    top: 7%;
    left: 12%;
}

.demo-context-node.is-ai {
    top: 7%;
    right: 12%;
}

.demo-context-node.is-team {
    bottom: 7%;
    left: 12%;
}

.demo-context-node.is-registry {
    right: 12%;
    bottom: 7%;
}

.demo-delivery-visual {
    display: grid;
    gap: 20px;
    align-content: center;
}

.demo-delivery-flow {
    display: grid;
    grid-template-columns: repeat(7, auto);
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.demo-delivery-flow > div {
    display: grid;
    width: min(145px, 14vw);
    min-width: 105px;
    min-height: 145px;
    place-items: center;
    align-content: center;
    gap: 9px;
    padding: 13px;
    text-align: center;
    border: 1px solid rgba(var(--chapter-accent), 0.2);
    border-radius: 16px;
    background: rgba(var(--chapter-accent), 0.045);
}

.demo-delivery-flow > i {
    color: rgba(var(--chapter-accent), 0.5);
    font-size: 0.7rem;
}

.demo-delivery-flow div > i {
    color: rgb(var(--chapter-accent));
    font-size: 1.3rem;
}

.demo-delivery-flow strong {
    font-size: 0.78rem;
}

.demo-delivery-flow small {
    color: var(--demo-muted);
    font-size: 0.65rem;
    line-height: 1.4;
}

.demo-delivery-outcome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #ffe8d2;
    border: 1px solid rgba(var(--chapter-accent), 0.2);
    border-radius: 13px;
    background: rgba(var(--chapter-accent), 0.06);
}

.demo-delivery-outcome > i {
    color: rgb(var(--chapter-accent));
}

.demo-delivery-outcome span {
    display: grid;
    gap: 3px;
}

.demo-delivery-outcome strong {
    font-size: 0.76rem;
}

.demo-delivery-outcome small {
    color: var(--demo-muted);
    font-size: 0.67rem;
}

.demo-chapter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 18px;
}

.demo-chapter-proof {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 660px;
    color: #91a7bb;
    font-size: 0.7rem;
    line-height: 1.5;
}

.demo-chapter-proof i {
    margin-top: 2px;
    color: rgb(var(--chapter-accent));
}

.demo-live-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    color: rgb(var(--chapter-accent));
    font-size: 0.7rem;
    border-color: rgba(var(--chapter-accent), 0.24);
    background: rgba(var(--chapter-accent), 0.06);
}

.demo-stage-navigation {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 10px 18px;
    border-top: 1px solid var(--demo-border);
}

.demo-stage-navigation .demo-button {
    min-width: 118px;
    min-height: 40px;
    font-size: 0.78rem;
}

.demo-keyboard-hint {
    color: #74899d;
    text-align: center;
    font-size: 0.66rem;
}

.demo-keyboard-hint span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

kbd {
    min-width: 22px;
    padding: 3px 5px;
    color: #9fb5c9;
    font: 650 0.65rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    border: 1px solid var(--demo-border);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.demo-guide {
    padding: 20px;
}

.demo-guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    color: var(--demo-accent);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(var(--demo-accent-rgb), 0.22);
    border-radius: 999px;
    background: rgba(var(--demo-accent-rgb), 0.07);
}

[data-demo-mode="visitor"] .presenter-only,
[data-demo-mode="presenter"] .visitor-only {
    display: none;
}

.demo-guide h2 {
    margin: 18px 0 0;
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.demo-guide > p {
    min-height: 132px;
    margin: 13px 0 0;
    color: #b0c1d1;
    font-size: 0.8rem;
    line-height: 1.72;
}

.demo-guide-focus {
    display: grid;
    gap: 7px;
    padding: 13px;
    border: 1px solid rgba(var(--demo-accent-rgb), 0.18);
    border-radius: 12px;
    background: rgba(var(--demo-accent-rgb), 0.055);
}

.demo-guide-focus span {
    color: var(--demo-accent);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-guide-focus strong {
    font-size: 0.74rem;
    line-height: 1.5;
}

.demo-guide-tips {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--demo-border);
}

.demo-guide-tips h3 {
    margin: 0 0 10px;
    color: #92a7ba;
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-guide-tips ul {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    color: #91a5b8;
    font-size: 0.68rem;
    line-height: 1.45;
    list-style: none;
}

.demo-guide-tips li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 7px;
}

.demo-guide-tips i {
    color: var(--demo-accent);
    text-align: center;
}

.demo-presenter-state {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    margin-top: 18px;
    padding: 12px;
    border: 1px solid rgba(255, 198, 109, 0.2);
    border-radius: 12px;
    background: rgba(255, 198, 109, 0.055);
}

.demo-presenter-state > i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--demo-warning);
}

.demo-presenter-state > span {
    display: grid;
    gap: 4px;
}

.demo-presenter-state strong {
    font-size: 0.7rem;
}

.demo-presenter-state small {
    color: var(--demo-muted);
    font-size: 0.62rem;
    line-height: 1.45;
}

.demo-presenter-state > a {
    grid-column: 2;
    color: var(--demo-warning);
    font-size: 0.66rem;
}

.demo-presenter-state.is-ready {
    border-color: rgba(108, 230, 177, 0.2);
    background: rgba(108, 230, 177, 0.055);
}

.demo-presenter-state.is-ready > i {
    color: var(--demo-success);
}

.demo-toast {
    position: fixed;
    z-index: 1000;
    right: 22px;
    bottom: 72px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    color: #e9f7ff;
    font-size: 0.78rem;
    border: 1px solid var(--demo-border-strong);
    border-radius: 12px;
    background: rgba(10, 28, 44, 0.96);
    box-shadow: var(--demo-shadow);
}

body.demo-showcase-page:fullscreen {
    overflow: auto;
}

body.demo-showcase-page:fullscreen .ws-shell-topbar,
body.demo-showcase-page:fullscreen .ws-shell-bottom {
    display: none;
}

body.demo-showcase-page:fullscreen .demo-main {
    width: min(1680px, calc(100% - 32px));
    padding-top: 16px;
}

body.demo-showcase-page:fullscreen .demo-welcome {
    display: none;
}

body.demo-showcase-page:fullscreen .demo-console {
    margin-top: 0;
}

@media (max-width: 1260px) {
    .demo-console {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .demo-guide {
        position: static;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto 1fr minmax(220px, 0.7fr);
        align-items: start;
        gap: 16px;
    }

    .demo-guide h2 {
        margin-top: 2px;
    }

    .demo-guide > p {
        min-height: 0;
        margin: 0;
    }

    .demo-guide-focus {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .demo-guide-tips,
    .demo-presenter-state {
        display: none;
    }
}

@media (max-width: 980px) {
    .demo-main {
        width: min(100% - 28px, 920px);
        padding-top: 24px;
    }

    .demo-welcome {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .demo-welcome-visual {
        display: none;
    }

    .demo-console {
        grid-template-columns: 1fr;
    }

    .demo-chapter-rail {
        position: static;
        overflow: hidden;
    }

    .demo-chapter-list {
        grid-auto-columns: minmax(185px, 0.72fr);
        grid-auto-flow: column;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .demo-chapter-list::-webkit-scrollbar {
        display: none;
    }

    .demo-chapter-list li {
        scroll-snap-align: start;
    }

    .demo-reset-link {
        width: auto;
        margin-left: 8px;
    }

    .demo-guide {
        grid-column: auto;
    }

    .demo-loop-visual,
    .demo-delivery-flow {
        grid-template-columns: repeat(4, minmax(125px, 1fr));
        overflow-x: auto;
        justify-content: start;
    }

    .demo-loop-node,
    .demo-delivery-flow > div {
        width: auto;
    }

    .demo-loop-arrow,
    .demo-delivery-flow > i {
        display: none;
    }

    .demo-gate-path {
        justify-content: start;
        overflow-x: auto;
    }

    .demo-gate-path span {
        flex: 0 0 auto;
    }
}

@media (max-width: 720px) {
    .demo-main {
        width: min(100% - 20px, 680px);
        padding: 14px 0 34px;
    }

    .demo-welcome {
        gap: 20px;
        padding: 25px 18px;
        border-radius: 20px;
    }

    .demo-welcome h1 {
        font-size: clamp(2.1rem, 12vw, 3.2rem);
    }

    .demo-subtitle {
        margin-top: 17px;
        font-size: 0.93rem;
    }

    .demo-mode-picker {
        grid-template-columns: 1fr;
        margin-top: 22px;
    }

    .demo-mode-card {
        min-height: 76px;
    }

    .demo-welcome-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .demo-welcome-actions .demo-button {
        width: 100%;
    }

    .demo-safety-banner {
        align-items: flex-start;
        font-size: 0.76rem;
    }

    .demo-stage-toolbar {
        align-items: flex-start;
        min-height: 82px;
        padding-top: 13px;
    }

    .demo-stage-tools {
        display: grid;
        gap: 5px;
    }

    .demo-icon-button {
        justify-content: flex-start;
    }

    .demo-stage {
        min-height: 0;
    }

    .demo-chapter {
        min-height: 0;
        padding: 22px 15px;
    }

    .demo-chapter-header {
        grid-template-columns: 1fr;
    }

    .demo-chapter-icon {
        display: none;
    }

    .demo-visual {
        min-height: 300px;
        padding: 14px;
    }

    .demo-loop-visual,
    .demo-delivery-flow {
        grid-template-columns: repeat(4, 155px);
    }

    .demo-architecture-visual {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-architecture-layer {
        min-height: 155px;
    }

    .demo-notebook-topline small,
    .demo-notebook-block em {
        display: none;
    }

    .demo-notebook-block {
        grid-template-columns: 24px 34px minmax(0, 1fr);
    }

    .demo-gate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-chart {
        height: 190px;
    }

    .demo-evidence-visual {
        grid-template-columns: 1fr;
    }

    .demo-collaboration-visual {
        min-height: 450px;
    }

    .demo-context-node.is-workspace,
    .demo-context-node.is-ai,
    .demo-context-node.is-team,
    .demo-context-node.is-registry {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .demo-context-node.is-workspace {
        top: 2%;
        margin-left: -76px;
    }

    .demo-context-node.is-ai {
        top: 2%;
        margin-left: 76px;
    }

    .demo-context-node.is-team {
        top: auto;
        bottom: 2%;
        margin-left: -76px;
    }

    .demo-context-node.is-registry {
        top: auto;
        bottom: 2%;
        margin-left: 76px;
    }

    .demo-context-core {
        width: 164px;
        height: 164px;
    }

    .demo-chapter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .demo-live-link {
        align-self: stretch;
    }

    .demo-stage-navigation {
        grid-template-columns: 1fr 1fr;
        padding: 10px 14px;
    }

    .demo-stage-navigation .demo-button {
        min-width: 0;
    }

    .demo-keyboard-hint {
        display: none;
    }

    .demo-guide {
        display: block;
    }

    .demo-guide > p {
        margin-top: 12px;
    }

    .demo-guide-focus {
        margin-top: 14px;
    }

    .demo-metric-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .demo-architecture-visual,
    .demo-gate-grid {
        grid-template-columns: 1fr;
    }

    .demo-architecture-layer,
    .demo-gate-grid > div {
        min-height: 125px;
    }

    .demo-context-node {
        width: 112px;
    }

    .demo-context-node.is-workspace,
    .demo-context-node.is-team {
        margin-left: -62px;
    }

    .demo-context-node.is-ai,
    .demo-context-node.is-registry {
        margin-left: 62px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
