/* ==========================================================================
   ВИРТУАЛЬНЫЙ РЕДСОВЕТ — Main Stylesheet
   Ported from Figma React mockup (redsovet-var) to vanilla JS
   ========================================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600&display=swap');

@font-face {
    font-family: 'JMH Typewriter';
    src: url('/static/fonts/JMH Typewriter.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MouseMemoirs';
    src: url('/static/fonts/MouseMemoirs.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Variables --- */
:root {
    --bg: #0f0f12;
    --card-bg: #1a1a20;
    --card-header-bg: #1e1e28;
    --surface: #15151c;
    --surface-alt: #131318;
    --text-main: #e2e2ec;
    --text-sec: #b09ec3;
    --text-muted: #9b9bad;
    --text-dim: #d6d0ec;
    --text-faint: #44445a;
    --accent: #ff0055;
    --accent-dark: #cc0044;
    --border: #2a2a38;
    --border-subtle: #1e1e28;
    --gold: #f1c40f;
    --green: #2ecc71;
    --red: #ff3333;
    --orange: #f39c12;
    --blue: #3498db;
    --purple: #9b59b6;
    --grey: #8e9eab;
    /* Agent colors */
    --color-marketer: #ff4d4d;
    --color-critic: #9b59b6;
    --color-lawyer: #95a5a6;
    --color-user: #3498db;
    --color-factchecker: #2ecc71;
    --color-disruptor: #e67e22;
    --color-editor: #f1c40f;
}


/* ==========================================================================
   1. BASE & BODY
   ========================================================================== */

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    background-image: url('/static/img/layered-waves.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* Мобильный фон */
@media (max-width: 768px) {
    body {
        background-image: url('/static/img/layered-waves-adapt.svg');
    }
}

/* Scanlines поверх фона */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.05;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
}

/* Затемняющий overlay для читаемости */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: rgba(15, 15, 18, 0.7);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f0f12;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Interactive elements — cursor handled by octopus-cursor canvas overlay */
a, button, select, label[for] {
    cursor: pointer;
}
input {
    cursor: text;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 24px;
}


/* ==========================================================================
   2. HEADER (.app-header)
   ========================================================================== */

.app-header {
    position: relative;
    background: linear-gradient(180deg, #0a0a0d, var(--bg));
    padding: 40px 24px 36px;
    text-align: center;
    overflow: hidden;
    transition: opacity 1.2s ease-in;
}

.app-header.faded {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
}

/* Grid overlay */
.app-header::before,
.header-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, 0.1) 39px, rgba(255, 255, 255, 0.1) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255, 255, 255, 0.1) 39px, rgba(255, 255, 255, 0.1) 40px);
}

.header-grid-overlay {
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Octopus logo */
.octopus-logo {
    width: 80px;
    height: 80px;
    cursor: pointer;
    filter: drop-shadow(0 0 8px #ff0055) drop-shadow(0 0 20px rgba(255, 0, 85, 0.4));
    animation: octo-float 3.5s ease-in-out infinite, octo-pulse 2.5s ease-in-out infinite;
    transition: transform 0.1s ease;
}

.octopus-logo:hover {
    transform: scale(1.05);
}

.octopus-logo.blinking {
    animation: octoBlink 0.2s ease-in-out 3;
}

@keyframes octoBlink {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 8px #ff0055);
    }
    50% {
        filter: brightness(1.5) drop-shadow(0 0 20px #ff0055);
    }
}

/* h1 title */
h1,
.glitch-title {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(20px, 4vw, 36px);
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #f0f0f8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: inline;
}

/* Blinking cursor after title */
.title-cursor {
    display: inline-block;
    width: 3px;
    height: clamp(18px, 4vw, 32px);
    background: var(--accent);
    margin-left: 4px;
    vertical-align: baseline;
    position: relative;
    top: 0.25em;
    animation: blink-cursor 1s ease infinite;
}

h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
}

/* Header subtitle */
.header-subtitle {
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-sec);
    margin: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    line-height: 1.8;
}

.subtitle-sep {
    font-size: 6px;
    vertical-align: middle;
    margin: 0 2px;
    color: var(--accent);
}

/* Header accent line */
.header-accent-line {
    width: 100%;
    max-width: 500px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 4px 0;
}

/* Header buttons */
.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-header {
    background: transparent;
    border: 1px solid rgba(255, 0, 85, 0.5);
    color: var(--accent);
    padding: 8px 18px;
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.btn-header:hover {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--accent);
}

.btn-header.btn-reset {
    border-color: var(--text-dim);
    color: var(--text-muted);
}

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


/* ==========================================================================
   3. INPUT SECTION (.input-section)
   ========================================================================== */

.input-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.section-label.accent {
    color: var(--accent);
}

.section-heading {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 300;
    color: var(--text-main);
    margin: 0 0 24px;
}

/* Textarea */
.textarea-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.textarea-wrapper::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, #0a0a0d 70%);
    pointer-events: none;
    border-radius: 0 0 7px 7px;
    z-index: 1;
}

