:root {
  color-scheme: dark;
  --bg: #07100f;
  --surface: #0d1715;
  --surface-2: #111f1c;
  --line: rgba(219, 244, 237, 0.12);
  --line-strong: rgba(117, 232, 208, 0.26);
  --text: #eef8f4;
  --muted: #8aa199;
  --soft: #c3d4ce;
  --cyan: #38ead0;
  --bullish: #21dc87;
  --bearish: #ff5867;
  --flip: #a78bfa;
  --risk: #ffb13d;
  --neutral: #58c7ff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(56, 234, 208, 0.09), transparent 340px),
    radial-gradient(circle at 86% 10%, rgba(33, 220, 135, 0.12), transparent 300px),
    var(--bg);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.radar-shell {
  width: min(1360px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  margin-bottom: 14px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(56, 234, 208, 0.38);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(56, 234, 208, 0.22);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(219, 244, 237, 0.045);
}

.lang-button {
  min-width: 44px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.lang-button.active {
  color: #04110e;
  background: var(--cyan);
}

.primary-link,
.mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(56, 234, 208, 0.54);
  border-radius: 8px;
  color: #04110e;
  background: var(--cyan);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.summary-strip {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.7fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-cell {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  background: rgba(13, 23, 21, 0.92);
}

.summary-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(56, 234, 208, 0.58);
  animation: livePulse 2.4s ease-out infinite;
}

.radar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.feed-panel,
.intel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 21, 0.88);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.feed-panel {
  min-width: 0;
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-head h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.1;
}

.text-link {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.refresh-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(56, 234, 208, 0.36);
  border-radius: 8px;
  color: var(--text);
  background: rgba(56, 234, 208, 0.08);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  border-color: rgba(56, 234, 208, 0.72);
  background: rgba(56, 234, 208, 0.14);
  outline: none;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.featured-events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.featured-card {
  --tone: var(--neutral);
  --tone-soft: rgba(88, 199, 255, 0.1);
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 32%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent 58%),
    rgba(17, 31, 28, 0.95);
}

.featured-card::before,
.event-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--tone);
}

.featured-card.is-new,
.event-row.is-new {
  animation: cardArrive 760ms ease-out;
}

.featured-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.signal-status {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 6px;
  color: var(--tone);
  font-size: 12px;
  font-weight: 900;
}

.featured-card h2 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.15;
}

.featured-amount {
  color: var(--tone);
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
}

.featured-grid span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(219, 244, 237, 0.09);
  border-radius: 7px;
  background: rgba(219, 244, 237, 0.035);
}

.featured-grid em,
.featured-card footer,
.row-signal span,
.row-amount span,
.row-source span {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.featured-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-card p {
  margin-bottom: 11px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.featured-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(219, 244, 237, 0.09);
}

.feed-table-head,
.event-row {
  display: grid;
  grid-template-columns: 112px minmax(260px, 1.4fr) minmax(120px, 0.7fr) minmax(150px, 0.75fr);
  gap: 12px;
  align-items: center;
}

.feed-table-head {
  min-height: 30px;
  padding: 0 12px 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: min(560px, calc(100vh - 346px));
  min-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(56, 234, 208, 0.46) rgba(219, 244, 237, 0.06);
}

.event-list::-webkit-scrollbar {
  width: 8px;
}

.event-list::-webkit-scrollbar-track {
  background: rgba(219, 244, 237, 0.05);
  border-radius: 999px;
}

.event-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(56, 234, 208, 0.44);
}

.event-row {
  --tone: var(--neutral);
  position: relative;
  min-height: 66px;
  overflow: hidden;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(219, 244, 237, 0.1);
  border-radius: 8px;
  background: rgba(17, 31, 28, 0.74);
}

