/* ===== Base ===== */
body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    background: #f3f5fa;
    margin: 0;
    color: #1f2937;
    line-height: 1.55;
}

h1, h2, h3 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #010057;
    line-height: 1.22;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(1.55rem, 2.2vw, 1.95rem);
}

h2 {
    font-size: 1.28rem;
    letter-spacing: -0.018em;
}

h3 {
    font-size: 1.0625rem;
    letter-spacing: -0.012em;
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    width: 95%;
    margin: 28px auto 40px auto;
    padding: 0 20px;
    position: relative;
}

.home-tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.home-tool-grid .card > a {
    display: inline-block;
    margin-top: 4px;
    text-decoration: none;
}

.generator-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    align-items: start;
}

.card {
    background: #ffffff;
    border: 1px solid #dde3ee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    border-top: 4px solid #010057;
}

.page-hero {
    padding: 24px;
}

.page-intro {
    background: #f7f8fc;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 0;
    color: #4b5563;
    max-width: 72ch;
}

.home-hero-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 16px;
    display: block;
}

.home-hero-logo + h1 {
    margin-bottom: 12px;
}

.home-hero-logo + h1 + p {
    margin-bottom: 10px;
}

.home-hero-logo + h1 + p + p {
    margin-bottom: 10px;
}

.home-hero-logo + h1 + p + p + p {
    margin-bottom: 0;
}

.top-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.left-panel-card p,
.left-panel-card li,
.left-panel-card div {
    font-size: 14px;
}

.panel-tip {
    background: #f7f8fc;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    color: #4b5563;
}

.setup-required-notice {
    margin: 0 0 14px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.panel-tip--compact {
    padding: 6px 0;
    margin: 4px 0 10px;
    background: transparent;
    border: none;
    font-size: 12px;
    color: #64748b;
}

.skill-question-count {
    margin: 8px 0 0;
    font-size: 13px;
    color: #475569;
}

.setup-field-error {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.45;
}

.is-hidden {
    display: none !important;
}

.context-line {
    margin-bottom: 8px;
}

.soft-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* ===== Generation progress ===== */
.progress-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef2ff;
    color: #374151;
    border: 1px solid #d6dcf5;
}

.progress-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #d6dcf5;
    border-top: 2px solid #010057;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    flex-shrink: 0;
}

.variant-success-status {
    padding: 10px 12px;
    border-radius: 10px;
    background: #edf8ef;
    color: #1f6b2a;
    border: 1px solid #cfead5;
}

.variant-error-status {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fdecec;
    color: #a12622;
    border: 1px solid #f3c7c5;
}

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

/* ===== Buttons (shared app shell) ===== */
.app-shell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.2s ease;
    box-shadow: none;
}

.app-shell .btn:hover:not(:disabled):not(.disabled) {
    transform: none;
}

.app-shell .btn:focus {
    outline: none;
}

.app-shell .btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.app-shell .btn:disabled,
.app-shell .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.app-shell .btn-primary {
    background: #334155;
    color: #ffffff;
    border-color: #334155;
}

.app-shell .btn-primary:hover:not(:disabled):not(.disabled) {
    background: #1f2937;
    border-color: #1f2937;
}

.app-shell .btn-secondary {
    background: #ffffff;
    color: #1f2937;
    border-color: #cbd5e1;
}

.app-shell .btn-secondary:hover:not(:disabled):not(.disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
}

.app-shell .btn-danger {
    background: #b4534d;
    color: #ffffff;
    border-color: #b4534d;
}

.app-shell .btn-danger:hover:not(:disabled):not(.disabled) {
    background: #9f423d;
    border-color: #9f423d;
}

.app-shell .btn-danger-outline {
    background: #fff;
    color: #b4534d;
    border-color: #e5b7b3;
}

.app-shell .btn-danger-outline:hover:not(:disabled):not(.disabled) {
    background: #fef2f2;
    border-color: #dc9995;
}

.app-shell .btn-quiet {
    background: transparent;
    color: #475569;
    border-color: transparent;
}

.app-shell .btn-quiet:hover:not(:disabled):not(.disabled) {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}

.app-shell .btn--small {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

/* ===== App shell layout & panels (shared) ===== */

.app-shell .container {
    margin-top: 20px;
    margin-bottom: 32px;
}

.app-shell .page-hero {
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-shell .page-hero h1 {
    margin-bottom: 8px;
    font-size: 1.45rem;
}

.app-shell .page-intro {
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 0;
    max-width: 72ch;
}

.app-shell .top-actions {
    margin-top: 12px;
    gap: 8px;
}

.app-shell .card {
    padding: 16px 18px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #010057;
    box-shadow: none;
}

.app-shell .app-panel-heading,
.app-shell .generator-panel-heading {
    margin: 0 0 10px;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.app-shell .helper-box,
.app-shell .setup-required-notice,
.app-shell .panel-tip--boxed {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.app-shell .empty-state,
.app-shell .workspace-empty--compact {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.app-shell .generator-form > label:not(.group-label) {
    display: block;
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.app-shell .generator-form input:not([type="checkbox"]),
.app-shell .generator-form select,
.app-shell .generator-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 8px 11px;
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: none;
    font-size: 14px;
    background: #ffffff;
    color: #1f2937;
}

.app-shell .generator-form textarea {
    min-height: 72px;
    line-height: 1.45;
}

.app-shell .generator-form .form-actions {
    margin: 8px 0 0;
    padding-top: 4px;
}

.app-shell .left-panel-card {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-top-width: 1px;
    background: #fafbfc;
}

.app-shell .left-panel-card .app-panel-heading,
.app-shell .left-panel-card .generator-panel-heading,
.app-shell .left-panel-card > h3 {
    margin-bottom: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
}

/* ===== Homepage ===== */

.page-home .container {
    margin-top: 20px;
    margin-bottom: 32px;
}

.page-home {
    --home-navy: #010057;
    --home-navy-soft: #1e40af;
    --home-blue-bg: #eff6ff;
    --home-blue-border: #bfdbfe;
    --home-burgundy: #8b3a3a;
    --home-burgundy-hover: #723030;
    --home-burgundy-icon: #9f423d;
    --home-rose-bg: #faf5f5;
    --home-rose-border: #e8d4d4;
    --home-neutral-icon: #64748b;
    --home-neutral-bg: #f1f5f9;
    --home-neutral-border: #e2e8f0;
    --home-success-text: #2d6a3f;
    --home-success-bg: #f4faf6;
    --home-success-border: #cfe8d4;
}

.page-home .home-landing-hero {
    padding: 28px 32px 32px;
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-home .home-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 32px 48px;
    align-items: stretch;
}

.page-home .home-hero-content {
    min-width: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-home .home-hero-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    max-width: 100%;
    padding-right: 8px;
    box-sizing: border-box;
}

.page-home .home-hero-title {
    margin: 0;
    font-size: clamp(1.625rem, 2.8vw, 2.125rem);
    line-height: 1.15;
    color: #010057;
    letter-spacing: -0.03em;
    font-weight: 700;
    max-width: 100%;
}

.page-home .home-hero-subtitle {
    margin: 0;
    max-width: 100%;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #475569;
}

.page-home .home-hero-divider {
    display: block;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-top: 1px solid #e2e8f0;
    background: transparent;
}

.page-home .home-hero-middle {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 30px 0;
    box-sizing: border-box;
}

.page-home .home-hero-divider--after-intro {
    margin: 0 0 18px;
}

.page-home .home-hero-divider--before-advisory {
    margin: 18px 0 0;
}

.page-home .home-hero-workflows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    flex: 0 0 auto;
}

.page-home .home-hero-advisory {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    flex: 0 0 auto;
    max-width: none;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.page-home .home-hero-advisory-icon {
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 1px;
    color: #2563eb;
}

.page-home .home-hero-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 16px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.page-home .home-hero-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.page-home .home-hero-action-icon--create {
    color: var(--home-neutral-icon);
    background: var(--home-neutral-bg);
    border: 1px solid var(--home-neutral-border);
}

.page-home .home-hero-action-icon--variants {
    color: var(--home-burgundy-icon);
    background: var(--home-rose-bg);
    border: 1px solid var(--home-rose-border);
}

.page-home .home-hero-action-body {
    min-width: 0;
}

.page-home .home-hero-action-title {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1e293b;
}

.page-home .home-hero-action-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.page-home .home-hero-action-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 220px;
    min-width: 220px;
    max-width: 100%;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 8px;
    border-width: 2px;
    border-style: solid;
    background: #ffffff;
    box-shadow: none;
    white-space: nowrap;
}

.page-home .home-hero-action-btn--create {
    color: var(--home-navy);
    border-color: var(--home-navy);
    background: #ffffff;
}

.page-home .home-hero-action-btn--create:hover {
    color: var(--home-navy);
    border-color: var(--home-navy);
    background: #f8fafc;
}

.page-home .home-hero-action-btn--variants {
    color: var(--home-burgundy);
    border-color: var(--home-burgundy);
    background: #ffffff;
}

.page-home .home-hero-action-btn--variants:hover {
    color: var(--home-burgundy-hover);
    border-color: var(--home-burgundy-hover);
    background: var(--home-rose-bg);
}

.page-home .home-hero-action-arrow {
    margin-left: 2px;
}

.page-home .home-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    min-height: 100%;
    justify-content: flex-start;
    align-self: stretch;
}

.page-home .home-preview-card {
    padding: 14px 16px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.page-home .home-preview-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.page-home .home-preview-q-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: #010057;
}

.page-home .home-preview-status {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.page-home .home-preview-stem {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}

.page-home .home-preview-options {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.page-home .home-preview-options li {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.4;
    color: #475569;
}

.page-home .home-preview-opt-label {
    font-weight: 600;
    color: #64748b;
}

.page-home .home-preview-opt--correct {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 600;
}

.page-home .home-preview-opt-check {
    margin-left: auto;
    font-weight: 700;
}

.page-home .home-preview-meta {
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 10px;
    line-height: 1.45;
    color: #64748b;
}

.page-home .home-preview-meta p {
    margin: 0 0 4px;
}

.page-home .home-preview-meta p:last-child {
    margin-bottom: 0;
}

.page-home .home-preview-meta strong {
    color: #475569;
}

.page-home .home-workflow-timeline {
    margin: 0;
    padding: 4px 0 0 4px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-home .home-workflow-timeline-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 14px;
    position: relative;
}

.page-home .home-workflow-timeline-item:last-child {
    padding-bottom: 0;
}

.page-home .home-workflow-timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.page-home .home-workflow-timeline-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.page-home .home-workflow-timeline-marker--draft {
    color: var(--home-navy-soft);
    background: var(--home-blue-bg);
    border: 1px solid var(--home-blue-border);
}

.page-home .home-workflow-timeline-marker--review {
    color: var(--home-neutral-icon);
    background: var(--home-neutral-bg);
    border: 1px solid var(--home-neutral-border);
}

.page-home .home-workflow-timeline-marker--edit {
    color: var(--home-burgundy-icon);
    background: var(--home-rose-bg);
    border: 1px solid var(--home-rose-border);
}

.page-home .home-workflow-timeline-marker--approve {
    color: var(--home-success-text);
    background: var(--home-success-bg);
    border: 1px solid var(--home-success-border);
}

.page-home .home-workflow-timeline-copy strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.page-home .home-workflow-timeline-copy p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

@media (max-width: 900px) {
    .page-home .home-landing-hero {
        padding: 20px 18px 24px;
    }

    .page-home .home-hero-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: start;
    }

    .page-home .home-hero-aside {
        order: 2;
        justify-content: flex-start;
    }

    .page-home .home-hero-content {
        order: 1;
        min-height: 0;
    }

    .page-home .home-hero-middle {
        flex: 0 0 auto;
        padding: 24px 0;
    }

    .page-home .home-hero-advisory {
        margin-top: 0;
    }

    .page-home .home-hero-title {
        max-width: none;
    }

    .page-home .home-hero-action {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .page-home .home-hero-action-btn {
        grid-column: 1 / -1;
        justify-self: start;
        width: min(100%, 220px);
        min-width: min(100%, 220px);
        max-width: 220px;
    }
}

@media (max-width: 520px) {
    .page-home .home-hero-action {
        grid-template-columns: 1fr;
    }

    .page-home .home-hero-action-icon {
        width: 40px;
        height: 40px;
    }
}

/* ===== Variant generator page ===== */

.page-variant .variant-status-box {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.page-variant .variant-status-box p {
    margin: 0;
    font-size: inherit;
    color: inherit;
}

.page-variant .variant-selection-count {
    font-weight: 600;
    color: #64748b;
}

.page-variant .variant-review-empty,
.page-variant .variant-placeholder {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

/* variant-card-accent retired — use .page-variant polish block below */

.page-variant .filter-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.page-variant .filter-button-row + p {
    margin: 10px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.page-variant #question-list-container > p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
}

.page-variant .export-ready-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.page-variant .variant-filter-label {
    margin: 10px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.page-variant .variant-filter-label:first-of-type {
    margin-top: 0;
}

.page-variant .panel-tip--compact {
    margin: 0 0 10px;
    padding: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    background: transparent;
    border: none;
}

/* ===== Forms ===== */
.generator-form label,
#edit-panel label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]),
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    margin-top: 0;
    margin-bottom: 16px;
    border: 1px solid #cfd6e4;
    border-radius: 11px;
    box-sizing: border-box;
    background: #ffffff;
    font-size: 14px;
    color: #111827;
    line-height: 1.4;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06) inset,
        0 1px 0 rgba(255, 255, 255, 0.75) inset;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]) {
    min-height: 40px;
}

select {
    min-height: 40px;
}

textarea {
    min-height: 120px;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.5;
    resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]):focus,
select:focus,
textarea:focus {
    outline: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: #7686ff;
    box-shadow:
        0 0 0 1px rgba(118, 134, 255, 0.28),
        0 0 0 4px rgba(118, 134, 255, 0.12),
        0 1px 2px rgba(15, 23, 42, 0.06) inset;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]):disabled,
select:disabled,
textarea:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    background: #f1f3f8;
    box-shadow: none;
    color: #64748b;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"])::placeholder,
textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}

input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    margin-top: 0;
    margin-bottom: 16px;
    border: 1px dashed #b8c4dc;
    border-radius: 11px;
    box-sizing: border-box;
    background: #f8f9fd;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input[type="file"]:focus {
    outline: none;
}

input[type="file"]:focus-visible {
    border-color: #7686ff;
    border-style: solid;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(118, 134, 255, 0.28),
        0 0 0 4px rgba(118, 134, 255, 0.12);
}

input[type="checkbox"] {
    width: auto;
    min-height: unset;
    margin-right: 8px;
    margin-bottom: 0;
    box-shadow: none;
    vertical-align: middle;
    accent-color: #010057;
}

.section-heading {
    margin-top: 26px;
    margin-bottom: 14px;
    padding-top: 4px;
}

.field-group {
    margin-bottom: 20px;
}

.group-label {
    margin-bottom: 10px;
}

.checkbox-list {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    background: #f8faff;
    border: 1px solid #e0e6f2;
    border-radius: 12px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: 500;
}

.form-actions {
    margin-top: 8px;
}

#generator-form .form-actions {
    margin-top: 12px;
}

