:root {
  --bg: #0c1117;
  --bg-soft: #101823;
  --panel: rgba(15, 23, 34, 0.82);
  --panel-strong: rgba(19, 28, 41, 0.95);
  --line: rgba(247, 242, 231, 0.08);
  --text: #f5efe4;
  --muted: #9ea8b6;
  --teal: #66d9c5;
  --amber: #ffb454;
  --red: #ff7a6b;
  --blue: #79a8ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 180, 84, 0.14), transparent 26%),
    radial-gradient(circle at 80% 0%, rgba(102, 217, 197, 0.1), transparent 30%),
    linear-gradient(180deg, #0a0f15 0%, #0c1117 52%, #121a26 100%);
  font-family: "Manrope", sans-serif;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 5px 5px, 5px 5px;
  mix-blend-mode: soft-light;
}

.shell {
  position: relative;
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 24px 28px 30px;
  margin-bottom: 18px;
}

.eyebrow,
.panel-tag,
.meta-label {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
}

.hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  max-width: 9ch;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: rgba(245, 239, 228, 0.76);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 15, 24, 0.6);
}

.lang-button {
  border: 0;
  background: transparent;
  color: rgba(245, 239, 228, 0.72);
  font: 600 13px/1 "IBM Plex Mono", monospace;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.lang-button:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.lang-button.is-active {
  background: linear-gradient(135deg, rgba(121, 168, 255, 0.22), rgba(255, 180, 84, 0.2));
  color: var(--text);
}

.refresh-button {
  border: 1px solid rgba(255, 180, 84, 0.35);
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.22), rgba(255, 122, 107, 0.08));
  color: var(--text);
  padding: 14px 18px;
  border-radius: 999px;
  font: 600 14px/1 "IBM Plex Mono", monospace;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.refresh-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 180, 84, 0.6);
}

.meta-strip,
.cards,
.chart-grid {
  display: grid;
  gap: 18px;
}

.meta-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.meta-chip,
.panel,
.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.meta-chip {
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}

.meta-chip.accent {
  background: linear-gradient(140deg, rgba(255, 180, 84, 0.18), rgba(255, 122, 107, 0.08));
}

.meta-value {
  font-size: 15px;
  line-height: 1.5;
}

.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.summary-card {
  padding: 20px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121, 168, 255, 0.2), transparent 65%);
}

.summary-card-value {
  font-size: clamp(28px, 3.2vw, 46px);
  letter-spacing: -0.05em;
  font-weight: 800;
}

.summary-card-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.panel {
  padding: 22px;
  overflow: hidden;
}

.panel-wide {
  grid-column: span 2;
}

.panel.estimate {
  background: linear-gradient(145deg, rgba(19, 28, 41, 0.98), rgba(58, 31, 20, 0.7));
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.panel-head p {
  margin: 0;
  max-width: 340px;
  color: rgba(245, 239, 228, 0.65);
  line-height: 1.6;
  font-size: 14px;
}

.chart {
  width: 100%;
  height: 360px;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.market-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 24, 0.6);
  color: rgba(245, 239, 228, 0.82);
  font: inherit;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.market-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 180, 84, 0.45);
}

.market-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.22), rgba(121, 168, 255, 0.2));
  border-color: rgba(255, 180, 84, 0.7);
  color: var(--cream);
}

code {
  font-family: "IBM Plex Mono", monospace;
  color: var(--amber);
}

@media (max-width: 1100px) {
  .cards,
  .meta-strip,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .panel-wide {
    grid-column: span 1;
  }

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

@media (max-width: 680px) {
  .shell {
    width: min(100vw - 20px, 1440px);
    padding-top: 18px;
  }

  .hero,
  .panel,
  .summary-card,
  .meta-chip {
    border-radius: 22px;
  }

  .panel-head {
    flex-direction: column;
  }

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

  .chart {
    height: 300px;
  }
}
