.disease-app {
  min-height: 100vh;
}

.disease-app :focus-visible {
  outline: 3px solid #78958b;
  outline-offset: 4px;
}

.directory-hero {
  background: linear-gradient(145deg, #f7f8f4 0%, #e7eee9 100%);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: clamp(38px, 6vw, 88px);
  grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr);
  margin: 0 auto;
  max-width: 1420px;
  padding: clamp(62px, 8vw, 112px) clamp(24px, 6vw, 88px);
}

.directory-intro h1,
.detail-hero h1,
.status-page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
  margin: 0;
}

.directory-intro > p:last-child {
  color: var(--ink-soft);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
  margin: 25px 0 0;
  max-width: 560px;
}

.search-form {
  align-self: center;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(16, 47, 60, .09);
  padding: clamp(24px, 4vw, 38px);
  position: relative;
}

.search-form > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.search-control {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-control input {
  appearance: none;
  background: #fbfcfa;
  border: 1px solid rgba(16, 47, 60, .24);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  min-height: 55px;
  min-width: 0;
  padding: 0 21px;
  width: 100%;
}

.search-control input:focus {
  background: var(--white);
  border-color: var(--sage-deep);
}

.search-control .button {
  cursor: pointer;
}

.search-suggestions {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(16, 47, 60, .15);
  left: clamp(24px, 4vw, 38px);
  max-height: min(480px, 60vh);
  overflow-y: auto;
  position: absolute;
  right: clamp(24px, 4vw, 38px);
  top: calc(100% - 22px);
  z-index: 20;
}

.search-suggestion {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 15px 18px;
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion[aria-selected="true"] {
  background: #edf3ef;
}

.suggestion-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
}

.suggestion-secondary {
  color: var(--sage-deep);
  font-size: 12px;
  font-weight: 700;
}

.suggestion-excerpt {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.search-status {
  color: var(--ink-soft);
  font-size: 12px;
  margin: 9px 2px 0;
  min-height: 15px;
}

.public-alert,
.results-section,
.az-section {
  margin: 0 auto;
  max-width: 1244px;
}

.public-alert {
  background: #fff4e7;
  border-left: 4px solid #a25f1d;
  margin-top: 34px;
  padding: 18px 22px;
}

.results-section,
.az-section {
  padding: clamp(66px, 8vw, 105px) 24px;
}

.section-heading.compact {
  margin-bottom: 34px;
}

.section-heading.compact h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -.035em;
  margin: 0;
}

.result-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.disease-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: clamp(24px, 3vw, 34px);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.disease-card:hover {
  border-color: var(--sage-deep);
  box-shadow: 0 18px 42px rgba(16, 47, 60, .08);
  transform: translateY(-3px);
}

.disease-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  margin: 0 0 6px;
}

.disease-card p {
  color: var(--ink-soft);
  line-height: 1.62;
  margin: 14px 0 0;
}

.disease-card .medical-name {
  color: var(--sage-deep);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.card-link {
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-top: auto;
  padding-top: 26px;
  text-transform: uppercase;
}

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

.az-list a {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 108px;
  padding: 22px;
}

.az-list a:hover,
.az-list a:focus-visible {
  background: #edf3ef;
  border-color: var(--sage-deep);
}

.az-list strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
}

.az-list span {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 7px;
}

.empty-state,
.empty-note {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px;
}

.empty-state h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 10px;
}

.empty-state p,
.empty-note {
  color: var(--ink-soft);
  line-height: 1.6;
}

.disease-detail {
  margin: 0 auto;
  max-width: 1244px;
  padding: 28px 24px 100px;
}

.breadcrumbs {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
  margin-bottom: 48px;
}