.event-row time {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.row-signal,
.row-amount,
.row-source {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.row-signal strong,
.row-amount strong,
.row-source strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-signal strong {
  color: var(--tone);
}

.row-amount strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.intel-panel {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 10px;
}

.intel-card {
  padding: 13px;
}

.intel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.intel-head h2 {
  margin-bottom: 0;
  font-size: 15px;
}

.intel-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.rank-list,
.tone-list,
.timeline-list {
  display: grid;
  gap: 7px;
}

.rank-row,
.tone-row,
.timeline-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(219, 244, 237, 0.08);
  border-radius: 7px;
  background: rgba(219, 244, 237, 0.035);
}

.rank-row {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.rank-row span,
.timeline-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.rank-row strong,
.timeline-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em,
.category-chip em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

.tone-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tone-row span {
  color: var(--tone);
  font-size: 13px;
  font-weight: 850;
}

.tone-row strong {
  color: var(--text);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(56, 234, 208, 0.2);
  border-radius: 7px;
  background: rgba(56, 234, 208, 0.07);
  color: var(--soft);
  font-size: 12px;
}

.timeline-row {
  grid-template-columns: 72px minmax(0, 1fr);
  border-color: color-mix(in srgb, var(--tone) 22%, transparent);
}

.muted,
.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 16px;
  border: 1px solid rgba(219, 244, 237, 0.09);
  border-radius: 8px;
  background: rgba(219, 244, 237, 0.04);
}

.tone-bullish {
  --tone: var(--bullish);
}

.tone-bearish {
  --tone: var(--bearish);
}

.tone-flip {
  --tone: var(--flip);
}

.tone-risk {
  --tone: var(--risk);
}

.tone-neutral {
  --tone: var(--neutral);
}

.mobile-cta {
  display: none;
}

.latest-news-card .text-link {
  font-size: 12px;
}

.news-shell {
  max-width: 980px;
}

.news-hero,
.news-list,
.news-article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 21, 0.9);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.news-hero {
  margin-bottom: 14px;
  padding: 24px;
}

.news-hero h1,
.news-article h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.16;
}

.news-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--soft);
  line-height: 1.7;
}

.news-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.news-list-item {
  padding: 18px 20px;
  background: rgba(13, 23, 21, 0.96);
}

.news-list-item time,
.news-article time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.news-list-item h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.3;
}

.news-list-item a {
  color: var(--text);
  text-decoration: none;
}

.news-list-item a:hover,
.news-list-item a:focus-visible {
  color: var(--cyan);
}

.news-list-item p,
.article-body p {
  margin-bottom: 0;
  color: var(--soft);
  line-height: 1.75;
}

.news-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.news-pagination .text-link:last-child {
  justify-self: end;
}

.news-article {
  padding: 26px;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--cyan);
  text-decoration: none;
}

.article-body {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.article-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 4px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.article-detail-list div {
  min-width: 0;
  padding: 12px;
  background: rgba(13, 23, 21, 0.96);
}

.article-detail-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.article-detail-list dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.article-detail-list a {
  color: var(--cyan);
  text-decoration: none;
}

.article-cta {
  margin-top: 24px;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 234, 208, 0.58);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(56, 234, 208, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 234, 208, 0);
  }
}

@keyframes cardArrive {
  from {
    opacity: 0.62;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .featured-card.is-new,
  .event-row.is-new {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .radar-grid {
    grid-template-columns: 1fr;
  }

  .intel-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-list {
    max-height: 58vh;
  }
}

@media (max-width: 760px) {
  .radar-shell {
    width: min(100% - 20px, 1360px);
    padding-bottom: 82px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .primary-link {
    width: 100%;
  }

  .lang-switch {
    flex: 1;
  }

  .lang-button {
    flex: 1;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intel-panel,
  .featured-events {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .panel-head h1 {
    font-size: 23px;
  }

  .feed-table-head {
    display: none;
  }

  .event-row {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .row-amount,
  .row-source {
    grid-column: 2;
  }

  .featured-main {
    grid-template-columns: 1fr;
  }

  .featured-amount {
    font-size: 24px;
  }

  .news-hero,
  .news-article {
    padding: 18px;
  }

  .news-hero h1,
  .news-article h1 {
    font-size: 25px;
  }

  .article-detail-list {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 430px) {
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .event-row time,
  .row-amount,
  .row-source {
    grid-column: auto;
  }
}
