/**
 * Unified typography layer for the public site, profile and articles.
 *
 * Rollback is intentionally simple: disable the stylesheet in
 * app/Views/main/header.php. Existing component styles remain untouched.
 */

:root {
    --dz-font-family: GillSansC, Arial, sans-serif;
    --dz-font-regular: 400;
    --dz-font-bold: 700;
    --dz-font-extra-bold: 800;
    --dz-type-display: 48px;
    --dz-type-page-title: 40px;
    --dz-type-section-title: 28px;
    --dz-type-card-title: 21px;
    --dz-type-lead: 20px;
    --dz-type-body: 18px;
    --dz-type-article: 19px;
    --dz-type-ui: 16px;
    --dz-type-meta: 14px;
}

body {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Public navigation */
#app-menu > .container > ul > li > a,
#app-menu ul li ul.sub-menu li a,
.header-user-menu-block-link,
.header-search-loop-link,
.header-mobile-menu-list a {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-regular);
    line-height: 1.3;
    letter-spacing: normal;
}

#app-menu ul li a.font-bold,
.header-user-menu-block-link.font-bold {
    font-weight: var(--dz-font-bold);
}

/* Keep the primary desktop navigation comfortably readable. */
@media (min-width: 992px) {
    #app-menu > .container > ul > li > a,
    #app-menu ul li ul.sub-menu li a {
        font-size: 18px;
        line-height: 1.35;
    }
}

@media (min-width: 1301px) {
    #app-menu > .container > ul > li > a {
        font-size: 20px;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    #app-menu > .container > ul > li > a {
        margin-right: 10px;
    }
}

@media (min-width: 992px) and (max-width: 1100px) {
    #app-menu > .container > ul > li > a {
        margin-right: 2px;
    }
}

/* Main page */
body #app .app-content .page-main-title {
    font-family: var(--dz-font-family);
    font-size: clamp(32px, 3vw, var(--dz-type-page-title));
    font-weight: var(--dz-font-regular);
    line-height: 1.15;
    letter-spacing: -.02em;
}

body #app .app-content .top-part .form-text {
    font-size: var(--dz-type-lead) !important;
    font-weight: var(--dz-font-regular);
    line-height: 1.5;
}

body #app .app-content .advantages-list,
body #app .app-content .advantages-list li {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

body #app .app-content .advantages-list a {
    font-weight: var(--dz-font-regular);
}

body #app .app-content .licenses-section > h2,
body #app .app-content .rules-section > h2,
body #app .app-content .info-section > h2 {
    font-size: var(--dz-type-section-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.2;
}

body #app .app-content .service-card-content .license-title {
    font-size: var(--dz-type-card-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

body #app .app-content .service-card-content .license-number {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-bold);
    line-height: 1.35;
}

body #app .app-content .benefit-title,
body #app .app-content .license-number,
body #app .app-content .review-card .review-header,
body #app .app-content .review-card .review-header span {
    font-weight: var(--dz-font-bold);
}

body #app .app-content .service-card-content p,
body #app .app-content .review-card .review-content {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

body #app .app-content .publish-btn,
body #app .app-content .license-link,
body #app .app-content .action-button {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
    line-height: 1.25;
}

/* New profile */
html body .profile-new {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

html body .profile-new .profile-new-nav__link,
html body .profile-new .profile-new-nav__link i,
html body .profile-new .profile-new-sidebar__footer a {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-regular);
    line-height: 1.3;
    letter-spacing: normal;
}

html body .profile-new .profile-new-nav__link.is-active {
    font-weight: var(--dz-font-bold);
}

html body .profile-new .profile-new-nav__label {
    font-size: var(--dz-type-meta);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
    letter-spacing: .08em;
}

html body .profile-new .profile-new-nav__link b {
    font-size: var(--dz-type-meta);
    font-weight: var(--dz-font-bold);
    line-height: 1;
    letter-spacing: normal;
    font-variant-numeric: tabular-nums;
}

html body .profile-new .profile-new-page-head h1,
html body .profile-new .profile-new-dashboard-head h1 {
    font-size: clamp(32px, 3vw, var(--dz-type-page-title));
    font-weight: var(--dz-font-regular);
    line-height: 1.15;
    letter-spacing: -.02em;
}

