:root {
    --primary: #7c6cf2;
    --primary-light: #b3aaff;
    --dark: #111426;
    --surface: #181d35;
    --surface-light: #222944;
    --text: #eef1f8;
    --muted: #9da8bf;
    --border: rgba(179, 170, 255, .18);
    --amazon: #ff9900;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, rgba(124, 108, 242, .22), transparent 32rem),
        var(--dark);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.7;
}

a { color: var(--primary-light); }

.site-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.hub-hero { max-width: 760px; padding: 70px 0 48px; }
.eyebrow {
    color: var(--primary-light);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.hub-hero h1, .article-header h1 {
    margin: 8px 0 16px;
    font-size: clamp(2.35rem, 6vw, 4.6rem);
    line-height: 1.06;
    letter-spacing: -.04em;
}

.hub-hero p, .article-dek { color: #bdc6d8; font-size: 1.1rem; }

.topic-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 32px; }
.topic-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #cbd3e3;
    background: rgba(34, 41, 68, .55);
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.topic-filter span { color: var(--muted); font-size: .7rem; }
.topic-filter:hover, .topic-filter:focus-visible { border-color: var(--primary-light); color: white; }
.topic-filter.active { border-color: var(--primary); color: white; background: rgba(124, 108, 242, .25); }
.topic-filter.active span { color: #d8d3ff; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 18px; }
.section-heading h2 { margin: 0; font-size: 1.55rem; }
.section-heading a { font-size: .85rem; text-decoration: none; }
.section-heading > span { color: var(--muted); font-size: .8rem; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(24, 29, 53, .9);
    transition: transform .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(179, 170, 255, .48); }
.post-card > a { color: inherit; text-decoration: none; }
.post-image, .post-image-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: linear-gradient(135deg, #322b72, #16213e 60%, #26365c);
}
.post-image-placeholder { position: relative; }
.post-image-placeholder::after {
    content: 'NEXT UP';
    position: absolute;
    right: 16px;
    bottom: 12px;
    color: rgba(255,255,255,.62);
    font-weight: 700;
    letter-spacing: .13em;
}
.post-card-body { padding: 20px; }
.post-card-meta, .article-meta { color: var(--muted); font-size: .76rem; }
.post-card h2, .post-card h3 { margin: 8px 0; font-size: 1.16rem; line-height: 1.35; }
.post-card p { margin: 0; color: var(--muted); font-size: .87rem; }

.empty-state {
    padding: 42px;
    border: 1px dashed rgba(179, 170, 255, .28);
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
    background: rgba(24, 29, 53, .45);
}
.empty-state h2 { color: white; margin-top: 0; }

.article-shell { width: min(760px, calc(100% - 36px)); margin: 0 auto; }
.breadcrumbs { padding-top: 40px; color: var(--muted); font-size: .82rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.article-header { padding: 30px 0 26px; }
.article-header h1 { font-size: clamp(2.2rem, 6vw, 4.1rem); }
.article-dek { margin: 0 0 18px; }
.article-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: 16px; }
.image-credit { margin: 5px 0 0; color: var(--muted); font-size: .7rem; }

.affiliate-disclosure {
    margin: 26px 0;
    padding: 12px 15px;
    border-left: 3px solid var(--amazon);
    background: rgba(255, 153, 0, .08);
    color: #d3d8e3;
    font-size: .78rem;
}

.article-body { font-family: Georgia, 'Times New Roman', serif; color: #dce1eb; font-size: 1.08rem; }
.article-body h2, .article-body h3 {
    color: white;
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
    scroll-margin-top: 20px;
}
.article-body h2 { margin: 2.4em 0 .7em; font-size: 1.65rem; }
.article-body h3 { margin: 1.7em 0 .5em; font-size: 1.18rem; }
.article-body p { margin: 1.1em 0; }
.article-body li { margin: .45em 0; }
.article-body a { text-underline-offset: 3px; }
.article-body blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--primary);
    color: #bcc5d7;
    font-style: italic;
}
.article-body table { width: 100%; border-collapse: collapse; font-family: 'Poppins', sans-serif; font-size: .82rem; }
.article-body th, .article-body td { padding: 10px; border: 1px solid var(--border); text-align: left; }
.article-body th { background: var(--surface-light); }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; }

.article-cta {
    margin: 48px 0;
    padding: 26px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(135deg, rgba(124,108,242,.22), rgba(34,41,68,.7));
    border: 1px solid var(--border);
}
.article-cta h2 { margin: 0 0 8px; font-size: 1.25rem; }
.article-cta p { color: var(--muted); margin: 0 0 16px; font-size: .87rem; }
.cta-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    color: white;
    background: var(--primary);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
}
.button.secondary { background: var(--surface-light); border: 1px solid var(--border); }

.related {
    width: min(760px, calc(100% - 36px));
    margin: 50px auto;
}
.related .post-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.site-footer { margin-top: 70px; padding: 32px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row a { color: var(--muted); }

@media (max-width: 760px) {
    .hub-hero { padding-top: 45px; }
    .post-grid, .related .post-grid { grid-template-columns: 1fr; }
    .article-body { font-size: 1rem; }
    .article-body table { display: block; overflow-x: auto; }
}