/* ===== Filter row ===== */
.filter-button-row,
.filter-chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filter-chip {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.filter-chip:hover {
    background: #f1f5f9;
}

.filter-chip.active-filter,
.filter-btn.active-filter {
    background: #e0e7ff !important;
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
}

/* ===== Review tools ===== */
.review-tools {
    margin-bottom: 14px;
}

/* ===== Question area ===== */
#question-results {
    width: 100%;
}

.question-card {
    background: #ffffff;
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 16px rgba(16, 24, 40, 0.06);
}

.question-card-full {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.question-card h3 {
    margin-bottom: 12px;
}

.question-card p,
.question-card li {
    font-size: 14px;
}

/* ===== Status badges ===== */
.question-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.question-status[data-status="Draft"] {
    background: #eef2ff;
    color: #3730a3;
}

.question-status[data-status="Done"] {
    background: #dcfce7;
    color: #166534;
}

.question-status[data-status="Rejected"] {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== Question action buttons ===== */
.question-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Form generator: style warnings (faculty review) ===== */
.generator-style-review {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e9f2;
    font-size: 13px;
    line-height: 1.45;
}

.generator-style-review--clear {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-top: none;
    margin-top: 14px;
    padding-top: 8px;
}

.generator-style-review--na {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
    margin-top: 14px;
    padding-top: 8px;
}

.generator-style-review-na-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.generator-style-review-clear-icon {
    flex-shrink: 0;
    font-weight: 700;
    color: #15803d;
}

.generator-style-review--warnings {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-top: 1px solid #fde68a;
    margin-top: 14px;
    padding-top: 10px;
}

.generator-style-review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.generator-style-review-title {
    font-weight: 700;
    color: #92400e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.generator-style-review-sub {
    font-size: 11px;
    color: #a16207;
}

.generator-style-warnings-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.generator-style-warning-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px solid rgba(245, 158, 11, 0.25);
}

.generator-style-warning-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.style-severity-badge {
    flex-shrink: 0;
    margin-top: 1px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.style-severity-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.style-severity-high {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fdba74;
}

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

.style-severity-info {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.generator-style-warning-body {
    min-width: 0;
    flex: 1;
}

.style-warning-message {
    margin: 0;
    color: #78350f;
}

.style-warning-meta {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #a16207;
}

.style-warning-meta-sep {
    opacity: 0.65;
}

.style-warning-field strong {
    font-weight: 600;
    color: #713f12;
}

.style-warning-code {
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.65);
    padding: 1px 5px;
    border-radius: 4px;
    color: #713f12;
}

/* ===== Form generator: optional AI review (tutor recommendations) ===== */
.generator-ai-review {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #c7d2fe;
    background: #f5f7ff;
}

.generator-ai-review--result {
    border-color: #818cf8;
    background: linear-gradient(180deg, #f8f9ff 0%, #eef2ff 100%);
}

.generator-ai-review--loading,
.generator-ai-review--empty {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.generator-ai-review--error {
    border-color: #fecaca;
    background: #fef2f2;
}

.generator-ai-review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.generator-ai-review-title {
    font-weight: 700;
    font-size: 14px;
    color: #312e81;
}

.generator-ai-review-sub {
    font-size: 12px;
    color: #4f46e5;
}

.generator-ai-review-summary {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.45;
}

.generator-ai-review-warning-triage {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #475569;
}

.generator-ai-review-warning-triage span {
    display: block;
    margin-top: 4px;
}

.generator-ai-review-warning-triage span:first-child {
    margin-top: 0;
}

.generator-ai-review-flag {
    margin: 0 0 10px;
    color: #b45309;
    font-size: 13px;
}

.generator-ai-review-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    margin-bottom: 8px;
}

.generator-ai-review-ratings {
    font-size: 13px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.generator-ai-review-h4 {
    margin: 10px 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4338ca;
}

.generator-ai-review-bullets {
    margin: 0 0 8px 18px;
    padding: 0;
    font-size: 13px;
}

.generator-ai-review-muted {
    margin: 0 0 8px;
    font-size: 13px;
    color: #64748b;
}

.generator-ai-review-changes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.generator-ai-review-change-item {
    padding: 8px 0;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 13px;
}

.generator-ai-review-change-item:first-child {
    border-top: none;
}

.generator-ai-review-change-priority {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e0e7ff;
    color: #3730a3;
    margin-right: 6px;
}

.generator-ai-review-change-field {
    font-size: 11px;
    color: #6366f1;
    text-transform: capitalize;
}

.generator-ai-review-change-issue {
    margin: 4px 0 2px;
}

.generator-ai-review-change-suggestion {
    margin: 0;
    color: #334155;
}

.generator-ai-review-error-text {
    margin: 0;
    color: #b91c1c;
    font-size: 13px;
}

.generator-ai-review-empty-text,
.generator-ai-review-loading-text {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

/* ===== Form generator: clinical safety review (read-only) ===== */
.generator-clinical-safety {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
}

.generator-clinical-safety--result {
    border-color: #86efac;
    background: #f0fdf4;
}

.generator-clinical-safety--faculty {
    border-color: #fb923c;
    background: #fff7ed;
}

.generator-clinical-safety--unsafe {
    border-color: #f87171;
    background: #fef2f2;
}

.generator-clinical-safety--loading,
.generator-clinical-safety--empty {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.generator-clinical-safety--error {
    border-color: #fecaca;
    background: #fef2f2;
}

.generator-clinical-safety-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.generator-clinical-safety-title {
    font-weight: 700;
    font-size: 13px;
    color: #92400e;
}

.generator-clinical-safety--result .generator-clinical-safety-title {
    color: #166534;
}

.generator-clinical-safety--unsafe .generator-clinical-safety-title {
    color: #991b1b;
}

.generator-clinical-safety-sub {
    font-size: 11px;
    color: #b45309;
}

.generator-clinical-safety-summary {
    margin: 0 0 6px;
    font-size: 13px;
    color: #334155;
    line-height: 1.45;
}

.generator-clinical-safety-ratings {
    margin: 0 0 6px;
    font-size: 12px;
    color: #475569;
}

.generator-clinical-safety-flag {
    margin: 0 0 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    background: #ffedd5;
    color: #9a3412;
}

.generator-clinical-safety--unsafe .generator-clinical-safety-flag {
    background: #fee2e2;
    color: #991b1b;
}

.generator-clinical-safety-details {
    margin-top: 4px;
    font-size: 12px;
}

.generator-clinical-safety-details summary {
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
}

.generator-clinical-safety-bullets {
    margin: 6px 0 0 18px;
    padding: 0;
    color: #334155;
}

.generator-clinical-safety-error-text,
.generator-clinical-safety-empty-text,
.generator-clinical-safety-loading-text {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.generator-clinical-safety-error-text {
    color: #b91c1c;
}

/* ===== Form generator: AI repair preview (session-only) ===== */
.generator-ai-repair {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #c4b5fd;
    background: #f5f3ff;
}

.generator-ai-repair--result,
.generator-ai-repair--low-risk {
    border-color: #86efac;
    background: #f0fdf4;
}

.generator-ai-repair--medium-risk {
    border-color: #fdba74;
    background: #fff7ed;
}

.generator-ai-repair--high-risk {
    border-color: #f87171;
    background: #fef2f2;
}

.generator-ai-repair--loading,
.generator-ai-repair--empty {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.generator-ai-repair--blocked {
    border-color: #b45309;
    background: #fffbeb;
}

.generator-ai-repair-blocked-reasons {
    margin: 0.5rem 0 0.75rem 1.25rem;
    padding: 0;
}

.generator-ai-repair-change-section {
    margin-top: 0.75rem;
}

.generator-ai-repair-change-heading {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.generator-ai-repair-change-section--low .generator-ai-repair-change-heading {
    color: #166534;
}

.generator-ai-repair-change-section--medium .generator-ai-repair-change-heading {
    color: #9a3412;
}

.generator-ai-repair-row-low-risk {
    background: #f0fdf4;
}

.generator-ai-repair--error {
    border-color: #fecaca;
    background: #fef2f2;
}

.generator-ai-repair-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.generator-ai-repair-title {
    font-weight: 700;
    font-size: 13px;
    color: #5b21b6;
}

.generator-ai-repair-sub {
    font-size: 11px;
    color: #6d28d9;
}

.generator-ai-repair-summary,
.generator-ai-repair-ratings,
.generator-ai-repair-muted,
.generator-ai-repair-validator-note {
    margin: 0 0 6px;
    font-size: 12px;
    color: #334155;
}

.generator-ai-repair-flag {
    margin: 0 0 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    background: #ffedd5;
    color: #9a3412;
}

.generator-ai-repair-flag--educational {
    background: #ffedd5;
    border: 1px solid #fdba74;
    color: #c2410c;
}

.generator-ai-repair-row-educational {
    background: #fff7ed;
}

.generator-ai-repair-details {
    margin-top: 6px;
    font-size: 12px;
}

.generator-ai-repair-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
}

.generator-ai-repair-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 11px;
}

.generator-ai-repair-table th,
.generator-ai-repair-table td {
    border: 1px solid #e2e8f0;
    padding: 4px 6px;
    vertical-align: top;
    text-align: left;
}

.generator-ai-repair-row-clinical {
    background: #fff7ed;
}

.generator-ai-repair-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.generator-ai-repair-error-text {
    margin: 0;
    color: #b91c1c;
    font-size: 13px;
}

.page-sba-generator .question-actions button,
.page-sba-generator #close-edit-panel,
.page-sba-generator #prev-question-btn,
.page-sba-generator #next-question-btn,
.page-sba-generator #next-draft-btn,
.page-variant #prev-source-btn,
.page-variant #next-source-btn,
.page-variant #prev-source-btn-original,
.page-variant #next-source-btn-original,
.page-variant #next-draft-btn {
    box-shadow: none !important;
    background-image: none !important;
}

.page-sba-generator .question-actions button:disabled,
.page-sba-generator #prev-question-btn:disabled,
.page-sba-generator #next-question-btn:disabled,
.page-sba-generator #next-draft-btn:disabled,
.page-variant #prev-source-btn:disabled,
.page-variant #next-source-btn:disabled,
.page-variant #prev-source-btn-original:disabled,
.page-variant #next-source-btn-original:disabled,
.page-variant #next-draft-btn:disabled {
    opacity: 0.5 !important;
    box-shadow: none !important;
}

/* ===== Navigation ===== */
#question-navigation,
.variant-generator-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

#question-counter {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.jump-container {
    margin-top: 10px;
    margin-bottom: 14px;
}

.jump-container label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

#jump-select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    margin-top: 0;
    margin-bottom: 0;
    border: 1px solid #cfd6e4;
    border-radius: 11px;
    box-sizing: border-box;
    background: #ffffff;
    font-size: 13px;
    color: #111827;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06) inset,
        0 1px 0 rgba(255, 255, 255, 0.75) inset;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#jump-select:focus {
    outline: none;
}

#jump-select:focus-visible {
    border-color: #7686ff;
    box-shadow:
        0 0 0 1px rgba(118, 134, 255, 0.28),
        0 0 0 4px rgba(118, 134, 255, 0.12),
        0 1px 2px rgba(15, 23, 42, 0.06) inset;
}

/* ===== Export readiness list ===== */
.export-ready-list {
    list-style: none;
    padding-left: 0;
    margin-top: 14px;
    margin-bottom: 18px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.export-ready-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f6;
}

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

.export-ready-title {
    font-size: 14px;
    color: #1f2937;
    word-break: break-word;
}

.export-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: #b91c1c;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.export-remove-btn:hover {
    background: #fee2e2;
}

.export-remove-btn:focus {
    outline: none;
}

.export-remove-btn:focus-visible {
    border-color: #f87171;
    box-shadow: var(--focus-ring);
}

/* ===== Edit panel ===== */
#edit-panel-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    width: min(560px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.12);
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    z-index: 1000;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

#edit-panel-wrapper.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: #ffffff;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

#edit-panel-header h2,
#edit-panel-title {
    margin: 0;
    font-size: 1.1rem;
}

