:root {
    color-scheme: dark;
    --bg: #070917;
    --surface: #111629;
    --surface-2: #171d34;
    --text: #f4f7fb;
    --muted: #aab3c5;
    --line: rgba(255, 255, 255, 0.12);
    --primary: #7c5cff;
    --secondary: #28d5ff;
    --success: #43d98b;
    --warning: #ffbf47;
    --danger: #ff6b91;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 8px;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #eef3fb;
    --text: #121827;
    --muted: #586174;
    --line: rgba(15, 23, 42, 0.12);
    --shadow: 0 24px 60px rgba(27, 39, 71, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(124, 92, 255, 0.20), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(40, 213, 255, 0.15), transparent 24rem),
        linear-gradient(145deg, var(--bg), #0d1327 70%, var(--bg));
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

[data-theme="light"] body {
    background:
        radial-gradient(circle at 15% 0%, rgba(124, 92, 255, 0.13), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(40, 213, 255, 0.12), transparent 24rem),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.fa-solid,
.fa-regular,
.fa-brands {
    display: inline-block;
    min-width: 1em;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 56px;
}

.topbar,
.toolbar-row,
.module-card-top,
.module-card-footer,
.sim-header,
.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 0;
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.eyebrow,
.module-subtitle,
.progress-panel small,
.module-card p,
.lesson-hero p {
    color: var(--muted);
}

.icon-button,
.ghost-button,
.solid-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button {
    width: 44px;
    background: var(--surface);
    color: var(--text);
}

.ghost-button {
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.solid-button {
    padding: 0 16px;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #1fbbe0);
    color: white;
    font-weight: 750;
}

.solid-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.icon-button:hover,
.ghost-button:hover,
.solid-button:hover {
    transform: translateY(-1px);
    border-color: rgba(40, 213, 255, 0.45);
}

.dashboard-hero,
.lesson-hero,
.internet-simulator,
.lesson-block,
.complete-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: var(--shadow);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin: 28px 0 28px;
    padding: clamp(26px, 5vw, 54px);
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 800;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(2.3rem, 6vw, 4.8rem);
    line-height: 1;
}

h2 {
    font-size: 1.35rem;
}

.progress-panel {
    align-self: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.progress-panel span {
    display: block;
    margin-bottom: 12px;
    font-size: 3rem;
    font-weight: 900;
}

.progress-track {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.progress-track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--secondary), var(--primary));
}

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

.module-card {
    display: flex;
    min-height: 310px;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.module-card.is-locked {
    opacity: 0.58;
}

.module-number,
.status-pill,
.key-sentence,
.vocab-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.module-number {
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--surface-2);
}

.status-pill {
    gap: 6px;
    padding: 7px 10px;
    font-size: 0.78rem;
    background: rgba(124, 92, 255, 0.14);
}

.is-completed .status-pill {
    background: rgba(67, 217, 139, 0.16);
    color: var(--success);
}

.is-locked .status-pill {
    background: rgba(255, 107, 145, 0.12);
    color: var(--danger);
}

.module-card h3 {
    margin: 18px 0 8px;
    font-size: 1.2rem;
    line-height: 1.25;
}

.module-card-footer {
    margin-top: auto;
}

.lesson-layout {
    display: grid;
    gap: 18px;
}

.lesson-hero {
    padding: clamp(24px, 5vw, 48px);
}

.key-sentence {
    padding: 10px 14px;
    background: rgba(255, 191, 71, 0.14);
    color: var(--warning);
}

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

.lesson-block {
    padding: 22px;
}

.lesson-block.wide {
    grid-column: 1 / -1;
}

.lesson-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vocab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.vocab-list span {
    padding: 8px 11px;
    background: var(--surface-2);
}

pre {
    overflow: auto;
    margin: 0;
    border-radius: var(--radius);
    background: #050711;
    color: #dff7ff;
}

pre code {
    display: block;
    padding: 16px;
}

.prompt-box {
    margin-bottom: 14px;
}

.complete-panel {
    padding: 18px;
    text-align: right;
}

.complete-button {
    min-width: 240px;
}

.internet-simulator {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.segmented-control {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.segmented-control button {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    padding: 0 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.segmented-control button.is-active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.url-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.url-bar input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.journey-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(86px, 1fr));
    gap: 10px;
    overflow-x: auto;
    padding: 18px 0 30px;
}

.journey-step {
    display: grid;
    min-height: 92px;
    place-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    text-align: center;
}

.journey-step i {
    font-size: 1.35rem;
}

.journey-step.is-active {
    border-color: var(--secondary);
    color: var(--text);
    background: rgba(40, 213, 255, 0.12);
}

.journey-step.is-done {
    border-color: rgba(67, 217, 139, 0.4);
    color: var(--success);
}

.data-packet {
    position: absolute;
    bottom: 6px;
    left: 8%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 18px rgba(255, 191, 71, 0.85);
    transition: left 550ms ease;
}

.sim-output {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(220px, 0.8fr);
    gap: 16px;
}

.fake-page {
    min-height: 170px;
    padding: 18px;
    border-radius: var(--radius);
    background: #f8fbff;
    color: #152033;
}

.fake-page strong {
    display: block;
    margin-bottom: 8px;
    color: #2b48d9;
}

.fake-page button {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 0 12px;
    background: #28d5ff;
    color: #07101e;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .sim-output {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .app-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .topbar,
    .toolbar-row,
    .sim-header,
    .topbar-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-grid,
    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .url-bar {
        grid-template-columns: 1fr;
    }

    .complete-button,
    .solid-button,
    .ghost-button {
        width: 100%;
    }
}

.lesson-intro,
.accordion,
.sim-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: var(--shadow);
}

.lesson-intro {
    display: grid;
    gap: 16px;
    padding: clamp(22px, 4vw, 34px);
}

.lesson-intro h2 {
    margin-bottom: 0;
}

.intro-pills,
.takeaway-grid,
.sim-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.intro-pills span,
.takeaway-grid span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 13px;
    background: rgba(40, 213, 255, 0.10);
    font-weight: 800;
}

.accordion-list {
    display: grid;
    gap: 14px;
}

.accordion {
    overflow: hidden;
}

.accordion-trigger {
    display: flex;
    width: 100%;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 0 18px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.accordion-trigger span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.02rem;
    font-weight: 850;
}

.accordion-trigger > i:last-child {
    color: var(--muted);
    transition: transform 180ms ease;
}

.accordion.is-open .accordion-trigger > i:last-child {
    transform: rotate(180deg);
}

.accordion-panel {
    display: grid;
    gap: 18px;
    padding: 0 18px 18px;
}

.concept-grid,
.vocab-cards,
.trainer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.concept-grid article,
.vocab-cards article,
.trainer-grid article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface-2);
}

