:root {
    --coalition-accent: #4f6a3e;
    --coalition-glow: rgba(79, 106, 62, 0.35);
    --insurgent-accent: #b0442d;
    --insurgent-glow: rgba(176, 68, 45, 0.35);
    --paper: #2a231b;
    --paper-light: #3a3126;
    --panel: rgba(25, 20, 15, 0.8);
    --theme-accent: var(--coalition-accent);
    --theme-glow: var(--coalition-glow);
}

.factions-page {
    background: radial-gradient(circle at top, rgba(157, 127, 87, 0.2) 0%, rgba(10, 8, 6, 1) 60%),
        linear-gradient(180deg, #15100c 0%, #0f0b08 100%);
    transition: background 0.8s ease;
    position: relative;
}

.factions-atmosphere,
.factions-map,
.factions-sigil {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.factions-atmosphere {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.04), transparent 55%),
        radial-gradient(circle at 85% 10%, rgba(157, 127, 87, 0.12), transparent 50%),
        radial-gradient(circle at 75% 80%, rgba(184, 19, 45, 0.08), transparent 55%);
    mix-blend-mode: screen;
    opacity: 0.6;
}

.factions-map {
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 6px),
        radial-gradient(circle at 30% 60%, rgba(157, 127, 87, 0.15), transparent 45%),
        radial-gradient(circle at 70% 40%, rgba(90, 112, 32, 0.12), transparent 50%);
    opacity: 0.35;
    animation: mapDrift 40s linear infinite;
}

.factions-sigil {
    background:
        conic-gradient(from 90deg at 80% 20%, rgba(184, 19, 45, 0.12), transparent 40%, rgba(157, 127, 87, 0.12), transparent 70%),
        radial-gradient(circle at 80% 20%, transparent 0 40%, rgba(255, 255, 255, 0.05) 42%, transparent 44%, rgba(255, 255, 255, 0.05) 48%, transparent 55%);
    opacity: 0.5;
    animation: sigilPulse 12s ease-in-out infinite;
}

@keyframes mapDrift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-2%, 1%, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes sigilPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.header--compact {
    height: 60px;
    padding: 0 48px;
}

.factions-shell {
    padding: 145px 80px 120px;
    position: relative;
    z-index: 2;
}

.factions-shell--details {
    padding-top: 112px;
    padding-bottom: 88px;
}

.conflict-split {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
}

.conflict-split--index {
    min-height: auto;
    border-radius: 0;
    overflow: hidden;
    margin: 32px 0 0;
    width: 100%;
}

.conflict-split--index .conflict-half {
    min-height: 620px;
    padding: 140px 0 120px;
}

.conflict-split--index .conflict-content {
    width: 100%;
    max-width: 560px;
    margin: 0;
    justify-self: center;
    align-self: end;
}

.conflict-split--index .faction-card {
    margin: 0;
    width: 100%;
    border-radius: 0;
}

.conflict-center {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, 86vw);
    text-align: center;
    z-index: 4;
    padding: 24px 32px;
    background: rgba(15, 12, 9, 0.75);
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.conflict-center h1 {
    font-size: clamp(32px, 4vw, 54px);
    margin: 12px 0 10px;
}

.conflict-center p {
    color: var(--text-secondary);
}

.center-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.22em;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
}

.conflict-half {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-items: end;
    padding: 140px 64px 120px;
    overflow: hidden;
    cursor: pointer;
    transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.conflict-half::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 30%, var(--theme-glow), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
}

.conflict-half:hover {
    transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) scale(1.01);
}

.conflict-half--coalition {
    background: linear-gradient(120deg, rgba(18, 14, 10, 0.98), rgba(14, 11, 9, 0.9)),
        url('/static/report/img/conflict/koalicja-background.jpg') center/cover no-repeat;
}

.conflict-half--insurgents {
    background: linear-gradient(240deg, rgba(18, 14, 10, 0.98), rgba(14, 11, 9, 0.9)),
        url('/static/report/img/conflict/powstancy-background.avif') center/cover no-repeat;
}

