.fmg-benefits,
.fmg-verification,
.fmg-discovery {
    color: var(--fm-ink, #16241f);
}

.fmg-benefits > header,
.fmg-verification > header,
.fmg-discovery > header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.fmg-benefits h3,
.fmg-verification h3,
.fmg-discovery h3 {
    margin: 0;
}

.fmg-plan-status {
    background: #e8f2ed;
    border: 1px solid #bad2c6;
    border-radius: 999px;
    color: #174f40;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 10px;
}

.fmg-usage-grid,
.fmg-status-grid,
.fmg-admin-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.fmg-usage-grid section,
.fmg-status-grid section,
.fmg-admin-metrics section {
    border-left: 3px solid var(--fm-coral, #cf5c4f);
    min-width: 0;
    padding: 9px 12px;
}

.fmg-usage-grid strong,
.fmg-status-grid strong,
.fmg-admin-metrics strong {
    display: block;
    font-size: 21px;
}

.fmg-usage-grid span,
.fmg-status-grid span,
.fmg-status-grid small,
.fmg-admin-metrics span {
    color: #5b6963;
    display: block;
    font-size: 13px;
}

.fmg-verification-actions {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fmg-verification-actions section {
    border-top: 1px solid #dbe5df;
    padding-top: 18px;
}

.fmg-verification-actions form,
.fmg-advanced-grid,
.fmg-search-identifiers {
    display: grid;
    gap: 12px;
}

.fmg-verification-actions label,
.fmg-advanced-grid label,
.fmg-search-identifiers label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.fmg-verification-actions input,
.fmg-advanced-grid input,
.fmg-advanced-grid select,
.fmg-search-identifiers input {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    width: 100%;
}

.fmg-challenge,
.fmg-local-code {
    background: #fff7d7;
    border: 1px solid #e1ca72;
    border-radius: 6px;
    color: #4c3c08;
    font-weight: 800;
    letter-spacing: 0;
    padding: 12px;
    text-align: center;
}

.fmg-notice {
    background: #e8f2ed;
    border-left: 4px solid #26725c;
    padding: 12px;
}

.fmg-notice.is-error {
    background: #fff0ed;
    border-color: #b94a3f;
}

.fmg-feed-tabs {
    border-bottom: 1px solid #dbe5df;
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 7px;
}

.fmg-feed-tabs a {
    color: #52615a;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 11px;
    text-decoration: none;
}

.fmg-feed-tabs a[aria-current="page"] {
    border-bottom: 3px solid var(--fm-coral, #cf5c4f);
    color: var(--fm-green-dark, #123f34);
}

.fmg-visitor-privacy {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin: -12px 0 20px;
}

.fmg-visitor-privacy button {
    min-height: 36px;
}

.fmg-feed-item {
    min-width: 0;
}

.fmg-match-reason {
    border-left: 3px solid #d9a82e;
    margin-top: 9px;
    padding: 6px 10px;
}

.fmg-match-reason strong {
    color: #174f40;
}

.fmg-match-reason ul {
    color: #5b6963;
    font-size: 13px;
    margin: 5px 0 0 18px;
    padding: 0;
}

.fmg-search-identifiers {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fmg-advanced-search {
    border-top: 1px solid #dbe5df;
    grid-column: 1 / -1;
    padding-top: 8px;
}

.fmg-advanced-search summary {
    color: var(--fm-green-dark, #123f34);
    cursor: pointer;
    font-weight: 800;
    padding: 8px 0;
}

.fmg-advanced-grid {
    grid-template-columns: 1fr;
    padding-top: 12px;
}

.fmg-range {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fmg-locked,
.fmg-empty {
    border-left: 4px solid #d9a82e;
    padding: 14px 18px;
}

.fmg-policy-table input[type="number"] {
    max-width: 100px;
    width: 100%;
}

.fmg-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 240px));
}

/* Personal discovery feeds use a shared editorial reading rhythm. */
.fmg-discovery--editorial {
    background: #10231d;
    border: 1px solid #3d554a;
    border-radius: 9px;
    color: #eef3e9;
    margin: 0 auto;
    max-width: 1120px;
    overflow: hidden;
}

.fmg-discovery--editorial .fmg-editorial-top {
    align-items: center;
    border-bottom: 1px solid #3d554a;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 22px 30px;
}

.fmg-editorial-top strong,
.fmg-editorial-main h3,
.fmg-editorial-card h4 {
    color: #f4f2e7;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

.fmg-editorial-top strong {
    font-size: 26px;
}

.fmg-editorial-top span,
.fmg-editorial-intro,
.fmg-editorial-card-body,
.fmg-editorial-select,
.fmg-editorial-count {
    color: #dbe6d7;
}

.fmg-editorial-top span {
    font-size: 13px;
}

.fmg-editorial-nav {
    border-bottom: 1px solid #3d554a;
    padding: 16px 25px;
}

.fmg-editorial-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
}

.fmg-editorial-tabs a {
    border: 1px solid #3d554a;
    border-radius: 6px;
    color: #f2f4ee;
    font-size: 13px;
    padding: 12px 13px;
    text-decoration: none;
}

.fmg-editorial-tabs a[aria-current="page"] {
    background: #edf1e8;
    border-color: #edf1e8;
    color: #11241d;
}

.fmg-editorial-select {
    display: none;
    font-size: 13px;
}

.fmg-editorial-select span {
    display: block;
    margin: 0 0 9px;
}

.fmg-editorial-select select {
    appearance: auto;
    background: #1c3028;
    border: 1px solid #4a6257;
    border-radius: 6px;
    box-sizing: border-box;
    color: #f4f2e7;
    font: inherit;
    min-height: 46px;
    padding: 9px 12px;
    width: 100%;
}

.fmg-editorial-main {
    margin: 0 auto;
    max-width: 760px;
    padding: 38px 28px 18px;
}

.fmg-editorial-eyebrow,
.fmg-editorial-ground small {
    color: #e2ae69;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.fmg-editorial-main h3 {
    font-size: 38px;
    line-height: 1.08;
    margin: 0 0 13px;
}

.fmg-editorial-intro {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 30px;
}

.fmg-discovery--editorial .fmg-visitor-privacy {
    color: #dbe6d7;
    font-size: 12px;
    justify-content: flex-start;
    margin: 0 auto 22px;
    max-width: 760px;
    padding: 0 28px;
}

.fmg-discovery--editorial .fmg-visitor-privacy button {
    background: transparent;
    border: 1px solid #4a6257;
    color: #edf1e8;
    padding: 6px 11px;
}

.fmg-editorial-count {
    border-bottom: 1px solid #3d554a;
    font-size: 13px;
    margin: 0;
    padding: 0 0 9px;
}

.fmg-editorial-list {
    display: grid;
}

.fmg-editorial-card {
    border-bottom: 1px solid #3d554a;
    display: grid;
    gap: 22px;
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 27px 0;
}

.fmg-editorial-avatar {
    align-items: center;
    background: #304939;
    border-radius: 7px;
    display: flex;
    height: 110px;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.fmg-editorial-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.fmg-editorial-avatar > span {
    color: #cdd6ca;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 30px;
}

.fmg-editorial-avatar small {
    bottom: 8px;
    color: #dbe6d7;
    font-size: 9px;
    left: 9px;
    letter-spacing: 1px;
    position: absolute;
    text-transform: uppercase;
}

.fmg-editorial-card-body {
    min-width: 0;
}

.fmg-editorial-activity {
    color: #f1b66a;
    font-size: 12px;
    margin: 0 0 11px;
}

.fmg-editorial-name {
    align-items: center;
    display: grid;
    gap: 0 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.fmg-editorial-name > span {
    color: #e2ae69;
    font-size: 11px;
}

.fmg-editorial-name h4 {
    font-size: 25px;
    margin: 0;
}

.fmg-editorial-name p {
    font-size: 12px;
    margin: 0;
    text-align: right;
}

.fmg-editorial-score {
    align-items: center;
    display: flex;
    gap: 12px;
    margin: 13px 0;
}

.fmg-editorial-score > strong {
    background: #36523f;
    border-radius: 999px;
    color: #fffef5;
    font-size: 16px;
    padding: 9px;
}

.fmg-editorial-score span {
    display: grid;
    font-size: 11px;
    line-height: 1.35;
}

.fmg-editorial-score b {
    color: #fffef5;
    font-size: 12px;
}

.fmg-editorial-story {
    color: #f7f2df;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.45;
    margin: 12px 0;
}

.fmg-editorial-ground {
    background: #304b3a;
    border-radius: 6px;
    margin: 15px 0;
    padding: 11px 13px;
}

.fmg-editorial-ground small {
    display: block;
    color: #355342;
    font-size: 9px;
    font-weight: 800;
    margin-bottom: 7px;
}

.fmg-editorial-ground p {
    color: #fffef5;
    font-size: 12px;
    font-weight: 700;
    margin: 0;
}

.fmg-editorial-details {
    font-size: 12px;
    margin: 15px 0;
}

.fmg-editorial-details summary {
    color: #fffef5;
    cursor: pointer;
    font-weight: 700;
}

.fmg-editorial-details summary span {
    font-weight: 400;
}

.fmg-editorial-details ul {
    line-height: 1.5;
    margin: 10px 0 0 18px;
    padding: 0;
}

.fmg-editorial-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.fmg-editorial-primary,
.fmg-editorial-secondary {
    border: 1px solid #567061;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 13px;
    min-height: 42px;
    padding: 11px 15px;
    text-decoration: none;
}

.fmg-editorial-primary {
    background: #edf1e8;
    border-color: #edf1e8;
    color: #11241d;
}

.fmg-editorial-secondary {
    background: transparent;
    color: #f4f2e7;
    cursor: pointer;
}

@media (max-width: 720px) {
    .fmg-discovery--editorial {
        border-radius: 0;
    }

    .fmg-discovery--editorial .fmg-editorial-top {
        padding: 20px 17px;
    }

    .fmg-editorial-top strong {
        font-size: 23px;
    }

    .fmg-editorial-top span {
        font-size: 11px;
    }

    .fmg-editorial-nav {
        padding: 17px;
    }

    .fmg-editorial-tabs {
        display: none;
    }

    .fmg-editorial-select {
        display: block;
    }

    .fmg-editorial-main {
        padding: 35px 30px 20px;
    }

    .fmg-editorial-main h3 {
        font-size: 40px;
    }

    .fmg-discovery--editorial .fmg-visitor-privacy {
        padding: 0 30px;
    }

    .fmg-editorial-card {
        background: #1b3027;
        border: 1px solid #476152;
        border-radius: 8px;
        display: block;
        margin: 21px 0 28px;
        overflow: hidden;
        padding: 0;
    }

    .fmg-editorial-avatar {
        border-radius: 0;
        height: 190px;
    }

    .fmg-editorial-avatar > span {
        font-size: 59px;
    }

    .fmg-editorial-card-body {
        padding: 25px 27px 24px;
    }

    .fmg-editorial-name {
        gap: 4px 8px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .fmg-editorial-name > span {
        display: none;
    }

    .fmg-editorial-name h4 {
        font-size: 29px;
    }

    .fmg-editorial-name p {
        font-size: 11px;
    }

    .fmg-editorial-score {
        background: #304b3a;
        border-radius: 7px;
        margin: 18px 0;
        padding: 11px 16px;
    }

    .fmg-editorial-score > strong {
        background: transparent;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 29px;
        padding: 0;
    }

    .fmg-editorial-story {
        font-size: 19px;
    }

    .fmg-editorial-ground {
        background: transparent;
        border-radius: 0;
        border-top: 1px solid #4a6257;
        margin-top: 18px;
        padding: 15px 0 0;
    }
}

@media (max-width: 820px) {
    .fmg-usage-grid,
    .fmg-status-grid,
    .fmg-verification-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .fmg-usage-grid,
    .fmg-status-grid,
    .fmg-verification-actions,
    .fmg-advanced-grid,
    .fmg-search-identifiers {
        grid-template-columns: 1fr;
    }

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

/* Align the editorial Matches feeds to the pale Match Preferences surface. */
.fmg-discovery--editorial {
    background: #f7f8f7;
    border-color: #d9e2de;
    color: #16241f;
}

.fmg-discovery--editorial .fmg-editorial-top,
.fmg-editorial-nav,
.fmg-editorial-count,
.fmg-editorial-card {
    border-color: #d9e2de;
}

.fmg-editorial-top strong,
.fmg-editorial-main h3,
.fmg-editorial-card h4 {
    color: #16241f;
}

.fmg-editorial-top span,
.fmg-editorial-intro,
.fmg-editorial-card-body,
.fmg-editorial-select,
.fmg-editorial-count,
.fmg-discovery--editorial .fmg-visitor-privacy {
    color: #65736d;
}

.fmg-editorial-tabs a {
    border-color: #c6d2cd;
    color: #31443c;
}

.fmg-editorial-tabs a[aria-current="page"] {
    background: #1a4766;
    border-color: #1a4766;
    color: #fff;
}

.fmg-editorial-select select,
.fmg-discovery--editorial .fmg-visitor-privacy button {
    background: #fff;
    border-color: #b9c8c1;
    color: #1a4766;
}

.fmg-editorial-avatar {
    background: #e4ece8;
}

.fmg-editorial-avatar > span {
    color: #456052;
}

.fmg-editorial-avatar small {
    color: #31443c;
}

.fmg-editorial-activity {
    color: #9a6623;
}

.fmg-editorial-name {
    grid-template-columns: auto minmax(0, 1fr);
}

.fmg-editorial-name > span {
    color: #a46d25;
}

.fmg-editorial-identity {
    display: flex;
    flex-wrap: wrap;
    margin: 3px 0 0 26px;
}

.fmg-editorial-identity p {
    color: #52615a;
    font-size: 12px;
    margin: 0;
}

.fmg-editorial-location::after {
    color: #8b9992;
    content: ' · ';
    padding: 0 5px;
}

.fmg-editorial-score > strong {
    background: #dce8e1;
    color: #174f40;
}

.fmg-editorial-score b,
.fmg-editorial-ground p,
.fmg-editorial-details summary {
    color: #174f40;
}

.fmg-editorial-story {
    color: #263b31;
}

.fmg-editorial-ground {
    background: #e5eee8;
}

.fmg-editorial-primary {
    background: #1a4766;
    border-color: #1a4766;
    color: #fff;
}

.fmg-editorial-secondary {
    background: #fff;
    color: #1a4766;
}

.fmg-editorial-secondary.is-saved,
.fmg-editorial-secondary:disabled {
    background: #e5eee8;
    border-color: #c7d8cd;
    color: #557065;
    cursor: default;
    opacity: 1;
}

@media (max-width: 720px) {
    .fmg-editorial-card {
        background: #f7f8f7;
        border-color: #d9e2de;
    }

    .fmg-editorial-name {
        display: block;
    }

    .fmg-editorial-identity {
        display: grid;
        gap: 3px;
        margin: 7px 0 0;
    }

    .fmg-editorial-identity p {
        font-size: 11px;
    }

    .fmg-editorial-location::after {
        content: '';
        padding: 0;
    }

    .fmg-editorial-score {
        background: #e5eee8;
    }

    .fmg-editorial-ground {
        background: transparent;
        border-color: #d9e2de;
    }
}
