/* MTG Authors 1.4.1 — dedicated contributor profiles.
 * Every presentation rule is scoped to the new profile markup.
 * Existing article bylines, author boxes and contributor directories retain their styles.
 */
.mtga-profile-main {
    display: block;
}

.mtga-profile-v2 {
    --mtga-profile-ink: #26372b;
    --mtga-profile-muted: #5b685f;
    --mtga-profile-olive: #5f7845;
    --mtga-profile-olive-hover: #4e6438;
    --mtga-profile-line: #dce5d7;
    --mtga-profile-soft: #f0f5eb;
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 1080px;
    min-width: 0;
    margin: 40px auto 72px;
    color: var(--mtga-profile-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
    overflow-wrap: anywhere;
}

.mtga-profile-v2 *,
.mtga-profile-v2 *::before,
.mtga-profile-v2 *::after {
    box-sizing: border-box;
}

.mtga-profile-v2 a {
    color: var(--mtga-profile-olive);
    text-decoration: none;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.mtga-profile-v2 a:hover {
    text-decoration: underline;
}

.mtga-profile-v2 a:focus-visible {
    outline: 2px solid var(--mtga-profile-olive);
    outline-offset: 4px;
    border-radius: 4px;
}

.mtga-profile-v2 .mtga-profile-hero {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 28px;
    row-gap: 18px;
    margin: 0;
    padding: 28px 30px;
    border: 1px solid var(--mtga-profile-line);
    border-top: 3px solid #7c9465;
    border-radius: 14px;
    background: linear-gradient(120deg, #f7faf3 0%, #ffffff 82%);
}

.mtga-profile-v2 .mtga-profile-portrait {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 2px 0 0;
}

.mtga-profile-v2 .mtga-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border: 1px solid #d5e0cd;
    border-radius: 50%;
    background: #e9f0e2;
    color: var(--mtga-profile-olive);
}

.mtga-profile-v2 .mtga-profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
}

.mtga-profile-v2 .mtga-profile-initials {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .015em;
}

.mtga-profile-v2 .mtga-profile-intro {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.mtga-profile-v2 .mtga-profile-eyebrow {
    margin: 0 0 9px;
    color: var(--mtga-profile-olive);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mtga-profile-v2 .mtga-profile-title {
    margin: 0;
    padding: 0;
    color: var(--mtga-profile-ink);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.025em;
    text-align: left;
    overflow-wrap: anywhere;
}

.mtga-profile-v2 .mtga-profile-role {
    margin: 10px 0 0;
    color: #496239;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.mtga-profile-v2 .mtga-profile-summary {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--mtga-profile-muted);
    font-size: 16px;
    line-height: 1.75;
}

.mtga-profile-v2 .mtga-profile-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
    margin: 17px 0 0;
}

.mtga-profile-v2 .mtga-profile-topic {
    display: inline-block;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid #dce6d4;
    border-radius: 6px;
    background: #edf3e6;
    color: #496039;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.mtga-profile-v2 .mtga-profile-actions {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: flex-end;
    align-self: center;
    justify-self: end;
    flex-direction: column;
    gap: 12px;
    min-width: 140px;
    max-width: 168px;
}

.mtga-profile-v2 .mtga-profile-actions:empty {
    display: none;
}

.mtga-profile-v2 a.mtga-profile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid var(--mtga-profile-olive);
    border-radius: 8px;
    background: var(--mtga-profile-olive);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.mtga-profile-v2 a.mtga-profile-action:hover {
    border-color: var(--mtga-profile-olive-hover);
    background: var(--mtga-profile-olive-hover);
    color: #ffffff;
    text-decoration: none;
}

.mtga-profile-v2 .mtga-profile-socials {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 16px;
    justify-content: flex-end;
    min-width: 0;
    text-align: right;
}

.mtga-profile-v2 .mtga-profile-socials a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.mtga-profile-v2 .mtga-profile-about {
    max-width: 720px;
    margin: 36px 0 0;
}

.mtga-profile-v2 .mtga-profile-section-title {
    margin: 0 0 16px;
    padding: 0;
    color: var(--mtga-profile-ink);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
    text-align: left;
}

.mtga-profile-v2 .mtga-profile-biography {
    margin: 0;
    color: #35443a;
    font-size: 17px;
    line-height: 1.8;
}

.mtga-profile-v2 .mtga-profile-biography > :first-child {
    margin-top: 0;
}

.mtga-profile-v2 .mtga-profile-biography > :last-child {
    margin-bottom: 0;
}

.mtga-profile-v2 .mtga-profile-biography p {
    margin: 0 0 18px;
}

.mtga-profile-v2 .mtga-profile-biography a {
    text-decoration: underline;
}

.mtga-profile-v2 .mtga-profile-biography img,
.mtga-profile-v2 .mtga-profile-biography video {
    max-width: 100%;
    height: auto;
}

.mtga-profile-v2 .mtga-profile-biography iframe {
    max-width: 100%;
}

.mtga-profile-v2 .mtga-profile-biography pre,
.mtga-profile-v2 .mtga-profile-biography table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.mtga-profile-v2 .mtga-profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 30px;
    margin: 28px 0 0;
    padding: 23px 0;
    border-top: 1px solid var(--mtga-profile-line);
    border-bottom: 1px solid var(--mtga-profile-line);
}

/* Secondary profile facts stay available without repeating the biography upfront. */
.mtga-profile-v2 .mtga-profile-more {
    min-width: 0;
    margin: 18px 0 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--mtga-profile-line);
}

