/* п.382–384 (ТЗ metro-services 27.09.2026): страницы услуг.
   Разметка — include/services/page.php, поведение — js/services.js.
   Все правила — внутри .ms (страница) и .ms-dialog (окно обращения);
   шапка и подвал — общие шаблона, здесь их не трогаем.
   Шрифт — шрифт сайта (как у шапки), размеры — по ТЗ. */
.ms{--ms-ink:#07183f;--ms-text:#202a37;--ms-muted:#69778b;--ms-lead:#59677c;--ms-line:#dfe5ef;--ms-soft:#f3f5f9;--ms-red:var(--tenant-accent,#e7182c);--ms-tint:#fff3f4;max-width:1128px;margin:0 auto;padding-bottom:16px;color:var(--ms-ink);font-size:14px;line-height:1.45;text-align:left}
.ms *,.ms-dialog *{box-sizing:border-box}
.ms h1,.ms h2,.ms h3,.ms p,.ms ul,.ms ol,.ms li{margin:0;padding:0;font-family:inherit;text-transform:none}
.ms ul,.ms ol{list-style:none}
.ms li::before{content:none}
.ms h1,.ms h2,.ms h3{color:var(--ms-ink);font-weight:700}
.ms a{color:inherit;text-decoration:none}
.ms button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
.ms a:focus-visible,.ms button:focus-visible,.ms summary:focus-visible,.ms-dialog :focus-visible{outline:2px solid #2763be;outline-offset:3px}
.ms .ms-ico{width:20px;height:20px;flex:none}
.ms-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.ms-crumb{display:flex;flex-wrap:wrap;gap:6px 10px;padding-top:1px;color:var(--ms-muted);font-size:12px}
.ms-crumb a:hover{color:var(--ms-ink)}
.ms-crumb [aria-current]{color:var(--ms-ink)}

.ms-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--ms-line);border-radius:10px;background:#fff;color:var(--ms-ink);font-size:14px;font-weight:600;line-height:1.2;white-space:nowrap}
.ms .ms-btn:hover{border-color:var(--ms-ink)}
.ms .ms-btn .ms-ico{width:17px;height:17px}
.ms .ms-btn--red{border-color:var(--ms-red);background:var(--ms-red);color:#fff}
.ms .ms-btn--red:hover{border-color:var(--ms-red);filter:brightness(.93)}
.ms-text-link{display:inline-flex;align-items:center;gap:7px;padding:8px 0;border:0;background:none;color:var(--ms-ink);font-size:13px;font-weight:500}
.ms .ms-text-link .ms-ico{width:17px;height:17px}
.ms-text-link:hover{color:var(--ms-red)}

.ms-eyebrow{display:block;margin-bottom:10px;color:var(--ms-muted);font-size:12px;font-weight:500}
.ms-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--ms-tint);color:var(--ms-red);flex:none}
.ms .ms-icon .ms-ico{width:21px;height:21px}

.ms-hero{display:grid;grid-template-columns:1.25fr 1fr;gap:72px;align-items:center;padding:44px 0 56px}
.ms-hero h1{max-width:610px;margin-top:14px;font-size:43px;line-height:1.1;letter-spacing:-1.4px}
.ms-lead{max-width:550px;margin:20px 0 25px!important;color:var(--ms-lead);font-size:17px;line-height:1.65}
.ms-hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 23px}
.ms-hero-actions .ms-btn{min-height:46px}
.ms-caption{max-width:470px;margin-top:15px!important;color:var(--ms-muted);font-size:12px}