#edit-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px 16px;
    box-sizing: border-box;
}

#edit-panel-body input,
#edit-panel-body textarea,
#edit-panel-body select {
    width: 100%;
    box-sizing: border-box;
}

#edit-panel-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.edit-panel-footer-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

#edit-panel-footer .autosave-status {
    margin: 0;
    flex: 1 1 120px;
}

body.edit-panel-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.22);
    z-index: 999;
}

/* ===== Autosave ===== */
.autosave-status {
    font-size: 13px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    color: #555;
}

.autosave-status.pending {
    background: #fff7e6;
    color: #8a5a00;
}

.autosave-status.saving {
    background: #eaf1ff;
    color: #010057;
}

.autosave-status.saved {
    background: #edf8ef;
    color: #1f6b2a;
}

.autosave-status.error {
    background: #fdecec;
    color: #a12622;
}

/* ===== Collapsible panel ===== */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.collapsible .collapsible-body {
    display: none;
}

.collapsible.open .collapsible-body {
    display: block;
}

.chevron {
    font-size: 18px;
    transition: transform 0.2s ease;
    color: #4b5563;
}

.collapsible.open .chevron {
    transform: rotate(180deg);
}

/* ===== Info icon ===== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    background: #eef1ff;
    color: #010057;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    vertical-align: middle;
}

.info-icon:hover {
    background: #dde3ff;
}

.info-icon:focus {
    outline: none;
}

.info-icon:focus-visible {
    box-shadow: var(--focus-ring);
}

/* ===== Modal ===== */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.app-modal-overlay.hidden {
    display: none;
}

.app-modal {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 48px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    border: 1px solid #dde3ee;
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8faff;
}

.app-modal-header h3 {
    margin-bottom: 0;
}

.app-modal-body {
    padding: 20px;
}

.app-modal-body p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

.app-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px 20px;
}

.modal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #4b5563;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-icon-btn:hover {
    color: #111827;
    background: rgba(15, 23, 42, 0.05);
}

.modal-icon-btn:focus {
    outline: none;
}

.modal-icon-btn:focus-visible {
    color: #111827;
    border-color: #c7d0e8;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: var(--focus-ring);
}

.hidden {
    display: none !important;
}

/* ===== Export modal ===== */
.export-options {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.export-option {
    width: 100%;
    justify-content: center;
}

.export-forms-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.export-forms-note strong {
    color: #334155;
}

/* ===== Variant workflow ===== */
.variant-status-box {
    margin-top: 12px;
    background: #f7f8fc;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 12px 14px;
}

.variant-status-box p {
    margin: 0 0 8px 0;
}

.variant-status-box p:last-child {
    margin-bottom: 0;
}

.variant-selection-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.variant-selection-count {
    font-weight: 600;
    color: #010057;
    margin-top: 4px;
    margin-bottom: 12px;
}

.variant-question-list-container {
    margin-top: 16px;
}

.variant-source-list {
    display: grid;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.variant-source-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
    border: 1px solid #dde3ee;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 12px;
}

.variant-source-item.active {
    border-color: #7686ff;
    background: #eef2ff;
}

.variant-source-item-checkbox,
.variant-source-item-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    color: #010057;
    font-weight: 700;
}

