:root {
  color-scheme: dark;
  --bg: #101622;
  --panel: #141414;
  --header: #181c2a;
  --line: #333333;
  --text: #ffffff;
  --muted: #c8c8c8;
  --blue: #0066cc;
  --button: #0052ff;
  --button-hover: #003cb9;
  --bull: #00ff00;
  --bear: #ff0066;
  --neutral: #ffff00;
  --heat: #ff9900;
  --cyan: #00ffff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.45;
  padding-top: 84px;
}

body.no-scroll { overflow: hidden; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 10px 20px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.brand,
.site-header h1 {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  font-weight: 700;
  font-style: italic;
  color: var(--blue);
  text-shadow: 0 0 10px var(--blue);
  text-decoration: none;
}

.brand { font-size: 1.55rem; letter-spacing: 0.02em; }

.site-header h1 {
  font-size: 1.35rem;
  text-align: center;
  flex: 1 1 auto;
}

.btn,
.section-nav a {
  display: inline-block;
  padding: 10px 16px;
  border: none;
  border-radius: 5px;
  background: var(--button);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.section-nav a:hover,
.lightbox-close:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 82, 255, 0.4);
}

.btn:focus-visible,
.section-nav a:focus-visible,
.chart-button:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wrap {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto 56px;
}

.disclaimer {
  margin: 16px 0;
  padding: 12px 14px;
  background: #1a1400;
  border: 1px solid var(--neutral);
  border-left-width: 6px;
  color: var(--neutral);
  font-family: Poppins, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.disclaimer-foot { margin-top: 28px; }

.status {
  color: var(--neutral);
  font-weight: 700;
  text-align: center;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0;
}

h2 {
  margin: 0 0 10px;
  font-family: Poppins, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  text-shadow: 0 0 8px rgba(0, 102, 204, 0.85);
}

.summary {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
}

.meta,
.meta-sub {
  margin: 6px 0;
  color: var(--muted);
}

.meta time,
#updated {
  color: #ffffff;
  font-weight: 700;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.counts li {
  padding: 6px 10px;
  border-radius: 999px;
  font-family: Poppins, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.counts .bull { background: var(--bull); color: #000000; }
.counts .neutral { background: var(--neutral); color: #000000; }
.counts .bear { background: var(--bear); color: #ffffff; }

.explainer p { margin: 0 0 8px; color: var(--muted); }
.explainer p:last-child { margin-bottom: 0; }
.explainer strong { color: #ffffff; }
.bull-word { color: var(--bull); }
.neutral-word { color: var(--neutral); }
.bear-word { color: var(--bear); }

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}

.chart-section { margin-top: 22px; scroll-margin-top: 124px; }
#assets,
#narration { scroll-margin-top: 124px; }

.table-scroll { overflow-x: auto; }

.asset-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}

.asset-table th,
.asset-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #222222;
}

.asset-table th {
  background: var(--header);
  color: var(--blue);
  font-family: Poppins, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.asset-table tbody tr:hover { background: #1f1f1f; }

.asset-name {
  display: block;
  font-weight: 700;
}

.ticker {
  color: var(--cyan);
  font-size: 0.85rem;
}

.since,
.asset-summary,
.source-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.source-note { color: var(--heat); }

.as-of {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
}

.ta-rules {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ta-chips { display: flex; flex-wrap: wrap; gap: 4px; }

.ta-chip {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.ta-cell {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ta-bull { background: #0b6b3a; color: #ffffff; }
.ta-nbull { background: #c8e6c9; color: #000000; }
.ta-neutral { background: #ffffff; color: #000000; }
.ta-nbear { background: #f3c6cc; color: #000000; }
.ta-bear { background: #8b1a1a; color: #ffffff; }
.ta-unknown { background: #333333; color: #ffffff; }

.badge,
.heat {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: Poppins, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.bull { background: var(--bull); color: #000000; }
.badge.neutral { background: var(--neutral); color: #000000; }
.badge.bear { background: var(--bear); color: #ffffff; }
.badge.unknown { background: #333333; color: #ffffff; }

.heat { background: var(--heat); color: #000000; }
.none { color: #888888; }

.up { color: var(--bull); font-weight: 700; }
.down { color: var(--bear); font-weight: 700; }
.flat { color: #ffffff; font-weight: 700; }
.leaning-shift { color: var(--cyan); font-weight: 700; }

#narration-text {
  margin: 0;
  white-space: pre-wrap;
  color: #e8e8e8;
  line-height: 1.6;
}

figure { margin: 0 0 18px; }

.chart-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0a0a;
  cursor: zoom-in;
  overflow: hidden;
}

.chart-button:hover {
  border-color: var(--blue);
  box-shadow: 0 0 14px rgba(0, 102, 204, 0.65);
}

.chart-button img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 6px;
  color: #aaaaaa;
  font-size: 0.85rem;
}

.chart-missing {
  margin: 0;
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 72px);
  object-fit: contain;
  border: 1px solid #444444;
  background: #000000;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 5px;
  background: var(--button);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

code {
  color: var(--cyan);
  font-size: 0.95em;
}

@media (max-width: 800px) {
  body { padding-top: 118px; }

  .site-header {
    flex-wrap: wrap;
    align-items: center;
  }

  .site-header h1 {
    order: 3;
    flex: 1 1 100%;
    text-align: left;
    font-size: 1.15rem;
  }

  .asset-table thead { display: none; }

  .asset-table,
  .asset-table tbody,
  .asset-table tr,
  .asset-table td {
    display: block;
    width: auto;
  }

  .asset-table {
    border: none;
    background: transparent;
  }

  .asset-table tr {
    margin: 0 0 12px;
    padding: 4px 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .asset-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right;
  }

  .asset-table td::before {
    content: attr(data-label);
    color: var(--blue);
    font-family: Poppins, Arial, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
  }

  .asset-table td.asset-cell {
    display: block;
    text-align: left;
    border-bottom: 1px solid #222222;
  }

  .asset-table td.asset-cell::before { content: none; }

  .asset-table td.price { flex-wrap: wrap; }
  .asset-table td.price .as-of { flex: 1 0 100%; text-align: right; }

  .chart-button img { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .section-nav a,
  .lightbox-close { transition: none; }
}
