/* Look and feel taken from the WizardForge launcher (WizardForge/src/WizardForge/App.axaml and Views/MainWindow.axaml). */
:root {
    --wf-bg0: #0B0D13;
    --wf-bg1: #111624;
    --wf-bg2: #160F27;
    --wf-card: #151A29;
    --wf-card-border: #252D45;
    --wf-ghost: #1A2032;
    --wf-ghost-hover: #222A42;
    --wf-ghost-border: #2B3350;
    --wf-text: #E3E9F7;
    --wf-body: #B5BFD6;
    --wf-muted: #8C97B2;
    --wf-subtle: #667090;
    --wf-green: #3DDC97;
    --wf-amber: #FFB454;
    --wf-violet: #A78BFA;
    --wf-title: linear-gradient(90deg, #5CC8FF 0%, #A78BFA 60%, #FF8AD8 100%);
    --bs-body-bg: var(--wf-bg1);
    --bs-body-color: var(--wf-text);
    --bs-link-color-rgb: 167, 139, 250;
    --bs-link-hover-color-rgb: 255, 138, 216;
    --wf-nav: rgba(11, 13, 19, .75);
    --wf-titlebar: rgba(255, 255, 255, .03);
    --wf-icon-bg: #0F1320;
    --wf-input: #0F1320;
    --wf-heading: #FFFFFF;
    --wf-ghost-text: #C9D3EA;
    --wf-shadow: rgba(0, 0, 0, .4);
    --wf-shadow-hover: rgba(0, 0, 0, .6);
    --bs-border-color: var(--wf-card-border);
    color-scheme: dark;
}

/* Light theme: same layout and accents, light surfaces. */
[data-bs-theme="light"] {
    --wf-bg0: #F4F6FC;
    --wf-bg1: #EEF1FA;
    --wf-bg2: #F3EEFB;
    --wf-card: #FFFFFF;
    --wf-card-border: #D9DFEE;
    --wf-ghost: #EEF1F9;
    --wf-ghost-hover: #E2E7F4;
    --wf-ghost-border: #CBD3E8;
    --wf-text: #1B2236;
    --wf-body: #3F4A66;
    --wf-muted: #5C6783;
    --wf-subtle: #7A849E;
    --wf-green: #14A06A;
    --wf-amber: #D98A12;
    --wf-violet: #6D4FE0;
    --wf-title: linear-gradient(90deg, #0B7BC4 0%, #6D4FE0 60%, #D6339A 100%);
    --wf-nav: rgba(255, 255, 255, .8);
    --wf-titlebar: rgba(27, 34, 54, .04);
    --wf-icon-bg: #E8ECF7;
    --wf-input: #FFFFFF;
    --wf-heading: #0F1526;
    --wf-ghost-text: #2B3555;
    --wf-shadow: rgba(40, 50, 90, .12);
    --wf-shadow-hover: rgba(40, 50, 90, .22);
    --bs-link-color-rgb: 109, 79, 224;
    --bs-link-hover-color-rgb: 214, 51, 154;
    color-scheme: light;
}
[data-bs-theme="light"] .btn-outline-primary { --bs-btn-color: #5B3FD0; --bs-btn-border-color: #B9A9F2; }
[data-bs-theme="light"] .wf-card .wash,
[data-bs-theme="light"] .product-hero .wash { opacity: .55; }
.theme-toggle { color: var(--wf-body); border: 1px solid var(--wf-ghost-border); background: var(--wf-ghost); border-radius: 20px; padding: .2rem .7rem; font-size: .8rem; }
.theme-toggle:hover { color: var(--wf-heading); background: var(--wf-ghost-hover); }

html { background: var(--wf-bg0); }
body {
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: var(--wf-text);
    background: linear-gradient(135deg, var(--wf-bg0) 0%, var(--wf-bg1) 55%, var(--wf-bg2) 100%) fixed;
}

.text-muted, .text-body-secondary { color: var(--wf-muted) !important; }
.gradient-title {
    background: var(--wf-title);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -.03em;
    font-weight: 700;
}

/* Top bar */
.wiz-nav { background: var(--wf-nav); border-bottom: 1px solid var(--wf-card-border); backdrop-filter: blur(8px); }
.wiz-nav .navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; }
.wiz-nav .navbar-brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.wiz-nav .nav-link { color: var(--wf-body); }
.wiz-nav .nav-link:hover, .wiz-nav .nav-link:focus { color: var(--wf-heading); }
.wiz-nav .btn-link { text-decoration: none; }
.navbar-toggler { border-color: var(--wf-ghost-border); }
footer { border-color: var(--wf-card-border) !important; }

/* Launcher-style buttons */
.btn-launch {
    color: #0B0D13;
    font-weight: 600;
    font-size: .85rem;
    padding: .55rem 1rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--a, #A78BFA), var(--b, #7C3AED));
}
.btn-launch:hover, .btn-launch:focus { color: #0B0D13; filter: brightness(1.12); }
.btn-ghost {
    color: var(--wf-ghost-text);
    background: var(--wf-ghost);
    border: 1px solid var(--wf-ghost-border);
    border-radius: 10px;
    padding: .5rem .9rem;
    font-size: .85rem;
}
.btn-ghost:hover { color: var(--wf-heading); background: var(--wf-ghost-hover); border-color: var(--wf-ghost-border); }
.btn-primary { --bs-btn-bg: #6D4FE0; --bs-btn-border-color: #6D4FE0; --bs-btn-hover-bg: #7C5CF0; --bs-btn-hover-border-color: #7C5CF0; border-radius: 10px; }
.btn-outline-primary { --bs-btn-color: #C9B8FF; --bs-btn-border-color: #4B3C8F; --bs-btn-hover-bg: #6D4FE0; --bs-btn-hover-border-color: #6D4FE0; border-radius: 10px; }

/* The launcher window frame on the home page */
.wf-window {
    border: 1px solid var(--wf-card-border);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--wf-bg0) 0%, var(--wf-bg1) 55%, var(--wf-bg2) 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(167, 139, 250, .06);
    overflow: hidden;
}
.wf-titlebar {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .9rem;
    background: var(--wf-titlebar);
    border-bottom: 1px solid var(--wf-card-border);
    font-size: .8rem; color: var(--wf-muted);
}
.wf-titlebar img { width: 16px; height: 16px; border-radius: 4px; }
.wf-titlebar .dots { margin-left: auto; display: flex; gap: .45rem; }
.wf-titlebar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--wf-ghost-border); display: block; }
.wf-body { padding: 2rem 2rem 1.25rem; }
.wf-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.wf-header .logo { width: 58px; height: 58px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.wf-header h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: 0; }
.wf-header p { margin: 0; color: var(--wf-muted); font-size: .95rem; }
.wf-pills { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.wf-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .8rem; border-radius: 20px;
    background: var(--wf-ghost); border: 1px solid var(--wf-ghost-border);
    color: var(--wf-ghost-text); font-size: .78rem; font-weight: 600; text-decoration: none;
}
.wf-pill:hover { background: var(--wf-ghost-hover); color: var(--wf-heading); }
.wf-summary { margin: 1.5rem 0 .25rem; font-size: .9rem; font-weight: 600; color: var(--wf-ghost-text); }
.wf-tip { color: var(--wf-subtle); font-size: .75rem; margin: .75rem 0 0; }

/* App cards (272 x 300 in the launcher) */
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 1rem; padding: .5rem 0; }
.wf-card {
    position: relative; display: flex; flex-direction: column; min-height: 300px;
    border-radius: 20px; background: var(--wf-card); border: 1px solid var(--wf-card-border);
    box-shadow: 0 10px 28px var(--wf-shadow); overflow: hidden;
    transition: transform .18s cubic-bezier(.215, .61, .355, 1), box-shadow .18s;
}
.wf-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px var(--wf-shadow-hover); }
.wf-card .strip { height: 4px; background: linear-gradient(135deg, var(--a), var(--b)); }
.wf-card .wash {
    position: absolute; inset: 4px 0 0 0; pointer-events: none;
    background: linear-gradient(135deg, color-mix(in srgb, var(--a) 27%, transparent), color-mix(in srgb, var(--b) 4%, transparent));
}
.wf-card .inner { position: relative; display: flex; flex-direction: column; flex: 1; padding: 1.1rem; }
.wf-card .top { display: flex; align-items: center; gap: .8rem; }
.wf-card .top > div:last-child { min-width: 0; flex: 1; }
.wf-icon {
    flex: none; width: 62px; height: 62px; border-radius: 16px; overflow: hidden; background: var(--wf-icon-bg);
    display: grid; place-items: center;
}
.wf-icon img { width: 100%; height: 100%; object-fit: cover; }
.wf-icon .badge-letter {
    width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.9rem; font-weight: 700; color: #0B0D13;
    background: linear-gradient(135deg, var(--a), var(--b));
}
.wf-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin: 0;
    line-height: 1.2;
    overflow-wrap: break-word;
}
.wf-card .tag { font-size: .78rem; color: var(--wf-muted); }
.wf-card .desc { margin: 1rem 0; font-size: .82rem; line-height: 1.45; color: var(--wf-body); flex: 1; }
.wf-status { display: flex; align-items: center; gap: .45rem; font-size: .78rem; margin-bottom: .6rem; }
.wf-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wf-green); flex: none; }
.wf-status .dot.amber { background: var(--wf-amber); }
.wf-status b { color: var(--wf-text); font-weight: 600; }
.wf-status span { color: var(--wf-muted); }
.wf-actions { display: flex; gap: .4rem; }
.wf-actions .btn-launch { flex: 1; text-align: center; }
.wf-card a.stretched { position: absolute; inset: 0; z-index: 1; }
.wf-card .wf-actions { position: relative; z-index: 2; }

