:root {
  --bg: #071018;
  --bg-elevated: #0d1a24;
  --bg-panel: rgba(13, 26, 36, 0.88);
  --bg-hover: #132433;
  --line: rgba(120, 168, 190, 0.16);
  --line-strong: rgba(120, 168, 190, 0.28);
  --text: #e7f2f6;
  --text-muted: #8aa3b2;
  --text-dim: #5f7787;
  --accent: #3ecfad;
  --accent-dim: rgba(62, 207, 173, 0.14);
  --gold: #d4a84b;
  --gold-dim: rgba(212, 168, 75, 0.14);
  --buy: #3ecfad;
  --sell: #e56b6b;
  --warn: #e0a045;
  --blue: #5ba4d9;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(62, 207, 173, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(212, 168, 75, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(91, 164, 217, 0.07), transparent 55%),
    linear-gradient(180deg, #071018 0%, #0a1520 50%, #071018 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(120, 168, 190, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 168, 190, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 24, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--accent) 0%, #1a8f7a 45%, var(--gold) 100%);
  box-shadow: 0 0 24px rgba(62, 207, 173, 0.35);
  position: relative;
  overflow: hidden;
  animation: pulse-glow 4s ease-in-out infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid rgba(7, 16, 24, 0.55);
  border-radius: 5px;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--accent-dim);
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(62, 207, 173, 0.6);
  animation: blink 1.8s ease-out infinite;
}

