:root {
  --bg: transparent;
  --surface: rgba(9, 19, 31, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --text: #edf3f9;
  --muted: #93a5b5;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff7a45;
  --accent-2: #5ce1e6;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a,
button {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.page-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.embed-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
p {
  margin: 0;
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.subtle-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar,
.tabbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-toggle,
.tab-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.chart-toggle:hover,
.tab-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 225, 230, 0.35);
}

.chart-toggle.is-active,
.tab-button.is-active {
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.16), rgba(255, 122, 69, 0.14));
  border-color: rgba(92, 225, 230, 0.34);
}

.alert-card {
  margin: 14px 20px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 122, 69, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 122, 69, 0.1);
}

.alert-card strong,
.alert-card span {
  display: block;
}

.alert-card span {
  margin-top: 4px;
  color: #ffd7ca;
}

.tabbar {
  padding: 14px 20px 0;
}

.view-panel {
  display: none;
  padding: 16px 20px 20px;
}

.view-panel.is-active {
  display: block;
}

.chart-wrap {
  height: 480px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(8, 16, 26, 0.84);
}

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

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.015);
}

thead th {
  background: rgba(10, 19, 29, 0.98);
  color: #d5e1eb;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .chart-wrap {
    height: 360px;
  }
}

@media (max-width: 640px) {
  .topbar,
  .tabbar,
  .view-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .chart-wrap {
    height: 300px;
    padding: 6px;
  }
}