textarea {
    width: 100%;
    min-height: 300px;
    background: #0a0a0d;
    border: 1px solid var(--border);
    color: #c8c8dc;
    padding: 24px 24px 64px 24px;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.75;
    resize: vertical;
    transition: border-color 0.2s ease;
    outline: none;
    cursor: text;
    caret-color: var(--text-main);
    border-radius: 8px;
}

textarea::placeholder {
    color: var(--text-sec);
    font-weight: 300;
}

textarea:focus {
    border-color: rgba(255, 0, 85, 0.4);
}

/* Char progress bar — внутри textarea */
.char-progress-bar {
    position: absolute;
    bottom: 28px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
    pointer-events: none;
    z-index: 2;
}

.char-progress-fill {
    height: 100%;
    background: rgba(255, 0, 85, 0.5);
    width: 0%;
    transition: width 0.15s ease, background 0.3s ease;
    border-radius: 1px;
}

.char-progress-fill.warning {
    background: var(--orange);
}

.char-progress-fill.danger {
    background: var(--red);
}

/* Char counter — внутри textarea */
.char-counter-row {
    position: absolute;
    bottom: 8px;
    right: 16px;
    pointer-events: none;
    z-index: 2;
}

.char-counter {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.2s ease;
}

.char-counter.warning {
    color: var(--orange);
}

.char-counter.danger {
    color: var(--red);
}

/* Input actions */
.input-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Upload / outline button */
.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8888aa;
    padding: 11px 20px;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    border-color: var(--accent-dark);
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.1);
}

/* Upload button — файл выбран */
.btn-outline.file-selected {
    border-color: rgba(46, 204, 113, 0.4);
    color: var(--green);
}

/* Кнопка "Убрать файл" */
.btn-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px;
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-remove:hover {
    color: var(--red);
}

/* Hint под кнопками */
.input-hint {
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--text-dim);
    margin-top: 8px;
    letter-spacing: 0.05em;
    text-align: left;
}

/* CTA button */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #cc0044, #ff0055);
    color: #ffffff;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.3);
    transition: all 0.25s ease;
}

.btn-cta:hover {
    box-shadow: 0 6px 30px rgba(255, 0, 85, 0.4);
    transform: translateY(-1px);
}

.btn-cta:active {
    transform: translateY(0);
}

.btn-cta:disabled {
    background: #1e1e28;
    color: #44445a;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Gold CTA variant */
.btn-gold {
    background: linear-gradient(135deg, #b8960b, #f1c40f);
    color: #1a1a20;
    box-shadow: 0 4px 20px rgba(241, 196, 15, 0.3);
}

.btn-gold:hover {
    box-shadow: 0 6px 30px rgba(241, 196, 15, 0.4);
}


/* ==========================================================================
   4. RESULTS SECTION (.results-section)
   ========================================================================== */

.results-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 20px;
    animation: fade-in-up 0.6s ease both;
}

/* Section divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 20px 0 20px;
}

.section-divider-gold {
    background: linear-gradient(90deg, transparent, rgba(241, 196, 15, 0.4), transparent);
}

/* Stage header */
.stage-header {
    margin-bottom: 16px;
}

.stage-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.stage-title {
    font-size: clamp(20px, 3.5vw, 30px);
    font-weight: 300;
    color: var(--text-main);
    margin: 0 0 8px;
}

.stage-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-sec);
    margin: 0;
}


/* ==========================================================================
   5. BOARD TALLY (.board-tally)
   ========================================================================== */

.board-tally {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tally-item {
    background: var(--card-bg);
    border: 1px solid;
    padding: 8px 14px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 70px;
}

.tally-count {
    font-size: 18px;
    font-weight: 600;
}

.tally-label {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}


/* ==========================================================================
   6. VIEW TOGGLE & TOOLBAR (.results-toolbar)
   ========================================================================== */

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: var(--surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 18px;
    font-family: 'Raleway', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: rgba(255, 0, 85, 0.15);
    color: var(--accent);
}

.view-btn:hover:not(.active) {
    color: var(--text-muted);
}

.export-btns {
    display: flex;
    gap: 8px;
}

.verdict-export {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
    padding-bottom: 16px;
}

.btn-export {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-sec);
    padding: 8px 16px;
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.35s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-export:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.15);
    transform: translateY(-1px);
}


/* ==========================================================================
   7. CARD CAROUSEL
   ========================================================================== */

.cards-container {
    position: relative;
}

