body.historical-insight-page{margin:0;background:#f3f4f6;color:#111827;font-family:Pretendard,system-ui,sans-serif}.historical-main{box-sizing:border-box;width:100%;max-width:1540px;margin:0 auto;padding:20px}.historical-hero{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;margin-bottom:16px}.historical-hero h1{margin:0;font-size:26px;letter-spacing:-.03em}.historical-hero p{margin:6px 0 0;color:#6b7280;font-size:13px}.historical-kicker{display:block;margin-bottom:6px;color:#9a6f2c;font-size:10px;font-weight:800;letter-spacing:.12em}.historical-stage{display:grid;grid-template-columns:220px minmax(0,1fr) 220px;min-height:780px;border:1px solid #d1d5db;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 18px rgba(15,23,42,.05)}.historical-case-panel{padding:14px;border-right:1px solid #e5e7eb;background:#f9fafb}.historical-panel-label{margin:0 0 10px;color:#9ca3af;font-size:10px;font-weight:800;letter-spacing:.08em}.historical-case-list{display:grid;gap:5px}.historical-case{padding:9px 10px;border:0;border-radius:8px;background:transparent;color:#6b7280;text-align:left;font-size:12px;font-weight:700}.historical-case.is-active{background:#111827;color:#fff}.historical-case[disabled]{cursor:default;opacity:.7}.historical-workspace{display:grid;grid-template-rows:auto minmax(340px,1fr) auto;min-width:0}.historical-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #f0f2f4}.historical-toolbar strong{font-size:15px}.historical-toolbar-right{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap;justify-content:flex-end}.historical-chart-status{color:#9ca3af;font-size:9px;font-weight:650;white-space:nowrap}.historical-market-tabs{display:flex;gap:6px}.historical-market-tabs button{padding:6px 9px;border:1px solid #d1d5db;border-radius:7px;background:#fff;color:#6b7280;font-size:10px;font-weight:750;cursor:pointer}.historical-market-tabs button:hover{background:#f9fafb;color:#111827}.historical-market-tabs button.is-active{border-color:#111827;background:#111827;color:#fff}.historical-chart-host{position:relative;box-sizing:border-box;width:100%;min-width:0;min-height:510px;height:100%;background:#fff}.historical-chart-host>div{width:100%!important;height:100%!important}html[data-theme="dark"] body.historical-insight-page{background:#090f1a;color:#e7edf5}html[data-theme="dark"] .historical-stage{background:#111c2f;border-color:#334155}html[data-theme="dark"] .historical-case-panel{background:#0f172a;border-color:#334155}html[data-theme="dark"] .historical-indicator-rail{background:#0f172a;border-color:#334155}html[data-theme="dark"] .historical-toolbar{border-color:#263449}html[data-theme="dark"] .historical-chart-host{background:#0b1322}html[data-theme="dark"] .historical-chart-status{color:#8291a5}html[data-theme="dark"] .historical-market-tabs button{border-color:#334155;background:#111c2f;color:#a9b5c5}html[data-theme="dark"] .historical-market-tabs button:hover{background:#17243a;color:#fff}html[data-theme="dark"] .historical-market-tabs button.is-active{border-color:#d1a55d;background:#d1a55d;color:#071b42}@media(max-width:850px){.historical-main{padding:10px}.historical-hero{align-items:flex-start;flex-direction:column}.historical-stage{grid-template-columns:1fr}.historical-case-panel{border-right:0;border-bottom:1px solid #e5e7eb}.historical-case-list{grid-template-columns:repeat(2,minmax(0,1fr))}.historical-toolbar{align-items:flex-start;flex-direction:column}.historical-toolbar-right{width:100%;align-items:flex-start;flex-direction:column}.historical-market-tabs{flex-wrap:wrap}.historical-chart-host{height:645px}}

/* Phase 1: 전체 기간 탐색과 로딩/빈 데이터/오류 표시 */
.historical-insight-page { --historical-chart-line: #071b42; --historical-start-color:#15803d; --historical-peak-color:#b91c1c; --historical-trough-color:#2563eb; --historical-indicator-color:#c026d3; --historical-near-miss-color:#cbd5e1; --historical-near-miss-text:#475569; --historical-quasi-core-color:#5a92bb; --historical-quasi-core-text:#fff; --historical-verified-color:#64748b; --historical-verified-text:#fff; }
html[data-theme="dark"] .historical-insight-page { --historical-chart-line: #d1a55d; --historical-near-miss-color:#64748b; --historical-near-miss-text:#f1f5f9; --historical-quasi-core-color:#639dc7; --historical-quasi-core-text:#fff; --historical-verified-color:#475569; --historical-verified-text:#fff; }
.historical-chart-region { position: relative; min-width: 0; min-height: 510px; }
.historical-crosshair-overlay{position:absolute;inset:0;z-index:8;pointer-events:none}
.historical-crosshair-marker{position:absolute;width:8px;height:8px;border:1.5px solid #fff;border-radius:999px;background:var(--crosshair-marker-color);box-shadow:0 0 0 1px color-mix(in srgb,var(--crosshair-marker-color) 45%,transparent);transform:translate(-50%,-50%)}
.historical-crosshair-values{position:absolute;inset:0;font-size:11px;font-weight:800;line-height:1.2;white-space:nowrap}.historical-crosshair-value{position:absolute;top:6px;padding:3px 6px;border-radius:3px;color:#fff;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.historical-chart-message { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--theme-text-secondary); pointer-events: none; }
.historical-chart-message[hidden], .historical-range-tools button[hidden] { display: none; }
.historical-range-tools { display: flex; gap: 6px; }
.historical-range-tools button { padding: 6px 9px; border: 1px solid var(--theme-border); border-radius: 7px; background: var(--theme-surface-elevated); color: var(--theme-text-secondary); font-size: 10px; cursor: pointer; }
.historical-range-tools button:disabled { opacity: .5; cursor: default; }

/* Historical Case: 관찰 범위와 확정 기준점 */
.historical-workspace { display: flex; flex-direction: column; }
.historical-workspace:has(> .historical-cycle-panel:not([hidden]))::after { content: ''; flex: 0 0 24px; background: var(--theme-surface-elevated); }
.historical-workspace:has(> .historical-cycle-top-indicators:not([hidden]))::after { display: none; }
.historical-chart-region { flex: 1 0 510px; }
.historical-case-loading { padding: 9px 10px; color: var(--theme-text-muted); font-size: 11px; }
.historical-case { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.historical-case small { color: #9ca3af; font-size: 8px; font-weight: 750; white-space: nowrap; }
.historical-cycle-panel { position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; background: linear-gradient(135deg, rgba(37,99,235,.045), transparent 42%), var(--theme-surface-elevated); }
.historical-cycle-panel:has(+ .historical-indicator-detail:not([hidden])) { background: linear-gradient(180deg, rgba(37,99,235,.045), rgba(37,99,235,.025)), var(--theme-surface-elevated); }
.historical-cycle-panel::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--cycle-accent-panel, linear-gradient(180deg, #dc2626 0 34%, #16a34a 34% 67%, #2563eb 67%)); content: ''; }
.historical-cycle-panel:has(+ .historical-indicator-detail:not([hidden]))::before { background: var(--cycle-accent-panel, linear-gradient(180deg, #dc2626 0 75%, #16a34a 75%)); }
.historical-cycle-panel[hidden] { display: none; }
.historical-cycle-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 24px 10px; box-sizing: border-box; }
.historical-cycle-heading { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.historical-cycle-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.historical-cycle-heading small { padding: 5px 8px; border-radius: 999px; background: #e8f0ff; color: #1d4ed8; font-size: 10px; font-weight: 850; letter-spacing: .07em; }
.historical-cycle-heading strong { font-size: 20px; letter-spacing: -.025em; }
.historical-cycle-market { padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 6px; color: #475569; font-size: 11px; font-weight: 800; }
.historical-cycle-heading > span, #historical-search-range { color: var(--theme-text-secondary); font-size: 11px; font-weight: 650; }
.historical-cycle-description { max-width: 980px; margin: 8px 0 14px; color: var(--theme-text-primary); font-size: 13px; font-weight: 550; line-height: 1.65; }
.historical-cycle-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.historical-cycle-points article { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 12px; row-gap: 7px; padding: 11px 14px; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface); box-shadow: 0 3px 10px rgba(15,23,42,.04); }
.historical-cycle-points article::before { position: absolute; inset: 0 0 auto; height: 3px; content: ''; }
.historical-cycle-points article[data-cycle-point="start"]::before { background: #16a34a; }
.historical-cycle-points article[data-cycle-point="peak"]::before { background: #dc2626; }
.historical-cycle-points article[data-cycle-point="trough"]::before { background: #2563eb; }
.historical-cycle-points small { grid-column: 1 / -1; display: block; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.historical-cycle-points article[data-cycle-point="start"] small { color: #15803d; }
.historical-cycle-points article[data-cycle-point="peak"] small { color: #b91c1c; }
.historical-cycle-points article[data-cycle-point="trough"] small { color: #2563eb; }
.historical-cycle-points strong { display: block; font-size: 17px; line-height: 1.15; letter-spacing: -.015em; }
.historical-cycle-points span { display: block; color: var(--theme-text-secondary); font-size: 15px; font-weight: 750; }
.historical-cycle-top-indicators { padding: 30px 24px; background: var(--theme-surface-elevated); box-sizing: border-box; }
.historical-cycle-top-indicators[hidden] { display: none; }
.historical-cycle-top-strip { display: flex; align-items: center; gap: 16px; min-height: 38px; padding: 6px 16px; overflow-x: auto; border: 1px solid rgba(90,146,187,.28); border-radius: 7px; background: rgba(90,146,187,.08); color: #0f172a; white-space: nowrap; box-sizing: border-box; box-shadow: inset 0 1px 2px rgba(15,23,42,.03), 0 2px 6px rgba(15,23,42,.04); }
.historical-cycle-top-heading { display: inline-flex; align-items: center; height: 26px; flex: 0 0 auto; padding: 0 10px; border: 1px solid rgba(90,146,187,.25); border-left: 3px solid #fbbf24; border-radius: 4px; background: #ffffff; color: #b45309; font-size: 12px; font-weight: 700; line-height: 1; box-shadow: 0 1px 3px rgba(15,23,42,.05); box-sizing: border-box; }
.historical-cycle-top-indicators ol { display: flex; align-items: center; height: 26px; flex: 1 1 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.historical-cycle-top-indicators li { display: flex; align-items: center; justify-content: space-between; height: 100%; flex: 1 1 0; min-width: 0; gap: 8px; padding: 0 14px; border-left: 1px solid rgba(90,146,187,.25); box-sizing: border-box; line-height: 1; }
.historical-cycle-top-indicators li b { color: #5a92bb; font-size: 12px; font-variant-numeric: tabular-nums; flex: 0 0 auto; font-weight: 700; }
.historical-cycle-top-indicators li:first-child b { color: #d97706; font-weight: 750; }
.historical-cycle-top-indicators li span { overflow: hidden; flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; }
.historical-cycle-top-indicators li strong { color: #256b9a; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.historical-overall-top-indicators { display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box; min-width: 0; width: 100%; margin-top: 14px; flex-shrink: 0; }
.historical-overall-top-indicators[hidden] { display: none; }
.historical-overall-top-card { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; padding: 11px 9px 12px; border: 1.5px solid rgba(90,146,187,.4); border-radius: 10px; background: #111827; color: #f8fafc; box-shadow: 0 4px 16px rgba(15,23,42,.18); }
.historical-overall-top-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid #1e293b; }
.historical-overall-top-badge { display: inline-flex; align-items: center; gap: 6px; color: #fbbf24; font-size: 13px; font-weight: 750; letter-spacing: -.02em; }
.historical-overall-top-badge i { color: #f59e0b; font-size: 12px; }
.historical-overall-top-sub { color: #94a3b8; font-size: 11px; font-weight: 550; }
.historical-overall-top-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.historical-overall-top-list li { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid #243044; border-radius: 7px; background: #172235; font-size: 12px; line-height: 1.35; }
.historical-overall-top-list li b { flex: 0 0 16px; color: #64748b; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.historical-overall-top-list li:first-child { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.14); }
.historical-overall-top-list li:first-child b { color: #fbbf24; font-weight: 750; }
.historical-overall-top-list li:nth-child(2) { border-color: #334155; background: #1e293b; }
.historical-overall-top-list li:nth-child(2) b { color: #94a3b8; font-weight: 700; }
.historical-overall-top-list li:nth-child(3) { border-color: #334155; background: #1e293b; }
.historical-overall-top-list li:nth-child(3) b { color: #fdba74; font-weight: 700; }
.historical-overall-top-list li span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; color: #f8fafc; font-size: 12px; }
.historical-overall-top-list li:first-child span { color: #ffffff; font-weight: 650; }
.historical-overall-top-list li strong { flex: 0 0 auto; color: #94a3b8; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.historical-overall-top-list li:first-child strong { color: #fef08a; font-weight: 700; }
.historical-overall-top-list li:nth-child(2) strong, .historical-overall-top-list li:nth-child(3) strong { color: #cbd5e1; font-weight: 650; }
html[data-theme="dark"] .historical-overall-top-indicators { background: var(--theme-surface-elevated); }
html[data-theme="dark"] .historical-overall-top-card { background: #0b1322; border-color: rgba(99,157,199,.35); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
html[data-theme="dark"] .historical-overall-top-heading { border-bottom-color: #1e293b; }
html[data-theme="dark"] .historical-overall-top-badge { color: #fbbf24; font-weight: 750; }
html[data-theme="dark"] .historical-overall-top-badge i { color: #f59e0b; }
html[data-theme="dark"] .historical-overall-top-list li { background: #0f172a; border-color: #243044; }
html[data-theme="dark"] .historical-overall-top-list li:first-child { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.45); }
html[data-theme="dark"] .historical-overall-top-list li:first-child b { color: #fbbf24; font-weight: 750; }
html[data-theme="dark"] .historical-overall-top-list li:first-child strong { color: #fef08a; font-weight: 700; }
html[data-theme="dark"] .historical-overall-top-list li:nth-child(2) b { color: #94a3b8; font-weight: 700; }
html[data-theme="dark"] .historical-overall-top-list li:nth-child(3) b { color: #fdba74; font-weight: 700; }
html[data-theme="dark"] .historical-overall-top-list li span { color: #f1f5f9; font-weight: 550; }
html[data-theme="dark"] .historical-overall-top-list li:first-child span { color: #ffffff; font-weight: 650; }
html[data-theme="dark"] .historical-overall-top-list li strong { color: #94a3b8; font-weight: 650; }
html[data-theme="dark"] .historical-overall-top-list li:nth-child(2) strong, html[data-theme="dark"] .historical-overall-top-list li:nth-child(3) strong { color: #cbd5e1; font-weight: 650; }
html[data-theme="dark"] .historical-cycle-top-strip { background: rgba(99,157,199,.12); border-color: rgba(99,157,199,.32); color: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
html[data-theme="dark"] .historical-cycle-top-heading { background: #0f172a; border-color: rgba(99,157,199,.3); color: #fbbf24; }
html[data-theme="dark"] .historical-cycle-top-indicators li { border-left-color: rgba(99,157,199,.28); }
html[data-theme="dark"] .historical-cycle-top-indicators li:first-child b { color: #fbbf24; }
html[data-theme="dark"] .historical-cycle-top-indicators li b { color: #7db0d8; }
html[data-theme="dark"] .historical-cycle-top-indicators li span { color: #f1f5f9; }
html[data-theme="dark"] .historical-cycle-top-indicators li strong { color: #93c5fd; }
.historical-cycle-performance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.historical-cycle-performance article { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 16px; row-gap: 7px; min-height: 72px; padding: 11px 18px; overflow: hidden; border: 1px solid var(--theme-border); border-radius: 10px; }
.historical-cycle-performance article::after { position: absolute; right: -17px; bottom: -28px; width: 80px; height: 80px; border-radius: 50%; content: ''; opacity: .14; }
.historical-cycle-performance .is-rise { border-color: rgba(220,38,38,.3); background: rgba(220,38,38,.06); }
.historical-cycle-performance .is-rise::after { background: #dc2626; }
.historical-cycle-performance .is-fall { border-color: rgba(37,99,235,.3); background: rgba(37,99,235,.065); }
.historical-cycle-performance .is-fall::after { background: #2563eb; }
.historical-cycle-performance span { grid-column: 1 / -1; display: block; color: var(--theme-text-secondary); font-size: 11px; font-weight: 800; }
.historical-cycle-performance strong { display: block; font-size: 25px; font-weight: 900; line-height: 1.1; letter-spacing: -.04em; }
.historical-cycle-performance .is-rise strong { color: #dc2626; }
.historical-cycle-performance .is-fall strong { color: #2563eb; }
.historical-cycle-performance small { display: block; color: var(--theme-text-secondary); font-size: 13px; font-weight: 700; }
.historical-cycle-performance b { color: var(--theme-text-primary); font-size: 15px; font-weight: 850; }
.historical-cycle-editor { margin-top: 10px; border-top: 1px solid var(--theme-border); padding-top: 9px; }
.historical-cycle-editor summary { color: var(--theme-text-secondary); font-size: 9px; font-weight: 750; cursor: pointer; }
.historical-cycle-editor form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.historical-cycle-editor label { display: grid; gap: 3px; color: var(--theme-text-muted); font-size: 8px; font-weight: 750; }
.historical-cycle-editor input { padding: 6px 7px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); color: var(--theme-text-primary); font: inherit; }
.historical-cycle-editor button { padding: 7px 10px; border: 0; border-radius: 6px; background: #111827; color: #fff; font-size: 9px; font-weight: 750; cursor: pointer; }
#historical-cycle-save-status { color: var(--theme-text-secondary); font-size: 9px; }
html[data-theme="dark"] .historical-cycle-panel { background: #111c2f; border-color: #334155; }
html[data-theme="dark"] .historical-cycle-panel:has(+ .historical-indicator-detail:not([hidden])) { background: linear-gradient(180deg, rgba(37,99,235,.045), rgba(37,99,235,.025)), #111c2f; }
html[data-theme="dark"] .historical-cycle-points article { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .historical-cycle-heading small { background: #173363; color: #93c5fd; }
html[data-theme="dark"] .historical-cycle-market { border-color: #475569; color: #cbd5e1; }
html[data-theme="dark"] .historical-cycle-performance .is-rise strong { color: #f87171; }
html[data-theme="dark"] .historical-cycle-performance .is-fall strong { color: #60a5fa; }
html[data-theme="dark"] .historical-cycle-editor button { background: #d1a55d; color: #071b42; }
@media(max-width:850px){.historical-case-list{grid-template-columns:repeat(2,minmax(0,1fr))}.historical-cycle-panel{grid-template-columns:1fr;padding:0}.historical-cycle-left{border-right:0}.historical-overall-top-indicators{position:static;width:100%;margin-top:0;border-left:0;border-top:1px solid var(--theme-border)}.historical-indicator-detail{max-width:100%;border-right:0}.historical-cycle-top-indicators{max-width:100%;border-right:0;padding:30px 16px}.historical-cycle-heading{align-items:flex-start;flex-direction:column}.historical-cycle-description{font-size:13px}.historical-cycle-points{grid-template-columns:1fr}.historical-cycle-top-indicators li{flex:1 1 0}.historical-cycle-performance{grid-template-columns:1fr}.historical-cycle-performance article{min-height:72px}}

/* 과거 사례와 현재 국면은 서로 다른 분석 화면으로 운용한다. */
.historical-analysis-tabs { display: inline-flex; gap: 6px; margin-top: 14px; padding: 4px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface-elevated); }
.historical-analysis-tabs button { min-height: 38px; padding: 8px 17px; border: 0; border-radius: 7px; background: transparent; color: var(--theme-text-secondary); font-size: 14px; font-weight: 800; cursor: pointer; }
.historical-analysis-tabs button:hover { color: var(--theme-text-primary); background: var(--theme-surface); }
.historical-analysis-tabs button.is-active { background: #111827; color: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.16); }
.historical-analysis-tabs button:disabled { opacity: .45; cursor: default; }
.historical-current-case { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 8px; background: #111827; color: #fff; }
.historical-current-case>div { display: grid; gap: 3px; min-width: 0; }
.historical-current-case strong { overflow-wrap: anywhere; font-size: 12px; }
.historical-current-case small { color: #d1d5db; font-size: 8px; font-weight: 750; white-space: nowrap; }
.historical-current-case button { flex: 0 0 auto; padding: 4px 6px; border: 1px solid #4b5563; border-radius: 5px; background: transparent; color: #e5e7eb; font-size: 9px; font-weight: 800; cursor: pointer; }
.historical-current-name-form { display: grid; gap: 7px; margin-top: 8px; padding: 9px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface-elevated); }
.historical-current-name-form[hidden] { display: none; }
.historical-current-name-form label,.historical-current-name-form span { color: var(--theme-text-muted); font-size: 9px; font-weight: 750; }
.historical-current-name-form input { box-sizing: border-box; width: 100%; padding: 7px 8px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); color: var(--theme-text-primary); font: inherit; font-size: 11px; }
.historical-current-name-form>div { display: flex; gap: 5px; }
.historical-current-name-form button { padding: 5px 8px; border: 1px solid var(--theme-border); border-radius: 5px; background: var(--theme-surface); color: var(--theme-text-secondary); font-size: 9px; font-weight: 800; cursor: pointer; }
.historical-current-anchors { margin-top: 10px; padding: 10px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface-elevated); }
.historical-current-anchor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.historical-current-anchor-heading strong { color: var(--theme-text-primary); font-size: 12px; }
.historical-current-anchor-heading span { color: #a21caf; font-size: 9px; font-weight: 850; }
.historical-current-anchors dl { display: grid; gap: 5px; margin: 9px 0 0; }
.historical-current-anchors dl div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.historical-current-anchors dt { color: var(--theme-text-muted); font-size: 9px; font-weight: 850; }
.historical-current-anchors dd { margin: 0; color: var(--theme-text-primary); font-size: 11px; font-weight: 800; }
.historical-current-anchor-editor { margin-top: 9px; border-top: 1px solid var(--theme-border); padding-top: 8px; }
.historical-current-anchor-editor summary { color: var(--theme-text-secondary); font-size: 10px; font-weight: 800; cursor: pointer; }
.historical-current-anchor-editor form { display: grid; gap: 6px; margin-top: 8px; }
.historical-current-anchor-editor label { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 6px; color: var(--theme-text-muted); font-size: 9px; font-weight: 800; }
.historical-current-anchor-editor input { min-width: 0; padding: 6px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); color: var(--theme-text-primary); font: inherit; }
.historical-current-anchor-editor button { justify-self: start; padding: 6px 10px; border: 0; border-radius: 6px; background: #111827; color: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
#historical-current-anchor-save-status { color: var(--theme-text-secondary); font-size: 9px; font-weight: 700; }
.historical-chart-with-indicators { display:contents; min-width:0; }
.historical-chart-main { min-width:0; border-bottom:1px solid var(--theme-border); }
.historical-indicator-rail { display:flex; flex-direction:column; min-width:0; width:220px; box-sizing:border-box; padding:14px 10px; border-left:1px solid var(--theme-border); background:var(--theme-surface-elevated); }
.historical-indicator-section { position:relative; min-height:510px; flex-shrink:0; display:flex; flex-direction:column; box-sizing:border-box; }
.historical-indicator-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.historical-indicator-heading strong { color: var(--theme-text-primary); font-size: 13px; font-weight: 850; }
.historical-indicator-heading button { padding: 4px 7px; border: 1px solid var(--theme-border); border-radius: 5px; background: var(--theme-surface); color: var(--theme-text-secondary); font-size: 9px; font-weight: 800; cursor: pointer; }
.historical-indicator-heading button:disabled { opacity: .45; cursor: default; }
.historical-indicator-list { display:grid; align-content:start; gap:4px; margin-top:9px; max-height:510px; flex:1 1 auto; min-height:0; overflow-y:auto; }
.historical-indicator-list label { display: grid; grid-template-columns: 16px minmax(0,1fr) auto; align-items: center; column-gap: 7px; row-gap: 4px; padding: 8px 7px; border-radius: 7px; color: var(--theme-text-secondary); font-size: 11px; font-weight: 700; cursor: pointer; }
.historical-indicator-list label:hover { background: var(--theme-surface); color: var(--theme-text-primary); }
.historical-indicator-list input { width: 14px; height: 14px; margin: 0; accent-color: var(--historical-indicator-color); }
.historical-indicator-list label.has-references input { grid-row: 1 / span 2; }
.historical-indicator-list small { grid-column: 2; color: #2563eb; font-size: 9px; font-weight: 800; line-height: 1.35; }
.historical-indicator-score { justify-self:end; color:var(--theme-text-muted); font-size:10px; font-weight:850; white-space:nowrap; }
.historical-indicator-badges { grid-column:2 / 4; display:flex; flex-wrap:wrap; gap:3px; align-items:center; }
.historical-reference-badge { padding:2px 5px; border-radius:999px; color:#fff; font-size:8px; font-weight:900; }
.historical-reference-badge[data-reference="START"] { background:var(--historical-start-color); }
.historical-reference-badge[data-reference="PEAK"] { background:var(--historical-peak-color); }
.historical-reference-badge[data-reference="TROUGH"] { background:var(--historical-trough-color); }
.historical-reference-badge.is-near-miss { background:var(--historical-quasi-core-color); color:var(--historical-quasi-core-text); }
.historical-indicator-empty,.historical-indicator-note { margin: 0; padding: 9px 7px; color: var(--theme-text-muted); font-size: 11px; line-height: 1.55; }
.historical-indicator-note { border-radius: 7px; background: rgba(192,38,211,.07); color: #a21caf; }
.historical-cycle-signal { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid rgba(22,163,74,.25); background: rgba(22,163,74,.08); }
.historical-cycle-signal[hidden] { display: none; }
.historical-cycle-signal strong { color: #15803d; font-size: 15px; }
.historical-cycle-signal span { color: var(--theme-text-secondary); font-size: 11px; }
.historical-indicator-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 12px; }
.historical-indicator-legend[hidden] { display: none; }
.historical-indicator-legend span { padding: 5px 8px 5px 20px; border: 1px solid var(--indicator-color); border-radius: 999px; background: var(--theme-surface-elevated); color: var(--theme-text-primary); font-size: 10px; font-weight: 750; position: relative; box-shadow: 0 0 0 1px var(--indicator-color); }
.historical-indicator-legend span::before { position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--indicator-color); transform: translateY(-50%); content: ''; }
.historical-indicator-detail { box-sizing: border-box; padding: 18px 24px; border-top: 1px solid var(--theme-border); background: var(--theme-surface-elevated); }
.historical-indicator-detail:has(.historical-indicator-primary) { border-top: 0; }
.historical-indicator-detail[hidden] { display: none; }
.historical-indicator-primary { position: relative; margin: -18px -24px 0; padding: 18px 24px 0; background: linear-gradient(180deg, rgba(37,99,235,.025), transparent), var(--theme-surface-elevated); }
.historical-indicator-primary::before { position: absolute; top: -1px; bottom: 0; left: 0; width: 4px; background: var(--cycle-accent-primary, linear-gradient(180deg, #16a34a 0 42%, #2563eb 42%)); content: ''; }
.historical-indicator-primary.is-empty { padding-bottom: 4px; }
.historical-indicator-primary.is-empty .historical-indicator-result-grid { margin-top: 0; }
.historical-indicator-primary:has(+ .historical-pivot-dark-heading) { margin-bottom: -14px; padding-bottom: 14px; }
.historical-indicator-primary:has(+ .historical-pivot-verified-heading) { margin-bottom: -14px; padding-bottom: 14px; }
.historical-indicator-detail-heading { display: flex; align-items: baseline; gap: 10px; }
.historical-indicator-detail-heading strong { font-size: 18px; }
.historical-indicator-detail-heading span { color: var(--theme-text-muted); font-size: 12px; font-weight:650; }
.historical-indicator-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.historical-indicator-result-grid.is-current { grid-template-columns:minmax(0,1fr); }
.historical-indicator-result-grid.is-current article { max-width:none; }
.historical-indicator-result-grid article { padding: 14px 15px; border-left: 3px solid var(--historical-indicator-color); border-radius: 10px; background: var(--theme-surface); }
.historical-indicator-result-grid article.is-invalidated { border-left-color: #dc2626; }
.historical-indicator-result-grid article.is-invalidated strong { color: #dc2626; }
.historical-indicator-result-grid strong { color: #a21caf; font-size: 14px; line-height:1.35; }
.historical-indicator-result-grid p { margin: 7px 0 0; color: var(--theme-text-primary); font-size: 13px; font-weight: 700; line-height: 1.6; white-space:pre-line; }
.historical-indicator-result-grid article.is-empty { border-left-color:var(--theme-border); }
.historical-indicator-result-grid article.is-empty strong,.historical-indicator-result-grid article.is-empty p { color:var(--theme-text-muted); }
.historical-indicator-result-grid article.is-empty p { font-size:12px; font-weight:600; }
html[data-theme="dark"] .historical-current-case { background: #d1a55d; color: #071b42; }
html[data-theme="dark"] .historical-current-case small { color: #334155; }
html[data-theme="dark"] .historical-analysis-tabs { border-color: #334155; background: #0f172a; }
html[data-theme="dark"] .historical-analysis-tabs button.is-active { background: #d1a55d; color: #071b42; }
html[data-theme="dark"] .historical-indicator-note { background: rgba(217,70,239,.14); color: #f0abfc; }
html[data-theme="dark"] .historical-cycle-signal strong { color: #4ade80; }
@media(max-width:850px){.historical-analysis-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;box-sizing:border-box}.historical-analysis-tabs button{font-size:14px}.historical-indicator-section{margin-top:16px}.historical-indicator-result-grid{grid-template-columns:1fr}.historical-cycle-signal{align-items:flex-start;flex-direction:column}}
@media(max-width:850px){.historical-chart-region{flex-basis:645px}.historical-chart-host{height:645px}.historical-indicator-list{max-height:580px}}


/* Pivot detail readability: reasons live with the confirmed colored pivot cards. */
.historical-pivot-detail-grid article { display:flex; flex-direction:column; gap:8px; border-left:0; border-top:3px solid var(--historical-indicator-color); }
.historical-pivot-detail-grid article.is-empty { border-top-color:var(--theme-border); }
.historical-pivot-detail-grid article > strong { font-size:13px; line-height:1.4; }
.historical-pivot-dark-heading { display:block; margin:14px -24px 0; padding:22px 24px 0; border-top:1px solid var(--theme-border); color:#256b9a; font-size:13px; }
html[data-theme="dark"] .historical-pivot-dark-heading { color:#7db0d8; }
.historical-pivot-dark-desc { margin:4px 0 10px; color:var(--theme-text-secondary); font-size:11px; line-height:1.55; }
.historical-pivot-detail-grid article.is-dark { border-top-color:var(--historical-quasi-core-color); background:var(--theme-surface); }
.historical-pivot-detail-grid article.is-dark > strong,.historical-pivot-detail-grid article.is-dark .historical-pivot-reason b { color:#256b9a; }
html[data-theme="dark"] .historical-pivot-detail-grid article.is-dark > strong,html[data-theme="dark"] .historical-pivot-detail-grid article.is-dark .historical-pivot-reason b { color:#7db0d8; }
.historical-pivot-detail-grid article.is-dark .historical-pivot-reason { border-color:rgba(90,146,187,.22); background:rgba(90,146,187,.05); }
html[data-theme="dark"] .historical-pivot-detail-grid article.is-dark .historical-pivot-reason { border-color:rgba(99,157,199,.25); background:rgba(99,157,199,.08); }
.historical-pivot-verified-heading { display:block; margin:14px -24px 0; padding:22px 24px 0; border-top:1px solid var(--theme-border); color:var(--historical-near-miss-text); font-size:13px; }
.historical-pivot-verified-desc { margin:4px 0 10px; color:var(--theme-text-secondary); font-size:11px; line-height:1.55; }
.historical-pivot-detail-grid article.is-verified { border-top-color:var(--historical-verified-color); background:var(--theme-surface); }
.historical-pivot-detail-grid article.is-verified > strong,.historical-pivot-detail-grid article.is-verified .historical-pivot-reason b { color:var(--historical-near-miss-text); }
.historical-pivot-detail-grid article.is-verified .historical-pivot-reason { border-color:var(--historical-near-miss-color); background:var(--theme-surface-elevated); }
.historical-pivot-reason { margin-top:3px; padding:10px 12px; border:1px solid rgba(192,38,211,.16); border-radius:8px; background:rgba(192,38,211,.045); }
.historical-pivot-reason b { display:block; margin-bottom:4px; color:#a21caf; font-size:10px; font-weight:850; letter-spacing:.04em; }
.historical-pivot-reason p { margin:0; color:var(--theme-text-primary); font-size:12px; line-height:1.6; }
html[data-theme="dark"] .historical-pivot-reason { border-color:rgba(216,180,254,.2); background:rgba(192,38,211,.09); }
html[data-theme="dark"] .historical-pivot-reason b { color:#e879f9; }


.historical-ab-reason-title { display:block; margin-bottom:8px; color:var(--theme-text-secondary); font-size:11px; font-weight:850; letter-spacing:.02em; }


@media(max-width:1050px){
  .historical-stage{grid-template-columns:200px minmax(0,1fr) 200px;}
  .historical-indicator-rail{width:200px;}
}
@media(max-width:850px){
  .historical-stage{grid-template-columns:1fr;}
  .historical-indicator-rail{width:100%;padding:14px 10px;border-left:0;border-top:1px solid var(--theme-border);}
  .historical-indicator-section{height:auto;min-height:0;max-height:none;margin:0;padding:0;border-bottom:0;}
  .historical-indicator-list{max-height:360px;}
}


.historical-case-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.historical-case-list-heading .historical-panel-label{margin:0}
#historical-case-add{width:24px;height:24px;border:1px solid var(--theme-border);border-radius:6px;background:var(--theme-surface);color:var(--theme-text-primary);font-size:17px;line-height:1;font-weight:800;cursor:pointer}
.historical-case-row{position:relative;display:block;min-width:0}
.historical-case-row>.historical-case{width:100%}
.historical-case-expanded{margin:4px 0 8px;padding:10px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface-elevated)}
.historical-case-expanded[hidden]{display:none}
.historical-case-overview{position:relative;margin-bottom:8px;padding:10px 11px 11px;overflow:hidden;border:1px solid var(--theme-border);border-radius:10px;background:linear-gradient(135deg,rgba(71,85,105,.055),transparent 85%),var(--theme-surface)}
.historical-case-overview::before{position:absolute;inset:0 auto 0 0;width:3px;background:#64748b;content:''}
.historical-case-overview>span{display:block;margin-bottom:6px;color:var(--theme-text-secondary);font-size:10px;font-weight:850;letter-spacing:.025em}
.historical-case-expanded .historical-cycle-description{margin:0;color:var(--theme-text-primary);font-size:12px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}
.historical-case-expanded .historical-cycle-performance{grid-template-columns:1fr;gap:6px;margin:0}
.historical-case-expanded .historical-cycle-performance article{grid-template-columns:1fr;gap:3px;min-height:0;padding:8px 9px}
.historical-case-expanded .historical-cycle-performance strong{font-size:18px}
.historical-case-expanded .historical-cycle-performance small,.historical-case-expanded .historical-cycle-performance b{font-size:10px}
.historical-case-row:has(.historical-case-expanded:not([hidden]))>.historical-case-actions{top:17px}
.historical-case-actions{position:absolute;z-index:5;right:7px;top:50%;display:flex;gap:3px;padding:3px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface-elevated);box-shadow:0 5px 16px rgba(15,23,42,.16);opacity:0;visibility:hidden;transform:translateY(-50%) translateX(4px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}
.historical-case-row:hover .historical-case-actions,.historical-case-row:focus-within .historical-case-actions{opacity:1;visibility:visible;transform:translateY(-50%) translateX(0)}
.historical-case-actions button{width:24px;height:24px;border:0;border-radius:5px;background:transparent;color:var(--theme-text-muted);font-size:10px;cursor:pointer}
.historical-case-actions button:hover{background:var(--theme-surface);color:var(--theme-text-primary)}
.historical-case-actions .is-delete:hover{color:#dc2626}
.historical-case-modal[hidden]{display:none}
.historical-case-modal{position:fixed;z-index:90;inset:0;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.58);backdrop-filter:blur(2px)}
.historical-case-modal-card{box-sizing:border-box;width:min(820px,calc(100vw - 28px));max-height:calc(100vh - 36px);overflow:auto;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface-elevated);box-shadow:0 24px 70px rgba(15,23,42,.28)}
.historical-case-modal-head{position:sticky;z-index:2;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--theme-border);background:var(--theme-surface-elevated)}
.historical-case-modal-head>div{display:grid;gap:3px}
.historical-case-modal-head small{color:var(--theme-text-muted);font-size:9px;font-weight:850;letter-spacing:.08em}
.historical-case-modal-head strong{font-size:17px}
.historical-case-modal-head>button{width:30px;height:30px;border:0;border-radius:7px;background:var(--theme-surface);color:var(--theme-text-secondary);font-size:21px;cursor:pointer}
#historical-case-form{display:grid;gap:16px;padding:18px}
.historical-case-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.historical-case-form-grid label,.historical-case-summary-field{display:grid;gap:5px;color:var(--theme-text-secondary);font-size:10px;font-weight:800}
.historical-case-form-grid label.is-wide{grid-column:span 3}
.historical-case-form-grid input,.historical-case-form-grid select,.historical-case-summary-field textarea,.historical-case-cycle-row input{box-sizing:border-box;width:100%;padding:8px 9px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface);color:var(--theme-text-primary);font:inherit}
.historical-case-summary-field textarea{resize:vertical;line-height:1.55}
.historical-case-auto-row{display:flex;align-items:center;gap:10px}
#historical-case-auto-analyze{padding:8px 11px;border:0;border-radius:7px;background:#111827;color:#fff;font-size:10px;font-weight:850;cursor:pointer}
#historical-case-auto-analyze:disabled{opacity:.55;cursor:wait}
#historical-case-auto-status,#historical-case-save-status,#historical-case-delete-status{color:var(--theme-text-secondary);font-size:10px;font-weight:700}
.historical-case-cycle-editor{padding:12px;border:1px solid var(--theme-border);border-radius:10px;background:var(--theme-surface)}
.historical-case-cycle-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:9px}
.historical-case-cycle-head strong{font-size:12px}
.historical-case-cycle-head span{color:var(--theme-text-muted);font-size:9px}
#historical-case-cycle-grid{display:grid;gap:7px}
.historical-case-cycle-row{display:grid;grid-template-columns:minmax(120px,.8fr) repeat(3,minmax(0,1fr));gap:7px;align-items:end}
.historical-case-cycle-row>strong{padding:0 0 9px;color:var(--theme-text-primary);font-size:11px}
.historical-case-cycle-row label{display:grid;gap:3px;color:var(--theme-text-muted);font-size:8px;font-weight:850}
.historical-case-form-actions{display:flex;justify-content:flex-end;gap:7px}
.historical-case-form-actions button,.historical-case-delete-card button{padding:8px 13px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface);color:var(--theme-text-secondary);font-size:10px;font-weight:850;cursor:pointer}
#historical-case-save{border-color:#111827;background:#111827;color:#fff}
.historical-case-delete-card{width:min(420px,calc(100vw - 28px));padding:20px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface-elevated);box-shadow:0 24px 70px rgba(15,23,42,.28)}
.historical-case-delete-card>strong{display:block;font-size:16px}
.historical-case-delete-card>p{margin:8px 0 16px;color:var(--theme-text-secondary);font-size:12px;line-height:1.55}
.historical-case-delete-manual-choice{display:flex;align-items:flex-start;gap:7px;margin:0 0 16px;color:var(--theme-text-secondary);font-size:11px;line-height:1.5;cursor:pointer}
.historical-case-delete-manual-choice input{margin:2px 0 0;flex:none}
.historical-manual-pivot-card{width:min(520px,calc(100vw - 28px))}
#historical-manual-pivot-form{display:grid;gap:11px;padding:18px}
#historical-manual-pivot-form>label{display:grid;gap:5px;color:var(--theme-text-secondary);font-size:11px;font-weight:800}
#historical-manual-pivot-form input[type=date],#historical-manual-pivot-form select,#historical-manual-pivot-form textarea{box-sizing:border-box;width:100%;padding:8px 9px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface);color:var(--theme-text-primary);font:inherit}
#historical-manual-pivot-form .historical-manual-pivot-key,#historical-manual-pivot-form .historical-manual-pivot-verified{display:flex;align-items:center;gap:7px}
.historical-manual-pivot-actions{display:flex;align-items:center;gap:7px}
.historical-manual-pivot-actions>span{flex:1}
.historical-manual-pivot-actions button{padding:8px 12px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface);color:var(--theme-text-primary);font-size:11px;font-weight:800;cursor:pointer}
#historical-manual-pivot-save{border-color:#111827;background:#111827;color:#fff}
#historical-manual-pivot-delete{border-color:#dc2626;color:#dc2626}
#historical-manual-pivot-status{min-height:16px;color:#dc2626;font-size:11px;font-weight:750}
.historical-case-delete-card>div{display:flex;justify-content:flex-end;gap:7px}
#historical-case-delete-confirm{border-color:#dc2626;background:#dc2626;color:#fff}
html[data-theme="dark"] #historical-case-auto-analyze,html[data-theme="dark"] #historical-case-save{background:#d1a55d;color:#071b42}
@media(max-width:700px){.historical-case-form-grid{grid-template-columns:1fr}.historical-case-form-grid label.is-wide{grid-column:auto}.historical-case-cycle-row{grid-template-columns:1fr}.historical-case-cycle-row>strong{padding:0}.historical-case-actions{opacity:1;visibility:visible;transform:translateY(-50%)}}
@media(max-width:700px){.historical-case-list{grid-template-columns:1fr}}

.historical-indicator-score.is-review{color:#7c3aed}
.historical-d-review-section{margin-top:14px;padding-top:12px;border-top:1px solid var(--theme-border)}
.historical-d-review-grid{display:grid;gap:8px;margin-top:8px}
.historical-d-review-grid article{padding:10px 11px;border:1px dashed #a78bfa;border-radius:8px;background:rgba(124,58,237,.05)}
.historical-d-review-grid article>strong{display:block;color:#7c3aed;font-size:11px}
.historical-d-review-grid article>p{margin:5px 0;color:var(--theme-text-secondary);font-size:11px;line-height:1.5}
.historical-d-review-grid article>button{margin-top:7px;padding:5px 9px;border:1px solid #a78bfa;border-radius:6px;background:#fff;color:#6d28d9;font-size:10px;font-weight:800;cursor:pointer}
.historical-pivot-review-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.55)}
.historical-pivot-review-card{width:min(560px,calc(100vw - 40px));padding:16px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface,#fff);box-shadow:0 18px 60px rgba(15,23,42,.28)}
.historical-pivot-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.historical-pivot-review-head strong{font-size:15px}
.historical-pivot-review-head button{border:0;background:transparent;color:var(--theme-text-secondary);font-size:22px;cursor:pointer}
.historical-pivot-review-meta{margin:10px 0 0;color:var(--theme-text-muted);font-size:11px;font-weight:800}
.historical-pivot-review-reason{margin:10px 0 0;padding:11px;border-radius:8px;background:rgba(124,58,237,.06);color:var(--theme-text-secondary);font-size:12px;line-height:1.55}
.historical-pivot-review-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}
.historical-pivot-review-actions button{padding:7px 10px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface);color:var(--theme-text-primary);font-size:11px;font-weight:850;cursor:pointer}
.historical-pivot-review-actions button:hover{border-color:#7c3aed;color:#6d28d9}
.historical-pivot-review-actions button.is-delete{border-color:#fecaca;color:#dc2626}
.historical-pivot-review-status{display:block;min-height:16px;margin-top:8px;color:#dc2626;font-size:10px;font-weight:750}
html[data-theme="dark"] .historical-d-review-grid article>button{background:#111c2f;color:#c4b5fd}

.historical-indicator-heading-actions{display:flex;align-items:center;gap:5px}
#historical-indicator-add{width:24px;height:24px;padding:0;font-size:17px;line-height:1}
.historical-indicator-row{position:relative;display:block}
.historical-indicator-row>label{width:100%;box-sizing:border-box}
.historical-indicator-actions{position:absolute;z-index:5;right:7px;top:50%;display:flex;gap:3px;padding:3px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-surface-elevated);box-shadow:0 5px 16px rgba(15,23,42,.16);opacity:0;visibility:hidden;transform:translateY(-50%) translateX(4px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}
.historical-indicator-row:hover .historical-indicator-actions,.historical-indicator-row:has(:focus-visible) .historical-indicator-actions{opacity:1;visibility:visible;transform:translateY(-50%) translateX(0)}
.historical-indicator-actions button{width:24px;height:24px;border:0;border-radius:5px;background:transparent;color:var(--theme-text-muted);font-size:10px;cursor:pointer}
.historical-indicator-actions button:hover{background:var(--theme-surface);color:#dc2626}
.historical-indicator-hidden-menu{position:absolute;z-index:120;top:34px;right:0;width:min(280px,calc(100vw - 32px));max-height:320px;overflow:auto;padding:7px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface-elevated);box-shadow:0 14px 34px rgba(15,23,42,.22)}
.historical-indicator-hidden-menu button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:7px 8px;border:0;border-radius:6px;background:transparent;color:var(--theme-text-secondary);font-size:10px;font-weight:750;text-align:left;cursor:pointer}
.historical-indicator-hidden-menu button:hover{background:var(--theme-surface-elevated);color:var(--theme-text-primary)}
.historical-indicator-hidden-menu .historical-indicator-empty{padding:5px 4px}

.historical-indicator-hidden-menu[hidden]{display:none}
