/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cool Color Palette - Blues & Grays */
    --primary: #5b7c99;
    --primary-light: #7a9ab8;
    --secondary: #4a5f7f;
    --accent: #8b9fc9;
    
    --bg-main: #f5f7fa;
    --bg-card: #ffffff;
    --bg-dark: #2c3e50;
    --bg-code: #f0f3f7;
    
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --border: #e2e8f0;
    --shadow: rgba(43, 62, 80, 0.08);
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 18px;
}

/* === FLOATING NAVIGATION === */
.floating-nav {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px var(--shadow);
}

.nav-toggle-icon {
    width: 24px;
    height: 2px;
    background: var(--primary);
    position: relative;
    display: block;
    transition: all 0.3s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-toggle.active .nav-toggle-icon {
    background: transparent;
}

.nav-toggle.active .nav-toggle-icon::before {
    top: 0;
    left: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .nav-toggle-icon::after {
    top: 0;
    left: 0;
    transform: rotate(-45deg);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--bg-card);
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px var(--shadow);
}

.nav-item {
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

/* Desktop: Always show navigation */
@media (min-width: 1201px) {
    .floating-nav {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }
}

/* === CONTAINER === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* === HERO === */
.hero {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.hero-content {
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(91, 124, 153, 0.2);
}

.title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.title-line {
    display: inline;
}

.title-line:first-child {
    color: var(--primary);
    letter-spacing: 0.02em;
}

/* Only add line breaks on larger screens */
@media (min-width: 1201px) {
    .title-line:nth-child(2)::after {
        content: '\A';
        white-space: pre;
    }
}

/* On mobile, allow natural wrapping */
@media (max-width: 1200px) {
    .title-line {
        display: inline;
    }
    
    .title-line::after {
        content: ' ';
    }
}

/* arXiv Button */
.arxiv-button-container {
    margin: 2rem 0;
    text-align: center;
}

.arxiv-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #B31B1B;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(179, 27, 27, 0.15);
}

.arxiv-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179, 27, 27, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.arxiv-logo {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.arxiv-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.arxiv-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #B31B1B;
}

.arxiv-id {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.meta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.authors-line {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.institution-line {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* === AUTHORS SECTION === */
.authors-container {
    margin: 2rem 0;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.author-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.author-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: var(--primary);
}

.author-name {
    font-weight: 500;
}

.author-affiliation-sup {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* Only show forced line break on larger screens */
@media (min-width: 1201px) {
    .author-item.line-break {
        flex-basis: 100%;
        height: 0;
        margin: 0;
        padding: 0;
    }
}

/* Hide forced line break on mobile, allow natural wrapping */
@media (max-width: 1200px) {
    .author-item.line-break {
        display: none;
    }
}

.equal-contribution-note {
    text-align: center;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 1rem 0 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.star-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
}

.dagger-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.affiliations-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
}

.affiliation-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.affiliation-number {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.affiliation-logos-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.affiliation-logos-wrapper.no-wrap {
    white-space: nowrap;
    flex-wrap: nowrap;
}

.affiliation-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.affiliation-logo-link:hover {
    opacity: 0.8;
}

.affiliation-logo {
    height: 2rem;
    width: auto;
    display: block;
}

.affiliation-logo.wider {
    height: 2.4rem;
}

.affiliation-logo.large {
    height: 4rem;
    max-width: 20rem;
    object-fit: contain;
}

.affiliation-logo.medium {
    height: 3.2rem;
    max-width: 13rem;
    object-fit: contain;
}

.affiliation-break {
    flex-basis: 100%;
    height: 0;
}

@media (max-width: 1200px) {
    .authors-list {
        gap: 0.25rem 0.75rem;
        font-size: 1rem;
    }
    
    .affiliations-logos {
        gap: 1.5rem;
    }
    
    .affiliation-logo {
        height: 1.6rem;
    }
    
    .affiliation-logo.wider {
        height: 1.9rem;
    }
    
    .affiliation-logo.large {
        height: 3.2rem;
        max-width: 16rem;
    }
    
    .affiliation-logo.medium {
        height: 2.4rem;
        max-width: 10rem;
    }
    
    /* More aggressive resizing for ELLIS and MPI logos to fit on one line */
    .affiliation-logo.ellis-mpi {
        height: 1.7rem;
        max-width: 9rem;
    }
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
    scroll-margin-top: 6rem;
}

.card:hover {
    box-shadow: 0 8px 24px var(--shadow);
}

/* === TITLE FIGURE SECTION === */
.title-figure-section {
    margin-bottom: 2rem;
    scroll-margin-top: 6rem;
}

.title-figure-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    width: 100%;
}

.title-figure {
    width: 80%;
    max-width: 1000px;
    min-width: 600px;
    height: auto;
    border: none;
    display: block;
    margin: 0 auto;
}

.title-figure-container + .graph-caption {
    text-align: justify;
    justify-content: flex-start;
    margin-top: 2rem;
}

/* Always show scrollbar for title figure container */
.title-figure-container::-webkit-scrollbar {
    height: 8px;
}

.title-figure-container::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 4px;
}

.title-figure-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.title-figure-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

/* === SUBSECTIONS === */
.subsection {
    margin-bottom: 3rem;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection p {
    text-align: justify;
}

.subsection-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    display: none;
}

.card-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
}

.card-content p {
    margin-bottom: 1.25rem;
}

/* === ABSTRACT CARD === */
.abstract-card {
    background: white;
    border-color: var(--primary);
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(91, 124, 153, 0.15);
}

.abstract-card:hover {
    box-shadow: 0 8px 24px rgba(91, 124, 153, 0.2);
}

.abstract-card .card-content {
    font-size: 1.15rem;
    color: var(--text-primary);
    text-align: justify;
}

/* === GRAPHS === */
.graph-card {
    margin: 2rem 0;
}

.graph-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    text-align: center;
    line-height: 1.4;
}

.graph-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.graph-container {
    background: var(--bg-code);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.graph-placeholder {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.graph-icon {
    font-size: 3rem;
    opacity: 0.25;
    margin-bottom: 1rem;
}

.graph-placeholder p {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.graph-caption {
    display: flex;
    gap: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    justify-content: center;
}

.caption-label {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}

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

/* === FIG 1 INTERACTIVE === */
.fig1-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.fig1-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: 8px;
}

.fig1-selector-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    white-space: nowrap;
}

.fig1-dropdown {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fig1-dropdown:hover {
    border-color: var(--primary);
}

.fig1-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 124, 153, 0.1);
}

.fig1-roc-plots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.fig1-roc-plot {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    min-height: 400px;
}

.fig1-histogram-container {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 400px;
}

.fig1-legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: 8px;
    margin-top: 1rem;
}

.fig1-legend-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.fig1-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.fig1-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.pareto-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

/* === ZERO-SHOT PLOT === */
.zero-shot-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
}

