:root {
  --bg: #07111d;
  --header: #09131f;
  --ticker: #12253a;
  --card: #102236;
  --border: #263b50;
  --navy-deep: #0a121d;
  --navy-mid: #0f1c2c;
  --navy-soft: #142438;
  --panel: #101f30;
  --line: #24374d;
  --line-soft: #1b2c3f;
  --copper: #c17a42;
  --copper-bright: #d9944f;
  --gold: #d9ae5d;
  --text: #eef2f6;
  --muted: #8ea3b8;
  --accent: #f0a13a;
  --link: #168de2;
  --up: #8fbf8a;
  --down: #d97a6c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  height: 74px;
  background: var(--header);
  border-bottom: 1px solid #142536;
  display: flex;
  align-items: center;
  padding: 0 38px;
}

.header-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 4px;
  /*border: 1px solid #d4d4d4;*/
}

.brand-logo--footer {
  height: 36px;
}

.logo {
  height: 44px;
  width: auto;
  background: white;
  border-radius: 4px;
  display: block;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-right: auto;
}

.logo span {
  color: #143b70;
  font-size: 9px;
  font-weight: bold;
  text-align: center;
  line-height: 1.05;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*padding: 26px 5vw;*/
  padding: 20px 3vw;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--paper);
  opacity: 0.85;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links .cta-small {
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 1;
}

.nav-links .cta-small:hover {
  border-color: var(--copper-bright);
  color: var(--copper-bright);
}

.nav-links .lang-switch {
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: "Space Grotesk", sans-serif;
  opacity: 1;
}

.nav-links .lang-switch:hover {
  border-color: var(--copper-bright);
  color: var(--copper-bright);
}

/* ---------- ticker ---------- */
.ticker {
  font-size: 1rem;
}

.ticker-wrap {
  border-bottom: 1px solid var(--line);
  /*background: var(--navy-soft);*/
  overflow: hidden;
}

.ticker-track {
  display: flex;
  background: var(--navy-soft);
  width: max-content;
  gap: 44px;
  padding: 13px 0;
  animation: scroll 32s linear infinite;
}

.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.ticker-item {
  display: flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
  padding: 0 22px;
}
.ticker-symbol {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  /*font-size: 0.88rem;*/
  font-size: 1rem;
  color: var(--copper-bright);
}

.ticker-price {
  font-size: 1rem;
}

.ticker-unit {
  color: var(--muted);
  font-size: 0.95rem;
}

.ticker-delta.up {
  color: var(--up);
  font-size: 0.9rem;
}
.ticker-delta.down {
  color: var(--down);
  font-size: 0.9em;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.flat {
  color: var(--muted);
}

/* Main */
.page {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  /*padding: 46px 0 70px;*/
  padding: 1.5rem 0 1rem;
}

.back {
  display: inline-block;
  color: var(--link);
  /*margin-bottom: 24px;*/
  font-size: 16px;
}

.back:hover {
  text-decoration: underline;
}

.page-title {
  text-align: center;
  font-size: 34px;
  margin: 0 0 34px;
  font-weight: 700;
  color: white;
}

/* Mineral selector */
.mineral-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 34px;
}

.mineral-button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  min-height: 66px;
  cursor: pointer;
  border-radius: 2px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.mineral-button:hover {
  border-color: #41627e;
}

.mineral-button.active {
  border-color: var(--accent);
  background: #162b40;
}

.mineral-symbol {
  display: block;
  /*color: var(--accent);*/
  color: var(--copper-bright);
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

.mineral-name {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

/* Price panel */
.market-panel {
  border: 1px solid var(--border);
  background: rgba(16, 34, 54, 0.68);
  padding: 34px 34px 38px;
}

.market-heading {
  text-align: center;
  margin-bottom: 26px;
}

.market-heading h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--copper-bright);
}

.market-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.current-price {
  text-align: center;
  margin-bottom: 34px;
}

.price {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.unit {
  color: var(--muted);
  font-size: 15px;
  margin-left: 5px;
}

.delta {
  margin-top: 8px;
  font-size: 15px;
}

/* Chart */
.chart-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.chart-heading h3 {
  margin: 0;
  font-size: 17px;
  color: white;
}

.chart-period {
  color: var(--muted);
  font-size: 13px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 310px;
  background: #0c1b2b;
  border: 1px solid var(--border);
  padding: 15px;
}

.chart-actions {
  text-align: center;
  margin-top: 20px;
}

.period-link {
  /*color: var(--link);*/
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.period-link:hover {
  text-decoration: underline;
}

.market-note {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

/* Mobile */
@media (max-width: 700px) {
  .site-header {
    height: 68px;
    padding: 0 16px;
  }

  .nav {
    gap: 10px;
  }

  .nav-link {
    display: none;
  }

  .nav-button {
    padding: 8px 13px;
    font-size: 13px;
  }

  .ticker-track {
    gap: 26px;
  }

  .page {
    width: min(100% - 22px, 960px);
    padding-top: 28px;
  }

  .page-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .mineral-selector {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 22px;
  }

  .mineral-button {
    min-height: 60px;
  }

  .market-panel {
    padding: 26px 14px 30px;
  }

  .market-heading h2 {
    font-size: 22px;
  }

  .price {
    font-size: 31px;
  }

  .chart-wrap {
    height: 250px;
    padding: 10px;
  }

  .chart-heading {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
}

.news-panel {
  margin-top: 2rem;
}

.news-heading {
  margin-bottom: 1rem;
}

.news-heading h2 {
  margin-bottom: 0.25rem;
  color: var(--copper);
}

.news-heading p {
  margin: 0;
  color: #8da7c0;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(141, 167, 192, 0.15);
}

.news-link {
  display: block;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}

.news-link:hover {
  text-decoration: underline;
}

.news-meta {
  margin-top: 0.3rem;
  color: #8da7c0;
  font-size: 0.85rem;
}
