body:has(.zmg-page) {
    background: #f6f6f6;
}

.zmg-page,
.zmg-page * {
    box-sizing: border-box;
}

.zmg-page {
    --zmg-text: #2f2f2f;
    --zmg-muted: #8d8d8d;
    --zmg-orange: #ff5a11;
    --zmg-orange-2: #f7a934;
    --zmg-card: #ffffff;
    --zmg-radius: 16px;
    padding: 36px 0 70px;
    color: var(--zmg-text);
    font-family: "PT Root UI", Arial, sans-serif;
}

.zmg-container {
    width: 1440px;
    max-width: calc(100% - 160px);
    margin: 0 auto;
}

.zmg-hero {
    display: grid;
    grid-template-columns: 1fr 560px;
    gap: 48px;
    align-items: center;
    margin-bottom: 54px;
}

.zmg-hero__text h1 {
    margin: 0 0 12px;
    max-width: 540px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: .01em;
}

.zmg-hero__text p {
    margin: 0;
    max-width: 420px;
    color: #686868;
    font-size: 18px;
    line-height: 1.4;
}

.zmg-hero__banner {
    min-height: 150px;
    overflow: hidden;
    position: relative;
    display: block;
    padding: 28px 300px 24px 32px;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #19c987 0%, #64e6a7 100%);
}

.zmg-hero__banner span {
    display: inline-flex;
    height: 24px;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    color: #ff5a11;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.zmg-hero__banner strong {
    display: block;
    max-width: 230px;
    font-size: 24px;
    line-height: 1.08;
}

.zmg-hero__banner img {
    position: absolute;
    right: 34px;
    bottom: -24px;
    width: 245px;
    max-width: none;
    transform: rotate(-2deg);
}

.zmg-section {
    margin-top: 64px;
}

.zmg-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.zmg-section__head h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: .01em;
}

.zmg-section__head p {
    margin: 7px 0 0;
    max-width: 620px;
    color: #686868;
    font-size: 16px;
    line-height: 1.35;
}

.zmg-main-grid {
    display: grid;
    grid-template-columns: 628px 1fr;
    gap: 24px;
}

.zmg-main-grid__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.zmg-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.zmg-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.zmg-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: var(--zmg-radius);
    background: var(--zmg-card);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.zmg-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    height: 150px;
    border-radius: var(--zmg-radius) var(--zmg-radius) 0 0;
    background: #ff5a11;
}

.zmg-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.zmg-card:hover .zmg-card__image img {
    transform: scale(1.03);
}

.zmg-card__badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff;
    color: #2f2f2f;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.zmg-card__badge::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5a11;
}

.zmg-card__badge--like::before { background: #3299ff; }
.zmg-card__badge--star::before { background: #8c6cff; }

.zmg-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 14px;
}

.zmg-card__title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: .01em;
}

.zmg-card__title a {
    color: inherit;
    text-decoration: none;
}

.zmg-card__title a:hover {
    color: var(--zmg-orange);
}

.zmg-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    margin-top: auto;
    color: #2f2f2f;
    font-size: 14px;
    line-height: 1.2;
}

.zmg-card__author img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    object-fit: cover;
}

.zmg-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: #a2a2a2;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.zmg-card__meta-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.zmg-card__meta-item::before {
    content: "";
    width: 14px;
    height: 14px;
    opacity: .7;
    background: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.zmg-card__meta-item--views::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C5 4 2 10 2 10s3 6 8 6 8-6 8-6-3-6-8-6Zm0 10a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2.2a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C5 4 2 10 2 10s3 6 8 6 8-6 8-6-3-6-8-6Zm0 10a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2.2a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6Z'/%3E%3C/svg%3E");
}
.zmg-card__meta-item--time::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm1 8.1 3 1.8-.9 1.4-3.8-2.3V5.5H11v4.6Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm1 8.1 3 1.8-.9 1.4-3.8-2.3V5.5H11v4.6Z'/%3E%3C/svg%3E");
}
.zmg-card__meta-item--date::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h2v2h4V2h2v2h2v14H4V4h2V2Zm10 7H4v7h12V9Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h2v2h4V2h2v2h2v14H4V4h2V2Zm10 7H4v7h12V9Z'/%3E%3C/svg%3E");
}

.zmg-card--lead .zmg-card__image {
    height: 224px;
}

.zmg-card--lead .zmg-card__title {
    font-size: 22px;
    line-height: 1.12;
}

.zmg-card--compact {
    display: grid;
    grid-template-columns: 148px 1fr;
    min-height: 150px;
}

.zmg-card--compact .zmg-card__image {
    height: 150px;
    border-radius: var(--zmg-radius) 0 0 var(--zmg-radius);
}

.zmg-card--compact .zmg-card__body {
    padding: 12px 12px 11px;
}

