/* ==========================================================================
   Prediction Express — main stylesheet
   Dark charcoal base, warm amber/orange gradient accent, glassmorphic cards
   with soft depth and glow. No external fonts/CDNs — system font stack only.
   ========================================================================== */

:root {
    --bg: #0b0b0d;
    --bg-raised: #131315;
    --bg-card: rgba(255, 255, 255, 0.045);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-soft: rgba(255, 255, 255, 0.06);
    --text: #f2efe9;
    --text-dim: #b3aea5;
    --text-faint: #7a756c;

    --accent: #ff8a3d;
    --accent-2: #ffb143;
    --accent-dim: #c9601f;
    --accent-grad: linear-gradient(135deg, #ff8a3d 0%, #ffb143 100%);
    --accent-glow: 0 0 0 1px rgba(255, 138, 61, 0.25), 0 8px 30px rgba(255, 138, 61, 0.18);
    --accent-glow-lg: 0 0 0 1px rgba(255, 138, 61, 0.3), 0 16px 50px rgba(255, 138, 61, 0.25);

    --accent-red: #ff5c5c;
    --accent-blue: #5aa9ff;
    --accent-amber: #ffb143;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

    --radius: 18px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --max-width: 1240px;

    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1100px 600px at 12% -10%, rgba(255, 138, 61, 0.10), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(255, 138, 61, 0.06), transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.2em; }

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

/* ---------------------------------- Glass card base ---------------------------------- */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-card);
}

/* ---------------------------------- Header ---------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 11, 13, 0.78);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.site-branding { display: flex; align-items: center; gap: 10px; }

.site-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0;
}
.site-title a { color: var(--text); }
.site-title a:hover { text-decoration: none; }
.site-title .accent {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-description {
    font-size: 0.72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.primary-nav a {
    color: var(--text-dim);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    display: inline-block;
}
.primary-nav a:hover {
    color: var(--text);
    background: var(--bg-card-hover);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .primary-nav { display: none; width: 100%; }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; gap: 2px; padding: 10px 0 4px; }
    .primary-nav a { display: block; }
    .site-header__inner { flex-wrap: wrap; }
    .nav-toggle { display: inline-block; }
}

/* ---------------------------------- Ticker ---------------------------------- */
.market-ticker {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 10px 0;
    display: none;
}
.market-ticker.is-active { display: block; }
.market-ticker__track {
    display: inline-flex;
    gap: 28px;
    padding: 0 20px;
    animation: predex-ticker-scroll 40s linear infinite;
}
.market-ticker:hover .market-ticker__track { animation-play-state: paused; }
.ticker-item { display: inline-flex; gap: 8px; align-items: center; color: var(--text-dim); }
.ticker-item .label { color: var(--text-faint); }
.ticker-item .value { color: var(--text); font-weight: 600; }
.ticker-item .delta.up { color: var(--accent); }
.ticker-item .delta.down { color: var(--accent-red); }

@keyframes predex-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------------------------------- Chips ---------------------------------- */
.chip-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    color: var(--text-dim);
    background: var(--bg-card);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip--market_platform { border-color: rgba(90, 169, 255, 0.35); color: var(--accent-blue); }
.chip--category { border-color: rgba(255, 138, 61, 0.4); color: var(--accent); }

/* ---------------------------------- Front-page masthead package ---------------------------------- */
/* 3-column print-front-page pattern: lead story / spotlight story / featured
   list, an edition-divider bar, then a dense text-only digest row. */
.front-grid {
    display: grid;
    grid-template-columns: 1.7fr 1.1fr 1.1fr;
    gap: 28px;
    padding: 30px 0 8px;
    align-items: start;
}
@media (max-width: 1080px) { .front-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .front-grid { grid-template-columns: 1fr; } }

.front-grid__lead h1 {
    font-size: 1.9rem; line-height: 1.2; margin: 8px 0 14px; letter-spacing: -0.01em;
}
.front-grid__lead h1 a,
.front-grid__lead > a { color: var(--text); }
.front-grid__lead h1:hover, .front-grid__lead > a:hover { text-decoration: none; }
.front-grid__lead h1:hover { color: var(--accent-2); }
.front-grid__lead-img {
    display: block; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); margin-bottom: 14px; box-shadow: var(--shadow-card);
}
.front-grid__lead-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (max-width: 1080px) { .front-grid__lead { grid-column: 1 / -1; } }

