.rmc-resources {
  box-sizing: border-box;
  margin-block: 0 clamp(32px, 4.5vw, 62px);
  padding: clamp(20px, 3.1vw, 42px);
  border: 1px solid #d4e1d8;
  border-radius: clamp(19px, 2.2vw, 28px);
  background: linear-gradient(125deg, #edf4ee, #f7f7ee);
}

.rmc-resources h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: var(--rmc-ink);
  font-size: clamp(1.48rem, 2.65vw, 2.2rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}

.rmc-resources h2::before {
  content: "";
  flex: 0 0 5px;
  align-self: stretch;
  border-radius: 10px;
  background: #228166;
}

.rmc-resources-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.15vw, 16px);
  margin: clamp(16px, 2.1vw, 26px) 0 0;
  padding: 0;
  list-style: none;
}

.rmc-resources-grid li { display: flex; min-width: 0; }

.rmc-portal .rmc-resource {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  grid-template-rows: auto 1fr auto;
  gap: 12px 6px;
  align-items: start;
  width: 100%;
  min-width: 0;
  padding: clamp(13px, 1.4vw, 19px);
  border: 1px solid #d7e4d9;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 3px rgb(23 56 45 / 3%);
  color: var(--rmc-ink);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.rmc-resource-icon, .rmc-resource-external {
  display: grid;
  place-items: center;
  color: #1a6351;
}

.rmc-resource-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #e5f0e6;
}

.rmc-resource-icon svg { width: 23px; height: 23px; }

.rmc-resource-external {
  width: 28px;
  height: 28px;
  border: 1px solid #e1e9e2;
  border-radius: 50%;
  background: #f4f8f3;
}

.rmc-resource-external svg { width: 16px; height: 16px; }

.rmc-resource strong, .rmc-resource-domain {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.rmc-resource strong {
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.38;
}

.rmc-resource-domain {
  color: #3b6255;
  font-size: .82rem;
  line-height: 1.25;
}

.rmc-resource:focus-visible {
  outline: 3px solid #228267;
  outline-offset: 3px;
}

.rmc-resource:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .rmc-portal .rmc-resource:hover {
    border-color: #75a494;
    box-shadow: 0 5px 16px rgb(23 56 45 / 10%);
  }
  .rmc-resource:hover .rmc-resource-external {
    border-color: #215c4e;
    background: #215c4e;
    color: #fff;
  }
  .rmc-resource:hover strong {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (max-width: 950px) {
  .rmc-resources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .rmc-resources-grid { grid-template-columns: minmax(0, 1fr); }
  .rmc-portal .rmc-resource {
    grid-template-columns: 40px minmax(0, 1fr) 28px;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: center;
  }
  .rmc-resource-icon { grid-row: 1 / -1; width: 40px; height: 40px; }
  .rmc-resource-external { grid-column: 3; grid-row: 1 / -1; }
  .rmc-resource strong, .rmc-resource-domain { grid-column: 2; }
}

.rmc-large-text .rmc-resources-grid { grid-template-columns: minmax(0, 1fr); }

@media (prefers-reduced-motion: reduce) {
  .rmc-portal .rmc-resource { transition: none; }
}
