/* Shared Bootstrap workspace: typography, shell, forms and analytic components. */
:root {
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-color: #243247;
    --bs-body-bg: #f5f7fa;
    --bs-link-color: #0b5ed7;
    --bs-link-hover-color: #084298;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --success: #15803d;
    --danger: #b91c1c;
    --font-body: var(--bs-body-font-family);
    --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
body { min-height: 100vh; display: flex; flex-direction: column; line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
a { text-underline-offset: .15em; }
.main-content { flex: 1; min-width: 0; }
.main-content > .container-fluid, .page-heading > .container-fluid, .section-padding > .container-fluid { max-width: 1320px; margin-inline: auto; }
.skip-link { position: absolute; z-index: 1100; padding: .75rem 1rem; background: white; }
:focus-visible { outline: 3px solid #0b5ed7; outline-offset: 3px; }
.navbar-econom { background: white; border-bottom: 1px solid var(--bs-border-color); }
.navbar-econom .nav-link { font-size: .875rem; border-radius: .25rem; }
.navbar-econom .nav-link.active { color: #084298; background: #eaf2ff; font-weight: 600; }
.brand-text { font-size: 1.1rem; font-weight: 650; color: var(--bs-body-color); }
.brand-icon { color: var(--bs-link-color); }
.footer-econom { background: white; border-top: 1px solid var(--bs-border-color); }
.page-heading { background: white; padding: 1.5rem 0; border-bottom: 1px solid var(--bs-border-color); }
.page-heading h1 { font-size: 1.75rem; }
.page-heading .lead { color: #526174; font-size: 1rem; max-width: 75ch; }
.section-padding { padding-block: 1.5rem; }
.section-header { margin-bottom: 1.5rem; }
.section-header p { color: #526174; }
.lead { font-size: 1.05rem; font-weight: 400; }
.card { --bs-card-bg: white; }
.list-group { --bs-list-group-bg: white; }
.card, .card-econom { border-radius: .375rem; box-shadow: none; }
.card-econom { background: white; border: 1px solid var(--bs-border-color); min-width: 0; }
.card-econom > .card-body { padding: 1rem; }
.card-econom > .card-header { padding: .75rem 1rem; background: #f8fafc; color: var(--bs-body-color); border-bottom: 1px solid var(--bs-border-color); font-size: .9rem; font-weight: 600; }
.card-econom > .card-footer { padding: .75rem 1rem; background: #f8fafc; border-top: 1px solid var(--bs-border-color); }
.form-label { font-size: .875rem; font-weight: 500; }
.form-control:focus, .form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.2); }
.model-category, .badge-category { font-size: .8rem; color: #526174; font-weight: 500; }
.model-title { font-size: 1.05rem; }
.model-author, .model-description, .model-stats { font-size: .875rem; color: #526174; }
.model-stats { display: flex; flex-wrap: wrap; gap: .75rem; }
.model-price { font-weight: 600; }
.badge-status-draft { background: #e2e8f0; color: #334155; }
.badge-status-submitted { background: #0b5ed7; }
.badge-status-under_review { background: #795508; }
.badge-status-published { background: #15803d; }
.badge-status-archived { background: #526174; }
.badge-level-national { background: #1e40af; }
.badge-level-regional { background: #6d28d9; }
.badge-level-provincial { background: #047857; }
.data-table { font-size: .875rem; }
.data-table th { background: #f1f5f9; color: #334155; font-weight: 600; white-space: nowrap; }
.data-table td, .data-table th { padding: .65rem .8rem; vertical-align: middle; }
.data-value, .result-value { font-variant-numeric: tabular-nums; }
.result-card { background: white; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: 1rem; margin-bottom: 1rem; }
.result-label { color: #526174; font-size: .875rem; margin-bottom: .4rem; }
.result-value { font-size: 1.65rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.result-unit { font-size: .875rem; color: #526174; }
.result-card.positive .result-value { color: var(--success); }
.result-card.negative .result-value { color: var(--danger); }
.wizard-steps { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.wizard-step { display: flex; align-items: center; gap: .5rem; color: #526174; font-size: .875rem; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #e2e8f0; }
.wizard-step.active { color: #084298; font-weight: 600; }
.wizard-step.active .step-number { background: #cfe2ff; }
.wizard-step.completed .step-number { background: #d1e7dd; color: #0f5132; }
code, pre, .font-mono { font-family: var(--font-mono); }
pre { white-space: pre; overflow-x: auto; }
.yaml-editor-wrapper { border: 1px solid var(--bs-border-color); border-radius: .375rem; overflow: hidden; }
.yaml-editor-wrapper textarea { font-family: var(--font-mono); font-size: .875rem; line-height: 1.6; background: #f8fafc; color: #243247; border: 0; padding: 1rem; min-height: 500px; resize: vertical; }
.yaml-editor-wrapper textarea:focus { box-shadow: inset 0 0 0 2px #0b5ed7; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }
.workspace-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid #cfe2ff; border-top-color: #0b5ed7; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-page { display: flex; justify-content: center; align-items: flex-start; padding: 2.5rem 1rem; }
.auth-card { width: 100%; max-width: 460px; background: white; border: 1px solid var(--bs-border-color); border-radius: .375rem; }
.auth-header { padding: 1.5rem 1.5rem 0; text-align: center; }
.auth-header h2 { font-size: 1.5rem; }
.auth-body { padding: 1.5rem; }
.auth-card-wide { max-width: 560px; }
.form-narrow { max-width: 600px; }
.font-body { font-family: var(--font-body); }
.text-small { font-size: .85rem; }
.badge-small { font-size: .75rem; }
.series-secondary { color: #64748b; }
.profile-icon { font-size: 4rem; color: #64748b; }
.empty-state-icon { font-size: 2.5rem; color: #64748b; }
.flexible-content { min-width: 0; flex: 1; }
.methodology-content { white-space: pre-wrap; font-size: .9rem; line-height: 1.7; }
.selection-column { width: 40px; }
.field-compact { max-width: 200px; }
.cursor-pointer { cursor: pointer; }
.series-picker-results { max-height: 300px; overflow-y: auto; }
.code-example { background: #f1f5f9; color: #243247; font-size: .85rem; line-height: 1.6; border-radius: .25rem; }
.chart-container { position: relative; height: 400px; }
.chart-container-compact { height: 220px; }
.variable-column { min-width: 180px; }
.value-column { min-width: 120px; }
.preserve-lines { white-space: pre-line; }
.avatar { flex-shrink: 0; font-weight: 600; }
.avatar-profile { width: 80px; height: 80px; font-size: 2rem; }
.avatar-detail { width: 48px; height: 48px; font-size: 1.3rem; }
.avatar-comment { width: 32px; height: 32px; font-size: .8rem; }
.avatar-reply { width: 28px; height: 28px; font-size: .75rem; }
.avatar-feed { width: 40px; height: 40px; font-size: 1.1rem; }
@media (max-width: 767.98px) {
    .navbar-econom .navbar-collapse { padding-block: .75rem; }
    .page-heading h1 { font-size: 1.5rem; }
    .chart-container { height: 300px; }
    .chart-container-compact { height: 220px; }
    .wizard-steps { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