.front-grid__spotlight {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 721px) { .front-grid__spotlight { border-bottom: none; } }
.front-grid__spotlight-img {
    display: block; border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--border); margin-bottom: 12px;
}
.front-grid__spotlight-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.front-grid__spotlight h2 { font-size: 1.15rem; line-height: 1.3; margin: 6px 0 8px; }
.front-grid__spotlight h2 a { color: var(--text); }
.front-grid__spotlight h2 a:hover { color: var(--accent); text-decoration: none; }

.front-grid__featured .section-heading { margin-bottom: 12px; padding-bottom: 8px; }

.featured-mini { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.featured-mini:last-child { border-bottom: none; }
.featured-mini__thumb { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.featured-mini__thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.featured-mini h3 { font-size: 0.98rem; line-height: 1.32; margin: 2px 0 0; }
.featured-mini h3 a { color: var(--text); }
.featured-mini h3 a:hover { color: var(--accent); text-decoration: none; }
.featured-mini__byline { color: var(--text-faint); font-size: 0.75rem; }
.featured-mini__dek { color: var(--text-dim); font-size: 0.85rem; margin: 0; line-height: 1.4; }
.featured-mini__more { color: var(--accent-2); font-size: 0.8rem; font-weight: 600; }

.edition-divider {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin: 20px 0 6px; padding-top: 16px;
    border-top: 3px solid var(--text);
}
.edition-divider__label {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em;
    background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.edition-divider__date { color: var(--text-faint); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }

.digest-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 22px 0 10px;
}
@media (max-width: 780px) { .digest-row { grid-template-columns: 1fr; } }
.digest-item { display: block; }
.digest-item h3 { font-size: 1.02rem; line-height: 1.3; margin: 0 0 8px; color: var(--text); }
.digest-item:hover h3 { color: var(--accent); }
.digest-item p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.45; margin: 0 0 8px; }
.digest-item__meta { color: var(--text-faint); font-size: 0.74rem; }

/* ---------------------------------- Section blocks (per-category, dense) ---------------------------------- */
.section-block { padding: 26px 0; border-top: 1px solid var(--border-soft); }
.section-block .section-heading h2 a { color: var(--text); }
.section-block .section-heading h2 a:hover { color: var(--accent); text-decoration: none; }

.headline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 4px 24px;
}

.headline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}
.headline-row__thumb {
    width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--radius-sm);
    overflow: hidden; background: var(--bg-raised);
}
.headline-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.headline-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.headline-row__title {
    color: var(--text); font-weight: 600; font-size: 0.9rem; line-height: 1.32;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.headline-row:hover .headline-row__title { color: var(--accent); }
.headline-row__meta { color: var(--text-faint); font-size: 0.74rem; }

.section-block--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) { .section-block--pair { grid-template-columns: 1fr; } }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    padding: 32px 0;
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
}

.hero-main {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.hero-main:hover {
    box-shadow: var(--accent-glow-lg);
    border-color: rgba(255, 138, 61, 0.4);
    transform: translateY(-2px);
}
.hero-main img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-main__body { padding: 22px 24px 26px; }
.hero-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    margin-bottom: 10px;
    display: block;
}
.hero-main h2 {
    font-size: 1.8rem;
    line-height: 1.25;
    margin: 6px 0 12px;
    color: var(--text);
}
.hero-main:hover h2 { color: var(--accent-2); }
.hero-excerpt { color: var(--text-dim); font-size: 0.96rem; margin: 0 0 10px; }

/* Overlay hero variant: title/meta scrimmed over the image, matching the
   image-overlay pattern used by comparable news sites. */
.hero-main--overlay { min-height: 320px; display: flex; align-items: flex-end; }
.hero-main--overlay img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.hero-main__placeholder-img {
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 20% 20%, rgba(255, 138, 61, 0.18), transparent 60%),
        var(--bg-raised);
}
.hero-overlay-scrim {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 60px 24px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 55%, transparent 100%);
}
.hero-overlay-scrim h2 { font-size: 1.7rem; line-height: 1.25; margin: 6px 0 10px; color: #fff; }
.hero-main--overlay:hover h2 { color: var(--accent-2); }
.hero-overlay-scrim .meta-row { color: rgba(255,255,255,0.75); }
.hero-dot { opacity: 0.6; }
.hero-excerpt--below { margin: 14px 0 0; }

/* ---------------------------------- Empty state ---------------------------------- */
.hero-empty {
    padding: 44px 32px;
    margin: 32px 0;
    text-align: left;
}
.hero-empty h1 { font-size: 1.9rem; margin: 8px 0 14px; max-width: 640px; }
.hero-empty p { color: var(--text-dim); max-width: 620px; margin: 0 0 20px; }
.hero-empty__links { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-note { color: var(--text-faint); font-size: 0.9rem; padding: 20px 0; }

.hero-side { display: flex; flex-direction: column; gap: 4px; }
.hero-side-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}
.hero-side-item:hover { background: var(--bg-card); }
.hero-side-item img {
    width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0;
    border: 1px solid var(--border);
}
.hero-side-item h3 { font-size: 0.95rem; margin: 0 0 4px; line-height: 1.35; }
.hero-side-item h3 a { color: var(--text); }
.hero-side-item h3 a:hover { color: var(--accent); text-decoration: none; }

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-faint);
}