/* Carousel header */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.carousel-counter {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.carousel-counter .counter-current {
    color: var(--accent);
    font-weight: 700;
}

.carousel-arrows {
    display: flex;
    gap: 8px;
}

.carousel-arrow-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

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

.carousel-arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Track */
.carousel-track {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

/* Cards in carousel */
.carousel-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Carousel wrapper — vertical stack: header → track → dots */
.carousel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 400px;
}

.carousel-wrapper .carousel-track {
    flex: 1;
}

/* Old style carousel arrows (compatibility) */
.carousel-arrow {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.5rem;
    width: 40px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.carousel-arrow:hover {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Dots */
.carousel-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.carousel-dots .dot:hover {
    background: var(--text-dim);
}

.carousel-dots .dot.active {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255, 0, 85, 0.5);
}

/* Carousel nav */
.carousel-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

/* Slide animations (150px + scale + opacity, 0.4s) */
.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-out-left {
    animation: slideOutLeft 0.35s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

.slide-out-right {
    animation: slideOutRight 0.35s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}


/* ==========================================================================
   8. AGENT CARDS (.carousel-card / .opinion-card)
   ========================================================================== */

.carousel-card,
.opinion-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--card-color, var(--border));
    border-radius: 8px;
    overflow: hidden;
}

/* Card scrollable content */
.carousel-card-content {
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Card header */
.card-header {
    background: linear-gradient(135deg, #1e1e28, #1a1a20);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid;
    border-color: rgba(128, 128, 128, 0.27);
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-main);
    margin: 0;
}

.card-role {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Verdict badge */
.verdict-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.verdict-approve {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.verdict-reject {
    color: #ff3333;
    background: rgba(255, 51, 51, 0.12);
    border: 1px solid rgba(255, 51, 51, 0.3);
}

.verdict-revise {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.12);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.verdict-hold {
    color: #3498db;
    background: rgba(52, 152, 219, 0.12);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.verdict-rewrite {
    color: #9827ff;
    background: rgba(152, 39, 255, 0.12);
    border: 1px solid rgba(152, 39, 255, 0.3);
}

/* Card divider */
.card-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(128, 128, 128, 0.34), transparent);
}

/* Card body */
.card-body {
    padding: 20px 24px;
}

.card-heading {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--text-main);
}

/* Summary / opinion text */
.opinion-text {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--text-sec);
    white-space: pre-wrap;
}

/* Key points */
.key-points-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.key-points-list li {
    font-size: 13px;
    font-weight: 400;
    color: #8888a8;
    display: flex;
    align-items: flex-start;
}

.kp-bullet {
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: 600;
}

/* Pull quote */
.pull-quote {
    font-size: 13px;
    font-weight: 300;
    font-style: italic;
    border-left: 3px solid var(--card-accent, var(--border));
    padding-left: 16px;
    color: #c0c0d8;
    margin: 16px 0;
    line-height: 1.7;
}

/* Confidence bar */
.confidence-bar {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.conf-track {
    flex: 1;
    height: 3px;
    background: #1e1e28;
    border-radius: 2px;
    overflow: hidden;
}

.conf-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease-out 0.2s;
}

.conf-value {
    font-size: 12px;
    font-weight: 600;
    min-width: 32px;
    text-align: right;
}

.conf-label {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}


/* ==========================================================================
   9. SHEET/TABLE VIEW (.sheet-table)
   ========================================================================== */

.sheet-table {
    width: 100%;
    border-collapse: collapse;
}

.sheet-table thead th {
    background: var(--surface-alt);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.sheet-table tbody tr {
    border-left: 3px solid transparent;
    transition: background 0.15s ease;
}

.sheet-table tbody tr:nth-child(odd) {
    background: #1a1a20;
}

.sheet-table tbody tr:nth-child(even) {
    background: #17171c;
}

.sheet-table tbody tr:hover {
    background: #1e1e26;
}

.sheet-table td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
}

.sheet-table .table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.sheet-table .table-name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Mini confidence bar for table */
.conf-mini {
    width: 60px;
    height: 3px;
    background: #1e1e28;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.conf-mini .conf-fill {
    height: 100%;
    border-radius: 2px;
}


/* ==========================================================================
   10. VERDICT CARD (.verdict-card)
   ========================================================================== */

.verdict-card {
    background: linear-gradient(135deg, #1e1c14, #1a1a20 60%, #1c1a1e);
    border: 1px solid #4a4525;
    border-top: 1px solid #3a3518;
    border-radius: 8px;
    overflow: hidden;
    --card-accent: var(--gold);
    box-shadow:
        0 0 20px rgba(241, 196, 15, 0.15),
        0 0 50px rgba(241, 196, 15, 0.10),
        0 0 100px rgba(241, 196, 15, 0.06),
        0 0 2px rgba(241, 196, 15, 0.4),
        inset 0 0 40px rgba(241, 196, 15, 0.02);
}

.verdict-card .card-header {
    background: transparent;
}

.verdict-card .card-avatar {
    width: 70px;
    height: 70px;
    border: 3px solid rgba(241, 196, 15, 0.4);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.15);
}

/* Ruling badge */
.ruling-badge {
    background: rgba(241, 196, 15, 0.12);
    border: 2px solid var(--gold);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-block;
}

/* Score ring container */
.score-ring {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-ring svg {
    width: 100%;
    height: 100%;
}

/* Verdict body */
.verdict-body {
    padding: 24px;
}

.verdict-summary {
    font-size: 15px;
    font-weight: 300;
    border-left: 3px solid rgba(241, 196, 15, 0.3);
    padding-left: 20px;
    color: var(--text-sec);
    line-height: 1.85;
    margin: 0 0 24px;
}

/* Verdict columns (strengths / concerns) */
.verdict-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.verdict-col {
    padding: 16px;
    border-radius: 8px;
}

.verdict-col.strengths {
    background: rgba(46, 204, 113, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.15);
}

.verdict-col.strengths .verdict-col-title {
    color: #2ecc71;
}

.verdict-col.strengths li {
    color: #a8c8a8;
}

.verdict-col.concerns {
    background: rgba(255, 51, 51, 0.05);
    border: 1px solid rgba(255, 51, 51, 0.15);
}

.verdict-col.concerns .verdict-col-title {
    color: #ff5555;
}

.verdict-col.concerns li {
    color: #c8a8a8;
}

.verdict-col-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.verdict-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.verdict-col li {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    padding: 4px 0;
}

/* Mandate */
.verdict-mandate {
    background: rgba(241, 196, 15, 0.05);
    border: 1px solid rgba(241, 196, 15, 0.15);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.verdict-mandate .verdict-col-title {
    color: var(--gold);
}

.verdict-mandate p,
.verdict-mandate li {
    color: #c8c090;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
}

/* Signature */
.verdict-signature {
    text-align: right;
    font-size: 11px;
    font-style: italic;
    color: var(--text-dim);
    margin-top: 24px;
}


/* ==========================================================================
   11. LOADING OVERLAY (.loading-overlay)
   ========================================================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: rgba(10, 10, 13, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(255, 0, 85, 0.012) 3px,
        rgba(255, 0, 85, 0.012) 4px
    );
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 500px;
    width: 90%;
    z-index: 1;
}

.loading-stage-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* Loader image — 16:9 widescreen */
.visual-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.2);
    background: #111;
}

.visual-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.7s ease;
}