.conflict-half.is-exit {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.conflict-layer {
    position: absolute;
    inset: -10%;
    z-index: 1;
    transform: translate3d(calc(var(--parallax-x, 0px) * var(--depth, 0.3)), calc(var(--parallax-y, 0px) * var(--depth, 0.3)), 0);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.conflict-layer--bg {
    --depth: 0.15;
    background: radial-gradient(circle at 20% 40%, rgba(157, 127, 87, 0.2), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 5px);
    opacity: 0.8;
}

.conflict-layer--map {
    --depth: 0.3;
    background:
        radial-gradient(circle at 60% 20%, rgba(90, 112, 32, 0.25), transparent 45%),
        radial-gradient(circle at 20% 70%, rgba(184, 19, 45, 0.2), transparent 50%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 6px);
    opacity: 0.7;
    mix-blend-mode: screen;
}

.conflict-layer--glow {
    --depth: 0.45;
    background: radial-gradient(circle at 70% 30%, var(--theme-glow), transparent 55%);
    opacity: 0.9;
}

.conflict-figure {
    position: absolute;
    bottom: -6%;
    width: 60%;
    height: 85%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    filter: drop-shadow(0 28px 60px rgba(0,0,0,0.5));
    z-index: 2;
    transform: translate3d(calc(var(--parallax-x, 0px) * 0.6), calc(var(--parallax-y, 0px) * 0.6), 0);
    transition: transform 0.2s ease;
    opacity: 0.9;
    animation: figureFloat 6s ease-in-out infinite;
}

.conflict-figure--left {
    left: -8%;
    background-image: url('/static/report/img/conflict/koalicja.png');
    background-size: contain;
    background-position: left bottom;
}

.conflict-figure--right {
    right: -6%;
    background-image: url('/static/report/img/conflict/powstancy.png');
    width: 72%;
    height: 92%;
    background-size: contain;
    background-position: right bottom 28px;
}

.conflict-content {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 12px;
    max-width: 420px;
}

.conflict-half--coalition {
    --theme-accent: var(--coalition-accent);
    --theme-glow: var(--coalition-glow);
}

.conflict-half--insurgents {
    --theme-accent: var(--insurgent-accent);
    --theme-glow: var(--insurgent-glow);
}

.conflict-half--coalition .conflict-content {
    margin-left: 40%;
}

.conflict-half--insurgents .conflict-content {
    margin-right: 38%;
    justify-self: end;
    text-align: right;
}

.conflict-split--index .conflict-half--coalition .conflict-content,
.conflict-split--index .conflict-half--insurgents .conflict-content {
    margin: 0;
    justify-self: center;
    text-align: left;
}

.conflict-half--insurgents .conflict-metrics {
    justify-items: end;
}

.conflict-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.conflict-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.conflict-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 6px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.conflict-cta {
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(25, 20, 15, 0.75);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.conflict-subfactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.conflict-subfactions span {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(20, 16, 12, 0.7);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.conflict-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px var(--theme-glow);
    background: var(--theme-accent);
}

@keyframes figureFloat {
    0%, 100% { transform: translate3d(calc(var(--parallax-x, 0px) * 0.6), calc(var(--parallax-y, 0px) * 0.6), 0) translateY(0); }
    50% { transform: translate3d(calc(var(--parallax-x, 0px) * 0.6), calc(var(--parallax-y, 0px) * 0.6), 0) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .conflict-figure {
        animation: none;
    }
    .conflict-layer {
        transition: none;
    }
    .conflict-card {
        transition: none;
    }
}

.faction-switch {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.switch-wide {
    flex: 1;
    padding: 18px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(25, 20, 15, 0.85);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.switch-wide.is-active {
    background: var(--theme-accent);
    box-shadow: 0 12px 28px var(--theme-glow);
}

.faction-content {
    animation: fadeIn 0.4s ease;
}

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

.faction-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: end;
    margin-bottom: 32px;
}

.faction-hero__copy {
    display: grid;
    gap: 18px;
    align-self: stretch;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(230, 220, 203, 0.08);
    background:
        linear-gradient(180deg, rgba(22, 17, 12, 0.94), rgba(14, 11, 8, 0.88)),
        radial-gradient(circle at top left, rgba(157, 127, 87, 0.16), transparent 40%);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
}

.factions-page[data-theme="insurgents"] .faction-hero__copy {
    background:
        linear-gradient(180deg, rgba(28, 15, 11, 0.95), rgba(18, 10, 8, 0.9)),
        radial-gradient(circle at top left, rgba(176, 68, 45, 0.22), transparent 42%);
}

.faction-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
}

.faction-hero__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(230, 220, 203, 0.3), transparent);
}

.faction-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.faction-hero__meta-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(230, 220, 203, 0.08);
}

.factions-page[data-theme="insurgents"] .faction-hero__meta-item {
    background: rgba(176, 68, 45, 0.08);
    border-color: rgba(176, 68, 45, 0.18);
}

.faction-hero__meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.faction-actions--hero {
    margin-top: 4px;
}

.faction-hero__visual {
    position: relative;
    display: grid;
    align-items: end;
    min-height: clamp(360px, 42vw, 560px);
    padding: 26px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(230, 220, 203, 0.08);
    background:
        linear-gradient(180deg, rgba(18, 14, 10, 0.72), rgba(10, 8, 6, 0.92)),
        radial-gradient(circle at top right, rgba(176, 68, 45, 0.12), transparent 36%);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.faction-hero--details .faction-hero__visual {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: stretch;
}

.factions-page[data-theme="insurgents"] .faction-hero__visual {
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(26, 14, 10, 0.78), rgba(12, 8, 6, 0.94)),
        radial-gradient(circle at top right, rgba(176, 68, 45, 0.22), transparent 40%);
}

.faction-hero__backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 34%),
        linear-gradient(135deg, rgba(157, 127, 87, 0.16), transparent 58%);
    pointer-events: none;
}