/* ---------------------------------- Sections ---------------------------------- */
.section { padding: 34px 0; }
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.section-heading h2 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-heading h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-grad);
    box-shadow: 0 0 12px rgba(255, 138, 61, 0.6);
}
.section-heading a { font-size: 0.82rem; color: var(--text-faint); }
.section-heading a:hover { color: var(--accent); }

/* Trending */
.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: trend; }
.trending-list li {
    counter-increment: trend;
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-soft);
}
.trending-list li:last-child { border-bottom: none; }
.trending-list li::before {
    content: counter(trend);
    font-family: var(--font-mono);
    font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    width: 1.4em;
    flex-shrink: 0;
}
.trending-list a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.trending-list a:hover { color: var(--accent); text-decoration: none; }
.trending-views { color: var(--text-faint); font-size: 0.78rem; font-family: var(--font-mono); }

/* River / grid of article cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.post-card:hover {
    box-shadow: var(--accent-glow);
    border-color: rgba(255, 138, 61, 0.35);
    transform: translateY(-3px);
}
.post-card__img { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-raised); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-card h3 { font-size: 1.02rem; line-height: 1.4; margin: 0; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
.post-card .excerpt { color: var(--text-dim); font-size: 0.86rem; margin: 0; }

.two-col {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------- Single post ---------------------------------- */

/* Reading progress bar */
.reading-bar {
    position: sticky; top: 0; z-index: 60;
    height: 3px; width: 100%; background: transparent;
}
.reading-bar__fill {
    height: 100%; width: 0%;
    background: var(--accent-grad);
    box-shadow: 0 0 8px rgba(255, 138, 61, 0.6);
    transition: width 0.1s linear;
}

.article-header { padding: 20px 0 24px; }
.article-header h1 { font-size: 2.1rem; line-height: 1.22; margin: 12px 0 16px; letter-spacing: -0.01em; }
.article-excerpt { font-size: 1.06rem; color: var(--text-dim); margin: 0 0 16px; }

.byline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.byline img, .byline .avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); object-fit: cover; }
.byline__text { flex: 1; min-width: 0; }
.byline .author-name { color: var(--text); font-weight: 700; display: block; }
.byline .author-name:hover { color: var(--accent); text-decoration: none; }
.byline .timestamps { color: var(--text-faint); display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; margin-top: 2px; }
.byline-dot { opacity: 0.5; }

.share-row { display: flex; gap: 6px; }
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn--copied { color: var(--accent); border-color: var(--accent); }

.article-featured-img {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

/* Two-column article layout: body + sidebar */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }

.article-body { max-width: 720px; padding: 10px 0 26px; font-size: 1.06rem; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { font-size: 1.4rem; margin: 1.6em 0 0.6em; }
.article-body h3 { font-size: 1.15rem; margin: 1.4em 0 0.5em; }
.article-body blockquote {
    border-left: 3px solid var(--accent);
    background: var(--bg-card);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.4em 0;
    padding: 12px 18px;
    color: var(--text-dim);
    font-style: italic;
}
.article-body img { border-radius: var(--radius); margin: 1em 0; }
.article-body a { text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.92rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.article-body th { background: var(--bg-card); }
.article-body code { background: var(--bg-card); padding: 2px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.article-body pre { background: var(--bg-card); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px; margin: 8px 0 28px; }

/* Author bio card */
.author-card {
    display: flex; gap: 16px; align-items: flex-start;
    max-width: 720px; margin: 20px 0 12px; padding: 20px;
}
.author-card img { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }
.author-card__title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 4px; }
.author-card__name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.author-card__name:hover { color: var(--accent); text-decoration: none; }
.author-card__bio { color: var(--text-dim); font-size: 0.9rem; margin: 8px 0; }
.author-card__more { font-size: 0.85rem; color: var(--accent-2); }

/* Sidebar (article) */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 90px; }
.sidebar-widget { padding: 20px; }
.trending-list--compact li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.trending-list--compact li:last-child { border-bottom: none; }
.trending-list--compact a { color: var(--text); font-size: 0.88rem; font-weight: 600; }
.trending-list--compact a:hover { color: var(--accent); text-decoration: none; }
.sidebar-widget--newsletter p { color: var(--text-dim); font-size: 0.88rem; margin: 0 0 12px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
    background: var(--bg-raised); border: 1px solid var(--border); color: var(--text);
    padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.9rem;
}
.newsletter-form button {
    background: var(--accent-grad); color: #1a0e04; border: none; font-weight: 700;
    padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer;
    box-shadow: var(--accent-glow);
}

/* Infinite scroll */
.infinite-divider {
    max-width: 720px; margin: 40px auto; text-align: center;
    border-top: 1px solid var(--border-soft); position: relative;
}
.infinite-divider span {
    position: relative; top: -11px; background: var(--bg); padding: 0 14px;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint);
}
.infinite-status {
    text-align: center; padding: 30px 0; color: var(--text-faint); font-size: 0.9rem;
}
.infinite-spinner {
    display: inline-block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--accent);
    animation: pex-spin 0.7s linear infinite; margin-right: 8px; vertical-align: -2px;
}
@keyframes pex-spin { to { transform: rotate(360deg); } }