.mtga-profile-v2 .mtga-profile-more > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 0;
    padding: 10px 0;
    color: var(--mtga-profile-olive);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    list-style: none;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.mtga-profile-v2 .mtga-profile-more > summary::-webkit-details-marker {
    display: none;
}

.mtga-profile-v2 .mtga-profile-more > summary::marker {
    content: "";
}

.mtga-profile-v2 .mtga-profile-more > summary::after {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: -3px 3px 0 auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.mtga-profile-v2 .mtga-profile-more[open] > summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.mtga-profile-v2 .mtga-profile-more > summary:hover {
    color: var(--mtga-profile-ink);
}

.mtga-profile-v2 .mtga-profile-more > summary:focus-visible {
    outline: 2px solid var(--mtga-profile-olive);
    outline-offset: 3px;
    border-radius: 3px;
}

.mtga-profile-v2 .mtga-profile-more > .mtga-profile-details {
    gap: 16px 28px;
    margin: 0;
    padding: 4px 0 22px;
    border: 0;
}

.mtga-profile-v2 .mtga-profile-detail {
    min-width: 0;
    margin: 0;
}

.mtga-profile-v2 .mtga-profile-detail dt {
    margin: 0 0 6px;
    color: var(--mtga-profile-olive);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.mtga-profile-v2 .mtga-profile-detail dd {
    margin: 0;
    color: #455248;
    font-size: 14px;
    line-height: 1.75;
}

.mtga-profile-v2 .mtga-profile-articles {
    margin: 42px 0 0;
    scroll-margin-top: calc(var(--mtga-profile-anchor-offset, 110px) + var(--wp-admin--admin-bar--height, 0px));
}

.mtga-profile-v2 .mtga-profile-articles-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 20px;
    margin: 0 0 22px;
}

.mtga-profile-v2 .mtga-profile-articles-header .mtga-profile-section-title {
    margin: 0;
}

.mtga-profile-v2 .mtga-profile-count {
    flex-shrink: 0;
    margin: 0;
    color: var(--mtga-profile-muted);
    font-size: 13px;
    line-height: 1.5;
}

.mtga-profile-v2 .mtga-profile-article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 26px;
    margin: 0;
    padding: 0;
}

.mtga-profile-v2 .mtga-profile-article-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--mtga-profile-line);
    border-radius: 12px;
    background: #ffffff;
}

.mtga-profile-v2 .mtga-profile-article-card:focus-within {
    border-color: var(--mtga-profile-olive);
}

.mtga-profile-v2 a.mtga-profile-article-cover {
    display: block;
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #edf2e7;
    color: var(--mtga-profile-olive);
    text-decoration: none;
}

.mtga-profile-v2 .mtga-profile-article-cover:focus-visible {
    outline-offset: -4px;
    border-radius: 0;
}

.mtga-profile-v2 .mtga-profile-article-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}

.mtga-profile-v2 .mtga-profile-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    background: linear-gradient(130deg, #edf3e6, #f8faf5);
    color: #60774b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .02em;
    text-align: center;
}

.mtga-profile-v2 .mtga-profile-article-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 22px 24px 20px;
}

.mtga-profile-v2 .mtga-profile-article-title {
    margin: 0 0 11px;
    padding: 0;
    color: var(--mtga-profile-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -.015em;
}

.mtga-profile-v2 .mtga-profile-article-title a {
    display: inline-block;
    min-height: 44px;
    color: var(--mtga-profile-ink);
}

.mtga-profile-v2 .mtga-profile-article-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0 0 18px;
    overflow: hidden;
    color: var(--mtga-profile-muted);
    font-size: 15px;
    line-height: 1.7;
}

.mtga-profile-v2 .mtga-profile-article-meta {
    margin: auto 0 0;
    padding: 0;
    color: var(--mtga-profile-muted);
    font-size: 12px;
    line-height: 1.6;
}

.mtga-profile-v2 .mtga-profile-article-meta time {
    white-space: normal;
}

.mtga-profile-v2 .mtga-profile-pagination {
    margin: 30px 0 0;
}

