/* Root Variables Inherited from Homepage Visual Family */
:root {
    --brand-color: #f65e68;
    --brand-hover: #e04a53;
    --bg-base: #f4f6f9;
    --bg-surface: #ffffff;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --text-light: #a0aec0;
    --radius-sm: 12px;
    --radius-lg: 18px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 30px rgba(246, 94, 104, 0.15);
    --transition: all 0.25s ease;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Mandatory Flexbox/Text Wrap Rules */
.flex-wrap {
    display: flex;
    flex-wrap: wrap;
}
.flex-wrap > * {
    min-width: 0;
}
.word-break {
    word-break: break-word;
    overflow-wrap: break-word;
}
.zh-keep {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Layout Shell (Main Width) */
.fold {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ------------------------------------- */
/* Mandatory Header (Exact Match)        */
/* ------------------------------------- */
.crown {
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5vw;
}
.crown > * {
    min-width: 0;
}
.xsym {
    display: flex;
    align-items: center;
}
.xsym img {
    height: 36px;
    width: auto;
    display: block;
}
.flow {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}
.flow > * {
    min-width: 0;
}
.xnode-tie {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}
.xnode-tie:hover {
    color: var(--brand-color);
}
.xnode-tie.active {
    color: var(--brand-color);
    font-weight: 600;
}
.xnode-tie.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-color);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .crown {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .flow {
        justify-content: center;
        gap: 1rem;
    }
}

/* ------------------------------------- */
/* Structure Route & Components          */
/* ------------------------------------- */
.orbit {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.zone {
    flex: 1;
}

/* 1. Hero Stage (Inherited Dark Gradient) */
.pulse-stage {
    width: 100%;
    min-height: 50vh;
    background: linear-gradient(135deg, #1f2229 0%, #0f1115 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 6vw 0;
    position: relative;
    overflow: hidden;
}
.pulse-stage > * {
    min-width: 0;
}
.pulse-stage::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(246,94,104,0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}
.pulse-fold {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.pulse-peak {
    font-size: clamp(2.2rem, 4vw, 4rem);
    color: #ffffff;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    white-space: normal;
}
.pulse-murmur {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.zap-ping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(246, 94, 104, 0.3);
}
.zap-ping:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 2. Python Guide (Article, Steps, Cell Pattern) */
.flare-zone {
    padding: 6vw 0;
    background: var(--bg-base);
}
.flare-head {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.flare-peak {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 1rem;
    white-space: normal;
}
.flare-murmur {
    color: var(--text-muted);
    font-size: 1.1rem;
}
.cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.cell {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.cell:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.glyph-wrap {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: rgba(246, 94, 104, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    margin-bottom: 1.5rem;
}
.glyph-wrap svg {
    width: 32px;
    height: 32px;
}
.cell-peak {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    white-space: normal;
}
.cell-murmur {
    color: var(--text-muted);
    flex-grow: 1;
}

/* 3. Perl Guide (Div, Panel Style) */
.mesh-fold {
    padding: 4vw 0;
    background: var(--bg-surface);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.pod {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-base);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}
.pod > * {
    min-width: 0;
}
.pod-data {
    flex: 1 1 500px;
    padding: 4vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pod-visual {
    flex: 1 1 400px;
    background: #1e1e1e;
    padding: 3vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.pod-peak {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
    white-space: normal;
}
.pod-murmur {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.band-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.band-cluster > * {
    min-width: 0;
}
.band-pill {
    background: var(--bg-surface);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.band-pill::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-color);
}
.mock-term {
    width: 100%;
    max-width: 320px;
    background: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-family: monospace;
    color: #a0aec0;
    font-size: 0.85rem;
    line-height: 1.6;
}
.term-line span { color: #f65e68; }

/* 4. Theme Customization (Div, Visual Focus) */
.base-fold {
    padding: 6vw 0;
    background: var(--bg-base);
}
.packet-cluster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.packet {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
}
.packet:hover {
    box-shadow: var(--shadow-hover);
}
.packet-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.color-swatches {
    display: flex;
    gap: 10px;
}
.swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.swatch:nth-child(1) { background: #1a202c; }
.swatch:nth-child(2) { background: #4a5568; }
.swatch:nth-child(3) { background: #f65e68; }
.swatch:nth-child(4) { background: #fbd38d; }
.font-preview {
    font-family: serif;
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-main);
}
.bg-preview {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(45deg, #f65e68, #fbd38d);
    opacity: 0.8;
}

/* Footer (Roots) */
.sole {
    background: var(--bg-surface);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 4rem 0 2rem;
    margin-top: auto;
}
.roots-mesh {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
}
.roots-mesh > * {
    min-width: 0;
}
.roots-brand {
    max-width: 300px;
}
.xsym-murmur {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}
.roots-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
.roots-flow > * {
    min-width: 0;
}
.roots-tie {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.roots-tie:hover {
    color: var(--brand-color);
}
.roots-bottom {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .pulse-stage { padding: 12vw 0; }
    .flare-zone { padding: 10vw 0; }
    .pod-data, .pod-visual { flex: 1 1 100%; }
    .roots-mesh { flex-direction: column; }
    .cluster-grid { grid-template-columns: 1fr; }
    .packet-cluster { grid-template-columns: 1fr; }
}

.xnode-crown .xnode-flow{
            display: flex;
            flex-wrap: wrap;
        }

.xnode-crown .xnode-flow > *{
            min-width: 0;
        }

.xnode-crown{
            position: sticky;
            top: 0;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            padding: 1rem 5vw;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 10px rgba(0,0,0,0.03);
            border-bottom: 1px solid rgba(0,0,0,0.03);
        }

.xnode-crown .xnode-xsym{
            display: flex;
            align-items: center;
            min-width: 0;
        }

.xnode-crown .xnode-xsym img{
            height: 36px;
            width: auto;
        }

.xnode-crown .xnode-flow{
            gap: 2rem;
            align-items: center;
        }

.xnode-crown .xnode-xnode-tie{
            text-decoration: none;
            color: #4a5568;
            font-weight: 600;
            font-size: 0.95rem;
            padding: 0.5rem 0;
            transition: 0.25s ease;
            position: relative;
        }

.xnode-crown .xnode-xnode-tie:hover{
            color: #f65e68;
        }

.xnode-crown .xnode-xnode-tie.active{
            color: #f65e68;
        }

.xnode-crown .xnode-xnode-tie.active::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: #f65e68;
            border-radius: 2px;
        }

@media (max-width: 768px){.xnode-crown{
                padding: 1rem 4vw;
                flex-direction: column;
                gap: 1rem;
            }

.xnode-crown .xnode-flow{
                justify-content: center;
                gap: 1rem;
            }}

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

.roots-sole-base {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-main);
}
.roots-sole-base,
.roots-sole-base *,
.roots-sole-base *::before,
.roots-sole-base *::after {
    box-sizing: border-box;
}

.roots-sole-base nav,
.roots-sole-base div,
.roots-sole-base section,
.roots-sole-base article,
.roots-sole-base aside,
.roots-sole-base p,
.roots-sole-base h1,
.roots-sole-base h2,
.roots-sole-base h3,
.roots-sole-base h4,
.roots-sole-base h5,
.roots-sole-base h6,
.roots-sole-base a {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

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

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

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

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

.roots-sole-base .roots-murmur{
            word-break: break-word;
            overflow-wrap: break-word;
            white-space: normal;
        }

.roots-sole-base .roots-murmur{
            font-size: 1.1rem;
            color: #4a5568;
            line-height: 1.8;
        }

.roots-sole-base{
            background: #11141a;
            color: #a0aec0;
            padding: 4rem 5vw 2rem;
            display: flex;
            flex-wrap: wrap;
            flex-direction: column;
            gap: 3rem;
            border-top: 1px solid rgba(255,255,255,0.05);
        }

.roots-sole-base .roots-sole-fold{
            display: flex;
            flex-wrap: wrap;
            gap: 4rem;
            justify-content: space-between;
            max-width: 1400px;
            width: 100%;
            margin: 0 auto;
        }

.roots-sole-base .roots-sole-brand{
            font-size: 2rem;
            font-weight: 900;
            color: #ffffff;
            letter-spacing: -0.02em;
        }

.roots-sole-base .roots-sole-cluster{
            display: flex;
            flex-wrap: wrap;
            gap: 4rem;
        }

.roots-sole-base .roots-sole-column{
            display: flex;
            flex-direction: column;
            gap: 1rem;
            min-width: 150px;
        }

.roots-sole-base .roots-sole-peak{
            color: #ffffff;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

.roots-sole-base .roots-sole-tie{
            color: #a0aec0;
            text-decoration: none;
            transition: 0.25s ease;
        }

.roots-sole-base .roots-sole-tie:hover{
            color: #f65e68;
        }

.roots-sole-base .roots-sole-bottom{
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 2rem;
            text-align: center;
            font-size: 0.9rem;
            max-width: 1400px;
            width: 100%;
            margin: 0 auto;
        }

@media (max-width: 768px){.roots-sole-base .roots-sole-fold{
                flex-direction: column;
            }}