* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 { font-size: 2em; margin-bottom: 10px; }
header p { opacity: 0.9; }

.step {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s;
}
.step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 { color: #1e40af; margin-bottom: 20px; font-size: 1.5em; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-download {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59,130,246,0.4);
}
.btn-secondary { background: #6c757d; color: white; margin-left: 10px; }
.btn-secondary:hover { background: #5a6268; }
.btn-download { background: #28a745; color: white; }
.btn-download:hover { background: #218838; }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-build-index {
    background: #6d28d9; color: white;
    padding: 10px 20px; border: none; border-radius: 6px;
    font-size: 0.9em; cursor: pointer; transition: all 0.3s; font-weight: 500;
    width: 100%; text-align: center;
}
.btn-build-index:hover { background: #5b21b6; }
.btn-build-index:disabled { background: #a78bfa; cursor: not-allowed; }

/* ── Logo ────────────────────────────────────────────────────────────────── */
.logo { height: 60px; margin-bottom: 10px; }

/* ── Step Navigator (top progress bar) ──────────────────────────────────── */
.step-navigator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px 8px;
    gap: 0;
    flex-wrap: wrap;
    background: white;
    border-bottom: 1px solid #e9ecef;
}
.nav-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}
.nav-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.nav-step-label { font-size: 0.72rem; color: #9ca3af; text-align: center; white-space: nowrap; }
.nav-step.active .nav-step-circle { background: #3b82f6; color: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.2); }
.nav-step.active .nav-step-label { color: #1e40af; font-weight: 600; }
.nav-step.completed .nav-step-circle { background: #10b981; color: #fff; }
.nav-step.completed .nav-step-label { color: #059669; }
.nav-step.skipped .nav-step-circle { background: #e5e7eb; color: #d1d5db; }
.nav-step.skipped .nav-step-label { color: #d1d5db; text-decoration: line-through; }
.nav-connector {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    min-width: 20px;
    max-width: 60px;
    margin-bottom: 20px;
}
.nav-step.completed + .nav-connector { background: #10b981; }

/* ── Step 1 — two-panel layout ───────────────────────────────────────────── */
.step1-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 10px;
}
@media (max-width: 768px) { .step1-layout { grid-template-columns: 1fr; } }

.step1-panel {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    min-height: 500px;
}
.step1-panel h2 { color: #1e40af; font-size: 1.3em; margin-bottom: 8px; }
.panel-hint { color: #6c757d; font-size: 0.9em; margin-bottom: 16px; }

/* Step 1 search box */
.step1-search-box { position: relative; margin-bottom: 12px; }
.step1-search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.step1-search-box input:focus { outline: none; border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }
.step1-search-box .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
    pointer-events: none;
}

/* Step 1 result list */
#step1Results { list-style: none; padding: 0; margin: 0; }
.step1-result-item {
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #1e40af;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}
.step1-result-item:hover { background: #dbeafe; border-color: #bfdbfe; }
.step1-result-item.selected { background: #dbeafe; border-color: #3b82f6; font-weight: 600; }
.no-results-item { padding: 16px; color: #6c757d; font-style: italic; list-style: none; }

/* Step 1 inline preview card */
.step1-inline-preview { list-style: none; padding: 0; margin: 0; }
.step1-preview-card {
    margin: 4px 0 8px 16px;
    padding: 14px 18px;
    background: white;
    border: 2px solid #3b82f6;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    animation: fadeIn 0.15s ease;
}
.step1-preview-name { font-weight: 700; font-size: 0.95rem; color: #1e40af; margin-bottom: 4px; }
.step1-preview-meta { font-size: 0.78rem; color: #6c757d; margin-bottom: 10px; }
.step1-preview-actions { display: flex; gap: 8px; align-items: center; }

/* Manual taxonomy tree panel */
.taxonomy-tree {
    background: white;
    border: 1.5px solid #7a9bbf;
    border-radius: 8px;
    padding: 15px;
    max-height: 420px;
    overflow-y: auto;
}

/* ── Taxonomy tree ───────────────────────────────────────────────────────── */
.taxonomy-search { position: relative; margin-bottom: 16px; }
.taxonomy-search input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95em;
    box-sizing: border-box;
}
.taxonomy-search input:focus { outline: none; border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }
.taxonomy-search .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
}
.tree-root { list-style: none; padding: 0; margin: 0; }
.tree-node { margin: 4px 0; }
.tree-node.level-1 { margin-left: 0; }
.tree-node.level-2 { margin-left: 20px; }
.tree-node.level-3 { margin-left: 40px; }
.tree-toggle { cursor: pointer; user-select: none; display: inline-block; width: 20px; font-size: 0.9em; color: #3b82f6; }
.tree-label { cursor: pointer; padding: 4px 8px; border-radius: 4px; display: inline-block; transition: all 0.2s; }
.tree-label:hover { background: #dbeafe; }
.tree-leaf { color: #3b82f6; font-weight: 500; }
.tree-leaf:hover { background: #3b82f6; color: white; }
.tree-empty { color: #6c757d; font-style: italic; }
.tree-children { list-style: none; padding-left: 0; margin: 4px 0; }
.tree-children.collapsed { display: none; }
.template-count {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 6px;
}

/* ── Step 2 — Case Description ───────────────────────────────────────────── */
.selected-template {
    background: #dbeafe;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #1e40af;
    font-weight: 500;
}
textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
    box-sizing: border-box;
}
textarea:focus { outline: none; border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }
.draft-actions { margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Step 3 — Extra Details ──────────────────────────────────────────────── */
.extra-details-container { max-width: 700px; }
.extra-question-cards { display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.extra-question-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.extra-question-label { font-weight: 600; font-size: 0.9rem; color: #1e40af; }
.extra-question-input {
    padding: 9px 12px;
    border: 1.5px solid #7a9bbf;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.extra-question-input:focus { outline: none; border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }
.extra-question-hint { font-size: 0.78rem; color: #6c757d; }

/* ── Step 4 — Generating ─────────────────────────────────────────────────── */
.generating-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 24px;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59,130,246,0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.generating-screen p { color: #374151; font-size: 1.1em; }
.error-message { color: #dc3545; font-size: 1rem; text-align: center; }

/* ── Step 5 — Format & Download ──────────────────────────────────────────── */
.court-format-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #3b82f6;
}
.court-format-section h3 { color: #1e40af; margin-bottom: 10px; font-size: 1.2em; }
.court-format-section p { color: #6b7280; margin-bottom: 20px; font-size: 0.95em; }
.format-selector { margin-bottom: 20px; }
.format-selector label { display: block; font-weight: 600; color: #374151; margin-bottom: 8px; }
.format-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}
.format-dropdown:hover { border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }
.format-dropdown:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.format-info { background: white; padding: 15px; border-radius: 8px; border-left: 4px solid #3b82f6; }
.format-info p { margin: 0; color: #374151; }
.format-info strong { color: #1e40af; }
#formatDetails { color: #6b7280; font-style: italic; }

.custom-format-options {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #3b82f6;
}
.custom-format-options h4 { color: #1e40af; margin-bottom: 15px; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.format-field label { display: block; font-weight: 600; color: #374151; margin-bottom: 5px; font-size: 0.9em; }
.format-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    background: white;
    cursor: pointer;
}
.format-field select:focus { outline: none; border-color: #1e3a5f; box-shadow: 0 0 0 2px rgba(30,58,95,0.15); }

.formatted-preview-section {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    position: relative;
}
.formatted-preview-section h3 { color: #1e40af; margin-bottom: 15px; }

.formatted-preview {
    background: white;
    border-radius: 8px;
    font-family: 'Times New Roman', serif;
    line-height: 1.8;
    max-height: 650px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
}
.formatted-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px dashed rgba(59,130,246,0.3);
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}
.preview-content { display: block; outline: none; }
.preview-content p { margin: 0.2em 0; }
.preview-content p:focus { background: rgba(59,130,246,0.05); outline: 1px dashed rgba(59,130,246,0.4); border-radius: 2px; }
.loading-preview { color: #6c757d; font-style: italic; padding: 30px; text-align: center; }

/* ── Misc shared ─────────────────────────────────────────────────────────── */
.section-hint { color: #6c757d; font-size: 13px; margin-bottom: 12px; }
.hint-text { color: #6c757d; font-style: italic; font-size: 0.85rem; }
.error-banner {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: none;
}
.form-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Embedding status */
.embedding-status { font-size: 12px; padding: 6px 10px; border-radius: 5px; margin-top: 6px; }
.status-ready { background: #d1fae5; color: #065f46; }
.status-missing { background: #fef3c7; color: #92400e; }
.status-building { background: #dbeafe; color: #1e40af; }

/* Divider */
.divider { text-align: center; margin: 30px 0; position: relative; }
.divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #dee2e6; }
.divider span { background: white; padding: 0 20px; position: relative; color: #6c757d; font-weight: 600; }

/* Responsive */
@media (max-width: 968px) {
    .step1-layout { grid-template-columns: 1fr; }
}

/* Template option cards */
#alternativesList { list-style:none; padding:0; margin:0 0 20px; display:flex; flex-direction:column; gap:10px; }
.template-option-card { position:relative; padding:14px 18px 14px 18px; border:2px solid #e5e7eb; border-radius:10px; cursor:pointer; background:white; user-select:none; }
.template-option-card:hover { border-color:#3b82f6; background:#f0f7ff; }
.template-option-card.selected { border-color:#1e40af; background:#eff6ff; box-shadow:0 0 0 3px rgba(59,130,246,0.2); }
.template-option-name { font-weight:600; font-size:0.95rem; color:#1e3a5f; padding-right:80px; }
.template-option-meta { font-size:0.78rem; color:#6b7280; margin-top:3px; }
.template-option-check { display:none; position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:0.78rem; font-weight:700; color:#1e40af; background:#dbeafe; padding:3px 10px; border-radius:20px; }
.template-option-card.selected .template-option-check { display:block; }
.ai-pick-badge { display:inline-block; font-size:0.72rem; font-weight:700; color:#92400e; background:#fef3c7; border:1px solid #f59e0b; padding:2px 8px; border-radius:20px; margin-bottom:5px; }

/* ── Selected template bar (Step 1 bottom) ───────────────────────────────── */
.selected-template-bar {
    display: flex;
    align-items: center;
    background: #eff6ff;
    border: 2px solid #1e40af;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.92rem;
}

/* ── AI template result cards (Step 1) ───────────────────────────────────── */
.template-select-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.template-select-card { position:relative; padding:12px 16px; border:2px solid #e5e7eb; border-radius:8px; cursor:pointer; background:white; user-select:none; transition:border-color 0.15s, background 0.15s; }
.template-select-card:hover { border-color:#3b82f6; background:#f0f7ff; }
.template-select-card.selected { border-color:#1e40af; background:#eff6ff; box-shadow:0 0 0 3px rgba(59,130,246,0.2); }
.template-option-check { display:none; position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:0.75rem; font-weight:700; color:#1e40af; background:#dbeafe; padding:2px 8px; border-radius:20px; }
.template-select-card.selected .template-option-check { display:block; }
.template-option-name { font-weight:600; font-size:0.9rem; color:#1e3a5f; padding-right:80px; }
.template-option-meta { font-size:0.75rem; color:#6b7280; margin-top:2px; }
.ai-pick-badge { display:inline-block; font-size:0.7rem; font-weight:700; color:#92400e; background:#fef3c7; border:1px solid #f59e0b; padding:1px 7px; border-radius:20px; margin-bottom:4px; }

/* Accordion template cards */
.template-accordion-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.template-accordion-card { border:2px solid #e5e7eb; border-radius:10px; overflow:hidden; background:white; transition:border-color 0.15s; }
.template-accordion-card.selected { border-color:#1e40af; }
.template-accordion-header { display:flex; flex-direction:column; padding:14px 16px; cursor:pointer; position:relative; user-select:none; }
.template-accordion-header:hover { background:#f8faff; }
.template-accordion-card.selected .template-accordion-header { background:#eff6ff; }
.accordion-arrow { position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:0.85rem; color:#6b7280; }
.template-accordion-body { padding:16px; border-top:1px solid #e5e7eb; background:#fafafa; }
.accordion-actions { margin-top:14px; }
.accordion-no-questions { color:#059669; font-size:0.88rem; margin-bottom:12px; }

/* Template cards (Step 1) */
.template-accordion-list, #aiTemplateList { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.tcard { border:2px solid #e5e7eb; border-radius:10px; background:white; cursor:pointer; transition:border-color 0.15s; overflow:hidden; }
.tcard:hover { border-color:#3b82f6; background:#f8faff; }
.tcard-selected { border-color:#1e40af; background:#eff6ff; }
.tcard-header { padding:12px 16px; display:flex; flex-direction:column; gap:3px; }
.tcard-badge { font-size:0.7rem; font-weight:700; color:#92400e; background:#fef3c7; border:1px solid #f59e0b; padding:1px 7px; border-radius:20px; align-self:flex-start; margin-bottom:2px; }
.tcard-name { font-weight:600; font-size:0.92rem; color:#1e3a5f; }
.tcard-meta { font-size:0.75rem; color:#6b7280; }
.tcard-action { padding:10px 16px 14px; border-top:1px solid #dbeafe; background:#f0f7ff; }

/* Manual generate bar */
.manual-generate-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eff6ff;
    border: 2px solid #1e40af;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
}
.mgb-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e3a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero description section */
.hero-section {
    max-width: 820px;
    margin: 0 auto 32px;
    text-align: center;
    padding: 32px 20px 0;
}
.hero-title {
    font-size: 1.9em;
    color: #1e40af;
    margin-bottom: 10px;
}
.hero-hint {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 18px;
    line-height: 1.6;
}
.hero-textarea {
    width: 100%;
    min-height: 220px;
    padding: 18px 20px;
    border: 2px solid #c7d7f0;
    border-radius: 12px;
    font-size: 1.05em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.7;
    color: #1e293b;
    background: #fafcff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(30,64,175,0.1);
    background: #fff;
}
.hero-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}
.btn-hero {
    padding: 14px 40px;
    font-size: 1.05em;
    border-radius: 8px;
}

/* AI results section */
.ai-results-section {
    max-width: 820px;
    margin: 0 auto 24px;
    padding: 0 20px;
}

/* OR divider */
.or-divider {
    text-align: center;
    margin: 28px 20px;
    position: relative;
}
.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #e5e7eb;
}
.or-divider span {
    background: white;
    padding: 0 16px;
    position: relative;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Secondary search + browse */
.secondary-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 20px 32px;
}
@media (max-width: 700px) { .secondary-layout { grid-template-columns: 1fr; } }
.secondary-panel h3 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Format & Download page (original style) */
.court-format-section { background:#f8f9fa; padding:25px; border-radius:12px; margin-bottom:25px; border:2px solid #3b82f6; }
.court-format-section h3 { color:#1e40af; margin-bottom:10px; font-size:1.2em; }
.court-format-section p { color:#6b7280; margin-bottom:20px; font-size:0.95em; }
.format-selector { margin-bottom:20px; }
.format-selector label { display:block; font-weight:600; color:#374151; margin-bottom:8px; }
.format-dropdown { width:100%; padding:12px 15px; border:2px solid #d1d5db; border-radius:8px; font-size:1em; background:white; cursor:pointer; transition:all 0.3s; }
.format-dropdown:hover { border-color:#1e3a5f; }
.format-dropdown:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,0.1); }
.format-info { background:white; padding:15px; border-radius:8px; border-left:4px solid #3b82f6; }
.format-info p { margin:0; color:#374151; }
.format-info strong { color:#1e40af; }
#formatDetails { color:#6b7280; font-style:italic; }
.custom-format-options { background:white; padding:20px; border-radius:8px; margin-top:20px; border:2px solid #3b82f6; }
.custom-format-options h4 { color:#1e40af; margin-bottom:15px; }
.format-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:15px; }
.format-field label { display:block; font-weight:600; color:#374151; margin-bottom:5px; font-size:0.9em; }
.format-field select { width:100%; padding:8px 12px; border:1px solid #d1d5db; border-radius:6px; font-size:0.95em; background:white; cursor:pointer; }
.format-field select:focus { outline:none; border-color:#1e3a5f; }
.formatted-preview-section { margin-top:30px; background:#f8f9fa; padding:25px; border-radius:12px; }
.formatted-preview-section h3 { color:#1e40af; margin-bottom:15px; }
.formatted-preview { background:white; border-radius:8px; font-family:'Times New Roman',serif; line-height:1.8; max-height:650px; overflow-y:auto; border:1px solid #dee2e6; box-shadow:0 2px 8px rgba(0,0,0,0.1); margin:0 auto; }

/* High confidence badge */
.tcard-badge-high { background:#d1fae5; color:#065f46; border:1px solid #6ee7b7; }