/* Product page */
.product-hero {
    position: relative; overflow: hidden;
    border-radius: 20px; border: 1px solid var(--wf-card-border); background: var(--wf-card);
    box-shadow: 0 10px 28px var(--wf-shadow);
}
.product-hero .strip { height: 4px; background: linear-gradient(135deg, var(--a), var(--b)); }
.product-hero .wash { position: absolute; inset: 4px 0 0 0; pointer-events: none; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 27%, transparent), color-mix(in srgb, var(--b) 4%, transparent)); }
.product-hero .inner { position: relative; padding: 2rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.product-hero .wf-icon { width: 104px; height: 104px; border-radius: 26px; }
.product-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -.03em; margin: 0; color: var(--wf-heading); }
.panel { background: var(--wf-card); border: 1px solid var(--wf-card-border); border-radius: 16px; padding: 1.25rem 1.5rem; }
.panel h2 { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wf-muted); font-weight: 700; margin-bottom: .75rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .3rem 0 .3rem 1.5rem; position: relative; color: var(--wf-body); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .75rem; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); }
.price { font-size: 2rem; font-weight: 700; color: var(--wf-heading); }

/* Forms, tables, alerts on dark */
.form-control, .form-select { background: var(--wf-input); border-color: var(--wf-ghost-border); color: var(--wf-text); }
.form-control:focus, .form-select:focus { background: var(--wf-input); color: var(--wf-heading); border-color: var(--wf-violet); box-shadow: 0 0 0 .2rem rgba(167, 139, 250, .2); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--wf-text); --bs-table-border-color: var(--wf-card-border); }
pre { color: var(--wf-body); }
.bg-light { background: var(--wf-card) !important; }

