@font-face {
    font-family: 'GT America';
    src: url('fonts/GT-America-Standard-Regular.latin.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'GT America';
    src: url('fonts/GT-America-Standard-Medium.latin.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'GT America Extended';
    src: url('fonts/GT-America-Extended-Medium.latin.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}

:root {
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --primary-light: #1e1030;
    --text: #e8e8f0;
    --text-sec: #b8b8d0;
    --text-muted: #8888aa;
    --text-light: #5c5c80;
    --bg: #0a0812;
    --bg-subtle: #110e1f;
    --border: rgba(255,255,255,0.08);
    --font: 'GT America', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
    --font-d: 'GT America Extended', 'GT America', -apple-system, sans-serif;
    --nav-h: 80px;
    --wrap: 1200px;
    --r: 12px;
    --r-sm: 8px;
    --shadow: 0 2px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --tr: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

.container { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1,h2,h3,h4,h5 { font-family: var(--font-d); font-weight: 500; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(26px, 4vw, 40px); }
h3 { font-size: clamp(20px, 3vw, 26px); }
h4 { font-size: 18px; }
p { margin-bottom: 1em; color: var(--text-muted); }
.lead { font-size: 18px; line-height: 1.75; color: var(--text-sec); }

/* ── NAVIGATION ────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 200;
    background: #0d0a1e; border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
.nav__inner { display: flex; align-items: center; justify-content: flex-start; height: 100%; gap: 4px; padding: 0 0; }
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 24px; flex-shrink: 0; }
.nav__logo:hover { text-decoration: none; }
.nav__logo-icon {
    width: 38px; height: 38px; background: var(--primary); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 18px; font-family: var(--font-d);
}
.nav__logo-text { font-family: var(--font-d); font-weight: 500; font-size: 17px; color: var(--text); }
.nav__logo-text span { color: var(--primary); }

.nav__menu { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav__item { position: relative; }
.nav__link {
    display: flex; align-items: center; gap: 5px;
    padding: 10px 16px; font-size: 14px; font-weight: 500;
    color: var(--text); border-radius: var(--r-sm);
    cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background var(--tr), color var(--tr);
    border: none; background: none; font-family: var(--font);
    height: 42px; line-height: 1;
}
.nav__link:hover, .nav__item:hover > .nav__link, .nav__item.open > .nav__link { background: var(--bg-subtle); color: var(--primary); text-decoration: none; }
.nav__link svg { transition: transform var(--tr); flex-shrink: 0; }
.nav__item:hover > .nav__link svg, .nav__item.open > .nav__link svg { transform: rotate(180deg); }

.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Dropdown */
.dropdown {
    position: absolute; top: 100%; left: 0;
    background: #14112a; border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow-lg);
    min-width: 260px; padding: 6px 8px 8px;
    padding-top: 14px;
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--tr), transform var(--tr), visibility 0s linear var(--tr);
    pointer-events: none;
    z-index: 300;
}
.nav__item:hover .dropdown,
.nav__item.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; transition: opacity var(--tr), transform var(--tr), visibility 0s; }

.dropdown__link {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-radius: var(--r-sm);
    text-decoration: none; transition: background var(--tr);
}
.dropdown__link:hover { background: var(--primary-light); text-decoration: none; }
.dropdown__icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}
.dropdown__title { font-size: 14px; font-weight: 500; color: var(--text); display: block; }
.dropdown__desc { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Mobile toggle */
.nav__mobile-btn {
    display: none; padding: 8px; background: none; border: none;
    cursor: pointer; flex-direction: column; gap: 5px; margin-left: auto;
}
.nav__mobile-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--tr); }

/* Mobile menu */
.nav__mobile-menu {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: #0d0a1e; overflow-y: auto; padding: 24px; z-index: 199;
}
.nav__mobile-menu.open { display: block; }
.mob-section { margin-bottom: 24px; }
.mob-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin-bottom: 8px; font-weight: 500; }
.mob-link { display: block; padding: 11px 0; font-size: 15px; color: var(--text); border-bottom: 1px solid var(--border); text-decoration: none; }
.mob-link:hover { color: var(--primary); }

/* ── SEARCH ─────────────────────────────────────── */
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-subtle); border: 1px solid var(--border);
    border-radius: 100px; padding: 9px 18px; max-width: 200px;
    transition: border-color var(--tr), max-width var(--tr);
}
.search-box:focus-within { border-color: var(--primary); max-width: 260px; }
.search-box input { border: none; background: none; font-size: 14px; color: var(--text); outline: none; flex: 1; font-family: var(--font); width: 100%; }
.search-box input::placeholder { color: var(--text-light); }

