/*
 * Listing cards on /guides/writing-a-listing/ (templates/core/guides/_listing_cards.html).
 * Two columns from 720px (weak card narrower, both top-aligned, the strong card is the hero), stacked below.
 * Display only. Colours come from --ds-* tokens, so dark mode follows; lime is only ever a fill with ink text
 * (or the number on the ink circle), never text on white.
 */

.guide-cards {
  margin: 0;
  padding: 0;
  font-family: var(--ds-font-family);
  color: var(--ds-text);
}

.guide-cards__columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-space-32);
  align-items: start;
}

@media (min-width: 720px) {
  .guide-cards__columns {
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
    gap: var(--ds-space-32);
  }
}

@media (min-width: 1024px) {
  .guide-cards__columns {
    gap: var(--ds-space-48);
  }
}

.guide-cards__column {
  min-width: 0;
}

/* Column label: dot + eyebrow */

.guide-cards__label {
  display: flex;
  align-items: center;
  gap: var(--ds-space-8);
  margin: 0 0 var(--ds-space-16);
  color: var(--ds-text-muted);
}

.guide-cards__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-text-secondary);
}

.guide-cards__dot--strong {
  background: var(--ds-text);
}

.guide-cards__column--strong .guide-cards__label {
  color: var(--ds-text);
}

/* Cards */

.guide-cards__card {
  min-width: 0;
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-24);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-card);
}

.guide-cards__card--weak {
  padding: var(--ds-space-24);
}

.guide-cards__card--strong {
  padding: var(--ds-space-24) var(--ds-space-24) var(--ds-space-16);
}

@media (min-width: 720px) {
  .guide-cards__card--weak {
    padding: 28px;
  }

  .guide-cards__card--strong {
    padding: 28px var(--ds-space-32) var(--ds-space-24);
  }
}

.guide-cards__title {
  overflow-wrap: anywhere;
}

.guide-cards__body {
  margin: var(--ds-space-16) 0 var(--ds-space-16);
  color: var(--ds-text-muted);
}

.guide-cards__tag {
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
  font-weight: 600;
}

/* Weak card notes */

.guide-cards__notes {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-16);
  margin: var(--ds-space-24) 0 0;
  padding: 0;
  list-style: none;
}

.guide-cards__note {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-12);
}

.guide-cards__note-number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-pill);
  color: var(--ds-text-muted);
  font-size: var(--ds-type-small-size);
  line-height: 1;
}

.guide-cards__note-text {
  min-width: 0;
  color: var(--ds-text-muted);
  line-height: var(--ds-type-button-leading);
  overflow-wrap: anywhere;
}

/* Strong card header */

.guide-cards__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-16);
}

.guide-cards__heading {
  min-width: 0;
}

.guide-cards__subline {
  margin: var(--ds-space-4) 0 0;
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}

.guide-cards__badge {
  flex: none;
  font-weight: 600;
  letter-spacing: var(--ds-type-eyebrow-tracking);
  text-transform: uppercase;
}

/* Numbered sections */

.guide-cards__sections {
  margin: var(--ds-space-24) 0 0;
  padding: 0;
  list-style: none;
}

.guide-cards__section {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--ds-space-12);
  padding: var(--ds-space-16) 0;
  border-top: 1px solid var(--ds-border-subtle);
}

.guide-cards__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-inverse);
  box-shadow: inset 0 0 0 1px var(--ds-inverse-edge);
  color: var(--ds-lime);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.guide-cards__section-body {
  min-width: 0;
  container-type: inline-size;
}

.guide-cards__eyebrow {
  margin: 0 0 6px;
  padding-top: var(--ds-space-4);
  color: var(--ds-text);
}

.guide-cards__text {
  margin: 0;
  overflow-wrap: anywhere;
}

.guide-cards__highlight {
  padding: 0 var(--ds-space-4);
  border-radius: var(--ds-space-4);
  background: var(--ds-accent-soft);
  color: var(--ds-text);
  font-weight: 700;
}

.guide-cards__subtext {
  margin: var(--ds-space-4) 0 0;
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}

/* Metric tiles: 2x2, four across once the section has room */

.guide-cards__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container (min-width: 440px) {
  .guide-cards__metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.guide-cards__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-4);
  min-width: 0;
  padding: 10px var(--ds-space-12);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-12);
  background: var(--ds-surface-subtle);
  text-align: center;
}

.guide-cards__metric-caption {
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}

/* Footer: disclaimer and the display-only Apply */

.guide-cards__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-12);
  padding-top: var(--ds-space-16);
  border-top: 1px solid var(--ds-border-subtle);
}

.guide-cards__disclaimer {
  color: var(--ds-text-muted);
}

/* A span, not a control: keep the button look, drop the pointer and the hover tint */
.guide-cards__apply,
.guide-cards__apply:hover {
  background: var(--ds-button-primary-bg);
  color: var(--ds-button-primary-text);
  cursor: default;
  transform: none;
}