html body .profile-new .profile-new-page-head p,
html body .profile-new .profile-new-dashboard-head p {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

html body .profile-new .profile-new-section-head h2 {
    font-size: var(--dz-type-section-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.2;
}

html body .profile-new .profile-new-button,
html body .profile-new .profile-new-text-link {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
}

html body .profile-new .profile-new-order,
html body .profile-new .profile-new-result,
html body .profile-new .profile-new-form-card,
html body .profile-new .profile-new-notice {
    font-family: var(--dz-font-family);
    font-weight: var(--dz-font-regular);
}

html body .profile-new .profile-new-order h2,
html body .profile-new .profile-new-result h2,
html body .profile-new .profile-new-form-card__head h2 {
    font-size: var(--dz-type-card-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

html body .profile-new .profile-new-status,
html body .profile-new .profile-new-chip,
html body .profile-new .profile-new-eyebrow {
    font-size: var(--dz-type-meta);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

html body .profile-new .profile-new-link-list__copy small,
html body .profile-new .profile-new-editor-service i,
html body .profile-new .profile-new-result p,
html body .profile-new .profile-new-order p {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-regular);
    line-height: 1.5;
}

html body .profile-new .profile-new-link-list strong,
html body .profile-new .profile-new-editor-service strong,
html body .profile-new .profile-new-pagination span {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
}

html body .profile-new .profile-new-order__icon,
html body .profile-new .profile-new-link-list i,
html body .profile-new .profile-new-editor-service span {
    font-weight: var(--dz-font-bold);
}

/* User publications */
body #app .article-container .article-main-title {
    font-family: var(--dz-font-family);
    font-size: clamp(32px, 3vw, var(--dz-type-page-title));
    font-weight: var(--dz-font-bold);
    line-height: 1.15;
    letter-spacing: -.02em;
}

body #app .article-container .post-content,
body #app .article-container .post-content * {
    font-family: var(--dz-font-family) !important;
}

body #app .article-container .post-content {
    font-size: var(--dz-type-article);
    font-weight: var(--dz-font-regular);
    line-height: 1.65;
}

body #app .article-container .post-content p,
body #app .article-container .post-content li,
body #app .article-container .post-content span {
    font-size: inherit !important;
    font-weight: inherit;
    line-height: inherit !important;
}

body #app .article-container .post-content h2 {
    font-size: var(--dz-type-section-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.25;
}

body #app .article-container .post-content h3 {
    font-size: 22px;
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

body #app .article-container .post-content h4,
body #app .article-container .post-content h5,
body #app .article-container .post-content h6 {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-bold);
    line-height: 1.35;
}

body #app .article-container .meta-label {
    font-size: var(--dz-type-meta);
    font-weight: var(--dz-font-regular);
    line-height: 1.3;
}

body #app .article-container .meta-value {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
    line-height: 1.4;
}

body #app .article-container .sidebar-download-btn,
body #app .article-container .comments-link,
body #app .article-container .report-link,
body #app .article-container .certificate-btn {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

/* Editorial news and news list */
body .news-index,
body .news-article-shell {
    font-family: var(--dz-font-family);
    font-weight: var(--dz-font-regular);
}

body .news-hero h1 {
    font-size: clamp(32px, 3vw, var(--dz-type-page-title));
    font-weight: var(--dz-font-regular);
    line-height: 1.15;
    letter-spacing: -.02em;
}

body .news-article__header h1 {
    font-size: clamp(32px, 3vw, var(--dz-type-page-title));
    font-weight: var(--dz-font-bold);
    line-height: 1.15;
    letter-spacing: -.02em;
}

body .news-hero__lead,
body .news-article__body {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-article);
    font-weight: var(--dz-font-regular);
    line-height: 1.65;
}

body .news-kicker,
body .news-article__meta,
body .news-card__meta {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-meta);
    line-height: 1.3;
}

body .news-kicker {
    font-weight: var(--dz-font-bold);
    letter-spacing: .08em;
}

body .news-article__body h2 {
    font-size: var(--dz-type-section-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.25;
}

body .news-article__body h3 {
    font-size: 22px;
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

body .news-article__body h4,
body .news-article__body h5,
body .news-article__body h6 {
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-bold);
    line-height: 1.35;
}

body .news-card h2,
body .news-card h3,
body .news-card__title {
    font-size: var(--dz-type-card-title);
    font-weight: var(--dz-font-bold);
    line-height: 1.3;
}

body .news-card__excerpt {
    font-family: var(--dz-font-family);
    font-size: var(--dz-type-body);
    font-weight: var(--dz-font-regular);
    line-height: 1.55;
}

body .news-card__more,
body .news-publishing-note a {
    font-size: var(--dz-type-ui);
    font-weight: var(--dz-font-bold);
}

@media (max-width: 768px) {
    :root {
        --dz-type-display: 38px;
        --dz-type-page-title: 32px;
        --dz-type-section-title: 24px;
        --dz-type-card-title: 20px;
        --dz-type-lead: 19px;
        --dz-type-article: 18px;
    }

    body #app .app-content .page-main-title,
    html body .profile-new .profile-new-page-head h1,
    html body .profile-new .profile-new-dashboard-head h1,
    body #app .article-container .article-main-title,
    body .news-hero h1,
    body .news-article__header h1 {
        font-size: var(--dz-type-page-title);
    }
}