.concept-grid h3,
.vocab-cards h3,
.trainer-grid h3 {
    margin-bottom: 6px;
}

.concept-grid p,
.vocab-cards p {
    color: var(--muted);
}

.clean-steps,
.clean-list {
    margin: 0;
    padding-left: 1.2rem;
}

.clean-steps li,
.clean-list li {
    margin: 8px 0;
}

.trainer-only {
    display: none;
}

.trainer-mode .trainer-only {
    display: block;
}

.trainer-mode .trainer-button {
    border-color: rgba(255, 191, 71, 0.48);
    background: rgba(255, 191, 71, 0.12);
    color: var(--warning);
}

.sim-controls {
    justify-content: flex-end;
}

.sim-controls .ghost-button,
.sim-controls .solid-button {
    min-height: 38px;
    padding: 0 12px;
}

.ghost-button:disabled,
.solid-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.step-counter {
    justify-self: start;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(124, 92, 255, 0.14);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.deluxe-output {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sim-card {
    box-shadow: none;
    padding: 16px;
}

.sim-card h3 {
    margin-bottom: 8px;
}

.sim-card pre {
    min-height: 126px;
}

.vocab-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vocab-cards article {
    min-height: 142px;
}

.module-one-layout .lesson-hero {
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(40, 213, 255, 0.08)),
        color-mix(in srgb, var(--surface) 88%, transparent);
}

@media (max-width: 1000px) {
    .deluxe-output,
    .vocab-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .concept-grid,
    .trainer-grid,
    .deluxe-output,
    .vocab-cards {
        grid-template-columns: 1fr;
    }

    .sim-controls .ghost-button,
    .sim-controls .solid-button {
        width: 100%;
    }
}

.accordion-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.accordion {
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.accordion.is-open {
    border-color: rgba(40, 213, 255, 0.28);
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(40, 213, 255, 0.04)),
        color-mix(in srgb, var(--surface) 92%, transparent);
}

.accordion-trigger {
    transition: background 180ms ease;
}

.accordion.is-open .accordion-trigger {
    background: rgba(40, 213, 255, 0.055);
}

.accordion-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 18px;
    transition: max-height 320ms ease, opacity 220ms ease, padding 260ms ease;
}

.accordion.is-open .accordion-panel {
    opacity: 1;
    padding-bottom: 18px;
}

.accordion-panel[aria-hidden="true"] {
    pointer-events: none;
}

.internet-simulator {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 3vw, 26px);
    background:
        radial-gradient(circle at 20% 10%, rgba(124, 92, 255, 0.20), transparent 26rem),
        radial-gradient(circle at 85% 20%, rgba(40, 213, 255, 0.14), transparent 22rem),
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface-2) 86%, transparent));
}

.internet-simulator::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.internet-simulator > * {
    position: relative;
    z-index: 1;
}

.sim-browser-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

[data-theme="light"] .sim-browser-shell {
    background: rgba(255, 255, 255, 0.72);
}

.browser-dots {
    display: flex;
    gap: 7px;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) {
    background: #ff6b91;
}

.browser-dots span:nth-child(2) {
    background: #ffbf47;
}

.browser-dots span:nth-child(3) {
    background: #43d98b;
}

.sim-browser-shell .url-bar {
    grid-template-columns: auto auto minmax(0, 1fr);
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.24);
}

[data-theme="light"] .sim-browser-shell .url-bar {
    background: rgba(15, 23, 42, 0.06);
}

.sim-browser-shell .url-bar i {
    color: var(--success);
}

#simProtocol {
    color: var(--muted);
    white-space: nowrap;
}

.sim-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: stretch;
}

.webapp-scene {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 14% 42%, rgba(124, 92, 255, 0.18), transparent 17rem),
        radial-gradient(circle at 82% 44%, rgba(40, 213, 255, 0.16), transparent 18rem),
        radial-gradient(circle at 52% 80%, rgba(67, 217, 139, 0.10), transparent 16rem),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        rgba(0, 0, 0, 0.20);
    background-size: auto, auto, auto, 34px 34px, 34px 34px, auto;
}

[data-theme="light"] .webapp-scene {
    background:
        radial-gradient(circle at 14% 42%, rgba(124, 92, 255, 0.12), transparent 17rem),
        radial-gradient(circle at 82% 44%, rgba(40, 213, 255, 0.12), transparent 18rem),
        radial-gradient(circle at 52% 80%, rgba(67, 217, 139, 0.10), transparent 16rem),
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        rgba(255, 255, 255, 0.72);
    background-size: auto, auto, auto, 34px 34px, 34px 34px, auto;
}

.scene-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-lines path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 0.45;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    transition: stroke 220ms ease, stroke-width 220ms ease, filter 220ms ease, opacity 220ms ease;
}

[data-theme="light"] .scene-lines path {
    stroke: rgba(15, 23, 42, 0.18);
}

.scene-lines path.is-active {
    stroke: var(--secondary);
    stroke-width: 1.2;
    filter: drop-shadow(0 0 8px rgba(40, 213, 255, 0.70));
}

.scene-lines path.is-done {
    stroke: rgba(67, 217, 139, 0.68);
    stroke-width: 0.8;
}

.scene-node {
    position: absolute;
    display: grid;
    width: clamp(122px, 15vw, 178px);
    min-height: 122px;
    place-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%);
    transition: transform 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease, opacity 240ms ease;
}

[data-theme="light"] .scene-node {
    background: rgba(255, 255, 255, 0.80);
}

.scene-node i {
    color: var(--secondary);
    font-size: 1.55rem;
}

.scene-node strong,
.scene-node small {
    display: block;
}

.scene-node small {
    color: var(--muted);
    line-height: 1.35;
}

.scene-node.is-active {
    border-color: rgba(40, 213, 255, 0.72);
    background: rgba(40, 213, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(40, 213, 255, 0.18), 0 24px 80px rgba(40, 213, 255, 0.22);
    transform: translate(-50%, -50%) scale(1.05);
}

.scene-node.is-done {
    border-color: rgba(67, 217, 139, 0.48);
    background: rgba(67, 217, 139, 0.10);
}

.node-browser {
    left: 15%;
    top: 47%;
}

.node-dns {
    left: 50%;
    top: 17%;
}

.node-server {
    left: 83%;
    top: 42%;
}

.node-php {
    left: 80%;
    top: 78%;
}

.node-mysql {
    left: 50%;
    top: 80%;
}

.node-display {
    left: 15%;
    top: 75%;
}

.webapp-scene .data-packet {
    position: absolute;
    left: 15%;
    top: 47%;
    bottom: auto;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--warning), var(--danger));
    color: #07101e;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 54px rgba(255, 107, 145, 0.34), 0 0 24px rgba(255, 191, 71, 0.45);
    font-size: 1.35rem;
    line-height: 1;
    transition: left 520ms ease, top 520ms ease, opacity 160ms ease, transform 220ms ease;
    z-index: 5;
}