.zmg-card--compact .zmg-card__title {
    font-size: 15px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.zmg-card--compact .zmg-card__author {
    font-size: 12px;
    gap: 6px;
}

.zmg-card--compact .zmg-card__author img {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.zmg-card--compact .zmg-card__meta {
    gap: 8px;
    font-size: 10px;
}

.zmg-card--text {
    min-height: 152px;
}

.zmg-card--text .zmg-card__body {
    padding: 18px 18px 14px;
}

.zmg-card--wide .zmg-card__image {
    height: 180px;
}

.zmg-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 14px;
    scrollbar-width: none;
}

.zmg-tabs::-webkit-scrollbar { display: none; }

.zmg-tabs a {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    color: #2f2f2f;
    background: #fff;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.zmg-tabs a.is-active,
.zmg-tabs a:hover {
    color: #fff;
    background: linear-gradient(90deg, #f7a934 0%, #f37645 50%, #f57442 100%);
}

.zmg-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.zmg-more a,
.zmg-app a,
.zmg-subscribe button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #f7a934 0%, #f37645 50%, #f57442 100%);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.zmg-more--light a {
    color: #ff5a11;
    background: #fff;
}

.zmg-special-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.zmg-special-grid .zmg-card--compact {
    min-height: 132px;
}

.zmg-special-grid .zmg-card--compact .zmg-card__image {
    height: 132px;
}

.zmg-recommend {
    margin-top: 70px;
    padding: 48px 0 54px;
    background: #3aa0ff;
}

.zmg-recommend .zmg-section__head h2,
.zmg-recommend .zmg-section__head p {
    color: #fff;
}

.zmg-test-grid,
.zmg-authors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.zmg-test-card {
    overflow: hidden;
    min-height: 280px;
    padding-bottom: 16px;
    border-radius: var(--zmg-radius);
    background: #fff;
}

.zmg-test-card__image {
    display: block;
    height: 150px;
    overflow: hidden;
    background: #ff5a11;
}

.zmg-test-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zmg-test-card h3 {
    min-height: 54px;
    margin: 14px 16px 10px;
    font-size: 17px;
    line-height: 1.16;
}

.zmg-test-card h3 a {
    color: inherit;
    text-decoration: none;
}

.zmg-test-card__link {
    display: inline-flex;
    margin-left: 16px;
    color: #ff5a11;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.zmg-author-card {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    border-radius: var(--zmg-radius);
    color: #fff;
    background: #222;
}

.zmg-author-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .82;
}

.zmg-author-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.72) 100%);
}

.zmg-author-card > div {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.zmg-author-card h3 {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.1;
}

.zmg-author-card p {
    overflow: hidden;
    display: -webkit-box;
    margin: 0 0 10px;
    color: rgba(255,255,255,.86);
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.zmg-author-card a {
    color: #ff8b37;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.zmg-app {
    position: relative;
    margin-top: 42px;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 34px 46px;
    border-radius: 18px;
    background: #eeeeee;
}

.zmg-app__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.zmg-app h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.1;
}

.zmg-app p {
    max-width: 760px;
    margin: 0;
    color: #242424;
    font-size: 18px;
    line-height: 1.25;
}

.zmg-app__image {
    position: absolute;
    right: 42px;
    top: 50%;
    width: 467px;
    max-width: 42%;
    height: auto;
    transform: translateY(-50%);
    pointer-events: none;
}

.zmg-subscribe {
    width: 760px;
    margin-top: 70px;
    padding: 44px 52px;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #8b63ff 0%, #b98cff 100%);
}

.zmg-subscribe h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.15;
}

.zmg-subscribe p {
    max-width: 560px;
    margin: 0 auto 24px;
    color: rgba(255,255,255,.85);
    font-size: 15px;
    line-height: 1.35;
}

.zmg-subscribe form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
}

.zmg-subscribe input {
    width: 100%;
    height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;
    outline: none;
    color: #fff;
    background: rgba(255,255,255,.12);
    font-size: 15px;
}

.zmg-subscribe input::placeholder {
    color: rgba(255,255,255,.7);
}

@media (max-width: 1327px) {
    .zmg-container { max-width: calc(100% - 48px); }
    .zmg-main-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .zmg-card--compact { grid-template-columns: 130px 1fr; }
}