/* Product tour pages */
.tour-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: .5rem; flex-wrap: wrap; padding: .6rem 0; margin-bottom: 1rem; background: var(--wf-nav); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wf-card-border); }
.tour-nav a { text-decoration: none; padding: .3rem .8rem; border-radius: 20px; font-size: .82rem; font-weight: 600; color: var(--wf-ghost-text); background: var(--wf-ghost); border: 1px solid var(--wf-ghost-border); }
.tour-nav a:hover { color: var(--wf-heading); border-color: var(--a); }
.tour-section { scroll-margin-top: 4.5rem; margin: 2.25rem 0; }
.tour-section h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--wf-heading); margin-bottom: .25rem; }
.lead-in { color: var(--wf-muted); margin-bottom: 1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.feature { position: relative; overflow: hidden; background: var(--wf-card); border: 1px solid var(--wf-card-border); border-radius: 16px; padding: 1.1rem 1.2rem 1.2rem; box-shadow: 0 6px 18px var(--wf-shadow); }
.feature::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--a), var(--b)); }
.feature h3 { font-size: 1rem; font-weight: 700; color: var(--wf-heading); margin: 0 0 .35rem; }
.feature p { color: var(--wf-body); font-size: .88rem; line-height: 1.5; margin: 0 0 .5rem; }
.keycap { display: inline-block; padding: .1rem .55rem; border-radius: 7px; font: 600 .75rem/1.5 ui-monospace, Consolas, monospace; color: var(--wf-ghost-text); background: var(--wf-ghost); border: 1px solid var(--wf-ghost-border); border-bottom-width: 2px; }
.badge-soon { font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; margin-left: .35rem; padding: .1rem .45rem; border-radius: 10px; color: #0B0D13; background: var(--wf-amber); }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.shot { margin: 0; background: var(--wf-card); border: 1px solid var(--wf-card-border); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px var(--wf-shadow); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: .55rem .9rem; font-size: .82rem; color: var(--wf-muted); }
.tour-cta { text-align: center; margin: 3rem 0 1rem; padding: 2rem 1rem; border-radius: 20px; border: 1px solid var(--wf-card-border); background: linear-gradient(135deg, color-mix(in srgb, var(--a) 18%, transparent), color-mix(in srgb, var(--b) 6%, transparent)); }
.tour-cta h2 { font-weight: 700; color: var(--wf-heading); }
.diff h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.diff h3 { font-size: 1rem; font-weight: 700; color: var(--wf-heading); }
.diff p { font-size: .88rem; color: var(--wf-body); }

/* --- Striking Main Website Window & Marketing Showcase --- */
.wf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--wf-violet);
    background: color-mix(in srgb, var(--wf-violet) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--wf-violet) 30%, transparent);
    margin-bottom: 1rem;
}
.wf-hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wf-green);
    box-shadow: 0 0 10px var(--wf-green);
    animation: wf-pulse 2s infinite ease-in-out;
}
@@keyframes wf-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: .7; }
}

.wf-hero-title {
    font-size: clamp(2.1rem, 4.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
}

.wf-hero-subhead {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--wf-heading);
    letter-spacing: -.015em;
    margin-bottom: .85rem;
}

.wf-hero-lead {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.6;
    color: var(--wf-body);
    max-width: 840px;
    margin-bottom: 1.5rem;
}

.wf-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    align-items: center;
    margin-bottom: 2rem;
}

.wf-hero-actions .btn-launch {
    padding: .7rem 1.4rem;
    font-size: .95rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(167, 139, 250, .3);
    transition: transform .18s ease, box-shadow .18s ease;
}
.wf-hero-actions .btn-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(167, 139, 250, .45);
}

.wf-hero-actions .btn-ghost {
    padding: .65rem 1.25rem;
    font-size: .95rem;
    font-weight: 600;
}

@@media (max-width: 768px) {
    .wf-window {
        margin-top: .5rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px;
    }
    .wf-titlebar {
        padding: .45rem .75rem;
        font-size: .75rem;
    }
    .wf-body {
        padding: 1.25rem 1rem 1rem;
    }
    .wf-hero-badge {
        font-size: .75rem;
        padding: .25rem .75rem;
        margin-bottom: .5rem;
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }
    .wf-hero-title {
        font-size: clamp(1.6rem, 6.5vw, 2.3rem);
        line-height: 1.18;
        margin-bottom: .5rem;
    }
    .wf-hero-subhead {
        font-size: 1.05rem;
        margin-bottom: .6rem;
    }
    .wf-hero-lead {
        font-size: .92rem;
        line-height: 1.5;
        margin-bottom: 1.1rem;
    }
    .wf-hero-actions {
        gap: .5rem;
        margin-bottom: 1.25rem;
    }
    .wf-hero-actions .btn-launch,
    .wf-hero-actions .btn-ghost {
        padding: .55rem 1rem;
        font-size: .88rem;
    }
}

/* Feature stats pills */
.wf-stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: .85rem 1.25rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--wf-card) 60%, transparent);
    border: 1px solid var(--wf-card-border);
    margin-bottom: 2.25rem;
}
.wf-stat-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--wf-ghost-text);
}
.wf-stat-item b {
    color: var(--wf-heading);
    font-weight: 700;
}
.wf-stat-item span.icon {
    font-size: 1.1rem;
}

/* --- Interactive Showcase Console --- */
.showcase-console {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 18px;
    box-shadow: 0 20px 60px var(--wf-shadow);
    overflow: hidden;
    margin-bottom: 3rem;
}

