/* Follow-up: only the home page and /teacherlist load these scoped rules. */
.home-refined .home-hero { padding: 48px 0 32px; }
.home-refined .home-hero-copy { max-width: 800px; }
.home-refined .home-lead { max-width: 720px; margin-bottom: 16px; }
.home-refined .home-service-note { max-width: 720px; color: var(--text-muted); font-size: 13px; margin: 0; }
.home-refined .home-section { padding: 24px 0; }
.home-refined .home-section > .container { padding-top: 24px; }
.home-refined .home-heading-with-link { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.home-refined .home-heading-with-link > a { font-size: 14px; padding: 8px 0; white-space: nowrap; }
.home-refined .home-flow-steps { list-style: none; counter-reset: flow; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-refined .home-flow-steps > li { counter-increment: flow; position: relative; padding: 16px 0 0 32px; border-top: 1px solid var(--border-color); }
.home-refined .home-flow-steps > li::before { content: counter(flow, decimal-leading-zero); position: absolute; top: 18px; left: 0; color: var(--text-muted); font-size: 12px; }
.home-refined .home-flow-steps h3 { font-size: 17px; margin: 0 0 8px; }
.home-refined .home-flow-steps p { font-size: 14px; color: var(--text-muted); margin: 0; }
.home-refined .home-purpose-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.home-refined .home-purpose-groups > nav { display: block; }
.home-refined .home-purpose-groups h3 { font-size: 18px; margin: 0 0 16px; }
.home-refined .home-purpose-groups ul { list-style: none; padding: 0; margin: 0; }
.home-refined .home-purpose-groups li { border-top: 1px solid var(--border-color); }
.home-refined .home-purpose-groups a { display: block; padding: 12px 0; min-height: 44px; font-size: 14px; line-height: 1.8; }
.home-refined .home-article-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.home-refined .home-article-links > a { border-top: 1px solid var(--border-color); padding: 20px 0; display: block; text-decoration: none; }
.home-refined .home-article-links h3 { font-size: 17px; margin: 0 0 8px; }
.home-refined .home-article-links p { font-size: 14px; color: var(--text-muted); margin: 0; }
.home-refined .home-article-links > a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.home-refined .home-guide-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-refined .home-guide-other { display: block; margin-top: 24px; }
.home-refined .home-guide-other > h3 { font-size: 14px; color: var(--text-muted); margin: 0 0 12px; }
.home-refined .home-guide-compact-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.home-refined .home-guide-compact-links li { min-width: 0; border-top: 1px solid var(--border-color); }
.home-refined .home-guide-compact-links a { display: block; min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.7; text-decoration: none; }
.home-refined .home-guide-compact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-refined .home-latest-track:focus-visible, .home-refined a:focus-visible { outline: 3px solid #537795; outline-offset: 2px; }

/* Heading hierarchy: these two sections only, including overrides of old mobile rules. */
.home-refined #home-purposes .home-section-heading,
.home-refined #home-guides .home-section-heading { margin-bottom: 28px; }
.home-refined #home-purposes h2,
.home-refined #home-guides h2 { font-size: 24px; font-weight: 700; color: #243645; line-height: 1.5; }
.home-refined #home-purposes h3,
.home-refined #home-guides h3 { font-size: 16px; font-weight: 500; color: #626B71; line-height: 1.5; margin: 0 0 12px; }
.home-refined #home-guides a { color: #243645; }
.home-refined #home-guides a h3 { color: #243645; text-decoration: underline; text-underline-offset: 4px; }
.home-refined #home-guides .home-guide-compact-links a { text-decoration: underline; text-underline-offset: 4px; }

.teacher-listing-page .listing-description { margin: 12px 0 8px; }
.teacher-listing-page .listing-benefits { margin: 0; text-align: left; font-size: 12px; color: var(--text-muted); }

@media (max-width: 767.98px) {
  .home-refined .home-hero { padding: 24px 0; }
  .home-refined .home-hero-title { font-size: 28px; margin: 12px 0 16px; }
  .home-refined .home-hero-actions { margin-top: 20px; }
  .home-refined .home-hero-actions .btn { flex: 1 1 auto; }
  .home-refined .home-section { padding: 16px 0; }
  .home-refined .home-section-heading { margin-bottom: 16px; }
  .home-refined .home-heading-with-link > a { font-size: 12px; }
  .home-refined .home-section-heading h2 { font-size: 20px; }
  .home-refined .home-flow-steps { grid-template-columns: 1fr; gap: 12px; }
  .home-refined .home-flow-steps > li { padding-top: 12px; }
  .home-refined .home-flow-steps > li::before { top: 14px; }
  .home-refined .home-purpose-groups, .home-refined .home-article-links { grid-template-columns: 1fr; gap: 24px; }
  .home-refined .home-article-links { gap: 0; }
  .home-refined .home-guide-compact-links { grid-template-columns: 1fr; gap: 0; }
  .home-refined #home-purposes h2,
  .home-refined #home-guides h2 { font-size: 22px; }
  .home-refined #home-purposes .home-purpose-groups { gap: 32px; }
  .home-refined #home-guides .home-guide-other { margin-top: 32px; }
  .refined-listing-page { margin-top: 16px; }
  .refined-listing-page .listing-header h1 { font-size: 24px; margin-bottom: 8px; }
  .teacher-listing-page .listing-description { font-size: 14px; line-height: 1.7; margin: 8px 0; }
  .refined-listing-page .listing-search { margin-bottom: 16px; }
  .refined-listing-page .listing-results-heading { gap: 8px; padding-bottom: 12px; }
  .refined-listing-page .listing-order, .refined-listing-page .listing-count { font-size: 12px; }
}

@media (min-width: 768px) {
  .home-refined .home-latest .home-latest-actions { display: none; }
}