.factions-page[data-theme="insurgents"] .faction-hero__backdrop {
    background:
        radial-gradient(circle at 78% 18%, rgba(255, 214, 170, 0.08), transparent 24%),
        radial-gradient(circle at 22% 28%, rgba(176, 68, 45, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(176, 68, 45, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(10, 8, 6, 0.08), rgba(10, 8, 6, 0.28));
}

.faction-hero__media {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    aspect-ratio: 16 / 9;
    justify-self: center;
    align-self: center;
}

.faction-hero__visual-card {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 18px;
    border-radius: 26px;
    border: 1px solid rgba(230, 220, 203, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        radial-gradient(circle at top right, rgba(255, 214, 170, 0.08), transparent 34%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.factions-page[data-theme="insurgents"] .faction-hero__visual-card {
    background:
        linear-gradient(180deg, rgba(176, 68, 45, 0.08), rgba(255, 255, 255, 0.01)),
        radial-gradient(circle at top right, rgba(255, 214, 170, 0.09), transparent 34%);
    border-color: rgba(176, 68, 45, 0.2);
}

.faction-hero__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.42));
}

.faction-figure {
    min-height: clamp(380px, 44vw, 680px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
    position: relative;
    z-index: 1;
}

.faction-figure--coalition {
    background-image: url('/static/report/img/conflict/koalicja.png');
    background-size: contain;
    background-position: center bottom;
}

.faction-figure--insurgents {
    background-image: url('/static/report/img/conflict/powstancy.png');
    background-size: contain;
    background-position: center bottom 24px;
}

.faction-hero--details {
    margin-bottom: 18px;
    padding: 20px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(10, 8, 6, 0.74), rgba(10, 8, 6, 0.52)),
        radial-gradient(circle at top left, rgba(157, 127, 87, 0.12), transparent 40%);
    border: 1px solid rgba(230, 220, 203, 0.08);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
}

.faction-hero--details .faction-hero__backdrop {
    display: none;
}

.faction-hero__caption {
    position: relative;
    z-index: 3;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(12, 10, 8, 0.72);
    border: 1px solid rgba(230, 220, 203, 0.08);
    color: var(--text-secondary);
    line-height: 1.5;
}

.factions-page[data-theme="insurgents"] .faction-hero__caption {
    background: rgba(34, 16, 12, 0.74);
    border-color: rgba(176, 68, 45, 0.18);
}

.subfactions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.faction-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-step { display: none; }
.form-step.is-active { display: block; }

.summary-box {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.summary-list { list-style: none; padding: 0; margin: 16px 0 0; }
.summary-list li { margin-bottom: 8px; color: var(--text-secondary); }

@media (max-width: 1000px) {
    .factions-shell--details {
        padding-top: 96px;
        padding-bottom: 72px;
    }
    .faction-hero {
        grid-template-columns: 1fr;
    }
    .faction-hero__meta {
        grid-template-columns: 1fr;
    }
    .faction-hero__media {
        max-width: 100%;
    }
    .faction-hero__visual-card {
        padding: 14px;
        border-radius: 22px;
    }
    .faction-figure {
        min-height: clamp(320px, 72vw, 540px);
    }
    .faction-hero--details .faction-hero__visual {
        min-height: clamp(280px, 68vw, 460px);
    }
    .faction-hero--details {
        padding: 16px;
    }
    .conflict-split {
        grid-template-columns: 1fr;
    }
    .conflict-half {
        min-height: 70vh;
        padding: 120px 32px 90px;
    }
    .conflict-split--index .conflict-half {
        min-height: 520px;
        padding: 140px 32px 100px;
    }
    .conflict-figure {
        width: 70%;
        opacity: 0.6;
    }
    .conflict-figure--right {
        width: 82%;
        height: 88%;
        background-position: right bottom 22px;
    }
    .conflict-half--coalition .conflict-content,
    .conflict-half--insurgents .conflict-content {
        margin: 0;
        text-align: left;
        justify-self: start;
    }
    .conflict-half--insurgents .conflict-metrics {
        justify-items: start;
    }
    .conflict-center {
        position: relative;
        top: 0;
        left: auto;
        transform: none;
        margin: 40px auto 0;
    }
}

.factions-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
}

.hero-copy .hero-title {
    font-size: clamp(36px, 4vw, 60px);
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-primary {
    background: var(--accent-polish);
    color: #f8f3ec;
    box-shadow: 0 8px 24px rgba(184, 19, 45, 0.3);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
}

.cta-primary:hover,
.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-panel .mission-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.mission-title {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mission-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.mission-value {
    font-weight: 600;
    margin-top: 4px;
}

.mission-foot {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mission-pill {
    padding: 6px 12px;
    background: var(--paper-light);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.factions-switch {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 80px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.switch-controls {
    display: inline-flex;
    background: var(--paper);
    border-radius: 999px;
    padding: 6px;
    border: 1px solid var(--border);
    gap: 6px;
    margin-bottom: 24px;
}

.switch-btn {
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.switch-btn.is-active {
    color: #fff;
    background: var(--accent-polish);
    box-shadow: 0 8px 18px rgba(184, 19, 45, 0.25);
}

.switch-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.switch-panel {
    background: var(--paper);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    opacity: 0.6;
    transform: translateY(10px);
    transition: all 0.3s;
}

.switch-panel.is-active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.panel-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.panel-value {
    font-size: 20px;
    font-weight: 700;
}

.panel-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.subfactions {
    margin-bottom: 80px;
}

.subfactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.subfaction-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.subfaction-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 2px solid var(--theme-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.subfaction-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(157, 127, 87, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.subfaction-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
}

.subfaction-card:hover::after {
    opacity: 1;
}

.subfaction-card:hover::before {
    opacity: 0.8;
}

.subfaction-icon {
    font-size: 24px;
    margin-bottom: 12px;
}

.subfaction-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin: 12px 0 16px;
}

.subfaction-cta {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.subfaction-cta:hover {
    border-color: var(--accent-polish);
    color: #fff;
}

.subfaction-details {
    margin: 80px 0;
}

.subfaction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.subfaction-panel {
    background: rgba(20, 16, 12, 0.85);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.subfaction-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 3px solid var(--theme-accent);
    opacity: 0.7;
}

.subfaction-panel h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.subfaction-panel p {
    color: var(--text-secondary);
    font-size: 14px;
}

.subfaction-panel ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.faction-intel {
    margin: 80px 0;
}

.faction-intel.dossier .section-header {
    padding: 24px 28px;
    background: rgba(18, 14, 10, 0.85);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.faction-intel.dossier .section-header::before {
    content: 'DECLASSIFIED';
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: rgba(184, 19, 45, 0.5);
    border: 1px solid rgba(184, 19, 45, 0.5);
    padding: 6px 10px;
    transform: rotate(3deg);
}

.faction-intel.dossier .section-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.intel-card {
    background: rgba(20, 16, 12, 0.85);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.intel-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 5px);
    opacity: 0.35;
    pointer-events: none;
}

.intel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 3px solid var(--theme-accent);
    opacity: 0.7;
}

.intel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.45);
    border-color: rgba(157, 127, 87, 0.5);
}

.intel-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(32, 26, 20, 0.92), rgba(18, 14, 10, 0.92));
}

.intel-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(24, 20, 16, 0.92), rgba(15, 12, 10, 0.92));
}

.intel-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(30, 24, 18, 0.92), rgba(17, 14, 11, 0.92));
}

.intel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.intel-stamp {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 4px 10px;
    border: 1px solid rgba(184, 19, 45, 0.6);
    color: rgba(184, 19, 45, 0.85);
    font-family: 'IBM Plex Mono', monospace;
    transform: rotate(-2deg);
}

.intel-stamp::before {
    content: '●';
    margin-right: 6px;
    color: rgba(184, 19, 45, 0.7);
}

.intel-code {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.15em;
}

.intel-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.intel-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.intel-card ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.intel-card li {
    padding-left: 18px;
    position: relative;
}

.intel-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--theme-accent);
    box-shadow: 0 0 6px var(--theme-glow);
}

.charts {
    margin-bottom: 90px;
}

.chart-block {
    margin-top: 32px;
    background: var(--panel);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border);
}