.related-posts { padding: 34px 0; border-top: 1px solid var(--border-soft); margin-top: 24px; }

/* ---------------------------------- Sidebar / archive intro ---------------------------------- */
.archive-intro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 32px;
    margin: 26px 0;
    color: var(--text-dim);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-card);
}
.archive-intro h1 { color: var(--text); margin: 0 0 10px; font-size: 1.85rem; letter-spacing: -0.01em; }
.archive-intro > div { font-size: 0.98rem; max-width: 680px; }

/* Author archive header */
.author-header {
    display: flex; gap: 22px; align-items: center;
    padding: 32px; margin: 26px 0;
}
.author-header img { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }
.author-header__body h1 { font-size: 1.8rem; margin: 6px 0 10px; color: var(--text); }
.author-header__body p { color: var(--text-dim); max-width: 620px; margin: 0 0 10px; }
.author-header__stat {
    display: inline-block; font-size: 0.78rem; color: var(--accent);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
@media (max-width: 640px) {
    .author-header { flex-direction: column; text-align: center; align-items: center; }
}

/* ---------------------------------- Pagination ---------------------------------- */
.pagination {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 28px 0;
    justify-content: center;
}
.pagination a, .pagination span {
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-dim);
    font-size: 0.85rem;
    background: var(--bg-card);
}
.pagination .current {
    background: var(--accent-grad);
    color: #1a0e04;
    border-color: transparent;
    font-weight: 700;
    box-shadow: var(--accent-glow);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------------------------------- Widgets / sidebar tables ---------------------------------- */
.data-table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.92rem; border-radius: var(--radius-sm); overflow: hidden; }
.data-table th, .data-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.data-table th { background: var(--bg-card); color: var(--text); }
.data-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.status-pill { display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.status-pill--legal { background: rgba(255, 138, 61, 0.16); color: var(--accent); }
.status-pill--restricted { background: rgba(255, 177, 67, 0.16); color: var(--accent-amber); }
.status-pill--illegal { background: rgba(255, 92, 92, 0.16); color: var(--accent-red); }
.status-pill--unclear { background: rgba(179, 174, 165, 0.16); color: var(--text-dim); }

.glossary-term {
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 4px;
}
.glossary-term dt { font-weight: 800; font-size: 1.05rem; color: var(--accent); }
.glossary-term dd { margin: 6px 0 0; color: var(--text-dim); }
.glossary-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 28px; }
.glossary-jump a {
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    padding: 5px 13px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
}
.glossary-jump a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------------------------------- Search / 404 ---------------------------------- */
.search-form { display: flex; gap: 8px; margin: 20px 0; }
.search-form input[type="search"] {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}
.search-form button {
    background: var(--accent-grad);
    color: #1a0e04;
    border: none;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--accent-glow);
}
.error-404 { text-align: center; padding: 90px 0; }
.error-404 h1 {
    font-size: 3.2rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

/* ---------------------------------- Footer ---------------------------------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    background: var(--bg-raised);
    margin-top: 50px;
    padding: 40px 0 26px;
    color: var(--text-faint);
    font-size: 0.85rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 34px; justify-content: space-between; }
.footer-grid nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav a { color: var(--text-dim); }
.footer-grid nav a:hover { color: var(--accent); }
.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.widget-title { color: var(--text); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; }

/* Utility */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent-grad);
    color: #1a0e04;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }
