/* ============================================================
   OutliveHub — Scientific Editorial Design System
   A premium research platform with distinctive character
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@700;800&display=swap');

/* View Transitions — smooth crossfade between pages (progressive enhancement) */
@view-transition {
    navigation: auto;
}

:root {
    /* Core palette - warm, sophisticated, editorial */
    --ink: #1a1a2e;
    --ink-light: #2d2d44;
    --ink-muted: #5c5c7a;
    --cream: #faf8f5;
    --cream-dark: #f0ede8;
    --paper: #ffffff;

    /* Accent - burnt sienna, sophisticated warmth */
    --accent: #c45a3b;
    --accent-hover: #a84832;
    --accent-soft: rgba(196, 90, 59, 0.1);

    /* Credibility spectrum - muted, sophisticated */
    --verified: #2d7d5f;
    --verified-bg: rgba(45, 125, 95, 0.08);
    --promising: #9a7b2e;
    --promising-bg: rgba(154, 123, 46, 0.08);
    --preliminary: #b86a3a;
    --preliminary-bg: rgba(184, 106, 58, 0.08);
    --disputed: #a64545;
    --disputed-bg: rgba(166, 69, 69, 0.08);

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- Reset & Base ------------------------------------------ */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.025;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Typography -------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}

.display-hero {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.display-lg {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.display-md {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.text-muted {
    color: var(--ink-muted) !important;
}

.text-accent {
    color: var(--accent);
}

/* Editorial emphasis */
.editorial-lead {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    color: var(--ink-muted);
    line-height: 1.5;
}

/* --- Links & Buttons --------------------------------------- */

a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

a:hover {
    color: var(--accent);
}

.link-underline {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    background: var(--ink);
    color: var(--cream) !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--paper) !important;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    background: transparent;
    color: var(--ink) !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--cream) !important;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--ink-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.btn-ghost:hover {
    color: var(--ink);
    border-color: var(--ink-light);
}

/* --- Navigation -------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--cream);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: env(safe-area-inset-top, 0px);
    overflow: hidden;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    gap: 3px;
}

.site-logo .logo-top {
    font-family: 'Outfit', var(--font-body);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.site-logo .logo-sub {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.site-logo .logo-sub .logo-accent { color: var(--accent); }
.site-logo .logo-sub .logo-muted { color: #aaa; }

.site-logo:hover .logo-top {
    color: var(--ink);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-icon {
    color: var(--ink-muted);
    font-size: 1.05rem;
    padding: var(--space-xs);
    transition: color 0.2s var(--ease-out);
}

.nav-icon:hover {
    color: var(--ink);
}

/* Mobile bottom bar */
.mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--paper);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: var(--space-sm) 0 calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 992px) {
    .mobile-tab-bar {
        display: none;
    }
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: var(--space-xs) 0;
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s var(--ease-out);
}

.tab-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tab-item i {
    font-size: 1.25rem;
    transition: transform 0.2s var(--ease-out);
}

.tab-item:hover,
.tab-item.active {
    color: var(--accent);
}

.tab-item:hover i {
    transform: translateY(-2px);
}

/* --- Layout ------------------------------------------------ */

.main-content {
    padding-bottom: 80px;
}

@media (min-width: 992px) {
    .main-content {
        padding-bottom: var(--space-2xl);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: 720px;
}

.container-wide {
    max-width: 1400px;
}

.section {
    padding: var(--space-lg) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-xl) 0;
    }
}

/* --- Cards ------------------------------------------------- */

.card {
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.06);
    border-radius: 0;
    transition: all 0.3s var(--ease-out);
}

.article-card {
    position: relative;
    background: var(--paper);
    border: none;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-sm);
    transition: all 0.3s var(--ease-out);
}

.article-card:first-child {
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.article-card::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-lg));
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.article-card:hover::before {
    opacity: 1;
}

.article-card-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: var(--space-sm);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
    transition: color 0.2s var(--ease-out);
}

@media (min-width: 768px) {
    .article-title {
        font-size: 1.25rem;
    }
}

.article-card:hover .article-title {
    color: var(--accent);
}

.article-excerpt {
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.article-footer-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Score display */
.score-display {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    background: var(--cream);
    min-width: 44px;
    cursor: pointer;
    outline: none;
}

.score-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-top: var(--space-xs);
}

/* Score tooltip — sub-score breakdown on hover/focus */
.score-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.375rem);
    right: 0;
    width: 240px;
    max-width: calc(100vw - 3rem);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.12);
    padding: var(--space-sm) var(--space-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.score-display:hover .score-tooltip,
.score-display:focus .score-tooltip {
    display: block;
}

@media (max-width: 575px) {
    .score-tooltip {
        right: auto;
        left: 0;
    }
}

.score-tooltip-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.2rem 0;
}

.score-tooltip-label {
    font-size: 0.65rem;
    color: var(--ink-muted);
    width: 5rem;
    flex-shrink: 0;
}

