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

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2942;
    --accent: #3182ce;
    --text: #1a202c;
    --text-light: #4a5568;
    --border: #e2e8f0;
    --bg: #f7fafc;
    --white: #ffffff;

    /* Support level colors */
    --strongly-support: #00ff00;
    --support: #86efac;
    --neutral: #94a3b8;
    --oppose: #fb923c;
    --strongly-oppose: #ef4444;

    /* Outcome disposition colors (3 states) */
    --support: #22c55e;      /* Green - Support */
    --overturn: #ef4444;     /* Red - Overturn */
    --remand: #94a3b8;       /* Gray - Remand */
    --unknown: #d1d5db;      /* Light gray - Unknown/error state */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: url('/static/images/left.jpeg') left center / contain no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('/static/images/right.jpeg') right center / contain no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 11rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-left {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.about-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.about-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-2px);
}

.query-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--white);
}

.counter-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

.counter-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/supreme-court-portrait.jpg') center center / cover no-repeat;
    opacity: 0.5;
    z-index: 0;
}

header h1,
header .subtitle {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 2rem;
}

.question-section {
    margin-bottom: 2rem;
}

.question-section label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.question-section label .emphasis {
    color: #667eea;
    font-weight: 500;
    letter-spacing: 0.3px;
}

#question {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#question:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.judges-section {
    margin-bottom: 2rem;
}

.judges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.judges-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.judges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.judge-toggle {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #b0c4d1;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.judge-toggle img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.judge-toggle:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.judge-toggle.selected {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.judge-toggle.selected img {
    border-color: var(--white);
}

.toggle-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: var(--primary-light);
}

.submit-section {
    text-align: center;
    margin-bottom: 2rem;
}

.ask-button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.ask-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.ask-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.loading-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.disclaimer {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-light);
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.responses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.responses-section h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--text);
}

.wait-message {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    font-style: italic;
}

/* Progress indicator */
.progress-indicator {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.progress-text {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 12px;
}

.responses-container {
    display: grid;
    gap: 1rem;
}

.response-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.response-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.response-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    background: rgba(178, 152, 120, 0.5);
}

.response-header:hover {
    background: rgba(178, 152, 120, 0.7);
}

.judge-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.response-brief {
    color: var(--text-light);
    font-size: 0.95rem;
}

.expand-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.response-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.response-body {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.response-card.expanded .response-body {
    padding: 1rem 1.5rem;
    max-height: 1000px;
}

.response-full {
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Vote summary */
.vote-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.vote-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.vote-badge .vote-count {
    font-size: 1.5rem;
    font-weight: 700;
}

.vote-badge.strongly-support {
    background: var(--strongly-support);
}

.vote-badge.support {
    background: var(--support);
    color: var(--text);
}

.vote-badge.neutral {
    background: var(--neutral);
}

.vote-badge.oppose {
    background: var(--oppose);
}

.vote-badge.strongly-oppose {
    background: var(--strongly-oppose);
}

/* Support level colors - color whole card */
.response-card[data-support="strongly_support"] {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid var(--strongly-support);
}

.response-card[data-support="support"] {
    background: rgba(134, 239, 172, 0.15);
    border: 2px solid var(--support);
}

.response-card[data-support="neutral"] {
    background: rgba(148, 163, 184, 0.1);
    border: 2px solid var(--neutral);
}

.response-card[data-support="oppose"] {
    background: rgba(251, 146, 60, 0.1);
    border: 2px solid var(--oppose);
}

.response-card[data-support="strongly_oppose"] {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--strongly-oppose);
}

footer {
    background: #333;
    padding: 1rem;
    text-align: center;
    border-top: 3px solid #007bff;
    margin-top: 2rem;
}

footer .disclaimer {
    font-size: 0.9rem;
    line-height: 1.5;
    color: white;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #666;
    border-radius: 8px;
    margin: 0;
}

.query-status {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
    margin: 0 0 0.5rem 0;
    padding: 0.5rem;
    background: rgba(225, 225, 255, 0.2);
    border-radius: 8px;
}

#queries-remaining {
    color: var(--accent);
    font-weight: 600;
}

.processing {
    color: #007bff;
    font-weight: 600;
}

.limit-reached {
    color: #dc3545;
    font-weight: 600;
}

/* Response Summary */
.response-summary {
    background: rgba(245, 245, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    overflow: visible;
    position: relative;
}

.response-summary h3 {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1.2rem;
}

#summary-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.25rem 0.1rem;
}

.summary-item {
    margin: 0;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    flex: 0 0 auto;
}