/* ── HERO ────────────────────────────────────────── */
.hero {
    background: linear-gradient(140deg, #0f0c20 0%, #13102a 40%, #0a0812 100%);
    padding: 80px 0 72px; border-bottom: 1px solid var(--border);
}
.hero__badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-light); color: var(--primary);
    font-size: 13px; font-weight: 500; padding: 6px 14px;
    border-radius: 100px; margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; max-width: 680px; }
.hero .lead { margin-bottom: 32px; max-width: 580px; }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.hero__stats { display: flex; gap: 48px; padding-top: 40px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 32px; }
.stat-val { font-size: 32px; font-family: var(--font-d); color: var(--text); display: block; }
.stat-lbl { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ── PAGE HERO ───────────────────────────────────── */
.page-hero {
    background: linear-gradient(140deg, #110e22, #0d0a1e);
    padding: 44px 0 40px; border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: 0; font-size: 13px; color: var(--text-light); margin-bottom: 14px; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: '/'; margin: 0 8px; color: var(--border); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.page-hero h1 { font-size: clamp(26px, 4vw, 42px); margin-bottom: 12px; }
.page-hero .lead { max-width: 640px; font-size: 17px; }
.page-hero__meta { display: flex; align-items: center; gap: 20px; margin-top: 18px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }

/* ── TAGS ────────────────────────────────────────── */
.tag { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--primary-light); color: var(--primary); }
.tag--gray { background: var(--bg-subtle); color: var(--text-muted); }

/* ── CONTENT LAYOUT ──────────────────────────────── */
.content-wrap { padding: 56px 0 72px; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }

.article-body h2 { margin: 44px 0 16px; }
.article-body h3 { margin: 32px 0 12px; }
.article-body p { line-height: 1.82; color: var(--text-sec); }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 1em; }
.article-body li { margin-bottom: 10px; color: var(--text-sec); line-height: 1.7; }
.article-body strong { color: var(--text); }

.info-box { background: var(--primary-light); border-left: 3px solid var(--primary); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 20px 24px; margin: 28px 0; }
.info-box p { color: var(--text); margin: 0; }
.warn-box { background: rgba(251,191,36,0.08); border-left: 3px solid #fbbf24; border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 20px 24px; margin: 28px 0; }
.warn-box p { color: var(--text); margin: 0; }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.s-card { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; margin-bottom: 20px; }
.s-card h4 { font-size: 14px; margin-bottom: 14px; font-family: var(--font); font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.toc { list-style: none; }
.toc li { border-bottom: 1px solid var(--border); }
.toc li:last-child { border-bottom: none; }
.toc a { display: block; padding: 9px 0; font-size: 14px; color: var(--text-sec); }
.toc a:hover { color: var(--primary); text-decoration: none; }
.related li { margin-bottom: 10px; }
.related a { font-size: 14px; color: var(--text-sec); display: flex; align-items: flex-start; gap: 6px; }
.related a::before { content: '→'; color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.related a:hover { color: var(--primary); text-decoration: none; }

/* ── SECTION ──────────────────────────────────────── */
.section { padding: 64px 0; }
.section--gray { background: var(--bg-subtle); }
.section__hd { margin-bottom: 40px; }
.section__hd h2 { margin-bottom: 10px; }
.section__hd p { font-size: 16px; max-width: 520px; margin: 0; }

/* ── CARDS ────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.card {
    background: #110e1f; border: 1px solid var(--border); border-radius: var(--r);
    padding: 28px; transition: box-shadow var(--tr), transform var(--tr);
    text-decoration: none; display: block; color: inherit;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.card__icon { width: 48px; height: 48px; background: var(--primary-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.card__title { font-size: 17px; margin-bottom: 8px; color: var(--text); font-family: var(--font-d); }
.card__desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.card--green { background: linear-gradient(135deg, var(--primary), #6d28d9); }
.card--green .card__title, .card--green .card__desc { color: #fff; }
.card--green .card__icon { background: rgba(255,255,255,.18); }

/* ── ARTICLE GRID ─────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.a-card { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: box-shadow var(--tr); text-decoration: none; display: block; color: inherit; }
.a-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; }
.a-card__body { padding: 24px; }
.a-card__tag { margin-bottom: 10px; }
.a-card__title { font-size: 17px; font-family: var(--font-d); margin-bottom: 8px; color: var(--text); line-height: 1.3; }
.a-card__excerpt { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.a-card__meta { padding: 14px 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-light); display: flex; gap: 14px; }

/* ── TABLE ────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; margin: 28px 0; border-radius: var(--r); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg-subtle); padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); font-family: var(--font); }
td { padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text-sec); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }
.yes { color: #4ade80; font-weight: 500; }
.no { color: #f87171; font-weight: 500; }
.partial { color: #fbbf24; font-weight: 500; }

/* ── BADGES ───────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.badge--green { background: rgba(74,222,128,0.12); color: #4ade80; }
.badge--yellow { background: rgba(251,191,36,0.12); color: #fbbf24; }
.badge--red { background: rgba(248,113,113,0.12); color: #f87171; }

/* ── FAQ ──────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; padding: 20px 0; text-align: left; font-size: 16px; font-weight: 500; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--font); gap: 16px; }
.faq-q:hover { color: var(--primary); }
.faq-icon { font-size: 22px; color: var(--primary); transition: transform var(--tr); flex-shrink: 0; line-height: 1; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding-bottom: 20px; color: var(--text-sec); font-size: 15px; line-height: 1.78; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-item.open .faq-a { max-height: 600px; }

/* ── GLOSSARY ─────────────────────────────────────── */
.gloss-section { margin-bottom: 44px; }
.gloss-letter { font-size: 26px; font-family: var(--font-d); color: var(--primary); border-bottom: 2px solid var(--primary-light); padding-bottom: 8px; margin-bottom: 20px; }
.gloss-term { padding: 18px 0; border-bottom: 1px solid var(--border); }
.gloss-term h4 { font-size: 15px; margin-bottom: 6px; font-family: var(--font); font-weight: 500; color: var(--text); }
.gloss-term p { margin: 0; font-size: 14px; color: var(--text-sec); }

/* ── CTA BANNER ───────────────────────────────────── */
.cta-banner { background: linear-gradient(135deg, var(--primary), #6d28d9); border-radius: var(--r); padding: 48px 40px; text-align: center; margin: 48px 0; }
.cta-banner h2, .cta-banner h3 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,.85); margin-bottom: 28px; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 100px; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all var(--tr); font-family: var(--font); border: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn--white { background: rgba(255,255,255,0.1); color: var(--primary); }
.btn--white:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.btn--outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary-light); text-decoration: none; }

/* ── STATS BAR ────────────────────────────────────── */
.stats-bar { background: var(--primary); padding: 18px 0; }
.stats-bar__inner { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 16px; }
.stats-bar__item { text-align: center; }
.stats-bar__val { font-size: 24px; font-family: var(--font-d); color: #fff; display: block; }
.stats-bar__lbl { font-size: 12px; color: rgba(255,255,255,.8); display: block; margin-top: 2px; }

/* ── FOOTER ───────────────────────────────────────── */
.footer { background: #111; color: rgba(255,255,255,.65); margin-top: 80px; }
.footer__top { padding: 64px 0 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; }
.footer__brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 16px; }
.footer__brand-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; font-family: var(--font-d); }
.footer__brand-name { font-size: 15px; font-weight: 500; color: #fff; font-family: var(--font-d); }
.footer__brand-desc { font-size: 14px; line-height: 1.7; margin-bottom: 22px; color: rgba(255,255,255,.55); max-width: 280px; }
.footer__social { display: flex; gap: 10px; }
.footer__soc-link { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.07); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.65); text-decoration: none; font-size: 15px; transition: background var(--tr), color var(--tr); }
.footer__soc-link:hover { background: var(--primary); color: #fff; text-decoration: none; }
.footer__col-title { font-size: 12px; font-weight: 500; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 20px; }
.footer__links li { margin-bottom: 12px; }
.footer__links a { font-size: 14px; color: rgba(255,255,255,.55); transition: color var(--tr); }
.footer__links a:hover { color: #fff; text-decoration: none; }
.footer__bottom { padding: 22px 0; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.35); flex-wrap: wrap; gap: 12px; }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a { color: rgba(255,255,255,.35); transition: color var(--tr); }
.footer__legal a:hover { color: rgba(255,255,255,.65); text-decoration: none; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer__col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    :root { --nav-h: 64px; }
    .nav__menu, .nav__actions .search-box { display: none; }
    .nav__mobile-btn { display: flex; }
    .hero { padding: 48px 0 40px; }
    .hero__stats { flex-direction: column; gap: 20px; }
    .section { padding: 40px 0; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .cta-banner { padding: 32px 20px; }
    .footer__bottom { flex-direction: column; text-align: center; }
    .articles-grid { grid-template-columns: 1fr; }
    .stats-bar__val { font-size: 20px; }
}