.score-tooltip-bar {
    flex: 1;
    height: 4px;
    background: var(--cream-dark);
}

.score-tooltip-bar > span {
    display: block;
    height: 100%;
    background: var(--ink);
}

.score-tooltip-val {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ink);
    width: 1.5rem;
    text-align: right;
    flex-shrink: 0;
}

.score-tooltip-footer {
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.score-tooltip-footer a {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    text-decoration: none;
}

.score-tooltip-footer a:hover {
    color: var(--accent);
}

/* --- Credibility Badges ------------------------------------ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 0;
}

.credibility-badge {
    border-left: 3px solid;
}

.credibility-verified {
    background: var(--verified-bg);
    color: var(--verified);
    border-color: var(--verified);
}

.credibility-promising {
    background: var(--promising-bg);
    color: var(--promising);
    border-color: var(--promising);
}

.credibility-preliminary {
    background: var(--preliminary-bg);
    color: var(--preliminary);
    border-color: var(--preliminary);
}

.credibility-disputed {
    background: var(--disputed-bg);
    color: var(--disputed);
    border-color: var(--disputed);
}

.badge-subtle {
    background: var(--cream-dark);
    color: var(--ink-muted);
}

.badge-category {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid rgba(26, 26, 46, 0.15);
}

.badge-source {
    background: rgba(26, 26, 46, 0.04);
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

/* --- Filter Chips ------------------------------------------ */

.filter-bar {
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-sm);
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--cream);
    padding-top: var(--space-sm);
}

/* Dropdowns first, chips scroll after */
.filter-row-dropdowns {
    order: -1;
    flex-shrink: 0;
    gap: var(--space-sm);
}

.filter-row:not(.filter-row-dropdowns) {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-row:not(.filter-row-dropdowns)::-webkit-scrollbar {
    display: none;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-row-label {
    flex-shrink: 0;
    width: 3.5rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    opacity: 0.7;
}

@media (max-width: 575px) {
    .filter-row-label {
        display: none;
    }
}

.filter-chips {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid rgba(26, 26, 46, 0.12);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-decoration: none;
}

.filter-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.filter-chip.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--cream);
}

/* Filter dropdown row */

.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.65rem;
    background: transparent;
    border: 1px solid rgba(26, 26, 46, 0.12);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    font-family: var(--font-body);
    white-space: nowrap;
}

.filter-dropdown-btn:hover {
    border-color: var(--ink);
}

.filter-dropdown.open .filter-dropdown-btn {
    border-color: var(--ink);
    background: rgba(26, 26, 46, 0.03);
}

.filter-dropdown-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    opacity: 0.65;
}

.filter-dropdown-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
}

.filter-dropdown-arrow {
    color: var(--ink-muted);
    transition: transform 0.2s var(--ease-out);
    flex-shrink: 0;
}

.filter-dropdown.open .filter-dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.1);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.1), 0 2px 6px rgba(26, 26, 46, 0.06);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s var(--ease-out);
    padding: 0.25rem 0;
}

.filter-dropdown.open .filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-item {
    display: block;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    transition: all 0.12s var(--ease-out);
    white-space: nowrap;
}

.filter-dropdown-item:hover {
    background: rgba(26, 26, 46, 0.04);
    color: var(--ink);
}

.filter-dropdown-item.active {
    color: var(--ink);
    font-weight: 600;
    background: rgba(26, 26, 46, 0.05);
}

/* --- Hero Section ------------------------------------------ */

.hero {
    padding: var(--space-2xl) 0;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: calc(var(--space-2xl) * 1.5) 0;
    }
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

/* --- Feature Grid ------------------------------------------ */

.feature-grid {
    display: grid;
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
}

.feature-item {
    padding: var(--space-lg);
    border: 1px solid rgba(26, 26, 46, 0.08);
    background: var(--paper);
    transition: all 0.3s var(--ease-out);
}

.feature-item:hover {
    border-color: var(--accent);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

/* --- Quick Links Grid -------------------------------------- */

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .quick-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.08);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.quick-link:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.quick-link i {
    font-size: 1.5rem;
    color: var(--ink-muted);
    transition: color 0.2s var(--ease-out);
}

.quick-link:hover i {
    color: var(--accent);
}

.quick-link span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
}

/* --- Article Detail ---------------------------------------- */

.article-detail {
    max-width: 720px;
}

.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.article-breadcrumb a {
    color: var(--ink-muted);
}

.article-breadcrumb a:hover {
    color: var(--accent);
}

.article-breadcrumb-sep {
    color: rgba(26, 26, 46, 0.3);
}

.article-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.article-detail-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.tldr-box {
    padding: var(--space-lg);
    background: var(--cream);
    border-left: 4px solid var(--accent);
    margin: var(--space-xl) 0;
}

.tldr-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.tldr-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
}

.verification-panel {
    padding: var(--space-lg);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.08);
    margin: var(--space-xl) 0;
}

