/* CSS Variables & Reset */
:root {
    --bg-deep: #050505;
    --bg-surface: #111111;
    --bg-elevated: #1a1a1a;
    --accent: #df881f;
    --accent-glow: rgba(223, 136, 31, 0.2);
    --accent-hover: #e89d42;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border: #2a2a2a;
    --border-light: #333333;
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.35s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Base Flex Rules (Mandatory) */
.flex {
    display: flex;
    flex-wrap: wrap;
}
.flex > * {
    min-width: 0;
}

/* Typography Base */
.crown-apex, .crown-sub, .crown-bead {
    white-space: normal;
    font-weight: 700;
    color: #ffffff;
}
.script-surge, .script-intro, .script-desc {
    word-break: keep-all;
    color: var(--text-muted);
}

/* Layout Wrapper */
.cloak-vault {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation (Exact Structure Reused & Styled) */
.zenith {
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    justify-content: space-between;
    align-items: center;
}
.sigil {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.sigil img {
    height: 32px;
}
.orbit {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
}
.wire {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition), color var(--transition);
}
.wire:hover, .wire:focus {
    background-color: var(--bg-elevated);
    color: #ffffff;
}
.wire.active {
    color: var(--accent);
    background-color: var(--accent-glow);
}

/* Main Content Area */
.realm-core {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding-top: 4rem;
    padding-bottom: 6rem;
}

/* Section 1: Hero / Intro (section) */
.flare-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.cloak-script {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.crown-apex {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.script-surge {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 90%;
}
.flock-actions {
    margin-top: 1rem;
    gap: 1rem;
}
.pulse-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent);
    color: #000000;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
    cursor: pointer;
}
.pulse-primary:hover, .pulse-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(223, 136, 31, 0.4);
    background-color: var(--accent-hover);
}
.cloak-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: radial-gradient(circle at center, var(--bg-elevated) 0%, transparent 70%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.glyph-network {
    width: 80%;
    height: 80%;
    color: var(--accent);
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

/* Section 2: System Proxy Modes (div) */
.vault-modes {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4rem;
}
.cloak-zenith {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.crown-sub {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.script-intro {
    font-size: 1.1rem;
}
.flock-modes {
    gap: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.packet-mode {
    background-color: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color var(--transition), transform var(--transition);
}
.packet-mode:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}
.cloak-glyph {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.glyph-mode {
    width: 28px;
    height: 28px;
    color: var(--accent);
}
.crown-bead {
    font-size: 1.3rem;
}

/* Section 3: Custom Rule Sets (div) */
.hull-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.cloak-lens {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-surface);
    position: relative;
}
.cloak-lens::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    border-radius: var(--radius);
    pointer-events: none;
}
.lens-vault {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.flock-rules {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}
.shard-rule {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background-color: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: border-color var(--transition), background-color var(--transition);
}
.shard-rule:hover {
    background-color: var(--bg-elevated);
    border-color: var(--border-light);
}
.cloak-seal {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}
.seal-direct { background-color: rgba(46, 160, 67, 0.15); color: #3fb950; }
.seal-proxy { background-color: var(--accent-glow); color: var(--accent); }
.seal-block { background-color: rgba(248, 81, 73, 0.15); color: #f85149; }

.cloak-rule-script {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.crown-rule {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}
.script-rule {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Footer Area */
.nadir {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4rem 5% 2rem;
    margin-top: auto;
}
.flock-base {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.crown-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}
.flock-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.wire-base {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.wire-base:hover, .wire-base:focus {
    color: var(--accent);
}
.script-script {
    width: 100%;
    text-align: center;
    color: #555555;
    font-size: 0.85rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .flare-intro, .hull-rules {
        gap: 3rem;
    }
    .vault-modes {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .zenith {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .orbit {
        justify-content: center;
    }
    .realm-core {
        padding-top: 2rem;
        gap: 4rem;
    }
    .flare-intro, .hull-rules {
        grid-template-columns: 1fr;
    }
    .hull-rules > .cloak-lens {
        order: -1; /* Image on top on mobile */
    }
    .crown-apex {
        text-align: center;
    }
    .script-surge {
        max-width: 100%;
        text-align: center;
    }
    .flock-actions {
        justify-content: center;
    }
    .vault-modes {
        padding: 2rem 1.5rem;
    }
    .flock-base {
        flex-direction: column;
        text-align: center;
    }
    .flock-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

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

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

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

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

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

.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2 {
    --aisite-shell-nav-padding: 0.5rem 0;
    --aisite-shell-nav-margin: 0;
    --aisite-shell-nav-line-height: normal;
    --aisite-shell-nav-display: inline;
    --aisite-shell-nav-height: auto;
    --aisite-shell-nav-min-height: auto;
}

.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2,
.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2:hover,
.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2:focus,
.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2:active,
.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2.active,
.helm-zenith.helm-flex a.helm-helm-wire.helm-wire-2[aria-current="page"] {
    background: transparent;
    border: none;
    border-bottom: none;
    box-shadow: none;
    outline: none;
    text-decoration: none;
    padding: var(--aisite-shell-nav-padding, 0);
    margin: var(--aisite-shell-nav-margin, 0);
    line-height: var(--aisite-shell-nav-line-height, normal);
    display: var(--aisite-shell-nav-display, inline);
    height: var(--aisite-shell-nav-height, auto);
    min-height: var(--aisite-shell-nav-min-height, auto);
}

.helm-zenith.helm-flex .helm-flex{
            display: flex;
            flex-wrap: wrap;
        }

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

.helm-zenith.helm-flex .helm-zenith{
            position: sticky;
            top: 0;
            z-index: 100;
            background-color: rgba(5, 5, 5, 0.85);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid #2a2a2a;
            padding: 1rem 2rem;
            align-items: center;
            justify-content: space-between;
        }

.helm-zenith.helm-flex .helm-sigil{
            display: flex;
            align-items: center;
        }

.helm-zenith.helm-flex .helm-sigil img{
            height: 32px;
            width: auto;
        }

.helm-zenith.helm-flex .helm-orbit{
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            align-items: center;
        }

.helm-zenith.helm-flex .helm-helm-wire{
            color: #e0e0e0;
            font-size: 0.95rem;
            font-weight: 500;
            padding: 0.5rem 0;
            position: relative;
        }

.helm-zenith.helm-flex .helm-helm-wire::after{
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: #df881f;
            transition: width 0.35s ease;
        }

.helm-zenith.helm-flex .helm-helm-wire:hover::after, .helm-zenith.helm-flex .helm-helm-wire:focus::after, .helm-zenith.helm-flex .helm-helm-wire.active::after{
            width: 100%;
        }

.helm-zenith.helm-flex .helm-helm-wire.active{
            color: #ffffff;
        }

@media (max-width: 768px){.helm-zenith.helm-flex .helm-zenith{
                flex-direction: column;
                gap: 1rem;
                padding: 1rem;
            }

.helm-zenith.helm-flex .helm-orbit{
                justify-content: center;
                gap: 1rem;
            }}

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

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

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

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

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

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

.anchor-nadir{
            background-color: #111111;
            border-top: 1px solid #2a2a2a;
            padding: 4rem 2rem 2rem;
            margin-top: auto;
        }

.anchor-nadir .anchor-base{
            max-width: 1280px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 3rem;
            margin-bottom: 3rem;
        }

.anchor-nadir .anchor-root{
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

.anchor-nadir .anchor-root .anchor-crown{
            font-size: 1.1rem;
            color: #ffffff;
            margin-bottom: 0.5rem;
        }

.anchor-nadir .anchor-root .anchor-wire{
            color: #888888;
            font-size: 0.95rem;
        }

.anchor-nadir .anchor-root .anchor-wire:hover{
            color: #df881f;
        }

.anchor-nadir .anchor-script{
            text-align: center;
            color: #555;
            font-size: 0.9rem;
            border-top: 1px solid #2a2a2a;
            padding-top: 2rem;
        }