.variant-source-jump-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variant-source-jump-btn:hover {
    transform: none;
}

.variant-source-jump-btn:focus {
    outline: none;
}

.variant-source-jump-btn:focus-visible {
    border-radius: 8px;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45);
}

.variant-source-row-label {
    font-size: 12px;
    font-weight: 700;
    color: #010057;
}

.variant-source-row-title {
    font-size: 14px;
    color: #1f2937;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.variant-preview-container {
    margin-top: 15px;
}

.variant-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    background: #ffffff;
    margin-top: 15px;
}

.variant-preview-table tbody tr:nth-child(even) td {
    background: #f9fafc;
}

.variant-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.variant-preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.variant-preview-table th,
.variant-preview-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8edf5;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.variant-preview-table th {
    background: #f7f8fc;
    color: #010057;
    font-weight: 700;
}

.variant-review-navigation {
    margin-bottom: 18px;
}

.variant-review-panel {
    min-height: 260px;
}

.variant-review-empty {
    color: #4b5563;
    text-align: center;
    padding: 28px 20px;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.55;
}

.variant-review-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.variant-review-title {
    margin-bottom: 8px;
}

.variant-review-subtitle {
    margin: 0;
    color: #4b5563;
}

.variant-review-selection-state {
    background: #eef2ff;
    color: #010057;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.variant-current-include {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f7f8fc;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 600;
    color: #111827;
}

.variant-panel-card {
    padding: 0;
    overflow: hidden;
}

.variant-section-header {
    width: 100%;
    border: none;
    background: #f8faff;
    color: #010057;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: none;
    border-radius: 0;
}

.variant-section-header:hover {
    transform: none;
    background: #eef2ff;
}

.variant-section-header:focus {
    outline: none;
}

.variant-section-header:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.45);
    position: relative;
    z-index: 1;
}

.variant-panel-card .variant-section-body {
    padding: 16px;
}

.variant-panel-card.collapsed .variant-section-body {
    display: none;
}

.variant-section-chevron {
    color: #4b5563;
    font-size: 14px;
}

.variant-detail-grid {
    display: grid;
    gap: 12px;
}

.variant-detail-block {
    display: grid;
    gap: 4px;
}

.variant-detail-block strong {
    color: #010057;
    font-size: 13px;
}

.variant-detail-block span {
    color: #1f2937;
    font-size: 14px;
    word-break: break-word;
    display: block;
    margin-top: 5px;
    line-height: 1.5;
}

.variant-placeholder {
    color: #4b5563;
    margin: 0;
}

.variant-generated-card p {
    margin-top: 0;
    margin-bottom: 10px;
}

.variant-generated-card p:last-of-type {
    margin-bottom: 0;
}

.variant-options-list {
    margin-top: 8px;
    margin-bottom: 12px;
    padding-left: 22px;
}

.variant-edit-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #dbe1ea;
    background: #f9fbff;
    border-radius: 12px;
}

.variant-edit-panel-standalone {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

.variant-edit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.variant-edit-panel-standalone .variant-edit-layout {
    grid-template-columns: 1fr;
}

.variant-edit-column h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #010057;
}

.variant-edit-reference-box {
    background: #ffffff;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 14px;
}

.variant-edit-panel label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.variant-edit-panel input,
.variant-edit-panel textarea,
.variant-edit-panel select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.variant-edit-actions {
    margin-top: 8px;
}

.variant-debug-pre {
    white-space: pre-wrap;
    background: #f5f5f5;
    padding: 10px;
    border: 1px solid #ccc;
    margin-top: 10px;
    border-radius: 8px;
    overflow-x: auto;
}

.variant-instructions-card {
    margin-bottom: 18px;
    background: #f6f8ff;
    border: 1px solid #dce4ff;
    border-top: 4px solid #4f46e5;
    border-radius: 14px;
}

.variant-instructions-header {
    padding: 12px 14px;
}

.variant-instructions-body {
    padding: 0 14px 14px 14px;
}

.variant-instructions-body p {
    margin: 0 0 8px 0;
    color: #374151;
}

.variant-instructions-actions {
    margin-top: 10px;
    margin-bottom: 10px;
}

.variant-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    background: #f5f7fb;
    padding: 10px;
    border-radius: 8px;
}

.variant-meta-grid div {
    font-size: 13px;
}

.variant-meta-grid strong {
    display: block;
    font-size: 11px;
    color: #666;
}

.variant-main-content {
    margin-bottom: 15px;
}

.variant-full-width {
    margin-bottom: 15px;
}

.variant-full-width .variant-detail-block span {
    display: block;
    width: 100%;
}

.variant-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.correct-option {
    background: #e6f7ec;
    border-left: 4px solid #16a34a;
    padding: 8px 10px;
    border-radius: 6px;
}

.distractor-option {
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 6px;
}

.original-panel {
    border-top: 4px solid #010057;
    background: #fcfcfd;
}

.original-panel .variant-section-header {
    background: #f7f8fc;
}

.variant-panel {
    border-top: 4px solid #0ea5e9;
    background: #f7fcff;
}

.variant-panel .variant-section-header {
    background: #eefaff;
}

/* ===== Responsive ===== */
.left-panel-card--compact {
    padding: 14px 16px;
    margin-bottom: 14px;
}

.left-panel-card--compact .sidebar-heading {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.sidebar-compact-line {
    margin: 0 0 8px;
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
}

.sidebar-compact-line--muted {
    color: #64748b;
    font-size: 12px;
}

.export-panel-error {
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
}

.sidebar-details {
    margin-top: 4px;
    font-size: 12px;
}

.sidebar-details-summary {
    cursor: pointer;
    color: #475569;
    font-weight: 600;
    list-style: none;
}

.sidebar-details-summary::-webkit-details-marker {
    display: none;
}

.sidebar-details-body {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.generation-progress-compact p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.generation-progress-compact .progress-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
}

.generation-progress-compact .progress-status-text {
    line-height: 1.4;
}

.generation-progress-compact .progress-new-draft {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

.generation-progress-compact .progress-complete-message {
    margin: 0 0 6px;
    font-size: 12px;
    color: #475569;
}

.generation-progress-compact .go-to-latest-draft-btn {
    margin-top: 6px;
}

.gen-generation-status {
    margin: 0 0 8px;
}

.gen-generation-status.hidden {
    display: none;
}

.gen-status-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: #475569;
}

.gen-status-compact--running {
    color: #475569;
}

.gen-status-compact--complete {
    color: #166534;
}

.gen-status-compact--error {
    color: #b4534d;
}

.gen-status-compact-text {
    flex: 1 1 auto;
    min-width: 0;
}

.progress-spinner--small {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

.card--compact {
    padding: 14px 16px;
    margin-bottom: 14px;
}

.card--questions {
    padding: 16px 18px;
}

.section-heading-compact {
    margin: 0 0 10px;
    font-size: 1rem;
}

.question-nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.question-nav-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.question-nav-buttons {
    display: flex;
    gap: 8px;
}

.jump-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.jump-select {
    width: 100%;
    font-size: 13px;
}

.tutor-draft-notice--compact {
    margin-bottom: 14px;
    padding: 8px 10px;
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
}

.tutor-draft-notice--compact p {
    margin: 0;
}

.workspace-empty {
    color: #64748b;
    font-size: 14px;
}

.btn--small {
    padding: 7px 12px !important;
    font-size: 13px !important;
    min-height: 34px !important;
}

.btn-quiet {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #475569 !important;
    font-weight: 600 !important;
    padding: 6px 8px !important;
    min-height: auto !important;
}

.btn-quiet:hover {
    color: #1e293b !important;
    text-decoration: underline;
}

.btn-link-style {
    cursor: pointer;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
}

.btn-link-style:hover {
    color: #1e40af;
}

.edit-field-group {
    margin-bottom: 14px;
}

.edit-field-group label {
    display: block;
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 13px;
}

.edit-field-group input,
.edit-field-group textarea,
.edit-field-group select {
    margin-top: 0;
}

@media (max-width: 900px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }

    #edit-panel-wrapper {
        top: 0;
        right: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    #question-navigation {
        flex-wrap: wrap;
    }

    .variant-edit-layout {
        grid-template-columns: 1fr;
    }

    .variant-review-header {
        flex-direction: column;
    }

    .variant-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .variant-secondary-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide the large source question list in the Variant Generator filter panel */
#question-list-container {
    display: none !important;
}

/* --- Variant Generator: Filter Panel Tidy --- */

.variant-filter-panel {
    padding: 12px 16px;
}

.variant-filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-filter-controls button {
    padding: 6px 10px;
    font-size: 13px;
}

#source-counter,
#source-counter-original {
    font-size: 13px;
    font-weight: 500;
    margin: 0 6px;
}

/* tighten panel heading spacing */
.variant-filter-panel h3 {
    margin-bottom: 8px;
}

/* remove any excess vertical gaps */
.variant-filter-panel .card-body {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Align variant right-panel section heading prominence with generator cards */
.variant-card-accent > h3 {
    font-size: 1.5em;
    font-weight: 700;
}

/* ===== Variant Generator collapsible panel polish ===== */

#instructions-panel,
#original-question-panel,
#generated-question-panel {
    padding: 0;
    overflow: hidden;
}

#instructions-panel .collapsible-header,
#original-question-panel .collapsible-header,
#generated-question-panel .collapsible-header {
    padding: 14px 16px;
    min-height: 56px;
    box-sizing: border-box;
}

#instructions-panel .collapsible-body,
#original-question-panel .collapsible-body,
#generated-question-panel .collapsible-body {
    padding: 0 16px 16px 16px;
}

#instructions-panel .collapsible-header h3,
#original-question-panel .collapsible-header h3,
#generated-question-panel .collapsible-header h3 {
    margin: 0;
    line-height: 1.2;
    font-size: 1.5em;
    font-weight: 700;
}

#instructions-panel .chevron,
#original-question-panel .chevron,
#generated-question-panel .chevron {
    font-size: 14px;
    color: #4b5563;
    flex-shrink: 0;
}