.breadcrumbs a {
  border-bottom: 1px solid var(--line);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.category-list li {
  background: var(--sage);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.detail-hero {
  border-bottom: 1px solid var(--line);
  padding: 24px 0 clamp(48px, 7vw, 78px);
}

.detail-secondary {
  color: var(--sage-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 3vw, 34px);
  font-style: italic;
  margin: 16px 0 0;
}

.terminology {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin-top: 30px;
}

.terminology span {
  display: flex;
  flex-direction: column;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.terminology small {
  color: var(--ink-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.detail-lead {
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.7;
  margin-top: 34px;
  max-width: 900px;
}

.detail-lead p {
  margin: 0;
}

.detail-layout {
  align-items: start;
  display: grid;
  gap: clamp(48px, 7vw, 90px);
  grid-template-columns: minmax(0, 1fr) 330px;
  padding-top: clamp(50px, 7vw, 78px);
}

.content-section {
  border-bottom: 1px solid var(--line);
  padding: 0 0 42px;
}

.content-section + .content-section {
  padding-top: 42px;
}

.content-section h2,
.appointment-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 500;
  letter-spacing: -.025em;
  margin: 0 0 20px;
}

.content-section p {
  color: #294750;
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.appointment-card {
  background: var(--ink);
  color: var(--white);
  padding: 30px;
  position: sticky;
  top: 24px;
}

.appointment-card .overline {
  color: var(--sage);
}

.appointment-card .overline span {
  background: var(--sage);
}

.appointment-card h2 {
  font-size: 29px;
}

.appointment-card > p:not(.overline) {
  color: rgba(255, 255, 255, .7);
  line-height: 1.6;
}

.appointment-card .button {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
  margin-top: 12px;
  width: 100%;
}

.related-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-grid a {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.related-grid a:hover,
.related-grid a:focus-visible {
  border-color: var(--sage-deep);
  background: #edf3ef;
}

.related-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.related-grid span {
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 6px;
}

.professional-links-section {
  background: linear-gradient(135deg, #f4f8f5 0%, #edf3ef 100%);
  border: 1px solid #c8d8cf;
  box-shadow: inset 4px 0 0 var(--sage-deep);
  padding: clamp(22px, 4vw, 34px);
}

.professional-links-section .section-overline {
  color: var(--sage-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.professional-links-section .section-intro {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 18px;
}

.professional-links-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.professional-links-section li + li {
  margin-top: 9px;
}

.professional-links-section a {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 18px;
}

.professional-links-section a:hover,
.professional-links-section a:focus-visible {
  border-color: var(--sage-deep);
  background: #fff;
}

.professional-links-section a > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.professional-links-section small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
}

.review-date {
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px 22px;
  margin: 50px 0 0;
}

.medical-note {
  background: #e8efea;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  padding: 22px clamp(24px, 6vw, 88px);
  text-align: center;
}

.footer-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-actions a {
  border-bottom: 1px solid rgba(255, 255, 255, .6);
  font-size: 12px;
  font-weight: 700;
}

.footer-actions span {
  color: rgba(255, 255, 255, .61);
  font-size: 11px;
}

.status-page {
  margin: 0 auto;
  max-width: 900px;
  min-height: 58vh;
  padding: clamp(70px, 10vw, 140px) 24px;
  text-align: center;
}

.status-page h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.status-page > p:not(.status-code) {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
  margin: 24px auto 30px;
  max-width: 650px;
}

.status-code {
  color: var(--sage-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2em;
}

@media (max-width: 900px) {
  .directory-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .directory-hero {
    gap: 42px;
  }

  .appointment-card {
    position: static;
  }

  .az-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .directory-hero {
    padding-bottom: 58px;
    padding-top: 48px;
  }

  .search-control,
  .result-grid,
  .az-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .search-control .button {
    width: 100%;
  }

  .results-section,
  .az-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .disease-detail {
    padding-left: 18px;
    padding-right: 18px;
  }

  .breadcrumbs {
    margin-bottom: 34px;
  }

  .terminology {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section p {
    font-size: 16px;
  }

  .appointment-card {
    padding: 25px;
  }

  .footer-actions {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .disease-app .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .disease-app .site-nav {
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

  .search-form {
    padding: 20px;
  }

  .search-suggestions {
    left: 20px;
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .disease-card {
    transition: none;
  }
}
