/* =============================================================================
   FedWell — Design System
   ============================================================================= */

:root {
    --fw-cream:        #FDF8F0;
    --fw-charcoal:     #2D2D2D;
    --fw-dark-brown:   #3D2B1F;
    --fw-warm-green:   #4A7C59;
    --fw-warm-green-d: #3A6348;
    --fw-soft-gold:    #C9A96E;
    --fw-light-sage:   #E8EDE5;
    --fw-muted:        #696969;
    --fw-border:       #E0D8CD;
}

/* =============================================================================
   Reset & Base
   ============================================================================= */

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

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Global focus-visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--fw-warm-green);
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--fw-cream);
    color: var(--fw-charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--fw-dark-brown);
    line-height: 1.3;
}

a {
    color: var(--fw-warm-green);
    text-decoration: none;
}

a:hover {
    color: var(--fw-warm-green-d);
}

.fw-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================================================
   Header
   ============================================================================= */

.fw-header {
    background: white;
    border-bottom: 1px solid var(--fw-border);
    padding: 14px 0;
}

.fw-header-inner {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.fw-logo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fw-dark-brown);
}

.fw-logo:hover {
    color: var(--fw-dark-brown);
}

.fw-byline {
    font-size: 0.85rem;
    color: var(--fw-muted);
}

/* =============================================================================
   Footer
   ============================================================================= */

.fw-footer {
    background: var(--fw-dark-brown);
    color: #ccc;
    padding: 32px 0;
    margin-top: 60px;
    text-align: center;
}

.fw-footer-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 6px;
}

.fw-footer-tagline {
    font-size: 0.85rem;
    color: #aaa;
}

