* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: #0a0e18; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e5e7eb;
  padding: 16px 12px 32px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'JetBrains Mono', 'Menlo', monospace; }

#app { max-width: 1040px; margin: 0 auto; }
.hidden { display: none !important; }

/* ===== Loader ===== */
.loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 70vh; gap: 16px;
}
.spinner {
  width: 48px; height: 48px;
  border: 3px solid #1f2937;
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-size: 15px; color: #d1d5db; font-weight: 600; }
.loader-sub { font-size: 12px; color: #6b7280; }

/* ===== Error ===== */
.error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: 12px; padding: 24px;
  text-align: center;
}
.error-title { font-size: 18px; color: #ef4444; font-weight: 700; }
.error-text { font-size: 13px; color: #9ca3af; max-width: 400px; }
.btn-refresh {
  background: #60a5fa; color: #0a0e18; border: none; border-radius: 8px;
  padding: 10px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
  margin-top: 8px; font-family: inherit;
}
.btn-refresh:hover { background: #93c5fd; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #12172a 0%, #1a2140 100%);
  border-radius: 16px; padding: 20px 22px; margin-bottom: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.hero-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.brand { font-size: 11px; color: #9ca3af; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 700; }
.hero-time { font-size: 11px; color: #9ca3af; }
.btn-refresh-hero {
  background: rgba(96,165,250,0.15); color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-refresh-hero:hover { background: rgba(96,165,250,0.25); }
.btn-refresh-hero:active { transform: scale(0.97); }
.btn-refresh-hero.spinning svg { animation: spin 1s linear infinite; }
.btn-refresh-hero svg { width: 12px; height: 12px; }

.hero-inner {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px;
  align-items: stretch;
}
@media (max-width: 720px) { .hero-inner { grid-template-columns: 1fr; } }

.verdict {
  border-left: 5px solid var(--vc, #eab308);
  background: var(--vbg, #2b2410);
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: inset 0 0 60px rgba(255,255,255,0.02);
}
.verdict-label { font-size: 10px; color: #9ca3af; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 2px; }
.verdict-big { font-size: 32px; font-weight: 800; color: var(--vc, #eab308); letter-spacing: -0.5px; line-height: 1; margin: 4px 0 6px 0; }
.verdict-action { font-size: 14px; color: #e5e7eb; margin-bottom: 8px; }
.verdict-size { font-size: 11.5px; color: #9ca3af; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); }

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-tile {
  background: rgba(0,0,0,0.3); border-radius: 10px; padding: 12px 14px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.price-label { font-size: 10px; color: #9ca3af; letter-spacing: 1px; text-transform: uppercase; }
.price-value { font-size: 22px; font-weight: 800; color: #f9fafb; margin: 3px 0; letter-spacing: -0.5px; font-family: 'JetBrains Mono', monospace; }
.price-sub { font-size: 10.5px; color: #9ca3af; }

/* ===== Section labels ===== */
.section-label {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 4px 12px 4px; flex-wrap: wrap;
}
.section-num {
  background: #1f2937; color: #9ca3af;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.section-title { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: #9ca3af; font-weight: 700; }
.section-sub { font-size: 12px; color: #6b7280; font-style: italic; }

/* ===== Cards ===== */
.card {
  background: #12172a; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.card h3 {
  font-size: 11px; color: #9ca3af; letter-spacing: 1.5px; text-transform: uppercase;
  margin: 0 0 10px 0; font-weight: 700;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ===== Flow items ===== */
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 500px) { .flow-grid { grid-template-columns: 1fr; } }
.flow {
  background: #0a0e18; border-radius: 8px; padding: 9px 11px;
  border-left: 3px solid #6b7280;
}
.flow.bear { border-left-color: #ef4444; }
.flow.bull { border-left-color: #22c55e; }
.flow-head { display: flex; justify-content: space-between; align-items: baseline; }
.flow-name { font-size: 12.5px; font-weight: 700; color: #f9fafb; }
.flow-tag { font-size: 9.5px; padding: 2px 6px; border-radius: 4px; font-weight: 700; letter-spacing: 0.5px; }
.flow-tag.bear { background: #2b0f10; color: #ef4444; }
.flow-tag.bull { background: #0c2b16; color: #22c55e; }
.flow-desc { font-size: 10.5px; color: #9ca3af; margin-top: 3px; line-height: 1.45; }

/* ===== KV rows ===== */
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dotted #1f2937; }
.kv:last-of-type { border-bottom: none; }
.kv .k { color: #9ca3af; }
.kv .v { color: #f9fafb; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.green { color: #22c55e !important; }
.red { color: #ef4444 !important; }
.yellow { color: #eab308 !important; }
.blue { color: #60a5fa !important; }

/* ===== Notes ===== */
.note {
  background: #0a0e18; border-radius: 6px; padding: 9px 11px; margin-top: 10px;
  font-size: 11px; color: #d1d5db; line-height: 1.5;
  border-left: 3px solid #6b7280;
}
.note b { color: #f9fafb; }
.note.yellow-note { background: rgba(234,179,8,0.08); border-left-color: #eab308; }
.note.yellow-note b { color: #eab308; }

/* ===== COT items ===== */
.cot-item {
  background: #0a0e18; border-radius: 8px; padding: 9px 11px; margin-bottom: 6px;
  border-left: 3px solid #6b7280;
}
.cot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.cot-name { font-size: 12.5px; font-weight: 700; color: #f9fafb; }
.cot-tag { font-size: 9.5px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.cot-read { font-size: 10.5px; color: #9ca3af; line-height: 1.45; }

/* ===== Level items ===== */
.level {
  background: #0a0e18; border-radius: 8px; padding: 10px 12px; margin-bottom: 6px;
  border-left: 4px solid #6b7280;
}
.level:last-of-type { margin-bottom: 0; }
.level.rebound { border-left-color: #22c55e; }
.level.reject { border-left-color: #ef4444; }
.level.magnet { border-left-color: #eab308; }
.level.here {
  border-left-color: #60a5fa;
  background: linear-gradient(90deg, rgba(96,165,250,0.08) 0%, #0a0e18 100%);
}
.level-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.level-name { font-size: 12.5px; font-weight: 700; color: #f9fafb; }
.level-tag { font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.level-what { font-size: 11px; color: #9ca3af; margin-top: 4px; line-height: 1.5; }
.level-what b { color: #e5e7eb; }

/* ===== Why summary strip ===== */
.why-summary {
  border-radius: 10px; padding: 12px 16px; margin: 12px 0 4px 0;
  font-size: 13px; color: #e5e7eb; line-height: 1.6;
  border-left: 4px solid var(--vc, #eab308);
  background: var(--vbg, #2b2410);
}
.why-summary b { color: #f9fafb; }

/* ===== Timeline ===== */
.timeline { position: relative; padding: 8px 0 0 4px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 16px; bottom: 16px;
  width: 2px; background: #1f2937;
}
.tl-item { position: relative; padding: 4px 0 8px 20px; }
.tl-item::before {
  content: ''; position: absolute; left: 2px; top: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #1f2937; border: 2px solid #12172a;
}
.tl-item.now::before { background: #60a5fa; }
.tl-item.warn::before { background: #eab308; }
.tl-item.hot::before { background: #ef4444; }
.tl-time { font-size: 11px; color: #9ca3af; font-weight: 700; letter-spacing: 0.5px; }
.tl-event { font-size: 12.5px; color: #f9fafb; margin-top: 2px; font-weight: 600; }
.tl-note { font-size: 10.5px; color: #9ca3af; margin-top: 2px; line-height: 1.4; }

/* ===== Events ===== */
.event-item {
  background: #0a0e18; border-radius: 6px; padding: 8px 10px; margin-bottom: 5px;
}
.event-time { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.event-name { font-size: 12px; color: #f9fafb; margin-top: 2px; }
.event-none { color: #6b7280; font-size: 12px; padding: 8px; text-align: center; }

/* ===== Trade plan ===== */
.trade-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 720px) { .trade-wrap { grid-template-columns: 1fr; } }
.trade-bias {
  font-size: 12.5px; padding: 6px 10px;
  background: var(--vbg, #2b2410); color: var(--vc, #eab308);
  border-radius: 6px; font-weight: 700;
  display: inline-block; margin-bottom: 8px;
}
.trade-numbers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.tn { background: #0a0e18; border-radius: 6px; padding: 8px; text-align: center; }
.tn-l { font-size: 9px; color: #6b7280; letter-spacing: 1px; text-transform: uppercase; }
.tn-v { font-size: 15px; font-weight: 800; margin-top: 3px; font-family: 'JetBrains Mono', monospace; }
.reality {
  background: rgba(239,68,68,0.06); border-left: 3px solid #ef4444;
  border-radius: 6px; padding: 12px 14px; font-size: 11.5px; color: #e5e7eb; line-height: 1.55;
}
.reality b { color: #f9fafb; }
.reality-title {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #ef4444; font-weight: 700; margin-bottom: 5px;
}

/* ===== Playbook ===== */
.pb-block { background: #0a0e18; border-radius: 10px; padding: 14px 16px; }
.pb-block.do { border-left: 4px solid #22c55e; }
.pb-block.dont { border-left: 4px solid #ef4444; }
.pb-block.watch { border-left: 4px solid #eab308; }
.pb-label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.pb-label.do { color: #22c55e; }
.pb-label.dont { color: #ef4444; }
.pb-label.watch { color: #eab308; }
.pb-block ul { margin: 0; padding-left: 18px; }
.pb-block li { font-size: 12px; color: #d1d5db; line-height: 1.6; margin-bottom: 4px; }
.pb-block li b { color: #f9fafb; }

/* ===== Cheat sheet ===== */
.ref {
  background: #0f1427; border-radius: 12px; padding: 18px 20px; margin-top: 14px;
}
.ref h4 {
  font-size: 11px; color: #9ca3af; letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 700; margin: 0 0 4px 0;
}
.ref-intro { font-size: 11.5px; color: #6b7280; margin-bottom: 14px; font-style: italic; }
.ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 720px) { .ref-grid { grid-template-columns: 1fr; } }
.ref-card {
  background: #0a0e18; border-radius: 8px; padding: 12px 14px;
  border-left: 3px solid #eab308;
}
.ref-term { font-size: 13.5px; font-weight: 800; color: #eab308; margin-bottom: 2px; }
.ref-sub { font-size: 10px; color: #6b7280; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.ref-def { font-size: 11.5px; color: #e5e7eb; line-height: 1.55; margin-bottom: 8px; }
.ref-def b { color: #f9fafb; }
.ref-use {
  font-size: 10.5px; color: #9ca3af; line-height: 1.5;
  padding-top: 8px; border-top: 1px dotted #1f2937;
}
.ref-use b { color: #22c55e; letter-spacing: 1px; text-transform: uppercase; font-size: 9.5px; }

.footer {
  text-align: center; font-size: 10px; color: #4b5563; padding: 16px 0 8px 0;
}
.footer a { color: #60a5fa; text-decoration: none; }
.stale-banner {
  background: #2b2410; border-left: 3px solid #eab308;
  padding: 8px 14px; border-radius: 8px; margin-bottom: 12px;
  font-size: 12px; color: #eab308;
}
