:root {
    --bg-1: #061824;
    --bg-2: #0d2e42;
    --accent: #4de3d4;
    --text-main: #e8f9ff;
    --text-muted: #a5cad8;
    --panel: rgba(5, 28, 42, 0.75);
    --border: rgba(117, 227, 234, 0.35);
    --core-cyan: #00f2ff;
    --content-bg: #eef6ff;
    --content-text: #0d2e42;
    --content-muted: #2d5a7a;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 5%, rgba(77, 227, 212, 0.25), transparent 35%),
        radial-gradient(circle at 90% 20%, rgba(33, 168, 179, 0.25), transparent 38%),
        linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 70%);
    overflow-x: hidden;
}

#mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 24, 36, 0.7);
    backdrop-filter: blur(4px);
    z-index: 60;
    display: none;
}

#mobile-overlay.show {
    display: block;
}

#mobile-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20rem;
    background: rgba(5, 28, 42, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    z-index: 70;
    padding: 1.5rem;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    max-height: 100vh;
}

#mobile-sidebar.open {
    transform: translateX(0);
}

.kb-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
    width: 100%;
}

.kb-header img {
    height: 4.8rem;
    filter: drop-shadow(0 0 16px rgba(0, 242, 255, 0.6));
}

.kb-header-text {
    text-align: left;
}

.kb-header-text h1 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
    letter-spacing: 0.1em;
    line-height: 1;
    color: white;
}

.kb-header-text p {
    margin: 0.25rem 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.1rem;
    color: var(--core-cyan);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
}

.kb-resource-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0 1.5rem 1rem;
}

.kb-resource-link {
    color: var(--text-main);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(5, 28, 42, 0.45);
    transition: all 0.2s;
}

.kb-resource-link:hover {
    color: var(--core-cyan);
    border-color: var(--accent);
    background: rgba(0, 242, 255, 0.12);
}

nav {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: rgba(5, 28, 42, 0.8);
    backdrop-filter: blur(8px);
}

nav .nav-content {
    width: 100%;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-button {
    display: none;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.menu-button:hover {
    background: rgba(77, 227, 212, 0.1);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(0, 242, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.6));
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    color: white;
    font-family: "Inter", sans-serif;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-right a:hover {
    color: var(--accent);
}

.nav-right a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.25rem;
}

.nav-right .open-app {
    background: rgba(0, 242, 255, 0.2);
    color: var(--core-cyan);
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--accent);
    transition: all 0.2s;
    cursor: pointer;
}

.nav-right .open-app:hover {
    background: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.layout-container {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: auto;
    position: relative;
}

aside {
    display: none;
    width: 18rem;
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    position: sticky;
    top: 4rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    background: rgba(5, 28, 42, 0.5);
    backdrop-filter: blur(4px);
}

aside.show {
    display: block;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(77, 227, 212, 0.3);
    border-radius: 10px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 227, 212, 0.5);
}

main {
    flex: 1;
    overflow: auto;
    background-color: var(--content-bg);
}

.hero {
    background: linear-gradient(135deg, rgba(220, 240, 255, 0.6) 0%, rgba(200, 230, 255, 0.5) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 1.5rem;
}

.hero-content {
    max-width: 60rem;
    margin: 0 auto;
}

.hero-kicker {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: "Rajdhani", sans-serif;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: "Inter", sans-serif;
    line-height: 1.1;
    color: var(--content-text);
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.hero p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--content-muted);
    line-height: 1.6;
    max-width: 45rem;
}

.hero-pill-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-pill {
    font-size: 0.7rem;
    color: #1d4f75;
    border: 1px solid rgba(13, 46, 66, 0.2);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.content-grid {
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 100%;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 16px 40px rgba(0, 242, 255, 0.15);
    transform: translateY(-2px);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(0, 242, 255, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.3));
}

.card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--core-cyan);
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-family: "Inter", sans-serif;
    color: white;
}

.card p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex: 1;
}

.card-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(0, 242, 255, 0.05);
    border-radius: 0.75rem;
    border: 1px solid rgba(77, 227, 212, 0.2);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.card-item:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.card-item-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-item svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
    opacity: 0.6;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.article-library {
    padding: 0 1.5rem 1.5rem;
}

.article-library-shell {
    background: rgba(210, 234, 255, 0.35);
    border: 1px solid rgba(13, 46, 66, 0.15);
    border-radius: 1rem;
    padding: 1.25rem;
}

.article-library h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: var(--content-text);
}

.article-library-intro {
    margin: 0 0 1rem;
    color: var(--content-muted);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}

.kb-breadcrumbs {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
    color: #3d6481;
    font-size: 0.8rem;
}

.kb-breadcrumbs a {
    color: #1d4f75;
    text-decoration: none;
}

.kb-breadcrumbs a:hover {
    color: var(--core-cyan);
}

.article-page-main {
    background: var(--content-bg);
    flex: 1;
    overflow: auto;
}