.console-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1.1rem;
    background: var(--wf-titlebar);
    border-bottom: 1px solid var(--wf-card-border);
    flex-wrap: wrap;
    gap: .6rem;
}
.console-title-wrap {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--wf-ghost-text);
}
.console-title-wrap img {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

.console-tabs {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.console-tab-btn {
    border: 1px solid var(--wf-ghost-border);
    background: var(--wf-ghost);
    color: var(--wf-ghost-text);
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
}
.console-tab-btn:hover {
    color: var(--wf-heading);
    background: var(--wf-ghost-hover);
    border-color: var(--wf-violet);
}
.console-tab-btn.active {
    background: linear-gradient(135deg, #A78BFA, #7C3AED);
    color: #0B0D13;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(167, 139, 250, .3);
}

.console-body {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 480px;
}
@@media (max-width: 992px) {
    .console-body {
        grid-template-columns: 1fr;
    }
}

/* Left panel: The Wizard & Chess Piece Explorer */
.piece-explorer {
    padding: 1.5rem;
    background: color-mix(in srgb, var(--wf-bg0) 50%, var(--wf-card));
    border-right: 1px solid var(--wf-card-border);
    display: flex;
    flex-direction: column;
}
@@media (max-width: 992px) {
    .piece-explorer {
        border-right: 0;
        border-bottom: 1px solid var(--wf-card-border);
    }
}

.piece-header {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}
.piece-header .wizard-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(167, 139, 250, .35);
    background: var(--wf-icon-bg);
}
.piece-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--wf-heading);
}
.piece-header p {
    font-size: .75rem;
    margin: 0;
    color: var(--wf-muted);
}

.piece-stage {
    position: relative;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--wf-violet) 18%, transparent) 0%, transparent 70%);
    border-radius: 16px;
    border: 1px solid var(--wf-card-border);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.piece-display-img {
    height: 160px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .55));
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.piece-stage:hover .piece-display-img {
    transform: translateY(-6px) scale(1.05);
}

.piece-meta {
    text-align: left;
}
.piece-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin-bottom: .25rem;
}
.piece-role {
    font-size: .8rem;
    color: var(--wf-violet);
    font-weight: 600;
    margin-bottom: .6rem;
}
.piece-desc {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--wf-body);
    margin-bottom: .85rem;
}

.piece-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.25rem;
}
.piece-tag {
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 6px;
    background: var(--wf-ghost);
    border: 1px solid var(--wf-ghost-border);
    color: var(--wf-ghost-text);
}
.piece-tag.highlight {
    background: color-mix(in srgb, var(--wf-green) 15%, transparent);
    border-color: color-mix(in srgb, var(--wf-green) 35%, transparent);
    color: var(--wf-green);
}

.piece-selector-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--wf-muted);
    margin-bottom: .5rem;
}
.piece-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .4rem;
}
.piece-thumb-btn {
    background: var(--wf-ghost);
    border: 1px solid var(--wf-ghost-border);
    border-radius: 10px;
    padding: .35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}
.piece-thumb-btn:hover {
    background: var(--wf-ghost-hover);
    border-color: var(--wf-violet);
    transform: translateY(-2px);
}
.piece-thumb-btn.active {
    border-color: var(--wf-violet);
    background: color-mix(in srgb, var(--wf-violet) 20%, transparent);
    box-shadow: 0 0 10px rgba(167, 139, 250, .4);
}
.piece-thumb-btn img {
    width: 28px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}

/* Right panel: Active Studio Viewport */
.studio-viewport {
    display: flex;
    flex-direction: column;
    background: var(--wf-card);
    position: relative;
}
.viewport-frame {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #080A10;
}
[data-bs-theme="light"] .viewport-frame {
    background: #111624;
}
.viewport-img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
    transition: opacity .25s ease;
}

.viewport-footer {
    padding: .9rem 1.4rem;
    background: var(--wf-titlebar);
    border-top: 1px solid var(--wf-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem;
}
.viewport-info h4 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    color: var(--wf-heading);
}
.viewport-info p {
    font-size: .8rem;
    color: var(--wf-muted);
    margin: 0;
}

/* --- Creation & Manufacturing Pipeline --- */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2.5rem;
}
.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .75rem;
}
.section-header p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--wf-body);
}

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 3.5rem;
    position: relative;
}
.pipeline-card {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 16px;
    padding: 1.35rem 1.2rem;
    box-shadow: 0 6px 18px var(--wf-shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease;
}
.pipeline-card:hover {
    transform: translateY(-4px);
    border-color: var(--wf-violet);
}
.pipeline-step-badge {
    position: absolute;
    top: -12px;
    left: 1.2rem;
    background: linear-gradient(135deg, #5CC8FF, #A78BFA);
    color: #0B0D13;
    font-size: .75rem;
    font-weight: 800;
    padding: .15rem .6rem;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(92, 200, 255, .3);
}
.pipeline-card-icon {
    font-size: 2rem;
    margin: .6rem 0 .5rem;
}
.pipeline-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin-bottom: .25rem;
}
.pipeline-app-tag {
    font-size: .75rem;
    font-weight: 600;
    color: var(--wf-violet);
    margin-bottom: .6rem;
}
.pipeline-card p {
    font-size: .83rem;
    line-height: 1.45;
    color: var(--wf-body);
    margin: 0;
    flex: 1;
}

/* --- Interactive Workflow Pipeline Studio --- */
.pipe-studio-box {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 12px 32px var(--wf-shadow);
    margin-bottom: 2.25rem;
    position: relative;
    overflow: hidden;
}
.pipe-prompt-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(15, 19, 32, 0.7);
    border: 1.5px solid rgba(92, 200, 255, 0.25);
    border-radius: 14px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pipe-prompt-container:focus-within {
    border-color: var(--wf-cyan);
    box-shadow: 0 0 20px rgba(92, 200, 255, 0.25);
}
.pipe-prompt-icon {
    font-size: 1.25rem;
    color: var(--wf-cyan);
    display: flex;
    align-items: center;
}
.pipe-prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--wf-heading);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
}
.pipe-prompt-input::placeholder {
    color: var(--wf-body);
    opacity: 0.7;
}
.pipe-prompt-btn {
    background: linear-gradient(135deg, #38B6FF, #7C3AED);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.pipe-prompt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(56, 182, 255, 0.4);
}
.pipe-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    margin-bottom: 1.5rem;
    align-items: center;
}
.pipe-presets-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wf-body);
    margin-right: 0.35rem;
}
.pipe-preset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--wf-card-border);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wf-heading);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pipe-preset-btn:hover {
    border-color: var(--wf-cyan);
    color: var(--wf-cyan);
    background: rgba(92, 200, 255, 0.08);
}
.pipe-preset-btn.active {
    background: rgba(92, 200, 255, 0.15);
    border-color: var(--wf-cyan);
    color: var(--wf-cyan);
    box-shadow: 0 0 10px rgba(92, 200, 255, 0.2);
}