.verification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.verification-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}

.verification-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 400px) {
    .verification-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 576px) {
    .verification-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.verification-item {
    padding: var(--space-md);
    background: var(--cream);
}

.verification-item-label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-bottom: 0.125rem;
}

.verification-item-hint {
    font-size: 0.6rem;
    color: var(--ink-muted);
    opacity: 0.7;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
}

.verification-item-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 500;
}

.verification-method-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

.verification-method-link:hover {
    color: var(--accent);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: var(--space-lg);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.tag {
    padding: 0.4rem 0.8rem;
    background: var(--cream-dark);
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s var(--ease-out);
    text-decoration: none;
}

.tag:hover {
    background: var(--ink);
    color: var(--cream);
}

/* --- Forms ------------------------------------------------- */

.form-container {
    max-width: 400px;
    margin: var(--space-2xl) auto;
    padding: var(--space-xl);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.08);
}

.form-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--cream);
    border: 1px solid rgba(26, 26, 46, 0.12);
    border-radius: 0;
    transition: all 0.2s var(--ease-out);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--paper);
}

.form-control::placeholder {
    color: var(--ink-muted);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
    margin-bottom: var(--space-xs);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-footer {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.form-footer a {
    color: var(--accent);
    font-weight: 500;
}

/* --- Page Header ------------------------------------------- */

.page-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500;
}

.page-subtitle {
    color: var(--ink-muted);
    margin-top: var(--space-sm);
}

/* --- Breadcrumb -------------------------------------------- */

nav.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-bottom: var(--space-lg);
    list-style: none;
    padding: 0;
    /* Override Bootstrap .breadcrumb defaults */
    background: none;
    border-radius: 0;
}

nav.breadcrumb a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

nav.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: rgba(26, 26, 46, 0.2);
}

/* --- Topic Cards ------------------------------------------- */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .topic-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .topic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.08);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.topic-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.topic-card-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.topic-card-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.topic-card-count {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin: 0;
}

/* --- Stories Avatar Row ------------------------------------ */

.stories-row-wrapper {
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.stories-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.stories-row::-webkit-scrollbar {
    display: none;
}

.stories-avatar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 76px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--ink);
}

.stories-avatar-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: var(--divider, rgba(26, 26, 46, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.stories-avatar-link.has-new .stories-avatar-ring {
    background: linear-gradient(135deg, var(--accent, #c45d3e), #e8915a, var(--accent, #c45d3e));
    animation: stories-pulse 2.5s ease-in-out infinite;
}

@keyframes stories-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 93, 62, 0.25); }
    50% { box-shadow: 0 0 0 4px rgba(196, 93, 62, 0.1); }
}

.stories-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--cream, #faf8f5);
}

.stories-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent, #c45d3e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 2.5px solid var(--cream, #faf8f5);
}

.stories-avatar-name {
    font-size: 0.7rem;
    text-align: center;
    margin-top: 4px;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-muted);
}

/* --- Collection Cards -------------------------------------- */

.collection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.collection-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.08);
    transition: border-color 0.3s var(--ease-out);
}

.collection-card:hover {
    border-color: var(--accent);
}

.collection-card-link {
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.collection-card-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.collection-card-count {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin: 0;
}

.collection-card-desc {
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin: var(--space-xs) 0 0;
}

.collection-card-actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
    margin-left: var(--space-md);
}

/* --- Alerts ------------------------------------------------ */

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: 0;
    border: none;
    border-left: 4px solid;
    margin-bottom: var(--space-lg);
}

.alert-success {
    background: var(--verified-bg);
    border-color: var(--verified);
    color: var(--verified);
}

.alert-warning {
    background: var(--preliminary-bg);
    border-color: var(--preliminary);
    color: var(--preliminary);
}

.alert-danger {
    background: var(--disputed-bg);
    border-color: var(--disputed);
    color: var(--disputed);
}

/* --- Pagination -------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.pagination .page-link {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid rgba(26, 26, 46, 0.12);
    border-radius: 0;
    transition: all 0.2s var(--ease-out);
}

.pagination .page-link:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--cream);
}

.pagination .page-item.disabled .page-link {
    background: var(--cream-dark);
    border-color: transparent;
}

/* --- Utilities --------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.py-section {
    padding-top: var(--space-md);
    padding-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .py-section {
        padding-top: var(--space-xl);
        padding-bottom: var(--space-2xl);
    }
}

/* --- Animation Keyframes ----------------------------------- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s var(--ease-out) forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* --- Progress Bar ------------------------------------------ */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    z-index: 500;
    pointer-events: none;
    opacity: 0;
}

.progress-bar.active {
    opacity: 1;
    animation: progressGrow 8s ease-out forwards;
}

.progress-bar.complete {
    opacity: 0;
    width: 100%;
    animation: progressComplete 0.3s ease-out forwards;
}