.visual-wrapper img.fade-out {
    opacity: 0;
}

/* Подпись под картинкой (имя персонажа) */
.loader-caption {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 10px;
    min-height: 1.2em;
}

/* Status text — реплика персонажа */
.loading-status {
    font-size: 1.1rem;
    font-weight: 300;
    color: #ccc;
    min-height: 1.5em;
    text-align: center;
}

/* Progress — indeterminate shimmer */
.loading-progress {
    width: 100%;
    margin-top: 4px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.shimmer-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #333 0%,
        var(--accent) 25%,
        #ff6699 50%,
        var(--accent) 75%,
        #333 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 3px;
}

.progress-label-center {
    display: block;
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.1em;
}

/* Loading dots */
.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    animation: blink-cursor 1.2s ease-in-out infinite;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0.6s;
}

/* Old loader compat (kept for backward compat) */
.loader-box {
    text-align: center;
    width: 500px;
    max-width: 90vw;
}

.log-wrapper {
    padding: 0 10px;
}


/* ==========================================================================
   12. MODALS
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

.modal-backdrop.closing {
    animation: modalFadeOut 0.25s ease forwards;
}

.modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    position: relative;
    width: 90%;
    animation: modalPopIn 0.25s ease;
}

.modal-backdrop.closing .modal-dialog {
    animation: modalPopOut 0.25s ease forwards;
}

.modal-sm {
    max-width: 420px;
    text-align: center;
    padding: 30px;
}

.modal-md {
    max-width: 600px;
}

.modal-lg {
    max-width: 780px;
}

/* Modal header */
.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.modal-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.35em;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.modal-header h2 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 300;
    margin: 0;
    color: var(--text-main);
}

/* Close button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* For small modals, close button repositioned */
.modal-sm .modal-close {
    top: 10px;
    right: 10px;
}

/* Modal body */
.modal-body {
    padding: 24px;
}

/* Modal icon (for message modals) */
.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-message {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-sec);
    margin-bottom: 24px;
    white-space: pre-line;
}

/* Modal button */
.btn-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #cc0044, #ff0055);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.3);
    transition: all 0.2s ease;
    border-radius: 8px;
}

.btn-modal:hover {
    box-shadow: 0 6px 30px rgba(255, 0, 85, 0.4);
    transform: translateY(-1px);
}

/* Confirm modal buttons */
.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* About modal content */
.about-desc {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--text-sec);
    margin: 0 0 24px;
}

.about-box {
    margin-bottom: 24px;
}

.about-box h3,
.about-stages-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}

.about-box p {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-sec);
    margin: 0;
}

/* About stages */
.about-stages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.about-stage {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stage-num {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 8px;
    letter-spacing: 0.05em;
}

.about-stage strong {
    display: block;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.about-stage p {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* Disclaimer */
.about-disclaimer {
    background: rgba(255, 0, 85, 0.05);
    border: 1px solid rgba(255, 0, 85, 0.15);
    padding: 16px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-disclaimer strong {
    color: var(--text-sec);
}

/* Team / dossier grid */
.dossier-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.dossier-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    text-align: center;
}

.dossier-card:hover {
    border-color: var(--agent-color, var(--accent));
}

/* Center last card (editor) if alone in row */
.dossier-card:last-child:nth-child(3n+1) {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
}

.dossier-photo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.dossier-photo-wrapper {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.dossier-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dossier-photo-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--card-bg));
}

.dossier-info {
    padding: 14px;
}

.dossier-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.dossier-card h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin: 8px 0 4px;
    color: var(--text-main);
}