/* Stepper Track */
.pipe-stepper-track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.pipe-step-node {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--wf-card-border);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
    position: relative;
    user-select: none;
}
.pipe-step-node:hover {
    border-color: var(--wf-violet);
    transform: translateY(-2px);
}
.pipe-step-node.active {
    background: rgba(167, 139, 250, 0.1);
    border-color: var(--wf-cyan);
    box-shadow: 0 4px 16px rgba(92, 200, 255, 0.25);
}
.pipe-step-node.completed .pipe-step-num {
    background: #10B981;
    color: #fff;
}
.pipe-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pipe-step-num {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--wf-heading);
}
.pipe-step-node.active .pipe-step-num {
    background: linear-gradient(135deg, #38B6FF, #A78BFA);
    color: #0B0D13;
}
.pipe-step-status-icon {
    font-size: 0.75rem;
    opacity: 0.7;
}
.pipe-step-node.active .pipe-step-status-icon {
    opacity: 1;
    color: var(--wf-cyan);
}
.pipe-step-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pipe-step-app {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--wf-violet);
}

/* Workbench Grid */
.pipe-workbench {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.25rem;
    background: #0B0D14;
    border: 1px solid var(--wf-card-border);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
}
@media (max-width: 991px) {
    .pipe-stepper-track {
        grid-template-columns: repeat(2, 1fr);
    }
    .pipe-workbench {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .pipe-stepper-track {
        grid-template-columns: 1fr;
    }
}

/* Viewport Pane */
.pipe-canvas-pane {
    background: #080A10;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 420px;
}
.pipe-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 19, 32, 0.6);
}
.pipe-stage-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--wf-cyan);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pipe-stage-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wf-cyan);
    box-shadow: 0 0 8px var(--wf-cyan);
    animation: pipePulse 1.8s infinite;
}
@keyframes pipePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}
.pipe-view-modes {
    display: flex;
    gap: 0.35rem;
}
.pipe-mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--wf-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pipe-mode-btn.active {
    background: rgba(92, 200, 255, 0.15);
    border-color: var(--wf-cyan);
    color: var(--wf-cyan);
}

.pipe-canvas-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center center;
    overflow: hidden;
}
.pipe-display-img {
    max-width: 270px;
    max-height: 270px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.pipe-canvas-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.pipe-telemetry-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: rgba(11, 14, 22, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
    color: #8C97B2;
    font-family: monospace;
}

/* Inspector Pane */
.pipe-inspector-pane {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    justify-content: space-between;
}
.pipe-inspector-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.pipe-inspector-app-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--wf-violet);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pipe-inspector-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin: 0;
}
.pipe-inspector-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--wf-body);
    margin: 0;
}

/* Data Flow Card */
.pipe-flow-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
}
.pipe-flow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.pipe-flow-label {
    color: #8C97B2;
    font-size: 0.75rem;
}
.pipe-flow-val {
    color: var(--wf-heading);
    font-weight: 600;
    font-family: monospace;
    font-size: 0.78rem;
}

/* Terminal */
.pipe-terminal-box {
    background: #05060A;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #A7F3D0;
    height: 110px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.pipe-term-line {
    white-space: pre-wrap;
    word-break: break-all;
}
.pipe-term-prefix {
    color: var(--wf-cyan);
    font-weight: bold;
}

/* Navigation Buttons */
.pipe-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: auto;
}
.pipe-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wf-card-border);
    color: var(--wf-heading);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pipe-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--wf-cyan);
    color: var(--wf-cyan);
}
.pipe-nav-btn-primary {
    background: linear-gradient(135deg, #38B6FF, #7C3AED);
    border: none;
    color: #fff;
    font-weight: 700;
}
.pipe-nav-btn-primary:hover {
    box-shadow: 0 4px 15px rgba(56, 182, 255, 0.4);
    transform: translateY(-1px);
}

/* --- Teaching & Assisted Learning --- */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}
.teaching-card {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 6px 20px var(--wf-shadow);
    transition: transform .2s ease;
}
.teaching-card:hover {
    transform: translateY(-3px);
}
.teaching-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--wf-violet) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--wf-violet) 30%, transparent);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.teaching-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin-bottom: .5rem;
}
.teaching-card p {
    font-size: .86rem;
    line-height: 1.5;
    color: var(--wf-body);
    margin-bottom: .75rem;
}
.teaching-hint {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--wf-muted);
}