.webapp-scene .data-packet.is-visible {
    opacity: 1;
}

.webapp-scene .data-packet.is-label {
    width: 58px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0;
}

.webapp-scene .data-packet.is-code-bundle {
    width: 86px;
    height: 52px;
    padding: 7px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 0.62rem;
    line-height: 1.15;
    white-space: normal;
}

.webapp-scene .data-packet.is-moving {
    transform: translate(-50%, -50%) scale(1.06);
}

.webapp-scene .data-packet.is-pulsing {
    animation: packetPulse 520ms ease;
}

@keyframes packetPulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.18);
    }
}

.micro-scene-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.micro-card,
.micro-terminal,
.micro-dialogue,
.micro-transform,
.micro-response,
.micro-browser-process,
.micro-final-page {
    position: absolute;
    width: min(360px, 42vw);
    border: 1px solid rgba(40, 213, 255, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(40, 213, 255, 0.08)),
        rgba(7, 10, 24, 0.88);
    color: #f7fbff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.30), 0 0 30px rgba(40, 213, 255, 0.12);
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.98);
    animation: microAppear 260ms ease forwards;
}

[data-theme="light"] .micro-card,
[data-theme="light"] .micro-terminal,
[data-theme="light"] .micro-dialogue,
[data-theme="light"] .micro-transform,
[data-theme="light"] .micro-response,
[data-theme="light"] .micro-browser-process,
[data-theme="light"] .micro-final-page {
    border-color: rgba(124, 92, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.10), rgba(40, 213, 255, 0.08)),
        rgba(255, 255, 255, 0.94);
    color: #121827;
    box-shadow: 0 22px 54px rgba(27, 39, 71, 0.16), 0 0 24px rgba(40, 213, 255, 0.12);
}

