/* Shared type and spacing scale. Component styles use these tokens too. */
:root {
    --text-caption: .75rem;
    --text-small: .875rem;
    --text-body: 1rem;
    --text-lead: 1.125rem;
    --text-title: 1.25rem;
    --heading-page: clamp(2rem, 3.5vw, 3rem);
    --heading-section: clamp(1.5rem, 2.5vw, 2rem);
    --space-section: clamp(2rem, 4vw, 3rem);
}
body { font-size: var(--text-body); line-height: 1.5; }
.so-home { font-family: 'Montserrat', system-ui, -apple-system, sans-serif; }
:is(.hm-h1, .mc.mc2 .mc2-hero-copy h1, .about-hero h1, .u-h1) {
    font-size: var(--heading-page); line-height: 1.15; letter-spacing: -.025em;
}
:is(.hm-sec-head h2, .about-section h2, .about-mission h2, .u-h2) {
    font-size: var(--heading-section); line-height: 1.25; letter-spacing: -.02em;
}
:is(.hm-lead, .mc.mc2 .mc2-hero-copy .mc-hero-text, .about-hero-copy > .about-lead) {
    font-size: var(--text-lead); line-height: 1.6; margin-top: 16px;
}
.hm { --space-section: clamp(1rem, 2vw, 1.5rem); }
.hm-hero { padding-block: 24px; }
.hm-sec { padding-block: var(--space-section); }
.hm-sec:has(.hm-stats), .hm-sec:has(.hm-reviews) { padding-block: var(--space-section); }
body:has(.hm) .so-footer.sf { margin-top: 24px !important; }
.hm-sec-head, .about-section-head { margin-bottom: 24px; gap: 16px; }
.hm-sec-head p { margin-top: 8px; line-height: 1.5; }
.hm-master-body { padding: 16px; gap: 8px; }
.hm-masters { align-items: stretch; }
.hm-master-top { flex-shrink: 0; }
.hm-master-name { font-size: var(--text-body); line-height: 1.4; }
.hm-master-spec { white-space: normal; line-height: 1.5; min-height: 3em; }
.hm-master-btn {
    display: flex; align-items: center; justify-content: center;
    margin-top: auto; flex-shrink: 0;
    font-size: var(--text-small); min-height: 40px; line-height: 1.5;
}
.hm-trust li span:last-child { line-height: 1.5; }
.hm-art-pill { max-width: 100%; white-space: normal; text-align: center; line-height: 1.4; }
.hm-review { padding: 24px; gap: 16px; }
.hm-review-text { font-size: var(--text-body); line-height: 1.6; }
.about-content { padding-block: 0 var(--space-section); }
.about-section { margin-top: var(--space-section); }
.about-hero-copy > p { font-size: var(--text-body); line-height: 1.6; }
.about-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.about-collage > .about-hand { display: none; }
.about-hero-benefits > div { min-width: 0; }
.about-collage figcaption { line-height: 1.4; white-space: normal; }
.about-mission article p, .about-trust p, .about-categories p,
.about-path-copy > p, .about-path li, .about-faq details p {
    font-size: var(--text-small); line-height: 1.6;
}
.about-faq summary { font-size: var(--text-body); line-height: 1.5; padding-block: 16px; }
.about-path, .about-budget, .about-geography, .about-final { height: auto; }
.about-path-copy { padding: 24px; }
.mc.mc2 .mc-tags { max-height: none; flex-wrap: wrap; }
.mc.mc2 .mc-experience, .mc.mc2 .mc-bottom > strong { position: static; }
.mc.mc2 .mc-experience { margin-top: 12px; line-height: 1.5; flex-wrap: wrap; }
.mc.mc2 .mc-bottom { margin-top: auto; padding-top: 12px; }
.mc.mc2 .mc-status-row { flex-wrap: wrap; overflow: visible; }
.mc.mc2 .mc2-trust strong { font-size: var(--text-small); line-height: 1.5; }
.mc.mc2 .mc2-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mc.mc2 .mc2-trust article, .mc.mc2 .mc2-trust article > div { min-width: 0; }
.mc.mc2 .mc2-trust :is(strong, small) { white-space: normal; overflow-wrap: anywhere; }
.mc.mc2 .mc-body h3 a { min-width: 0; overflow-wrap: anywhere; }
.mc.mc2 .mc-bottom, .mc.mc2 .mc-card-actions { min-width: 0; }
.mc.mc2 .mc-card-desc { font-size: var(--text-small); line-height: 1.6; }
.mc.mc2 .mc-body h3 { font-size: var(--text-lead); line-height: 1.4; }
.mc.mc2 .mc-search select, .mc.mc2 .mc-search-field input[type=text] { font-size: var(--text-body); }
.so-header .so-nav a { font-size: var(--text-small) !important; }
.so-header-row { min-height: 72px; height: auto; padding-block: 12px; }
.so-menu-button.is-open { z-index: auto; }
@media (min-width: 1051px) and (max-width: 1239px) {
    .so-header .so-nav { gap: 16px; }
    .so-header .so-header-row { gap: 16px; }
    .so-header .so-header-actions .so-button { padding-inline: 16px; }
    .so-header .so-logo img { width: 144px; }
}
@media (max-width: 640px) {
    .hm-hero { padding-block: 16px; }
    .so-header .so-header-row { min-height: 64px; gap: 12px; }
    .hm-sec-head, .about-section-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
    .hm-master { flex-basis: 208px; }
    .hm-review { padding: 20px; }
    .about-path-copy { width: 100%; padding: 20px; }
    .about-path > img { display: none; }
    .about-budget > div, .about-geography > div:first-child, .about-final-copy { width: 100%; padding: 20px; }
    .about-budget > img, .about-map, .about-final > img, .about-final > ul { display: none; }
    .about-hero-benefits { gap: 8px; }
    .mc.mc2 .mc-search .so-button { min-width: 0; }
    .mc.mc2 .mc2-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    main :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: var(--text-body); }
}
@media (max-width: 380px) {
    .mc.mc2 .mc-card { grid-template-columns: minmax(0, 1fr); }
    .mc.mc2 .mc-photo { width: 100%; height: 180px; }
    .mc.mc2 .mc-body { padding: 16px 0 0; }
    .mc.mc2 .mc-card-actions { grid-template-columns: minmax(0, 1fr); }
    .mc.mc2 .mc2-trust article { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 860px) {
    .about-hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Короткие преимущества каталога — по одной строке, без уменьшения текста. */
.mc.mc2 .mc2-trust-single { display: flex; flex-wrap: wrap; gap: 12px; }
.mc.mc2 .mc2-trust-single article {
    flex: 1 1 auto; min-height: 64px; padding: 12px; gap: 12px;
    flex-direction: row; align-items: center;
}
.mc.mc2 .mc2-trust-single :is(strong, small) { white-space: nowrap; overflow-wrap: normal; }
.mc.mc2 .mc2-trust-single .is-wide { flex-basis: 100%; }
@media (max-width: 640px) {
    .mc.mc2 .mc2-trust-single { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
    .mc.mc2 .mc2-trust-single article, .mc.mc2 .mc2-trust-single .is-wide { flex: 0 0 auto; }
}