.fw-footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.fw-footer-link {
    font-size: 0.84rem;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.fw-footer-link:hover {
    color: #ccc;
}

.fw-footer-disclaimer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.82rem;
    color: #999;
    line-height: 1.6;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   Hero
   ============================================================================= */

.fw-hero {
    text-align: center;
    padding: 64px 0 48px;
}

.fw-hero-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.fw-hero-seal {
    display: block;
    margin: 0 auto 16px;
    opacity: 0.85;
}

.fw-hero-subtitle {
    font-size: 1.1rem;
    color: var(--fw-muted);
    margin-bottom: 32px;
}

/* =============================================================================
   Search
   ============================================================================= */

.fw-search-form {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    gap: 0;
}

.fw-search-input {
    flex: 1;
    height: 48px;
    padding: 0 20px;
    border: 1px solid var(--fw-border);
    border-right: none;
    border-radius: 24px 0 0 24px;
    font-size: 1rem;
    background: white;
    color: var(--fw-charcoal);
    outline: none;
}

.fw-search-input:focus {
    border-color: var(--fw-warm-green);
}

.fw-search-btn {
    height: 48px;
    padding: 0 24px;
    background: var(--fw-warm-green);
    color: white;
    border: none;
    border-radius: 0 24px 24px 0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.fw-search-btn:hover {
    background: var(--fw-warm-green-d);
}

.fw-search-form-inline {
    margin-bottom: 32px;
}

.fw-search-suggestions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.fw-search-suggestions a {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.88rem;
    color: var(--fw-muted);
    background: var(--fw-light-sage);
    border: 1px solid var(--fw-border);
    border-radius: 20px;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.fw-search-suggestions a:hover {
    color: var(--fw-warm-green);
    border-color: var(--fw-warm-green);
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.fw-search-suggestions a:active {
    transform: translateY(0);
    box-shadow: none;
}

/* =============================================================================
   Stats Bar
   ============================================================================= */

.fw-stats-bar {
    background: white;
    border-top: 1px solid var(--fw-border);
    border-bottom: 1px solid var(--fw-border);
    padding: 20px 0;
}

.fw-stats-inner {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.fw-stat {
    text-align: center;
}

.fw-stat-number {
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fw-dark-brown);
}

.fw-stat-label {
    font-size: 0.85rem;
    color: var(--fw-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================================================
   Sections
   ============================================================================= */

.fw-section {
    padding: 56px 0;
}

.fw-section-alt {
    background: var(--fw-light-sage);
}

.fw-section-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.fw-section-subtitle {
    text-align: center;
    color: var(--fw-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.fw-link {
    color: var(--fw-warm-green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.fw-link:hover {
    border-bottom-color: var(--fw-warm-green);
}

.fw-muted-text {
    color: var(--fw-muted);
    text-align: center;
    font-size: 0.95rem;
}

/* =============================================================================
   Contributors
   ============================================================================= */

.fw-contributor-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.fw-contributor-filter-btn {
    background: var(--fw-light-sage);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fw-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.fw-contributor-filter-btn:hover {
    color: var(--fw-dark-brown);
    background: #dde5da;
}

.fw-contributor-filter-btn.active {
    background: var(--fw-warm-green);
    color: white;
    border-color: var(--fw-warm-green);
}

.fw-contributors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 24px;
    justify-items: center;
    align-items: stretch;
}

.fw-contributor {
    display: grid;
    grid-template-rows: auto auto auto auto 1fr;
    justify-items: center;
    gap: 6px;
    width: 160px;
    text-align: center;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s;
}

.fw-contributor:hover {
    color: inherit;
    transform: translateY(-2px);
}

.fw-contributor-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fw-contributor:hover .fw-contributor-photo {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.fw-contributor-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    line-height: 1.2;
}

.fw-contributor-role {
    font-size: 0.84rem;
    color: var(--fw-warm-green);
    font-weight: 500;
    min-height: 2.5em;
}

.fw-contributor-affil {
    font-size: 0.84rem;
    color: var(--fw-muted);
    line-height: 1.3;
    min-height: 2.6em;
}

.fw-contributor-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-self: end;
    padding-top: 6px;
}

.fw-contributor-social {
    color: var(--fw-muted);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.fw-contributor-social:hover {
    color: var(--fw-warm-green);
}

/* =============================================================================
   Contributor Profile Page
   ============================================================================= */

.fw-contributor-profile {
    background: white;
    border: 1px solid var(--fw-border);
    border-radius: 8px;
    padding: 32px;
}

.fw-contributor-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.fw-contributor-profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.fw-contributor-profile-name {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.fw-contributor-profile-title {
    font-size: 0.95rem;
    color: var(--fw-warm-green);
    font-weight: 500;
    margin-bottom: 2px;
}

.fw-contributor-profile-specialty {
    font-size: 0.85rem;
    color: var(--fw-muted);
}

.fw-contributor-nuggets-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    color: var(--fw-dark-brown);
    margin-top: 28px;
    margin-bottom: 16px;
}

.fw-contributor-nuggets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fw-contributor-nuggets-grid .fw-result-card {
    border-left: 3px solid var(--fw-soft-gold);
}

@media (max-width: 640px) {
    .fw-contributor-profile {
        padding: 20px;
    }

    .fw-contributor-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .fw-contributor-profile-photo {
        width: 80px;
        height: 80px;
    }

    .fw-contributor-profile-name {
        font-size: 1.25rem;
    }
}

/* =============================================================================
   How It Works (Pipeline Flow)
   ============================================================================= */

.fw-pipeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 12px 0;
}

.fw-pipe-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 160px;
}

.fw-pipe-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--fw-soft-gold);
    color: var(--fw-soft-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.fw-pipe-icon-challenge {
    border-color: #D4845A;
    color: #D4845A;
}

.fw-pipe-icon-consensus {
    border-color: var(--fw-warm-green);
    color: var(--fw-warm-green);
}

.fw-pipe-icon-publish {
    border-color: var(--fw-dark-brown);
    color: var(--fw-dark-brown);
}

.fw-pipe-step:hover .fw-pipe-icon {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fw-pipe-label {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fw-dark-brown);
    margin-bottom: 4px;
}

.fw-pipe-detail {
    font-size: 0.88rem;
    color: var(--fw-charcoal);
    line-height: 1.4;
    opacity: 0.75;
}

.fw-pipe-arrow {
    display: flex;
    align-items: center;
    padding-top: 16px;
    color: var(--fw-border);
    flex-shrink: 0;
    margin: 0 4px;
}

.fw-pipeline-footnote {
    text-align: center;
    font-size: 0.85rem;
    color: var(--fw-muted);
    margin-top: 24px;
    font-style: italic;
}

/* Why FedWell Section */
.fw-why-section {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.fw-why-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--fw-charcoal);
    margin-bottom: 16px;
}

.fw-why-coda {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    color: var(--fw-dark-brown);
    font-style: italic;
}

/* =============================================================================
   Topics
   ============================================================================= */

.fw-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.fw-topic-pill {
    display: inline-block;
    padding: 8px 16px;
    background: var(--fw-light-sage);
    color: var(--fw-dark-brown);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.fw-topic-pill:hover {
    background: var(--fw-warm-green);
    color: white;
}

/* =============================================================================
   Search Results
   ============================================================================= */

.fw-search-page {
    padding: 32px 0;
}

.fw-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@keyframes fw-result-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fw-result-card {
    background: white;
    border: 1px solid var(--fw-border);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
    color: inherit;
    animation: fw-result-enter 0.2s ease-out both;
    animation-delay: var(--fw-stagger, 0s);
}

.fw-result-card:hover {
    border-color: var(--fw-warm-green);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.1);
    color: inherit;
}

.fw-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fw-result-category {
    display: inline-block;
    font-size: 0.82rem;
    padding: 3px 10px;
    background: var(--fw-light-sage);
    color: var(--fw-warm-green);
    border-radius: 10px;
    font-weight: 500;
}

.fw-result-badge {
    font-size: 0.82rem;
    color: var(--fw-soft-gold);
    font-weight: 500;
}

.fw-result-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    color: var(--fw-dark-brown);
    margin-bottom: 6px;
}

.fw-result-snippet {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.fw-result-source {
    font-size: 0.8rem;
    color: var(--fw-muted);
}

.fw-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--fw-muted);
}

.fw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    margin-top: 8px;
}
.fw-pagination-info {
    font-size: 0.85rem;
    color: var(--fw-muted);
}
.fw-pagination-btn {
    padding: 6px 16px;
    border: 1px solid var(--fw-border);
    border-radius: 6px;
    background: white;
    color: var(--fw-charcoal);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.fw-pagination-btn:hover {
    border-color: var(--fw-warm-green);
    color: var(--fw-warm-green);
}

/* =============================================================================
   Nugget Detail Page
   ============================================================================= */

.fw-nugget-page {
    padding: 32px 0;
}

.fw-back-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--fw-warm-green);
    margin-bottom: 24px;
}

.fw-back-link:hover {
    color: var(--fw-warm-green-d);
}

.fw-nugget-detail {
    background: white;
    border: 1px solid var(--fw-border);
    border-radius: 8px;
    padding: 32px;
}

/* Legacy article styles (non-nugget documents) */
.fw-legacy-article-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fw-border);
}

.fw-legacy-article-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.fw-legacy-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fw-legacy-article-content {
    font-size: 1rem;
    line-height: 1.7;
}

.fw-legacy-article-content h1 {
    font-size: 1.75rem;
    margin: 28px 0 12px;
}

.fw-legacy-article-content h2 {
    font-size: 1.4rem;
    margin: 24px 0 10px;
}

.fw-legacy-article-content h3 {
    font-size: 1.15rem;
    margin: 20px 0 8px;
}

.fw-legacy-article-content p {
    margin-bottom: 14px;
}

.fw-legacy-article-content ul,
.fw-legacy-article-content ol {
    margin: 10px 0 14px 24px;
}

.fw-legacy-article-content li {
    margin-bottom: 6px;
}

.fw-legacy-article-content a {
    color: var(--fw-warm-green);
    text-decoration: underline;
}

.fw-legacy-article-source {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--fw-border);
    font-size: 0.9rem;
    color: var(--fw-muted);
}