.micro-card,
.micro-dialogue,
.micro-response,
.micro-transform {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.micro-kicker {
    color: var(--secondary);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.micro-card p,
.micro-dialogue p,
.micro-response p,
.micro-terminal p,
.micro-browser-process p {
    margin-bottom: 0;
    color: rgba(244, 247, 251, 0.78);
}

[data-theme="light"] .micro-card p,
[data-theme="light"] .micro-dialogue p,
[data-theme="light"] .micro-response p,
[data-theme="light"] .micro-terminal p,
[data-theme="light"] .micro-browser-process p {
    color: #4b5563;
}

.micro-terminal {
    overflow: hidden;
    background: rgba(3, 7, 18, 0.94);
}

[data-theme="light"] .micro-terminal {
    background: #07111f;
    color: #f7fbff;
}

.micro-window-bar {
    display: grid;
    grid-template-columns: 10px 10px 10px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0 11px;
    background: rgba(255, 255, 255, 0.06);
}

.micro-window-bar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.micro-window-bar span:nth-child(1) { background: #ff5f57; }
.micro-window-bar span:nth-child(2) { background: #ffbd2e; }
.micro-window-bar span:nth-child(3) { background: #28c840; }

.micro-window-bar strong {
    justify-self: end;
    color: rgba(244, 247, 251, 0.70);
    font-size: 0.74rem;
    font-weight: 900;
}

.micro-terminal code,
.micro-terminal pre,
.micro-dialogue pre,
.micro-transform pre,
.micro-response pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.45;
}

.micro-terminal code {
    display: grid;
    gap: 4px;
    padding: 12px;
    white-space: pre-wrap;
}

.micro-terminal-body {
    overflow: hidden;
}

.micro-terminal p {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 10px 12px 12px;
}

.micro-line {
    display: block;
    opacity: 0;
    transform: translateY(4px);
    animation: microLine 220ms ease forwards;
}

.micro-domain {
    color: #facc15;
}

.micro-ip {
    color: #67e8f9;
    font-weight: 900;
}

.micro-json {
    max-height: 160px;
    overflow: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 12px;
    color: #c4f1ff;
    opacity: 0;
    animation: microLine 260ms ease forwards;
}

.micro-sql-terminal .micro-terminal-body {
    max-height: 300px;
}

.micro-sql-terminal .micro-sql-scroll {
    animation: sqlSoftScroll 8s ease-in-out 1.5s infinite alternate;
    will-change: transform;
}

.micro-sql-terminal .micro-json {
    max-height: none;
    overflow: visible;
}

.micro-dialogue {
    border-color: rgba(255, 191, 71, 0.38);
}

.micro-dialogue::before {
    content: "";
    position: absolute;
    top: 22px;
    right: -8px;
    width: 14px;
    height: 14px;
    border-top: 1px solid rgba(255, 191, 71, 0.38);
    border-right: 1px solid rgba(255, 191, 71, 0.38);
    background: inherit;
    transform: rotate(45deg);
}

.micro-dialogue pre,
.micro-transform pre,
.micro-response pre {
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.22);
    color: #dff7ff;
    white-space: pre-wrap;
}

[data-theme="light"] .micro-dialogue pre,
[data-theme="light"] .micro-transform pre,
[data-theme="light"] .micro-response pre {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.92);
    color: #0f172a;
}

.micro-transform {
    justify-items: center;
    text-align: center;
}

.micro-pill,
.micro-bundle span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(40, 213, 255, 0.34);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(40, 213, 255, 0.11);
    color: var(--secondary);
    font-weight: 950;
}

.micro-transform > i {
    color: var(--secondary);
}

.micro-bundle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.micro-browser-process {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.micro-browser-process span {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(40, 213, 255, 0.22), rgba(124, 92, 255, 0.70), rgba(67, 217, 139, 0.55));
    transform-origin: left;
    animation: codeScan 900ms ease infinite alternate;
}

.micro-browser-process span:nth-child(2) { width: 86%; animation-delay: 120ms; }
.micro-browser-process span:nth-child(3) { width: 72%; animation-delay: 240ms; }
.micro-browser-process span:nth-child(4) { width: 92%; animation-delay: 360ms; }

.micro-final-page {
    overflow: hidden;
    width: min(380px, 46vw);
    background: #f8fbff;
    color: #111827;
}

.micro-final-browserbar {
    display: grid;
    grid-template-columns: 10px 10px 10px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    background: #eef2f7;
    border-bottom: 1px solid #d8dee8;
}

.micro-final-browserbar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.micro-final-browserbar span:nth-child(1) { background: #ff5f57; }
.micro-final-browserbar span:nth-child(2) { background: #ffbd2e; }
.micro-final-browserbar span:nth-child(3) { background: #28c840; }

.micro-final-browserbar em {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 5px 10px;
    background: #ffffff;
    color: #475569;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.micro-final-header {
    display: grid;
    gap: 3px;
    padding: 14px;
    background: linear-gradient(135deg, #16213f, #2563eb 58%, #0ea5e9);
    color: white;
}

.micro-final-header strong {
    font-size: 1.24rem;
}

.micro-final-header span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 800;
}

.micro-final-skeleton,
.micro-final-style {
    height: 10px;
    margin: 13px 14px 0;
    border-radius: 999px;
    opacity: 0;
    animation: microLine 240ms ease forwards;
}

.micro-final-skeleton {
    width: 72%;
    background: rgba(15, 23, 42, 0.16);
}

.micro-final-style {
    width: 46%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.micro-final-cards {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.micro-final-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: white;
    opacity: 0;
    transform: translateY(5px);
    animation: microLine 240ms ease forwards;
}

.micro-final-card h5,
.micro-final-card p {
    margin-bottom: 0;
}

.micro-final-card h5 {
    color: #111827;
}

.micro-final-card p {
    color: #526070;
    font-size: 0.84rem;
}

.micro-final-button {
    min-height: 34px;
    margin: 0 14px 14px;
    border: 0;
    border-radius: 10px;
    padding: 0 12px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    font-weight: 900;
    opacity: 0;
    animation: microLine 240ms ease forwards;
}

.micro-at-browser { left: 4%; top: 17%; }
.micro-at-dns { left: 50%; top: 29%; translate: -50% 0; }
.micro-at-server { right: 3%; top: 54%; }
.micro-at-php { left: 4%; top: 58%; }
.micro-at-mysql { left: 4%; top: 3%; translate: 0 0; }
.micro-terminal-wide { width: min(420px, 36vw); }
.micro-at-transform { right: 18%; top: 24%; }
.micro-at-response { left: 34%; top: 22%; }
.micro-at-browser-code { left: 4%; top: 18%; }
.micro-at-display { right: 3%; bottom: 4%; }

.micro-delay-0 { animation-delay: 80ms; }
.micro-delay-1 { animation-delay: 260ms; }
.micro-delay-2 { animation-delay: 480ms; }
.micro-delay-3 { animation-delay: 700ms; }
.micro-delay-4 { animation-delay: 920ms; }
.micro-delay-5 { animation-delay: 1140ms; }
.micro-delay-6 { animation-delay: 1360ms; }

@keyframes microAppear {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes microLine {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes codeScan {
    from {
        transform: scaleX(0.32);
        opacity: 0.58;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes sqlSoftScroll {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-94px);
    }
}

.sim-step-rail {
    display: grid;
    align-content: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .sim-step-rail {
    background: rgba(255, 255, 255, 0.72);
}

.sim-step-rail ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sim-step-rail li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.045);
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.sim-step-rail li span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
    font-weight: 900;
}

.sim-step-rail li.is-active {
    border-color: rgba(124, 92, 255, 0.62);
    background: rgba(124, 92, 255, 0.17);
    color: var(--text);
}

.sim-step-rail li.is-done {
    border-color: rgba(67, 217, 139, 0.42);
    background: rgba(67, 217, 139, 0.10);
    color: var(--success);
}

.tech-exchange {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .tech-exchange {
    background: rgba(255, 255, 255, 0.72);
}

.tech-header h3 {
    margin-bottom: 0;
}

.tech-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -2px;
}

.tech-tab {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 11px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: pointer;
    font-weight: 850;
}

.tech-tab.is-active {
    border-color: rgba(124, 92, 255, 0.62);
    background: rgba(124, 92, 255, 0.20);
    color: var(--text);
}

.tech-code {
    min-height: 260px;
    margin-top: 2px;
}

.tech-code[hidden],
.tech-preview[hidden] {
    display: none;
}

.tech-preview {
    display: block;
}

.fake-browser-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbff;
    color: #152033;
}

.fake-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #121827, #4338ca 58%, #0ea5e9);
    color: white;
}

.fake-preview-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.fake-preview-body article {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    background: white;
}

.fake-preview-body h4 {
    margin: 0 0 6px;
}

.fake-preview-body p {
    margin-bottom: 0;
    color: #465166;
}

@media (max-width: 1080px) {
    .sim-browser-shell,
    .sim-stage-grid {
        grid-template-columns: 1fr;
    }

    .sim-controls {
        justify-content: stretch;
    }

    .webapp-scene {
        min-height: 700px;
    }

    .scene-node {
        width: min(230px, 72vw);
    }

    .node-browser {
        left: 50%;
        top: 10%;
    }

    .node-dns {
        left: 50%;
        top: 24%;
    }

    .node-server {
        left: 50%;
        top: 38%;
    }

    .node-php {
        left: 50%;
        top: 52%;
    }

    .node-mysql {
        left: 50%;
        top: 66%;
    }

    .node-display {
        left: 50%;
        top: 82%;
    }

    .scene-lines {
        opacity: 0.42;
    }

    .micro-card,
    .micro-terminal,
    .micro-dialogue,
    .micro-transform,
    .micro-response,
    .micro-browser-process,
    .micro-final-page,
    .micro-terminal-wide {
        width: min(360px, 84vw);
    }

    .micro-at-browser,
    .micro-at-browser-code {
        left: 6%;
        top: 16%;
    }

    .micro-at-dns {
        left: 50%;
        top: 31%;
    }

    .micro-at-server {
        right: 6%;
        top: 43%;
    }

    .micro-at-php {
        right: auto;
        left: 6%;
        top: 58%;
    }

    .micro-at-mysql {
        left: 6%;
        top: 3%;
        translate: 0 0;
    }

    .micro-at-transform {
        right: 6%;
        top: 58%;
    }

    .micro-at-response {
        left: 6%;
        top: 28%;
    }

    .micro-at-display {
        right: 6%;
        left: auto;
        bottom: 3%;
    }
}

@media (max-width: 760px) {
    .accordion-actions,
    .sim-controls {
        flex-direction: column;
    }

    .accordion-actions .ghost-button {
        width: 100%;
    }

    .webapp-scene {
        min-height: 820px;
    }

    .micro-card,
    .micro-terminal,
    .micro-dialogue,
    .micro-transform,
    .micro-response,
    .micro-browser-process,
    .micro-final-page,
    .micro-terminal-wide {
        width: calc(100% - 24px);
        max-height: 260px;
        overflow: auto;
    }

    .micro-at-browser,
    .micro-at-browser-code,
    .micro-at-server,
    .micro-at-php,
    .micro-at-transform,
    .micro-at-response,
    .micro-at-display {
        right: auto;
        left: 12px;
    }

    .micro-at-dns,
    .micro-at-mysql {
        left: 12px;
        translate: 0 0;
    }

    .micro-at-browser,
    .micro-at-browser-code { top: 17%; }
    .micro-at-dns { top: 30%; }
    .micro-at-server,
    .micro-at-response { top: 42%; }
    .micro-at-php,
    .micro-at-transform { top: 55%; }
    .micro-at-mysql { top: 70%; }
    .micro-at-display { bottom: 2%; }

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

    .fake-preview-body {
        grid-template-columns: 1fr;
    }
}

.interactive-lab {
    display: grid;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background:
        radial-gradient(circle at 16% 10%, rgba(124, 92, 255, 0.13), transparent 20rem),
        radial-gradient(circle at 88% 18%, rgba(40, 213, 255, 0.10), transparent 18rem),
        color-mix(in srgb, var(--surface) 92%, transparent);
}

.lab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lab-header h3 {
    margin-bottom: 0;
}

.lab-badge,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(40, 213, 255, 0.10);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.server-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.server-role-card {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 390px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 18% 14%, rgba(40, 213, 255, 0.16), transparent 12rem),
        var(--surface-2);
    background-size: 28px 28px, 28px 28px, auto, auto;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.server-role-card::after {
    content: "";
    position: absolute;
    inset: auto 0 -38% 18%;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.server-role-online {
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 82% 16%, rgba(67, 217, 139, 0.14), transparent 12rem),
        var(--surface-2);
    background-size: 28px 28px, 28px 28px, auto, auto;
}

[data-theme="light"] .server-role-card {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 18% 14%, rgba(40, 213, 255, 0.18), transparent 12rem),
        rgba(255, 255, 255, 0.82);
    background-size: 28px 28px, 28px 28px, auto, auto;
}

[data-theme="light"] .server-role-online {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 82% 16%, rgba(67, 217, 139, 0.18), transparent 12rem),
        rgba(255, 255, 255, 0.82);
    background-size: 28px 28px, 28px 28px, auto, auto;
}

.server-role-top,
.server-role-actions,
.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.server-role-header .solid-button {
    flex: 0 0 auto;
}

.server-role-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 1px solid rgba(40, 213, 255, 0.34);
    border-radius: 16px;
    background: rgba(40, 213, 255, 0.12);
    color: var(--secondary);
    font-size: 1.45rem;
}

.server-role-badge,
.server-role-access {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.server-role-access {
    border-radius: 10px;
    margin-bottom: 0;
}

.server-role-card h3,
.live-preview-panel h3,
.live-code-panel h3 {
    margin-bottom: 0;
}

.server-role-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.server-role-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.server-role-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 11px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.server-role-list i {
    color: var(--muted);
}

.server-role-lab.show-common [data-compare-kind="common"] {
    border-color: rgba(67, 217, 139, 0.58);
    background: rgba(67, 217, 139, 0.13);
    box-shadow: 0 0 24px rgba(67, 217, 139, 0.12);
    transform: translateX(3px);
}

.server-role-lab.show-common [data-compare-kind="common"] i {
    color: var(--success);
}

.server-role-lab.show-diff [data-compare-kind="diff"] {
    border-color: rgba(255, 191, 71, 0.62);
    background: rgba(255, 191, 71, 0.13);
    box-shadow: 0 0 24px rgba(255, 191, 71, 0.12);
    transform: translateX(3px);
}

.server-role-lab.show-diff [data-compare-kind="diff"] i {
    color: var(--warning);
}

.server-role-lab.show-common .server-role-card {
    transform: translateY(-2px);
}

.server-role-legend {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
}

.server-role-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 11px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    opacity: 0.58;
    transition: opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}

.server-role-lab.show-common .server-role-legend span:first-child,
.server-role-lab.show-diff .server-role-legend span:last-child {
    opacity: 1;
    border-color: rgba(40, 213, 255, 0.38);
    background: rgba(40, 213, 255, 0.10);
    color: var(--text);
}

.server-comparison-list {
    display: grid;
    gap: 8px;
}

.server-comparison-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(8px);
    transition: max-height 260ms ease, padding 260ms ease, opacity 220ms ease, transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.server-comparison-row.is-visible {
    max-height: 240px;
    border-color: rgba(40, 213, 255, 0.28);
    padding: 13px 14px;
    opacity: 1;
    transform: translateY(0);
}

.server-comparison-row strong {
    color: var(--secondary);
}

.server-comparison-row span {
    color: var(--muted);
}

.server-sensitive-alert {
    display: grid;
    gap: 9px;
    border: 1px solid rgba(255, 191, 71, 0.44);
    border-radius: var(--radius);
    padding: 16px;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 191, 71, 0.18), transparent 10rem),
        rgba(255, 191, 71, 0.08);
}