.article-content {
    min-width: 0;
    max-width: 60rem;
    margin: 0 auto;
    padding: 1.5rem;
}

.article-nav-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-nav-title {
    margin: 0;
    color: rgba(77, 227, 212, 0.45);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.article-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-nav-list li + li {
    margin-top: 0.2rem;
}

.article-nav-list a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.35;
    transition: all 0.2s;
}

.article-nav-list a:hover {
    background: rgba(77, 227, 212, 0.1);
    color: white;
}

.article-nav-list a.current {
    background: rgba(77, 227, 212, 0.12);
    color: white;
    border: 1px solid rgba(77, 227, 212, 0.18);
}

.article-hero {
    background: linear-gradient(135deg, rgba(220, 240, 255, 0.88) 0%, rgba(202, 230, 255, 0.7) 100%);
    border: 1px solid rgba(13, 46, 66, 0.12);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 1.25rem;
}

.article-kicker {
    margin: 0 0 0.5rem;
    color: #1b638b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.article-hero h1 {
    margin: 0 0 0.75rem;
    color: var(--content-text);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.article-hero p {
    margin: 0;
    color: var(--content-muted);
    font-size: 1.06rem;
    line-height: 1.7;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.article-meta-pill {
    background: rgba(255, 255, 255, 0.74);
    color: #205473;
    border: 1px solid rgba(13, 46, 66, 0.12);
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.72rem;
}

.article-section {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(13, 46, 66, 0.12);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.article-section h2 {
    margin: 0 0 0.75rem;
    color: var(--content-text);
    font-size: 1.5rem;
}

.article-section h3 {
    margin: 1rem 0 0.45rem;
    color: #14415e;
    font-size: 1.08rem;
}

.article-section p,
.article-section li {
    color: var(--content-muted);
    line-height: 1.72;
    font-size: 0.98rem;
}

.article-section ul,
.article-section ol {
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
}

.article-callout {
    border-left: 4px solid var(--core-cyan);
    background: rgba(0, 242, 255, 0.08);
    border-radius: 0.85rem;
    padding: 1rem 1rem 1rem 1.1rem;
}

.article-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.article-related-card {
    background: rgba(214, 236, 255, 0.55);
    border: 1px solid rgba(13, 46, 66, 0.12);
    border-radius: 0.9rem;
    padding: 1rem;
}

.article-related-card a {
    color: #123f5b;
    font-weight: 700;
    text-decoration: none;
}

.article-related-card p {
    margin: 0.4rem 0 0;
}

.article-cta {
    background: linear-gradient(135deg, rgba(150, 210, 255, 0.3) 0%, rgba(120, 190, 255, 0.2) 100%);
    border: 2px solid rgba(77, 227, 212, 0.4);
    border-radius: 1rem;
    padding: 1.4rem;
}

.article-cta a {
    color: #0e4060;
    font-weight: 700;
}

.article-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(13, 46, 66, 0.12);
    border-radius: 0.8rem;
    padding: 0.95rem;
}

.article-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #103754;
}

.article-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #2f5c7c;
}

.support-callout {
    background: linear-gradient(135deg, rgba(150, 210, 255, 0.3) 0%, rgba(120, 190, 255, 0.2) 100%);
    border: 2px solid rgba(77, 227, 212, 0.5);
    border-radius: 1.5rem;
    padding: 2rem;
    margin: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.2);
}

.support-callout h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: "Inter", sans-serif;
    color: var(--content-text);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

.support-callout p {
    margin: 0 0 1.5rem;
    color: var(--content-muted);
    max-width: 35rem;
    margin-left: auto;
    margin-right: auto;
}

.support-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.support-button {
    background: rgba(0, 242, 255, 0.2);
    border: 1px solid var(--accent);
    color: var(--core-cyan);
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.95rem;
}

.support-button:hover {
    background: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
    transform: scale(1.05);
}

.support-button svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    padding-bottom: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: center;
    text-align: center;
}

footer-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

footer-logo {
    width: 2rem;
    height: 2rem;
    background: rgba(0, 242, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

footer-logo svg {
    width: 1rem;
    height: 1rem;
    color: var(--core-cyan);
    fill: currentColor;
}

footer-brand {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--content-text);
}

footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--content-muted);
}

footer-links a {
    color: var(--content-muted);
    text-decoration: none;
    transition: color 0.2s;
}

footer-links a:hover {
    color: #167abf;
}

footer-copyright {
    font-size: 0.875rem;
    color: var(--content-muted);
}

@media (max-width: 1024px) {
    aside {
        display: none;
    }

    .menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .kb-resource-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .kb-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .kb-header img {
        height: 3.5rem;
    }

    .kb-header-text h1 {
        font-size: 2.2rem;
    }

    .kb-header-text p {
        font-size: 0.95rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }

    .article-library {
        padding: 0 1rem 1.25rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .support-callout {
        margin: 1.5rem 1rem;
        padding: 1.5rem 1rem;
    }

    footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 960px) {
    .article-content {
        padding: 1rem;
    }
}