.fw-legacy-article-source a {
    color: var(--fw-warm-green);
}

/* =============================================================================
   Evidence Level Badges
   ============================================================================= */

.fw-evidence-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.fw-evidence-badge-toggle {
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.fw-evidence-badge-toggle:hover {
    filter: brightness(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.fw-badge-chevron {
    font-size: 0.6rem;
    margin-left: 2px;
    display: inline-block;
    transition: transform 0.2s;
}

.fw-evidence-badge-expanded .fw-badge-chevron {
    transform: rotate(180deg);
}

.fw-evidence-proscons-panel {
    margin: 12px 0 8px;
    animation: fw-slide-down 0.2s ease-out;
}

@keyframes fw-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fw-contested-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    background: #FEE2E2;
    color: #DC2626;
    letter-spacing: 0.3px;
}

.fw-language-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    background: #EDE8F5;
    color: #5B4A8A;
    letter-spacing: 0.3px;
}

/* =============================================================================
   Nugget Cards (search results)
   ============================================================================= */

.fw-nugget-result-card {
    border-left: 3px solid var(--fw-soft-gold);
}

.fw-evidence-desc-inline {
    font-size: 0.78rem;
    color: var(--fw-muted);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 6px;
}

.fw-nugget-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--fw-dark-brown);
    margin-bottom: 4px;
}