.server-sensitive-alert h3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 0;
    color: var(--warning);
}

.server-sensitive-alert p {
    margin-bottom: 0;
    color: var(--muted);
}

.term-help {
    display: inline;
    border: 0;
    border-bottom: 1px dotted currentColor;
    padding: 0;
    background: transparent;
    color: var(--text);
    cursor: help;
    font-weight: 900;
    text-align: left;
}

.term-help:focus-visible {
    outline: 2px solid rgba(40, 213, 255, 0.48);
    outline-offset: 3px;
}

.smart-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: min(280px, calc(100vw - 24px));
    border: 1px solid rgba(40, 213, 255, 0.42);
    border-radius: 12px;
    padding: 11px 13px;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(40, 213, 255, 0.10)),
        rgba(7, 9, 23, 0.96);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), 0 0 28px rgba(40, 213, 255, 0.13);
    color: #f4f7fb;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 6px, 0) scale(0.98);
    transition: opacity 160ms ease, transform 160ms ease;
}

.smart-tooltip::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 14px;
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(40, 213, 255, 0.42);
    border-left: 1px solid rgba(40, 213, 255, 0.42);
    background: rgba(17, 22, 41, 0.96);
    transform: rotate(45deg);
}

.smart-tooltip.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.smart-tooltip.is-flipped-x::after {
    right: 14px;
    left: auto;
}

.smart-tooltip.is-flipped-y::after {
    top: auto;
    bottom: -6px;
    border-top: 0;
    border-left: 0;
    border-right: 1px solid rgba(40, 213, 255, 0.42);
    border-bottom: 1px solid rgba(40, 213, 255, 0.42);
}

[data-theme="light"] .smart-tooltip {
    border-color: rgba(124, 92, 255, 0.30);
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.10), rgba(40, 213, 255, 0.08)),
        rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(27, 39, 71, 0.18), 0 0 24px rgba(40, 213, 255, 0.12);
    color: #121827;
}

