/* M&A marketplace redesign: businesses-for-sale, investors, investment-opportunities (list + detail pages).
   Loaded after redesign.css/redesign-fixes.css, scoped to body.rd-site like the rest of the redesign.
   Brand palette reused from redesign-palette.css: navy #132b40, bronze #785527, gold #e0c393. */

body.rd-site .ma-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:0 0 32px}
body.rd-site .ma-stat-card{background:#fff;border:1px solid #e7e2d8;border-radius:10px;padding:20px;text-align:center}
body.rd-site .ma-stat-card h2{margin:0 0 4px;font-size:28px;color:#132b40}
body.rd-site .ma-stat-card span{font-size:13px;color:#6b7480}

body.rd-site .ma-directory{max-width:1220px;margin:0 auto;padding:0 15px 60px}
body.rd-site .ma-directory-head{margin-bottom:24px}
body.rd-site .ma-eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;color:#785527;margin-bottom:8px}
body.rd-site .ma-directory-head h1{margin:0 0 8px;color:#132b40}
body.rd-site .ma-directory-head p{margin:0;color:#5c6672}

body.rd-site .ma-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;background:#f7f5f0;border:1px solid #e7e2d8;border-radius:12px;padding:18px;margin-bottom:20px}
body.rd-site .ma-filter-field{display:flex;flex-direction:column;gap:6px;min-width:150px;flex:1 1 150px}
body.rd-site .ma-filter-search{flex:2 1 220px}
body.rd-site .ma-filter-field label{font-size:12px;font-weight:600;color:#3a4149}
body.rd-site .ma-filter-field input,body.rd-site .ma-filter-field select{border:1px solid #d7d0c2;border-radius:8px;padding:9px 12px;font-size:14px;background:#fff;color:#132b40}
body.rd-site .ma-filter-actions{display:flex;gap:10px;align-items:center}

body.rd-site .ma-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:8px;padding:10px 18px;font-size:14px;font-weight:600;border:1px solid #d7d0c2;background:#fff;color:#132b40;cursor:pointer;text-decoration:none;transition:background .15s,color .15s,border-color .15s}
body.rd-site .ma-btn:hover{border-color:#785527;color:#785527}
body.rd-site .ma-btn-primary{background:#785527;border-color:#785527;color:#fff}
body.rd-site .ma-btn-primary:hover{background:#5f4420;border-color:#5f4420;color:#fff}
body.rd-site .ma-btn-ghost{background:transparent;border-color:transparent;color:#785527}

body.rd-site .ma-result-count{margin:0 0 16px;color:#5c6672;font-size:14px}

body.rd-site .ma-empty{text-align:center;padding:60px 20px;background:#f7f5f0;border-radius:12px}
body.rd-site .ma-empty h3{margin:0 0 8px;color:#132b40}
body.rd-site .ma-empty p{margin:0 0 16px;color:#5c6672}

body.rd-site .ma-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
body.rd-site .ma-card{border:1px solid #e7e2d8;border-radius:14px;overflow:hidden;background:#fff;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s}
body.rd-site .ma-card:hover{box-shadow:0 18px 40px rgba(19,43,64,.12);transform:translateY(-3px)}
body.rd-site .ma-card-thumb{position:relative;display:block;aspect-ratio:16/10;background:#eef1f4;overflow:hidden}
body.rd-site .ma-card-thumb img{width:100%;height:100%;object-fit:cover;object-position:center}
body.rd-site .ma-card-tag{position:absolute;left:12px;bottom:12px;background:rgba(19,43,64,.85);color:#fff;font-size:12px;font-weight:600;padding:5px 10px;border-radius:6px}
body.rd-site .ma-card-featured{border-color:#e0c393}
body.rd-site .ma-card-featured-badge{position:absolute;right:12px;top:12px;background:#e0c393;color:#132b40;font-size:12px;font-weight:700;padding:5px 10px;border-radius:6px}
body.rd-site .ma-card-body{padding:18px;display:flex;flex-direction:column;flex:1;gap:8px}
body.rd-site .ma-card-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:17px;font-weight:700;color:#132b40;text-decoration:none;line-height:1.35;min-height:calc(17px * 1.35 * 2)}
body.rd-site .ma-card-title:hover{color:#785527}
body.rd-site .ma-card-location{margin:0;font-size:13px;color:#6b7480;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.rd-site .ma-card-excerpt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:0;font-size:14px;color:#4a5560;line-height:1.5;flex:1}
body.rd-site .ma-card-bottom{display:flex;align-items:flex-end;justify-content:space-between;margin-top:8px;padding-top:12px;border-top:1px solid #eee}
body.rd-site .ma-card-bottom small{display:block;font-size:11px;color:#8a93a0;margin-bottom:2px}
body.rd-site .ma-card-bottom strong{font-size:16px;color:#132b40}
body.rd-site .ma-card-open{width:34px;height:34px;border-radius:50%;background:#f7f5f0;display:flex;align-items:center;justify-content:center;color:#132b40;text-decoration:none;flex:none}
body.rd-site .ma-card-open:hover{background:#785527;color:#fff}

body.rd-site .ma-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:32px;font-size:14px;color:#5c6672}
body.rd-site .ma-pagination a{color:#785527;text-decoration:none;font-weight:600}
body.rd-site .ma-pagination a:hover{text-decoration:underline}

/* Detail pages: shared shell around the freeform body / legacy fallback template */
body.rd-site .ma-detail{padding:48px 0 60px}
body.rd-site .ma-detail-layout{display:grid;grid-template-columns:1fr 320px;gap:36px;align-items:start}
body.rd-site .ma-detail-body{min-width:0;overflow-wrap:break-word}
body.rd-site .ma-detail-intro{margin:0 0 28px;padding-bottom:24px;border-bottom:1px solid #eee;font-size:17px;line-height:1.6;color:#3a4149}

/* Baseline typography for admin-authored "Custom Detail Page" HTML: content can be anything from one paragraph to a
   full multi-section pitch, so the container needs sensible defaults for every common tag rather than relying on
   whatever bare-tag styles the rest of the site happens to define (which were never meant for this context). */
body.rd-site .ma-detail-body .custom-page{font-size:16px;line-height:1.65;color:#3a4149}
body.rd-site .ma-detail-body .custom-page > *:first-child{margin-top:0}
body.rd-site .ma-detail-body .custom-page > *:last-child{margin-bottom:0}
body.rd-site .ma-detail-body .custom-page h1{font-size:32px;line-height:1.25;margin:0 0 16px;color:#132b40}
body.rd-site .ma-detail-body .custom-page h2{font-size:24px;line-height:1.3;margin:32px 0 14px;color:#132b40}
body.rd-site .ma-detail-body .custom-page h3{font-size:19px;line-height:1.35;margin:24px 0 10px;color:#132b40}
body.rd-site .ma-detail-body .custom-page h4,body.rd-site .ma-detail-body .custom-page h5,body.rd-site .ma-detail-body .custom-page h6{font-size:16px;margin:20px 0 8px;color:#132b40}
body.rd-site .ma-detail-body .custom-page p{margin:0 0 16px}
body.rd-site .ma-detail-body .custom-page ul,body.rd-site .ma-detail-body .custom-page ol{margin:0 0 16px;padding-left:22px}
body.rd-site .ma-detail-body .custom-page li{margin-bottom:6px}
body.rd-site .ma-detail-body .custom-page img{max-width:100%;height:auto;border-radius:10px;margin:0 0 16px;display:block}
body.rd-site .ma-detail-body .custom-page a{color:#785527;text-decoration:underline}
body.rd-site .ma-detail-body .custom-page strong,body.rd-site .ma-detail-body .custom-page b{color:#132b40}
body.rd-site .ma-detail-body .custom-page blockquote{margin:0 0 16px;padding:12px 18px;border-left:4px solid #e0c393;background:#f7f5f0;color:#3a4149}
body.rd-site .ma-detail-body .custom-page table{width:100%;border-collapse:collapse;margin:0 0 16px;font-size:14px}
body.rd-site .ma-detail-body .custom-page th,body.rd-site .ma-detail-body .custom-page td{border:1px solid #e7e2d8;padding:8px 10px;text-align:left}
body.rd-site .ma-detail-body .custom-page th{background:#f7f5f0;color:#132b40}
body.rd-site .ma-detail-body .custom-page hr{border:0;border-top:1px solid #eee;margin:24px 0}
body.rd-site .ma-detail-aside{position:sticky;top:24px;border:1px solid #e7e2d8;border-radius:14px;padding:22px;background:#fff}
body.rd-site .ma-detail-aside small{display:block;font-size:12px;color:#8a93a0;margin-bottom:4px}
body.rd-site .ma-detail-amount{font-size:26px;font-weight:700;color:#132b40;margin-bottom:16px}
body.rd-site .ma-detail-aside dl{margin:0 0 18px;border-top:1px solid #eee;padding-top:14px}
body.rd-site .ma-detail-aside dl div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;font-size:13px}
body.rd-site .ma-detail-aside dt{color:#8a93a0}
body.rd-site .ma-detail-aside dd{margin:0;color:#132b40;font-weight:600;text-align:right}
body.rd-site .ma-detail-aside .ma-btn{width:100%;margin-bottom:10px}
body.rd-site .ma-aside-note{margin:8px 0 0;font-size:12px;color:#8a93a0;line-height:1.5}

@media (max-width:991.98px){
  body.rd-site .ma-grid{grid-template-columns:repeat(2,1fr)}
  body.rd-site .ma-detail-layout{grid-template-columns:1fr}
  body.rd-site .ma-detail-aside{position:static}
  body.rd-site .ma-stats{grid-template-columns:1fr 1fr}
}
@media (max-width:575.98px){
  body.rd-site .ma-grid{grid-template-columns:1fr}
  body.rd-site .ma-stats{grid-template-columns:1fr}
  body.rd-site .ma-filter-field{flex:1 1 100%}
}