#instructions-panel:not(.open) .chevron,
#original-question-panel:not(.open) .chevron,
#generated-question-panel:not(.open) .chevron {
    transform: rotate(-90deg);
}

#instructions-panel.open .chevron,
#original-question-panel.open .chevron,
#generated-question-panel.open .chevron {
    transform: rotate(0deg);
}

#instructions-panel .chevron,
#original-question-panel .chevron,
#generated-question-panel .chevron {
    transition: transform 0.18s ease;
}

#instructions-panel .collapsible-header:hover,
#original-question-panel .collapsible-header:hover,
#generated-question-panel .collapsible-header:hover {
    background: #f8fafc;
}

#instructions-panel .collapsible-body {
    border-top: 1px solid #edf1f7;
}

/* Original / generated question: no divider above Question X of Y row (nav row has lower border) */
#original-question-panel .collapsible-body,
#generated-question-panel .collapsible-body {
    border-top: none;
}

#instructions-panel:not(.open) .collapsible-body,
#original-question-panel:not(.open) .collapsible-body,
#generated-question-panel:not(.open) .collapsible-body {
    border-top: none;
}

#original-question-panel .collapsible-header {
    align-items: center;
}

.page-variant .variant-current-include--toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    max-width: none;
}

.page-variant .variant-current-include--toolbar:hover {
    color: #334155;
    background: #f1f5f9;
}

.page-variant .variant-current-include--toolbar.disabled,
.page-variant .variant-current-include--toolbar:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-variant .variant-current-include--toolbar input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

#instructions-panel .variant-instructions-body,
#original-question-panel .variant-question-display,
#generated-question-panel .variant-question-display {
    padding-top: 14px;
}

#instructions-panel:not(.open),
#original-question-panel:not(.open),
#generated-question-panel:not(.open) {
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

#instructions-panel.open,
#original-question-panel.open,
#generated-question-panel.open {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}


/* Generated panel header progress */

.generated-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.generated-progress {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ===== Tutor-facing generator question card ===== */
.tutor-draft-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    font-size: 14px;
    line-height: 1.45;
    color: #78350f;
}

.tutor-draft-notice p {
    margin: 0;
}

.question-card-compact {
    padding: 18px 20px;
    margin-bottom: 0;
    border: 1px solid #e8ecf1;
    box-shadow: none;
}

.question-card-compact .question-card-header {
    margin-bottom: 14px;
}

.question-card-compact .question-read-body {
    margin-bottom: 4px;
}

.question-card-header {
    margin-bottom: 12px;
}

.question-card-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.question-card-meta {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
}

.question-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.question-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.question-status-chip-label {
    font-weight: 500;
    opacity: 0.85;
}

