/* ==========================================================================
   CSS Variables & System Settings
   ========================================================================== */
:root {
    --color-brand: #f39552;
    --color-brand-light: #fef5ed;
    --color-brand-hover: #e8823b;
    --color-text-apex: #1a202c;
    --color-text-byte: #4a5568;
    --color-text-muted: #718096;
    --color-bg-base: #fcfcfb;
    --color-bg-surface: #ffffff;
    --color-border: #edf2f7;
    --radius-sm: 8px;
    --radius-md: 17px;
    --radius-lg: 23px;
    --shadow-base: 0 2px 8px rgba(0,0,0,0.02);
    --shadow-hover: 0 10px 30px rgba(243, 149, 82, 0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-brand: 0 8px 20px rgba(243, 149, 82, 0.3);
    --transition: all 0.35s ease;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--color-bg-base);
    color: var(--color-text-byte);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ==========================================================================
   Typography & Base Elements
   ========================================================================== */
.apex-1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-apex);
    letter-spacing: -0.02em;
    white-space: normal;
    margin-bottom: 24px;
}

.apex-2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-apex);
    letter-spacing: -0.01em;
    white-space: normal;
    margin-bottom: 20px;
}

.apex-3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-apex);
    white-space: normal;
    margin-bottom: 16px;
}

.byte-lead {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.8;
}

.byte-flow {
    margin-bottom: 16px;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: var(--color-brand);
    transition: var(--transition);
}

a:hover {
    color: var(--color-brand-hover);
}

/* ==========================================================================
   Navigation (Forced Reuse Structure)
   ========================================================================== */
.crown {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.helm {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.helm > * {
    min-width: 0;
}

.core img {
    height: 32px;
    width: auto;
    display: block;
}

.chain {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.chain > * {
    min-width: 0;
}

.wire {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-byte);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.wire:hover,
.wire.active {
    color: var(--color-brand);
    background: var(--color-brand-light);
}

/* ==========================================================================
   Layout Containers (Semantic Mix & Structural Rules)
   ========================================================================== */
.tunnel {
    display: block;
    width: 100%;
}

.veil-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* Flex Rule Enforcements */
.flare, .mesh, .portal, .nexus, .pool, .lane, .node-head {
    display: flex;
    flex-wrap: wrap;
}

.flare > *, .mesh > *, .portal > *, .nexus > *, .pool > *, .lane > *, .node-head > * {
    min-width: 0;
}

/* ==========================================================================
   Section 1: Intro (Flare) - Data UI Mosaic Collage
   ========================================================================== */
.flare {
    background: linear-gradient(135deg, var(--color-bg-base) 0%, var(--color-brand-light) 100%);
    border-bottom: 1px solid var(--color-border);
}

.flare .veil-inner {
    padding-top: 100px;
    padding-bottom: 100px;
    gap: 60px;
    align-items: center;
}

.flare-byte {
    flex: 1 1 500px;
}

.flare-mosaic {
    flex: 1 1 500px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.packet {
    background: var(--color-bg-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-base);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.packet:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(243, 149, 82, 0.3);
}

.packet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-brand);
    opacity: 0;
    transition: var(--transition);
}

.packet:hover::before {
    opacity: 1;
}

.packet-apex {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.packet-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-apex);
}

.packet-pulse {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 80px;
    height: 80px;
    background: var(--color-brand-light);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.glyph-ui {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--color-brand);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   Section 2: Mechanism (Mesh) - Core Switching
   ========================================================================== */
.mesh .veil-inner {
    flex-direction: column;
}

.mesh-head {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.pool-cores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    width: 100%;
}

.node-core {
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-base);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.node-core:hover {
    box-shadow: var(--shadow-hover);
}

.node-head {
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.glyph-seal {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-brand-light) 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 4px 8px rgba(243, 149, 82, 0.1);
    border: 1px solid rgba(243, 149, 82, 0.2);
}

.glyph-seal svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-brand);
}

.chain-features {
    list-style: none;
    padding: 0;
    margin: 24px 0 0 0;
}

.hop-feature {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
    color: var(--color-text-byte);
    line-height: 1.6;
}

.hop-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39552' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.lane-path {
    background: var(--color-bg-base);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--color-text-apex);
    border: 1px dashed var(--color-border);
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Section 3: Capability (Portal) - Stats & LAN
   ========================================================================== */
.portal {
    background-color: var(--color-bg-surface);
}

.portal .veil-inner {
    flex-direction: row-reverse;
    gap: 60px;
    align-items: center;
}

.portal-byte {
    flex: 1 1 400px;
}

.portal-ui {
    flex: 1 1 500px;
    background: var(--color-bg-base);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--color-border);
}

.node-stat {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--color-brand);
}