/* --- 3D Print & Fabrication Spotlight --- */
.spotlight-banner {
    background: linear-gradient(135deg, color-mix(in srgb, #00E0C6 14%, var(--wf-card)), color-mix(in srgb, #7C3AED 12%, var(--wf-card)));
    border: 1px solid color-mix(in srgb, #00E0C6 30%, var(--wf-card-border));
    border-radius: 20px;
    padding: 2.2rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 14px 40px var(--wf-shadow);
}
.spotlight-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: center;
}
@@media (max-width: 860px) {
    .spotlight-content {
        grid-template-columns: 1fr;
    }
}
.spotlight-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: .75rem;
    color: var(--wf-heading);
}
.spotlight-text p {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--wf-body);
    margin-bottom: 1.25rem;
}
.spotlight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.spotlight-tag {
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 8px;
    background: var(--wf-ghost);
    border: 1px solid var(--wf-ghost-border);
    color: var(--wf-ghost-text);
}
.spotlight-card-visual {
    background: var(--wf-bg0);
    border: 1px solid var(--wf-card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .4);
}
.spotlight-card-visual img {
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 224, 198, .3));
    margin-bottom: 1rem;
}
.spotlight-card-visual .caption {
    font-size: .8rem;
    font-weight: 600;
    color: var(--wf-heading);
}
.spotlight-card-visual .subcaption {
    font-size: .72rem;
    color: var(--wf-muted);
}

/* --- WizardCAD 3D Laboratory & 2D-to-3D Animation Simulator --- */
.cad-animator-container {
    background: var(--wf-card);
    border: 1px solid color-mix(in srgb, #00E0C6 35%, var(--wf-card-border));
    border-radius: 20px;
    box-shadow: 0 24px 60px var(--wf-shadow), 0 0 0 1px rgba(0, 224, 198, .12);
    overflow: hidden;
    margin: 3.5rem 0;
}

.cad-animator-header {
    padding: 1.25rem 1.75rem;
    background: linear-gradient(90deg, color-mix(in srgb, #00E0C6 10%, var(--wf-titlebar)), color-mix(in srgb, #7C3AED 10%, var(--wf-titlebar)));
    border-bottom: 1px solid var(--wf-card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.cad-header-title h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--wf-heading);
    display: flex;
    align-items: center;
    gap: .6rem;
}
.cad-header-title p {
    font-size: .83rem;
    color: var(--wf-muted);
    margin: .25rem 0 0;
}

.cad-char-select {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    align-items: center;
}
.cad-char-btn {
    border: 1px solid var(--wf-ghost-border);
    background: var(--wf-ghost);
    color: var(--wf-ghost-text);
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    transition: all .15s ease;
}
.cad-char-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.cad-char-btn:hover {
    background: var(--wf-ghost-hover);
    color: var(--wf-heading);
    border-color: #00E0C6;
}
.cad-char-btn.active {
    background: linear-gradient(135deg, #00E0C6, #0A9396);
    color: #0B0D13;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 224, 198, .35);
}

/* Step navigation bar */
.cad-stepper-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.75rem;
    background: var(--wf-titlebar);
    border-bottom: 1px solid var(--wf-card-border);
    flex-wrap: wrap;
    gap: 1rem;
}
.cad-step-indicators {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.cad-step-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .75rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--wf-ghost);
    border: 1px solid var(--wf-ghost-border);
    color: var(--wf-muted);
    cursor: pointer;
    transition: all .15s ease;
}
.cad-step-pill:hover {
    color: var(--wf-heading);
    border-color: var(--wf-ghost-hover);
}
.cad-step-pill.active {
    background: color-mix(in srgb, #00E0C6 18%, transparent);
    border-color: #00E0C6;
    color: var(--wf-heading);
}
.cad-step-pill.completed {
    color: var(--wf-green);
    border-color: color-mix(in srgb, var(--wf-green) 35%, transparent);
}
.cad-step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: .68rem;
    background: var(--wf-ghost-border);
    color: var(--wf-ghost-text);
}
.cad-step-pill.active .cad-step-num {
    background: #00E0C6;
    color: #0B0D13;
    font-weight: 800;
}
.cad-step-pill.completed .cad-step-num {
    background: var(--wf-green);
    color: #0B0D13;
}

.cad-playback-ctrls {
    display: flex;
    gap: .4rem;
    align-items: center;
}
.cad-ctrl-btn {
    border: 1px solid var(--wf-ghost-border);
    background: var(--wf-ghost);
    color: var(--wf-ghost-text);
    padding: .3rem .75rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.cad-ctrl-btn:hover {
    background: var(--wf-ghost-hover);
    color: var(--wf-heading);
}
.cad-ctrl-btn.btn-play {
    background: linear-gradient(135deg, #A78BFA, #7C3AED);
    color: #0B0D13;
    border-color: transparent;
}
.cad-ctrl-btn.btn-play:hover {
    filter: brightness(1.1);
}

/* Stage & details split */
.cad-stage-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: 480px;
}
@@media (max-width: 960px) {
    .cad-stage-grid {
        grid-template-columns: 1fr;
    }
}

/* Left: Animated 3D Viewport */
.cad-viewport-3d {
    background: radial-gradient(circle at 50% 45%, #151D2C 0%, #080B12 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    min-height: 420px;
}
[data-bs-theme="light"] .cad-viewport-3d {
    background: radial-gradient(circle at 50% 45%, #EBF1FC 0%, #D8E2F3 100%);
}

/* Technical CAD grid background lines */
.cad-blueprint-grid {
    position: absolute;
    inset: 0;
    background-size: 32px 32px;
    background-image: 
        linear-gradient(to right, rgba(0, 224, 198, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 224, 198, .06) 1px, transparent 1px);
    pointer-events: none;
}
[data-bs-theme="light"] .cad-blueprint-grid {
    background-image: 
        linear-gradient(to right, rgba(0, 160, 140, .1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 160, 140, .1) 1px, transparent 1px);
}

/* Viewport HUD overlays */
.cad-axis-indicator {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    font-family: ui-monospace, Consolas, monospace;
    font-size: .75rem;
    color: #00E0C6;
    background: rgba(0, 0, 0, .45);
    padding: .25rem .6rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 224, 198, .2);
    pointer-events: none;
    z-index: 5;
}
.cad-telemetry {
    position: absolute;
    bottom: 1.25rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-family: ui-monospace, Consolas, monospace;
    font-size: .73rem;
    color: var(--wf-muted);
    background: rgba(0, 0, 0, .5);
    padding: .35rem .75rem;
    border-radius: 6px;
    border: 1px solid var(--wf-card-border);
    pointer-events: none;
    z-index: 5;
    flex-wrap: wrap;
    gap: .4rem;
}

/* Visual transformation stages */
.cad-model-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transition: all .4s cubic-bezier(.2, .8, .2, 1);
}

/* Model Image Display */
.cad-model-image {
    max-height: 240px;
    width: auto;
    object-fit: contain;
    transition: all .4s cubic-bezier(.2, .8, .2, 1);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, .6));
}

/* Ground shadow / build plate reflection */
.cad-model-shadow {
    width: 140px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, .65) 0%, transparent 75%);
    margin-top: -10px;
    transition: all .35s ease;
}

