:root {
  --bg: #0f1115;
  --bg-elev: #161a21;
  --line: #242a33;
  --text: #e6e9ef;
  --text-dim: #8b93a1;
  --accent: #2962ff;
  --head-h: 60px;
  --foot-h: 52px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.head {
  flex: 0 0 auto;
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}

.head__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.head__logo {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

.head__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.head__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.head__badge {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.chart {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.chart iframe { display: block; }

.chart__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  pointer-events: none;
}

.foot {
  flex: 0 0 auto;
  min-height: var(--foot-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
}

.foot__text {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.foot__text a {
  color: var(--accent);
  text-decoration: none;
}

.foot__text a:hover { text-decoration: underline; }

.foot__text--muted { opacity: 0.7; }

@media (max-width: 720px) {
  .head { flex-wrap: wrap; }
  .foot { flex-direction: column; align-items: flex-start; gap: 2px; }
}
