:root {
    color-scheme: light;
    --ink: #111827;
    --muted: #5f6b7a;
    --line: #e4e7ec;
    --panel: #ffffff;
    --soft: #f6f8fb;
    --brand: #00725f;
    --brand-dark: #005849;
    --accent: #f4b42a;
    --blue: #0f5f9f;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f8fafc;
    color: var(--ink);
    font-family: 'Inter', Arial, sans-serif;
    letter-spacing: 0;
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #121c2d;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    font-style: italic;
}

.brand strong {
    display: inline-block;
    padding: 4px 6px;
    border-radius: 4px;
    background: #121c2d;
    color: #ffffff;
    font-weight: 900;
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-meta span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: stretch;
    padding: 44px 0 24px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

h1 {
    max-width: 760px;
    margin: 0;
    color: #111827;
    font-size: 48px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: 0;
}

.headline-copy {
    max-width: 680px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 600;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin: 4px auto 22px;
    overflow-x: auto;
}

.category-tabs a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.category-tabs a.is-active {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.top-summary {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.top-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.top-summary img {
    max-width: 180px;
    max-height: 44px;
    object-fit: contain;
    object-position: left center;
}

.top-summary a,
.primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.top-summary a:hover,
.primary-cta:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px auto 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.filter-count {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-count strong {
    color: var(--ink);
    font-size: 18px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 1px;
}

.filter-button,
.secondary-button,
.footer-bottom button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.filter-button {
    min-height: 38px;
    padding: 0 14px;
    white-space: nowrap;
}

.filter-button.is-active {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.partner-list {
    display: grid;
    gap: 18px;
}

.partner-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.partner-card.is-featured {
    border-color: rgba(244, 180, 42, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.rank-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #111827;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.partner-main {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 156px;
    gap: 26px;
    padding: 24px 24px 24px 82px;
}

.partner-identity {
    min-width: 0;
}

.product-type {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.partner-identity img {
    display: block;
    width: auto;
    max-width: 200px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 16px;
}

.partner-identity h2 {
    margin: 0 0 14px;
    color: #101828;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: 0;
}

.identity-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.identity-meta + .identity-meta {
    margin-top: 10px;
}

.identity-meta strong {
    color: #344054;
    font-size: 12px;
    font-weight: 900;
}

.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    position: relative;
    display: inline-block;
    color: #d0d5dd;
    font-size: 18px;
    line-height: 1;
}

.star.full {
    color: var(--accent);
}

.star.half {
    color: #d0d5dd;
}

.star.half::before {
    content: '\2605';
    position: absolute;
    inset: 0 auto 0 0;
    width: 50%;
    overflow: hidden;
    color: var(--accent);
}

.rating-score {
    margin-left: 7px;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
}

.rating-missing {
    color: #667085;
    font-size: 12px;
    font-weight: 900;
}

.partner-content {
    min-width: 0;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.metric-grid.has-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.metric-grid span,
.summary-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.metric-grid strong,
.summary-grid strong {
    display: block;
    color: #111827;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.metric-grid small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.description {
    margin: 0;
    color: #344054;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 600;
}

.promo-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #c7eadf;
    border-radius: 8px;
    background: #f1fbf7;
    color: #145847;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 800;
}

.highlight-block {
    margin-top: 18px;
}

.highlight-block h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.highlight-block ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.highlight-block li {
    position: relative;
    padding-left: 18px;
    color: #475467;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.highlight-block li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.partner-actions {
    display: grid;
    align-content: start;
    gap: 10px;
}

.cta-stack {
    display: grid;
    gap: 6px;
}

.cta-stack .primary-cta {
    width: 100%;
}

.cta-context {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    text-align: center;
}

.secondary-button {
    min-height: 44px;
    padding: 0 16px;
}

.secondary-button:hover,
.footer-bottom button:hover {
    border-color: #98a2b3;
    color: #111827;
}

.summary-section {
    margin-top: 42px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.summary-section h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
}

.summary-section p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.summary-grid div {
    padding: 16px;
    border-radius: 8px;
    background: var(--soft);
}

.summary-grid strong {
    font-size: 16px;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-brand {
    margin-bottom: 24px;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.disclosure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.disclosure-grid h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 11px;
    font-weight: 900;
}

.disclosure-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 22px;
}

.footer-bottom div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 10px;
}

.footer-bottom p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 36px 16px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(5px);
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    position: relative;
    width: min(760px, 100%);
    padding: 28px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
}

.modal-panel.compact {
    width: min(560px, 100%);
}

.modal-panel h2 {
    margin: 0 52px 18px 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.modal-logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.modal-logo-row img {
    max-width: 180px;
    max-height: 42px;
    object-fit: contain;
    object-position: left center;
}

.modal-metrics {
    margin-bottom: 18px;
}

.modal-cta {
    width: 100%;
    margin-top: 22px;
}

.modal-context {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .page-header {
        grid-template-columns: 1fr;
    }

    .top-summary {
        min-height: 0;
    }

    .partner-main {
        grid-template-columns: 1fr;
        padding: 74px 20px 20px;
    }

    .partner-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-grid,
    .disclosure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 24px, 1120px);
    }

    .nav-inner,
    .filter-panel,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-meta {
        display: none;
    }

    .page-header {
        padding-top: 30px;
    }

    h1 {
        font-size: 36px;
    }

    .headline-copy {
        font-size: 15px;
    }

    .filter-buttons {
        width: 100%;
    }

    .partner-main {
        gap: 18px;
        padding: 72px 16px 16px;
    }

    .metric-grid,
    .metric-grid.has-three,
    .highlight-block ul,
    .partner-actions,
    .summary-grid,
    .disclosure-grid {
        grid-template-columns: 1fr;
    }

    .partner-identity h2 {
        font-size: 19px;
    }

    .metric-grid strong {
        font-size: 20px;
    }

    .modal {
        padding: 18px 10px;
    }

    .modal-panel {
        padding: 22px;
    }

    .modal-logo-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
