.timeframe-stack { display: grid; gap: 14px; padding: 18px; }
.tf-card { border: 1px solid var(--border); border-radius: 16px; background: var(--panel-2); padding: 14px; }
.tf-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tf-title { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.tf-title strong { font-size: 22px; min-width: 3.5ch; }
.tf-title span { font-size: 14px; }
.tf-note { color: var(--muted); font-size: 12px; text-align: right; }
.rail-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) 280px; gap: 14px; align-items: start; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.support-resistance-explainer { border: 1px solid rgba(41, 214, 255, 0.2); border-radius: 16px; background: rgba(6, 16, 24, 0.82); padding: 14px 16px; min-height: 100%; color: var(--muted); }
.support-resistance-explainer strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 10px; }
.support-resistance-explainer ul { display: grid; gap: 10px; margin: 0; padding-left: 18px; }
.support-resistance-explainer li { line-height: 1.55; font-size: 12px; }
.metric { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: rgba(6, 11, 16, 0.95); }
.metric .k { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.metric .v { font-size: 16px; color: var(--white); overflow-wrap: anywhere; }
.factor-bars,
.status-list,
.history-list { display: grid; gap: 12px; padding: 18px; }
.factor-row { display: grid; gap: 6px; }
.factor-subscribe-card { appearance: none; border: 1px solid rgba(41, 214, 255, 0.32); border-radius: 20px; background: rgba(8, 20, 30, 0.82); color: var(--text); cursor: pointer; display: grid; gap: 8px; padding: 18px; text-align: left; transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease; }
.factor-subscribe-card:hover,
.factor-subscribe-card:focus-visible { border-color: rgba(41, 214, 255, 0.68); background: rgba(10, 35, 46, 0.92); transform: translateY(-1px); outline: none; }
.factor-subscribe-card span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.factor-subscribe-card strong { color: var(--accent); font-size: 15px; }
.factor-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; align-items: baseline; }
.factor-head span:last-child { min-width: 6ch; text-align: right; font-variant-numeric: tabular-nums; }
.factor-track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 92, 122, 0.08), #09131b 44%, #09131b 56%, rgba(53, 255, 141, 0.08)); border: 1px solid var(--border); overflow: hidden; }
.factor-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(83, 217, 255, 0.42); }
.factor-bar { position: absolute; top: 1px; bottom: 1px; }
.factor-bar.positive { border-radius: 0 999px 999px 0; }
.factor-bar.negative { border-radius: 999px 0 0 999px; }
.status-item,
.history-item { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: rgba(7, 12, 18, 0.9); }
.status-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.status-item-wide { grid-template-columns: 1fr; }
.status-name { display: flex; flex-direction: column; gap: 4px; }
.status-name strong { font-size: 13px; }
.status-name span { color: var(--muted); font-size: 11px; }
.badge { padding: 4px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--border); }
.badge.ok { color: var(--green); }
.badge.warn,
.badge.degraded,
.badge.stale { color: var(--amber); }
.badge.bad,
.badge.fixed { color: var(--red); }
.history-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; color: var(--muted); font-size: 11px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); }

html[data-theme="light"] .metric,
html[data-theme="light"] .support-resistance-explainer,
html[data-theme="light"] .status-item,
html[data-theme="light"] .tf-card { background: rgba(255, 255, 255, 0.92); color: var(--text); border-color: var(--border); }
html[data-theme="light"] .metric .v,
html[data-theme="light"] .support-resistance-explainer strong { color: var(--text); }
html[data-theme="light"] .factor-subscribe-card { background: rgba(255, 255, 255, 0.94); border-color: rgba(108, 146, 173, 0.24); }
html[data-theme="light"] .factor-subscribe-card:hover,
html[data-theme="light"] .factor-subscribe-card:focus-visible { background: rgba(247, 251, 255, 0.98); border-color: rgba(24, 107, 209, 0.52); }
html[data-theme="light"] .status-item,
html[data-theme="light"] .history-item { background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 252, 0.96)); border-color: rgba(108, 146, 173, 0.24); box-shadow: 0 10px 24px rgba(101, 131, 154, 0.1); }
html[data-theme="light"] .status-name strong,
html[data-theme="light"] .status-name span { color: var(--text); }
html[data-theme="light"] .status-name span { opacity: 0.72; }
html[data-theme="light"] .badge { background: rgba(255, 255, 255, 0.76); border-color: rgba(108, 146, 173, 0.34); }

@media (max-width: 1200px) {
  .rail-wrap { grid-template-columns: 1fr; }
  .support-resistance-explainer { min-height: auto; }
}

@media (max-width: 760px) {
  .price-grid { grid-template-columns: 1fr; }
  .tf-card { padding: 12px; }
  .tf-top { flex-direction: column; }
  .tf-title { justify-content: space-between; width: 100%; }
  .tf-note { text-align: left; }
  .status-item { grid-template-columns: 1fr; justify-items: start; }
}