[data-theme="light"] .smart-tooltip::after {
    border-color: rgba(124, 92, 255, 0.30);
    background: rgba(255, 255, 255, 0.98);
}

.live-toggle-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.live-switch {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.live-switch input {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
}

.live-switch input::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--muted);
    transition: transform 180ms ease, background 180ms ease;
}

.live-switch input:checked {
    border-color: rgba(40, 213, 255, 0.62);
    background: rgba(40, 213, 255, 0.22);
}

.live-switch input:checked::before {
    background: var(--secondary);
    transform: translateX(18px);
}

.live-anatomy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 16px;
}

.live-preview-panel,
.live-code-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface-2);
}

.panel-title-row span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.live-preview {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 18% 12%, rgba(124, 92, 255, 0.20), transparent 13rem),
        radial-gradient(circle at 88% 18%, rgba(40, 213, 255, 0.16), transparent 13rem),
        rgba(2, 6, 23, 0.28);
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

[data-theme="light"] .live-preview {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 18% 12%, rgba(124, 92, 255, 0.16), transparent 13rem),
        radial-gradient(circle at 88% 18%, rgba(40, 213, 255, 0.14), transparent 13rem),
        rgba(255, 255, 255, 0.76);
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

.demo-browser-bar {
    display: grid;
    grid-template-columns: 12px 12px 12px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(2, 6, 23, 0.38);
}

[data-theme="light"] .demo-browser-bar {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.78);
}

.demo-window-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.demo-window-dot.is-red { background: #ff5f57; }
.demo-window-dot.is-orange { background: #ffbd2e; }
.demo-window-dot.is-green { background: #28c840; }

.demo-url {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 11px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-empty-state {
    display: grid;
    min-height: 300px;
    place-items: center;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    font-weight: 850;
}

[data-theme="light"] .live-empty-state {
    border-color: rgba(15, 23, 42, 0.18);
}

.live-empty-state[hidden],
.demo-webapp[hidden],
.live-static-note[hidden],
.live-php-note[hidden] {
    display: none;
}

.demo-webapp {
    display: grid;
    gap: 14px;
}

.live-preview.is-styled .demo-webapp {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 18px;
    padding: 18px;
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(219, 234, 254, 0.94));
    background-size: 30px 30px, 30px 30px, auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 22px 48px rgba(2, 6, 23, 0.24);
    color: #0f172a;
}

.live-preview.is-styled .demo-webapp::before {
    content: "page affichée par le navigateur";
    position: absolute;
    top: 10px;
    right: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
}

.demo-hero,
.demo-card,
.demo-clock,
.demo-articles article,
.live-static-note,
.live-php-note {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.demo-hero {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.live-preview.is-styled .demo-hero,
.live-preview.is-styled .demo-clock,
.live-preview.is-styled .demo-articles article,
.live-preview.is-styled .live-static-note,
.live-preview.is-styled .live-php-note {
    border-color: rgba(15, 23, 42, 0.13);
    background: rgba(255, 255, 255, 0.78);
    color: #0f172a;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.demo-kicker,
.demo-message,
.live-static-note,
.live-php-note,
.demo-articles span {
    color: var(--muted);
}

.live-preview.is-styled .demo-kicker,
.live-preview.is-styled .demo-message,
.live-preview.is-styled .live-static-note,
.live-preview.is-styled .live-php-note,
.live-preview.is-styled .demo-articles span {
    color: #475569;
}

.demo-kicker,
.demo-card-label {
    margin-bottom: 0;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.demo-hero h4 {
    margin-bottom: 0;
    font-size: 1.75rem;
}

.demo-hero p {
    margin-bottom: 0;
}

.live-preview.is-styled .demo-hero h4,
.live-preview.is-styled .demo-articles strong {
    color: #0f172a;
}

.demo-button {
    justify-self: start;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    font-weight: 900;
}

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

.demo-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.26), rgba(40, 213, 255, 0.16)),
        rgba(255, 255, 255, 0.08);
}

.demo-card h5 {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.demo-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.demo-clock {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 12px;
}

.demo-clock strong {
    color: var(--secondary);
    font-variant-numeric: tabular-nums;
}

.live-static-note,
.live-php-note {
    margin-bottom: 0;
    padding: 12px;
}

.demo-articles {
    display: grid;
    gap: 8px;
}

.demo-articles[data-article-mode="generated"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-preview.is-raw .demo-articles[data-article-mode="generated"] {
    grid-template-columns: 1fr;
}

.demo-articles article {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.live-preview.is-raw {
    background: #ffffff;
}

.live-preview.is-raw .demo-webapp {
    gap: 8px;
    color: #111827;
    font-family: Arial, sans-serif;
}

.live-preview.is-raw .demo-hero,
.live-preview.is-raw .demo-card,
.live-preview.is-raw .demo-clock,
.live-preview.is-raw .demo-articles article,
.live-preview.is-raw .live-static-note,
.live-preview.is-raw .live-php-note {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #111827;
}

.live-preview.is-raw .demo-kicker,
.live-preview.is-raw .demo-message,
.live-preview.is-raw .live-static-note,
.live-preview.is-raw .live-php-note,
.live-preview.is-raw .demo-card p,
.live-preview.is-raw .demo-articles span {
    color: #111827;
}

.live-preview.is-raw .demo-button {
    min-height: auto;
    border: 2px outset buttonborder;
    border-radius: 0;
    padding: 2px 8px;
    background: buttonface;
    color: buttontext;
    font-weight: 400;
}

.live-code-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.live-code-tab {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: pointer;
    font-weight: 850;
}

.live-code-tab.is-active {
    border-color: rgba(40, 213, 255, 0.62);
    background: rgba(40, 213, 255, 0.13);
    color: var(--text);
}

.live-explanation {
    margin-bottom: 0;
    color: var(--muted);
}

.live-code-output {
    min-height: 198px;
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
}

.note-app-panel {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(40, 213, 255, 0.22);
    border-radius: 16px;
    padding: 14px;
    background:
        radial-gradient(circle at 92% 12%, rgba(40, 213, 255, 0.16), transparent 8rem),
        rgba(2, 6, 23, 0.28);
}

[data-theme="light"] .live-preview.is-styled .demo-webapp {
    background:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 255, 0.94));
    background-size: 30px 30px, 30px 30px, auto;
}

.live-preview.is-styled .note-app-panel {
    border-color: rgba(124, 92, 255, 0.22);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .note-app-panel {
    background:
        radial-gradient(circle at 92% 12%, rgba(40, 213, 255, 0.14), transparent 8rem),
        rgba(255, 255, 255, 0.78);
}

.note-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    align-items: center;
}

.note-form-row input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font: inherit;
}

.live-preview.is-styled .note-form-row input {
    border-color: rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.90);
    color: #0f172a;
}

.live-preview.is-styled .note-form-row input::placeholder {
    color: #64748b;
}

.note-form-row input:disabled {
    opacity: 0.55;
}

.note-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
}

.note-form-row .demo-button,
.note-refresh {
    width: 100%;
}

.note-refresh:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.note-flow {
    display: grid;
    justify-items: center;
    gap: 6px;
    max-width: 210px;
    margin: 0 auto;
}

.note-flow > i {
    color: rgba(40, 213, 255, 0.68);
}

.note-flow span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 900;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.note-flow span.is-active {
    border-color: rgba(67, 217, 139, 0.62);
    background: rgba(67, 217, 139, 0.14);
    color: var(--text);
    box-shadow: 0 0 24px rgba(67, 217, 139, 0.16);
    transform: scale(1.04);
}

.note-feedback {
    margin-bottom: 0;
    color: var(--muted);
    font-weight: 800;
}

.data-exchange-panel {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(40, 213, 255, 0.26);
    border-radius: var(--radius);
    padding: 14px;
    background:
        radial-gradient(circle at 16% 12%, rgba(40, 213, 255, 0.14), transparent 8rem),
        rgba(255, 255, 255, 0.045);
}

[data-theme="light"] .data-exchange-panel {
    background:
        radial-gradient(circle at 16% 12%, rgba(40, 213, 255, 0.13), transparent 8rem),
        rgba(255, 255, 255, 0.82);
}

.simulated-db-panel {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(124, 92, 255, 0.24);
    border-radius: var(--radius);
    padding: 14px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        rgba(255, 255, 255, 0.05);
    background-size: 24px 24px;
}

[data-theme="light"] .simulated-db-panel {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        rgba(255, 255, 255, 0.78);
    background-size: 24px 24px;
}

.note-db-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.note-db-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px;
}

.note-db-table th,
.note-db-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}

.note-db-table th {
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.note-db-table tr:last-child td {
    border-bottom: 0;
}

.db-explainer-grid,
.json-explainer-grid,
.json-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.db-explainer-grid p,
.json-explainer-grid p {
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.db-explainer-grid strong,
.json-explainer-grid strong {
    color: var(--text);
}

.live-preview.is-raw .note-app-panel,
.live-preview.is-raw .note-flow span {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #111827;
    box-shadow: none;
}

.live-preview.is-raw .note-app-panel {
    gap: 8px;
}

.live-preview.is-raw .note-form-row {
    display: block;
}

.live-preview.is-raw .note-form-row input,
.live-preview.is-raw .note-form-row button {
    width: auto;
    min-height: auto;
    margin: 0 4px 4px 0;
}

.live-preview.is-raw .note-flow {
    align-items: start;
    justify-items: start;
    margin: 0;
}

.live-preview.is-raw .note-flow > i,
.live-preview.is-raw .note-feedback {
    color: #111827;
}

.file-lab-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    gap: 16px;
}

.file-house {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 12% 18%, rgba(124, 92, 255, 0.18), transparent 13rem),
        radial-gradient(circle at 88% 16%, rgba(40, 213, 255, 0.14), transparent 12rem),
        var(--surface-2);
    background-size: 26px 26px, 26px 26px, auto, auto, auto;
}

[data-theme="light"] .file-house {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 12% 18%, rgba(124, 92, 255, 0.15), transparent 13rem),
        radial-gradient(circle at 88% 16%, rgba(40, 213, 255, 0.13), transparent 12rem),
        rgba(255, 255, 255, 0.76);
    background-size: 26px 26px, 26px 26px, auto, auto, auto;
}

.file-house-roof {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(40, 213, 255, 0.32);
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(40, 213, 255, 0.10);
    font-weight: 900;
}

.file-house-roof i {
    color: var(--secondary);
}

.file-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.file-card {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    text-align: center;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.file-card i {
    color: var(--secondary);
    font-size: 1.45rem;
}

.file-card span {
    overflow-wrap: anywhere;
    font-weight: 900;
}

.file-card.is-active {
    border-color: rgba(40, 213, 255, 0.66);
    background: rgba(40, 213, 255, 0.13);
    box-shadow: 0 0 28px rgba(40, 213, 255, 0.13);
    transform: translateY(-2px);
}

.file-detail {
    position: relative;
    overflow: hidden;
}

.file-detail::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.14);
    pointer-events: none;
}

.json-transform-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.json-raw-panel,
.json-result-panel,
.json-array-demo,
.json-compare-grid article {
    display: grid;
    align-content: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface-2);
}

.json-pipeline {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    min-width: 132px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
}

.json-pipeline i {
    color: var(--secondary);
}