@keyframes progressGrow {
    0%   { width: 0; }
    10%  { width: 25%; }
    50%  { width: 60%; }
    100% { width: 90%; }
}

@keyframes progressComplete {
    0%   { width: 90%; opacity: 1; }
    50%  { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

/* --- Tap / Loading Feedback -------------------------------- */

.btn-primary:active,
.btn-secondary:active,
.btn-primary.is-loading,
.btn-secondary.is-loading {
    transform: scale(0.97);
    opacity: 0.85;
}

.btn-ghost:active,
.nav-link:active,
.tab-item:active,
.btn-ghost.is-loading,
.nav-link.is-loading,
.tab-item.is-loading {
    opacity: 0.6;
}

.filter-chip:active,
.page-link:active,
.filter-chip.is-loading,
.page-link.is-loading {
    transform: scale(0.96);
    opacity: 0.7;
}

.article-card:active,
.quick-link:active,
.article-card.is-loading,
.quick-link.is-loading {
    opacity: 0.8;
}

/* --- Bootstrap Overrides ----------------------------------- */

.btn-primary.bootstrap-override {
    background-color: var(--ink) !important;
    border-color: var(--ink) !important;
    border-radius: 0 !important;
}

.btn-primary.bootstrap-override:hover {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.btn-outline-secondary {
    border-radius: 0 !important;
}

.card {
    border-radius: 0 !important;
}

/* --- Bookmark Button ---------------------------------------- */

.bookmark-btn {
    background: none;
    border: 1px solid rgba(26, 26, 46, 0.15);
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.bookmark-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.bookmark-btn.bookmarked {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.bookmark-btn.bookmarked:hover {
    background: transparent;
    color: var(--accent);
}

/* --- Comment Section --------------------------------------- */

.comment-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 2px solid rgba(26, 26, 46, 0.08);
}

.comment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.comment-form-container {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.comment-form-box {
    background: var(--cream);
    border-left: 3px solid var(--accent);
    padding: var(--space-lg);
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.comment-form-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.comment-form-label {
    font-size: 0.85rem;
}

.comment-textarea {
    background: var(--paper);
}

.comment-form-footer {
    margin-top: var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    justify-content: space-between;
}

.comment-form-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--cream);
    border: 1px dashed rgba(26, 26, 46, 0.12);
}

.comment-form-login p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.comment-form-login a {
    color: var(--accent);
    font-weight: 600;
}

.comment-thread {
    margin-top: var(--space-md);
}

.comment-item {
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(26, 26, 46, 0.04);
}

.comment-indent-0 { margin-left: 0; }
.comment-indent-1 { margin-left: 1.5rem; border-left: 2px solid rgba(26, 26, 46, 0.08); padding-left: var(--space-md); }
.comment-indent-2 { margin-left: 1.5rem; border-left: 2px solid rgba(26, 26, 46, 0.06); padding-left: var(--space-md); }
.comment-indent-3 { margin-left: 1.5rem; border-left: 2px solid rgba(26, 26, 46, 0.04); padding-left: var(--space-md); }
.comment-indent-4 { margin-left: 1.5rem; border-left: 2px solid rgba(26, 26, 46, 0.03); padding-left: var(--space-md); }

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.comment-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ink-light);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.comment-dot {
    color: rgba(26, 26, 46, 0.2);
    font-size: 0.7rem;
}

.comment-author {
    font-weight: 600;
    color: var(--ink);
}

.comment-author:hover {
    color: var(--accent);
}

.comment-time {
    color: var(--ink-muted);
}

.comment-points {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.comment-points.positive {
    color: var(--verified);
}

.comment-points.negative {
    color: var(--disputed);
}

.comment-body {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    padding-left: calc(26px + var(--space-sm));
}

.comment-body p {
    margin-bottom: var(--space-xs);
}

.comment-body p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-left: calc(26px + var(--space-sm));
}

/* Comment action buttons — pill-style */
.comment-action-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    border-radius: 3px;
    font-family: var(--font-body);
}

.comment-action-btn:hover {
    color: var(--ink);
    background: var(--cream-dark);
    border-color: rgba(26, 26, 46, 0.08);
}

.comment-action-btn.upvoted {
    color: var(--verified);
    background: var(--verified-bg);
    border-color: rgba(45, 125, 95, 0.15);
}

.comment-action-btn.downvoted {
    color: var(--disputed);
    background: var(--disputed-bg);
    border-color: rgba(166, 69, 69, 0.15);
}

.comment-action-btn.comment-action-danger:hover {
    color: var(--disputed);
    background: var(--disputed-bg);
}

/* Vote buttons (used in post cards) */
.vote-btn {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.15s ease;
    border-radius: 2px;
}

.vote-btn:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.vote-btn.active {
    color: var(--accent);
    font-weight: 600;
}

.vote-score {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.reply-form-container {
    margin: var(--space-sm) 0;
    padding-left: var(--space-md);
}

/* Community inline-style replacements */
.badge-pinned {
    background: var(--accent-soft);
    color: var(--accent);
}

.badge-locked {
    background: var(--disputed-bg);
    color: var(--disputed);
}

.comment-sort-filters {
    display: flex;
    gap: var(--space-sm);
}

.comment-section-header h2 {
    font-size: 1.25rem;
}

.post-locked-msg {
    text-align: center;
    padding: var(--space-md);
}

.reply-form-actions {
    margin-top: var(--space-sm);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.inline-form {
    display: inline;
}

.post-link-card-icon-sm {
    font-size: 0.75rem;
    color: var(--ink-muted);
}

/* --- Community Mobile Overrides ------------------------------ */
@media (max-width: 575px) {
    /* Reduce comment nesting indentation */
    .comment-indent-1,
    .comment-indent-2,
    .comment-indent-3,
    .comment-indent-4 {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    /* Remove avatar-aligned left padding on comment body/actions */
    .comment-body,
    .comment-actions {
        padding-left: 0;
    }

    /* Remove reply form extra indent */
    .reply-form-container {
        padding-left: 0;
    }

    /* Enlarge comment action buttons for touch */
    .comment-action-btn {
        padding: 0.4rem 0.65rem;
    }
    .comment-actions {
        gap: 0.5rem;
    }

    /* Enlarge vote buttons for touch */
    .vote-btn {
        padding: 0.4rem 0.5rem;
    }

    /* Stack post detail vote sidebar above content */
    .post-detail-layout {
        flex-direction: column;
    }
    .post-detail-vote {
        flex-direction: row;
        min-width: auto;
        gap: var(--space-sm);
    }
    .vote-score-lg {
        font-size: 1.2rem;
        padding: 0 var(--space-xs);
    }
}

/* --- Community Sort Pills & New Post Button ----------------- */
.community-sort-pills {
    display: flex;
    gap: var(--space-xs);
}

.sort-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s var(--ease-out);
}

.sort-pill:hover {
    color: var(--ink);
}

.sort-pill.active {
    color: var(--ink);
    background: rgba(26, 26, 46, 0.05);
    border-color: rgba(26, 26, 46, 0.1);
    font-weight: 600;
}

.sort-pill i {
    font-size: 0.7rem;
}

.community-new-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--ink);
    color: var(--cream);
    text-decoration: none;
    border-radius: 50%;
    font-size: 0.85rem;
    transition: all 0.15s var(--ease-out);
}

.community-new-post-btn:hover {
    background: var(--ink-light);
    transform: scale(1.05);
}

/* --- Post Cards -------------------------------------------- */

.post-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    margin-bottom: var(--space-sm);
}

.post-card:first-child {
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.post-card-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 40px;
    padding-top: var(--space-xs);
}

.post-card-content {
    flex: 1;
    min-width: 0;
}

.post-card-preview {
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: var(--space-sm);
    padding: 0.25rem 0.5rem;
    background: var(--accent-soft);
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-card-link:hover {
    color: var(--accent-hover);
}

/* Post type left-border colors */
.post-type-question {
    border-left: 3px solid var(--promising);
}

.post-type-link {
    border-left: 3px solid var(--accent);
}

.post-type-protocol {
    border-left: 3px solid var(--verified);
}

.post-type-discussion {
    border-left: 3px solid var(--ink-muted);
}

/* Post type badge colors */
.badge-post-type {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-type-question {
    background: var(--promising-bg);
    color: var(--promising);
    border-left: 2px solid var(--promising);
}

.badge-type-link {
    background: var(--accent-soft);
    color: var(--accent);
    border-left: 2px solid var(--accent);
}

.badge-type-protocol {
    background: var(--verified-bg);
    color: var(--verified);
    border-left: 2px solid var(--verified);
}

.badge-type-discussion {
    background: var(--cream-dark);
    color: var(--ink-muted);
    border-left: 2px solid var(--ink-muted);
}

/* Post detail header */
.post-detail-header {
    padding: var(--space-lg);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.06);
    margin-bottom: var(--space-lg);
}

/* Post detail layout */
.post-detail-layout {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.post-detail-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 56px;
    padding: var(--space-sm) var(--space-sm);
    background: var(--ink);
    flex-shrink: 0;
}

.post-detail-vote .vote-btn-lg {
    color: rgba(255, 255, 255, 0.5);
}

.post-detail-vote .vote-btn-lg:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.1);
}

