/* ==========================================================================
   AI Board of Directors — Executive Boardroom Stylesheet
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --bg-deep: #060a12;
    --bg-base: #0b1120;
    --bg-card: rgba(15, 22, 40, 0.80);
    --bg-elevated: rgba(20, 29, 48, 0.85);
    --border: #1c2a42;
    --border-light: #263550;

    --gold: #c8a44e;
    --gold-light: #e2ca7a;
    --gold-dim: rgba(200, 164, 78, 0.15);

    --teal: #1a9eaa;
    --teal-light: #22c4d2;
    --teal-dim: rgba(26, 158, 170, 0.12);

    --text-primary: #d6dae4;
    --text-secondary: #7a8499;
    --text-bright: #eef0f5;
    --text-muted: #4d5670;

    --claude: #6b93d6;
    --claude-dim: rgba(107, 147, 214, 0.12);
    --gpt: #4caf7c;
    --gpt-dim: rgba(76, 175, 124, 0.12);
    --gemini: #d97757;
    --gemini-dim: rgba(217, 119, 87, 0.12);

    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Outfit', sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 0 24px rgba(200, 164, 78, 0.08);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-deep);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Holographic boardroom background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/AIBODv3.png') center center / cover no-repeat;
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}

/* Subtle overlay gradient for depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, transparent 0%, var(--bg-deep) 80%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.25;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-light);
}

input, textarea, button, select {
    font-family: var(--sans);
    font-size: 0.9375rem;
}

::selection {
    background: rgba(200, 164, 78, 0.3);
    color: var(--text-bright);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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


/* ==========================================================================
   AUTH SCREEN
   ========================================================================== */

.auth-screen {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    animation: fadeInUp 0.6s ease forwards;
}

.auth-card h1 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--gold);
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.auth-tab {
    flex: 1;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.03em;
}

.auth-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.auth-tab.active {
    background: var(--bg-elevated);
    color: var(--gold);
}

/* Auth Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 10, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dim);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--teal) 0%, #158892 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal) 100%);
    box-shadow: 0 4px 16px rgba(26, 158, 170, 0.25);
    transform: translateY(-1px);
}

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

.auth-link {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.auth-link:hover {
    color: var(--gold);
}

/* Checkbox */
.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.auth-checkbox input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.auth-checkbox a {
    color: var(--gold);
}

/* OAuth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Google Auth Button */
.google-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.google-auth-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-light);
}

.google-auth-btn svg {
    flex-shrink: 0;
}

/* Auth Error */
.auth-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(220, 50, 50, 0.1);
    border: 1px solid rgba(220, 50, 50, 0.25);
    border-radius: var(--radius-sm);
    color: #e87171;
    font-size: 0.8125rem;
    text-align: center;
}


/* ==========================================================================
   MAIN APP LAYOUT
   ========================================================================== */

.main-app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ==========================================================================
   APP HEADER
   ========================================================================== */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(6, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.sub-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    background: var(--gold-dim);
    border: 1px solid rgba(200, 164, 78, 0.3);
    border-radius: 100px;
    color: var(--gold);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sub-badge.pro {
    background: linear-gradient(135deg, var(--gold-dim) 0%, rgba(226, 202, 122, 0.15) 100%);
    border-color: var(--gold);
    color: var(--gold-light);
}

.user-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   HISTORY SIDEBAR
   ========================================================================== */

.history-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: rgba(8, 12, 22, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.history-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--gold);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.history-item {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(28, 42, 66, 0.4);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-question {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* History overlay */
.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.history-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


/* ==========================================================================
   SETTINGS MODAL
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease;
    overflow: hidden;
}

.settings-modal {
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--gold);
}

.settings-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    color: var(--text-bright);
    margin-bottom: 0.375rem;
}

.settings-note {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Sync Toggle */
.sync-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.sync-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sync-label-group {
    flex: 1;
}

.sync-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

.sync-description {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    transition: background var(--transition-fast);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--gold-dim);
    border: 1px solid var(--gold);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--gold);
}

/* Key Input Groups */
.key-input-group {
    margin-bottom: 1.25rem;
}

.key-input-group:last-child {
    margin-bottom: 0;
}

.key-input-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    letter-spacing: 0.03em;
}

.key-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.key-row input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: rgba(6, 10, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.key-row input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dim);
}

.key-row input::placeholder {
    color: var(--text-muted);
    font-family: var(--sans);
}

.validate-btn {
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.validate-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.key-status {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 16px;
}

.key-status.valid {
    color: var(--gpt);
}

.key-status.invalid {
    color: #e87171;
}

.key-status.checking {
    color: var(--text-muted);
}

/* Billing Info */
.billing-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.plan-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.plan-display #currentPlan {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-bright);
}