.fw-nugget-claim-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    color: var(--fw-dark-brown);
    margin-bottom: 8px;
    line-height: 1.4;
}

.fw-nugget-sources-text {
    font-size: 0.8rem;
    color: var(--fw-muted);
    font-style: italic;
    margin-bottom: 4px;
}

.fw-nugget-expert-text {
    font-size: 0.8rem;
    color: var(--fw-muted);
}

/* Expert byline (compact, for search cards) */
.fw-expert-byline-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.fw-expert-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fw-expert-byline-compact .fw-expert-byline-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fw-dark-brown);
}

.fw-expert-byline-compact .fw-expert-byline-title {
    font-size: 0.75rem;
    color: var(--fw-muted);
    margin-left: 4px;
}

/* Expert byline (full, for nugget detail) */
.fw-expert-byline-full {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--fw-light-sage);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, transform 0.15s;
}

.fw-expert-byline-full:hover {
    background: #dde5da;
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

.fw-expert-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.fw-expert-byline-info {
    min-width: 0;
}

.fw-expert-byline-full .fw-expert-byline-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fw-dark-brown);
    line-height: 1.2;
}

.fw-expert-byline-full .fw-expert-byline-title {
    font-size: 0.85rem;
    color: var(--fw-warm-green);
    font-weight: 500;
    margin-top: 2px;
}

.fw-expert-byline-specialty {
    font-size: 0.8rem;
    color: var(--fw-muted);
    margin-top: 2px;
}

/* Contributor type badge */
.fw-expert-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 4px;
}

/* =============================================================================
   Nugget Detail View
   ============================================================================= */

.fw-nugget-detail-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fw-dark-brown);
    margin-bottom: 12px;
    line-height: 1.2;
}

.fw-nugget-detail-claim {
    font-size: 1.6rem;
    line-height: 1.35;
    margin-bottom: 16px;
}

.fw-nugget-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fw-nugget-date {
    font-size: 0.8rem;
    color: var(--fw-muted);
}

.fw-evidence-desc {
    font-size: 0.85rem;
    color: var(--fw-muted);
    font-style: italic;
    padding: 8px 12px;
    background: var(--fw-light-sage);
    border-radius: 6px;
    margin-bottom: 20px;
}