.post-detail-vote .vote-btn-lg.active {
    color: var(--accent);
}

.post-detail-info {
    flex: 1;
    min-width: 0;
}

.vote-btn-lg {
    padding: 0.4rem 0.6rem;
    font-size: 1.2rem;
}

.vote-score-lg {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1;
    padding: var(--space-xs) 0;
}

.vote-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono);
}

/* Post author row */
.post-detail-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.post-author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
}

.post-author-name:hover {
    color: var(--accent);
}

.post-author-time {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-left: var(--space-xs);
}

/* Post body card */
.post-detail-body {
    font-size: 1.05rem;
    line-height: 1.8;
    padding: var(--space-lg);
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.06);
    border-left: 3px solid var(--accent);
    margin-bottom: var(--space-lg);
}

.post-detail-body p {
    margin-bottom: var(--space-md);
}

.post-detail-body p:last-child {
    margin-bottom: 0;
}

/* Engagement bar */
.post-engagement-bar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
    border-bottom: 2px solid rgba(26, 26, 46, 0.06);
}

.post-engagement-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.post-engagement-item i {
    font-size: 0.9rem;
}

/* Post link card on detail page */
.post-link-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--cream);
    border: 1px solid rgba(26, 26, 46, 0.08);
    margin-top: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.post-link-card i:first-child {
    color: var(--accent);
    font-size: 1.1rem;
}