.plan-display #usageCounter {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.upgrade-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, #b8943e 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #0b1120;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.03em;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: 0 4px 16px rgba(200, 164, 78, 0.3);
    transform: translateY(-1px);
}

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

.manage-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.manage-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}


/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.content {
    flex: 1;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}


/* ---------- Onboarding ---------- */
.onboarding-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-gold);
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

.onboarding-card h2 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.onboarding-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--teal) 0%, #158892 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.04em;
}

.cta-btn:hover {
    background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal) 100%);
    box-shadow: 0 4px 16px rgba(26, 158, 170, 0.25);
    transform: translateY(-1px);
}


/* ---------- Provider Badges ---------- */
.provider-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-claude {
    color: var(--claude);
    border-color: rgba(107, 147, 214, 0.25);
    background: var(--claude-dim);
}

.badge-gpt {
    color: var(--gpt);
    border-color: rgba(76, 175, 124, 0.25);
    background: var(--gpt-dim);
}

.badge-gemini {
    color: var(--gemini);
    border-color: rgba(217, 119, 87, 0.25);
    background: var(--gemini-dim);
}

.badge.inactive {
    opacity: 0.35;
}


/* ---------- Form Card ---------- */
.form-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-of-type {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.form-group label .optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.form-group textarea,
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 10, 18, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-dim);
}

.form-group textarea::placeholder,
.form-group input[type="text"]::placeholder {
    color: var(--text-muted);
}

/* Persona Chips */
.persona-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.persona-chip {
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.persona-chip:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.persona-chip.active {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold-light);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--teal) 0%, #158892 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal) 100%);
    box-shadow: 0 4px 20px rgba(26, 158, 170, 0.3);
    transform: translateY(-1px);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Subtle sheen animation on submit button */
.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::after {
    left: 100%;
}


/* ==========================================================================
   TIER SELECTION
   ========================================================================== */

.tier-selection {
    animation: fadeInUp 0.5s ease;
}

.tier-selection h2 {
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 0.5rem;
}

.tier-reasoning {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.tier-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.tier-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.tier-card:hover {
    border-color: var(--border-light);
    background: var(--bg-elevated);
}

.tier-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), var(--shadow-gold);
}

.tier-card.recommended::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.15rem 0.75rem;
    background: var(--gold);
    color: var(--bg-deep);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 100px;
}

.tier-card h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    color: var(--text-bright);
    margin-bottom: 0.375rem;
}

.tier-cost {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.tier-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tier-models {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ==========================================================================
   LOADING STATE
   ========================================================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-state p {
    font-family: var(--serif);
    font-size: 1.125rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.loading-timer {
    font-family: var(--sans);
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
    margin-top: 0.5rem;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   RESULTS
   ========================================================================== */

.results {
    animation: fadeInUp 0.5s ease;
}

/* Individual round response cards */
.round-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.round-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.round-label {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bright);
}

.round-toggle {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.round-toggle.collapsed {
    transform: rotate(-90deg);
}

.round-body {
    padding: 1rem 1.25rem;
}

.round-body.collapsed {
    display: none;
}

/* Provider response within a round */
.response-card {
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--border);
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.response-card:last-child {
    margin-bottom: 0;
}

.response-card.provider-claude {
    border-left-color: var(--claude);
}

.response-card.provider-gpt {
    border-left-color: var(--gpt);
}

.response-card.provider-gemini {
    border-left-color: var(--gemini);
}

.response-provider {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.response-card.provider-claude .response-provider { color: var(--claude); }
.response-card.provider-gpt .response-provider { color: var(--gpt); }
.response-card.provider-gemini .response-provider { color: var(--gemini); }

.response-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.response-text p {
    margin-bottom: 0.75rem;
}

.response-text p:last-child {
    margin-bottom: 0;
}

.response-text ul,
.response-text ol {
    margin: 0.5rem 0 0.75rem 1.25rem;
}

.response-text li {
    margin-bottom: 0.25rem;
}

.response-text strong {
    color: var(--text-bright);
}

.response-text code {
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--teal-light);
}

/* Convergence indicator */
.convergence-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.convergence-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.convergence-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.convergence-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 100%);
    transition: width 0.6s ease;
}

.convergence-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold);
}

/* Final synthesis card */
.synthesis-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-md), var(--shadow-gold);
    margin-bottom: 1.5rem;
}

.synthesis-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.synthesis-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.75;
}

.synthesis-text p {
    margin-bottom: 0.75rem;
}

.synthesis-text p:last-child {
    margin-bottom: 0;
}

.synthesis-text strong {
    color: var(--text-bright);
}