.dossier-role {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.dossier-quote {
    font-style: italic;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.5;
    margin: 8px 0 0;
}

/* Stat bars in dossier */
.stat-bar {
    height: 3px;
    background: var(--border-subtle);
    margin-top: 5px;
    position: relative;
    border-radius: 2px;
}

.stat-fill {
    height: 100%;
    background: var(--accent);
    position: absolute;
    left: 0;
    border-radius: 2px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin-top: 6px;
    color: var(--text-dim);
}

/* Old modal compat */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.85);
    z-index: 9500;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.25s ease;
}

.modal.closing {
    animation: modalFadeOut 0.25s ease forwards;
}

.modal-content {
    background: var(--surface);
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: modalPopIn 0.25s ease;
}

.modal.closing .modal-content {
    animation: modalPopOut 0.25s ease forwards;
}

.message-modal-content {
    width: auto;
    max-width: 420px;
    text-align: center;
    padding: 30px 40px;
}

.message-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.message-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-sec);
    margin-bottom: 24px;
    white-space: pre-line;
}

.btn-message-ok {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #cc0044, #ff0055);
    color: white;
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-message-ok:hover {
    box-shadow: 0 6px 30px rgba(255, 0, 85, 0.4);
}

/* Old close button compat */
.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
}

.close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

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

.close-btn:hover::before,
.close-btn:hover::after {
    background: var(--accent);
}

/* Old about content compat */
.about-content {
    max-width: 700px;
}

.about-content h2 {
    margin-bottom: 24px;
}

.about-section {
    margin-bottom: 24px;
}

.about-section h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.about-section p {
    line-height: 1.7;
    color: var(--text-sec);
    font-size: 13px;
}

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

.about-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 36px;
}

.about-step div p {
    margin: 4px 0 0;
    font-size: 13px;
}

.about-warning {
    background: rgba(255, 0, 85, 0.05);
    border: 1px solid rgba(255, 0, 85, 0.15);
    border-radius: 8px;
    padding: 16px;
}

.about-warning p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}


/* ==========================================================================
   13. NEXT STAGE CTA (.next-stage-cta)
   ========================================================================== */

.next-stage-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 18px 24px;
    background: var(--surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.cta-text {
    flex: 1;
    min-width: 200px;
}

.cta-hint {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 4px;
}

.cta-desc {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0;
}


/* ==========================================================================
   14. FOOTER (.app-footer)
   ========================================================================== */

.app-footer {
    background: #0a0a0d;
    border-top: 1px solid #1a1a22;
    margin-top: 0;
}

.app-footer .footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 85, 0.15), transparent);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
}

.footer-copy {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-faint);
}

.footer-copy a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-copy a:hover {
    color: #ff3377;
}

.footer-tagline {
    font-size: 11px;
    font-weight: 300;
    font-style: italic;
    color: var(--text-sec);
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    color: var(--text-faint);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

/* Old footer compat */
footer:not(.app-footer) {
    text-align: center;
    background: #0a0a0d;
    padding: 20px 24px;
    border-top: 1px solid #1a1a22;
    font-size: 11px;
    color: var(--text-faint);
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.footer-main a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-main a:hover {
    color: #ff3377;
}

.footer-studio {
    color: var(--text-muted);
}


/* ==========================================================================
   15. CANVAS OCTOPUS CURSOR
   ========================================================================== */

canvas#skull-cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}


/* ==========================================================================
   16. UTILITY CLASSES
   ========================================================================== */

.hidden {
    display: none !important;
}

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

.fade-in-up {
    animation: fade-in-up 0.6s ease both;
}

.accent-icon {
    color: var(--accent);
    font-weight: bold;
}


/* ==========================================================================
   17. AGENT BORDER COLORS
   ========================================================================== */

.border-marketer,
.carousel-card.border-marketer,
.opinion-card.border-marketer {
    border-left-color: var(--color-marketer);
    --card-accent: var(--color-marketer);
}

.border-critic,
.carousel-card.border-critic,
.opinion-card.border-critic {
    border-left-color: var(--color-critic);
    --card-accent: var(--color-critic);
}

.border-user,
.carousel-card.border-user,
.opinion-card.border-user {
    border-left-color: var(--color-user);
    --card-accent: var(--color-user);
}

.border-factchecker,
.carousel-card.border-factchecker,
.opinion-card.border-factchecker {
    border-left-color: var(--color-factchecker);
    --card-accent: var(--color-factchecker);
}

.border-lawyer,
.carousel-card.border-lawyer,
.opinion-card.border-lawyer {
    border-left-color: var(--color-lawyer);
    --card-accent: var(--color-lawyer);
}

.border-disruptor,
.carousel-card.border-disruptor,
.opinion-card.border-disruptor {
    border-left-color: var(--color-disruptor);
    --card-accent: var(--color-disruptor);
}

.border-editor,
.carousel-card.border-editor,
.opinion-card.border-editor {
    border-left-color: var(--color-editor);
    --card-accent: var(--color-editor);
}


/* ==========================================================================
   18. KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes octo-float {
    0%, 100% {
        transform: translateY(0) rotate(-4deg);
    }
    50% {
        transform: translateY(-8px) rotate(4deg);
    }
}

@keyframes octo-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px #ff0055) drop-shadow(0 0 20px rgba(255, 0, 85, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 16px #ff0055) drop-shadow(0 0 40px rgba(255, 0, 85, 0.6));
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink-cursor {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes slideInRight {
    from { transform: translateX(150px) scale(0.92); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-150px) scale(0.92); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to { transform: translateX(150px) scale(0.92); opacity: 0; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to { transform: translateX(-150px) scale(0.92); opacity: 0; }
}

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

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

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(16px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes modalPopOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.96) translateY(16px);
    }
}

@keyframes ripple-effect {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Old ripple compat */
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* ==========================================================================
   19. RIPPLE EFFECT
   ========================================================================== */

.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 0, 85, 0.3);
    transform: scale(0);
    animation: ripple-effect 0.65s linear;
    pointer-events: none;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

/* Old ripple compat */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
    background: rgba(255, 0, 85, 0.3);
}