.node-stat-info {
    display: flex;
    flex-direction: column;
}

.node-stat-seal {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.node-stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-apex);
}

.dial-spark {
    width: 48px;
    height: 24px;
    background: var(--color-brand);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.dial-spark::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Section 4: Closing (Nexus) - Advanced Config
   ========================================================================== */
.nexus {
    background: linear-gradient(to bottom, var(--color-bg-base) 0%, #f7f9fc 100%);
    border-top: 1px solid var(--color-border);
}

.nexus .veil-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.veil-code {
    width: 100%;
    max-width: 900px;
    background: #1a202c;
    border-radius: var(--radius-lg);
    margin-top: 40px;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.veil-crown {
    background: #2d3748;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.veil-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.veil-dot:nth-child(1) { background: #fc8181; }
.veil-dot:nth-child(2) { background: #f6e05e; }
.veil-dot:nth-child(3) { background: #68d391; }

.veil-body {
    padding: 24px;
    font-family: monospace;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: auto;
}

.byte-code-key { color: #f6ad55; }
.byte-code-str { color: #9ae6b4; }

/* ==========================================================================
   Footer (Wake)
   ========================================================================== */
.wake {
    background: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
    padding: 60px 24px 40px;
}

.wake-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.wake-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-apex);
    letter-spacing: -0.02em;
}

.wake-pool {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.wake-pool > * {
    min-width: 0;
}

.anchor {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.anchor:hover {
    color: var(--color-brand);
}

.wake-byte {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 24px;
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */
@media (max-width: 1024px) {
    .flare .veil-inner,
    .portal .veil-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .node-stat {
        justify-content: center;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .helm {
        flex-direction: column;
        gap: 16px;
    }
    
    .chain {
        width: 100%;
        justify-content: center;
        gap: 16px;
    }

    .flare-mosaic {
        grid-template-columns: 1fr;
    }

    .pool-cores {
        grid-template-columns: 1fr;
    }
    
    .veil-body {
        font-size: 0.85rem;
    }
}

.route-crown{
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(243, 149, 82, 0.1);
            padding: 16px 0;
        }

.route-crown .route-helm{
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
        }

.route-crown .route-core{
            display: flex;
            align-items: center;
        }

.route-crown .route-core img{
            height: 36px;
            width: auto;
            object-fit: contain;
        }

.route-crown .route-chain{
            display: flex;
            flex-wrap: wrap;
            gap: 32px;
            align-items: center;
        }

.route-crown .route-wire{
            font-weight: 500;
            color: #4a5568;
            font-size: 0.95rem;
            transition: all 0.35s ease;
            position: relative;
        }

.route-crown .route-wire:hover, .route-crown .route-wire.active{
            color: #f39552;
        }

.route-crown .route-wire.active::after{
            content: '';
            position: absolute;
            bottom: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 3px;
            background: #f39552;
            border-radius: 2px;
        }

@media (max-width: 768px){.route-crown .route-chain{ display: none;  }}

.route-crown {
    background: rgb(255, 255, 255);
    background-image: none;
}

.base-wake {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--color-text-byte);
}
.base-wake,
.base-wake *,
.base-wake *::before,
.base-wake *::after {
    box-sizing: border-box;
}

.base-wake [role="navigation"],
.base-wake div,
.base-wake section,
.base-wake article,
.base-wake aside,
.base-wake p,
.base-wake h1,
.base-wake h2,
.base-wake h3,
.base-wake h4,
.base-wake h5,
.base-wake h6,
.base-wake a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.base-wake p,
.base-wake h1,
.base-wake h2,
.base-wake h3,
.base-wake h4,
.base-wake h5,
.base-wake h6 {
    text-decoration: none;
}

.base-wake img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

.base-wake {
    box-shadow: none;
    filter: none;
    text-shadow: none;
    background-image: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
}

.base-wake a,
.base-wake a:hover,
.base-wake a:focus,
.base-wake a:active {
    background: transparent;
    box-shadow: none;
    outline: none;
    text-decoration: none;
}

.base-wake .base-byte{
            word-break: break-word;
            overflow-wrap: break-word;
        }

.base-wake .base-byte{
            word-break: keep-all; 
        }

.base-wake{
            background: #1a202c;
            color: rgba(255,255,255,0.7);
            padding: 60px 24px 40px;
            margin-top: 60px;
        }

.base-wake .base-base{
            max-width: 1280px;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 40px;
        }

.base-wake .base-base-brand{
            font-size: 1.5rem;
            font-weight: 800;
            color: white;
            letter-spacing: 1px;
        }

@media (max-width: 768px){.base-wake .base-base{ flex-direction: column; gap: 20px; text-align: center; }}