/* Portfolio detail — THEBOARD Quality Certified tab */

.theboard-section-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.theboard-position-header {
    margin-top: 4px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    min-height: 68px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

#portfolio-container-modern .section-header-modern.theboard-position-header {
    justify-content: space-between;
}

.theboard-header-leading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.theboard-header-icon {
    order: -1;
}

.theboard-source-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: var(--text-secondary, #94a3b8);
    background: rgba(15, 23, 42, 0.35);
    white-space: nowrap;
}

.theboard-source-live {
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

.theboard-source-preview {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
}

.theboard-source-education {
    border-color: rgba(96, 165, 250, 0.45);
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.1);
}

.theboard-source-champion {
    border-color: rgba(167, 139, 250, 0.45);
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
}

.theboard-source-fleet {
    border-color: rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
}

.theboard-source-mixed {
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

.theboard-hero {
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(96, 165, 250, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.theboard-hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.theboard-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ecfdf5;
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.theboard-cert-badge.is-unverified {
    background: linear-gradient(135deg, #475569, #64748b);
    box-shadow: none;
}

.theboard-hero-title {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
}

.theboard-hero-subtitle {
    margin: 0 0 20px;
    color: var(--text-secondary, #94a3b8);
    max-width: 52rem;
    line-height: 1.55;
}

.theboard-hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.theboard-meta-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 4px;
}

.theboard-meta-value {
    font-size: 15px;
    font-weight: 600;
    word-break: break-word;
}

.theboard-card {
    padding: 24px 28px;
}

.theboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.theboard-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.theboard-card-lead {
    margin: 0 0 18px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.55;
}

.theboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.theboard-kpi {
    position: relative;
    padding: 18px 20px;
}

.theboard-kpi .theboard-source-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.theboard-kpi-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 8px;
    padding-right: 56px;
}

.theboard-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.theboard-workflow-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.theboard-workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    line-height: 1.5;
}

.theboard-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.theboard-weight-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.theboard-weight-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr minmax(48px, 64px);
    align-items: center;
    gap: 12px;
}

.theboard-weight-label {
    font-size: 14px;
    font-weight: 500;
}

.theboard-weight-bar-wrap {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.theboard-weight-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #22c55e);
}

.theboard-weight-pct {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.theboard-recipe-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.theboard-recipe-param {
    font-size: 13px;
}

.theboard-recipe-param strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 4px;
}

.theboard-evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.theboard-evidence-metric {
    padding: 14px 16px;
    border-radius: var(--radius-md, 10px);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-evidence-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 6px;
}

.theboard-evidence-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.theboard-chart-wrap {
    margin-top: 8px;
}

.theboard-chart-label {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theboard-equity-chart {
    width: 100%;
    height: auto;
    max-height: 140px;
    border-radius: var(--radius-md, 10px);
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-audit-grid {
    margin: 0;
    display: grid;
    gap: 0;
}

.theboard-audit-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    align-items: start;
}

.theboard-audit-row:last-child {
    border-bottom: none;
}

.theboard-audit-row dt {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
}

.theboard-audit-row dd {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}

.theboard-audit-row code {
    font-size: 12px;
    word-break: break-all;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.theboard-code-wrap {
    display: block;
    max-width: 100%;
}

.theboard-copy-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.theboard-copy-btn:hover {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

.theboard-copy-btn.is-copied {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
}

.theboard-audit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.theboard-education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.theboard-edu-card {
    padding: 18px;
    border-radius: var(--radius-md, 10px);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-edu-card h4 {
    margin: 0 0 10px;
    font-size: 15px;
}

.theboard-edu-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary, #cbd5e1);
}

.theboard-edu-card .theboard-source-badge {
    margin-top: 12px;
}

.theboard-empty {
    text-align: center;
    padding: 32px 24px;
}

.theboard-empty-icon {
    font-size: 2rem;
    color: #93c5fd;
    margin-bottom: 12px;
}

.theboard-empty h3 {
    margin: 0 0 8px;
}

.theboard-empty p {
    margin: 0;
    color: var(--text-secondary, #94a3b8);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.theboard-hash-match-yes {
    color: #86efac;
    font-weight: 600;
}

.theboard-hash-match-no {
    color: #fcd34d;
    font-weight: 600;
}

/* Modals — backtest report & champion config browser */
.theboard-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
}

.theboard-modal-overlay[hidden] {
    display: none !important;
}

.theboard-modal {
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg, 14px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.theboard-modal-wide {
    width: min(920px, 100%);
}

.theboard-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.theboard-modal-header h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
}

.theboard-modal-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary, #94a3b8);
}

.theboard-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.theboard-modal-close:hover {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

.theboard-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.theboard-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.theboard-modal-footer-link {
    margin-right: auto;
    text-decoration: none;
}

.theboard-modal-section {
    padding: 16px 18px;
    border-radius: var(--radius-md, 10px);
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-modal-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.theboard-modal-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.theboard-modal-lead {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary, #cbd5e1);
}

.theboard-report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.theboard-report-kpi {
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.theboard-report-kpi-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 4px;
}

.theboard-report-kpi-value {
    font-size: 1.15rem;
    font-weight: 700;
}

.theboard-evidence-richness {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}

.theboard-evidence-richness-card {
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(34, 197, 94, 0.16);
}

.theboard-evidence-richness-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary, #94a3b8);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.theboard-evidence-richness-card strong {
    display: block;
    color: var(--text-primary, #e2e8f0);
    font-size: 1.15rem;
    line-height: 1.1;
}

.theboard-evidence-richness-card em {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    font-style: normal;
}

.theboard-report-kpi-value.is-positive {
    color: #86efac;
}

.theboard-report-kpi-value.is-negative {
    color: #fca5a5;
}

.theboard-report-table-wrap {
    overflow-x: auto;
}

.theboard-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.theboard-report-table th,
.theboard-report-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-report-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
}

.theboard-report-table td.num {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.theboard-report-chart-wrap {
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
    padding: 12px;
}

.theboard-report-chart-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}

.theboard-report-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
}

.theboard-report-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theboard-report-legend i {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

.theboard-report-legend .legend-champion {
    background: #22c55e;
}

.theboard-report-legend .legend-benchmark {
    background: #64748b;
}

.theboard-config-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.theboard-config-meta-item {
    font-size: 13px;
}

.theboard-config-meta-item strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 4px;
}

.theboard-config-meta-item code {
    font-size: 12px;
    word-break: break-all;
}

.theboard-config-json {
    margin: 0;
    padding: 16px;
    max-height: 360px;
    overflow: auto;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.theboard-hash-match-banner {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.theboard-hash-match-banner.is-match {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.theboard-hash-match-banner.is-mismatch {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

.theboard-risk-buckets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theboard-risk-bucket {
    flex: 1;
    min-width: 100px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.55);
    text-align: center;
}

.theboard-risk-bucket strong {
    display: block;
    font-size: 1.1rem;
}

.theboard-risk-bucket span {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
}

/* Tier 1–3 extended sections */
.theboard-decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.theboard-decision-answer {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theboard-decision-q {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
}

.theboard-decision-constraints-title,
.theboard-rejection-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 10px;
}

.theboard-decision-constraints {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.theboard-decision-constraint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    font-size: 13px;
}

.theboard-since-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.theboard-since-kpi {
    padding: 14px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.45);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theboard-since-chart-wrap {
    margin-top: 8px;
}

.theboard-holding-stories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.theboard-holding-card {
    padding: 16px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-holding-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.theboard-holding-rank {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

.theboard-holding-symbol {
    font-size: 1.1rem;
}

.theboard-holding-weight {
    margin-left: auto;
    font-weight: 600;
}

.theboard-holding-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.theboard-holding-stage {
    font-size: 12px;
    font-weight: 600;
    color: #86efac;
    margin: 0 0 6px;
}

.theboard-holding-rationale {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    color: var(--text-secondary, #cbd5e1);
}

.theboard-funnel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.theboard-funnel-step {
    position: relative;
}

.theboard-funnel-bar {
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.12));
    border: 1px solid rgba(34, 197, 94, 0.25);
    min-width: 12%;
}

.theboard-funnel-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-top: 4px;
    padding: 0 4px;
}

.theboard-rejection-summary {
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-rejection-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
}

.theboard-exposure-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.theboard-exposure-col-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary, #94a3b8);
}

.theboard-exposure-subtitle {
    margin-top: 14px;
}

.theboard-exposure-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.theboard-exposure-bar-wrap {
    height: 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.5);
    overflow: hidden;
}

.theboard-exposure-bar {
    height: 100%;
    background: #22c55e;
    border-radius: 4px;
}

.theboard-stage-chip {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.theboard-regime-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-regime-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.theboard-regime-header h4 {
    margin: 0;
}

.theboard-regime-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.theboard-regime-table th,
.theboard-regime-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.theboard-drift-section {
    margin-bottom: 16px;
}

.theboard-drift-section h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.theboard-drift-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.theboard-drift-table th,
.theboard-drift-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.theboard-drift-table .is-changed {
    color: #fcd34d;
    font-weight: 600;
}

.theboard-drift-params {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}

.theboard-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid rgba(148, 163, 184, 0.2);
}

.theboard-timeline-item {
    position: relative;
    padding: 0 0 20px 20px;
}

.theboard-timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid rgba(15, 23, 42, 0.9);
}

.theboard-timeline-item time {
    font-size: 12px;
    color: #94a3b8;
}

.theboard-timeline-body strong {
    display: block;
    margin: 4px 0;
}

.theboard-timeline-body p {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text-secondary, #cbd5e1);
}

.theboard-manifest-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.theboard-diff-table th,
.theboard-diff-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.theboard-diff-table tr.is-changed {
    background: rgba(251, 191, 36, 0.06);
}

.theboard-diff-changed {
    font-size: 11px;
    font-weight: 600;
    color: #fcd34d;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .theboard-hero,
    .theboard-card {
        padding: 20px 18px;
    }

    .theboard-audit-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .theboard-weight-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .theboard-weight-pct {
        text-align: left;
    }

    .theboard-since-grid,
    .theboard-exposure-columns {
        grid-template-columns: 1fr;
    }

    .theboard-exposure-row {
        grid-template-columns: 1fr;
    }

    .theboard-explain-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        align-self: flex-end;
    }

    .theboard-explain-modal .theboard-modal-header,
    .theboard-explain-modal .theboard-modal-body,
    .theboard-explain-modal .theboard-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .theboard-explain-section p {
        font-size: 1.0625rem;
    }

    .theboard-explain-overlay {
        align-items: flex-end;
        padding: 0;
    }
}

/* Clio explainability — tappable cards + education modal */
.theboard-explain-target {
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
    position: relative;
}

.theboard-explain-target::after {
    content: "ⓘ";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    line-height: 1;
    color: rgba(147, 197, 253, 0.85);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.theboard-kpi.theboard-explain-target::after,
.theboard-holding-card.theboard-explain-target::after {
    top: auto;
    bottom: 10px;
    right: 12px;
}

.theboard-explain-target:hover::after,
.theboard-explain-target:focus-visible::after {
    opacity: 1;
}

.theboard-explain-target:hover,
.theboard-explain-target:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35), 0 8px 24px rgba(15, 23, 42, 0.35);
}

.theboard-evidence-metric.theboard-explain-target:hover,
.theboard-evidence-metric.theboard-explain-target:focus-visible {
    border-color: rgba(96, 165, 250, 0.35);
}

.theboard-audit-row.theboard-explain-target:hover,
.theboard-audit-row.theboard-explain-target:focus-visible {
    background: rgba(96, 165, 250, 0.06);
    border-radius: 8px;
}

.theboard-funnel-step.theboard-explain-target:hover,
.theboard-funnel-step.theboard-explain-target:focus-visible,
.theboard-weight-row.theboard-explain-target:hover,
.theboard-weight-row.theboard-explain-target:focus-visible,
.theboard-regime-table tr.theboard-explain-target:hover,
.theboard-regime-table tr.theboard-explain-target:focus-visible {
    background: rgba(96, 165, 250, 0.06);
}

.theboard-regime-table tr.theboard-explain-target {
    cursor: pointer;
}

.theboard-explain-modal {
    width: min(920px, calc(100vw - 48px));
    max-height: min(92vh, 960px);
}

.theboard-explain-modal .theboard-modal-header {
    padding: 24px 28px;
}

.theboard-explain-modal .theboard-modal-header h3 {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    line-height: 1.25;
}

.theboard-explain-modal .theboard-modal-sub {
    font-size: 1.0625rem;
    line-height: 1.5;
}

.theboard-explain-modal .theboard-modal-close {
    width: 42px;
    height: 42px;
    font-size: 1.125rem;
}

.theboard-explain-modal .theboard-modal-body {
    padding: 24px 28px;
}

.theboard-explain-modal .theboard-modal-footer {
    padding: 18px 28px;
}

.theboard-explain-modal .theboard-modal-footer .theboard-source-badge {
    font-size: 0.8125rem;
    padding: 6px 12px;
}

.theboard-explain-modal .theboard-modal-footer .btn-primary {
    font-size: 1.0625rem;
    padding: 12px 22px;
    min-height: 44px;
}

.theboard-explain-body {
    gap: 20px;
}

.theboard-explain-value-wrap {
    padding: 20px 22px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
}

.theboard-explain-value-label {
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 8px;
}

.theboard-explain-value {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.theboard-explain-section {
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.theboard-explain-section h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #93c5fd;
}

.theboard-explain-section p {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.65;
    color: #e2e8f0;
}

.theboard-explain-section.is-caveat {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.06);
}

.theboard-explain-section.is-caveat h4 {
    color: #fcd34d;
}

.theboard-explain-section + .theboard-explain-section {
    margin-top: 0;
}
