:root {
    --mp-primary: #2862cc;
    --mp-accent: #e5525c;
    --mp-ink: #111827;
    --mp-muted: #606774;
    --mp-border: #e4e7ec;
    --mp-soft: #f7f9fc;
    --mp-white: #fff;
    --mp-shell: 1120px;
    --mp-shadow: 0 12px 35px rgba(20, 35, 65, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--mp-white);
    color: var(--mp-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--mp-primary); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3, h4 { margin: 0 0 0.75em; color: var(--mp-ink); font-weight: 750; letter-spacing: -0.025em; line-height: 1.15; }
p { margin: 0 0 1.25em; }
.mp-shell { width: min(calc(100% - 2rem), var(--mp-shell)); margin-inline: auto; }
.mp-skip-link { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000; padding: 0.7rem 1rem; background: var(--mp-ink); color: #fff; transform: translateY(-150%); }
.mp-skip-link:focus { transform: translateY(0); }

.mp-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--mp-border); background: rgba(255,255,255,0.94); backdrop-filter: blur(14px); }
.admin-bar .mp-site-header { top: 32px; }
.mp-header-inner { display: grid; grid-template-columns: 15rem 1fr auto; align-items: center; min-height: 64px; gap: 2rem; }
.mp-brand { display: inline-flex; align-items: center; width: fit-content; }
.mp-brand > img, .mp-brand .custom-logo { display: block; width: auto; max-width: 170px; max-height: 42px; object-fit: contain; }
.mp-brand .custom-logo-link { display: flex; }
.mp-primary-nav { justify-self: center; }
.mp-nav-list, .mp-footer-nav { display: flex; align-items: center; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.mp-nav-list a, .mp-footer-nav a, .mp-login-link { color: var(--mp-ink); font-size: 0.9rem; font-weight: 550; text-decoration: none; }
.mp-nav-list a:hover, .mp-nav-list .current-menu-item > a, .mp-login-link:hover { color: var(--mp-primary); }
.mp-header-actions { display: flex; align-items: center; gap: 1rem; }
.mp-menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--mp-border); border-radius: 6px; background: #fff; padding: 10px; }
.mp-menu-toggle > span:not(.screen-reader-text) { display: block; width: 100%; height: 2px; margin: 4px 0; background: var(--mp-ink); }

