/* Минимальный CSS — читаемая типографика, никакого фреймворка. */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fafafa;
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.site-header {
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.site-header h1 a {
  color: #1a1a1a;
  text-decoration: none;
}

.site-header .tagline {
  margin: 0.25rem 0 0;
  color: #666;
  font-size: 0.95rem;
}

/* Currency selector */
.currency-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.currency-selector .label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
  margin-right: 0.25rem;
}

.cur-link {
  color: #2e60a0;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.cur-link:hover {
  background: #f0f4f8;
  text-decoration: none;
}

.cur-link.active {
  background: #2e60a0;
  color: #fff;
  font-weight: 600;
}

/* Reference (CBCG) block */
.reference {
  background: #f0f4f8;
  border-left: 4px solid #4a7ab8;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.reference h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #4a7ab8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reference-rate {
  margin: 0;
  font-size: 1.1rem;
}

.reference-inverse {
  color: #666;
  margin-left: 0.5rem;
  font-size: 0.95rem;
}

.reference .meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #888;
}

/* Comparison */
.comparison h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.legend {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  background: #fffbe6;
  border-left: 3px solid #d4b73a;
  border-radius: 0 3px 3px 0;
}

table.rates {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

table.rates th,
table.rates td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

table.rates th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.9rem;
}

table.rates td.num,
table.rates th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.rates tbody tr:last-child td { border-bottom: none; }

table.rates tbody tr:hover {
  background: #f8f9fb;
}

td.bank {
  font-weight: 500;
}

td.num.best {
  background: #e7f5e7;
  font-weight: 700;
  color: #1d6f3a;
}

td.note {
  font-size: 0.88rem;
  color: #555;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  cursor: help;
  vertical-align: middle;
}

.badge.cash { background: #e7f0fa; color: #2e60a0; }
.badge.noncash { background: #f3e7fa; color: #6e2ea0; }

/* Stale markers */
.stale {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.85rem;
}
.stale-mid { color: #b8860b; }
.stale-bad { color: #b03030; font-weight: 600; }

.hint {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

.empty {
  text-align: center;
  color: #888;
  padding: 1.5rem;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 4px;
}

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.82rem;
  color: #888;
}

/* Responsive */
@media (max-width: 700px) {
  table.rates { font-size: 0.85rem; }
  table.rates th, table.rates td { padding: 0.4rem 0.4rem; }
  td.note { font-size: 0.78rem; }
}
