.symptom-finder {
  padding-block: clamp(52px, 7vw, 88px);
}

.symptom-finder__heading {
  margin-bottom: clamp(25px, 3.5vw, 42px);
}

.symptom-finder__heading .eyebrow {
  margin-bottom: 12px;
  text-transform: uppercase;
}

.symptom-finder__heading h2 {
  margin-bottom: 16px;
}

.symptom-finder__heading h2 span {
  color: var(--teal);
}

.symptom-finder__intro {
  max-width: 66ch;
  margin-bottom: 0;
  color: var(--muted);
}

.symptom-finder__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.symptom-finder__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 4px 9px;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) var(--pale);
}

.symptom-finder__tab {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--pale);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.35;
  text-align: left;
}

.symptom-finder__tab svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--teal);
  stroke-width: 2.3px;
}

.symptom-finder__tab:hover {
  border-color: var(--teal);
}

.symptom-finder__tab[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}

.symptom-finder__tab[aria-selected="true"] svg {
  color: inherit;
}

.symptom-finder__tab:focus-visible {
  outline-offset: 1px;
}

.symptom-finder__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px clamp(22px, 3vw, 38px);
  padding: clamp(16px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: clamp(12px, 1.5vw, 20px);
  background: var(--pale);
}

.symptom-finder__panel:not([role]) + .symptom-finder__panel {
  margin-top: 20px;
}

.symptom-finder__lead h3 {
  margin-bottom: 12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  letter-spacing: -.025em;
}

.symptom-finder__lead p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.symptom-finder__media {
  margin: 0;
}

.symptom-finder__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

.symptom-finder__image-credit {
  margin-top: 6px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
  text-align: end;
}

.symptom-finder__panel h4 {
  margin: 0 0 9px;
  color: var(--teal);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.symptom-finder__treatments,
.symptom-finder__links {
  padding: 0;
  margin: 0;
  list-style: none;
}

.symptom-finder__treatments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.symptom-finder__treatments a,
.symptom-finder__links a {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.45;
  text-decoration: none;
}

.symptom-finder__treatments a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
}

.symptom-finder__treatments svg {
  flex: none;
  width: 21px;
  height: 21px;
  color: var(--teal);
}

.symptom-finder__links {
  display: grid;
  gap: 7px;
}

.symptom-finder__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
}

.symptom-finder__treatments a:hover,
.symptom-finder__links a:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: underline;
}

.symptom-finder__links a span[aria-hidden] {
  flex: none;
  color: var(--teal);
}

@media (min-width: 1024px) {
  .symptom-finder__layout:has(.symptom-finder__tabs:not([hidden])) {
    grid-template-columns: clamp(194px, 19.5vw, 240px) minmax(0, 1fr);
    gap: clamp(16px, 2.1vw, 28px);
  }

  .symptom-finder__tabs {
    flex-direction: column;
    align-self: start;
    overflow: visible;
    padding: 0;
  }

  .symptom-finder__tab {
    border-color: transparent;
    background: transparent;
  }
}

@media (max-width: 759px) {
  .symptom-finder__panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .symptom-finder__media {
    grid-row: 1;
  }
}

@media (forced-colors: active) {
  .symptom-finder__tab[aria-selected="true"] {
    border-color: Highlight;
    outline: 1px solid Highlight;
  }
}