.fw-nugget-detail-sources {
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--fw-light-sage);
    border-radius: 6px;
}

.fw-nugget-detail-expert {
    margin-bottom: 20px;
}

/* =============================================================================
   Summary / Detailed Toggle
   ============================================================================= */

.fw-view-toggle {
    display: inline-flex;
    background: var(--fw-light-sage);
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 20px;
}

.fw-toggle-btn {
    padding: 6px 18px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: var(--fw-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.fw-toggle-btn:hover {
    color: var(--fw-charcoal);
}

.fw-toggle-active {
    background: white;
    color: var(--fw-dark-brown);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fw-view-summary,
.fw-view-detailed {
    display: none;
}

.fw-view-active {
    display: block;
}

/* =============================================================================
   Evidence Pros/Cons (toggled from evidence badge)
   ============================================================================= */

.fw-evidence-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 20px;
}

.fw-evidence-strengths,
.fw-evidence-limitations {
    padding: 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.fw-evidence-strengths {
    background: #F0F7F2;
    border: 1px solid #C8DEC8;
}

.fw-evidence-limitations {
    background: #FDF6F0;
    border: 1px solid #E8D8C8;
}

.fw-evidence-strengths h4,
.fw-evidence-limitations h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fw-evidence-strengths h4 {
    color: #3A6348;
}

.fw-evidence-limitations h4 {
    color: #8B6B4A;
}

.fw-evidence-proscons ul {
    margin: 0;
    padding-left: 18px;
}

.fw-evidence-proscons li {
    margin-bottom: 4px;
    color: var(--fw-charcoal);
}

/* =============================================================================
   Contested Section
   ============================================================================= */

/* Review Due Date */
.fw-review-due {
    font-size: 0.8rem;
    color: var(--fw-muted);
    margin: 8px 0;
    font-style: italic;
}

/* Corroboration Status */
.fw-corroboration {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin: 8px 0;
}

.fw-corroboration-pending {
    background: #FDF5E6;
    color: #B8860B;
}

.fw-corroboration-corroborated {
    background: #E8EDE5;
    color: #4A7C59;
}

.fw-corroboration-disputed {
    background: #FEF2F2;
    color: #DC2626;
}

.fw-corroboration-suggestion {
    background: #E8F0F8;
    color: #5B8DB8;
}

/* Contest Action (for logged-in contributors) */
.fw-contest-action {
    margin: 16px 0;
    padding: 14px 18px;
    background: var(--fw-light-sage);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.fw-contest-btn {
    background: white;
    border: 1px solid var(--fw-warm-green);
    color: var(--fw-warm-green);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.fw-contest-btn:hover {
    background: var(--fw-warm-green);
    color: white;
}
.fw-contest-hint {
    font-size: 0.8rem;
    color: var(--fw-muted);
}

/* Contested Section */
.fw-contested-section {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.fw-contested-section h3 {
    color: #DC2626;
    font-size: 1rem;
    margin-bottom: 6px;
}

.fw-contested-section p {
    font-size: 0.9rem;
    color: #991B1B;
    margin-bottom: 16px;
}

/* Debate Thread */
.fw-debate-thread {
    background: white;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}

.fw-debate-thread h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    margin-bottom: 6px;
}

.fw-debate-thread p {
    font-size: 0.85rem;
    color: var(--fw-charcoal);
    margin-bottom: 10px;
}

.fw-debate-contribute-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--fw-warm-green);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.fw-debate-contribute-link:hover {
    border-bottom-color: var(--fw-warm-green);
}

/* Counter-Nugget Cards */
.fw-counter-nuggets {
    margin-top: 12px;
}
.fw-counter-nuggets h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    margin-bottom: 10px;
}
.fw-counter-nugget-card {
    background: white;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 10px;
}
.fw-counter-nugget-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    font-weight: 600;
    margin-bottom: 6px;
}
.fw-counter-nugget-claim {
    font-size: 0.9rem;
    color: var(--fw-charcoal);
    line-height: 1.5;
    margin-bottom: 8px;
}
.fw-counter-nugget-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.fw-counter-nugget-sources {
    font-size: 0.78rem;
    color: var(--fw-muted);
}
.fw-counter-nugget-expert {
    font-size: 0.82rem;
    color: var(--fw-muted);
    margin-bottom: 6px;
}
.fw-counter-nugget-link {
    font-size: 0.85rem;
    color: var(--fw-warm-green);
    text-decoration: none;
    font-weight: 500;
}
.fw-counter-nugget-link:hover {
    text-decoration: underline;
}

/* Video Discussion */
.fw-debate-video {
    background: white;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 16px;
    margin-top: 10px;
}

.fw-debate-video h4 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    margin-bottom: 6px;
}

.fw-debate-video p {
    font-size: 0.85rem;
    color: var(--fw-charcoal);
    margin-bottom: 8px;
}

.fw-coming-soon {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--fw-muted);
    background: var(--fw-light-sage);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

/* =============================================================================
   Transparency Declarations
   ============================================================================= */

.fw-transparency-expand {
    margin-top: 24px;
    border: 1px solid var(--fw-border);
    border-left: 3px solid var(--fw-soft-gold);
    border-radius: 8px;
    overflow: hidden;
}

.fw-transparency-summary {
    padding: 14px 20px;
    background: #FDF8F0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fw-transparency-summary::-webkit-details-marker {
    display: none;
}

.fw-transparency-summary:hover {
    background: #F8F0E4;
}

.fw-transparency-icon {
    color: var(--fw-soft-gold);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.fw-transparency-expand[open] .fw-transparency-icon {
    transform: rotate(90deg);
}

.fw-transparency-count {
    font-size: 0.75rem;
    color: var(--fw-soft-gold);
    font-weight: 600;
    margin-left: auto;
    background: #FDF5E6;
    padding: 2px 8px;
    border-radius: 10px;
}

.fw-transparency-content {
    padding: 16px 20px;
    border-top: 1px solid var(--fw-border);
}

.fw-transparency-intro {
    font-size: 0.85rem;
    color: var(--fw-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.fw-transparency-list {
    margin: 0;
    padding: 0;
}

.fw-transparency-cat {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fw-charcoal);
    margin-bottom: 2px;
    margin-top: 12px;
}

.fw-transparency-cat:first-child {
    margin-top: 0;
}

.fw-transparency-desc {
    font-size: 0.85rem;
    color: var(--fw-muted);
    margin-left: 0;
    line-height: 1.5;
}


/* =============================================================================
   Expandable Dialogue Section
   ============================================================================= */

.fw-dialogue-expand {
    margin-top: 24px;
    border: 1px solid var(--fw-border);
    border-radius: 8px;
    overflow: hidden;
}

.fw-dialogue-expand summary {
    padding: 14px 20px;
    background: var(--fw-light-sage);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--fw-dark-brown);
}

.fw-dialogue-expand summary:hover {
    background: #DDE5DA;
}

.fw-dialogue-content {
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
}

/* =============================================================================
   Related Points Section
   ============================================================================= */

.fw-nugget-disclaimer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--fw-border);
    font-size: 0.75rem;
    color: var(--fw-muted);
    line-height: 1.5;
}
.fw-nugget-disclaimer a {
    color: var(--fw-muted);
    text-decoration: underline;
}