.mtga-profile-v2 .mtga-profile-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mtga-profile-v2 .mtga-profile-pagination li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mtga-profile-v2 .mtga-profile-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--mtga-profile-line);
    border-radius: 8px;
    color: var(--mtga-profile-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.mtga-profile-v2 .mtga-profile-pagination a.page-numbers:hover {
    border-color: var(--mtga-profile-olive);
    background: var(--mtga-profile-soft);
    text-decoration: none;
}

.mtga-profile-v2 .mtga-profile-pagination .current {
    border-color: var(--mtga-profile-olive);
    background: var(--mtga-profile-olive);
    color: #ffffff;
}

.mtga-profile-v2 .mtga-profile-pagination .dots {
    min-width: 24px;
    padding-right: 3px;
    padding-left: 3px;
    border-color: transparent;
}

.mtga-profile-v2 .mtga-profile-empty {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--mtga-profile-line);
    border-radius: 10px;
    background: #f8faf5;
    color: var(--mtga-profile-muted);
    font-size: 15px;
    line-height: 1.75;
}

/* Tablets keep the action below the introduction rather than squeeze its text. */
@media (max-width: 900px) {
    .mtga-profile-v2 .mtga-profile-hero {
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: start;
        column-gap: 24px;
        padding: 28px;
    }

    .mtga-profile-v2 .mtga-profile-portrait {
        grid-row: 1 / span 2;
    }

    .mtga-profile-v2 .mtga-profile-actions {
        grid-column: 2;
        grid-row: 2;
        align-items: center;
        align-self: start;
        justify-self: start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 22px;
        min-width: 0;
        max-width: 100%;
    }

    .mtga-profile-v2 .mtga-profile-socials {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 700px) {
    .mtga-profile-v2 {
        margin-top: 28px;
        margin-bottom: 48px;
    }

    .mtga-profile-v2 .mtga-profile-hero {
        column-gap: 24px;
        padding: 28px;
    }

    .mtga-profile-v2 .mtga-profile-title {
        font-size: 34px;
    }

    .mtga-profile-v2 .mtga-profile-article-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .mtga-profile-v2 .mtga-profile-articles-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px 16px;
    }

    .mtga-profile-v2 .mtga-profile-count {
        flex-shrink: 1;
    }
}

@media (max-width: 540px) {
    .mtga-profile-v2 {
        width: calc(100% - 32px);
        margin-top: 24px;
        font-size: 15px;
    }

    .mtga-profile-v2 .mtga-profile-hero {
        display: block;
        padding: 24px 22px;
        border-radius: 12px;
    }

    .mtga-profile-v2 .mtga-profile-portrait {
        margin: 0 0 20px;
    }

    .mtga-profile-v2 .mtga-profile-avatar {
        width: 88px;
        height: 88px;
    }

    .mtga-profile-v2 .mtga-profile-initials {
        font-size: 29px;
    }

    .mtga-profile-v2 .mtga-profile-title {
        font-size: 30px;
        line-height: 1.2;
    }

    .mtga-profile-v2 .mtga-profile-role {
        margin-top: 8px;
        font-size: 15px;
    }

    .mtga-profile-v2 .mtga-profile-summary {
        font-size: 15px;
    }

    .mtga-profile-v2 .mtga-profile-topics {
        gap: 6px;
        margin-top: 15px;
    }

    .mtga-profile-v2 .mtga-profile-topic {
        padding: 4px 8px;
        font-size: 11.5px;
    }

    .mtga-profile-v2 .mtga-profile-actions {
        margin-top: 21px;
        gap: 6px 18px;
    }

    .mtga-profile-v2 .mtga-profile-socials {
        gap: 0 15px;
    }

    .mtga-profile-v2 .mtga-profile-about {
        margin-top: 28px;
    }

    .mtga-profile-v2 .mtga-profile-section-title {
        font-size: 23px;
    }

    .mtga-profile-v2 .mtga-profile-biography {
        font-size: 16px;
        line-height: 1.8;
    }

    .mtga-profile-v2 .mtga-profile-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        margin-top: 24px;
        padding: 21px 0;
    }

    .mtga-profile-v2 .mtga-profile-articles {
        margin-top: 32px;
    }

    .mtga-profile-v2 .mtga-profile-articles-header {
        margin-bottom: 18px;
    }

    .mtga-profile-v2 .mtga-profile-article-body {
        padding: 19px 20px 18px;
    }

    .mtga-profile-v2 .mtga-profile-article-title {
        font-size: 20px;
    }

    .mtga-profile-v2 .mtga-profile-article-excerpt {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .mtga-profile-v2 .mtga-profile-hero {
        padding: 22px 18px;
    }

    .mtga-profile-v2 .mtga-profile-article-body {
        padding-right: 17px;
        padding-left: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mtga-profile-v2 a.mtga-profile-action {
        transition: none;
    }
}

@media print {
    .mtga-profile-v2 {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .mtga-profile-v2 .mtga-profile-hero,
    .mtga-profile-v2 .mtga-profile-article-card {
        break-inside: avoid;
        background: #ffffff;
    }

    .mtga-profile-v2 .mtga-profile-actions,
    .mtga-profile-v2 .mtga-profile-pagination {
        display: none;
    }

    .mtga-profile-v2 .mtga-profile-article-excerpt {
        display: block;
        overflow: visible;
    }
}