.post-link-card a {
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--paper);
    border: 1px dashed rgba(26, 26, 46, 0.12);
    margin: var(--space-xl) 0;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--ink-muted);
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.empty-state-desc {
    color: var(--ink-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Post type hint on create form */
.post-type-hint {
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-style: italic;
}

/* Hide default Bootstrap navbar styling conflicts */
.navbar {
    padding: 0;
}

.navbar-brand {
    padding: 0;
    margin: 0;
}

/* --- Language Switcher ------------------------------------ */

.language-switcher-form {
    display: inline-flex;
    align-items: center;
}

.language-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.3rem 1.2rem 0.3rem 0;
    cursor: pointer;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5c7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.language-select:hover {
    border-color: var(--ink-light);
    color: var(--ink);
}

.language-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Search Nav ---------------------------------------------- */
.nav-search-toggle {
    font-size: 1rem;
    padding: 0.35rem;
    color: var(--ink-muted);
    transition: color 0.2s var(--ease-out);
}
.nav-search-toggle:hover {
    color: var(--ink);
}

/* --- Share Buttons ------------------------------------------- */
.share-buttons {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--cream-dark);
    border: 1px solid rgba(26, 26, 46, 0.1);
    border-radius: 0;
    padding: 0.4rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.share-btn:hover {
    color: var(--ink);
    border-color: var(--ink-light);
}

/* --- Profile Page ------------------------------------------- */
/* --- Profile Page ------------------------------------------- */
.profile-page {
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    padding: var(--space-sm) 0 var(--space-md);
}

.profile-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    border-radius: 50%;
}
img.profile-avatar {
    object-fit: cover;
    display: block;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.profile-username {
    font-size: 0.85rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
}

.profile-identity {
    margin-bottom: var(--space-xs);
}

.profile-bio {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 400px;
    margin: var(--space-sm) auto 0;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}
.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.profile-stat-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}
.profile-stat-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(26, 26, 46, 0.06);
    margin-top: var(--space-sm);
}
.profile-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}
.profile-tab:hover {
    color: var(--ink);
}
.profile-tab.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
    font-weight: 600;
}

.profile-section {
    padding-top: var(--space-lg);
}

.profile-section-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
}

.profile-activity-item {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(26, 26, 46, 0.05);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.15s var(--ease-out);
}

.profile-activity-item:hover {
    background: rgba(26, 26, 46, 0.02);
}

.profile-activity-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ink-muted);
    font-size: 0.85rem;
    background: rgba(26, 26, 46, 0.04);
    border-radius: 50%;
    margin-top: 2px;
}

.profile-activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-activity-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
}

.profile-activity-body {
    font-size: 0.85rem;
    color: var(--ink);
    line-height: 1.4;
}

.profile-activity-meta {
    font-size: 0.75rem;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.profile-activity-meta a {
    color: var(--accent);
    text-decoration: none;
}

.profile-empty-hint {
    font-size: 0.85rem;
    color: var(--ink-muted);
    padding: var(--space-md) 0;
    text-align: center;
}

/* --- Settings Page ------------------------------------------ */
.settings-page {
    max-width: 480px;
    margin: 0 auto;
    padding-top: var(--space-md);
}

.settings-page-header {
    margin-bottom: var(--space-xl);
}

.settings-back-link {
    font-size: 0.8rem;
    color: var(--ink-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    transition: color 0.15s var(--ease-out);
}

.settings-back-link:hover {
    color: var(--ink);
}

.settings-page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.settings-group {
    margin-bottom: var(--space-xl);
}

.settings-group-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: var(--space-sm);
}

.settings-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.settings-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-sm);
    border-bottom: 1px solid rgba(26, 26, 46, 0.06);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.15s var(--ease-out);
}
.settings-card:first-child {
    border-top: 1px solid rgba(26, 26, 46, 0.06);
}
.settings-card:hover {
    background: rgba(26, 26, 46, 0.02);
}
.settings-card-icon {
    font-size: 1.1rem;
    color: var(--ink-muted);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(26, 26, 46, 0.04);
    border-radius: 50%;
}
.settings-card-body {
    flex: 1;
    min-width: 0;
}
.settings-card-title {
    font-weight: 600;
    font-size: 0.9rem;
}
.settings-card-desc {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 1px;
}
.settings-card-chevron {
    color: var(--ink-muted);
    opacity: 0.4;
    font-size: 0.8rem;
}
.settings-card-danger {
    border-color: rgba(166, 69, 69, 0.12);
}
.settings-card-danger:first-child {
    border-top-color: rgba(166, 69, 69, 0.12);
}
.settings-card-danger:hover {
    background: var(--disputed-bg);
}
.settings-card-danger .settings-card-icon {
    background: rgba(166, 69, 69, 0.08);
    color: var(--disputed);
}
.settings-card-danger .settings-card-title {
    color: var(--disputed);
}