.fw-related-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--fw-border);
}

.fw-related-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.fw-related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--fw-border);
    border-radius: 6px;
    margin-bottom: 8px;
    color: inherit;
    transition: border-color 0.2s;
}

.fw-related-card:hover {
    border-color: var(--fw-warm-green);
    color: inherit;
}

.fw-related-claim {
    font-size: 0.9rem;
    color: var(--fw-dark-brown);
}

/* =============================================================================
   Topic Bubble Map
   ============================================================================= */

/* Explore page filters */
.fw-explore-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.fw-filter-pill {
    padding: 6px 18px;
    border: 1px solid var(--fw-border);
    border-radius: 20px;
    background: white;
    color: var(--fw-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.fw-filter-pill:hover {
    border-color: var(--fw-warm-green);
    color: var(--fw-warm-green);
}

.fw-filter-active {
    background: var(--fw-warm-green);
    color: white;
    border-color: var(--fw-warm-green);
}

.fw-filter-active:hover {
    background: var(--fw-warm-green-d);
    border-color: var(--fw-warm-green-d);
    color: white;
}

.fw-topic-map {
    max-width: 800px;
    margin: 0 auto;
}

.fw-bubble-svg {
    width: 100%;
    height: auto;
}

.fw-bubble-circle {
    transition: opacity 0.2s, transform 0.2s;
    transform-box: fill-box;
    transform-origin: center;
}

.fw-bubble-group:hover .fw-bubble-circle {
    opacity: 0.85;
    transform: scale(1.05);
}

.fw-bubble-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.fw-bubble-count {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 10px;
    pointer-events: none;
    opacity: 0.7;
}

/* =============================================================================
   Header Navigation
   ============================================================================= */

.fw-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fw-nav-link {
    font-size: 0.9rem;
    color: var(--fw-warm-green);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.fw-nav-link:hover {
    color: var(--fw-warm-green-d);
}

.fw-nav-link--plain {
    color: var(--fw-charcoal);
    font-weight: 400;
}

.fw-nav-link--plain:hover {
    color: var(--fw-warm-green);
}

/* Mobile hamburger */
.fw-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--fw-charcoal);
}

@media (max-width: 640px) {
    .fw-nav {
        gap: 12px;
    }
    .fw-nav-link--plain {
        display: none;
    }
    .fw-nav-toggle {
        display: block;
    }
    .fw-nav.fw-nav-open .fw-nav-link--plain {
        display: block;
    }
    .fw-nav.fw-nav-open {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--fw-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        z-index: 100;
    }
}

/* Source reference styling */
.fw-source-ref {
    white-space: nowrap;
}

/* Breadcrumbs */
.fw-breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--fw-muted);
}

