:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: #101624;
  --panel-soft: #0d1321;
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f5f7fb;
  --muted: #9ba7bd;
  --accent: #7dd3fc;
  --badge: rgba(125, 211, 252, 0.12);
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.11), transparent 30rem),
    linear-gradient(135deg, #070a12 0%, #0b1020 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

.page-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 18px 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.status-line {
  max-width: 520px;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.status-line.error {
  color: var(--danger);
}

.chart-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.chart-panel {
  min-height: 0;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(16, 22, 36, 0.9);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 42px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(13, 19, 33, 0.9);
}

.chart-header h2 {
  margin-bottom: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--badge);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
}

.chart-frame {
  width: 100%;
  height: calc((100vh - 132px) / 2);
  min-height: 260px;
}

@media (max-width: 900px) {
  .page-shell {
    padding: 12px;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .status-line {
    max-width: none;
    text-align: left;
  }

  .chart-frame {
    height: 320px;
  }
}

@media (max-width: 640px) {
  body {
    overflow-y: auto;
  }

  .page-shell {
    min-height: auto;
  }

  .chart-grid {
    grid-template-rows: auto auto;
  }

  .chart-panel {
    border-radius: 14px;
  }

  .chart-frame {
    height: 300px;
    min-height: 260px;
  }
}

