/* ============ Page head ============ */
.page-head { padding: 34px 0 10px; position: relative; z-index: 1; }

.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--gold); }

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: clamp(27px, 3.6vw, 42px); }
.page-head .lead { margin-top: 12px; }

.head-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.head-badge b { display: block; font-size: 21px; font-weight: 800; color: var(--gold); }
.head-badge small { display: block; font-size: 11.5px; color: var(--muted); }

.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: pulse 1.9s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.nav a.is-current { color: var(--gold); }

/* ============ Chart ============ */
.chart-section { padding-top: 34px; }

.chart-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 192, 105, 0.5), transparent);
}

.chart-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.chart-label { font-size: 12.5px; color: var(--muted); }
.chart-value { display: flex; align-items: baseline; gap: 9px; margin-top: 4px; flex-wrap: wrap; }
.chart-value > span:first-child { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.chart-value small { font-size: 12px; color: var(--muted); }

.ranges {
  display: flex; gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px; border-radius: 12px;
}
.range {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  transition: 0.18s;
}
.range:hover { color: var(--text); }
.range.is-active {
  background: linear-gradient(135deg, rgba(230,192,105,0.22), rgba(201,154,60,0.1));
  color: var(--gold);
}

.chart-wrap { height: 300px; position: relative; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }

.chart-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.legend { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #f0d090, var(--gold-2)); }

.chart-stats { display: flex; gap: 26px; flex-wrap: wrap; font-size: 12px; }
.chart-stats div { display: grid; gap: 2px; }
.chart-stats span { color: var(--muted); }
.chart-stats b { font-size: 13.5px; font-weight: 700; }

/* ============ Price table ============ */
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.price-table th {
  text-align: right;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}
.price-table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  white-space: nowrap;
  color: #dbe1ea;
}
.price-table tbody tr:last-child td { border-bottom: 0; }

.price-table .group-row td {
  background: rgba(230, 192, 105, 0.07);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.price-table .group-row:hover td { background: rgba(230, 192, 105, 0.07); }
.price-table tbody tr { transition: background 0.18s; }
.price-table tbody tr:hover { background: rgba(230, 192, 105, 0.045); }

.asset { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.asset .chip {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(230, 192, 105, 0.1);
  border: 1px solid rgba(230, 192, 105, 0.2);
  color: var(--gold); font-size: 11px; font-weight: 700;
}
.price-table .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.price-table .muted { color: var(--muted); font-size: 12.5px; }
.price-table .delta { font-weight: 700; direction: ltr; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

/* ============ Calculator layout ============ */
.calc-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: start;
}
.info-col { display: grid; gap: 16px; }

@media (max-width: 1000px) {
  .calc-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 240px; }
}

@media (max-width: 760px) {
  .page-head { padding-top: 24px; }
  .head-badge { width: 100%; }
  .chart-card { padding: 18px; }
  .chart-value > span:first-child { font-size: 24px; }
  .ranges { width: 100%; }
  .range { flex: 1; padding: 7px 6px; text-align: center; font-size: 11.5px; }
  .chart-stats { gap: 16px; }

  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .price-table { min-width: 620px; }
}
