/* Base Variables & Typography */
:root {
    --color-primary: #db7970;
    --color-primary-dark: #c2655d;
    --color-primary-light: #fdf2f0;
    --color-bg-base: #fcfbfa;
    --color-bg-alt: #f3f0ec;
    --color-surface: #ffffff;
    --color-text-main: #2d3748;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-code-bg: #1e293b;
    --color-code-text: #e2e8f0;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 4px 6px -1px rgba(45, 55, 72, 0.05), 0 2px 4px -1px rgba(45, 55, 72, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(45, 55, 72, 0.08), 0 4px 6px -2px rgba(45, 55, 72, 0.04);
    --shadow-lg: 0 20px 40px -8px rgba(45, 55, 72, 0.1), 0 0 0 1px rgba(219, 121, 112, 0.05);
    
    --transition: 0.35s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Flex & Text Constraints */
.flex { display: flex; flex-wrap: wrap; }
.flex > * { min-width: 0; }
.lore-wrap { word-break: break-word; overflow-wrap: break-word; }

/* Typography */
h1, h2, h3, h4, p { margin-top: 0; white-space: normal; }
.apex-mega {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
}
.apex-large {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}
.apex-mid {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}
.lore-lead {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    word-break: keep-all;
}
.lore-serif {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Code & Keycaps */
.code-inline {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background-color: var(--color-bg-alt);
    color: var(--color-primary-dark);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}
.rune-key {
    display: inline-block;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.85rem;
    color: var(--color-text-main);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom: 3px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    margin: 0 0.2rem;
    box-shadow: 0 2px 0 rgba(0,0,0,0.05);
}

/* Layout Core */
.cloak {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}
.cloak > * { min-width: 0; }

.nexus-center {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
}
.nexus-center > * { min-width: 0; }

/* Header Navigation (Strictly Reused) */
.peak {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(252, 251, 250, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.nexus {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.nexus > * { min-width: 0; }
.sigil {
    display: flex;
    align-items: center;
}
.sigil img {
    height: 32px;
    width: auto;
}
.thread {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.thread > * { min-width: 0; }
.bond {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}
.bond:hover, .bond:focus {
    color: var(--color-primary);
}
.bond.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* Hero Section (flare) - Visual Contract Inherited */
.flare {
    padding: 6rem 0 8rem;
    background: radial-gradient(circle at top right, var(--color-primary-light) 0%, transparent 40%),
                radial-gradient(circle at bottom left, var(--color-bg-alt) 0%, transparent 30%);
    position: relative;
    overflow: hidden;
}
.flare::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: 0;
}
.flare-nexus {
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 4rem;
}
.flare-lore-area {
    flex: 1 1 500px;
}
.flare-visual {
    flex: 1 1 400px;
    position: relative;
    perspective: 1000px;
}
.flare-pod {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}
.flare-pod:hover {
    transform: rotateY(0) rotateX(0) translateY(-10px);
}
.terminal-mock {
    background: var(--color-code-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    font-family: monospace;
    color: var(--color-code-text);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}
.terminal-vein {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.terminal-vein > * { min-width: 0; }
.terminal-dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #eab308; }
.terminal-dot:nth-child(3) { background: #22c55e; }
.terminal-line { margin: 0.5rem 0; opacity: 0.9; }
.terminal-prompt { color: var(--color-primary); margin-right: 0.5rem; }

/* Buttons */
.spark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}
.spark.primary {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(219, 121, 112, 0.25);
}
.spark.primary:hover, .spark.primary:focus {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(219, 121, 112, 0.35);
}

/* Dictionary Layout Section (mesh) */
.mesh {
    padding: 6rem 0;
    background: var(--color-surface);
}
.mesh-nexus {
    flex-direction: column;
}
.clan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}
.blip-dict {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}
.blip-dict:hover {
    background-color: var(--color-bg-base);
    border-radius: var(--radius-md);
    border-bottom-color: transparent;
}
.blip-dict > * { min-width: 0; }
.dict-term {
    flex: 0 0 160px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-primary-dark);
}
.dict-def {
    flex: 1 1 200px;
    color: var(--color-text-muted);
}
.dict-def p { margin-bottom: 0.5rem; }

/* OP Commands Article (hive) */
.hive {
    padding: 6rem 0;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.hive-nexus {
    flex-direction: column;
}
.hive-peak {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}
.clan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}
.pod-op {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.pod-op::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--color-primary);
    opacity: 0;
    transition: var(--transition);
}
.pod-op:hover, .pod-op:focus-within {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.pod-op:hover::before { opacity: 1; }

.rune-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* Shortcuts Div (orbit) */
.orbit {
    padding: 6rem 0;
    background: var(--color-surface);
}
.orbit-nexus {
    align-items: flex-start;
    gap: 4rem;
}
.orbit-lore {
    flex: 1 1 300px;
    position: sticky;
    top: 100px;
}
.orbit-clan {
    flex: 2 1 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.blip-shortcut {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--color-bg-base);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}
.blip-shortcut:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}
.blip-shortcut > * { min-width: 0; }
.shortcut-desc {
    font-weight: 500;
    color: var(--color-text-main);
    flex: 1 1 200px;
}
.shortcut-keys {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.shortcut-keys > * { min-width: 0; }

/* Footer */
.sole {
    background: var(--color-bg-base);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
}
.sole-nexus {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.sole-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.sole-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.sole-links > * { min-width: 0; }
.sole-lore {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .thread { display: none; /* In real scenario, mobile menu logic applies */ }
    .flare { padding: 4rem 0; }
    .apex-mega { font-size: 2rem; }
    .flare-pod { transform: none; padding: 1.5rem; }
    .blip-dict { flex-direction: column; gap: 0.5rem; padding: 1rem 0; }
    .dict-term { flex: 1 1 auto; }
    .orbit-lore { position: static; margin-bottom: 2rem; }
    .blip-shortcut { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

.nexus-peak{
            position: sticky;
            top: 0;
            z-index: 100;
            background: rgba(252, 251, 250, 0.85);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(226, 232, 240, 0.6);
        }

.nexus-peak .nexus-nexus{
            max-width: 1400px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
        }

.nexus-peak .nexus-sigil{
            min-width: 0;
            display: flex;
            align-items: center;
        }

.nexus-peak .nexus-sigil img{
            height: 32px;
            width: auto;
            display: block;
        }

.nexus-peak .nexus-thread{
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            align-items: center;
        }

.nexus-peak .nexus-bond{
            text-decoration: none;
            color: #64748b;
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.35s ease;
            position: relative;
        }

.nexus-peak .nexus-bond:hover, .nexus-peak .nexus-bond.active{
            color: #db7970;
        }

.nexus-peak .nexus-bond.active::after{
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #db7970;
            border-radius: 2px;
        }

@media (max-width: 768px){.nexus-peak .nexus-thread{
                display: none; 
                width: 100%;
                flex-direction: column;
                gap: 1rem;
                margin-top: 1rem;
            }

.nexus-peak:hover .nexus-thread{
                display: flex;
            }}

.nexus-peak {
    background: rgb(252, 251, 250);
    background-image: none;
}

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

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

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

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

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

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

.root-root .root-apex{
            font-weight: 700;
            color: #2d3748;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: break-word;
        }

.root-root .root-lore-sm{
            font-size: 0.95rem;
            color: #64748b;
        }

.root-root{
            background-color: #1a202c;
            color: #a0aec0;
            padding: 4rem 2rem;
            text-align: center;
        }

.root-root .root-root-mesh{
            max-width: 1280px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2rem;
        }

.root-root .root-apex{
            color: #fff;
            font-size: 1.5rem;
            letter-spacing: 2px;
        }

.root-root .root-root-clan{
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
        }

.root-root .root-root-bond{
            color: #a0aec0;
            text-decoration: none;
            transition: all 0.35s ease;
        }

.root-root .root-root-bond:hover{
            color: #fff;
        }