.bank-ranking {
  scroll-margin-top: 7rem;
}
.ranking-heading h2 {
  font-size: 1.25rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
  color: #0f172a;
}
.ranking-heading p,
.ranking-note,
.ranking-card p,
.ranking-card small,
.ranking-offers p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: #64748b;
}
.ranking-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.ranking-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.ranking-controls select {
  background: white;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.65rem;
  width: 100%;
  min-width: 0;
  font: inherit;
}
.ranking-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0;
  color: #334155;
  font-size: 0.85rem;
  cursor: pointer;
}
.ranking-mobile input {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.ranking-controls [hidden],
.bank-ranking [hidden] {
  display: none;
}
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
  align-items: start;
}
.ranking-card {
  min-width: 0;
  border: 1px solid #dbe3ef;
  border-top: 3px solid #94a3b8;
  border-radius: 0.8rem;
  padding: 1rem;
  background: #fff;
  overflow-wrap: anywhere;
}
.ranking-card.place-1 {
  border-top-color: #d6a528;
  background: #fffcf4;
}
.ranking-card.place-2 {
  border-top-color: #94a3b8;
}
.ranking-card.place-3 {
  border-top-color: #c58c60;
}
.ranking-card > * + * {
  margin-top: 0.5rem;
}
.ranking-card h3 {
  font-size: 1rem;
  font-weight: 750;
  color: #0f172a;
}
.ranking-place {
  font-size: 0.75rem;
  font-weight: 650;
  color: #475569;
}
.ranking-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 750;
  color: #0f172a;
}
.ranking-card a,
.bank-ranking summary {
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}
.ranking-card small,
.ranking-offers small {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}
.ranking-note {
  margin: 0.75rem 0;
}
.ranking-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  background: #f8fafc;
  border-radius: 0.6rem;
}
.ranking-offers,
.ranking-excluded {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}
.ranking-excluded p {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}
.ranking-offers > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.ranking-offers article {
  border: 1px solid #dbe3ef;
  border-radius: 0.6rem;
  padding: 0.8rem;
  min-width: 0;
}
.ranking-offers strong {
  color: #334155;
  font-size: 0.85rem;
}
.ranking-story {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}
.score-primary {
  margin: 1rem 0;
}
.score-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.score-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score-fields label,
.score-conditions label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #334155;
}
.score-fields input,
.score-fields select,
.score-conditions select,
.score-conditions input[type="number"] {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.6rem;
  min-width: 0;
  width: 100%;
  color: #0f172a;
}
.score-fields input:invalid,
.score-conditions input:invalid {
  border-color: #dc2626;
}
.score-settings {
  margin: 0.75rem 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.score-settings > summary {
  cursor: pointer;
}
.score-settings > summary + * {
  margin-top: 1rem;
}
.score-preferences {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
label.score-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.score-check input {
  margin-top: 0.25rem;
  width: auto;
  flex: 0 0 auto;
}
.score-conditions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.score-conditions article {
  border: 1px solid #dbe3ef;
  border-radius: 0.7rem;
  padding: 0.9rem;
  min-width: 0;
}
.score-conditions article > * + * {
  margin-top: 0.7rem;
}
.score-conditions p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #64748b;
}
.score-card progress {
  display: block;
  width: 100%;
  height: 0.35rem;
  accent-color: #2563eb;
}
.score-card progress::-webkit-progress-value {
  background: #2563eb;
}
.score-card progress::-webkit-progress-bar {
  background: #e2e8f0;
}
.score-card .score-value {
  color: #1d4ed8;
  font-size: 1.45rem;
}
.score-card .score-coverage {
  font-size: 0.75rem;
}
.score-card .score-cost {
  font-weight: 650;
  color: #334155;
}
.score-breakdown {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.7rem;
}
.score-breakdown > * + * {
  margin-top: 0.7rem;
}
.score-fact a {
  font-size: 0.7rem;
}
.score-card .score-offer-applied {
  color: #166534;
}
.score-scope {
  margin-top: 1rem;
}
@media (max-width: 700px) {
  .score-settings {
    padding: 0.4rem 0;
    margin: 0.5rem 0;
  }
  .score-fields,
  .score-conditions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .score-conditions {
    grid-template-columns: 1fr;
  }
  .score-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .ranking-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ranking-controls .ranking-criterion {
    grid-column: 1 / -1;
  }
  .ranking-grid,
  .ranking-offers > div {
    grid-template-columns: 1fr;
  }
  .ranking-card {
    padding: 0.9rem;
  }
}