.synthesis-text ul,
.synthesis-text ol {
    margin: 0.5rem 0 0.75rem 1.25rem;
}

.synthesis-text li {
    margin-bottom: 0.25rem;
}


/* ---------- Follow-Up ---------- */
.followup-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.followup-card h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    color: var(--text-bright);
    margin-bottom: 1rem;
}

.followup-card textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 10, 18, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    margin-bottom: 1rem;
}

.followup-card textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-dim);
}

.followup-card textarea::placeholder {
    color: var(--text-muted);
}


/* ---------- Limit Reached Card ---------- */
.limit-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 164, 78, 0.2);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-gold);
    animation: fadeInUp 0.5s ease;
}

.limit-card h2 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.limit-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

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


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .app-header {
        padding: 0.625rem 1rem;
    }

    .header-title {
        font-size: 1.05rem;
    }

    .user-name {
        display: none;
    }

    .content {
        padding: 1.5rem 1rem 3rem;
    }

    .form-card {
        padding: 1.5rem 1.25rem;
    }

    .tier-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tier-card {
        padding: 1.25rem 1rem;
    }

    .history-sidebar {
        width: 280px;
    }

    .settings-modal {
        max-width: 100%;
        margin: 0.5rem;
        max-height: 90vh;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-card h1 {
        font-size: 1.75rem;
    }

    .persona-chips {
        gap: 0.375rem;
    }

    .persona-chip {
        padding: 0.3rem 0.625rem;
        font-size: 0.75rem;
    }

    .key-row {
        flex-wrap: wrap;
    }

    .key-row input {
        min-width: 0;
    }

    .validate-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .app-header {
        padding: 0.5rem 0.75rem;
    }

    .header-title {
        font-size: 0.95rem;
    }

    .sub-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }

    .content {
        padding: 1rem 0.75rem 2.5rem;
    }

    .form-card {
        padding: 1.25rem 1rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.8125rem;
    }

    .provider-badges {
        gap: 0.5rem;
    }

    .badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }

    .synthesis-card {
        padding: 1.25rem 1rem;
    }

    .modal-overlay {
        padding: 0.5rem;
    }

    .settings-section {
        padding: 1.25rem 1rem;
    }

    .history-sidebar {
        width: 100%;
    }
}


/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }


/* ================================================================ */
/*  Toast Notifications                                              */
/* ================================================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 280px;
    max-width: 420px;
    padding: 0.75rem 1rem;
    background: rgba(15, 22, 40, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-family: var(--sans);
    font-size: 0.875rem;
    line-height: 1.4;
    pointer-events: auto;

    /* Start off-screen for slide-in */
    opacity: 0;
    transform: translateX(100%);
}

/* Slide-in animation (applied via JS) */
.toast--visible {
    animation: toast-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fade-out animation (applied via JS on dismiss) */
.toast--exiting {
    animation: toast-fade-out 0.35s ease forwards;
}

/* ---------- Type accents ---------- */

.toast--success {
    border-left-color: #4caf7c;
}

.toast--success .toast__icon {
    color: #4caf7c;
}

.toast--error {
    border-left-color: #e87171;
}

.toast--error .toast__icon {
    color: #e87171;
}

.toast--info {
    border-left-color: #6b93d6;
}

.toast--info .toast__icon {
    color: #6b93d6;
}

.toast--warning {
    border-left-color: var(--gold);
}

.toast--warning .toast__icon {
    color: var(--gold);
}

/* ---------- Toast inner elements ---------- */

.toast__icon {
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1;
    width: 1.25rem;
    text-align: center;
}

.toast__message {
    flex: 1;
    color: var(--text-primary);
}

.toast__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
    padding: 0;
}

.toast__close:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Keyframes ---------- */

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ---------- Toast responsive ---------- */

@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: 0;
        max-width: 100%;
    }
}


/* ================================================================ */
/*  Export Actions                                                    */
/* ================================================================ */

.export-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.export-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #8a94a6);
    font-family: var(--sans, 'Outfit', sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #e0e6ed);
    border-color: rgba(255, 255, 255, 0.2);
}

.export-btn.email-btn {
    border-color: rgba(200, 164, 78, 0.25);
    color: var(--gold);
}

.export-btn.email-btn:hover {
    background: var(--gold-dim);
    border-color: rgba(200, 164, 78, 0.4);
    color: var(--gold-light);
}


/* ================================================================ */
/*  Board Deliberation Scene (Loading Animation)                      */
/* ================================================================ */

.board-deliberation-scene {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.board-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.5s ease;
}

.board-member:not(.speaking) {
    opacity: 0.4;
    transform: scale(0.9);
}