.btn-verdict .ripple,
.btn-gold .ripple-span {
    background: rgba(241, 196, 15, 0.3);
}

.btn-outline .ripple-span,
.btn-export .ripple-span {
    background: rgba(255, 255, 255, 0.15);
}


/* ==========================================================================
   20. MODAL ANIMATIONS (handled in keyframes section above)
   ========================================================================== */

/* Already defined above in section 18 */


/* ==========================================================================
   21. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .app-header {
        padding: 30px 16px 28px;
    }

    h1, .glitch-title {
        font-size: clamp(18px, 5vw, 28px);
        letter-spacing: 0.15em;
    }

    .header-subtitle {
        font-size: 11px;
    }

    .input-section {
        padding: 24px 16px;
    }

    .section-heading {
        font-size: clamp(16px, 4vw, 22px);
    }

    textarea {
        min-height: 200px;
        padding: 16px 16px 64px 16px;
        font-size: 14px;
    }

    .input-actions {
        flex-direction: column;
        align-items: center;
    }

    .results-section {
        padding: 0 16px 24px;
    }

    .results-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .carousel-wrapper {
        gap: 10px;
    }

    .carousel-arrow {
        width: 35px;
        font-size: 1.2rem;
    }

    .carousel-arrow-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .carousel-track {
        min-height: 350px;
    }

    .card-header {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    .card-avatar {
        width: 44px;
        height: 44px;
    }

    .next-stage-cta {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 8px;
    }

    .dossier-grid,
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .visual-wrapper {
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 24px 12px 20px;
    }

    h1, .glitch-title {
        font-size: clamp(16px, 5vw, 22px);
        letter-spacing: 0.1em;
    }

    .header-buttons {
        gap: 6px;
    }

    .btn-header {
        font-size: 10px;
        padding: 6px 12px;
    }

    .octopus-logo {
        width: 50px;
        height: 60px;
    }

    .input-section {
        padding: 20px 12px;
    }

    textarea {
        min-height: 160px;
        padding: 14px 14px 64px 14px;
        font-size: 13px;
    }

    .results-section {
        padding: 0 12px 20px;
    }

    .stage-title {
        font-size: clamp(18px, 5vw, 24px);
    }

    .board-tally {
        gap: 6px;
    }

    .tally-item {
        padding: 6px 10px;
        min-width: 58px;
    }

    .tally-count {
        font-size: 16px;
    }

    .carousel-track {
        min-height: 300px;
    }

    .carousel-arrow-btn {
        width: 28px;
        height: 28px;
    }

    .carousel-dots .dot {
        width: 5px;
        height: 5px;
    }

    .carousel-dots .dot.active {
        width: 16px;
        height: 5px;
    }

    .card-avatar {
        width: 40px;
        height: 40px;
    }

    .verdict-card .card-avatar {
        width: 56px;
        height: 56px;
    }

    .score-ring {
        width: 64px;
        height: 64px;
    }

    .dossier-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .loading-content {
        gap: 18px;
    }

    .visual-wrapper {
        max-width: 320px;
    }

    .modal-dialog {
        width: 95%;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .next-stage-cta {
        padding: 16px 12px;
        margin-top: 20px;
    }
}


/* ==========================================================================
   22. MARKDOWN CONTENT STYLING (.opinion-text / .markdown-body)
   ========================================================================== */

.opinion-text h1,
.opinion-text h2,
.opinion-text h3,
.opinion-text h4,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    font-weight: 600;
    color: var(--text-main);
    margin: 16px 0 8px;
}

.opinion-text h1,
.markdown-body h1 {
    font-size: 1.4em;
}

.opinion-text h2,
.markdown-body h2 {
    font-size: 1.2em;
}

.opinion-text h3,
.markdown-body h3 {
    font-size: 1.1em;
}

