body.directory-research-page { line-height: 1.8; }
body.directory-research-page .page-header { padding: 126px 24px 0; text-align: left; }
body.directory-research-page .page-header-inner { max-width: 1152px; }
body.directory-research-page .page-header-kicker { margin-bottom: 12px; font-size: 12px; font-weight: 500; letter-spacing: .08em; }
body.directory-research-page .page-header-title { font-size: clamp(30px, 3vw, 38px); font-weight: 600; line-height: 1.35; }
body.directory-research-page .page-header-sub { max-width: 760px; margin-top: 12px; color: var(--gray-500); font-size: 14px; line-height: 1.85; }
body.directory-research-page .section { padding: 52px 24px; }
body.directory-research-page #directory { padding-top: 28px; }
body.directory-research-page #directory > .section-header { margin-bottom: 20px; }
body.directory-research-page .section-title { font-size: 26px; font-weight: 600; line-height: 1.5; }
body.directory-research-page .directory-search-container { width: 100%; max-width: none; margin: 0 0 18px; }
body.directory-research-page .search-input { min-height: 54px; font-size: 16px; border-radius: 10px; }
body.directory-research-page .search-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,163,127,.1); }
body.directory-research-page .filter-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 28px; margin-bottom: 18px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--gray-50); }
body.directory-research-page #taxonomy-filters { display: contents; }
body.directory-research-page .filter-group { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px 8px; min-width: 0; min-height: 35px; padding-left: 108px; }
body.directory-research-page .filter-label { position: absolute; top: 7px; left: 0; width: 96px; margin: 0; color: var(--gray-500); font-size: 13px; font-weight: 500; line-height: 1.65; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
body.directory-research-page .filter-btn { min-height: 35px; max-width: 100%; padding: 6px 12px; border-color: var(--gray-200); border-radius: 7px; font-size: 13px; font-weight: 400; line-height: 1.6; text-align: left; white-space: normal; overflow-wrap: anywhere; }
body.directory-research-page .filter-btn.active { color: var(--white); background: var(--black); border-color: var(--black); font-weight: 500; }
body.directory-research-page .area-filter-btns { width: 100%; min-width: 0; gap: 7px 8px; }
body.directory-research-page .tax-legacy { margin: 0; font-size: 12px; line-height: 1.8; background: var(--white); }
body.directory-research-page .result-bar { min-height: 46px; padding: 5px 0; margin: 0 0 18px; gap: 16px; background: transparent; border-radius: 0; }
body.directory-research-page .result-count { font-size: 13px; font-weight: 400; color: var(--gray-500); }
body.directory-research-page .clear-filters-btn { min-height: 34px; padding: 6px 12px; font-size: 12px; font-weight: 400; border-radius: 7px; }
body.directory-research-page .clear-filters-btn[hidden] { display: none; }
body.directory-research-page #firm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
body.directory-research-page .firm-card { min-width: 0; padding: 25px; border-radius: 12px; box-shadow: none; }
body.directory-research-page .firm-card:hover { border-color: var(--gray-400); box-shadow: var(--shadow-sm); }
body.directory-research-page .firm-card.compare-selected { border-color: var(--black); }
body.directory-research-page .firm-card-row1 { gap: 10px; align-items: center; margin-bottom: 10px; }
body.directory-research-page .firm-card-name { flex: 1; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
body.directory-research-page .firm-card-arrow { top: 25px; right: 25px; width: 14px; height: 14px; }
body.directory-research-page .tax-badges { gap: 6px; margin-top: 5px; }
body.directory-research-page .tax-badge { padding: 4px 7px; border-radius: 5px; color: var(--gray-600) !important; border-color: var(--gray-200) !important; background: var(--gray-50) !important; font-size: 11px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
body.directory-research-page .tax-scope { margin: 8px 0 18px; color: var(--gray-500); font-size: 13px; line-height: 1.8; }
body.directory-research-page .firm-card-lines { gap: 9px; padding-top: 15px; margin-top: 0; margin-bottom: 0; border-top: 1px solid var(--gray-100); }
body.directory-research-page .firm-card-line { align-items: flex-start; font-size: 13px; line-height: 1.75; color: var(--gray-600); overflow-wrap: anywhere; }
body.directory-research-page .fc-label { flex-shrink: 0; }
body.directory-research-page .fc-icon { margin-top: 4px; }
body.directory-research-page .firm-card-footer { margin-top: auto; padding-top: 20px; justify-content: flex-end; }
body.directory-research-page .compare-toggle { min-height: 34px; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 400; }
body.directory-research-page .compare-toggle.selected { color: var(--white); background: var(--black); border-color: var(--black); }
body.directory-research-page .firm-toggle-btn { min-height: 40px; font-weight: 500; border-radius: 8px; }
body.directory-research-page .tabs { margin-bottom: 20px; }
body.directory-research-page .tab-btn { padding: 10px 16px; font-size: 14px; font-weight: 400; }
body.directory-research-page .tax-boundary { margin: 12px 0; font-size: 12px; line-height: 1.85; color: var(--gray-500); }
body.directory-research-page .analytics-drill-hint { margin: 0 0 20px; font-size: 12px; line-height: 1.8; }
body.directory-research-page .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
body.directory-research-page .analytics-card { min-width: 0; min-height: 334px; padding: 25px; border-radius: 12px; }
body.directory-research-page .analytics-card-title { margin-bottom: 18px; color: var(--gray-700); font-size: 15px; font-weight: 500; line-height: 1.6; }
body.directory-research-page .analytics-card canvas { width: 100% !important; height: 260px !important; max-height: 260px; }
body.directory-research-page .chart-square { position: relative; width: min(100%, 260px); height: auto; aspect-ratio: 1; }
body.directory-research-page .chart-square canvas { position: absolute; inset: 0; height: 100% !important; }
body.directory-research-page .chart-legend { gap: 8px 18px; margin-top: 16px; }
body.directory-research-page .chart-legend-item { font-size: 12px; line-height: 1.7; }
body.directory-research-page .analytics-card.analytics-card-counts { min-height: 0; align-self: start; background: var(--gray-50); }
body.directory-research-page .analytics-card-counts .tax-counts { margin-top: 12px; }
body.directory-research-page .tax-count-row { padding: 12px 0; gap: 20px; font-size: 14px; line-height: 1.65; border-bottom-color: var(--gray-200); }
body.directory-research-page .tax-count-row:last-child { border-bottom: 0; }
body.directory-research-page .tax-count-row > :last-child { font-variant-numeric: tabular-nums; }
body.directory-research-page .tax-count-row button:hover { color: var(--green-dark); }
body.directory-research-page a:focus-visible,
body.directory-research-page button:focus-visible,
body.directory-research-page [role="link"]:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

@media (max-width: 1040px) {
  body.directory-research-page #firm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  body.directory-research-page .page-header { padding: 112px 24px 0; }
  body.directory-research-page .page-header-title { font-size: 32px; }
  body.directory-research-page .section { padding: 44px 24px; }
  body.directory-research-page #directory { padding-top: 24px; }
  body.directory-research-page .section-title { font-size: 24px; }
  body.directory-research-page .filter-bar { padding: 24px; }
  body.directory-research-page .filter-group { padding-left: 96px; }
  body.directory-research-page .filter-label { width: 84px; }
  body.directory-research-page .result-bar { flex-direction: row; align-items: center; }
  body.directory-research-page .analytics-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body.directory-research-page .page-header { padding: 108px 20px 0; }
  body.directory-research-page .page-header-title { font-size: 29px; }
  body.directory-research-page .page-header-sub { font-size: 13px; }
  body.directory-research-page .section { padding: 40px 20px; }
  body.directory-research-page .filter-bar { gap: 20px; padding: 22px 18px; }
  body.directory-research-page .filter-group { padding-left: 0; padding-top: 29px; }
  body.directory-research-page .filter-label { top: 0; width: auto; max-width: 100%; }
  body.directory-research-page .filter-btn { padding: 6px 10px; font-size: 12px; }
  body.directory-research-page #firm-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.directory-research-page .firm-card { padding: 24px; }
  body.directory-research-page .analytics-card { padding: 22px; }
  body.directory-research-page .tabs { gap: 12px; }
  body.directory-research-page .tab-btn { padding: 10px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  body.directory-research-page .firm-card,
  body.directory-research-page .filter-btn,
  body.directory-research-page .compare-toggle { transition: none; }
}