.zero-shot-plot {
    background: white;
    padding: 1rem;
    min-height: 400px;
}

@media (max-width: 968px) {
    .zero-shot-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 968px) {
    .fig1-roc-plots {
        grid-template-columns: 1fr;
    }
    
    .fig1-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fig1-selector-label {
        text-align: center;
    }
}

@media (max-width: 1200px) {
    .fig1-legend-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fig1-legend-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* === PARETO PLOT === */
.pareto-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.pareto-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.pareto-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    position: relative;
}

.pareto-tab:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.pareto-tab.active {
    background: var(--bg-main);
    color: var(--primary);
    font-weight: 600;
}

.pareto-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.pareto-plot-area {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    min-height: 500px;
    position: relative;
}

.pareto-legend {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: 8px;
    margin-top: 1rem;
    justify-content: center;
}

.pareto-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.pareto-legend-item svg {
    flex-shrink: 0;
}

.pareto-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.pareto-tooltip-line {
    margin: 0.25rem 0;
}

.pareto-tooltip-line strong {
    color: #ffd700;
}

@media (max-width: 1200px) {
    .pareto-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .pareto-tab {
        border-radius: 6px;
        text-align: center;
    }
    
    .pareto-tab.active::after {
        display: none;
    }
    
    .pareto-plot-area {
        min-height: 400px;
    }
    
    .pareto-legend {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* === CITATION CARD === */
.citation-card {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
}

.citation-card .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.citation-card .card-title {
    color: white;
}

.citation-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.code-block {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-block:hover {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
}

.code-content {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--accent);
    overflow-x: auto;
    padding-right: 80px;
}

.code-copy {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy:hover {
    background: var(--primary-light);
}

.code-copy svg {
    width: 18px;
    height: 18px;
}

/* === NOTIFICATION === */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(91, 124, 153, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification svg {
    width: 20px;
    height: 20px;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === JAILBREAK DROPDOWNS === */
.jailbreak-dropdown {
    margin: 1.5rem 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.jailbreak-dropdown:hover {
    border-color: var(--primary);
}

.jailbreak-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.jailbreak-toggle:hover {
    background: var(--bg-main);
}

.jailbreak-toggle.active {
    background: var(--bg-main);
}

.toggle-icon {
    font-size: 0.9rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.jailbreak-toggle.active .toggle-icon {
    transform: rotate(90deg);
}

.toggle-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.jailbreak-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-code);
}

.jailbreak-content.active {
    max-height: 1000px;
}

.jailbreak-content pre {
    margin: 0;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    background: transparent;
}

/* === SELECTION === */
::selection {
    background: var(--primary);
    color: white;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

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

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

/* === CITATIONS === */
.citation-container {
    position: relative;
    display: inline-block;
}

.citation-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.citation-link:hover {
    color: var(--secondary);
    text-decoration-style: solid;
}

.citation-popup {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 90vw;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.citation-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.citation-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--border);
}

.citation-popup-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.citation-popup-authors {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.citation-popup-venue {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

.citation-error {
    color: #dc2626;
    font-weight: 500;
}

/* References Section */
.references-section {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    scroll-margin-top: 6rem;
}

.references-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.references-icon {
    color: var(--primary);
}

.citation-item {
    border-left: 4px solid var(--primary-light);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.citation-item:last-child {
    margin-bottom: 0;
}

.citation-highlight {
    background: var(--bg-main);
    border-left-color: var(--primary);
    padding: 0.5rem;
    margin-left: -0.5rem;
    border-radius: 8px;
}

.citation-short-ref {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.citation-full-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.5;
}

.citation-full-authors {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.citation-full-venue {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.citation-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.citation-external-link:hover {
    color: var(--secondary);
}

.citation-external-link svg {
    width: 14px;
    height: 14px;
}

/* === PROTOCOL ROC PLOT === */
.protocol-roc-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.protocol-roc-plot-area {
    width: 100%;
    height: 600px;
    margin-bottom: 1.5rem;
}

.protocol-roc-legend-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.protocol-roc-legend-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.protocol-roc-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 2rem 0.5rem;
    }
    
    .citation-popup {
        width: 280px;
    }
    
    .floating-nav {
        top: 1rem;
        right: 1rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
    }
    
    .floating-nav.visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-list {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        padding: 0 0.75rem;
        border: none;
        box-shadow: none;
    }
    
    .nav-list.active {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        padding: 1rem;
        border: 2px solid var(--border);
        box-shadow: 0 4px 12px var(--shadow);
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .title-figure-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .title-figure {
        width: 100%;
        max-width: 100%;
        min-width: 600px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.1rem;
    }
    
    .card-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .abstract-card .card-content {
        font-size: 1rem;
    }
    
    .subsection-title {
        font-size: 1.2rem;
    }
    
    .graph-caption {
        font-size: 0.95rem;
    }
    
    .caption-label {
        font-size: 0.95rem;
    }
    
    .caption-text {
        font-size: 0.95rem;
    }
    
    .fig1-container,
    .pareto-container,
    .protocol-roc-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .zero-shot-container {
        padding: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .protocol-roc-plot-area {
        height: 400px;
    }
    
    .zero-shot-plot {
        min-height: 300px;
        padding: 0.5rem;
    }
    
    .fig1-roc-plot,
    .fig1-histogram-container {
        padding: 0.5rem;
    }
    
    .notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 1.5rem 0.25rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .card-content {
        font-size: 0.95rem;
    }
    
    .abstract-card .card-content {
        font-size: 0.95rem;
    }
    
    .graph-caption {
        font-size: 0.85rem;
    }
    
    .caption-label {
        font-size: 0.85rem;
    }
    
    .caption-text {
        font-size: 0.85rem;
    }
    
    .title-figure-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .title-figure {
        width: 100%;
        max-width: 100%;
        min-width: 500px;
    }
    
    .fig1-container,
    .pareto-container,
    .protocol-roc-container {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .zero-shot-container {
        padding: 0.5rem;
        margin: 1rem 0;
    }
    
    .protocol-roc-plot-area {
        height: 350px;
    }
    
    .zero-shot-plot {
        min-height: 250px;
        padding: 0.25rem;
    }
    
    .fig1-roc-plot,
    .fig1-histogram-container {
        padding: 0.25rem;
    }
    
    .code-content {
        font-size: 0.8rem;
    }
    
    .code-copy {
        position: static;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
}

/* === PROMPT INJECTION DROPDOWNS === */
.injection-dropdown {
    margin: 1.5rem 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.injection-dropdown:hover {
    border-color: var(--primary);
}

.injection-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.injection-toggle:hover {
    background: var(--bg-main);
}

.injection-toggle.active {
    background: var(--bg-main);
}

.injection-toggle.active .toggle-icon {
    transform: rotate(90deg);
}

.injection-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: var(--bg-code);
}

.injection-content.active {
    max-height: 2000px;
}

/* Nested subdropdowns */
.injection-subdropdown {
    margin: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.injection-subdropdown .injection-toggle {
    font-size: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
}

.injection-subdropdown .injection-content {
    background: var(--bg-main);
}

/* Conversation list */
.conversation-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversation-btn {
    padding: 0.875rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.conversation-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: white;
    transform: translateX(4px);
}

.conversation-btn-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-sample-id {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.conversation-btn:hover .btn-sample-id,
.conversation-btn-active .btn-sample-id {
    color: white;
}

.sample-prefix {
    transition: all 0.2s ease;
}

.conversation-btn-active .sample-prefix {
    display: none;
}

.btn-metadata {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

.conversation-btn:hover .btn-metadata,
.conversation-btn-active .btn-metadata {
    color: rgba(255, 255, 255, 0.9);
}

.btn-metadata strong {
    font-weight: 600;
}

/* Conversation Modal */
.conversation-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    padding: 2rem;
}

.conversation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.conversation-modal-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.conversation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
}

.conversation-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

.conversation-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.conversation-modal-close:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.conversation-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Conversation metadata */
.conversation-metadata {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.metadata-item {
    font-size: 0.95rem;
    line-height: 1.6;
}

.metadata-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Conversation messages */
.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.message:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px var(--shadow);
}

.message-user {
    border-left: 4px solid #7a9ab8;
}

.message-deployment-model {
    border-left: 4px solid #5b7c99;
}

.message-monitor {
    border-left: 4px solid #8b9fc9;
}

.message-system {
    border-left: 4px solid #4a5568;
    background: var(--bg-main);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.message-role {
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--primary);
    font-size: 0.95rem;
}

.message-model {
    background: var(--bg-main);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.message-timestamp {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.message-content {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.message-content pre {
    background: var(--bg-code);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}

.message-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-badge {
    display: inline-block;
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.75rem;
    margin-right: 0.5rem;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Conversation summary */
.conversation-summary {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid var(--border);
}

.conversation-summary h4 {
    font-family: var(--font-display);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.summary-item {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.summary-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.outcome-injection_failed {
    color: #059669;
    font-weight: 600;
}

.outcome-injection_successful {
    color: #dc2626;
    font-weight: 600;
}

.summary-analysis {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .conversation-modal {
        padding: 1rem;
    }

    .conversation-modal-content {
        max-height: 95vh;
    }

    .conversation-modal-body {
        padding: 1rem;
    }

    .conversation-metadata {
        grid-template-columns: 1fr;
    }

    .message {
        padding: 1rem;
    }

    .conversation-btn {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .task-section,
    .monitor-section,
    .monitor-response {
        padding: 1rem;
    }

    .score-value {
        font-size: 1.25rem;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .turn {
        padding: 1rem;
    }

    .turn-code pre {
        max-height: 300px;
    }
}

/* Task sections */
.task-section {
    margin: 1.5rem 0;
}

.task-section h4 {
    font-family: var(--font-display);
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.task-content {
    background: var(--bg-code);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.task-content.side-task {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

/* Monitor sections */
.monitor-section {
    margin: 1.5rem 0;
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.monitor-section h4 {
    font-family: var(--font-display);
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.monitor-content pre {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

.monitor-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
}

.secret-input-badge {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fee2e2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    font-size: 0.9rem;
}

.secret-input-badge code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #dc2626;
}

/* Monitor response */
.monitor-response {
    margin: 1.5rem 0;
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.monitor-response h4 {
    font-family: var(--font-display);
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.monitor-reasoning {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    line-height: 1.7;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent);
    font-size: 0.95rem;
}

.monitor-score {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    text-align: center;
}

.score-value {
    font-size: 1.5rem;
    font-family: var(--font-display);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    margin-left: 0.5rem;
}

.score-low {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.score-medium {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.score-high {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.score-critical {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

/* Task results */
.task-result {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.task-c {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-weight: 600;
}

.task-i {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    font-weight: 600;
}

.task-unknown {
    background: var(--bg-main);
    color: var(--text-muted);
}

.outcome-badge {
    display: block;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Conversation header */
.conversation-header {
    background: var(--bg-main);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.header-row .metadata-item {
    font-size: 0.95rem;
}

.header-row .score-value {
    font-size: 1.1rem;
}

/* Conversation turns */
.conversation-turns {
    margin: 1.5rem 0;
}

.conversation-turns h4 {
    font-family: var(--font-display);
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.turn {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
}

.turn:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.turn-untrusted {
    border-left: 4px solid #e57373;
    background: var(--bg-card);
}

.turn-monitor {
    border-left: 4px solid #42a5f5;
    background: var(--bg-card);
}

.turn-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.turn-role {
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--primary);
    font-size: 1.05rem;
}

.turn-model {
    background: var(--bg-code);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.turn-reasoning {
    background: rgba(239, 83, 80, 0.06);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.92rem;
    border-left: 3px solid #e57373;
    max-height: 500px;
    overflow-y: auto;
}

.turn-code {
    margin-bottom: 1rem;
}

.turn-code pre {
    background: #fafafa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    max-height: 500px;
    overflow-y: auto;
    word-wrap: normal;
    word-break: normal;
}

.turn-code code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
    display: block;
}

.turn-secret {
    display: inline-block;
    background: rgba(239, 68, 68, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: none;
}

.turn-secret strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.turn-secret code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: var(--font-mono);
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 600;
    word-break: break-all;
}

.turn-monitor-reasoning {
    background: rgba(66, 165, 245, 0.08);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.92rem;
    border-left: 3px solid #42a5f5;
    max-height: 500px;
    overflow-y: auto;
}

.turn-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border-radius: 8px;
    font-weight: 600;
}

.turn-score .score-value {
    font-size: 0.95rem;
}

/* Inline conversation display */
.inline-conversation-container {
    margin: 1rem 0 2rem 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 1.5rem;
}

.inline-conversation-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.inline-conversation-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.inline-conversation-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    overflow-x: auto;
}

.inline-conversation-meta .meta-item {
    color: var(--text-secondary);
    white-space: nowrap;
}

.inline-conversation-meta .score-value {
    font-size: 0.85rem;
    font-weight: 700;
}

.inline-dropdown {
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.inline-dropdown:hover {
    border-color: var(--primary);
}

.inline-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.inline-dropdown-toggle:hover {
    background: var(--bg-main);
}

.inline-dropdown-toggle.active {
    background: var(--bg-main);
}

.inline-dropdown-toggle .toggle-icon {
    font-size: 0.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.inline-dropdown-toggle.active .toggle-icon {
    transform: rotate(90deg);
}

.inline-dropdown-toggle .toggle-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.inline-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-main);
}

.inline-dropdown-content.active {
    max-height: 10000px;
}

.dropdown-inner {
    padding: 1.5rem;
    line-height: 1.7;
    font-size: 0.9rem;
    max-height: 600px;
    overflow-y: auto;
}

.task-content-box {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
}

/* === THREAT MODEL SECTION === */
.threat-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.team-box {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
}

.blue-team {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
}

.blue-team h3 {
    color: #1e40af;
    font-family: var(--font-display);
    margin-bottom: 0.75rem;
}

.red-team {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #ef4444;
}

.red-team h3 {
    color: #991b1b;
    font-family: var(--font-display);
    margin-bottom: 0.75rem;
}

.team-box p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.team-box ul {
    list-style: none;
    padding-left: 0;
}

.team-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.team-box li::before {
    content: "▸";
    position: absolute;
    left: 0;
    font-weight: bold;
}

.blue-team li::before {
    color: #3b82f6;
}

.red-team li::before {
    color: #ef4444;
}

.attack-strategy-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.attack-strategy-box p {
    margin-bottom: 1rem;
}

.attack-example {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.attack-example code {
    background: #fef3c7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.assumptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.assumption-item {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
}

.assumption-includes {
    background: #f0fdf4;
    border-color: #22c55e;
}

.assumption-includes h4 {
    color: #15803d;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.assumption-excludes {
    background: #fef2f2;
    border-color: #ef4444;
}

.assumption-excludes h4 {
    color: #991b1b;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.assumption-item ul {
    list-style: none;
    padding-left: 0;
}

.assumption-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.assumption-includes li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.assumption-excludes li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

.threat-note {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .threat-teams-grid,
    .assumptions-grid {
        grid-template-columns: 1fr;
    }

    .team-box,
    .assumption-item {
        padding: 1rem;
    }
}
