/* Shared frontend proportions from the approved moderate preview. */
:root {
    --tu-density-hero: clamp(48px, 5vw, 80px);
    --tu-density-title: clamp(40px, 4.17vw, 68px);
    --tu-density-section: clamp(32px, 3.33vw, 56px);
    --tu-density-gap: 40px;
    --tu-density-hero-space: 32px;
    --tu-density-card-pad: 18px;
    --tu-density-card-title: 20px;
    --tu-density-directory-title: 27px;
    --tu-density-reading-width: 840px;
    --tu-density-cta: 48px;
}
body.tu-home-layout .tu-home[data-homepage] .tu-hero__title,
body.tu-home-layout .tu-catalog-hero .tu-catalog-hero__inner h1,
body.tu-home-layout .tu-account-page :is(.tu-auth, .tu-account-heading) h1,
.tu-info-page h1 {
    font-size: var(--tu-density-title) !important;
    line-height: 1.1 !important;
    margin-block: 12px 16px !important;
}
body.tu-home-layout .tu-home[data-homepage] .tu-hero__title {
    font-size: var(--tu-density-hero) !important;
    max-width: none !important;
}
body.tu-home-layout :is(.tu-hero, .tu-hero__inner, .tu-catalog-hero, .tu-catalog-hero__inner) {
    min-height: 0 !important;
}
body.tu-home-layout :is(.tu-hero__inner, .tu-catalog-hero__inner) {
    padding-block: var(--tu-density-hero-space) !important;
}
body.tu-home-layout :is(.tu-hero__copy, .tu-catalog-hero__copy) {
    font-size: 16px !important;
    line-height: 1.5;
    max-width: 66ch !important;
    margin-top: 0 !important;
}
body.tu-home-layout .tu-hero__eyebrow { min-height: 0 !important; font-size: 15px !important; line-height: 1.35; }
body.tu-home-layout :is(.tu-hero__actions, .tu-catalog-hero__actions) {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    flex-wrap: wrap;
    margin-top: 20px !important;
    gap: 10px !important;
}
body.tu-home-layout :is(.tu-hero__actions, .tu-catalog-hero__actions) .tu-button:nth-child(n),
body.tu-home-layout :is(.tu-section-heading .tu-link-button, .tu-catalog-card__link, .tu-telegram .tu-link-button,
    .tu-forum > .tu-shell > .tu-link-button, .tu-directory__cta, .tu-footer-partners__body .tu-button, .tu-seo .tu-seo__toggle) {
    height: auto !important;
    min-height: var(--tu-density-cta) !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 9px 18px !important;
    font: 700 15px/1.25 Involve, Arial, sans-serif !important;
    box-sizing: border-box;
}
body.tu-home-layout :is(.tu-section-heading h2, .tu-telegram h2) {
    font-size: var(--tu-density-section) !important;
    line-height: 1.12 !important;
}
body.tu-home-layout :is(.tu-section, .tu-telegram, .tu-forum) {
    min-height: 0 !important;
    padding-block: var(--tu-density-gap) !important;
}
body.tu-home-layout .tu-section-heading { margin-bottom: 20px !important; }
body.tu-home-layout :is(.tu-article-card__body, .tu-editorial-card__body, .tu-partner-card__body) {
    padding: var(--tu-density-card-pad) !important;
}
body.tu-home-layout .tu-home .tu-article-card,
body.tu-home-layout .tu-home .tu-article-card__body {
    display: flex;
    flex-direction: column;
}
body.tu-home-layout .tu-home .tu-article-card__body {
    flex: 1;
    height: auto;
}
body.tu-home-layout .tu-home .tu-article-card__body .tu-card-footer {
    margin-top: auto;
}
body.tu-home-layout :is(.tu-article-card, .tu-editorial-card, .tu-partner-card) h3,
body.tu-home-layout .tu-catalog-card .tu-catalog-card__title {
    font-size: var(--tu-density-card-title) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
}
body.tu-home-layout .tu-catalog-card .tu-catalog-card__title { font-size: var(--tu-density-directory-title) !important; }
body.tu-home-layout .tu-catalog-card {
    padding: var(--tu-density-card-pad) !important;
    min-height: 0 !important;
}
body.tu-home-layout .tu-catalog-card__award img { width: 66px; height: auto; }
body.tu-home-layout .tu-catalog-card .tu-catalog-card__payout { font-size: 19px !important; }
body.tu-home-layout :is(.tu-article-card__image, .tu-editorial-card__media) {
    aspect-ratio: 1 !important;
    height: auto !important;
    overflow: hidden;
}
body.tu-home-layout :is(.tu-article-card__image, .tu-editorial-card__media) img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    transform: none !important;
}
body.tu-home-layout .tu-home .tu-partner-card__logo {
    display: block;
    aspect-ratio: 410 / 180 !important;
    height: auto !important;
    min-height: 0 !important;
    background: #fff;
}
body.tu-home-layout .tu-home .tu-partner-card__logo img {
    display: block;
    width: 100%;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    transform: none !important;
}
body.tu-home-layout :is(.tu-editorial-promo, .tu-filter) { padding-block: 16px; }
body.tu-home-layout .tu-reading {
    padding-block: var(--tu-density-hero-space) !important;
}
body.tu-home-layout .tu-reading .tu-reading__inner {
    max-width: min(100%, var(--tu-density-reading-width)) !important;
}
body.tu-home-layout .tu-reading .tu-reading__header { margin-bottom: 24px; }
body.tu-home-layout .tu-reading .tu-reading__header h1 {
    font-size: clamp(28px, 3vw, 44px) !important;
    line-height: 1.2 !important;
    margin-block: 0 16px !important;
}
body.tu-home-layout .tu-reading__body { font-size: 18px !important; line-height: 1.6 !important; }
body.tu-home-layout .tu-reading__body h2 { font-size: 28px !important; }
body.tu-home-layout .tu-reading__body h3 { font-size: 22px !important; }