/* --- Danger Zone / Delete Account --------------------------- */
.danger-zone-warning {
    background: var(--disputed-bg);
    border: 1px solid rgba(166, 69, 69, 0.2);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    color: var(--disputed);
    font-size: 0.9rem;
}
.danger-zone-warning i {
    display: block;
    margin-bottom: var(--space-sm);
}
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--disputed);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.btn-danger:hover {
    background: #8b3535;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--cream-dark);
    color: var(--ink);
    border: 1px solid rgba(26, 26, 46, 0.12);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.btn-secondary:hover {
    background: var(--cream);
    border-color: var(--ink-muted);
}

/* --- Email Management --------------------------------------- */
.email-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.email-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid rgba(26, 26, 46, 0.08);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.email-item:hover {
    background: var(--cream);
}
.email-item input[type="radio"] {
    flex-shrink: 0;
    accent-color: var(--accent);
}
.email-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.email-item-address {
    font-weight: 500;
    font-size: 0.95rem;
}
.email-item-badges {
    display: flex;
    gap: var(--space-xs);
}

/* --- Defensive Mobile Rules ---------------------------------- */
img {
    max-width: 100%;
    height: auto;
}

.article-body,
.comment-body {
    overflow-wrap: break-word;
}

/* --- Skeleton Screens -------------------------------------- */

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-line,
.skeleton-title,
.skeleton-badge {
    background: linear-gradient(90deg, var(--cream-dark) 25%, var(--paper) 50%, var(--cream-dark) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 2px;
}

.skeleton-line {
    height: 0.875rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-badge {
    height: 1.5rem;
    width: 5rem;
    display: inline-block;
}

.skeleton-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(26, 26, 46, 0.06);
    background: var(--paper);
}

/* ============================================================
   Influencer Feed — Story Cards + Stories Row Header
   ============================================================ */

/* Stories row header — title + See All link */
.stories-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
}

.stories-row-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

.stories-row-see-all {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    transition: color 0.2s;
}

.stories-row-see-all:hover {
    color: var(--accent-hover);
}

/* Story card — follows .article-card pattern */
.story-card {
    position: relative;
    background: var(--paper);
    border: none;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    padding: var(--space-lg) 0;
    transition: all 0.3s var(--ease-out);
}

.story-card:first-child {
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.story-card::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-lg));
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.story-card:hover::before {
    opacity: 1;
}

/* Card header — avatar + name left, badge + time right */
.story-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.story-card-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.story-card-avatar-link {
    flex-shrink: 0;
}

.story-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.story-card-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-dark);
    color: var(--ink-muted);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
}

.story-card-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-card-name:hover {
    color: var(--accent);
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.story-card-time {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--ink-muted);
    white-space: nowrap;
}

/* Platform badges */
.badge-platform {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
}

.badge-youtube {
    background: rgba(255, 0, 0, 0.08);
    color: #cc0000;
}

.badge-instagram {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.08), rgba(253, 29, 29, 0.08));
    color: #c13584;
}

.badge-twitter {
    background: rgba(26, 26, 46, 0.06);
    color: var(--ink-light);
}

/* Thumbnail */
.story-card-thumbnail-link {
    display: block;
    text-decoration: none;
    margin-bottom: var(--space-md);
}

.story-card-thumbnail-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cream-dark);
}

.story-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease-out);
}

.story-card-thumbnail-link:hover .story-card-thumbnail {
    transform: scale(1.03);
}

/* Play overlay for YouTube */
.story-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.story-card-thumbnail-link:hover .story-card-play-overlay {
    opacity: 1;
}