.json-code,
.json-compare-grid pre {
    display: block;
    width: 100%;
    margin: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #06111f;
    color: #e6f4ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

[data-theme="light"] .json-code,
[data-theme="light"] .json-compare-grid pre {
    background: #ffffff;
    color: #0f172a;
}

.json-editor {
    min-height: 172px;
    resize: vertical;
    caret-color: var(--secondary);
}

.json-editor.is-error {
    border-color: rgba(255, 107, 145, 0.70);
    box-shadow: 0 0 0 3px rgba(255, 107, 145, 0.12);
}

.json-editor-feedback {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.json-result-card {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 210px;
    border: 1px solid rgba(40, 213, 255, 0.24);
    border-radius: 18px;
    padding: 18px;
    background:
        radial-gradient(circle at 88% 14%, rgba(40, 213, 255, 0.22), transparent 9rem),
        linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(40, 213, 255, 0.12)),
        rgba(255, 255, 255, 0.07);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.json-result-card.is-updating {
    box-shadow: 0 0 34px rgba(40, 213, 255, 0.20);
    transform: scale(1.025);
}

.json-result-card h4,
.json-result-card p {
    margin-bottom: 0;
}

.compact-header {
    margin-bottom: 0;
}

.json-array-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 12px;
    align-items: stretch;
}

.json-card-stack {
    display: grid;
    gap: 10px;
}

.json-card-stack article {
    display: grid;
    align-content: center;
    gap: 5px;
    min-height: 58px;
    border: 1px solid rgba(40, 213, 255, 0.24);
    border-radius: 12px;
    padding: 12px;
    background: rgba(40, 213, 255, 0.09);
    font-weight: 900;
}

.json-card-stack h4,
.json-card-stack p {
    margin-bottom: 0;
}

.json-card-stack p {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.json-compare-grid h3 {
    margin-bottom: 0;
}

.anatomy-layout,
.tool-layout,
.bug-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 16px;
}

.project-tree,
.tool-table,
.bug-list {
    display: grid;
    gap: 10px;
}

.tree-folder,
.tree-file,
.tool-card,
.bug-card,
.lab-detail,
.bug-console {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.tree-folder {
    padding: 13px;
    color: var(--muted);
    font-weight: 850;
}

.tree-file,
.tool-card,
.bug-card {
    display: grid;
    width: 100%;
    align-items: center;
    gap: 8px;
    border-color: var(--line);
    padding: 14px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.tree-file {
    grid-template-columns: 24px minmax(0, 1fr);
}

.tree-file small {
    grid-column: 2;
    color: var(--muted);
}

.tool-card,
.bug-card {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 58px;
}

.tree-file.is-active,
.tool-card.is-active,
.bug-card.is-active {
    border-color: rgba(40, 213, 255, 0.62);
    background: rgba(40, 213, 255, 0.13);
}

.lab-detail,
.bug-console {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
}

.detail-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.detail-list dt {
    color: var(--secondary);
    font-weight: 900;
}

.detail-list dd {
    margin: 0 0 8px;
    color: var(--muted);
}

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

.bug-answer {
    border: 1px solid rgba(67, 217, 139, 0.38);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(67, 217, 139, 0.10);
}

.bug-answer p:last-child {
    margin-bottom: 0;
}

.bug-answer[hidden] {
    display: none;
}

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

.prompt-example {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.prompt-example span {
    color: var(--muted);
}

.prompt-example.is-active {
    border-color: rgba(40, 213, 255, 0.62);
    background: rgba(40, 213, 255, 0.12);
}

.prompt-example.is-bad.is-active {
    border-color: rgba(255, 107, 145, 0.58);
    background: rgba(255, 107, 145, 0.10);
}

.prompt-example.is-good.is-active {
    border-color: rgba(67, 217, 139, 0.52);
    background: rgba(67, 217, 139, 0.10);
}

.codex-feedback .prompt-box {
    margin-bottom: 0;
}

.start-method {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.start-method article {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--surface-2);
}

.start-method strong {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.2rem;
}

.start-method span {
    font-weight: 900;
}

.start-method p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.start-method[hidden] {
    display: none;
}

.mission-progress {
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.mission-progress div {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--secondary), var(--primary));
    transition: width 220ms ease;
}

.mission-checklist {
    display: grid;
    gap: 9px;
}

.mission-checklist label {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface-2);
}

.mission-checklist input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--secondary);
}

.mission-checklist label:has(input:checked) {
    border-color: rgba(67, 217, 139, 0.42);
    background: rgba(67, 217, 139, 0.10);
}

.mind-map {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        rgba(0, 0, 0, 0.16);
    background-size: 32px 32px;
}

.mind-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(124, 92, 255, 0.12);
    font-weight: 900;
}

.mind-formula strong {
    color: var(--secondary);
}

.mind-formula span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

[data-theme="light"] .mind-map {
    background:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        rgba(255, 255, 255, 0.72);
    background-size: 32px 32px;
}

.mind-map::before,
.mind-map::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 58%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(40, 213, 255, 0.52), transparent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.mind-map::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.mind-node {
    position: absolute;
    min-width: 118px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 13px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
    transform: translate(-50%, -50%);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    z-index: 1;
}

.mind-node.is-active {
    border-color: rgba(40, 213, 255, 0.68);
    background: rgba(40, 213, 255, 0.14);
    box-shadow: 0 0 34px rgba(40, 213, 255, 0.18);
    transform: translate(-50%, -50%) scale(1.06);
}

.mind-center {
    left: 50%;
    top: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    z-index: 2;
}

.mind-browser { left: 18%; top: 28%; }
.mind-dns { left: 50%; top: 16%; }
.mind-server { left: 82%; top: 28%; }
.mind-php { left: 80%; top: 70%; }
.mind-mysql { left: 50%; top: 84%; }
.mind-code { left: 18%; top: 70%; }
.mind-local { left: 50%; top: 33%; }

.mind-detail {
    min-height: 140px;
}

.visual-summary-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.visual-summary-flow article {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background:
        radial-gradient(circle at 90% 12%, rgba(40, 213, 255, 0.16), transparent 9rem),
        var(--surface-2);
}

.visual-summary-flow article::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.16);
}

.visual-summary-flow span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
}

.visual-summary-flow i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.visual-summary-flow h3 {
    margin-bottom: 0;
}

.visual-summary-flow p {
    margin-bottom: 0;
    color: var(--muted);
}

.summary-final-sentence {
    margin-bottom: 0;
    border: 1px solid rgba(67, 217, 139, 0.34);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(67, 217, 139, 0.10);
    color: var(--text);
    font-weight: 850;
}

@media (max-width: 1040px) {
    .live-anatomy-grid {
        grid-template-columns: 1fr;
    }

    .live-preview {
        min-height: 420px;
    }

    .visual-summary-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .server-role-grid,
    .live-toggle-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .server-role-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-comparison-row {
        grid-template-columns: 1fr;
    }

    .anatomy-layout,
    .tool-layout,
    .bug-layout,
    .file-lab-layout,
    .json-transform-grid,
    .json-array-grid,
    .json-explainer-grid,
    .json-compare-grid {
        grid-template-columns: 1fr;
    }

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

    .json-pipeline {
        grid-template-columns: repeat(5, auto);
        justify-content: start;
        min-width: 0;
        overflow: auto;
        text-align: left;
    }

    .tool-table {
        grid-template-columns: 1fr;
    }

    .codex-compare,
    .start-method {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .lab-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-role-grid,
    .live-toggle-row,
    .live-code-tabs,
    .note-form-row,
    .file-card-grid,
    .db-explainer-grid {
        grid-template-columns: 1fr;
    }

    .server-role-card {
        min-height: auto;
    }

    .panel-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-preview {
        min-height: 430px;
        padding: 12px;
    }

    .demo-browser-bar {
        grid-template-columns: 12px 12px 12px minmax(0, 1fr);
    }

    .demo-url {
        grid-column: 1 / -1;
        width: 100%;
        padding-inline: 8px;
        font-size: 0.68rem;
    }

    .demo-articles[data-article-mode="generated"],
    .visual-summary-flow {
        grid-template-columns: 1fr;
    }

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

    .demo-clock strong {
        grid-column: 2;
    }

    .mind-map {
        min-height: 560px;
    }

    .mind-node {
        min-width: 130px;
    }

    .mind-browser { left: 50%; top: 14%; }
    .mind-dns { left: 50%; top: 25%; }
    .mind-local { left: 50%; top: 36%; }
    .mind-server { left: 50%; top: 47%; }
    .mind-php { left: 50%; top: 58%; }
    .mind-mysql { left: 50%; top: 69%; }
    .mind-code { left: 50%; top: 80%; }
    .mind-center { left: 50%; top: 92%; }
}