@media (max-width: 1023px) {
    .zmg-hero { grid-template-columns: 1fr; }
    .zmg-hero__banner { min-height: 170px; }
    .zmg-main-grid,
    .zmg-main-grid__side,
    .zmg-special-grid { grid-template-columns: 1fr; }
    .zmg-cards-row,
    .zmg-test-grid,
    .zmg-authors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .zmg-page {
        padding: 24px 0 48px;
    }
    .zmg-container {
        width: 335px;
        max-width: calc(100% - 40px);
    }
    .zmg-hero {
        gap: 24px;
        margin-bottom: 40px;
    }
    .zmg-hero__text h1 {
        font-size: 28px;
        line-height: 1.12;
    }
    .zmg-hero__text p {
        font-size: 16px;
    }
    .zmg-hero__banner {
        min-height: 210px;
        padding: 22px 22px 120px;
    }
    .zmg-hero__banner strong {
        max-width: 250px;
        font-size: 22px;
    }
    .zmg-hero__banner img {
        right: 22px;
        width: 210px;
    }
    .zmg-section {
        margin-top: 46px;
    }
    .zmg-section__head h2 {
        font-size: 25px;
        line-height: 1.12;
    }
    .zmg-section__head p {
        font-size: 14px;
    }
    .zmg-main-grid,
    .zmg-main-grid__side,
    .zmg-mini-grid,
    .zmg-cards-row,
    .zmg-special-grid,
    .zmg-test-grid,
    .zmg-authors-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .zmg-card--compact {
        grid-template-columns: 128px 1fr;
        min-height: 136px;
    }
    .zmg-card--compact .zmg-card__image {
        height: 136px;
    }
    .zmg-card--lead .zmg-card__image,
    .zmg-card__image,
    .zmg-card--wide .zmg-card__image {
        height: 188px;
    }
    .zmg-card--lead .zmg-card__title {
        font-size: 19px;
    }
    .zmg-recommend {
        margin-top: 48px;
        padding: 34px 0 40px;
    }
    .zmg-author-card {
        min-height: 300px;
    }
    .zmg-app {
        padding: 26px 24px;
    }
    .zmg-app h2 {
        font-size: 24px;
    }
    .zmg-subscribe {
        width: 335px;
        max-width: calc(100% - 40px);
        margin-top: 48px;
        padding: 32px 24px;
    }
    .zmg-subscribe h2 {
        font-size: 24px;
    }
    .zmg-subscribe form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .zmg-app {
        min-height: 190px;
        padding: 24px 20px 118px;
    }

    .zmg-app__content {
        max-width: 100%;
    }

    .zmg-app p {
        font-size: 15px;
        line-height: 1.35;
    }

    .zmg-app__image {
        right: -52px;
        bottom: -32px;
        top: auto;
        width: 300px;
        max-width: none;
        transform: none;
    }
}


/* 2026-08 full design audit fixes */
.zmg-page,.zmg-page * { font-family:"PT Root UI",Arial,sans-serif; }
.zmg-main-grid__lead .zmg-card--lead { min-height:420px; }
.zmg-main-grid__lead .zmg-card--lead .zmg-card__image { height:238px; }
.zmg-main-grid__side .zmg-card--compact { min-height:198px; }
.zmg-mini-grid .zmg-card--text,
.zmg-cards-row .zmg-card--text { min-height:210px; }
.zmg-card__body { min-height:0; }
.zmg-card__author { margin-top:auto; }
.zmg-card__meta { margin-top:12px; padding-top:0; }
.zmg-card__image { isolation:isolate; }
.zmg-card__image img { inset:0; width:100%; height:100%; object-fit:cover; object-position:center; }
.zmg-card--text .zmg-card__meta { margin-top:auto; }
.zmg-recommend { border-radius:32px; margin-left:auto; margin-right:auto; width:min(1440px,100%); background:linear-gradient(135deg,#3c9df7 0%,#5578ef 100%); overflow:hidden; }
.zmg-recommend .zmg-cards-row { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:10px; scrollbar-width:thin; }
.zmg-recommend .zmg-card { flex:0 0 302px; scroll-snap-align:start; }
.zmg-author-card { min-height:376px; border-radius:24px; }
.zmg-author-card > img { object-position:center top; }
.zmg-author-card > div { left:20px; right:20px; bottom:20px; }
.zmg-author-card h3 { font-size:22px; line-height:1.1; }
.zmg-author-card p { min-height:42px; }
body.op-new-journal-preview #op-header.op-journal-header { height:72px !important; padding-left:80px !important; padding-right:80px !important; }
@media(max-width:1023px){
 .zmg-main-grid__lead .zmg-card--lead,.zmg-main-grid__side .zmg-card--compact,.zmg-mini-grid .zmg-card--text,.zmg-cards-row .zmg-card--text{min-height:0;}
 .zmg-recommend{border-radius:24px;}
}


/* 2026-08-04 homepage card and recommendation controls */
.zmg-mini-grid .zmg-card--text {
    min-height: 330px;
}
.zmg-card--text .zmg-card__image {
    display: block;
    height: 170px;
    background: linear-gradient(135deg,#efe8ff 0%,#dceeff 48%,#ffe5dc 100%);
}
.zmg-card--text .zmg-card__image img {
    object-fit: cover;
}
.zmg-card--text .zmg-card__body {
    flex: 1 1 auto;
    min-height: 160px;
}
.zmg-recommend .zmg-container {
    position: relative;
}
.zmg-recommend__controls {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    gap: 10px;
    z-index: 5;
}
.zmg-recommend__arrow {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #ff5a11;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23,55,112,.16);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}
.zmg-recommend__arrow:hover:not(:disabled) { transform: translateY(-2px); }
.zmg-recommend__arrow:disabled { opacity: .42; cursor: default; }
.zmg-recommend .zmg-cards-row {
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
}
.zmg-recommend .zmg-cards-row::-webkit-scrollbar { display: none; }
@media (max-width: 767px) {
    .zmg-mini-grid .zmg-card--text { min-height: 0; }
    .zmg-card--text .zmg-card__image { height: 188px; }
    .zmg-recommend__controls {
        position: static;
        justify-content: flex-end;
        margin: -10px 0 14px;
    }
    .zmg-recommend__arrow { width: 40px; height: 40px; }
}