.opinion-text h4,
.markdown-body h4 {
    font-size: 1em;
}

.opinion-text p,
.markdown-body p {
    margin: 0 0 12px;
}

.opinion-text strong,
.markdown-body strong {
    color: var(--text-main);
}

.opinion-text em,
.markdown-body em {
    color: var(--text-sec);
}

.opinion-text ul,
.opinion-text ol,
.markdown-body ul,
.markdown-body ol {
    padding-left: 20px;
    margin: 8px 0;
}

.opinion-text li,
.markdown-body li {
    margin-bottom: 4px;
}

.opinion-text blockquote,
.markdown-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin: 12px 0;
    color: var(--text-sec);
    font-style: italic;
}

.opinion-text code,
.markdown-body code {
    background: #1e1e28;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.9em;
    font-family: 'Consolas', 'Monaco', monospace;
}

.opinion-text pre,
.markdown-body pre {
    background: #1e1e28;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
}

.opinion-text pre code,
.markdown-body pre code {
    background: transparent;
    padding: 0;
}


/* ==========================================================================
   LONGREAD LAYOUT
   ========================================================================== */

.longread-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.longread-layout .opinion-card {
    position: relative;
    max-height: none;
    overflow: visible;
}


/* ==========================================================================
   OLD COMPAT: buttons, input area, wonky text
   ========================================================================== */

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    color: var(--text-sec);
    font-style: normal;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.15em;
    line-height: 1.6;
    margin-top: 12px;
}

.wonky-text {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

.wonky-text span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.input-area {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    margin-top: 12px;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.upload-hint {
    font-size: 11px;
    color: var(--text-dim);
}

.input-group {
    margin-bottom: 16px;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

/* Old start button — now .btn-cta, but keep compat */
#start-btn {
    /* Inherits from .btn-cta */
}

/* Action bar */
.action-bar {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Old button styles */
.btn-primary,
.btn-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #cc0044, #ff0055);
    color: #ffffff;
    border: none;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.3);
}

.btn-primary:hover,
.btn-stamp:hover {
    box-shadow: 0 6px 30px rgba(255, 0, 85, 0.4);
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-stamp:disabled {
    background: #1e1e28;
    color: #44445a;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Verdict button */
.btn-verdict {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #b8960b, #f1c40f);
    color: #1a1a20;
    border: none;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(241, 196, 15, 0.3);
    transition: all 0.2s ease;
}

.btn-verdict:hover {
    box-shadow: 0 6px 30px rgba(241, 196, 15, 0.4);
    transform: translateY(-1px);
}

.btn-verdict:disabled {
    background: #1e1e28;
    color: #44445a;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 15px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

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

.btn-small:disabled {
    background: var(--surface-alt);
    color: var(--text-faint);
    cursor: not-allowed;
}

.section-title {
    color: var(--text-main);
    margin-bottom: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Debate tag */
.debate-tag {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    border-radius: 8px;
}


/* ==========================================================================
   PATCH: JS↔CSS Class Alignment
   Fixes naming mismatches between app.js and original CSS
   ========================================================================== */

/* --- Card content padding (elements below header/divider need horizontal padding) --- */
.card-heading {
    padding: 20px 24px 0;
}

.card-summary {
    padding: 4px 24px 0;
}

/* --- Card header info (JS: .card-header-info instead of .card-info) --- */
.card-header-info {
    flex: 1;
    min-width: 0;
}

.card-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Key points (JS: .card-key-points instead of .key-points-list) --- */
.card-key-points {
    list-style: none;
    padding: 0 24px;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-key-points li {
    font-size: 13px;
    font-weight: 400;
    color: #8888a8;
    display: flex;
    align-items: flex-start;
}

/* --- Pull quote (JS: .card-pull-quote instead of .pull-quote) --- */
.card-pull-quote {
    font-size: 13px;
    font-weight: 300;
    font-style: italic;
    border-left: 3px solid var(--border);
    padding: 0 24px 0 16px;
    margin: 16px 24px;
    color: #c0c0d8;
    line-height: 1.7;
}

.card-pull-quote p {
    margin: 0;
}

/* --- Confidence bar (JS: .card-confidence / .conf-bar-track / .conf-bar-fill) --- */
.card-confidence {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 0 24px 20px;
}

.conf-bar-track {
    flex: 1;
    height: 3px;
    background: #1e1e28;
    border-radius: 2px;
    overflow: hidden;
}

.conf-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease-out 0.2s;
}

/* --- Carousel dots (JS creates .carousel-dot, not .dot) --- */
.carousel-dots .carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-block;
}

.carousel-dots .carousel-dot:hover {
    background: var(--text-dim);
}

.carousel-dots .carousel-dot.active {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255, 0, 85, 0.5);
}

/* --- Sheet/Table view (JS uses div-based layout, not <table>) --- */
.sheet-layout {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sheet-layout .sheet-table {
    min-width: 800px;
}

.sheet-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease;
}

.sheet-header-row {
    background: var(--surface-alt);
}

.sheet-header-row .sheet-cell {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 12px 10px;
}

.sheet-row:not(.sheet-header-row):nth-child(odd) {
    background: #1a1a20;
}

.sheet-row:not(.sheet-header-row):nth-child(even) {
    background: #17171c;
}

.sheet-row:not(.sheet-header-row):hover {
    background: #1e1e26;
}

.sheet-cell {
    padding: 12px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sheet-cell-agent {
    flex: 0 0 160px;
}

.sheet-cell-role {
    flex: 0 0 120px;
    color: var(--text-muted);
    font-size: 11px;
}

.sheet-cell-verdict {
    flex: 0 0 110px;
}

.sheet-cell-conf {
    flex: 0 0 100px;
    gap: 6px;
}

.sheet-cell-heading {
    flex: 1;
    min-width: 120px;
}

.sheet-cell-quote {
    flex: 1;
    min-width: 120px;
    color: var(--text-dim);
    font-style: italic;
    font-size: 12px;
}

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

.sheet-agent-name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sheet-text-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
}

.mini-conf-bar {
    width: 60px;
    height: 3px;
    background: #1e1e28;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.mini-conf-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease-out;
}

.mini-conf-value {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Verdict card: JS class names alignment --- */
.verdict-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.verdict-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(241, 196, 15, 0.4);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.15);
    flex-shrink: 0;
}

.verdict-header-info {
    flex: 1;
}

.verdict-role {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.verdict-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin: 0;
}

.verdict-ruling-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.score-ring-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.score-ring-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.verdict-ruling-badge {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 8px;
    display: inline-block;
}

.verdict-score-wrap {
    flex-shrink: 0;
}

/* Override existing verdict-summary to add horizontal padding in card context */
.verdict-card .verdict-summary {
    padding: 0 24px 20px 24px;
    margin: 0;
}

.verdict-card .verdict-summary.markdown-body {
    border-left: 3px solid rgba(241, 196, 15, 0.3);
    margin-left: 24px;
    padding-left: 20px;
    padding-right: 24px;
}

/* Убиваем italic в вердикте — модель иногда оборачивает ответ в *...* */
.verdict-card .verdict-summary em,
.verdict-card .verdict-summary i {
    font-style: normal;
}

.verdict-card .verdict-columns {
    padding: 0 24px;
    margin-top: 20px;
}

.verdict-list-block {
    padding: 16px;
    border-radius: 8px;
}

.verdict-strengths {
    background: rgba(46, 204, 113, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.15);
}

.verdict-concerns {
    background: rgba(255, 51, 51, 0.05);
    border: 1px solid rgba(255, 51, 51, 0.15);
}

.verdict-list-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.verdict-list-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.verdict-list-block li {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    padding: 4px 0;
    color: var(--text-sec);
}

.verdict-strengths li {
    color: #a8c8a8;
}

.verdict-concerns li {
    color: #c8a8a8;
}

.verdict-empty {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0;
    padding: 4px 0;
    font-style: italic;
}

.verdict-card .verdict-mandate {
    margin: 20px 24px 0;
}

.mandate-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 10px;
}

.verdict-card .verdict-signature {
    padding: 24px;
    margin-top: 0;
}

.signature-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.3), transparent);
    margin-left: auto;
    margin-bottom: 8px;
}

