/* Refinements to the published editorial theme. Keep older releases intact. */
.editorial-design {
  --focus-color: #96331d;
  caret-color: var(--orange);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.editorial-design :is(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 4px;
}
.editorial-design :is(.hero h1, .page-title, .section-title, .article-title, .article-list-title, .question-title, .article-view-title) {
  text-wrap: balance;
}
.editorial-design .hero h1 { letter-spacing: -.035em; }
.editorial-design :is(.stat-number, .pagination-page) { font-variant-numeric: tabular-nums; }
.editorial-design .search-input::placeholder { color: var(--muted); opacity: 1; }
.editorial-design .search-input { min-width: 0; }
.editorial-design :is(.mobile-menu-btn, .search-btn) { border-radius: 50%; }
.editorial-design .mobile-menu-btn[aria-expanded="true"] { background: var(--peach); }
.editorial-design .section-link { min-height: 44px; align-items: center; }
.editorial-design :is(.pagination-page, .pagination-btn) { min-width: 44px; min-height: 44px; }
.editorial-design .footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
.editorial-design .footer-links li { margin-bottom: 2px; }
.editorial-design .popular-questions li { padding-left: 26px; }
.editorial-design .popular-questions li::before {
  content: "";
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6d2c8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.editorial-design :is(.article-card, .article-list-item, .doctor-card-compact):focus-within {
  border-color: var(--focus-color);
}
.editorial-design :is(.doctor-name-compact, .doctor-about, .author-name, .article-list-title) { overflow-wrap: anywhere; }
.editorial-design .back-to-top { width: 48px; height: 48px; }
@media (hover: hover) {
  .editorial-design :is(.mobile-menu-btn, .search-btn):hover { background: var(--peach); }
}
@media (max-width: 968px) {
  /* Navigation stays usable when scripts are unavailable. */
  .editorial-design .header:not(.has-menu-js) .mobile-nav { display: block; }
  .editorial-design .mobile-nav a { min-height: 48px; display: flex; align-items: center; }
}
@media (max-width: 640px) {
  .editorial-design .section-header { align-items: center; }
  .editorial-design .section-title { font-size: 25px; }
  .editorial-design .section-link { font-size: 13px; max-width: none; white-space: nowrap; padding-block: 4px; }
  .editorial-design .hero-content { padding-top: 24px; padding-bottom: 20px; }
  .editorial-design .hero h1 { margin-bottom: 16px; }
  .editorial-design .hero-stats { margin-top: 18px; }
  .editorial-design .hero-art { width: 200px; max-width: 100%; height: 150px; margin-top: 8px; align-self: center; }
  .editorial-design .search-input { min-height: 46px; }
  /* Full-width titles keep long medical specialties away from the painted spot.
     Descriptions and the small illustration share the following row. */
  .editorial-design .page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 12px 16px;
    min-height: 145px;
    padding: 22px 20px;
  }
  .editorial-design .page-title {
    grid-column: 1 / -1;
    margin: 0;
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.12;
    hyphens: auto;
  }
  .editorial-design .page-description { grid-column: 1; }
  .editorial-design .page-header::after {
    position: static;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    width: 72px;
    height: 72px;
    transform: none;
  }
  .editorial-design .footer-links a { min-height: 44px; }
  .editorial-design .footer-section:has(.popular-questions) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-design .article-card:hover { transform: none; }
}
