:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --bg-dark: #050510;
    --bg-card: rgba(17, 17, 39, 0.72);
    --bg-soft: rgba(99, 102, 241, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(99, 102, 241, 0.16);
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    --shadow-lg: 0 24px 60px rgba(8, 8, 28, 0.45);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.16), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.12), transparent 28%),
        var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(5, 5, 16, 0.82);
    border-bottom: 1px solid var(--border-color);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.32);
}

.brand-icon svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.topbar-group {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-nav a:hover {
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 13px 22px;
    font-size: 0.97rem;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.26);
}

.btn-secondary {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

.hero {
    padding: 72px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 28px;
    align-items: stretch;
}

.hero-card,
.panel,
.article-card,
.cluster-card,
.prose-card,
.faq-card,
.related-card {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.hero-card {
    padding: 38px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.22);
    font-size: 0.88rem;
    font-weight: 700;
}

.hero h1,
.article-hero h1 {
    margin: 0 0 16px;
    line-height: 1.08;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    font-weight: 900;
}

.hero p,
.article-intro,
.cluster-card p,
.article-card p,
.panel p,
.prose p,
.faq-card p {
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-actions,
.cta-row,
.meta-row,
.article-tags,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 26px;
}

.panel {
    padding: 30px;
}

.panel h2,
.section-head h2 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cluster-list,
.quick-links,
.related-list {
    display: grid;
    gap: 14px;
}

.cluster-item,
.quick-link,
.related-link {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.cluster-item strong,
.quick-link strong,
.related-link strong {
    display: block;
    margin-bottom: 4px;
}

.section {
    padding: 22px 0 54px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-head p {
    margin: 0;
    max-width: 720px;
    color: var(--text-secondary);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 26px;
}

.article-card:hover,
.cluster-card:hover {
    transform: translateY(-4px);
    transition: transform 0.25s ease;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    width: fit-content;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(99, 102, 241, 0.14);
}

.article-card h3 {
    margin: 0;
    font-size: 1.34rem;
    line-height: 1.25;
}

.article-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.article-tags a,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.chip.is-active {
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
    background: rgba(99, 102, 241, 0.16);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.search-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.article-shell {
    padding: 56px 0 72px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-hero {
    padding: 34px;
    margin-bottom: 24px;
}

.article-intro {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: 1.06rem;
}

.meta-row {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 22px 0 8px;
}

.fact-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.fact-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.fact-card span {
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
}

.note-card,
.credits-card {
    margin: 24px 0;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(129, 140, 248, 0.18);
    background: rgba(99, 102, 241, 0.08);
}

.credits-card p,
.note-card p {
    margin: 0;
}

.mini-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.2);
    color: #fbcfe8;
    font-size: 0.8rem;
    font-weight: 700;
}

.prose-card,
.related-card,
.faq-card {
    padding: 30px;
}

.prose h2 {
    margin: 32px 0 12px;
    font-size: 1.62rem;
}

.prose h3 {
    margin: 24px 0 10px;
    font-size: 1.18rem;
}

.prose p,
.prose li {
    color: var(--text-secondary);
}

.prose ul {
    padding-left: 20px;
}

.prose strong {
    color: #fff;
}

.cta-band {
    margin: 30px 0;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(236, 72, 153, 0.12));
    border: 1px solid rgba(129, 140, 248, 0.22);
}

.related-card h3,
.faq-card h3 {
    margin-top: 0;
}

.related-list a {
    display: block;
}

.footer-min {
    padding: 28px 0 48px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-min .container {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
}

.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand p,
.footer-links a,
.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links h4 {
    margin: 0 0 12px;
    font-size: 0.92rem;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .hero-grid,
    .article-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .topbar-inner,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-group {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-nav {
        flex-wrap: wrap;
    }

    .hero-card,
    .panel,
    .article-hero,
    .prose-card,
    .related-card,
    .faq-card,
    .article-card {
        padding: 22px;
        border-radius: 22px;
    }

    .container {
        width: min(100% - 20px, 1120px);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
