:root {
  --bg: #0e1117;
  --card: #161b22;
  --border: #232a35;
  --text: #e6edf3;
  --muted: #9ba3af;

  --green: #2ecc71;
  --red: #e74c3c;
  --yellow: #f1c40f;
  --blue: #4ea1ff;

  --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-hard: 0 18px 50px rgba(0,0,0,0.6);
}

/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont;
  background: var(--bg);
  color: var(--text);
}

/* ================= HEADER ================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  background: #0b0f14;
  border-bottom: 1px solid var(--border);
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

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

.last-updated {
  font-size: 12px;
  color: var(--muted);
}

/* ================= LAYOUT ================= */
.container {
  max-width: 1480px;
  margin: auto;
  padding: 42px 36px 64px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.full-width {
  width: 100%;
}

/* ================= CARDS ================= */
.card {
  background: linear-gradient(180deg, #161b22 0%, #12161d 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hard);
}

.card h2 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card h4 {
  font-size: 14px;
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--muted);
}

/* ================= TABLES ================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

th, td {
  padding: 11px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

tr:hover {
  background: rgba(255,255,255,0.03);
}

/* ================= FORMS ================= */
select {
  width: 100%;
  padding: 12px;
  background: #0b0f14;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 18px;
}

/* ================= COLORS ================= */
.up {
  color: var(--green);
  font-weight: 700;
}

.down {
  color: var(--red);
  font-weight: 700;
}

.neutral {
  color: var(--yellow);
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* ================= AD BANNER ================= */
.ad-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #101621, #0e1117);
  border: 1px dashed rgba(255,255,255,0.18);
}

.ad-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-left strong {
  display: block;
  font-size: 16px;
  margin-top: 6px;
}

.ad-left p {
  margin: 6px 0 0;
  color: var(--muted);
}

.ad-right a {
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(78,161,255,0.15);
  color: var(--blue);
}

/* ================= SMALL ================= */
small {
  color: var(--muted);
}
.metric-row {
  display: flex;
  gap: 16px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.metric {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}

.metric label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.metric span {
  font-size: 18px;
  font-weight: 700;
}
.rr-strong {
  box-shadow: 0 0 0 1px rgba(46,204,113,0.3),
              0 0 18px rgba(46,204,113,0.15);
}

.rr-weak {
  opacity: 0.7;
}
.section-divider {
  margin: 32px 0 12px;
  border-top: 1px dashed var(--border);
}
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(78,161,255,0.2);
}
.neutral {
  color: var(--yellow);
  font-weight: 700;
}
.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.glossary p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

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