.mp-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0.72rem 1.25rem; border: 1px solid var(--mp-primary); border-radius: 6px; background: var(--mp-primary); box-shadow: 0 3px 7px rgba(40,98,204,0.18); color: #fff; font-size: 0.9rem; font-weight: 700; line-height: 1.2; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.mp-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(40,98,204,0.2); color: #fff; }
.mp-button-small { min-height: 36px; padding: 0.5rem 0.85rem; }
.mp-button-secondary { border-color: var(--mp-border); background: #fff; box-shadow: none; color: var(--mp-ink); }
.mp-button-secondary:hover { border-color: var(--mp-primary); background: #fff; color: var(--mp-primary); }

.mp-hero { border-bottom: 1px solid var(--mp-border); }
.mp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.9fr); align-items: center; gap: clamp(3rem, 7vw, 7rem); min-height: 715px; padding-block: 5rem; }
.mp-eyebrow { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 1.25rem; padding: 0.22rem 0.65rem; border-radius: 99px; background: #f0f5ff; color: var(--mp-primary); font-size: 0.82rem; font-weight: 700; }
.mp-eyebrow span, .mp-benefits li:last-child span { color: var(--mp-accent); }
.mp-hero h1 { max-width: 580px; margin-bottom: 1.2rem; font-size: clamp(2.65rem, 4.4vw, 3.7rem); line-height: 1.12; }
.mp-hero h1 strong { color: var(--mp-primary); font-weight: inherit; }
.mp-hero-copy { max-width: 590px; color: var(--mp-muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.55; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0; }
.mp-benefits { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; color: var(--mp-muted); list-style: none; }
.mp-benefits li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; }
.mp-benefits span { color: var(--mp-primary); font-size: 1.15rem; }
.mp-hero-visual { margin: 0; }
.mp-hero-visual img { display: block; width: 100%; max-height: 500px; object-fit: contain; }
.mp-home-blocks > .wp-block-group { margin-block: 0; }
.mp-home-blocks .mp-hero-grid,
.mp-home-blocks .mp-section > .mp-shell,
.mp-home-blocks .mp-visibility-strip > .mp-shell { max-width: var(--mp-shell); }
.mp-home-blocks .mp-actions .wp-block-button__link { min-height: 46px; padding: 0.72rem 1.25rem; border: 1px solid var(--mp-primary); border-radius: 6px; background: var(--mp-primary); box-shadow: 0 3px 7px rgba(40,98,204,0.18); color: #fff; font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.mp-home-blocks .mp-actions .is-style-outline .wp-block-button__link { border-color: var(--mp-border); background: #fff; box-shadow: none; color: var(--mp-ink); }
.mp-home-blocks .mp-partner-grid figure { display: flex; align-items: center; justify-content: center; min-height: 88px; margin: 0; padding: 1.25rem; border: 1px solid var(--mp-border); border-radius: 8px; background: #fff; }
.mp-home-blocks .mp-partner-grid figure a { min-height: 0; padding: 0; border: 0; }
.mp-home-blocks .mp-price-card > :last-child { margin-bottom: 0; }

.mp-section { padding-block: clamp(4rem, 7vw, 6.5rem); }
.mp-section-heading { margin-bottom: 2rem; }
.mp-section-heading h2 { margin-bottom: 0.45rem; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.mp-section-heading p { color: var(--mp-muted); }
.mp-section-heading-centered { text-align: center; }
.mp-section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.mp-section-heading-row > a { flex: 0 0 auto; font-weight: 700; text-decoration: none; }
.mp-kicker { margin-bottom: 0.5rem; color: #1f4f9f; font-size: 0.78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.mp-partners { border-bottom: 1px solid var(--mp-border); }
.mp-partner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.mp-partner-grid a { display: flex; align-items: center; justify-content: center; min-height: 88px; padding: 1.25rem; border: 1px solid var(--mp-border); border-radius: 8px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.mp-partner-grid a:hover { border-color: #b9c9e8; box-shadow: var(--mp-shadow); }
.mp-partner-grid img { width: auto; max-width: 185px; max-height: 45px; object-fit: contain; }
.mp-visibility-strip { border-bottom: 1px solid var(--mp-border); padding-block: 1.25rem; }
.mp-visibility-strip .mp-shell { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.mp-visibility-strip p { margin: 0; color: var(--mp-muted); font-size: 0.9rem; }
.mp-visibility-strip .mp-kicker { color: #1f4f9f; }
.mp-visibility-strip ul { display: flex; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.mp-visibility-strip li { padding: 0.45rem 0.85rem; border: 1px solid var(--mp-border); border-radius: 6px; font-size: .83rem; }
.mp-directory-preview { background: #fff; }
.mp-widget-frame { padding: clamp(1rem, 2vw, 2rem); border: 1px solid var(--mp-border); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(20,35,65,.04); }
.mp-jobs-preview { background: var(--mp-soft); }

.mp-pricing { border-top: 1px solid var(--mp-border); }
.mp-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; max-width: 850px; margin-inline: auto; }
.mp-price-card { position: relative; display: flex; flex-direction: column; padding: 2rem; border: 1px solid var(--mp-border); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(20,35,65,.04); }
.mp-price-card-featured { border: 2px solid var(--mp-primary); box-shadow: var(--mp-shadow); }
.mp-price-badge { position: absolute; top: 1rem; right: 1rem; padding: .3rem .65rem; border-radius: 99px; background: #eef4ff; color: var(--mp-primary); font-size: .75rem; font-weight: 800; }
.mp-price { display: flex; align-items: baseline; gap: .8rem; }
.mp-price strong { font-size: 2.6rem; }
.mp-price span { color: var(--mp-muted); }
.mp-price-card ul { flex: 1; margin: 1rem 0 1.75rem; padding-left: 1.2rem; color: var(--mp-muted); }
.mp-price-card li { margin-bottom: .55rem; }

.mp-main { min-height: 65vh; padding-block: clamp(3rem, 6vw, 6rem); }
.mp-portal-main { min-height: calc(100vh - 151px); }
.mp-portal-page { padding-block: 4rem; }
.mp-portal-page-header { max-width: 760px; margin-bottom: 2rem; }
.mp-portal-page-header h1 { margin-bottom: .55rem; font-size: 2.25rem; line-height: 1.12; }
.mp-portal-page-header p { margin: 0; color: var(--mp-muted); font-size: 1.05rem; }
.mp-portal-intro { margin-bottom: 2.4rem; padding: 1.5rem 1.7rem; border: 1px solid #e8edf5; border-left: 3px solid var(--mp-primary); border-radius: 10px; background: #f6f9fe; box-shadow: 0 3px 9px rgba(20,35,65,.035); color: #303846; }
.mp-portal-intro > :last-child { margin-bottom: 0; }
.mp-portal-widget { min-height: 2rem; }
.mp-portal-widget > p:empty { display: none; }
.mp-portal-widget .mppw { margin-inline: 0; }
.mp-portal-widget .mppw-not-found { margin-inline: auto; }
.page-template-template-portal .mp-portal-widget .mppw-native-listing-header { display: none; }
.page-template-template-portal .mppw-native-listing { padding-top: 0; }
.page-template-template-portal .mppw-company-listing > .mppw-region-index-entry:first-child { margin-top: 0; }
.page-template-template-portal.mppw-native-detail-page .mp-portal-page-header,
.page-template-template-portal.mppw-native-detail-page .mp-portal-intro { display: none; }
.page-template-template-portal.mppw-native-detail-page .mp-portal-page { padding-top: 3.5rem; }
.mppw-native-detail-page .mp-main { padding-top: 2.5rem; }
.mppw-company-profile-page .mp-page-header { display: none; }
.mp-content { max-width: var(--mp-shell); }
.mp-page-header { max-width: 850px; margin-bottom: 2.5rem; }
.mp-page-header h1 { font-size: clamp(2.25rem, 5vw, 3.8rem); }
.mp-entry-content { min-width: 0; }
.mp-entry-content > :where(p, ul, ol, blockquote, h2, h3, h4, figure):not(.alignwide):not(.alignfull) { max-width: 760px; }
.mp-entry-content .mppw { max-width: none; }
.mp-article { max-width: 900px; }
.mp-featured-image { margin: 0 0 2.5rem; }
.mp-featured-image img { width: 100%; border-radius: 10px; }
.mp-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; }
.mp-post-card { overflow: hidden; border: 1px solid var(--mp-border); border-radius: 10px; background: #fff; }
.mp-post-card > div { padding: 1.4rem; }
.mp-post-card h2 { font-size: 1.35rem; }
.mp-post-card h2 a { color: var(--mp-ink); text-decoration: none; }
.mp-error-page { padding-block: 5rem; text-align: center; }
.mp-error-page p { color: var(--mp-muted); }

.mp-site-footer { border-top: 1px solid var(--mp-border); background: #fff; }
.mp-footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 86px; gap: 2rem; }
.mp-footer-inner p { margin: 0; color: var(--mp-muted); font-size: .85rem; }
.mp-footer-nav { gap: 1.4rem; }
.mp-footer-nav a { color: var(--mp-muted); font-size: .82rem; }

/* The portal plugin inherits the base theme instead of fighting it. */
.mp-widget-frame .mppw, .mp-entry-content .mppw { --mppw-primary: var(--mp-primary); --mppw-secondary: var(--mp-ink); }
.mp-widget-frame .mppw-company-listing { margin: 0; }
.mp-widget-frame .mppw-company-search { box-shadow: none; }
.mp-widget-frame .mppw-native-listing-header { display: none; }
.multipage-base-front-page .mppw-native-listing-header { display: none; }

@media (max-width: 900px) {
    .mp-header-inner { grid-template-columns: 1fr auto auto; gap: .7rem; }
    .mp-menu-toggle { display: block; }
    .mp-primary-nav { position: absolute; top: 64px; left: 0; right: 0; display: none; padding: 1rem; border-bottom: 1px solid var(--mp-border); background: #fff; }
    .mp-primary-nav.is-open { display: block; }
    .mp-nav-list { align-items: stretch; flex-direction: column; gap: .2rem; }
    .mp-nav-list a { display: block; padding: .7rem; }
    .mp-login-link { display: none; }
    .mp-hero-grid { grid-template-columns: 1fr 0.8fr; gap: 2rem; min-height: auto; }
    .mp-partner-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .admin-bar .mp-site-header { top: 46px; }
    .mp-shell { width: min(calc(100% - 2rem), var(--mp-shell)); }
    .mp-header-inner { min-height: 62px; }
    .mp-brand > img, .mp-brand .custom-logo { max-width: 150px; max-height: 36px; }
    .mp-menu-toggle { order: 3; width: 38px; height: 38px; }
    .mp-header-actions { order: 2; }
    .mp-header-actions .mp-button-small { min-height: 38px; padding-inline: .8rem; }
    .mp-primary-nav { top: 62px; }
    .mp-hero-grid { grid-template-columns: 1fr; padding-block: 3.7rem; }
    .mp-hero h1 { font-size: clamp(2.25rem, 11vw, 3rem); }
    .mp-hero-copy { font-size: 1.05rem; }
    .mp-hero-visual { order: 2; margin-top: 1.5rem; }
    .mp-actions { flex-direction: column; align-items: stretch; }
    .mp-benefits { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .mp-section { padding-block: 3.5rem; }
    .mp-portal-page { padding-block: 4rem; }
    .mp-portal-page-header h1 { font-size: 1.875rem; }
    .mp-portal-page-header p { font-size: 1rem; }
    .mp-portal-intro { padding: 1.35rem 1.45rem; }
    .mppw-rich-content p { text-align: left !important; }
    .mp-partner-grid, .mp-price-grid, .mp-post-grid { grid-template-columns: 1fr; }
    .mp-section-heading-row, .mp-visibility-strip .mp-shell, .mp-footer-inner { align-items: flex-start; flex-direction: column; }
    .mp-visibility-strip ul { flex-wrap: wrap; }
    .mp-footer-inner { padding-block: 1.5rem; }
    .mp-footer-nav { flex-wrap: wrap; gap: .8rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