.tu-editorial__grid + .tu-editorial__grid { margin-top: 28px; }
.tu-editorial-card .tu-card-meta { flex-wrap: wrap; gap: 4px 8px; }

@media (max-width: 1199.98px) {
    body.tu-home-layout .tu-editorial__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 18px;
    }
    .tu-editorial__grid > .tu-editorial-card { grid-column: span 3; }
    /* Put the final three together when a two-column row would have a single card. */
    .tu-editorial__grid:has(> .tu-editorial-card:nth-child(odd):last-child)
        > .tu-editorial-card:nth-last-child(-n+3) { grid-column: span 2; }
}

@media (max-width: 575.98px) {
    body.tu-home-layout .tu-editorial__grid { gap: 10px; }
    body.tu-home-layout .tu-editorial__grid .tu-editorial-card__body { padding: 10px !important; }
    body.tu-home-layout .tu-editorial__grid .tu-editorial-card h3 {
        font-size: 16px !important;
        margin-block: 10px;
    }
    .tu-editorial__grid .tu-card-meta span { line-height: 1.25; padding: 3px 5px; overflow-wrap: anywhere; }
    .tu-editorial__grid .tu-card-footer { flex-wrap: wrap; gap: 4px 8px; }
}

@media (min-width: 1200px) {
    body.tu-home-layout :is(.tu-editorial__grid, .tu-knowledge .tu-card-grid,
        .tu-home :is(.tu-articles, .tu-news) .tu-card-grid) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    /* A remainder of one becomes a row of three followed by a row of two. */
    .tu-editorial__grid > .tu-editorial-card:nth-child(4n):nth-last-child(2) {
        grid-column: 1;
    }
}

@media (max-width: 1399.98px) {
    body.tu-home-layout .tu-home-header .mobile_menu {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }
    body.tu-home-layout .tu-home-header .mobile_menu > .logo_block {
        grid-column: 2;
        justify-self: center;
        margin-inline: 0 !important;
    }
    body.tu-home-layout .tu-home-header .mobile_menu > li:has(> .navbar-toggler) {
        grid-column: 3;
        justify-self: end;
    }
}

@media (max-width: 767px) {
    :root { --tu-density-hero: 31px; --tu-density-title: 35px; --tu-density-section: 33px; --tu-density-gap: 28px; }
    :root {
        --tu-density-hero-space: 14px;
        --tu-density-card-title: 18px;
        --tu-density-directory-title: 20px;
        --tu-density-cta: 44px;
    }
    body.tu-home-layout :is(.tu-hero__actions, .tu-catalog-hero__actions) .tu-button:nth-child(n) { width: 100% !important; }
    body.tu-home-layout .tu-editorial-card h3 { font-size: 22px !important; }
    body.tu-home-layout :is(.tu-hero__copy, .tu-catalog-hero__copy) { font-size: 14px !important; }
    body.tu-home-layout :is(.tu-hero__actions, .tu-catalog-hero__actions) { margin-top: 12px !important; gap: 8px !important; }
    body.tu-home-layout .tu-reading__body { font-size: 16px !important; }
    body.tu-home-layout .tu-home-header .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 52px;
        min-height: 48px;
    }
    body.tu-home-layout .tu-home-header .header_nav_component .navbar-toggler .navbar-toggler-icon {
        display: inline-block;
        width: 26px;
        height: 26px;
        color: var(--tu-header-nav, #11233d);
        mask: none !important;
        filter: none !important;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.33 4.17h13.34M3.33 10h13.34M3.33 15.83h13.34' stroke='%2311233d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    }
    body.tu-home-layout .tu-home-header .header_nav_component .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2311233d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='8.33'/%3E%3Cpath d='m7.5 7.5 5 5m0-5-5 5'/%3E%3C/svg%3E") !important;
    }
}