.board-member.speaking {
    opacity: 1;
    transform: scale(1);
}

.member-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    transition: all 0.5s ease;
}

.avatar-claude {
    background: linear-gradient(135deg, var(--claude) 0%, #4a72b8 100%);
    box-shadow: 0 4px 16px rgba(107, 147, 214, 0.15);
}

.avatar-gpt {
    background: linear-gradient(135deg, var(--gpt) 0%, #3a9166 100%);
    box-shadow: 0 4px 16px rgba(76, 175, 124, 0.15);
}

.avatar-gemini {
    background: linear-gradient(135deg, var(--gemini) 0%, #b85e3f 100%);
    box-shadow: 0 4px 16px rgba(217, 119, 87, 0.15);
}

/* Speaking ring pulse */
.speaking-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0;
    transition: all 0.5s ease;
}

.board-member.speaking .speaking-ring {
    opacity: 1;
    animation: ringPulse 2s ease-in-out infinite;
}

.board-member[data-model="claude"].speaking .speaking-ring {
    border-color: var(--claude);
}

.board-member[data-model="gpt"].speaking .speaking-ring {
    border-color: var(--gpt);
}

.board-member[data-model="gemini"].speaking .speaking-ring {
    border-color: var(--gemini);
}

.board-member.speaking .member-avatar {
    box-shadow: 0 0 32px rgba(200, 164, 78, 0.2);
}

.board-member[data-model="claude"].speaking .member-avatar {
    box-shadow: 0 0 32px rgba(107, 147, 214, 0.35);
}

.board-member[data-model="gpt"].speaking .member-avatar {
    box-shadow: 0 0 32px rgba(76, 175, 124, 0.35);
}

.board-member[data-model="gemini"].speaking .member-avatar {
    box-shadow: 0 0 32px rgba(217, 119, 87, 0.35);
}

.member-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.5s ease;
}

.board-member.speaking .member-label {
    color: var(--text-bright);
}

/* Thinking dots */
.thinking-indicator {
    display: flex;
    gap: 4px;
    height: 16px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.board-member.speaking .thinking-indicator {
    opacity: 1;
}

.thinking-indicator .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: thinkingBounce 1.4s ease-in-out infinite;
}

.thinking-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinkingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.2; }
}


/* ================================================================ */
/*  Meta Chips (Result Summary)                                       */
/* ================================================================ */

.meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}


/* ================================================================ */
/*  Collapsible Round Cards                                           */
/* ================================================================ */

.round-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    animation: fadeInUp 0.4s ease;
}

.round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}

.round-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.round-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.round-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    background: var(--teal-dim);
    border: 1px solid rgba(26, 158, 170, 0.25);
    border-radius: 100px;
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal-light);
}

.round-models-list {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.round-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.round-convergence-score {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gold);
}

.round-chevron {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: transform var(--transition-fast);
    display: inline-block;
}

.round-chevron.collapsed {
    transform: rotate(-90deg);
}

.round-body {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.round-body.collapsed {
    display: none;
}

/* Override the existing .response-card classes to also work with response-claude etc. */
.response-card.response-claude {
    border-left-color: var(--claude);
}

.response-card.response-gpt {
    border-left-color: var(--gpt);
}

.response-card.response-gemini {
    border-left-color: var(--gemini);
}

/* Response header/body generated by deliberation.js */
.response-header {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.response-card.response-claude .response-header { color: var(--claude); }
.response-card.response-gpt .response-header { color: var(--gpt); }
.response-card.response-gemini .response-header { color: var(--gemini); }

.response-body {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.response-body p { margin-bottom: 0.75rem; }
.response-body p:last-child { margin-bottom: 0; }
.response-body strong { color: var(--text-bright); }
.response-body li { margin-bottom: 0.25rem; }

/* Synthesis card heading override for new layout */
.synthesis-card h2 {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.synthesis-body {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.75;
}

.synthesis-body p { margin-bottom: 0.75rem; }
.synthesis-body p:last-child { margin-bottom: 0; }
.synthesis-body strong { color: var(--text-bright); }
.synthesis-body li { margin-bottom: 0.25rem; }

/* Convergence indicator generated in rounds */
.convergence-indicator {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.convergence-indicator .convergence-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.convergence-indicator .convergence-bar div {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 100%);
    transition: width 0.6s ease;
}

.convergence-indicator .convergence-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: block;
}


/* ================================================================ */
/*  Loading State: Responsive for board scene                         */
/* ================================================================ */

@media (max-width: 480px) {
    .board-deliberation-scene {
        gap: 1.5rem;
    }

    .member-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .member-label {
        font-size: 0.625rem;
    }
}
