﻿/* Standalone Predictions page â€” /stocks/predictions/main-view.php
   Scoped under .sp-page; sibling to the detail page's stocks-companies.css. */

.sp-page { max-width: 1100px; margin: 0 auto; padding: 12px 16px; }

/* â”€â”€ Cards / sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; }   /* tightened vertically 2026-07-19 */
.sp-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.sp-card-head h2 { font-size: 16px; font-weight: 800; color: #1f2937; margin: 0; }
.sp-card-head h2 .bi { color: #b45309; margin-right: 4px; }
.sp-card-sub { font-size: 12.5px; color: #6b7280; }

/* â”€â”€ Draft banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-banner { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9a6a00;
    background: #fff7ed; border: 1px solid #f4d9b0; border-radius: 10px; padding: 7px 12px; margin-bottom: 10px; }
.sp-banner .bi { font-size: 16px; }
.sp-banner-blocked { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.sp-banner-backfill { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }   /* post-mortem / backfill designation */

/* â”€â”€ Weakness chain â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-weak-list { list-style: none; margin: 0; padding: 0; }
.sp-weak { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #f1f5f9; border-left: 3px solid var(--sp-c); padding-left: 12px; }
.sp-weak:last-child { border-bottom: none; }
.sp-weak-sev { flex: 0 0 96px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--sp-c); display: inline-flex; align-items: center; gap: 5px; padding-top: 1px; }
.sp-weak-body { flex: 1 1 auto; }
.sp-weak-msg { font-size: 13.5px; color: #374151; line-height: 1.45; }
.sp-weak-meta { font-size: 11.5px; color: #9ca3af; margin-top: 3px; }
.sp-weak-meta code { font-size: 11px; background: #f3f4f6; color: #6b7280; border-radius: 4px; padding: 1px 5px; }
.sp-weak-because { margin-left: 6px; }

/* â”€â”€ Provenance / version â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-prov-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sp-prov-label { font-size: 13px; color: #374151; font-weight: 600; }
.sp-prov-fp { font-size: 11px; background: #f3f4f6; color: #6b7280; border-radius: 4px; padding: 1px 6px; }
.sp-prov-run { font-size: 11px; color: #9ca3af; }
.sp-table tr.sp-stale td { background: #fffaf0; }
.sp-table tr.sp-stale .sp-num { color: #b45309; font-weight: 700; }
.sp-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 5px; padding: 1px 7px; }
.sp-kind-llm { color: #7c3aed; background: #f5f3ff; border: 1px solid #ddd6fe; }
.sp-kind-deterministic { color: #0369a1; background: #f0f9ff; border: 1px solid #bae6fd; }
.sp-kind-data { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }

/* â”€â”€ Header section â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-header { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.sp-head-id { display: flex; align-items: center; gap: 14px; }
.sp-logo { width: 46px; height: 46px; border-radius: 9px; object-fit: contain; background: #f8fafc; border: 1px solid #eef2f6; }
.sp-ticker-row { display: flex; align-items: baseline; gap: 12px; }
.sp-ticker { font-size: 26px; font-weight: 900; color: #111827; letter-spacing: .01em; }
.sp-back { font-size: 12.5px; color: #b45309; text-decoration: none; }
.sp-back:hover { text-decoration: underline; }
.sp-co { font-size: 14px; color: #374151; font-weight: 600; }
.sp-sector { font-size: 12px; color: #9ca3af; margin-top: 1px; }
.sp-head-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.sp-stat { display: flex; flex-direction: column; gap: 2px; }
.sp-stat-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #9ca3af; }
.sp-stat-v { font-size: 18px; font-weight: 800; color: #1f2937; font-variant-numeric: tabular-nums; }
.sp-dir { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; color: var(--sp-c); }
.sp-ver { font-size: 11px; font-weight: 700; color: #9a6a00; background: #fff7ed; border: 1px solid #f4d9b0; border-radius: 6px; padding: 1px 7px; }

/* â”€â”€ Chart â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-chart-wrap { height: 320px; position: relative; }   /* matches the detail page's Price History plot height */

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-table-wrap { overflow-x: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sp-table thead th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #6b7280; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
.sp-table tbody td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; color: #374151; vertical-align: top; }
.sp-table tbody tr:last-child td { border-bottom: none; }
.sp-table .sp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-table th.sp-num { text-align: right; }
.sp-strong { font-weight: 800; color: #1f2937; }
.sp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.sp-why { font-size: 12.5px; color: #6b7280; max-width: 340px; }
.sp-inert td { color: #b9c0ca; }
.sp-foot { font-size: 12px; color: #9ca3af; margin: 10px 0 0; }

/* key/value tables in the Inputs panel */
.sp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.sp-subhead { font-size: 12.5px; font-weight: 800; color: #374151; margin: 0 0 6px; }
.sp-muted { font-weight: 500; color: #9ca3af; }
.sp-kv td:first-child { color: #6b7280; }

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-empty { text-align: center; padding: 60px 20px; }
.sp-empty .bi { font-size: 40px; color: #d1d5db; }
.sp-empty h1 { font-size: 22px; font-weight: 800; color: #1f2937; margin: 12px 0 6px; }
.sp-empty p { font-size: 14px; color: #6b7280; margin: 0 0 16px; }
.sp-picker { display: inline-flex; gap: 8px; }
.sp-picker input { font-size: 14px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; width: 160px; text-transform: uppercase; }
.sp-picker button { font-size: 14px; font-weight: 600; color: #fff; background: #b45309; border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.sp-picker button:hover { background: #92400e; }

@media (max-width: 720px) {
    .sp-two-col { grid-template-columns: 1fr; gap: 16px; }
    .sp-header { flex-direction: column; align-items: flex-start; }
    .sp-chart-wrap { height: 320px; }
}

/* â”€â”€ v0.2: snapshot picker, single-call banner, not-modeled â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-snapshot-pick { display: flex; flex-direction: column; gap: 2px; }
.sp-snapshot-picker { font-size: 13px; font-weight: 600; color: #1f2937; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 10px; max-width: 240px; cursor: pointer; }
.sp-snapshot-picker:hover { border-color: #b45309; }

.sp-call { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--sp-c) 28%, #fff); background: color-mix(in srgb, var(--sp-c) 6%, #fff); }
.sp-call-badge { flex: 0 0 auto; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--sp-c); border-radius: 999px; padding: 3px 12px; }
.sp-call-text { font-size: 14px; color: #374151; }

.sp-row-endpoint td { background: rgba(37, 99, 235, .05); font-weight: 700; }
.sp-row-current td { background: #fff7ed; }

.sp-notmodeled-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.sp-notmodeled-list li { font-size: 13px; color: #4b5563; line-height: 1.45; }
.sp-notmodeled-list li .bi { color: #b45309; margin-right: 6px; }
.sp-notmodeled .sp-card-sub { color: #9a6a00; }

@media (max-width: 720px) {
    .sp-notmodeled-list { grid-template-columns: 1fr; }
    .sp-call { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* â”€â”€ v0.2: header right column â€” admin chip + Run new Prediction â”€â”€â”€â”€â”€â”€ */
.sp-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sp-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.sp-actions-row { display: flex; align-items: center; gap: 8px; }
.sp-admin-chip { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: 2px 7px; }
.sp-run-form { margin: 0; }
.sp-run-btn { font-size: 13px; font-weight: 700; color: #fff; background: #b45309; border: none; border-radius: 8px; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sp-run-btn:hover { background: #92400e; }
.sp-run-sub { font-size: 11px; color: #9ca3af; }

@media (max-width: 720px) {
    .sp-head-right { align-items: flex-start; }
    .sp-actions { align-items: flex-start; }
}

/* â”€â”€ v0.2: Forecast card â€” prominent "predicted on" date chip â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sp-date-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.sp-date-chip .bi { color: #2563eb; }

/* â”€â”€ v0.4 (2026-07-19): masterbrain trajectory â€” moved here from inline <style>
   blocks in the section partials (this file is THE stylesheet for the
   prediction workspace; sections should not carry their own CSS). â”€â”€ */

/* Forecast card â€” shape chip, thesis/invalidation panel, driver column */
.sp-shape-chip { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; font-size: 11.5px; font-weight: 700; }
.sp-thesis { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; margin: 8px 0 10px; background: #f8fafc; font-size: 13px; line-height: 1.6; }
.sp-thesis-row { display: flex; gap: 12px; }
.sp-thesis-row + .sp-thesis-row { margin-top: 8px; }
.sp-thesis-k { flex: 0 0 auto; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #0f766e; padding-top: 2px; }
.sp-thesis-k-inv { color: #b45309; }
.sp-driver { font-size: 12px; color: #64748b; max-width: 260px; }

/* Forecast table â€” t0 anchor row, two-line headers, verdict rows */
.sp-row-start td { background: #fffbeb; border-bottom: 2px solid #fde68a; font-size: 12.5px; }
.sp-table thead th span { display: block; }
.sp-th-sub { font-size: 10px; font-weight: 500; color: #94a3b8; text-transform: none; letter-spacing: 0; line-height: 1.3; }
.sp-row-verdict td { font-size: 12px; padding: 4px 12px 6px 26px; line-height: 1.6; border-bottom: 1px solid #f1f5f9; }
.sp-verdict-hit td  { background: #f0fdf4; color: #14532d; } .sp-verdict-hit .bi  { color: #16a34a; margin-right: 4px; }
.sp-verdict-miss td { background: #fef2f2; color: #7f1d1d; } .sp-verdict-miss .bi { color: #dc2626; margin-right: 4px; }
.sp-verdict-wait td { background: #f8fafc; color: #64748b; } .sp-verdict-wait .bi { color: #94a3b8; margin-right: 4px; }

/* Chart card â€” range buttons, copied verbatim from the detail page''s Price
   History card (content/stocks/detail/price-history.php keeps its copy inline;
   keep the two in sync). */
.sc-price-range-btns { display: flex; gap: 4px; }
.sc-price-range-btns button { padding: 4px 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--sc-border, #e5e7eb); border-radius: 6px; background: #fff; color: var(--sc-text-light, #6b7280); cursor: pointer; transition: all 0.15s; }
.sc-price-range-btns button:hover { background: #f3f4f6; color: #1f2937; }
.sc-price-range-btns button.active { background: #198754; color: #fff; border-color: #198754; }
