:root {
  color-scheme: dark;
  --bg: #070a0f;
  --panel: rgba(15, 20, 29, 0.78);
  --panel-solid: #101721;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #7e8a9e;
  --text: #f4f7fb;
  --orange: #f7931a;
  --orange-2: #ffb34f;
  --green: #35e39a;
  --red: #ff5c70;
  --blue: #61a8ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(247, 147, 26, 0.12), transparent 38%),
    linear-gradient(180deg, #080b10 0%, var(--bg) 65%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.23;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.ambient {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: .13;
}
.ambient-a { background: var(--orange); top: 8%; right: -180px; }
.ambient-b { background: #145aff; bottom: 12%; left: -220px; }

.shell { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 43px; height: 43px; display: grid; place-items: center;
  border-radius: 14px; color: #111; font-size: 25px; font-weight: 900;
  background: linear-gradient(145deg, var(--orange-2), var(--orange));
  box-shadow: 0 8px 30px rgba(247,147,26,.25);
}
.brand strong { display: block; letter-spacing: .11em; font-size: 15px; }
.brand small { display: block; color: var(--muted); margin-top: 2px; font-size: 11px; letter-spacing: .08em; }

.topbar-status {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 13px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #657083; }
.live-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(53,227,154,.09); }
.live-dot.stale { background: var(--orange); }
.divider { width: 1px; height: 13px; background: var(--line); }

main { padding-bottom: 48px; }
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18,25,36,.92), rgba(10,14,21,.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  min-height: 388px;
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 40px;
  align-items: center;
  padding: 55px 64px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 50%, rgba(247,147,26,.13), transparent 28%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .19em; margin: 0 0 11px; }
.signal-line { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.signal-line h1 { font-size: clamp(54px, 8vw, 104px); line-height: .94; margin: 0; letter-spacing: -.06em; }
.signal-badge, .regime, .sentiment-pill, .readonly-pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 7px 10px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.signal-badge.short { color: var(--red); border-color: rgba(255,92,112,.25); background: rgba(255,92,112,.09); }
.signal-badge.long { color: var(--green); border-color: rgba(53,227,154,.25); background: rgba(53,227,154,.09); }
.signal-badge.neutral { color: var(--muted); }
.hero-thesis { max-width: 680px; color: #aeb8c8; font-size: 16px; line-height: 1.65; margin: 23px 0 32px; }
.hero-metrics { display: flex; gap: 42px; flex-wrap: wrap; }
.hero-metrics div { display: grid; gap: 5px; }
.hero-metrics span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-metrics strong { font-size: 21px; letter-spacing: -.02em; }

.score-orbit { position: relative; width: 260px; height: 260px; margin: auto; z-index: 1; }
.score-orbit svg { width: 100%; transform: rotate(-90deg); overflow: visible; }
.orbit-track, .orbit-value { fill: none; stroke-width: 10; }
.orbit-track { stroke: rgba(255,255,255,.055); }
.orbit-value {
  stroke: var(--red); stroke-linecap: round;
  stroke-dasharray: 527.8; stroke-dashoffset: 527.8;
  filter: drop-shadow(0 0 8px rgba(255,92,112,.35));
  transition: stroke-dashoffset .8s ease, stroke .3s ease;
}
.orbit-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.orbit-center small { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.orbit-center strong { font-size: 34px; margin: 5px 0 2px; }
.orbit-center span { color: var(--muted); font-size: 12px; }

.level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0; }
.level-card { padding: 22px 24px; border-radius: 18px; box-shadow: none; }
.level-card::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--orange); opacity: .45; }
.level-card.danger::after { background: var(--red); }
.level-card.target::after { background: var(--green); }
.level-card span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 800; }
.level-card strong { display: block; font-size: 23px; margin: 8px 0 4px; }
.level-card small { color: #667287; font-size: 11px; }

.chart-panel, .reasoning, .indicators, .news-panel, .history-panel { padding: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.section-head .eyebrow { margin-bottom: 7px; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: block; width: 18px; height: 2px; border-radius: 4px; }
.legend-price { background: var(--orange); }
.legend-entry { background: rgba(255,255,255,.42); }
.legend-target { background: var(--green); }
.chart-wrap { position: relative; height: 285px; }
#priceChart { width: 100%; height: 100%; }
.chart-empty { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: 12px; }

.range-track { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 10px; }
.range-labels span:nth-child(2) { color: var(--text); }
.range-labels b { font-weight: 700; margin-left: 4px; }
.track { height: 7px; background: rgba(255,255,255,.055); border-radius: 99px; position: relative; }
.track::before { content:""; position:absolute; inset:0; border-radius:inherit; background:linear-gradient(90deg, rgba(53,227,154,.28), transparent 50%, rgba(255,92,112,.25)); }
.track-marker { position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%; background: var(--orange); transform: translate(-50%,-50%); box-shadow: 0 0 0 5px rgba(247,147,26,.14); transition:left .6s ease; }

.content-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; margin: 14px 0; }
.readonly-pill { color: var(--muted); }
.reason-list { display: grid; gap: 10px; }
.reason-item { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.018); }
.reason-item i { flex:0 0 auto; margin-top:4px; width:7px; height:7px; border-radius:50%; background:var(--orange); box-shadow:0 0 0 5px rgba(247,147,26,.08); }
.reason-item span { font-size:13px; color:#b7c0ce; line-height:1.45; }
.ai-note { display:flex; gap:14px; align-items:flex-start; margin-top:18px; padding:17px; border-radius:16px; background:linear-gradient(135deg, rgba(97,168,255,.08), rgba(247,147,26,.055)); border:1px solid rgba(97,168,255,.13); }
.ai-icon { width:34px; height:34px; border-radius:10px; background:rgba(97,168,255,.13); color:var(--blue); display:grid; place-items:center; font-size:10px; font-weight:900; }
.ai-note span { font-size:10px; color:var(--blue); font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.ai-note p { margin:6px 0 0; color:#9da9ba; font-size:12px; line-height:1.55; }

.indicator-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.indicator-grid div { padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.018); }
.indicator-grid span { display:block; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.1em; }
.indicator-grid strong { display:block; font-size:18px; margin:6px 0 2px; }
.indicator-grid em { color:#647084; font-size:10px; font-style:normal; }
.regime { color:var(--orange); }

.news-panel, .history-panel { margin-top:14px; }
.news-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.news-item { min-height:150px; display:flex; flex-direction:column; padding:17px; border:1px solid var(--line); border-radius:16px; color:inherit; text-decoration:none; background:rgba(255,255,255,.017); transition:.2s ease; }
.news-item:hover { transform:translateY(-2px); border-color:rgba(247,147,26,.25); background:rgba(247,147,26,.035); }
.news-meta { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
.news-item h3 { font-size:14px; line-height:1.45; letter-spacing:-.01em; margin:18px 0 12px; }
.news-item .read-more { color:var(--orange); font-size:10px; margin-top:auto; }
.sentiment-pill { color:var(--muted); }
.sentiment-pill.positive { color:var(--green); }
.sentiment-pill.negative { color:var(--red); }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; min-width:680px; }
th { text-align:left; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.1em; padding:0 12px 12px; font-weight:700; }
td { border-top:1px solid var(--line); padding:14px 12px; font-size:12px; color:#aeb8c7; }
td strong { color:var(--text); }
.table-signal { display:inline-flex; padding:5px 8px; border-radius:99px; font-size:9px; font-weight:800; }
.table-signal.short { color:var(--red); background:rgba(255,92,112,.09); }
.table-signal.long { color:var(--green); background:rgba(53,227,154,.09); }
.table-signal.neutral { color:var(--muted); background:rgba(255,255,255,.04); }

footer { display:flex; justify-content:space-between; gap:20px; padding:28px 4px 0; color:#586477; font-size:10px; }
footer p { margin:0; }
footer strong { color:#7d899b; }

.positive { color:var(--green) !important; }
.negative { color:var(--red) !important; }

@media (max-width: 900px) {
  .hero { grid-template-columns:1fr; padding:42px; }
  .score-orbit { display:none; }
  .level-grid { grid-template-columns:repeat(2,1fr); }
  .content-grid { grid-template-columns:1fr; }
  .news-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 620px) {
  .shell { width:min(100% - 22px, 1220px); }
  .topbar { height:76px; }
  .topbar-status .divider, #lastUpdate { display:none; }
  .hero { min-height:auto; padding:32px 25px; border-radius:20px; }
  .signal-line h1 { font-size:58px; }
  .hero-metrics { gap:24px; }
  .hero-metrics strong { font-size:18px; }
  .level-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .level-card { padding:17px; }
  .level-card strong { font-size:18px; }
  .chart-panel, .reasoning, .indicators, .news-panel, .history-panel { padding:22px 18px; border-radius:20px; }
  .section-head { align-items:flex-start; }
  .legend { display:none; }
  .chart-wrap { height:230px; }
  .news-grid { grid-template-columns:1fr; }
  .indicator-grid { gap:8px; }
  footer { flex-direction:column; }
}
