/* Compact company discovery, within the existing navy and ivory work surface. */
.matches-page .mt-discovery-header { display: block; min-height: 0; padding: 0 0 16px; margin-bottom: 16px; overflow: visible; border-bottom: 1px solid var(--line, #b2c2bb); }
.matches-page .mt-discovery-header h1 { margin: 0; max-width: none; font-size: 24px; line-height: 1.4; }
.matches-page .mt-discovery-header p { margin: 4px 0 12px; max-width: none; font-size: 13px; line-height: 1.6; color: var(--app-ink2, #283530); }
.mt-tabs { max-width: 100%; flex-wrap: wrap; }
.mt-tabs button { min-height: 44px; }
.mt-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mt-search { display: grid; gap: 8px; margin-bottom: 16px; max-width: 760px; }
.mt-search label { font-size: 13px; font-weight: 650; color: var(--app-ink2, #283530); }
.mt-search-controls { display: flex; align-items: stretch; gap: 8px; }
.mt-search input { flex: 1 1 0; min-width: 0; width: 100%; min-height: 44px; box-sizing: border-box; border: 1px solid var(--dv-border-strong, #708079); border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--app-ink, #0e1914); background: var(--dv-bg-surface, #ffffff); }
.mt-search input::placeholder { color: var(--app-muted, #50605a); opacity: 1; }
.mt-search input:focus-visible, .mt-tabs button:focus-visible, #mtDirectory :is(button, a, input, select, summary):focus-visible { outline: 3px solid var(--dv-primary, #0d3021); outline-offset: 3px; }
.mt-search .btn { flex: 0 0 auto; width: auto; min-width: 64px; }
#mtDirectory { padding-bottom: 32px; container: company-directory / inline-size; }
.mt-directory-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.mt-directory-heading h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.mt-directory-heading p { margin: 0; color: var(--app-ink2, #283530); font-size: 13px; line-height: 1.6; }
.mt-catalog-search { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto auto; align-items: end; gap: 8px; max-width: none; margin-bottom: 12px; }
.mt-catalog-query, .mt-catalog-region { display: grid; gap: 4px; min-width: 0; }
.mt-catalog-search select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--dv-border-strong, #708079); border-radius: 8px; background: var(--dv-bg-surface, #ffffff); color: var(--app-ink, #0e1914); font: inherit; }
.mt-catalog-search .btn { min-height: 44px; }
.mt-catalog-membership, .mt-catalog-tier-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-catalog-membership { margin-bottom: 12px; }
.mt-catalog-membership button, .mt-catalog-tier-buttons button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line, #b2c2bb); border-radius: 8px; background: var(--dv-bg-surface, #ffffff); color: var(--app-ink2, #283530); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.mt-catalog-membership button span, .mt-catalog-tier-buttons button span, .mt-catalog-industries button span { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mt-catalog-membership button[aria-pressed="true"], .mt-catalog-tier-buttons button[aria-pressed="true"] { background: var(--dv-bg-selected, #e4e9e6); border-color: var(--dv-primary, #0d3021); color: var(--dv-primary-hover, #062619); }
@media (hover: hover) and (pointer: fine) { .mt-catalog-membership button:hover, .mt-catalog-tier-buttons button:hover { border-color: var(--dv-primary, #0d3021); } }
.mt-catalog-member-tiers { padding-top: 12px; margin-bottom: 12px; border-top: 1px solid var(--line, #b2c2bb); }
.mt-catalog-member-tiers[hidden] { display: none; }
.mt-catalog-member-tiers > p { margin: 8px 0 0; max-width: 75ch; font-size: 12px; line-height: 1.6; color: var(--app-ink2, #283530); }
.mt-catalog-industries { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 0 0; margin-bottom: 12px; border-bottom: 1px solid var(--line, #b2c2bb); }
.mt-catalog-industries button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--app-ink2, #283530); font: inherit; font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .mt-catalog-industries button:hover { background: var(--dv-bg-subtle, #eaf3ef); } }
.mt-catalog-industries button[aria-pressed="true"] { border-bottom-color: var(--dv-primary, #0d3021); color: var(--dv-primary-hover, #062619); font-weight: 750; background: var(--dv-bg-selected, #e4e9e6); }
#mtCatalogIndustries button:focus-visible { outline-offset: -3px; }
.mt-catalog-result-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.mt-catalog-result-heading > span { font-size: 12px; color: var(--app-muted, #50605a); }
#mtDirectoryCount { scroll-margin-top: 24px; font-size: 13px; }
.mt-directory-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 12px; margin-top: 12px; }
.mt-directory-company { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--line, #b2c2bb); border-radius: 8px; background: var(--dv-bg-surface, #ffffff); }
.mt-directory-company > * { min-width: 0; }
.mt-company-header { display: flex; gap: 8px; align-items: center; min-height: 48px; }
.mt-company-logo { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 4px; box-sizing: border-box; border: 1px solid var(--line, #b2c2bb); border-radius: 8px; background: var(--dv-bg-surface, #ffffff); }
.mt-company-logo[data-background="dark"] { background: var(--dv-rail-bg, #04160d); border-color: var(--dv-rail-bg, #04160d); }
.mt-company-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mt-company-logo-fallback { color: var(--dv-trust, #051b11); font-size: 20px; font-weight: 650; background: var(--dv-bg-subtle, #eaf3ef); }
.mt-directory-name { min-width: 0; flex: 1 1 auto; }
.mt-directory-name h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.mt-company-membership { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 24px; }
.mt-catalog-member-badge, .mt-catalog-public-badge { display: inline-flex; align-items: center; min-height: 24px; font-size: 12px; line-height: 1.5; font-weight: 650; }
.mt-catalog-member-badge { color: var(--dv-primary-hover, #062619); }
.mt-catalog-public-badge { color: var(--app-muted, #50605a); font-weight: 500; }
.mt-registered { display: inline-flex; align-self: flex-start; padding: 4px 11px; border: 1px solid var(--dv-border-strong, #708079); border-radius: 999px; color: var(--app-ink2, #283530); background: var(--dv-bg-surface, #ffffff); font-size: 12px; font-weight: 650; line-height: 1.5; }
.mt-directory-company :is(.mt-registered, .mt-verified) { padding: 2px 6px; border-radius: 4px; font-size: 12px; line-height: 1.5; }
.mt-directory-meta { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 0; min-height: 18px; color: var(--app-muted, #50605a); font-size: 12px; line-height: 1.5; }
.mt-directory-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 0; min-height: 40px; color: var(--app-ink2, #283530); font-size: 13px; line-height: 1.55; }
.mt-directory-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 0 8px; padding-top: 8px; margin-top: auto; border-top: 1px solid var(--line, #b2c2bb); }
.mt-directory-actions > .btn, .mt-directory-actions > .mt-directory-domain { grid-column: 1; grid-row: 1; z-index: 1; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 8px 4px; box-sizing: border-box; font-size: 12px; }
.mt-directory-domain { color: var(--app-muted, #50605a); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.mt-company-details { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
.mt-company-details > summary { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 44px; margin-left: calc(50% + 4px); padding: 8px 0; box-sizing: border-box; color: var(--dv-primary-hover, #062619); font-size: 12px; font-weight: 650; cursor: pointer; list-style: none; }
.mt-company-details > summary::-webkit-details-marker { display: none; }
.mt-company-details > summary svg { flex: 0 0 auto; width: 12px; height: 12px; }
.mt-company-details[open] > summary svg { transform: rotate(180deg); }
.mt-company-detail-body { padding-top: 12px; overflow-wrap: anywhere; }
.mt-company-detail-body > h4 { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.mt-company-detail-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--app-ink2, #283530); }
.mt-company-detail-body dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 8px 0; }
.mt-company-detail-body dt { color: var(--app-muted, #50605a); font-size: 12px; }
.mt-company-detail-body dd { margin: 0 0 8px; color: var(--app-ink2, #283530); font-size: 13px; line-height: 1.6; }
.mt-directory-links { display: grid; gap: 4px; min-width: 0; }
.mt-directory-links .mt-source-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--dv-primary-hover, #062619); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.mt-directory-links time { font-size: 12px; color: var(--app-ink2, #283530); line-height: 1.5; }
.mt-catalog-intro .mt-intro-actions { margin: 0; }
.mt-catalog-intro .btn { width: 100%; min-height: 44px; padding: 8px; font-size: 12px; }
#mtDirectoryEmpty { margin-top: 16px; }
.mt-catalog-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line, #b2c2bb); }
.mt-catalog-pagination[hidden], .mt-catalog-sources[hidden] { display: none; }
.mt-catalog-pagination > p { margin: 0; color: var(--app-muted, #50605a); font-size: 13px; font-variant-numeric: tabular-nums; }
.mt-catalog-page-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#mtDirectoryPageForm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--app-ink2, #283530); font-size: 13px; }
#mtDirectoryPageForm input { min-width: 0; width: 76px; min-height: 44px; box-sizing: border-box; padding: 8px; border: 1px solid var(--dv-border-strong, #708079); border-radius: 8px; background: var(--dv-bg-surface, #ffffff); color: var(--app-ink, #0e1914); font: inherit; font-variant-numeric: tabular-nums; }
.mt-catalog-pagination button { min-height: 44px; }
.mt-catalog-pagination button:disabled { color: var(--app-muted, #50605a); cursor: default; opacity: .65; }
.mt-catalog-sources { margin-top: 16px; }
.mt-catalog-sources summary { display: list-item; width: fit-content; min-height: 44px; padding: 10px 0; font-size: 13px; font-weight: 650; color: var(--app-ink2, #283530); cursor: pointer; }
.mt-catalog-sources p { margin: 4px 0 12px; max-width: 75ch; font-size: 13px; line-height: 1.6; color: var(--app-muted, #50605a); }
.mt-catalog-sources ul { margin: 0; padding: 0; list-style: none; }
.mt-catalog-sources li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding: 8px 0; border-top: 1px solid var(--line, #b2c2bb); font-size: 13px; line-height: 1.6; }
.mt-catalog-sources li > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dv-primary-hover, #062619); text-underline-offset: 3px; overflow-wrap: anywhere; }
.mt-catalog-sources li > span { color: var(--app-muted, #50605a); }
.mt-catalog-sources .mt-source-attribution { flex-basis: 100%; max-width: 100%; margin: 0 0 8px; color: var(--app-ink2, #283530); }
.mt-source-attribution a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dv-primary-hover, #062619); }
@container company-directory (min-width: 1380px) { .mt-directory-results { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container company-directory (min-width: 1680px) { .mt-directory-results { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container company-directory (max-width: 940px) { .mt-directory-results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container company-directory (max-width: 660px) { .mt-directory-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container company-directory (max-width: 340px) { .mt-directory-results { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .mt-catalog-search { grid-template-columns: minmax(0, 1fr) 140px; }
  .mt-catalog-search .btn { width: 100%; }
  .mt-catalog-membership button { flex: 1 1 auto; justify-content: center; gap: 4px; padding: 8px; }
  .mt-catalog-tier-buttons button { flex: 1 1 auto; justify-content: center; gap: 4px; padding: 8px; }
}
@media (max-width: 480px) {
  .matches-page .mt-discovery-header h1 { font-size: 22px; }
  .mt-tabs { display: flex; }
  .mt-tabs button { flex: 1 0 42%; }
  .mt-catalog-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mt-catalog-query { grid-column: 1 / -1; }
  .mt-catalog-search > #mtDirectoryReset { grid-column: 1 / -1; min-height: 44px; padding: 4px; }
  .mt-catalog-search input, .mt-catalog-search select, #mtDirectoryPageForm input { font-size: 16px; }
  .mt-catalog-search .mt-catalog-region { grid-column: 1; }
  .mt-catalog-region label { display: none; }
  .mt-directory-company { padding: 12px; }
  .mt-company-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mt-directory-name { width: 100%; }
  .mt-directory-name h3 { min-height: 45px; }
  .mt-company-logo { width: 44px; height: 44px; }
  .mt-catalog-membership button { flex-direction: column; gap: 0; }
  .mt-catalog-tier-buttons button { flex-direction: column; gap: 4px; }
  .mt-catalog-sources li { display: grid; grid-template-columns: minmax(0, 1fr); }
  .mt-catalog-pagination { align-items: stretch; }
  .mt-catalog-page-controls { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 12px; }
  #mtDirectoryPageForm { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}
@media (max-width: 359px) { .mt-company-header { flex-direction: row; align-items: center; } .mt-directory-name h3 { min-height: 0; } }