/* Caption — 2-line clamp */
.story-card-caption {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA link */
.story-card-cta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.story-card-cta:hover {
    color: var(--accent-hover);
}

/* Feed list layout */
.stories-feed-list {
    max-width: 640px;
}

@media (max-width: 767px) {
    .story-card-header {
        flex-wrap: wrap;
    }

    .story-card-meta {
        flex-basis: 100%;
        margin-top: calc(-1 * var(--space-xs));
        padding-left: calc(36px + var(--space-sm));
    }
}


/* ============================================================
   Catch-Up System — Category Descriptions
   ============================================================ */

.topic-card-desc {
    font-size: 0.78rem;
    color: var(--ink-muted, #888);
    line-height: 1.45;
    margin-top: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Catch-Up System — Article Card Improvements
   ============================================================ */

.article-significance {
    font-size: 0.8rem;
    line-height: 1.45;
    padding: var(--space-xs) var(--space-sm);
    margin: var(--space-xs) 0 var(--space-sm);
    background: rgba(196, 90, 59, 0.05);
    border-left: 2px solid var(--accent);
    border-radius: 0 4px 4px 0;
    color: var(--ink-muted, #666);
}

.sig-line { display: block; }

.article-category-subtitle {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-muted, #888);
    font-size: inherit;
}

.sig-feedback {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.sig-feedback-btn {
    font-size: 0.68rem;
    color: var(--ink-muted, #aaa);
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(26, 26, 46, 0.03);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.sig-feedback-btn:hover {
    background: rgba(196, 90, 59, 0.08);
    color: var(--accent);
}

.sig-feedback-btn.tapped {
    background: rgba(196, 90, 59, 0.12);
    color: var(--accent);
    font-weight: 600;
}

/* ============================================================
   Catch-Up System — Section Intro Tooltips
   ============================================================ */

.section-intro-tooltip {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    background: var(--paper, #fff);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    box-shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
}

.section-intro-tooltip p {
    font-size: 0.82rem;
    color: var(--ink-light, #333);
    line-height: 1.45;
    margin: 0;
}

.section-intro-dismiss {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.section-intro-dismiss:hover {
    background: rgba(196, 90, 59, 0.08);
}

/* ============================================================
   Catch-Up System — Article Detail Improvements
   ============================================================ */

.significance-box {
    padding: var(--space-md);
    margin: var(--space-md) 0;
    background: rgba(196, 90, 59, 0.04);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
}

.significance-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.significance-text {
    font-size: 0.9rem;
    color: var(--ink-light, #333);
    line-height: 1.55;
}

.significance-toggle {
    font-size: 0.75rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    margin-top: var(--space-xs);
    padding: 2px 0;
    text-decoration: underline;
}

.verification-panel .verification-grid {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.verification-panel.expanded .verification-grid {
    max-height: 600px;
}

.verification-panel.expanded .bi-chevron-down {
    transform: rotate(180deg);
}

/* ============================================================
   Bootstrap Replacement Utilities
   Lightweight equivalents for Bootstrap classes still in templates
   ============================================================ */

/* --- Display ------------------------------------------------- */
.d-none          { display: none !important; }
.d-block         { display: block !important; }
.d-inline-block  { display: inline-block !important; }
.d-flex          { display: flex !important; }

@media (min-width: 992px) {
    .d-lg-none   { display: none !important; }
}

/* --- Flexbox ------------------------------------------------- */
.flex-wrap                { flex-wrap: wrap; }
.justify-content-between  { justify-content: space-between; }
.justify-content-center   { justify-content: center; }
.align-items-start        { align-items: flex-start; }
.align-items-center       { align-items: center; }
.gap-2                    { gap: 0.5rem; }

/* --- Text ---------------------------------------------------- */
.text-dark            { color: var(--ink) !important; }
.text-decoration-none { text-decoration: none !important; }
.text-end             { text-align: right; }
.fw-bold              { font-weight: 700; }
.fs-4                 { font-size: 1.5rem; }
.small                { font-size: 0.875em; }

/* --- Spacing (numeric Bootstrap scale) ----------------------- */
.py-1  { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-2  { padding-left: 0.5rem; padding-right: 0.5rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-4  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-3  { margin-bottom: 1rem; }
.mb-4  { margin-bottom: 1.5rem; }

/* --- Components ---------------------------------------------- */
.card-body {
    padding: var(--space-lg);
}

.rounded-pill {
    border-radius: 50rem !important;
}

.bg-primary {
    background-color: var(--accent) !important;
    color: var(--cream) !important;
}

.bg-light {
    background-color: var(--cream-dark) !important;
}

.is-invalid {
    border-color: var(--disputed) !important;
}
.is-invalid ~ .invalid-feedback {
    display: block;
    color: var(--disputed);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
}

/* --- Dropdown (replaces Bootstrap JS dropdown) --------------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0.3em;
    height: 0.3em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.35em;
    vertical-align: 0.15em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 10rem;
    padding: 0.25rem 0;
    margin-top: 4px;
    background: var(--paper);
    border: 1px solid rgba(26, 26, 46, 0.1);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.1), 0 2px 6px rgba(26, 26, 46, 0.06);
    list-style: none;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    transition: background 0.12s var(--ease-out);
}

.dropdown-item:hover {
    background: rgba(26, 26, 46, 0.04);
}