.question-status-chip--success {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.question-status-chip--warn {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.question-status-chip--danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.question-status-chip--info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.question-read-body {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.question-read-stem,
.question-read-leadin,
.question-read-key,
.question-read-justification {
    margin: 0 0 8px;
}

.question-read-options {
    margin: 0 0 10px 18px;
    padding: 0;
}

.question-read-options li {
    margin-bottom: 4px;
}

.question-opt-label {
    font-weight: 700;
    margin-right: 4px;
}

.question-summary-box {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.45;
}

.question-summary-box p {
    margin: 0 0 6px;
}

.question-summary-box p:last-child {
    margin-bottom: 0;
}

.question-summary-alert {
    margin: 0 0 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.question-summary-alert--ok {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.question-summary-alert--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.question-summary-alert--warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.question-summary-alert--danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.question-summary-reminder {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.question-quality-notes-badge {
    display: inline-block;
}

.question-quality-notes-badge summary {
    list-style: none;
    cursor: pointer;
}

.question-quality-notes-badge summary::-webkit-details-marker {
    display: none;
}

.question-status-chip--clickable {
    cursor: pointer;
}

.question-quality-notes-popover {
    position: absolute;
    z-index: 5;
    margin-top: 6px;
    padding: 8px;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 12px;
}

.question-quality-notes-badge {
    position: relative;
}

.question-more-links {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 4px;
}

.question-collapsed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.question-summaries {
    margin-bottom: 12px;
}

.question-summary-line {
    margin: 0 0 6px;
    font-size: 13px;
    color: #334155;
}

.question-summary-line--muted {
    color: #64748b;
}

.question-banner {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.question-banner--ok {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.question-banner--warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.question-banner--danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.question-inline-warn {
    color: #b45309;
    font-size: 13px;
}

.question-actions-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.ai-support-panel {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fafbfc;
    border: 1px solid #e8ecf1;
    font-size: 12px;
}

.ai-support-panel-heading {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.ai-support-panel-heading-note {
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: #94a3b8;
}

.ai-support-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.ai-support-tab-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ai-support-tab-btn:hover {
    background: #f1f5f9;
}

.ai-support-tab-btn.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.ai-support-tab-panel {
    display: none;
    padding: 4px 0 8px;
}

.ai-support-tab-panel.is-active {
    display: block;
}

.ai-support-status-line {
    margin: 0 0 8px;
}

.ai-support-status--success {
    color: #166534;
}

.ai-support-status--warn {
    color: #9a3412;
}

.ai-support-status--danger {
    color: #b91c1c;
}

.ai-support-status--info {
    color: #1d4ed8;
}

.ai-support-status--neutral {
    color: #64748b;
}

.ai-support-summary {
    margin: 0 0 8px;
    line-height: 1.45;
    color: #334155;
}

.ai-support-scores {
    margin: 0 0 8px;
    font-size: 12px;
    color: #475569;
}

.ai-support-empty,
.ai-support-reminder {
    margin: 0 0 10px;
    color: #64748b;
}

.ai-support-reminder {
    font-size: 12px;
    font-style: italic;
}

.ai-support-loading {
    margin: 8px 0 12px;
    color: #475569;
}

.ai-support-loading--with-spinner {
    margin: 0 0 12px;
}

.ai-support-loading-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-support-loading-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
}

.progress-spinner--subtle {
    border-color: #cbd5e1;
    border-top-color: #475569;
}

.ai-review-version-status {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.ai-review-version-status--complete {
    color: #166534;
}

.ai-review-version-status--stale {
    color: #b45309;
}

.ai-review-version-note {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.ai-support-error {
    margin: 0 0 10px;
    color: #b91c1c;
}

.ai-support-alert {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.ai-support-alert--warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.ai-support-alert--danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.ai-support-tab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.ai-support-nested-details {
    margin: 10px 0;
    font-size: 12px;
}

.ai-support-nested-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    padding: 4px 0;
}

.ai-support-nested-body {
    padding: 6px 0 4px;
}

.ai-support-key-concerns {
    margin: 0.5rem 0 0.75rem;
}

.ai-support-key-concerns-heading {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
}

.edit-suggestion-reason {
    margin: 0.35rem 0 0.5rem;
    font-size: 0.88rem;
    color: #64748b;
}

.edit-suggestion-reason--warn {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 10px;
}

.ai-support-technical-details {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
}

.ai-support-technical-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
}

.ai-support-technical-body {
    padding: 6px 0;
}

.ai-support-panel .btn--subtle,
.question-suggestions-actions .btn--subtle,
.edit-suggestion-actions .btn--subtle {
    background: #fff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

.question-suggestions-bar {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    font-size: 13px;
}

.question-suggestions-count {
    margin: 0 0 6px;
    font-weight: 600;
    color: #5b21b6;
}

.question-suggestions-warn {
    margin: 0 0 8px;
    font-size: 12px;
    color: #9a3412;
}

.question-suggestions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-review-panel {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.ai-review-panel-body {
    padding: 8px 0 4px;
    font-size: 13px;
}

.ai-review-panel-summaries p {
    margin: 0 0 6px;
    color: #334155;
}

.ai-review-panel-full-details {
    margin-top: 8px;
}

.question-collapsible-section--nested {
    margin-left: 8px;
    border-top: none;
}

.edit-field-suggestion {
    margin: 6px 0 12px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    font-size: 12px;
}

.edit-suggestion-heading {
    margin: 0 0 4px;
    font-size: 12px;
    color: #6b21a8;
}

.edit-suggestion-proposed {
    margin: 0 0 8px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.edit-field-suggestion--kept {
    display: none !important;
}

.question-collapsible-section {
    margin-top: 6px;
    border-top: 1px solid #e2e8f0;
    padding-top: 4px;
    font-size: 13px;
}

.question-collapsible-section summary {
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    padding: 6px 0;
}

.question-collapsible-body {
    padding: 4px 0 10px;
}

.generator-collapsed-muted {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.generator-nested-details {
    margin-top: 8px;
    font-size: 12px;
}

.generator-nested-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
}

.generator-technical-code-list {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 12px;
}

.style-warning-code-raw {
    font-size: 11px;
    color: #64748b;
}

.generator-repair-change-compact {
    margin: 4px 0 0 18px;
    padding: 0;
    font-size: 12px;
}

.generator-repair-reason {
    color: #64748b;
    font-size: 11px;
}

#edit-panel-body textarea {
    min-height: 72px;
    resize: vertical;
}

.edit-panel-note {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.edit-panel-note--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.edit-panel-note--warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.edit-panel-note--danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.edit-panel-suggestions {
    margin: 0 0 12px;
    padding: 8px;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    background: #faf5ff;
}

.edit-suggestion-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd6fe;
    font-size: 12px;
}

.edit-suggestion-block--kept {
    opacity: 0.55;
}

.edit-suggestion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

/* ===== Generator pages — shared visual polish (SBA + Variant) ===== */

.page-sba-generator .container,


.page-variant .container {
    margin-top: 20px;
    margin-bottom: 32px;
}

.page-sba-generator .page-hero,


.page-variant .page-hero {
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-sba-generator .page-hero h1,


.page-variant .page-hero h1 {
    margin-bottom: 8px;
    font-size: 1.45rem;
}

.page-sba-generator .page-intro,
.page-variant .page-intro {
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 0;
    box-sizing: border-box;
}

.page-sba-generator .page-intro {
    max-width: min(100%, 72ch);
    width: fit-content;
}

.page-variant .page-intro {
    max-width: min(100%, 118ch);
    width: fit-content;
}

.page-sba-generator .top-actions,


.page-variant .top-actions {
    margin-top: 12px;
    gap: 8px;
}

.page-sba-generator .generator-layout,


.page-variant .generator-layout {
    grid-template-columns: minmax(240px, 268px) minmax(0, 1fr);
    gap: 16px;
}

.page-sba-generator .generator-col-sidebar,


.page-variant .generator-col-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.page-sba-generator .generator-col-main,


.page-variant .generator-col-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-sba-generator .card--ai-review,


.page-variant .card--ai-review {
    padding: 12px 14px 14px;
    margin-bottom: 0;
    background: #fafbfc;
    border-top-width: 1px;
    border-color: #e2e8f0;
}

.page-sba-generator .generator-panel-heading,


.page-variant .generator-panel-heading {
    margin: 0 0 10px;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-sba-generator .collapsible-header .generator-panel-heading,


.page-variant .collapsible-header .generator-panel-heading {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.page-sba-generator .generator-panel-card,


.page-variant .generator-panel-card {
    padding: 12px 14px;
    margin-bottom: 10px;
}

.page-sba-generator .card--ai-review.generator-panel-card,


.page-variant .card--ai-review.generator-panel-card {
    background: #fafbfc;
    border-top-width: 1px;
}

.page-sba-generator .ai-review-column-note,


.page-variant .ai-review-column-note {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
}

.page-sba-generator .ai-review-panel-body,


.page-variant .ai-review-panel-body {
    min-height: 0;
}

.page-sba-generator .ai-review-panel-content,


.page-variant .ai-review-panel-content {
    font-size: 13px;
}

.page-sba-generator .ai-review-empty,


.page-variant .ai-review-empty {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.page-sba-generator .card--question-display,


.page-variant .card--question-display {
    min-height: 0;
}

.page-sba-generator .workspace-empty--compact,


.page-variant .workspace-empty--compact {
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #94a3b8;
}

.page-sba-generator .card--question-display.card--empty-state,
.page-sba-generator .card--ai-review.card--empty-state,
.page-variant #generated-question-panel.card--empty-state,
.page-variant .card--ai-review.card--empty-state {
    padding: 10px 14px 12px;
    margin-bottom: 10px;
}

.page-sba-generator .card--question-display.card--empty-state #question-navigation,
.page-sba-generator .card--question-display.card--empty-state #review-tools-row,

.page-variant #generated-question-panel.card--empty-state #question-navigation,
.page-variant #generated-question-panel.card--empty-state #review-tools-row {
    display: none !important;
}

.page-sba-generator .card--ai-review.card--empty-state .generator-panel-heading,


.page-variant .card--ai-review.card--empty-state .generator-panel-heading {
    margin-bottom: 8px;
}

.page-sba-generator .card--ai-review.card--empty-state .ai-review-column-note,


.page-variant .card--ai-review.card--empty-state .ai-review-column-note {
    display: none;
}

.page-sba-generator .question-list-controls .filter-chip:disabled,


.page-variant .question-list-controls .filter-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-sba-generator .card--question-list .jump-select,


.page-variant .card--question-list .jump-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    padding: 6px 10px;
    min-height: 34px;
}

.page-sba-generator .card--question-display .question-card-compact,


.page-variant .card--question-display .question-card-compact,
.page-variant .variant-question-display .question-card-compact {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.page-sba-generator .card,


.page-variant .card {
    padding: 16px 18px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-top-width: 3px;
    box-shadow: none;
}

.page-sba-generator .left-panel-card--compact,


.page-variant .left-panel-card--compact {
    border-top-width: 1px;
    background: #fafbfc;
}

.page-sba-generator .left-panel-card--compact .generator-panel-heading,


.page-variant .left-panel-card--compact .generator-panel-heading {
    margin-bottom: 8px;
}

.page-sba-generator .sidebar-compact-line,
.page-variant .sidebar-compact-line {
    margin-bottom: 6px;
    font-size: 12px;
}

.page-sba-generator #open-export-modal-btn,
.page-variant #open-export-modal-btn {
    margin-top: 6px;
}

.page-sba-generator .sidebar-details,


.page-variant .sidebar-details {
    margin-top: 2px;
}

.page-sba-generator .sidebar-details-summary,


.page-variant .sidebar-details-summary {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.page-sba-generator .sidebar-details-body,


.page-variant .sidebar-details-body {
    margin-top: 6px;
    padding-top: 6px;
}

.page-sba-generator .gen-generation-status,


.page-variant .gen-generation-status {
    margin-bottom: 6px;
}

.page-sba-generator .card--questions.card--question-display,


.page-variant .card--questions.card--question-display {
    background: #ffffff;
}

.page-sba-generator .card--question-display .generator-panel-heading,


.page-variant .card--question-display .generator-panel-heading {
    margin-bottom: 8px;
}

.page-sba-generator .card--question-display.card--empty-state .generator-panel-heading,


.page-variant .card--question-display.card--empty-state .generator-panel-heading {
    margin-bottom: 6px;
}

.page-sba-generator .filter-chip-row,


.page-variant .filter-chip-row {
    gap: 5px;
    margin-bottom: 8px;
}

.page-sba-generator .filter-chip,


.page-variant .filter-chip {
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 600;
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.page-sba-generator .filter-chip:hover,


.page-variant .filter-chip:hover {
    background: #f1f5f9;
    color: #475569;
}

.page-sba-generator .filter-chip.active-filter,


.page-variant .filter-chip.active-filter {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.page-sba-generator .jump-container,


.page-variant .jump-container {
    margin-top: 4px;
}

.page-sba-generator .jump-select,


.page-variant .jump-select {
    margin-bottom: 0;
    padding: 6px 10px;
    min-height: 34px;
    font-size: 12px;
}

.page-sba-generator .question-nav-row,


.page-variant .question-nav-row {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.page-sba-generator .review-tools,


.page-variant .review-tools {
    margin-bottom: 10px;
}

.page-sba-generator .tutor-draft-notice--compact,


.page-variant .tutor-draft-notice--compact {
    margin-bottom: 12px;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.4;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.page-sba-generator .collapsible-header,


.page-variant .collapsible-header {
    padding-bottom: 8px;
    margin-bottom: 0;
    align-items: center;
}

.page-sba-generator #assessment-card.generator-panel-card,


.page-variant #assessment-card.generator-panel-card {
    padding: 12px 14px 14px;
}

.page-sba-generator #assessment-card .collapsible-header,


.page-variant #assessment-card .collapsible-header {
    padding-bottom: 10px;
    margin-bottom: 0;
}

.page-sba-generator #assessment-card .assessment-setup-body,


.page-variant #assessment-card .assessment-setup-body {
    padding-top: 0;
}

.page-sba-generator #assessment-card .generator-form > label:not(.group-label),


.page-variant #assessment-card .generator-form > label:not(.group-label) {
    display: block;
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.page-sba-generator #assessment-card .generator-form .group-label,


.page-variant #assessment-card .generator-form .group-label {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.page-sba-generator #assessment-card .generator-form input:not([type="checkbox"]),
.page-sba-generator #assessment-card .generator-form select,

.page-variant #assessment-card .generator-form select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 8px 11px;
    min-height: 36px;
    border-radius: 8px;
    border-color: #d1d5db;
    box-shadow: none;
    font-size: 14px;
}

.page-sba-generator #assessment-card .generator-form textarea,


.page-variant #assessment-card .generator-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0;
    padding: 8px 11px;
    min-height: 72px;
    line-height: 1.45;
    border-radius: 8px;
    border-color: #d1d5db;
    font-size: 14px;
}

.page-sba-generator #assessment-card .generator-form .section-heading,


.page-variant #assessment-card .generator-form .section-heading {
    margin: 0 0 10px;
    padding: 14px 0 0;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    color: #475569;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-sba-generator #assessment-card .generator-form .section-heading:first-of-type,
.page-sba-generator #assessment-card .setup-required-notice + .section-heading,

.page-variant #assessment-card .setup-required-notice + .section-heading {
    padding-top: 12px;
    border-top: none;
}

.page-sba-generator #assessment-card .setup-required-notice,


.page-variant #assessment-card .setup-required-notice {
    margin: 4px 0 12px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
}

.page-sba-generator #assessment-card .generator-form .field-group,


.page-variant #assessment-card .generator-form .field-group {
    margin: 0 0 0;
}

.page-sba-generator #assessment-card .generator-form .field-group + label,


.page-variant #assessment-card .generator-form .field-group + label {
    margin-top: 14px;
}

.page-sba-generator #assessment-card .generator-form .panel-tip,


.page-variant #assessment-card .generator-form .panel-tip {
    margin: 0 0 8px;
    padding: 0;
    font-size: 12px;
    line-height: 1.45;
    background: transparent;
    border: none;
    color: #64748b;
}

.page-sba-generator #assessment-card .generator-form .panel-tip--compact,


.page-variant #assessment-card .generator-form .panel-tip--compact {
    margin: 0 0 8px;
    padding: 0;
}

.page-sba-generator #assessment-card .generator-form .checkbox-list,


.page-variant #assessment-card .generator-form .checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin: 0 0 4px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.page-sba-generator #assessment-card .generator-form .checkbox-list label,


.page-variant #assessment-card .generator-form .checkbox-list label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.page-sba-generator #assessment-card .generator-form .skill-question-count,


.page-variant #assessment-card .generator-form .skill-question-count {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.page-sba-generator #assessment-card .generator-form .setup-field-error,


.page-variant #assessment-card .generator-form .setup-field-error {
    margin: 10px 0 0;
}

.page-sba-generator #assessment-card .generator-form .form-actions,


.page-variant #assessment-card .generator-form .form-actions {
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #f1f5f9;
}

.page-sba-generator .generator-form label,
.page-sba-generator .generator-form .group-label,

.page-variant .generator-form .group-label {
    margin-top: 2px;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.page-sba-generator .generator-form input:not([type="checkbox"]),
.page-sba-generator .generator-form select,
.page-sba-generator .generator-form textarea,

.page-variant .generator-form textarea {
    margin-bottom: 10px;
    padding: 8px 11px;
    min-height: 36px;
    border-radius: 8px;
    border-color: #d1d5db;
    box-shadow: none;
    font-size: 14px;
}

.page-sba-generator .generator-form textarea,


.page-variant .generator-form textarea {
    min-height: 88px;
    line-height: 1.45;
}

.page-sba-generator .generator-form textarea[name="tutor_comments"],


.page-variant .generator-form textarea[name="tutor_comments"] {
    min-height: 80px;
}

.page-sba-generator .generator-form .section-heading,


.page-variant .generator-form .section-heading {
    margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.page-sba-generator .generator-form .field-group,


.page-variant .generator-form .field-group {
    margin-bottom: 12px;
}

.page-sba-generator .generator-form .panel-tip,


.page-variant .generator-form .panel-tip {
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 12px;
    background: transparent;
    border: none;
    color: #64748b;
}

.page-sba-generator .generator-form .checkbox-list,


.page-variant .generator-form .checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 8px;
}

.page-sba-generator .generator-form .checkbox-list label,


.page-variant .generator-form .checkbox-list label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.page-sba-generator .generator-form .form-actions,


.page-variant .generator-form .form-actions {
    margin-top: 8px;
    padding-top: 4px;
}

.page-sba-generator .setup-required-notice,


.page-variant .setup-required-notice {
    margin-bottom: 10px;
}

.page-sba-generator .question-card-compact,


.page-variant .question-card-compact {
    padding: 16px 18px 14px;
    border-radius: 10px;
    border-color: #e2e8f0;
}

.page-sba-generator .question-card-content,


.page-variant .question-card-content {
    max-width: 72ch;
    min-width: 0;
}

.page-sba-generator .question-card-header,


.page-variant .question-card-header {
    margin-bottom: 0;
}

.page-sba-generator .question-card-divider,


.page-variant .question-card-divider {
    margin: 0;
    padding: 0;
    border: none;
    border-top: 1px solid #f1f5f9;
    height: 0;
    width: 100%;
}

.page-sba-generator .question-card-divider--top,


.page-variant .question-card-divider--top {
    margin-bottom: 12px;
}

.page-sba-generator .question-card-divider--after-status,


.page-variant .question-card-divider--after-status {
    margin-top: 12px;
    margin-bottom: 14px;
}

.page-sba-generator .question-card-divider--before-actions,


.page-variant .question-card-divider--before-actions {
    margin-top: 12px;
    margin-bottom: 10px;
}

.page-sba-generator .question-card-title,


.page-variant .question-card-title {
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
}

.page-sba-generator .question-card-meta,


.page-variant .question-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 8px;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.45;
    color: #94a3b8;
}

.page-sba-generator .question-meta-item,


.page-variant .question-meta-item {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.page-sba-generator .question-status-bar,


.page-variant .question-status-bar {
    gap: 5px;
    margin-bottom: 0;
}

.page-sba-generator .question-status-chip,


.page-variant .question-status-chip {
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.page-sba-generator .question-status-chip--success,


.page-variant .question-status-chip--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.page-sba-generator .question-status-chip--warn,


.page-variant .question-status-chip--warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.page-sba-generator .question-status-chip--danger,


.page-variant .question-status-chip--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.page-sba-generator .question-status-chip--info,


.page-variant .question-status-chip--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.page-sba-generator .question-read-body,


.page-variant .question-read-body {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.55;
    max-width: 100%;
}

.page-sba-generator .question-read-stem,


.page-variant .question-read-stem {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #0f172a;
}

.page-sba-generator .question-read-leadin,


.page-variant .question-read-leadin {
    margin-bottom: 10px;
    font-size: 14px;
    color: #334155;
}

.page-sba-generator .question-read-options,


.page-variant .question-read-options {
    margin: 0 0 12px 0;
    padding-left: 1.25rem;
    list-style: none;
}

.page-sba-generator .question-read-options li,


.page-variant .question-read-options li {
    margin-bottom: 6px;
    padding-left: 0.15rem;
    line-height: 1.5;
}

.page-sba-generator .question-read-key,
.page-sba-generator .question-read-justification,


.page-variant .question-read-key,
.page-variant .question-read-justification {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.page-sba-generator .question-read-key strong,
.page-sba-generator .question-read-justification strong,


.page-variant .question-read-key strong,
.page-variant .question-read-justification strong {
    color: #334155;
}

.page-sba-generator .question-actions-primary,


.page-variant .question-actions-primary {
    margin: 0 0 10px;
    padding-top: 0;
    gap: 6px;
    border-top: none;
    width: 100%;
    max-width: 100%;
}

.page-sba-generator .card--ai-review .ai-support-tab-actions,


.page-variant .card--ai-review .ai-support-tab-actions {
    flex-wrap: wrap;
}

.page-sba-generator .ai-support-panel,


.page-variant .ai-support-panel {
    margin-top: 2px;
    padding: 8px 10px 10px;
    background: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 8px;
}

.page-sba-generator .ai-support-panel-heading,


.page-variant .ai-support-panel-heading {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.page-sba-generator .ai-support-tabs,


.page-variant .ai-support-tabs {
    gap: 4px;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: 1px solid #e2e8f0;
}

.page-sba-generator .ai-support-tab-btn,


.page-variant .ai-support-tab-btn {
    padding: 5px 8px;
    margin-bottom: -1px;
    border: none;
    border-radius: 6px 6px 0 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    box-shadow: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    min-height: unset;
}

.page-sba-generator .ai-support-tab-btn:hover,


.page-variant .ai-support-tab-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.page-sba-generator .ai-support-tab-btn.is-active,


.page-variant .ai-support-tab-btn.is-active {
    background: #ffffff;
    border-bottom-color: #94a3b8;
    color: #334155;
}

.page-sba-generator .ai-support-tab-panel,


.page-variant .ai-support-tab-panel {
    padding: 2px 0 4px;
}

.page-sba-generator .ai-support-summary,
.page-sba-generator .ai-support-status-line,


.page-variant .ai-support-summary,
.page-variant .ai-support-status-line {
    font-size: 12px;
    margin-bottom: 6px;
}

.page-sba-generator .ai-support-scores,


.page-variant .ai-support-scores {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.page-sba-generator .ai-support-advisory,


.page-variant .ai-support-advisory {
    margin: 0 0 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    line-height: 1.45;
}

.page-sba-generator .ai-support-tab-actions,


.page-variant .ai-support-tab-actions {
    gap: 6px;
    margin: 8px 0;
}

.page-sba-generator .ai-support-tab-actions .btn,


.page-variant .ai-support-tab-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.page-sba-generator .ai-support-nested-details,
.page-sba-generator .ai-support-technical-details,

.page-variant .ai-support-technical-details {
    margin: 6px 0 0;
    font-size: 12px;
}

.page-sba-generator .ai-support-alert,


.page-variant .ai-support-alert {
    padding: 6px 8px;
    font-size: 12px;
    margin-bottom: 8px;
}

.page-sba-generator .btn-quiet,


.page-variant .btn-quiet {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.page-sba-generator .btn-quiet:hover,


.page-variant .btn-quiet:hover {
    color: #334155 !important;
    text-decoration: none;
    background: #f1f5f9 !important;
    border-radius: 6px;
}

.page-sba-generator .btn--small,


.page-variant .btn--small {
    min-height: 32px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
}

.page-sba-generator .btn-link-style,


.page-variant .btn-link-style {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.page-sba-generator .btn-link-style:hover,


.page-variant .btn-link-style:hover {
    color: #334155;
}

.page-sba-generator #edit-panel-wrapper,


.page-variant #edit-panel-wrapper {
    top: 12px;
    right: 12px;
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    border-radius: 10px;
    box-shadow: -2px 0 16px rgba(15, 23, 42, 0.1);
    border-color: #e2e8f0;
}

.page-sba-generator #edit-panel-header,


.page-variant #edit-panel-header {
    padding: 12px 14px;
}

.page-sba-generator #edit-panel-header h2,


.page-variant #edit-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.page-sba-generator #edit-panel-body,


.page-variant #edit-panel-body {
    padding: 10px 14px 14px;
}

.page-sba-generator #edit-panel-body .edit-field-group,


.page-variant #edit-panel-body .edit-field-group {
    margin-bottom: 12px;
}

.page-sba-generator #edit-panel-body label,


.page-variant #edit-panel-body label {
    margin-bottom: 4px;
    font-size: 12px;
}

.page-sba-generator #edit-panel-body input,
.page-sba-generator #edit-panel-body textarea,
.page-sba-generator #edit-panel-body select,


.page-variant #edit-panel-body input,
.page-variant #edit-panel-body textarea,
.page-variant #edit-panel-body select,
.page-variant #edit-panel input,
.page-variant #edit-panel textarea,
.page-variant #edit-panel select {
    margin-bottom: 0;
    padding: 8px 10px;
    min-height: 34px;
    box-shadow: none;
    border-radius: 8px;
    font-size: 13px;
}

.page-sba-generator #edit-panel-body textarea,


.page-variant #edit-panel-body textarea {
    min-height: 72px;
    max-height: min(28vh, 220px);
}

.page-sba-generator #edit-panel-footer,


.page-variant #edit-panel-footer {
    padding: 10px 14px;
    background: #f8fafc;
}

.page-sba-generator #edit-panel-footer .autosave-status,


.page-variant #edit-panel-footer .autosave-status {
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    background: #f1f5f9;
}

.page-sba-generator .edit-field-suggestion,


.page-variant .edit-field-suggestion {
    margin: 4px 0 8px;
    padding: 6px 8px;
    font-size: 11px;
    background: #faf5ff;
    border-color: #e9d5ff;
}

.page-sba-generator .edit-panel-suggestions,


.page-variant .edit-panel-suggestions {
    margin-bottom: 10px;
    padding: 8px;
}

body.page-sba-generator.edit-panel-open::before,
body.page-variant.edit-panel-open::before {
    background: rgba(15, 23, 42, 0.18);
}

@media (max-width: 640px) {
    .page-sba-generator .generator-form .checkbox-list,

    .page-variant .generator-form .checkbox-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .page-sba-generator .generator-layout,

    .page-variant .generator-layout {
        grid-template-columns: 1fr;
    }

    .page-sba-generator #edit-panel-wrapper,


    .page-variant #edit-panel-wrapper {
        top: 0;
        right: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}


/* Variant-only layout (shared typography: Generator pages block above) */
/* White main-column cards; AI review keeps shared #fafbfc via .card--ai-review */
.page-variant .generator-col-main > .generator-panel-card:not(.card--ai-review) {
    border-top-width: 1px;
    background: #ffffff;
}

.page-variant .generator-col-main > .generator-panel-card.card--ai-review {
    background: #fafbfc;
    border-color: #e2e8f0;
    border-top-width: 1px;
}

.page-variant .variant-instructions-body p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
}

.page-variant .variant-instructions-actions {
    margin-top: 12px;
}

.page-variant .variant-selection-controls {
    margin-bottom: 8px;
}

.page-variant .variant-selection-controls .variant-selection-count {
    margin: 6px 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.page-variant .variant-question-display {
    min-height: 120px;
}

.page-variant .variant-question-display .question-card-compact {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.page-variant #edit-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 14px 14px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.page-variant #edit-panel label {
    margin-bottom: 4px;
    font-size: 12px;
}

.page-variant #edit-panel input,
.page-variant #edit-panel textarea,
.page-variant #edit-panel select {
    margin-bottom: 0;
    padding: 8px 10px;
    min-height: 34px;
    box-shadow: none;
    border-radius: 8px;
    font-size: 13px;
}

.page-variant #edit-panel textarea {
    min-height: 72px;
    max-height: min(28vh, 220px);
}

/* Variant Generator — advisory review (pilot) */

.page-variant .variant-advisory-review {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.page-variant .variant-advisory-review--error {
    border-color: #fcd34d;
    background: #fffbeb;
}

.page-variant .variant-advisory-review-heading {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
}

.page-variant .variant-advisory-review-note {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
}

.page-variant .variant-advisory-review-muted {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.page-variant .variant-advisory-review-error-msg {
    margin: 0;
    font-size: 12px;
    color: #92400e;
}

.page-variant .variant-advisory-review-spinner-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.page-variant .variant-advisory-priority {
    margin: 0 0 8px;
    font-size: 12px;
}

.page-variant .variant-advisory-priority--low {
    color: #15803d;
}

.page-variant .variant-advisory-priority--medium {
    color: #b45309;
}

.page-variant .variant-advisory-priority--high {
    color: #b91c1c;
    font-weight: 600;
}

.page-variant .variant-advisory-summary {
    margin: 0 0 10px;
}

.page-variant .variant-advisory-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #475569;
}

.page-variant .variant-advisory-score strong {
    font-weight: 600;
    color: #334155;
}

.page-variant .variant-advisory-subsection {
    margin-top: 8px;
}

.page-variant .variant-advisory-subheading {
    margin: 0 0 4px;
    font-size: 12px;
}

.page-variant .variant-advisory-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 12px;
    color: #475569;
}

.page-variant .variant-advisory-list li {
    margin-bottom: 4px;
}

.page-variant .variant-advisory-list li:last-child {
    margin-bottom: 0;
}

.page-variant .variant-review-repair-panel {
    margin-top: 14px;
}

.page-variant .variant-review-repair-panel--top {
    margin-top: 0;
    margin-bottom: 12px;
}

.page-variant .variant-draft-label {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.page-variant .variant-draft-label--repaired {
    border-color: #93c5fd;
    background: #f8fafc;
}

.page-variant .variant-draft-label-heading {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
}

.page-variant .variant-draft-label-note {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.page-variant .variant-advisory-review--pre-repair {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    background: #f1f5f9;
}

.page-variant .variant-pre-repair-note {
    margin: 0 0 10px;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
}

.page-variant .variant-repair-banner {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.45;
}

.page-variant .variant-repair-banner--applied {
    border-color: #93c5fd;
    background: #eff6ff;
}

.page-variant .variant-repair-banner--none {
    background: #f8fafc;
}

.page-variant .variant-repair-banner--error {
    border-color: #fcd34d;
    background: #fffbeb;
}

.page-variant .variant-repair-banner--pending {
    background: #f8fafc;
    color: #64748b;
}

.page-variant .variant-repair-banner-title {
    margin: 0 0 6px;
    font-weight: 700;
    color: #1e293b;
}

.page-variant .variant-repair-banner-msg {
    margin: 0 0 6px;
    color: #334155;
}

.page-variant .variant-repair-banner-note {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.page-variant .variant-advisory-review--compact {
    margin-top: 0;
}

.page-variant .variant-change-log {
    margin-top: 6px;
}

/* Variant generation / review pipeline — compact inline status */
.page-variant .variant-pipeline-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
}

.page-variant .variant-pipeline-status__text {
    flex: 1 1 auto;
    min-width: 0;
}

.page-variant .variant-pipeline-status__icon {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 1px;
    align-items: center;
}

.page-variant .variant-pipeline-status__check-icon {
    display: block;
}

.page-variant .variant-pipeline-status--generating {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.page-variant .variant-pipeline-status--repairing {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #6b21a8;
}

.page-variant .variant-pipeline-status--complete {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.page-variant .variant-pipeline-status--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.page-variant .variant-generation-idle-msg {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.page-variant #variant-generation-status .variant-pipeline-status {
    margin-bottom: 0;
}

.page-variant .variant-repair-notice {
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
}

.page-variant .variant-repair-notice--applied {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.page-variant .variant-repair-notice--warning {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.page-variant .variant-repair-notice--loading {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.page-variant .variant-repair-notice--muted {
    color: #94a3b8;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border: none;
}

.page-variant .variant-repair-notice-spinner-wrap {
    display: inline-flex;
    flex-shrink: 0;
}

.page-variant .variant-repair-details {
    margin-top: 14px;
    margin-bottom: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.page-variant .variant-repair-details-summary {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    list-style: none;
}

.page-variant .variant-repair-details-summary::-webkit-details-marker {
    display: none;
}

.page-variant .variant-repair-details-summary::before {
    content: "▸ ";
    color: #64748b;
}

.page-variant .variant-repair-details[open] .variant-repair-details-summary::before {
    content: "▾ ";
}

.page-variant .variant-repair-details-body {
    padding: 0 12px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    border-top: 1px solid #e2e8f0;
}

.page-variant .variant-repair-details-section {
    margin-top: 12px;
}

.page-variant .variant-repair-details-section:first-child {
    margin-top: 10px;
}

.page-variant .variant-repair-details-msg {
    margin: 10px 0 0;
    font-size: 12px;
    color: #475569;
}

.page-variant .variant-repair-details-error-msg {
    margin: 4px 0 0;
    font-size: 12px;
    color: #92400e;
}

.page-variant .variant-advisory-review--pre-repair {
    margin-top: 12px;
    padding: 10px 12px;
    border-top: none;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

/* Variant Generator — post-repair reviewer */

.page-variant .variant-post-repair-panel {
    margin-top: 14px;
    margin-bottom: 4px;
}

.page-variant .variant-post-repair-line {
    margin: 0 0 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}

.page-variant .variant-post-repair-line--loading {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.page-variant .variant-post-repair-line--unavailable {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.page-variant .variant-post-repair-line--good {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.page-variant .variant-post-repair-line--minor {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.page-variant .variant-post-repair-line--major,
.page-variant .variant-post-repair-line--regenerate {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.page-variant .variant-post-repair-advisory-note {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.page-variant .variant-post-repair-details {
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.page-variant .variant-post-repair-details-summary {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    list-style: none;
}

.page-variant .variant-post-repair-details-summary::-webkit-details-marker {
    display: none;
}

.page-variant .variant-post-repair-details-summary::before {
    content: "▸ ";
    color: #64748b;
}

.page-variant .variant-post-repair-details[open] .variant-post-repair-details-summary::before {
    content: "▾ ";
}

.page-variant .variant-post-repair-details-body {
    padding: 0 12px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    border-top: 1px solid #e2e8f0;
}

.page-variant .variant-post-repair-details-note {
    margin: 10px 0 8px;
    font-size: 12px;
    color: #64748b;
}

.page-variant .variant-post-repair-summary {
    margin: 10px 0 8px;
    font-size: 13px;
    color: #1e293b;
}

.page-variant .variant-post-repair-scores {
    margin-bottom: 10px;
}

.page-variant .variant-post-repair-suggestions-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.page-variant .variant-post-repair-suggestion-item {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.page-variant .variant-post-repair-suggestion-item:last-child {
    margin-bottom: 0;
}

.page-variant .variant-post-repair-suggestion-meta {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: capitalize;
    color: #64748b;
}

.page-variant .variant-post-repair-suggestion-current,
.page-variant .variant-post-repair-suggestion-suggested,
.page-variant .variant-post-repair-suggestion-reason {
    margin: 4px 0 0;
    font-size: 12px;
    color: #475569;
}

.page-variant .variant-post-repair-details-error {
    margin: 8px 0 0;
    font-size: 12px;
    color: #92400e;
}

.page-variant .variant-post-repair-actions {
    margin-top: 12px;
}

.page-variant .variant-edit-panel .edit-field-group {
    margin-bottom: 12px;
}

.page-variant .variant-edit-panel .edit-field-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.page-variant .variant-edit-panel .edit-field-suggestion {
    margin-top: 8px;
}

.page-variant .edit-suggestion-priority {
    font-weight: 600;
    color: #64748b;
}

.page-variant .variant-edit-no-field-suggestions {
    margin: 0 0 12px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.page-variant .variant-edit-general-suggestions {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.page-variant .variant-edit-general-heading {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.page-variant .variant-edit-general-suggestion {
    margin-bottom: 8px;
}

.page-variant .variant-edit-general-current,
.page-variant .variant-edit-suggestion-current {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.page-variant .variant-edit-partial-advisory-note {
    margin: 0 0 6px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.45;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
}

.page-variant .variant-edit-style-advisory-note {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.page-variant .variant-edit-general-suggestion--advisory .edit-suggestion-proposed {
    font-style: italic;
}