.asof {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Hero */
.hero {
  padding: 2.75rem 0 1.5rem;
  animation: fade-up 0.7s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 0.85rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-chip {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  transition: border-color 0.25s, transform 0.25s;
}

.stat-chip:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
}

.stat-value.up { color: var(--buy); }
.stat-value.down { color: var(--sell); }
.stat-value.flat { color: var(--gold); }

/* Nav tabs */
.panel-nav {
  position: sticky;
  top: 61px;
  z-index: 90;
  padding: 0.75rem 0;
  background: linear-gradient(180deg, rgba(7, 16, 24, 0.95), rgba(7, 16, 24, 0.75));
  backdrop-filter: blur(10px);
}

.nav-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.nav-btn {
  flex: 0 0 auto;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.nav-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(62, 207, 173, 0.25);
}

/* Panels */
.panels {
  padding: 0.5rem 0 3.5rem;
}

.panel {
  display: none;
  animation: fade-up 0.45s ease both;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-input,
.select-input {
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  min-width: 180px;
}

.search-input:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-wrap.tall {
  height: 280px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.metric-big {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}

.badge.up {
  color: var(--buy);
  background: var(--accent-dim);
  border-color: rgba(62, 207, 173, 0.3);
}

.badge.down {
  color: var(--sell);
  background: rgba(229, 107, 107, 0.12);
  border-color: rgba(229, 107, 107, 0.28);
}

.badge.neutral {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: rgba(212, 168, 75, 0.3);
}

.explain-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.explain-list li {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.explain-list strong {
  display: block;
  color: var(--accent);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

.explain-list span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Fed section */
.fed-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.prob-bars {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.prob-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.prob-item label b {
  color: var(--text);
  font-family: var(--font-mono);
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  width: 0;
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.cut { background: linear-gradient(90deg, #1a8f7a, var(--accent)); }
.bar-fill.hold { background: linear-gradient(90deg, #8a6a2a, var(--gold)); }
.bar-fill.hike { background: linear-gradient(90deg, #a84848, var(--sell)); }

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.indicator-table th,
.indicator-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.indicator-table th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.indicator-table td:first-child {
  color: var(--accent);
  font-weight: 560;
  white-space: nowrap;
}

.indicator-table .val .asof {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-dim);
  font-family: var(--font-sans, inherit);
}

.indicator-table .hist {
  min-width: 7.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.indicator-table .hist-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.indicator-table .spark {
  display: block;
  opacity: 0.9;
}

.indicator-table .hist-text {
  white-space: nowrap;
}

.indicator-table .val {
  font-family: var(--font-mono);
  color: var(--text);
}

/* Hotspots */
.hotspot-list {
  display: grid;
  gap: 0.75rem;
}

.hotspot-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.hotspot-item:hover {
  border-color: var(--line-strong);
  background: var(--bg-hover);
  transform: translateX(3px);
}

.hotspot-tag {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--gold-dim);
  color: var(--gold);
  white-space: nowrap;
}

.hotspot-tag.geo { background: rgba(229, 107, 107, 0.12); color: var(--sell); }
.hotspot-tag.tech { background: var(--accent-dim); color: var(--accent); }
.hotspot-tag.macro { background: rgba(91, 164, 217, 0.14); color: var(--blue); }
.hotspot-tag.energy { background: rgba(224, 160, 69, 0.14); color: var(--warn); }

.hotspot-body h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hotspot-body p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hotspot-meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.impact {
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.impact.pos { color: var(--buy); }
.impact.neg { color: var(--sell); }
.impact.mix { color: var(--gold); }

/* Earnings */
.earnings-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.earnings-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.earnings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.earn-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, transform 0.2s;
}

.earn-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.earn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.earn-ticker {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

.earn-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.earn-name {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.earn-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.earn-metric span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.earn-metric b {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
}

.earn-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Stocks */
.stock-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  font-size: 0.88rem;
}

.stock-table th {
  position: sticky;
  top: 0;
  background: #10202c;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.stock-table th.sortable {
  user-select: none;
}

.stock-table th.sortable .sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  padding: 0.4rem 0.25rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.stock-table th.sortable .sort-btn:hover {
  color: var(--text);
  background: rgba(62, 207, 173, 0.08);
}

.stock-table th.sortable.sorted .sort-btn {
  color: var(--accent);
}

.stock-table th .sort-ind {
  display: inline-block;
  min-width: 0.7em;
  font-size: 0.7rem;
  color: var(--accent);
  line-height: 1;
}

.col-formula {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  vertical-align: middle;
}

.upside-line {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.upside-line .col-formula {
  margin-left: 0;
}

.stock-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.stock-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.stock-table tbody tr:hover,
.stock-table tbody tr.selected {
  background: rgba(62, 207, 173, 0.06);
}

.ticker-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ticker-cell strong {
  font-family: var(--font-mono);
  color: var(--accent);
}

.ticker-cell small {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.mono {
  font-family: var(--font-mono);
}

.levels {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.levels .buy { color: var(--buy); }
.levels .sell { color: var(--sell); }

/* Strategy floating drawer (right) */
.strategy-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.32s;
}

.strategy-drawer.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s;
}

.strategy-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 16, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.strategy-drawer.open .strategy-drawer-backdrop {
  opacity: 1;
}

.strategy-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 94vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--line-strong);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.strategy-drawer.open .strategy-drawer-panel {
  transform: translateX(0);
}

.strategy-drawer-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.strategy-drawer-close:hover {
  background: rgba(229, 107, 107, 0.12);
  border-color: rgba(229, 107, 107, 0.35);
  color: var(--sell);
}

.strategy-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.35rem 1.25rem 1.75rem;
  padding-right: 3.1rem;
}

.strategy-drawer-body .detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.strategy-drawer-body .panel-title {
  font-size: 1.2rem;
  padding-right: 0.5rem;
}

.strategy-grid {
  display: grid;
  gap: 0.75rem;
}

.strategy-card {
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.strategy-card h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.horizon {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  color: var(--text-muted);
  white-space: nowrap;
}

.horizon.short { color: var(--warn); border-color: rgba(224, 160, 69, 0.35); }
.horizon.mid { color: var(--blue); border-color: rgba(91, 164, 217, 0.35); }
.horizon.long { color: var(--accent); border-color: rgba(62, 207, 173, 0.35); }

.strategy-card p {
  color: var(--text-muted);
  font-size: 0.84rem;
}

body.drawer-open {
  overflow: hidden;
}

.level-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.level-box {
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.level-box.buy-box {
  background: var(--accent-dim);
  border-color: rgba(62, 207, 173, 0.3);
}

.level-box.sell-box {
  background: rgba(229, 107, 107, 0.1);
  border-color: rgba(229, 107, 107, 0.28);
}

.level-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.level-box b {
  font-family: var(--font-mono);
  font-size: 1.2rem;
}

/* ---- Factor evaluation UI ---- */
.sort-shortcuts {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip-btn {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip-btn:hover {
  border-color: rgba(91, 164, 217, 0.45);
  color: var(--text);
}

.chip-btn.active {
  border-color: rgba(62, 207, 173, 0.45);
  background: var(--accent-dim);
  color: var(--accent);
}

.bias-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.bias-pill .bias-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--text-dim);
}

.bias-pill.bullish {
  color: var(--buy);
  border-color: rgba(62, 207, 173, 0.35);
  background: rgba(62, 207, 173, 0.08);
}
.bias-pill.bullish .bias-dot { background: var(--buy); }

.bias-pill.bearish {
  color: var(--sell);
  border-color: rgba(229, 107, 107, 0.35);
  background: rgba(229, 107, 107, 0.08);
}
.bias-pill.bearish .bias-dot { background: var(--sell); }

.bias-pill.neutral {
  color: var(--text-muted);
  border-color: rgba(138, 163, 178, 0.3);
  background: rgba(138, 163, 178, 0.06);
}
.bias-pill.neutral .bias-dot { background: var(--text-muted); }

.quality-cell {
  font-weight: 500;
  color: var(--accent);
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.detail-hero .detail-disclaimer {
  margin-top: 0.75rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.45;
}

.horizon-scores {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.horizon-score-card {
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.horizon-score-card.horizon-short {
  border-color: rgba(224, 160, 69, 0.22);
}
.horizon-score-card.horizon-mid {
  border-color: rgba(91, 164, 217, 0.22);
}
.horizon-score-card.horizon-long {
  border-color: rgba(62, 207, 173, 0.22);
}

.horizon-score-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.horizon-score-head h4 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.horizon-summary {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 18rem;
}

.horizon-score-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.score-num {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.quality-inline {
  font-size: 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.score-bar {
  margin-top: 0.7rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.score-bar-fill.bullish {
  background: linear-gradient(90deg, rgba(62, 207, 173, 0.45), var(--buy));
}
.score-bar-fill.bearish {
  background: linear-gradient(90deg, rgba(229, 107, 107, 0.4), var(--sell));
}
.score-bar-fill.neutral {
  background: linear-gradient(90deg, rgba(138, 163, 178, 0.35), var(--blue));
}

.factor-checklist {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.factor-checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
  gap: 0.5rem;
}

.factor-checklist-hint {
  margin-left: 0.35rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0;
}

.factor-checklist-count {
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}

.factor-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.factor-row:hover,
.factor-row:focus-visible {
  border-color: rgba(120, 168, 190, 0.42);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.factor-row.hit {
  border-color: rgba(120, 168, 190, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.factor-row.miss {
  opacity: 0.78;
  border-color: rgba(120, 168, 190, 0.16);
}

.factor-row.miss:hover,
.factor-row.miss:focus-visible,
.factor-row.miss.expanded {
  opacity: 1;
}

.factor-row.hit.pos {
  border-color: rgba(62, 207, 173, 0.28);
}
.factor-row.hit.neg {
  border-color: rgba(229, 107, 107, 0.28);
}

.factor-row.expanded {
  border-color: rgba(120, 168, 190, 0.48);
  background: rgba(255, 255, 255, 0.055);
}

.factor-mark {
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-dim);
}

.factor-row.hit .factor-mark {
  color: var(--accent);
}

.factor-main {
  flex: 1;
  min-width: 0;
}

.factor-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}

.factor-title-row .factor-arrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
}

.factor-row.pos .factor-arrow { color: var(--buy); }
.factor-row.neg .factor-arrow { color: var(--sell); }
.factor-row.neutral .factor-arrow { color: var(--text-muted); }

.factor-title-row .factor-label {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}

.factor-chevron {
  margin-left: auto;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.factor-row.expanded .factor-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.factor-plain {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.factor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.factor-note {
  color: var(--text-muted);
  font-family: var(--font-sans, inherit);
}

.factor-detail {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(120, 168, 190, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.factor-detail[hidden] {
  display: none;
}

.factor-detail-block .factor-detail-label {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.factor-detail-block p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.factor-detail-block p strong {
  color: var(--text);
  font-weight: 560;
}

.factor-detail-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.factor-detail-list li {
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.factor-detail-links .factor-detail-link-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.factor-detail-link-list a {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--accent, #3d8ea5);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.factor-detail-link-list a:hover {
  color: var(--text);
}

.factor-deep {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(120, 168, 190, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.factor-deep-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.factor-deep-toolbar .factor-detail-label {
  margin-bottom: 0;
}

.factor-deep-hist {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  cursor: default;
}

.factor-deep-hist select {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.18rem 0.4rem;
  max-width: 11rem;
}

.factor-deep-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.factor-deep-summary p,
.factor-deep-summary-text {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.factor-deep-cited-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.factor-deep-cited-text {
  display: inline;
}

.factor-deep-how {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.4rem;
  margin-top: 0.12rem;
}

.factor-deep-how-text {
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.factor-deep-reasoning {
  padding: 0.4rem 0.55rem;
  border-left: 2px solid rgba(120, 168, 190, 0.35);
  background: rgba(0, 0, 0, 0.12);
  border-radius: 0 6px 6px 0;
}

.factor-deep-reasoning .factor-detail-label {
  margin-bottom: 0.15rem;
}

.factor-deep-reasoning-text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.factor-deep-cited-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.35rem;
  margin-top: 0.2rem;
}

.factor-deep-cited-sources .factor-deep-cites {
  margin-left: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.factor-deep-cited-label {
  flex: 0 0 auto;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.factor-deep-sources-panel {
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(120, 168, 190, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.factor-deep-sources-panel .factor-detail-label {
  margin-bottom: 0.15rem;
}

.factor-deep-sources-note {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.factor-deep-sources-list .factor-deep-cites {
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
}

.factor-deep-sources-list .factor-deep-cite-sep {
  display: none;
}

.compete-landscape,
.factor-deep-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--text);
  border-bottom: 1px solid rgba(120, 168, 190, 0.35);
  padding-bottom: 0.1rem;
}

.factor-deep-text {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.factor-deep-kv {
  margin: 0.25rem 0 0;
  display: grid;
  gap: 0.28rem;
}

.factor-deep-kv > div {
  display: grid;
  grid-template-columns: minmax(4.5rem, 7rem) 1fr;
  gap: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.factor-deep-kv dt {
  margin: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.factor-deep-kv dd {
  margin: 0;
  color: var(--text-muted);
}

.compete-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 560px) {
  .compete-side-by-side {
    grid-template-columns: 1fr;
  }
}

.factor-deep-list {
  margin: 0.2rem 0 0;
  padding-left: 1.05rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.factor-deep-list li + li {
  margin-top: 0.28rem;
}

.factor-deep-list li .factor-deep-cited-block {
  width: 100%;
}

.factor-deep-cites {
  display: inline;
  margin-left: 0.35rem;
  white-space: normal;
  word-break: break-word;
}

.factor-deep-cite {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--accent, #3d8ea5);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.factor-deep-cite:hover {
  color: var(--text);
}

.factor-deep-cite-sep {
  margin: 0 0.2rem;
  color: var(--text-dim);
  font-size: 0.68rem;
}

.factor-deep-tag .factor-deep-cites {
  font-weight: 400;
}

.factor-deep-empty {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.compete-rivals {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.compete-rival {
  padding: 0.45rem 0 0.15rem;
  border-top: 1px solid rgba(120, 168, 190, 0.12);
}

.compete-rival:first-child {
  border-top: none;
  padding-top: 0;
}

.compete-rival-name {
  font-size: 0.78rem;
  font-weight: 560;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.compete-rival-name .mono {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
}

.compete-rival-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 560px) {
  .compete-rival-grid {
    grid-template-columns: 1fr;
  }
}

.compete-vs {
  margin: 0.4rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.compete-vs strong {
  color: var(--text);
  font-weight: 560;
}

.factor-deep-meta {
  margin: 0;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  line-height: 1.3;
}

.action-pill.buy {
  color: var(--buy);
  border-color: rgba(62, 207, 173, 0.4);
  background: rgba(62, 207, 173, 0.1);
}
.action-pill.sell {
  color: var(--sell);
  border-color: rgba(229, 107, 107, 0.4);
  background: rgba(229, 107, 107, 0.1);
}
.action-pill.hold {
  color: var(--text-muted);
  border-color: rgba(138, 163, 178, 0.35);
  background: rgba(138, 163, 178, 0.08);
}
.action-pill.watch {
  color: var(--warn, #e0a045);
  border-color: rgba(224, 160, 69, 0.4);
  background: rgba(224, 160, 69, 0.1);
}
.action-pill.reduce {
  color: #e0895a;
  border-color: rgba(224, 137, 90, 0.4);
  background: rgba(224, 137, 90, 0.1);
}
.action-pill.miss {
  color: var(--text-dim);
  border-color: rgba(120, 168, 190, 0.15);
  background: transparent;
}
.action-pill.summary {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
}

.horizon-summary + .action-pill.summary {
  display: inline-flex;
}

.horizon-narrative {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(120, 168, 190, 0.15);
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.detail-stack .level-boxes {
  margin: 0;
}

/* ---- Operation overview / levels / events / scenario ---- */
.op-overview {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 168, 190, 0.28);
  background: linear-gradient(145deg, rgba(20, 42, 56, 0.9), rgba(12, 24, 34, 0.95));
}

.op-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.op-overview h3,
.event-playbook h3 {
  margin: 0;
  font-size: 0.95rem;
}

.op-overview-sub,
.event-playbook-sub {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-reset-monitor {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed rgba(120, 168, 190, 0.45);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-reset-monitor:hover {
  color: var(--text);
  border-color: rgba(62, 207, 173, 0.5);
}

.op-overview-tags,
.op-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.op-advice {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text);
}

.op-conflict {
  margin: 0.45rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(224, 160, 69, 0.35);
  background: rgba(224, 160, 69, 0.08);
  color: var(--warn, #e0a045);
  font-size: 0.78rem;
  line-height: 1.45;
}

.value-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.value-tag.attractive {
  color: var(--buy);
  border-color: rgba(62, 207, 173, 0.4);
  background: rgba(62, 207, 173, 0.1);
}
.value-tag.fair {
  color: var(--text-muted);
  border-color: rgba(138, 163, 178, 0.35);
  background: rgba(138, 163, 178, 0.08);
}
.value-tag.rich {
  color: var(--sell);
  border-color: rgba(229, 107, 107, 0.4);
  background: rgba(229, 107, 107, 0.1);
}

.action-pill.compact {
  margin-top: 0;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
}

.level-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.level-horizon-card {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.level-horizon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.65rem;
}

.level-horizon-head strong {
  font-size: 0.88rem;
}

.level-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.level-pair .level-box {
  margin: 0;
  padding: 0.7rem;
}

.level-pair .level-box b {
  font-size: 0.95rem;
}

.price-pos-bar {
  margin-top: 0.7rem;
}

.price-pos-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  height: 0.45rem;
  border-radius: 999px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.06);
}

.price-pos-zone.buy { background: rgba(62, 207, 173, 0.35); border-radius: 999px 0 0 999px; }
.price-pos-zone.mid { background: rgba(138, 163, 178, 0.22); }
.price-pos-zone.sell { background: rgba(229, 107, 107, 0.35); border-radius: 0 999px 999px 0; }

.price-pos-marker {
  position: absolute;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: -0.275rem;
  margin-top: -0.275rem;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--blue);
  box-shadow: 0 0 0 2px rgba(4, 10, 16, 0.6);
}

.price-pos-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.level-dist,
.level-note,
.level-value-text {
  margin: 0.4rem 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.level-note {
  color: var(--text-dim);
  font-style: italic;
}

.factor-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  cursor: pointer;
  position: relative;
}

.factor-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.factor-check-ui {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  border: 1.5px solid rgba(120, 168, 190, 0.45);
  background: rgba(0, 0, 0, 0.25);
  display: block;
}

.factor-row.monitor.hit .factor-check-ui {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(4, 10, 16, 0.35);
}

.factor-row.scenario .factor-check-ui {
  border-style: dashed;
  border-color: rgba(224, 160, 69, 0.65);
}

.factor-row.scenario.hit .factor-check-ui {
  background: rgba(224, 160, 69, 0.35);
  border-style: dashed;
}

.factor-row.hit .factor-check-ui::after,
.factor-check input:checked + .factor-check-ui::after {
  content: "";
  display: block;
  width: 0.28rem;
  height: 0.5rem;
  margin: 0.12rem auto 0;
  border: solid rgba(4, 10, 16, 0.85);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.factor-row.miss .factor-check-ui::after {
  display: none;
}

.factor-row.miss .factor-check input:checked + .factor-check-ui::after {
  display: block;
}

.factor-checklist-hint {
  display: inline;
}

.scenario-if p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.event-playbook {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.event-card {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 168, 190, 0.25);
  background: rgba(0, 0, 0, 0.16);
}

.event-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.event-card-head h4 {
  margin: 0;
  font-size: 0.88rem;
}

.event-meta {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.event-occurred {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.event-phases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.event-phase {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(120, 168, 190, 0.15);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.72;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.event-phase.active {
  opacity: 1;
  border-color: rgba(62, 207, 173, 0.35);
  background: rgba(62, 207, 173, 0.06);
}

.event-phase-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.event-check {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.event-scenarios {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.event-scenario {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1.4;
}

.event-note {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.radar-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 6.5rem;
}

.radar-dist {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.radar-dist.in-zone {
  color: var(--buy);
}
.radar-dist.in-zone.sell {
  color: var(--sell);
}

.strategy-drawer-panel {
  width: min(560px, 96vw);
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.risk-notes {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 107, 107, 0.22);
  background: rgba(229, 107, 107, 0.06);
}

.risk-notes h4 {
  font-size: 0.82rem;
  color: var(--sell);
  margin-bottom: 0.45rem;
}

.risk-notes ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.risk-notes li + li {
  margin-top: 0.2rem;
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  color: var(--text-dim);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.015);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Animations */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 173, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 173, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 173, 0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(62, 207, 173, 0.28); }
  50% { box-shadow: 0 0 28px rgba(62, 207, 173, 0.5); }
}

@media (max-width: 980px) {
  .hero-stats,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2,
  .grid-3,
  .fed-layout,
  .earnings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-stats,
  .grid-4,
  .earn-metrics,
  .level-boxes,
  .level-pair {
    grid-template-columns: 1fr;
  }

  .event-card-head,
  .op-overview-head {
    flex-direction: column;
  }

  .hotspot-item {
    grid-template-columns: 1fr;
  }

  .hotspot-meta {
    text-align: left;
  }

  .header-meta .asof {
    display: none;
  }
}

/* ---------- Data refresh panel ---------- */
.refresh-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.refresh-meta {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.refresh-empty {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.refresh-empty code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.refresh-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.refresh-event-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.refresh-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.refresh-event-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.refresh-event-title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.refresh-event-time,
.refresh-event-cov {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.refresh-event-impact {
  margin: 0.45rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.refresh-event-source {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.refresh-sources {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.refresh-sources-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 500;
}

.refresh-sources-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  line-height: 1.7;
}

.refresh-source-nolink {
  cursor: default;
  opacity: 0.9;
}

.refresh-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.refresh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.refresh-table th,
.refresh-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.refresh-table th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.refresh-table .mono {
  font-family: var(--font-mono);
  color: var(--accent);
}

.refresh-clip {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-expand-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.refresh-expand-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.refresh-detail-row td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.refresh-cites {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.refresh-cites code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.refresh-review-block {
  margin-bottom: 1.25rem;
}

.refresh-review-block h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .refresh-clip {
    max-width: 10rem;
  }
}