/* Details, forms and recurring blocks use the same spacing as the lists. */
.tu-directory-detail .tu-directory__shell {
    padding-block: var(--tu-density-hero-space) !important;
}
.tu-directory-detail .tu-directory__card {
    gap: 24px !important;
    padding: clamp(16px, 2.2vw, 32px) !important;
}
.tu-directory-detail .tu-directory__section { gap: 16px !important; }
.tu-directory-detail .tu-directory__title {
    font-size: clamp(28px, 3.36vw, 48px) !important;
    line-height: 1.2 !important;
}
.tu-directory-detail .tu-directory__section > h2 {
    font-size: clamp(22px, 2.1vw, 30px) !important;
    line-height: 1.25 !important;
}
.tu-directory-detail :is(.tu-directory__prose, .tu-directory__job-body .tu-directory__prose) {
    max-width: 76ch;
    font-size: clamp(16px, 1.25vw, 18px) !important;
    line-height: 1.55 !important;
}
body.tu-home-layout .tu-editorial-promo .tu-editorial-promo__title {
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.25;
}
body.tu-home-layout .tu-editorial-promo .tu-editorial-promo__badge {
    font-size: clamp(13px, 1.25vw, 18px);
}
body.tu-home-layout .tu-forum .tu-forum__stats strong {
    font-size: clamp(24px, 2.8vw, 40px);
}
body.tu-home-layout .tu-home .tu-benefit {
    height: auto;
    min-height: 319px;
    padding-block: 24px 38px;
}
body.tu-home-layout .tu-home .tu-benefit::after { bottom: 20px; }
body.tu-home-layout .tu-home .tu-benefit h3 {
    font-size: clamp(21px, 1.8vw, 26px);
    line-height: 1.22;
    margin-block: 26px 12px;
}
@media (max-width: 1199px) {
    body.tu-home-layout .tu-home .tu-benefit {
        min-height: 245px;
        padding-block: 16px 26px;
    }
    body.tu-home-layout .tu-home .tu-benefit::after { bottom: 12px; }
    body.tu-home-layout .tu-home .tu-benefit__icon { width: 36px; height: 36px; }
    body.tu-home-layout .tu-home .tu-benefit h3 { margin-block: 14px 8px; }
}
@media (max-width: 767px) {
    body.tu-home-layout .tu-home .tu-benefit { min-height: 185px; padding-block: 14px 24px; }
    body.tu-home-layout .tu-home .tu-benefit__icon { width: 32px; height: 32px; }
}
body.tu-home-layout .tu-seo { padding-block: var(--tu-density-gap); }
body.tu-home-layout .tu-seo:is(.is-fully-visible, .is-expanded),
body.tu-home-layout .tu-seo:is(.is-fully-visible, .is-expanded) .tu-seo__panel {
    height: auto !important;
    min-height: 0 !important;
}
body.tu-home-layout .tu-seo:is(.is-fully-visible, .is-expanded) .tu-seo__content {
    flex: none;
    max-height: none !important;
    overflow: visible;
}
.tu-seo__toggle[hidden] { display: none !important; }
body.tu-home-layout :is(.tu-seo__panel, .tu-footer-partners__body) { padding: var(--tu-density-card-pad); }
body.tu-home-layout .tu-home-footer .footer_wrapper .container {
    padding-block: var(--tu-density-hero-space);
}
.tu-account-layout .tu-account-page {
    padding-block: var(--tu-density-hero-space) var(--tu-density-gap) !important;
}
.tu-account-layout .tu-auth { gap: clamp(20px, 3vw, 44px) !important; }
.tu-wiki { padding-block: var(--tu-density-hero-space); }
.tu-wiki h1 { font-size: clamp(26px, 2.4vw, 36px); }

@media (max-width: 767px) {
    .tu-directory-detail .tu-directory__card { gap: 18px !important; }
    .tu-directory-detail .tu-directory__section { gap: 12px !important; }
}