.signature-text {
    display: block;
    text-align: right;
    font-size: 11px;
    font-style: italic;
    color: var(--text-dim);
}

.signature-text-sub {
    display: block;
    text-align: right;
    font-size: 11px;
    font-style: normal;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.signature-img {
    display: block;
    margin-left: auto;
    height: 80px;
    width: 280px;
    background-color: var(--gold);
    -webkit-mask-image: url(/static/img/glavsig.png);
    mask-image: url(/static/img/glavsig.png);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: right;
    mask-position: right;
    margin-bottom: 4px;
}

.signature-text-main {
    display: block;
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
}

.signature-date {
    display: block;
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* --- Sheet view responsive --- */
@media (max-width: 768px) {
    .sheet-cell-role,
    .sheet-cell-quote {
        display: none;
    }

    .sheet-cell-agent {
        flex: 0 0 120px;
    }

    .sheet-cell-heading {
        min-width: 80px;
    }
}

@media (max-width: 600px) {
    .sheet-cell-heading {
        display: none;
    }

    .sheet-cell-conf {
        flex: 0 0 80px;
    }

    .verdict-ruling-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Dossier card: align JS class names --- */
.dossier-photo-wrap {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.dossier-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dossier-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--card-bg));
}

.dossier-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.dossier-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin: 0 0 4px;
    color: var(--text-main);
}

.dossier-stats {
    margin-top: 10px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
}

.stat-value {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    body::before,
    body::after,
    canvas#skull-cursor-canvas,
    .loading-overlay,
    .modal-backdrop,
    .modal,
    .header-buttons,
    .results-toolbar,
    .next-stage-cta,
    .export-btns,
    .carousel-arrows,
    .carousel-dots,
    .carousel-nav {
        display: none !important;
    }

    body {
        background: white;
        color: #333;
        cursor: auto;
    }
}