.ms-task{padding:27px;border:1px solid var(--ms-line);border-radius:18px;background:var(--ms-soft)}
.ms-task-heading{display:flex;align-items:center;gap:10px;margin-bottom:17px;color:var(--ms-muted);font-size:12px}
.ms-task h2,.ms-conversation h2{font-size:24px;line-height:1.2;letter-spacing:-.6px}
.ms-task>p{margin:10px 0 17px!important;color:var(--ms-muted);font-size:13px;line-height:1.6}
.ms-task-options{display:grid;gap:8px}
.ms .ms-task-options button{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:45px;padding:10px 13px;border:1px solid var(--ms-line);border-radius:9px;background:#fff;color:var(--ms-ink);font-size:13px;text-align:left}
.ms .ms-task-options button:hover{border-color:#9ba8bb}
.ms .ms-task-options .ms-ico{width:15px;height:15px;color:var(--ms-muted)}
.ms-task small{display:block;margin-top:16px;color:var(--ms-muted);font-size:11px}

.ms-conversation{padding:32px;border-radius:18px;background:var(--ms-ink);color:#fff}
.ms .ms-conversation h2{color:#fff}
.ms-conversation>.ms-icon{margin-bottom:25px;background:#26365a;color:#fff}
.ms-conversation p{margin:14px 0 22px!important;color:#cbd5e6;font-size:15px;line-height:1.6}
.ms-conversation small{display:block;margin-top:16px;color:#b6c3da;font-size:12px}

.ms-section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.ms h2{font-size:25px;line-height:1.2;letter-spacing:-.6px}
.ms h3{font-size:17px;line-height:1.35}

.ms-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.ms-cards article{padding:24px;border:1px solid var(--ms-line);border-radius:14px}
.ms-cards h3{margin-top:15px}
.ms-cards p{margin-top:10px;color:var(--ms-muted);font-size:14px;line-height:1.65}

.ms-feature{display:grid;grid-template-columns:1fr 1fr;gap:50px;margin:38px 0 44px;padding:30px;border-radius:16px;background:var(--ms-soft)}
.ms-feature p{max-width:475px;margin-top:13px;color:var(--ms-muted);font-size:14px;line-height:1.7}
.ms-checklist{display:grid;gap:17px;align-self:center}
.ms-checklist li{display:flex;align-items:flex-start;gap:13px;font-size:14px;line-height:1.45}
.ms .ms-checklist .ms-ico{width:18px;height:18px;color:var(--ms-red)}

.ms-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
.ms-steps li{padding-top:19px;border-top:1px solid var(--ms-line)}
.ms-steps li>span{color:var(--ms-red);font-size:12px;font-weight:700}
.ms-steps h3{margin:13px 0 9px}
.ms-steps p{color:var(--ms-muted);font-size:14px;line-height:1.65}
#ms-how{scroll-margin-top:170px;outline:0}

.ms-faq{display:grid;grid-template-columns:1fr 1.5fr;gap:80px;margin:55px 0}
.ms-faq>div>p{margin:14px 0!important;color:var(--ms-muted);font-size:14px;line-height:1.6}
.ms-faq details{border-bottom:1px solid var(--ms-line)}
.ms-faq summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 0;list-style:none;font-size:15px;font-weight:600;cursor:pointer}
.ms-faq summary::-webkit-details-marker{display:none}
.ms-faq summary::marker{content:''}
.ms .ms-faq summary .ms-ico{transition:transform .15s}
.ms-faq details[open] summary .ms-ico{transform:rotate(180deg)}
.ms-faq details p{padding:0 25px 20px 0;color:var(--ms-muted);font-size:14px;line-height:1.65}

.ms-help{display:flex;align-items:center;justify-content:space-between;gap:35px;margin:40px 0 25px;padding:30px;border-radius:18px;background:var(--ms-ink);color:#fff}
.ms .ms-help h2{color:#fff}
.ms-help .ms-eyebrow{color:#b6c3da}
.ms-help p{max-width:650px;margin-top:12px;color:#cbd5e6;font-size:14px;line-height:1.6}
.ms-help .ms-btn{flex:none}

.ms-related{display:flex;flex-wrap:wrap;align-items:center;gap:12px 25px;margin:27px 0 22px;font-size:13px}
.ms-related>span{color:var(--ms-muted)}
.ms-related a{display:inline-flex;align-items:center;gap:7px;min-height:32px}
.ms-related a:hover{color:var(--ms-red)}
.ms .ms-related .ms-ico{width:15px;height:15px}

/* «Все услуги» */
.ms-filters{display:flex;flex-wrap:wrap;gap:5px}
.ms .ms-filters button{padding:9px 11px;border:1px solid var(--ms-line);border-radius:8px;background:#fff;color:var(--ms-muted);font-size:12px}
.ms .ms-filters button[aria-pressed=true]{border-color:var(--ms-ink);background:var(--ms-ink);color:#fff}
.ms-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.ms-service-card{display:flex;flex-direction:column;align-items:flex-start;padding:23px;border:1px solid var(--ms-line);border-radius:14px;transition:border-color .15s,background .15s}
.ms-service-card[hidden]{display:none}
.ms-service-card:hover{border-color:#a8b5ca;background:#fafbfe}
.ms-service-card h3{margin:15px 0 9px}
.ms-service-card p{margin-bottom:20px;color:var(--ms-muted);font-size:13px;line-height:1.6}
.ms-card-link{display:flex;align-items:center;gap:8px;margin-top:auto;font-size:12px;font-weight:700}
.ms .ms-card-link .ms-ico{width:15px;height:15px}
.ms-note{display:flex;align-items:center;gap:20px;margin-top:28px;padding:25px;border:1px solid var(--ms-line);border-radius:14px}
.ms-note>div{flex:1}
.ms-note p{margin-top:8px;color:var(--ms-muted);font-size:13px}

/* окно обращения: до 440 px, по центру, с внутренней прокруткой */
.ms-dialog{--ms-ink:#07183f;--ms-muted:#69778b;--ms-line:#dfe5ef;--ms-soft:#f3f5f9;--ms-red:var(--tenant-accent,#e7182c);position:fixed;inset:0;width:min(440px,calc(100% - 28px));max-width:none;max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);margin:auto;padding:30px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--ms-line);border-radius:18px;background:#fff;color:var(--ms-ink);box-shadow:0 24px 80px rgba(7,24,63,.19);font-size:14px;line-height:1.45;text-align:left}
.ms-dialog::backdrop{background:rgba(7,24,63,.33)}
.ms-dialog h2,.ms-dialog p{margin:0;font-family:inherit}
.ms-dialog button,.ms-dialog input,.ms-dialog select,.ms-dialog textarea{font:inherit}
.ms-dialog .ms-ico{width:17px;height:17px;flex:none}
.ms-dialog-x{position:absolute;top:14px;right:14px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:var(--ms-soft);color:var(--ms-ink);cursor:pointer}
.ms-dialog .ms-kicker{display:block;padding-right:40px;color:var(--ms-muted);font-size:11px}
.ms-dialog h2{margin:12px 36px 12px 0;color:var(--ms-ink);font-size:25px;font-weight:700;line-height:1.2;letter-spacing:-.5px}
.ms-dialog .ms-intro{color:var(--ms-muted);font-size:13px;line-height:1.6}
.ms-dialog .ms-field{margin-top:16px}
.ms-dialog label.ms-label{display:block;margin:0 0 7px;color:var(--ms-ink);font-size:12px;font-weight:600}
.ms-dialog .ms-label small{color:var(--ms-muted);font-weight:400}
.ms-dialog .ms-input{display:block;width:100%;min-height:44px;margin:0;padding:11px 12px;border:1px solid #c7d0df;border-radius:8px;background:#fff;color:var(--ms-ink);font-size:16px;line-height:1.3;box-shadow:none;appearance:none;-webkit-appearance:none}
.ms-dialog select.ms-input{padding-right:36px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2369778b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center}
.ms-dialog textarea.ms-input{min-height:85px;resize:vertical}
.ms-dialog .ms-input[aria-invalid=true]{border-color:var(--ms-red);box-shadow:0 0 0 1px var(--ms-red)}
.ms-dialog .ms-err{margin-top:6px;color:#c3132a;font-size:12px}
.ms-dialog .ms-err:empty{display:none}
.ms-dialog .ms-consent{display:flex;align-items:flex-start;gap:9px;margin-top:16px;color:var(--ms-muted);font-size:11px;font-weight:400;line-height:1.5;cursor:pointer}
.ms-dialog .ms-consent input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--ms-ink)}
.ms-dialog .ms-consent a{color:var(--ms-ink);text-decoration:underline}
.ms-dialog .ms-submit{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin-top:16px;padding:10px 16px;border:0;border-radius:9px;background:var(--ms-red);color:#fff;font-weight:700;cursor:pointer}
.ms-dialog .ms-submit:disabled{opacity:.6;cursor:default}
.ms-dialog .ms-alt{margin-top:12px;color:var(--ms-muted);font-size:12px;line-height:1.5}
.ms-dialog .ms-alt a,.ms-dialog .ms-alt button{padding:0;border:0;background:none;color:var(--ms-ink);font-size:12px;text-decoration:underline;cursor:pointer}
.ms-dialog .ms-status{margin-top:13px;padding:12px;border-radius:8px;background:#fff1f2;color:#8a1020;font-size:13px;line-height:1.5}
.ms-dialog .ms-status:empty{display:none}
.ms-dialog .ms-status a{color:inherit;font-weight:700}
.ms-dialog .ms-ok{padding:10px 0 4px;text-align:left}
.ms-dialog .ms-ok-ico{display:grid;place-items:center;width:48px;height:48px;margin-bottom:6px;border-radius:14px;background:#e9f7ef;color:#167346}
.ms-dialog .ms-ok-ico .ms-ico{width:24px;height:24px}
.ms-dialog .ms-back{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin-top:22px;border:1px solid var(--ms-line);border-radius:9px;background:#fff;color:var(--ms-ink);font-weight:600;cursor:pointer}
html.ms-locked{overflow:hidden}

/* 768–1199 px: поля 24, карточки в 2 колонки */
@media (max-width:1199px){
.ms{max-width:none}
.ms-cards,.ms-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ms-steps{gap:24px}
.ms-hero{gap:40px}
.ms-faq{gap:48px}
}
/* до 960 px — герой в одну колонку */
@media (max-width:959px){
.ms-hero{grid-template-columns:1fr;gap:28px}
.ms-hero h1{max-width:none}
.ms-section-title{display:block}
.ms-filters{margin-top:18px}
}
/* до 767 px — мобильная композиция, ширина резиновая */
@media (max-width:767px){
.ms-crumb{padding-top:6px;font-size:11px}
.ms-hero{display:block;padding:24px 0 35px}
.ms-hero h1{font-size:33px;letter-spacing:-.9px}
.ms-hero h1 br,.ms-faq h2 br{display:none}
.ms-lead{margin:16px 0 20px!important;font-size:15px}
.ms-hero-actions{gap:12px}
.ms-task,.ms-conversation{margin-top:27px;padding:22px}
.ms h2{font-size:23px}
.ms-cards,.ms-service-grid,.ms-steps{grid-template-columns:1fr;gap:12px}
.ms-steps{gap:20px}
.ms-cards article,.ms-service-card{padding:20px}
.ms-feature{display:block;margin:25px 0 32px;padding:23px}
.ms-checklist{margin-top:23px}
.ms-faq{grid-template-columns:1fr;gap:10px;margin:36px 0}
.ms-help{display:block;margin-top:25px;padding:24px}
.ms-help .ms-btn{width:100%;margin-top:20px;white-space:normal}
.ms-note{display:block;padding:22px}
.ms-note h3{margin-top:13px}
.ms-note .ms-btn{width:100%;margin-top:17px;white-space:normal}
.ms-related{gap:8px 18px}
.ms-related>span{width:100%}
.ms .ms-filters button,.ms .ms-task-options button{min-height:44px}
.ms-dialog{padding:24px 20px}
.ms-dialog h2{font-size:22px}
}
@media (prefers-reduced-motion:reduce){
.ms *,.ms-dialog *{transition:none!important}
}
/* YARMETRO_ITEM514 (Сергей 30.09: «в кадастровых услугах и красные точки и галочки, выглядит неряшливо, надо только
   галочки»): у списков страниц услуг - только свои значки; красную точку старого правила metro.css (.main ul li::before)
   правило .ms li::before не перебивало - у него специфичность меньше */
.main .ms ul li::before, .main .ms ol li::before { content: none !important; display: none !important; }