/* Stage 1: 2D Art mode */
.stage-mode-1 .cad-model-image {
    transform: none;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45));
}

/* Stage 2: Vector Contour mode */
.stage-mode-2 .cad-model-image {
    filter: drop-shadow(0 0 12px #00E0C6) brightness(1.2) contrast(1.1);
    transform: scale(1.02);
}
.cad-vector-overlay {
    display: none;
    position: absolute;
    inset: -15px;
    border: 1.5px dashed #00E0C6;
    border-radius: 12px;
    pointer-events: none;
    animation: cad-dash 8s linear infinite;
}
.stage-mode-2 .cad-vector-overlay {
    display: block;
}
@@keyframes cad-dash {
    to { stroke-dashoffset: 100; }
}

/* Stage 3: CAD Extrude mode */
.stage-mode-3 .cad-model-stage {
    transform: rotateX(25deg) rotateY(-18deg) rotateZ(5deg);
}
.stage-mode-3 .cad-model-image {
    filter: drop-shadow(-4px 4px 0 #0A9396) drop-shadow(-8px 8px 0 #005F73) drop-shadow(-12px 12px 15px rgba(0, 0, 0, .7));
}

/* Stage 4: 3D Solid Model mode */
.stage-mode-4 .cad-model-stage {
    animation: cad-orbit 10s ease-in-out infinite alternate;
}
@@keyframes cad-orbit {
    0% { transform: perspective(800px) rotateY(-18deg) rotateX(12deg); }
    100% { transform: perspective(800px) rotateY(18deg) rotateX(14deg); }
}
.stage-mode-4 .cad-model-image {
    filter: drop-shadow(0 20px 35px rgba(0, 224, 198, .35)) brightness(1.1);
}

/* Stage 5: 3D Print STL mode (Slicing Laser & Build Plate) */
.stage-mode-5 .cad-model-stage {
    transform: perspective(900px) rotateX(15deg);
}
.cad-slicer-laser {
    display: none;
    position: absolute;
    left: -20px;
    right: -20px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00E0C6, #3DDC97, transparent);
    box-shadow: 0 0 16px #00E0C6, 0 0 30px #3DDC97;
    pointer-events: none;
    z-index: 10;
    animation: cad-slice 3.5s ease-in-out infinite;
}
.stage-mode-5 .cad-slicer-laser {
    display: block;
}
@@keyframes cad-slice {
    0% { top: 90%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 10%; opacity: 0; }
}

/* Build plate skirt rings */
.cad-build-plate-skirt {
    display: none;
    position: absolute;
    bottom: -10px;
    width: 220px;
    height: 50px;
    border: 2px solid rgba(0, 224, 198, .4);
    border-radius: 50%;
    transform: rotateX(65deg);
    box-shadow: 0 0 18px rgba(0, 224, 198, .3);
    pointer-events: none;
}
.stage-mode-5 .cad-build-plate-skirt {
    display: block;
}

/* Right: Step Description & Technical Controls */
.cad-step-details {
    padding: 1.75rem;
    background: color-mix(in srgb, var(--wf-bg0) 40%, var(--wf-card));
    border-left: 1px solid var(--wf-card-border);
    display: flex;
    flex-direction: column;
}
@@media (max-width: 960px) {
    .cad-step-details {
        border-left: 0;
        border-top: 1px solid var(--wf-card-border);
    }
}

.cad-step-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #00E0C6;
    margin-bottom: .6rem;
}

.cad-step-heading {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--wf-heading);
    margin-bottom: .5rem;
    line-height: 1.25;
}

.cad-step-tool-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .6rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--wf-violet);
    background: color-mix(in srgb, var(--wf-violet) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--wf-violet) 30%, transparent);
    margin-bottom: 1rem;
    width: fit-content;
}

.cad-step-desc {
    font-size: .88rem;
    line-height: 1.55;
    color: var(--wf-body);
    margin-bottom: 1.25rem;
}

