﻿:root {
  --bg: #08141f;
  --panel: rgba(9, 28, 43, 0.82);
  --panel-soft: rgba(13, 36, 52, 0.68);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f7f4ea;
  --muted: #a4b9c7;
  --accent: #f6c65b;
  --accent-2: #7ad3c8;
  --danger: #ff8c79;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(246, 198, 91, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(122, 211, 200, 0.18), transparent 28%),
    linear-gradient(180deg, #0b1722, #061019 48%, #08141f);
  min-height: 100vh;
}
.shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; }
.hero-copy, .metric-card, .panel {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border-radius: 24px;
}
.hero-copy { padding: 30px; }
.eyebrow, .panel-kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--accent-2); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 0.96; margin-bottom: 18px; }
.hero-text { max-width: 56ch; color: var(--muted); line-height: 1.7; }
.mode-hint { margin-top: 14px; color: var(--accent); font-size: 0.95rem; }
.hero-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 152px; }
.metric-card.main { grid-column: span 2; background: linear-gradient(145deg, rgba(246, 198, 91, 0.18), rgba(9, 28, 43, 0.8)), var(--panel); }
.metric-card strong { font-size: clamp(1.8rem, 4vw, 3rem); margin: 10px 0; }
.metric-label, .hint, .status-note, .metric-card span:last-child { color: var(--muted); }
.freshness-badge {
  margin-top: 8px;
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
}
.freshness-badge.fresh {
  color: #9de6dd;
  background: rgba(122, 211, 200, 0.13);
  border-color: rgba(122, 211, 200, 0.24);
}
.freshness-badge.warn {
  color: #ffd9a1;
  background: rgba(246, 198, 91, 0.12);
  border-color: rgba(246, 198, 91, 0.25);
}
.freshness-badge.stale {
  color: #ffb7a8;
  background: rgba(255, 140, 121, 0.12);
  border-color: rgba(255, 140, 121, 0.25);
}
.dashboard { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.panel { padding: 24px; }
.chart-panel { grid-column: span 6; }
.status-panel { grid-column: span 4; }
.table-panel { grid-column: span 8; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.ghost-btn {
  border: 1px solid rgba(246, 198, 91, 0.35);
  background: rgba(246, 198, 91, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}
.ghost-btn:hover { background: rgba(246, 198, 91, 0.18); }
.ghost-btn.secondary {
  border-color: rgba(122, 211, 200, 0.35);
  background: rgba(122, 211, 200, 0.08);
}
.ghost-btn.secondary:hover {
  background: rgba(122, 211, 200, 0.16);
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.segmented-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.segmented-btn.active {
  background: rgba(122, 211, 200, 0.18);
  color: var(--text);
}
.chart-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
}
.chart-svg { width: 100%; height: 320px; display: block; touch-action: none; cursor: crosshair; user-select: none; }
.chart-svg.is-panning { cursor: grabbing; }
.chart-meta { margin-top: 12px; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }
.chart-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.chart-grid-strong { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.2; }
.chart-axis { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1.2; }
.chart-area-gold { fill: rgba(246, 198, 91, 0.16); }
.chart-line-gold { fill: none; stroke: #f6c65b; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area-teal { fill: rgba(122, 211, 200, 0.12); }
.chart-line-teal { fill: none; stroke: #7ad3c8; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-point { stroke: rgba(8, 20, 31, 0.5); stroke-width: 0.6; }
.chart-label { fill: #a4b9c7; font-size: 11px; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.chart-empty { fill: #a4b9c7; font-size: 16px; text-anchor: middle; }
.chart-crosshair { stroke: rgba(255,255,255,0.25); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-focus-dot { stroke: #08141f; stroke-width: 1.4; }
.chart-tooltip-bg { fill: rgba(5, 13, 20, 0.92); stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.chart-tooltip-text { fill: #f7f4ea; font-size: 12px; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 16px; }
.status-grid div, .table-wrap { background: var(--panel-soft); border: 1px solid var(--border); border-radius: 18px; }
.status-grid div { padding: 18px; }
.status-grid span { display: block; color: var(--muted); margin-bottom: 8px; }
.status-grid strong { font-size: 1rem; }
.status-note { line-height: 1.7; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { position: sticky; top: 0; background: rgba(7, 22, 33, 0.96); z-index: 1; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.positive { color: var(--accent-2); }
.negative { color: var(--danger); }
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: rgba(6, 16, 25, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f7f4ea;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 980px) {
  .hero, .dashboard { grid-template-columns: 1fr; }
  .chart-panel, .status-panel, .table-panel { grid-column: span 1; }
  .hero-panels { grid-template-columns: 1fr; }
  .metric-card.main { grid-column: span 1; }
  .status-grid { grid-template-columns: 1fr; }
  .panel-head { align-items: flex-start; flex-direction: column; }
}

.opinions-panel {
  grid-column: span 12;
}

.opinions-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.opinion-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 12px;
}

.opinion-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.opinion-source {
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.opinion-date {
  color: var(--muted);
  font-size: 12px;
}

.opinion-name {
  font-weight: 600;
  margin-bottom: 8px;
}

.opinion-text {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 14px;
}

.opinion-tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text);
}

.opinion-link {
  margin-left: 8px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .opinions-list {
    grid-template-columns: 1fr;
  }
}

.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-hero {
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.landing-copy {
  max-width: 920px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.landing-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(140deg, rgba(246, 198, 91, 0.08), rgba(122, 211, 200, 0.08));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.landing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 211, 200, 0.35);
}

.landing-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.landing-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
}

.top-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.top-nav a:hover {
  color: var(--text);
  border-color: rgba(122, 211, 200, 0.38);
}

.chart-area-silver {
  fill: rgba(210, 221, 231, 0.18);
}

.chart-line-silver {
  fill: none;
  stroke: #d2dde7;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-area-silver-soft {
  fill: rgba(210, 221, 231, 0.1);
}

@media (max-width: 980px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}

.chart-area-platinum {
  fill: rgba(184, 179, 255, 0.18);
}

.chart-line-platinum {
  fill: none;
  stroke: #b8b3ff;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-area-platinum-soft {
  fill: rgba(184, 179, 255, 0.1);
}

.chart-area-palladium {
  fill: rgba(255, 185, 143, 0.18);
}

.chart-line-palladium {
  fill: none;
  stroke: #ffb98f;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-area-palladium-soft {
  fill: rgba(255, 185, 143, 0.1);
}

.recommendation-panel {
  grid-column: span 12;
}

.market-hero {
  grid-template-columns: 1fr;
}

.market-copy {
  max-width: 1080px;
}

.market-dashboard {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.market-filter-panel {
  grid-column: span 12;
}

.market-list-panel {
  grid-column: span 12;
}

.market-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.market-filter-row label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.market-filter-row select {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 16, 25, 0.7);
  color: var(--text);
  padding: 10px 12px;
}

.market-opinions-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .market-opinions-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .market-filter-row {
    grid-template-columns: 1fr;
  }

  .market-opinions-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .landing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Institutional theme upgrade */
:root {
  --text: #f1efe9;
  --muted: #b2bece;
  --accent: #d6b36a;
  --accent-2: #8db8d7;
  --border: rgba(214, 179, 106, 0.22);
  --panel: linear-gradient(160deg, rgba(10, 24, 38, 0.9), rgba(8, 20, 32, 0.86));
  --panel-soft: rgba(11, 27, 40, 0.74);
}

body {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(214, 179, 106, 0.16), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(141, 184, 215, 0.14), transparent 34%),
    linear-gradient(170deg, #08111b, #071421 52%, #081521);
}

h1, h2, h3 {
  letter-spacing: 0.02em;
  font-weight: 700;
}

.hero-copy,
.metric-card,
.panel,
.landing-card,
.status-grid div,
.table-wrap,
.opinion-card,
.compliance-card {
  border-color: var(--border);
  background: var(--panel);
}

.authority-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.official-seal {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(214, 179, 106, 0.45);
  color: #f4e0ad;
  background: rgba(214, 179, 106, 0.12);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.compliance-card {
  border-radius: 18px;
  padding: 16px;
}

.compliance-card h3 {
  margin: 0 0 10px;
  color: #e9d9ab;
  font-size: 16px;
}

.compliance-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.landing-card {
  background: linear-gradient(150deg, rgba(214, 179, 106, 0.12), rgba(24, 48, 70, 0.34));
}

.top-nav a {
  border-color: rgba(214, 179, 106, 0.36);
}

.top-nav a:hover {
  border-color: rgba(214, 179, 106, 0.68);
}

thead th {
  background: rgba(6, 18, 28, 0.96);
}

@media (max-width: 980px) {
  .compliance-grid {
    grid-template-columns: 1fr;
  }
}
