/* Crafting & Combination Success Rates page — scoped styles. Site tokens
   (colors, .white-box, .page-title) come from style.css; this file only adds
   page-specific layout. */

.rates-page .rates-updated {
  font-size: 0.82rem;
  opacity: 0.6;
  margin-top: -0.25rem;
}

.rates-page .rates-note {
  font-size: 0.85rem;
  opacity: 0.65;
  font-style: italic;
  margin-top: 0.6rem;
}

/* Color legend under the intro */
.rates-page .rates-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
}

.rates-page .rates-legend-label {
  font-size: 0.82rem;
  opacity: 0.65;
  margin-left: 0.2rem;
}

/* Color-graded rate badges — the core "read it at a glance" device */
.rates-page .rate-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
}

.rates-page .rate-badge--ok {
  background: rgba(217, 158, 58, 0.2);
  color: #f0c374;
  border: 1px solid rgba(217, 158, 58, 0.35);
}

.rates-page .rate-badge--good {
  background: rgba(74, 157, 110, 0.2);
  color: #8fe0ac;
  border: 1px solid rgba(74, 157, 110, 0.35);
}

.rates-page .rate-badge--great {
  background: rgba(46, 196, 110, 0.25);
  color: #6ef5a0;
  border: 1px solid rgba(46, 196, 110, 0.45);
}

/* Section anchors shouldn't hide under the sticky header when jumped to */
.rates-page [id^="rates-"] {
  scroll-margin-top: 90px;
}

/* Quick-nav overview */
.rates-page .rates-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.rates-page .rates-toc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--brand-1, #c33);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rates-page .rates-toc-link:hover,
.rates-page .rates-toc-link:focus-visible {
  background: rgba(214, 31, 43, 0.14);
  border-color: var(--brand-1, #c33);
  transform: translateX(2px);
  outline: none;
}

.rates-page .rates-toc-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.rates-page .rates-toc-count {
  font-size: 0.76rem;
  opacity: 0.6;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

/* Rate tables */
.rates-page .rates-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.rates-page .rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.rates-page .rates-table th,
.rates-page .rates-table td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.rates-page .rates-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.65;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.rates-page .rates-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.rates-page .rates-table td:first-child {
  white-space: normal;
  min-width: 180px;
  font-weight: 600;
}

@media (max-width: 560px) {
  .rates-page .rates-toc {
    grid-template-columns: 1fr;
  }
}