.echart-panel {
    min-height: 980px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(12, 10, 8, 0.85), rgba(12, 10, 8, 0.85)),
        url('/static/report/img/conflict/powstancy-background.avif') center/cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-header h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.org-chart {
    position: relative;
    height: 440px;
    margin-top: 28px;
    background:
        linear-gradient(180deg, rgba(12, 10, 8, 0.86), rgba(12, 10, 8, 0.86)),
        var(--chart-bg) center/cover no-repeat,
        radial-gradient(circle at top, rgba(157, 127, 87, 0.18), transparent 60%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.org-chart::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, var(--theme-glow), transparent 55%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.org-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    filter: drop-shadow(0 0 6px rgba(184, 19, 45, 0.25));
}

.org-lines line {
    stroke: rgba(212, 201, 184, 0.5);
    stroke-width: 3;
}

.org-chart--wk .org-lines line {
    stroke: rgba(240, 230, 210, 0.75);
    stroke-width: 3.5;
}

.org-node {
    position: absolute;
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
    transform: translate(-50%, -50%);
    background: rgba(30, 25, 20, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 16px;
    width: 180px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
    text-align: left;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}

.org-chart--pow .org-node {
    width: 150px;
}

.org-chart--pow .node-title {
    font-size: 11px;
}

.org-chart--pow .node-meta,
.org-chart--pow .node-capacity {
    font-size: 10px;
}

.org-chart--grid {
    height: auto;
    padding: 32px;
    display: grid;
    gap: 28px;
}

.org-chart--grid .org-lines {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
}

.org-chart--grid .org-node {
    position: static;
    transform: none;
    width: auto;
}

.org-row {
    display: grid;
    gap: 22px;
    align-items: start;
}

.org-row--top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.org-row--mid {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.org-row--bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.org-subgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.org-row--mid .org-split {
    position: static;
    width: 120px;
    height: 40px;
    transform: rotate(-8deg);
}

.org-split img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

@media (max-width: 1100px) {
    .org-row--top {
        grid-template-columns: 1fr;
    }
    .org-row--mid {
        grid-template-columns: 1fr;
    }
    .org-row--mid .org-split {
        width: 80px;
        margin: 0 auto;
    }
    .org-row--bottom {
        grid-template-columns: 1fr;
    }
    .org-subgrid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
}

.org-node .node-title {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.node-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.node-capacity {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.node-cta {
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
}

.node-cta:hover {
    border-color: var(--accent-polish);
    color: #fff;
}

.org-node:hover,
.org-node:focus-within {
    transform: translate(-50%, -50%) scale(1.02);
    border-color: var(--theme-accent);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55);
}

.cell-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 4, 0.75);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.cell-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.cell-modal__panel {
    width: min(860px, 90vw);
    background: rgba(20, 16, 12, 0.95);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
}

.cell-modal__media {
    background: linear-gradient(180deg, rgba(10, 8, 6, 0.65), rgba(10, 8, 6, 0.85)), var(--modal-image, none);
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

.cell-modal__content {
    padding: 30px;
    display: grid;
    gap: 12px;
}

.cell-modal__tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.cell-modal__roles {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: grid;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.cell-modal__capacity {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.cell-modal__hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cell-modal__registered {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    font-size: 13px;
    color: var(--text-secondary);
}

.cell-modal__children {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

.cell-modal__children-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.cell-modal__children-list {
    display: grid;
    gap: 8px;
}

.cell-modal__child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(12, 10, 8, 0.6);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.cell-modal__child:hover {
    border-color: var(--theme-accent);
    transform: translateY(-1px);
}

.cell-modal__child-title {
    font-weight: 600;
    font-size: 13px;
}

.cell-modal__child-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.cell-modal__cta {
    justify-self: start;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--theme-accent);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.cell-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
}

body.modal-open {
    overflow: hidden;
}

.node-cta.is-full,
.node-cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-muted);
}

.org-split {
    position: absolute;
    width: 140px;
    height: 12px;
    background: linear-gradient(90deg, transparent, rgba(184, 19, 45, 0.8), transparent);
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%) rotate(-18deg);
    opacity: 0.6;
}

.chart-note {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.signup {
    margin-bottom: 100px;
}

.signup-panel {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
}

.signup-page .signup-panel {
    max-width: 980px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    align-items: stretch;
}

.signup-page .signup-form {
    max-width: 520px;
    margin: 0 auto;
}

.signup-visual {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 420px;
    background: rgba(16, 13, 10, 0.6);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.signup-visual__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 8, 6, 0.2), rgba(10, 8, 6, 0.85)),
        var(--signup-visual-image, url('/static/report/img/conflict/koalicja.png')) center/cover no-repeat;
    filter: saturate(1.05);
}

.signup-visual__content {
    position: relative;
    z-index: 1;
    max-width: 320px;
    background: rgba(12, 10, 8, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(6px);
}

.signup-visual__tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.signup-visual__title {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 700;
}

.signup-visual__meta {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.signup-info {
    background: rgba(20, 16, 12, 0.8);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
}

.selected-cell {
    font-size: 18px;
    font-weight: 700;
    margin: 12px 0 16px;
}

.signup-limits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.limit-value {
    font-size: 20px;
    font-weight: 700;
}

.limit-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-error {
    font-size: 12px;
    color: #e07b6a;
}

.form-error ul {
    margin: 0;
    padding-left: 16px;
}

.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.flash-messages--toast {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 1000;
    width: min(360px, 92vw);
    margin: 0;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(20, 16, 12, 0.8);
    border: 1px solid var(--border);
    font-size: 13px;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.flash-success {
    border-color: rgba(90, 112, 32, 0.6);
    color: #cfe2a3;
}

.flash-error {
    border-color: rgba(184, 19, 45, 0.6);
    color: #f2b7bf;
}

.flash-info {
    border-color: rgba(157, 127, 87, 0.6);
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row input,
.form-row select,
.form-row textarea {
    background: #15110e;
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-primary);
    width: 100%;
}

.consent-panel {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consent-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.consent-copy {
    font-size: 13px;
    color: var(--text-secondary);
    display: none;
}

.consent-panel[data-side="coalition"] .consent-copy[data-side="coalition"],
.consent-panel[data-side="insurgents"] .consent-copy[data-side="insurgents"] {
    display: block;
}

.consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-secondary);
}

.consent-row a {
    color: #f1dbc0;
    text-decoration: underline;
    text-decoration-color: var(--theme-accent);
    text-underline-offset: 0.18em;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.consent-row a:hover,
.consent-row a:focus-visible {
    color: #fff6e8;
    text-decoration-color: #fff6e8;
}

.consent-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--accent-polish);
}

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

.participant {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.participant-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.participant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.submit-signup {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.submit-signup:hover {
    border-color: var(--accent-polish);
    color: #fff;
}

.footer--dense {
    padding-bottom: 40px;
}

.roster {
    margin-bottom: 100px;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.roster-card {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.roster-card--player {
    display: flex;
    gap: 12px;
    align-items: center;
}

.roster-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.roster-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.roster-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.roster-empty {
    font-size: 13px;
    color: var(--text-muted);
}

.article-body {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    line-height: 1.7;
}

.article-hero {
    margin-bottom: 24px;
}

.article-hero__copy {
    display: grid;
    gap: 18px;
    padding: 26px 28px;
    border-radius: 28px;
    border: 1px solid rgba(157, 127, 87, 0.16);
    background:
        linear-gradient(180deg, rgba(24, 18, 13, 0.95), rgba(14, 11, 8, 0.92)),
        radial-gradient(circle at top right, rgba(157, 127, 87, 0.16), transparent 35%);
    box-shadow: 0 24px 54px rgba(0,0,0,0.3);
}

.article-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.article-hero__meta-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(157, 127, 87, 0.14);
}

.article-hero__meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.article-hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.article-view--redesigned {
    margin-bottom: 24px;
}

.article-body--redesigned {
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(22, 17, 13, 0.92), rgba(12, 10, 8, 0.88));
    border-radius: 24px;
}

.article-body__prose {
    max-width: 880px;
    padding: 30px;
    font-size: 16px;
    line-height: 1.9;
}

.article-body__prose h2,
.article-body__prose h3,
.article-body__prose h4 {
    margin: 24px 0 12px;
}

.article-body__prose p + p {
    margin-top: 16px;
}

.article-comments--redesigned {
    margin-top: 28px;
}

.article-comments {
    margin-top: 40px;
}

.thread-meta {
    margin-top: 8px;
}

.thread-clearance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.thread-clearance-form {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thread-clearance-form select {
    background: rgba(10, 8, 6, 0.6);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text-primary);
    min-width: 200px;
}

.thread-clearance-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.form-help {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}

.post-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.post-tool {
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    color: var(--text-primary);
    border-radius: 8px;
    width: 36px;
    height: 32px;
    cursor: pointer;
}

.post-tool__hint {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.attachment-field {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(157, 127, 87, 0.4);
    background: rgba(10, 8, 6, 0.5);
}

.attachment-input {
    color: var(--text-secondary);
}

.attachment-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.attachment-preview-list--compact {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.attachment-preview-item {
    background: rgba(10, 8, 6, 0.6);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 10px;
    padding: 8px;
    display: grid;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.attachment-preview-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.attachment-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.attachments.attachments--grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-thumb {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(10, 8, 6, 0.6);
    width: 72px;
    height: 72px;
}

.attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.attachment-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 3, 0.8);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.attachment-lightbox--open {
    opacity: 1;
    pointer-events: auto;
}

.attachment-lightbox__panel {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.attachment-lightbox__panel img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 14px;
    border: 1px solid rgba(157, 127, 87, 0.4);
}

.attachment-lightbox__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(157, 127, 87, 0.4);
    background: rgba(20, 16, 12, 0.9);
    color: var(--text-primary);
    cursor: pointer;
}

.access-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 3, 0.7);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.access-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.access-modal__panel {
    background: rgba(20, 16, 12, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.access-modal__tag {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.access-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.access-modal__lines {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.access-modal__line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.access-modal__badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(10, 8, 6, 0.6);
    color: var(--text-secondary);
}

.access-modal__badge--team {
    border-color: rgba(157, 127, 87, 0.5);
}

.access-modal__badge--faction {
    border-color: var(--theme-accent);
    color: var(--text-primary);
}

.access-modal__badge--clearance {
    border-color: rgba(120, 160, 120, 0.4);
    color: rgba(170, 210, 170, 0.9);
}

.access-modal__value {
    font-size: 13px;
    color: var(--text-primary);
}

.attachment-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 3, 0.7);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.attachment-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.attachment-modal__panel {
    background: rgba(20, 16, 12, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.attachment-modal__tag {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.attachment-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.detail-drawer {
    margin-bottom: 16px;
}

.detail-drawer__toggle {
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    cursor: pointer;
}

.detail-drawer__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.detail-drawer--open .detail-drawer__panel {
    max-height: 600px;
}

.detail-drawer__content {
    margin-top: 12px;
    background: rgba(12, 9, 7, 0.8);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.detail-drawer__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.detail-drawer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header--compact .section-title {
    font-size: clamp(22px, 2.8vw, 34px);
}

.section-header--compact .section-tag {
    font-size: 11px;
    letter-spacing: 0.2em;
}

.section-header.section-header--compact {
    margin-bottom: 20px;
}

.section-header.section-header--compact .section-title {
    margin-bottom: 10px;
}

.faction-access {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(12, 9, 7, 0.85);
    padding: 26px 28px;
    margin: 30px 0 50px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.faction-access--with-rail {
    margin-left: 72px;
}

@media (max-width: 980px) {
    .faction-access--with-rail {
        margin-left: 0;
    }
}

.faction-access__layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.faction-access__layer--bg {
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 60%),
        radial-gradient(circle at 80% 30%, rgba(157, 127, 87, 0.18), transparent 60%);
    opacity: 0.8;
}

.faction-access__layer--map {
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 6px);
    opacity: 0.4;
    animation: mapDrift 30s linear infinite;
}

.faction-access__layer--glow {
    background: radial-gradient(circle at 85% 70%, var(--theme-glow), transparent 65%);
    opacity: 0.7;
    animation: sigilPulse 14s ease-in-out infinite;
}

.faction-access__content {
    position: relative;
    z-index: 2;
}

.faction-access__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.faction-access__stat {
    background: rgba(10, 8, 6, 0.6);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
}

.faction-access__value {
    font-size: 20px;
    font-weight: 700;
}

.faction-access__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-top: 6px;
}

.faction-access__actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.faction-access[data-side="insurgents"] {
    border-color: rgba(176, 68, 45, 0.4);
    --theme-glow: var(--insurgent-glow);
    --theme-accent: var(--insurgent-accent);
}

.faction-access[data-side="coalition"] {
    border-color: rgba(79, 106, 62, 0.4);
    --theme-glow: var(--coalition-glow);
    --theme-accent: var(--coalition-accent);
}

.faction-access--compact {
    margin: 24px 0 30px;
}

.hub-hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 40px;
    min-height: 45vh;
}

.hub-header {
    margin-bottom: 12px;
    padding: 6px 0 2px;
}

.hub-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.hub-header .section-tag {
    font-size: 10px;
    letter-spacing: 0.20em;
}

.hub-header .section-title {
    font-size: clamp(20px, 3vw, 28px);
    margin-top: 4px;
}

.hub-header .section-description {
    font-size: 13px;
    margin-top: 6px;
}

.hub-layout {
    position: relative;
    padding: 195px 80px 120px;
}

.hub-feed {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   HUB FILTERBAR - Horizontal Top Bar
   ======================================== */

.hub-filterbar {
    position: fixed;
    top: 122px;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0;
    background: rgba(20, 16, 12, 0.85);
    border-bottom: 1px solid rgba(157, 127, 87, 0.2);
    backdrop-filter: blur(10px);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hub-filterbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 80px;
    max-width: 100%;
    margin: 0 auto;
}

/* Filtry - Lewa strona */
.hub-filterbar__filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 900px;
}

.hub-filterbar__group {
    flex: 0 0 auto;
}

.hub-filterbar__select {
    width: 100%;
    min-width: 130px;
    max-width: 160px;
    height: 32px;
    background: rgba(10, 8, 6, 0.7);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 8px;
    padding: 0 12px 0 10px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23d4c9b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.hub-filterbar__select:hover {
    border-color: rgba(157, 127, 87, 0.6);
    background-color: rgba(10, 8, 6, 0.9);
}

.hub-filterbar__select:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px rgba(157, 127, 87, 0.15);
}

.hub-filterbar__submit {
    height: 32px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid var(--theme-accent);
    background: rgba(10, 8, 6, 0.7);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hub-filterbar__submit:hover {
    background: var(--theme-accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Akcje - Prawa strona */
.hub-filterbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hub-filterbar__form {
    display: contents;
}

.hub-filterbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hub-filterbar__btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

.hub-filterbar__btn:hover {
    border-color: var(--theme-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hub-filterbar__btn--primary {
    border-color: var(--theme-accent);
    background: rgba(10, 8, 6, 0.9);
}

.hub-filterbar__btn--primary:hover {
    background: var(--theme-accent);
    color: #fff;
}

.hub-filterbar__btn--secondary {
    /* Domyślne style */
}

.hub-filterbar__btn--muted {
    border-color: rgba(157, 127, 87, 0.25);
    color: var(--text-secondary);
}

.hub-filterbar__btn--muted:hover {
    border-color: rgba(157, 127, 87, 0.5);
    color: var(--text-primary);
}

.submit-signup--danger {
    border-color: rgba(184, 19, 45, 0.42);
    background: linear-gradient(135deg, rgba(120, 21, 36, 0.94), rgba(71, 13, 21, 0.96));
    color: #fff3f5;
}

.submit-signup--danger:hover {
    border-color: rgba(255, 176, 185, 0.52);
    box-shadow: 0 12px 32px rgba(95, 16, 29, 0.36);
}

/* Faction Widget - Compact horizontal info bar */
.faction-widget {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0;
    background: rgba(20, 16, 12, 0.9);
    border-bottom: 1px solid rgba(157, 127, 87, 0.25);
    backdrop-filter: blur(10px);
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.faction-widget__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 80px;
    max-width: 100%;
    margin: 0 auto;
}

.faction-widget__profile {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.faction-widget__tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid rgba(157, 127, 87, 0.3);
    border-radius: 999px;
    background: rgba(10, 8, 6, 0.6);
    white-space: nowrap;
}

.faction-widget__info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.faction-widget__name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
}

.faction-widget__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.faction-widget__separator {
    color: var(--text-muted);
}

.faction-widget__clearance {
    display: flex;
    align-items: center;
}

.faction-widget__badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(10, 8, 6, 0.6);
    color: var(--text-secondary);
    white-space: nowrap;
}

.faction-widget__badge--faction {
    border-color: var(--theme-accent);
    color: var(--text-primary);
}

.faction-widget__badge--team {
    border-color: rgba(157, 127, 87, 0.5);
    color: var(--text-primary);
}

.faction-widget__badge--clearance {
    border-color: rgba(120, 160, 120, 0.4);
    color: rgba(170, 210, 170, 0.9);
}

.faction-widget__thread-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faction-widget__access {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.faction-widget__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.faction-widget__form {
    display: contents;
}

.faction-widget__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.faction-widget__btn svg {
    flex-shrink: 0;
}

.faction-widget__btn:hover {
    border-color: rgba(157, 127, 87, 0.6);
    background: rgba(20, 16, 12, 0.9);
    transform: translateY(-1px);
}

.faction-widget__btn--primary {
    border-color: var(--theme-accent);
    background: rgba(10, 8, 6, 0.7);
}

.faction-widget__btn--primary:hover {
    background: var(--theme-accent);
    color: #fff;
}

.faction-widget__btn--secondary {
    border-color: rgba(157, 127, 87, 0.4);
}

.faction-widget__btn--muted {
    border-color: rgba(157, 127, 87, 0.25);
    color: var(--text-secondary);
}

/* Thread Settings Modal */
.thread-settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.thread-settings-modal--open {
    opacity: 1;
    pointer-events: all;
}

.thread-settings-modal__panel {
    background: rgba(20, 16, 12, 0.98);
    border: 1px solid rgba(157, 127, 87, 0.4);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.thread-settings-modal__tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.thread-settings-modal h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.thread-settings-modal .form-row {
    margin-bottom: 16px;
}

.thread-settings-modal label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.thread-settings-modal select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(10, 8, 6, 0.7);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
}

.thread-settings-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hub-panel__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hub-panel--filters select {
    width: 100%;
    background: rgba(10, 8, 6, 0.6);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
}

.hub-panel--filters label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.hub-filter {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.hub-panel--actions .hub-panel__actions {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.hub-feed__header {
    margin-bottom: 18px;
}

.hub-feed__list {
    display: grid;
    gap: 16px;
}

.hub-feed__card {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-left: 3px solid var(--theme-accent);
    border-radius: 18px;
    padding: 16px 18px;
    display: grid;
    gap: 10px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}

.hub-feed__card--unread {
    box-shadow: 0 0 0 1px var(--theme-glow), 0 18px 32px rgba(0, 0, 0, 0.3);
}

.hub-feed__labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hub-label {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border: 1px solid rgba(157, 127, 87, 0.3);
    background: rgba(10, 8, 6, 0.6);
    color: var(--text-secondary);
}

.hub-label--type {
    color: var(--text-primary);
    border-color: rgba(157, 127, 87, 0.5);
}

.hub-label--clearance {
    border-color: var(--theme-accent);
    color: var(--text-primary);
}

.hub-label--unread {
    background: rgba(157, 127, 87, 0.18);
    color: var(--text-primary);
}

.hub-label--read {
    border-color: rgba(120, 160, 120, 0.4);
    color: rgba(170, 210, 170, 0.9);
}

.hub-feed__title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.hub-feed__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

.hub-feed__dot {
    color: var(--text-muted);
}

.hub-feed__excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

.hub-feed__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-feed__time {
    color: var(--text-secondary);
}

.hub-hero__panel {
    background: rgba(20, 16, 12, 0.8);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
}

.hub-panel__title {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hub-panel__value {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
}

.hub-panel__note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.hub-panel__actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hub-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.hub-badge {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
}

.hub-badge--clearance {
    color: var(--text-secondary);
}

.thread-list {
    display: grid;
    gap: 16px;
}

.thread-card {
    background: rgba(20, 16, 12, 0.7);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    display: grid;
    gap: 10px;
}

.thread-card--unread {
    border-color: rgba(157, 127, 87, 0.6);
    box-shadow: 0 0 0 1px rgba(157, 127, 87, 0.2);
}

.thread-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

.thread-visibility,
.thread-unread {
    border: 1px solid rgba(157, 127, 87, 0.2);
    border-radius: 999px;
    padding: 2px 8px;
}

.thread-unread {
    background: rgba(157, 127, 87, 0.18);
}

.thread-card__title a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.thread-card__author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 12px;
}

.thread-card__time {
    color: var(--text-secondary);
}

.thread-card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thread-status {
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
}

.thread-status--unread {
    border-color: rgba(157, 127, 87, 0.6);
    background: rgba(157, 127, 87, 0.18);
    color: var(--text-primary);
}

.thread-status--read {
    border-color: rgba(120, 160, 120, 0.4);
    color: rgba(170, 210, 170, 0.9);
}
.thread-description {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(157, 127, 87, 0.25);
    background: rgba(10, 8, 6, 0.6);
    color: var(--text-secondary);
    line-height: 1.7;
}

.thread-author {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.thread-description-form {
    margin-top: 14px;
    display: grid;
    gap: 10px;
    max-width: 720px;
}

.thread-description-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.thread-description-form textarea {
    background: rgba(10, 8, 6, 0.6);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
}

.edit-thread-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 3, 0.7);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
}

.edit-thread-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.edit-thread-modal__panel {
    background: rgba(20, 16, 12, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    max-width: 520px;
    width: min(92vw, 520px);
    text-align: left;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.edit-thread-modal__tag {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.edit-thread-modal__actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.role-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(157, 127, 87, 0.3);
}

.role-badge--admin {
    color: #f2b7bf;
}

.role-badge--commander {
    color: #cfe2a3;
}

.role-badge--deputy {
    color: #f2e2b7;
}

.access-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    font-size: 13px;
    color: var(--text-secondary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    counter-reset: comment;
}

.comment-thread {
    margin-left: calc(var(--depth) * 24px);
    border-left: 1px solid rgba(157, 127, 87, 0.12);
    padding-left: 16px;
}

.comment-card {
    background:
        linear-gradient(180deg, rgba(24, 18, 14, 0.92), rgba(14, 11, 8, 0.9));
    border: 1px solid rgba(157, 127, 87, 0.16);
    border-radius: 18px;
    padding: 18px 18px 18px 52px;
    position: relative;
    border-left: 3px solid rgba(157, 127, 87, 0.26);
    box-shadow: 0 18px 34px rgba(0,0,0,0.18);
}

.comment-card::before {
    counter-increment: comment;
    content: "#" counter(comment);
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid rgba(157, 127, 87, 0.35);
    border-radius: 999px;
    padding: 4px 6px;
    background: rgba(20, 16, 12, 0.8);
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-body {
    margin-top: 10px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.comment-body ul,
.comment-body ol {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.comment-body li {
    margin-bottom: 6px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar__fallback {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.comment-info {
    flex: 1;
}

.comment-author {
    font-weight: 700;
}

.comment-faction {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.comment-faction--coalition {
    color: var(--coalition-accent);
}

.comment-faction--insurgents {
    color: var(--insurgent-accent);
}

.comment-reply {
    border: 1px solid rgba(157, 127, 87, 0.35);
    background: rgba(20, 16, 12, 0.6);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.signup-form--comment {
    background: rgba(18, 14, 10, 0.86);
    border: 1px solid rgba(157, 127, 87, 0.16);
    border-radius: 20px;
    padding: 20px;
}

.signup-form--comment textarea {
    min-height: 180px;
}

.comment-children {
    margin-top: 10px;
}

.comment-parent {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(10, 8, 6, 0.55);
    border: 1px solid rgba(157, 127, 87, 0.2);
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.comment-parent strong {
    color: var(--text-primary);
}

.submit-signup--ghost {
    background: transparent;
    border-color: rgba(157, 127, 87, 0.35);
    color: var(--text-secondary);
}

.attachments {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (max-width: 980px) {
    .org-chart {
        height: auto;
        padding: 24px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .org-lines,
    .org-split {
        display: none;
    }

    .org-node {
        position: static;
        transform: none;
        width: auto;
    }

    .org-node:hover,
    .org-node:focus-within {
        transform: none;
    }
}

@media (max-width: 860px) {
    .cell-modal__panel {
        grid-template-columns: 1fr;
    }
    .cell-modal__media {
        min-height: 220px;
    }
}

@media (max-width: 720px) {
    .comment-thread {
        margin-left: calc(var(--depth) * 12px);
        padding-left: 8px;
    }
    .comment-card {
        padding: 12px 12px 12px 40px;
    }
}

@media (max-width: 980px) {
    .hub-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (max-width: 1200px) {
    .hub-filterbar__container {
        padding: 10px 40px;
    }

    .hub-layout {
        padding: 195px 40px 80px;
    }

    .hub-filterbar__select {
        min-width: 110px;
        max-width: 140px;
        font-size: 11px;
    }

    .hub-filterbar__btn {
        font-size: 11px;
        padding: 0 10px;
    }
}

@media (max-width: 980px) {
    .hub-layout {
        padding: 210px 24px 60px;
    }

    .hub-filterbar {
        height: auto;
    }

    .hub-filterbar__container {
        flex-direction: column;
        gap: 10px;
        padding: 12px 24px;
        align-items: stretch;
    }

    .hub-filterbar__filters {
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
    }

    .hub-filterbar__group {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    .hub-filterbar__select {
        max-width: 100%;
    }

    .hub-filterbar__submit {
        flex: 1 0 100%;
    }

    .hub-filterbar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .hub-filterbar__btn {
        flex: 1;
        justify-content: center;
        font-size: 11px;
        padding: 0 8px;
    }

    .faction-widget__container {
        padding: 10px 40px;
    }

    .faction-widget__profile {
        flex-wrap: wrap;
        gap: 12px;
    }

    .faction-widget__actions {
        gap: 8px;
    }

    .faction-widget__btn span {
        display: none;
    }

    .faction-widget__btn {
        padding: 0 10px;
        width: 36px;
        justify-content: center;
    }
}

 

@media (max-width: 1100px) {
    .factions-hero {
        grid-template-columns: 1fr;
    }

    .switch-panels {
        grid-template-columns: 1fr;
    }

    .signup-panel {
        grid-template-columns: 1fr;
    }

    .signup-page .signup-panel {
        max-width: 720px;
    }

    .signup-visual {
        min-height: 260px;
    }

    .org-chart {
        height: 560px;
    }
}

@media (max-width: 768px) {
    .signup-visual {
        display: none;
    }

    /* Hide desktop header nav */
    .header .nav {
        display: none;
    }

    /* Hide desktop faction-widget */
    .faction-widget {
        display: none !important;
    }

    /* Hide desktop hub-filterbar */
    .hub-filterbar {
        display: none !important;
    }

    /* Show mobile components */
    .mobile-header {
        display: block;
    }

    .mobile-bottom-bar {
        display: flex;
    }

    /* Adjust content padding for mobile bars */
    .factions-shell,
    .hub-layout {
        padding-top: 70px !important;  /* 50px header + 20px buffer */
        padding-bottom: 80px !important;  /* 60px bottom bar + 20px buffer */
    }

    /* Adjust hub-layout specifically */
    .hub-layout {
        padding-top: 70px !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    /* Conflict Split Mobile Refinements */
    .conflict-half {
        min-height: 60vh;
        padding: 90px 24px 70px;
    }

    .conflict-split--index .conflict-half {
        min-height: 480px;
        padding: 120px 24px 80px;
    }

    .conflict-figure {
        width: 60%;
        opacity: 0.5;
    }
    .conflict-figure--right {
        width: 72%;
        height: 84%;
        background-position: right bottom 18px;
    }
}

@media (max-width: 720px) {
    .factions-shell {
        padding: 70px 24px 80px !important;
    }

    .faction-widget__container {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .faction-widget__info {
        flex-wrap: wrap;
    }

    .faction-widget__meta {
        flex-wrap: wrap;
    }

    .org-node {
        width: 150px;
    }

    .participant-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .factions-shell--details {
        padding-top: 64px !important;
        padding-bottom: 72px !important;
    }

    /* Smaller phones - Critical fixes */

    /* Ensure mobile components are visible */
    .mobile-header {
        display: block !important;
        height: 50px;
    }

    .mobile-bottom-bar {
        display: flex !important;
        height: 60px;
    }

    /* Fix content padding to account for bars */
    .factions-shell {
        padding: 70px 16px 80px !important;
        min-height: calc(100vh - 130px);
        overflow-x: hidden;
    }

    .hub-layout {
        padding: 70px 16px 80px !important;
        overflow-x: hidden;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    main {
        overflow-x: hidden;
    }

    /* Drawer full width on small screens */
    .mobile-drawer__panel {
        width: 100%;
        max-width: 100vw;
    }

    /* Smaller text for bottom bar */
    .mobile-bottom-bar__label {
        font-size: 9px;
    }

    .mobile-header__logo {
        font-size: 12px;
    }

    /* Hub-specific fixes */
    .hub-layout {
        width: 100%;
        max-width: 100%;
    }

    .hub-filterbar {
        display: none !important;
    }

    /* Thread list */
    .thread-list {
        width: 100%;
    }

    .thread-row {
        padding: 12px;
    }

    /* Ensure cards don't overflow */
    .profile-card,
    .roster-card,
    .thread-card {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix section padding */
    section {
        padding: 60px 16px !important;
    }

    /* Conflict Split - Small Phones */
    .conflict-half {
        min-height: 50vh;
        padding: 80px 16px 60px;
    }

    .conflict-split--index .conflict-half {
        min-height: 420px;
        padding: 100px 16px 70px;
    }

    .conflict-figure {
        width: 50%;
        opacity: 0.4;
    }
    .conflict-figure--right {
        width: 62%;
        height: 78%;
        background-position: right bottom 14px;
    }

    /* Profile page specific */
    .profile-hero {
        margin: -16px -16px 24px -16px !important;
        padding: 32px 16px !important;
    }

    .profile-container {
        padding: 0 !important;
    }

    /* Fix any wide elements */
    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

.factions-page[data-theme="insurgents"] .switch-btn.is-active,
.factions-page[data-theme="insurgents"] .cta-primary,
.factions-page[data-theme="insurgents"] .node-cta:hover,
.factions-page[data-theme="insurgents"] .subfaction-cta:hover {
    background: var(--insurgent-accent);
    box-shadow: 0 8px 18px var(--insurgent-glow);
}

.factions-page[data-theme="coalition"] .switch-btn.is-active,
.factions-page[data-theme="coalition"] .cta-primary,
.factions-page[data-theme="coalition"] .node-cta:hover,
.factions-page[data-theme="coalition"] .subfaction-cta:hover {
    background: var(--coalition-accent);
    box-shadow: 0 8px 18px var(--coalition-glow);
}

.factions-page[data-theme="insurgents"] {
    background: radial-gradient(circle at top, rgba(176, 68, 45, 0.18) 0%, rgba(10, 8, 6, 1) 60%),
        linear-gradient(180deg, #1a120c 0%, #0f0b08 100%);
    --theme-accent: var(--insurgent-accent);
    --theme-glow: var(--insurgent-glow);
}

.factions-page[data-theme="coalition"] {
    background: radial-gradient(circle at top, rgba(79, 106, 62, 0.18) 0%, rgba(10, 8, 6, 1) 60%),
        linear-gradient(180deg, #15100c 0%, #0f0b08 100%);
    --theme-accent: var(--coalition-accent);
    --theme-glow: var(--coalition-glow);
}

@media (max-width: 720px) {
    .switch-controls {
        width: 100%;
        justify-content: space-between;
    }

    .switch-btn {
        flex: 1;
        text-align: center;
    }

    /* Filterbar mobile styles */
    .hub-filterbar__container {
        padding: 12px 16px;
    }

    .hub-layout {
        padding: 220px 16px 40px;
    }

    .hub-filterbar__filters {
        gap: 6px;
    }

    .hub-filterbar__group {
        flex: 1 1 100%;
    }

    .hub-filterbar__actions {
        gap: 6px;
    }

    .hub-filterbar__btn {
        font-size: 10px;
        height: 30px;
        padding: 0 6px;
    }

    .hub-filterbar__btn svg {
        width: 12px;
        height: 12px;
    }

    .hub-filterbar__btn span {
        display: none;
    }
}

/* ========================================
   Faction Color Accents for Filterbar
   ======================================== */

/* Coalition theme */
.factions-page[data-theme="coalition"] .hub-filterbar__submit:hover,
.factions-page[data-theme="coalition"] .hub-filterbar__btn--primary:hover {
    background: var(--coalition-accent);
    border-color: var(--coalition-accent);
}

.factions-page[data-theme="coalition"] .hub-filterbar__select:focus {
    border-color: var(--coalition-accent);
    box-shadow: 0 0 0 2px var(--coalition-glow);
}

/* Insurgent theme */
.factions-page[data-theme="insurgents"] .hub-filterbar__submit:hover,
.factions-page[data-theme="insurgents"] .hub-filterbar__btn--primary:hover {
    background: var(--insurgent-accent);
    border-color: var(--insurgent-accent);
}

.factions-page[data-theme="insurgents"] .hub-filterbar__select:focus {
    border-color: var(--insurgent-accent);
    box-shadow: 0 0 0 2px var(--insurgent-glow);
}