.cad-technical-specs {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 12px;
    padding: .9rem 1rem;
    margin-bottom: 1.5rem;
}
.cad-spec-row {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    padding: .25rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--wf-card-border) 60%, transparent);
}
.cad-spec-row:last-child {
    border-bottom: 0;
}
.cad-spec-label {
    color: var(--wf-muted);
}
.cad-spec-val {
    font-family: ui-monospace, Consolas, monospace;
    font-weight: 600;
    color: var(--wf-heading);
}

.cad-action-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.cad-step-nav-row {
    display: flex;
    gap: .5rem;
}
.cad-step-nav-row .btn {
    flex: 1;
}

/* --- 3D Viewport Controls & Canvas --- */
.cad-view-modes {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: .3rem;
    z-index: 15;
    background: rgba(11, 13, 19, .8);
    backdrop-filter: blur(8px);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
}
.cad-view-btn {
    background: transparent;
    border: 0;
    color: var(--wf-muted);
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all .15s ease;
}
.cad-view-btn:hover {
    color: var(--wf-heading);
}
.cad-view-btn.active {
    background: #00E0C6;
    color: #0B0D13;
    font-weight: 700;
}
.cad-3d-canvas {
    width: 320px;
    height: 280px;
    max-width: 100%;
    cursor: grab;
    touch-action: none;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, .7));
}
.cad-3d-canvas:active {
    cursor: grabbing;
}

/* Stage 5 STL Download Box in Technical Details */
.cad-stl-download-box {
    background: color-mix(in srgb, #00E0C6 10%, var(--wf-card));
    border: 1px solid color-mix(in srgb, #00E0C6 40%, transparent);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    animation: cad-pop .3s ease-out;
}
.cad-download-badge {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: #00E0C6;
    margin-bottom: .25rem;
}
.cad-download-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--wf-heading);
    margin-bottom: .35rem;
}

/* --- Interactive Raster vs. Vector Split Slider Section --- */
.rv-compare-container {
    background: var(--wf-card);
    border: 1px solid var(--wf-card-border);
    border-radius: 20px;
    padding: 2.25rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 12px 36px var(--wf-shadow);
}
.rv-compare-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 1.75rem;
}
.rv-compare-header h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    color: var(--wf-heading);
    margin: .5rem 0;
}
.rv-compare-header p {
    font-size: .9rem;
    line-height: 1.5;
    color: var(--wf-body);
    margin-bottom: 1.2rem;
}
.rv-compare-controls {
    display: inline-flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.rv-preset-btn.active {
    background: var(--wf-violet);
    color: #fff;
    border-color: var(--wf-violet);
}

.rv-slider-stage {
    position: relative;
    height: 380px;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--wf-card-border);
    background: radial-gradient(circle at center, #101524 0%, #080A10 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, .8), 0 10px 25px rgba(0, 0, 0, .5);
    user-select: none;
}
.rv-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.rv-vector-layer {
    background: repeating-linear-gradient(0deg, rgba(0, 224, 198, .03) 0px, rgba(0, 224, 198, .03) 1px, transparent 1px, transparent 24px),
                repeating-linear-gradient(90deg, rgba(0, 224, 198, .03) 0px, rgba(0, 224, 198, .03) 1px, transparent 1px, transparent 24px);
}
.rv-raster-layer {
    background: #090C14;
    border-right: 2px solid #00E0C6;
    z-index: 5;
    transition: width .05s ease-out;
}
.rv-art-img {
    height: 250px;
    width: auto;
    object-fit: contain;
}
.vector-glow {
    filter: drop-shadow(0 0 16px rgba(0, 224, 198, .5)) drop-shadow(0 8px 18px rgba(0, 0, 0, .7));
}
.raster-pixelated {
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .7));
    image-rendering: pixelated;
}
.rv-pixel-grid-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0px, rgba(255, 255, 255, .05) 1px, transparent 1px, transparent 8px),
                repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0px, rgba(255, 255, 255, .05) 1px, transparent 1px, transparent 8px);
    pointer-events: none;
}
.rv-nodes-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.rv-path-stroke {
    fill: none;
    stroke: #00E0C6;
    stroke-width: 2.5;
    stroke-dasharray: 6 3;
}
.rv-node-dot {
    fill: #00E0C6;
    stroke: #fff;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 6px #00E0C6);
}
.rv-tangent-line {
    stroke: rgba(167, 139, 250, .8);
    stroke-width: 1.5;
}

.rv-badge {
    position: absolute;
    bottom: 14px;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    pointer-events: none;
}
.rv-vector-badge {
    right: 16px;
    background: rgba(0, 224, 198, .15);
    color: #00E0C6;
    border: 1px solid rgba(0, 224, 198, .35);
}
.rv-raster-badge {
    left: 16px;
    background: rgba(167, 139, 250, .15);
    color: #A78BFA;
    border: 1px solid rgba(167, 139, 250, .35);
}

.rv-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
}
.rv-divider-line {
    width: 2px;
    height: 100%;
    background: #00E0C6;
    box-shadow: 0 0 12px #00E0C6, 0 0 24px #3DDC97;
}
.rv-divider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #00E0C6;
    color: #0B0D13;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: .65rem;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(0, 224, 198, .75), 0 4px 10px rgba(0,0,0,.5);
}

.rv-range-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    margin: 0;
}

.rv-compare-footer {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.rv-stat-pill {
    background: var(--wf-bg0);
    border: 1px solid var(--wf-card-border);
    border-radius: 10px;
    padding: .4rem .85rem;
    font-size: .78rem;
    display: flex;
    gap: .4rem;
}
.rv-stat-label {
    color: var(--wf-muted);
}
.rv-stat-value {
    font-weight: 700;
    color: var(--wf-heading);
}