.fw-breadcrumb a {
    color: var(--fw-warm-green);
    text-decoration: none;
}

.fw-breadcrumb a:hover {
    text-decoration: underline;
}

.fw-breadcrumb-sep {
    margin: 0 6px;
    color: var(--fw-border);
}

.fw-contributor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fw-light-sage);
    padding: 3px 14px 3px 3px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--fw-warm-green);
    font-weight: 600;
    text-decoration: none;
}
.fw-contributor-badge:hover {
    background: var(--fw-warm-green);
    color: white;
}
.fw-badge-photo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 640px) {
    .fw-hero {
        padding: 40px 0 32px;
    }

    .fw-hero-title {
        font-size: 1.75rem;
    }

    .fw-hero-subtitle {
        font-size: 1rem;
    }

    .fw-search-form {
        max-width: 100%;
    }

    .fw-stats-inner {
        gap: 24px;
    }

    .fw-stat-number {
        font-size: 1.35rem;
    }

    .fw-pipeline {
        flex-wrap: wrap;
        gap: 8px;
    }

    .fw-pipe-step {
        width: 140px;
    }

    .fw-pipe-arrow {
        display: none;
    }

    .fw-contributors {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 16px;
    }

    .fw-contributor {
        width: auto;
    }

    .fw-contributor-photo {
        width: 72px;
        height: 72px;
    }

    .fw-nugget-detail {
        padding: 20px;
    }

    .fw-legacy-article-title {
        font-size: 1.5rem;
    }

    .fw-evidence-proscons {
        grid-template-columns: 1fr;
    }

    .fw-nugget-detail-name {
        font-size: 1.4rem;
    }

    .fw-nugget-detail-claim {
        font-size: 1.25rem;
    }
}