.summary-item .support-level {
    font-weight: 600;
    text-transform: capitalize;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.response-header .support-level {
    font-weight: 600;
    text-transform: capitalize;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    background: rgba(178, 152, 120, 0.5);
}

/* Support level colors in response cards */
.response-card.strongly-support .support-level {
    background: var(--strongly-support);
    color: black;
}

.response-card.support .support-level {
    background: var(--support);
    color: black;
}

.response-card.neutral .support-level {
    background: var(--neutral);
    color: white;
}

.response-card.oppose .support-level {
    background: var(--oppose);
    color: black;
}

.response-card.strongly-oppose .support-level {
    background: var(--strongly-oppose);
    color: white;
}

/* Support level colors in summary */
.summary-item.strongly-support .support-level {
    background: var(--strongly-support);
    color: black;
}

.summary-item.support .support-level {
    background: var(--support);
    color: black;
}

.summary-item.neutral .support-level {
    background: var(--neutral);
    color: white;
}

.summary-item.oppose .support-level {
    background: var(--oppose);
    color: black;
}

.summary-item.strongly-oppose .support-level {
    background: var(--strongly-oppose);
    color: white;
}

.response-content p {
    white-space: pre-wrap;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.brief-response, .full-response {
    padding: 1rem 1.5rem;
}

.expand-btn, .collapse-btn {
    display: block;
    margin: 0;
}

/* Bar segment colors - ensure all support levels work in proportional bar */
.bar-segment.strongly-support {
    background: var(--strongly-support) !important;
}

.bar-segment.support {
    background: var(--support) !important;
}

.bar-segment.neutral {
    background: var(--neutral) !important;
}

.bar-segment.oppose {
    background: var(--oppose) !important;
}

.bar-segment.strongly-oppose {
    background: var(--strongly-oppose) !important;
}

/* Bar segment colors for outcome dispositions */
.bar-segment[data-tooltip] {
    cursor: default;
}

.bar-segment.support {
    background: var(--support) !important;
}

.bar-segment.overturn {
    background: var(--overturn) !important;
}

.bar-segment.remand {
    background: var(--remand) !important;
}

.bar-segment.unknown {
    background: var(--unknown) !important;
}

/* Summary Legend */
.summary-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    position: relative;
}

.legend-item[data-tooltip]:hover::after,
.bar-segment[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 12px;
    background: var(--legend-bg, #333);
    color: var(--legend-text, white);
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--legend-border, #333);
}

.legend-item[data-tooltip]:hover::before,
.bar-segment[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: var(--legend-border, #333);
    z-index: 1000;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.legend-color.support {
    background: var(--support);
}

.legend-color.overturn {
    background: var(--overturn);
}

.legend-color.remand {
    background: var(--remand);
}

.legend-color.unknown {
    background: var(--unknown);
}

/* Legend item and bar segment tooltip colors */
.legend-item.support,
.bar-segment.support {
    --legend-bg: var(--support);
    --legend-border: var(--support);
    --legend-text: black;
}

.legend-item.overturn,
.bar-segment.overturn {
    --legend-bg: var(--overturn);
    --legend-border: var(--overturn);
    --legend-text: white;
}

.legend-item.remand,
.bar-segment.remand {
    --legend-bg: var(--remand);
    --legend-border: var(--remand);
    --legend-text: white;
}

.legend-item.unknown,
.bar-segment.unknown {
    --legend-bg: var(--unknown);
    --legend-border: var(--unknown);
    --legend-text: black;
}

/* Syllabus headline (streamed consensus, types in at the end) */
.syllabus-headline {
    margin: 0 0 1.5rem 0;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(26, 54, 93, 0.25);
    border-left: 6px solid var(--accent);
    transition: box-shadow 0.4s ease;
}

.syllabus-headline.final {
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.4);
    border-left-color: #ffd700;
}

.syllabus-headline .syllabus-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.syllabus-headline .syllabus-text {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
    white-space: pre-wrap;
}

/* Per-judge streaming cards */
.judge-cards {
    display: grid;
    gap: 1rem;
}

.response-card .response-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.judge-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.response-card .judge-name {
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
}

.card-labels {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.card-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-light);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.card-chip.scope {
    background: rgba(49, 130, 206, 0.12);
    color: var(--accent);
    border-color: rgba(49, 130, 206, 0.3);
}

/* Live streaming text (the "typing" judge) */
.streaming-text {
    padding: 1rem 1.5rem;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text);
    min-height: 1.5rem;
}

.response-card.streaming .response-header {
    background: rgba(178, 152, 120, 0.35);
}

.response-card.streaming .streaming-text::after {
    content: '▋';
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
    color: var(--accent);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Outcome-colored left border once a judge is done */
.response-card.done.support { border-left: 5px solid var(--support); }
.response-card.done.overturn { border-left: 5px solid var(--overturn); }
.response-card.done.remand { border-left: 5px solid var(--remand); }
.response-card.done.unknown,
.response-card.error { border-left: 5px solid var(--unknown); }

.response-error {
    padding: 1rem 1.5rem;
    color: #991b1b;
}

.response-card.error .response-header {
    background: rgba(239, 68, 68, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .syllabus-headline .syllabus-text {
        font-size: 1.1rem;
    }

    .judges-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    main {
        padding: 1.5rem;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        left: 1rem;
        top: 0.75rem;
    }

    .about-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .query-counter {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .counter-label {
        font-size: 0.8rem;
    }

    .counter-value {
        font-size: 0.95rem;
    }
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

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

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-light);
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--text);
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    max-height: 85vh;
}

.modal-body h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 0.5rem;
}

.modal-body h3 {
    color: var(--primary-light);
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text);
}

.modal-body hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 2rem 0;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal-body ul li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.modal-body blockquote {
    background: var(--bg);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.modal-body blockquote p {
    margin: 0;
}

.about-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-table thead {
    background: var(--primary);
    color: var(--white);
}

.about-table th,
.about-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.about-table th {
    font-weight: 600;
    font-size: 1rem;
}

.about-table tbody tr:hover {
    background: var(--bg);
}

.about-table code {
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
}

.architecture-diagram {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    line-height: 1.8;
    color: var(--text);
}

.authors-list {
    list-style: none;
    padding-left: 0;
}

.authors-list li {
    margin-bottom: 0.75rem;
}

.authors-list a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.authors-list a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.authors-list a::before {
    content: '🔗';
    margin-right: 0.5rem;
}

.modal-disclaimer {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 1rem;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body h2 {
        font-size: 1.5rem;
    }

    .modal-body h3 {
        font-size: 1.2rem;
    }

    .about-table {
        font-size: 0.9rem;
    }

    .about-table th,
    .about-table td {
        padding: 0.75rem;
    }

    .architecture-diagram {
        font-size: 0.7rem;
    }
}
