/* 1.8: служебные разделы, поиск, консультация, инструменты, мобильные фильтры. Токены — из theme.css. */

/* Первый экран служебного раздела и консультации */
.section-hero, .consult-hero { background: linear-gradient(90deg, #fffffffa 0%, #ffffffe6 55%, #ffffffb3 100%), #f4f8fc url('../images/kremlin-outline.webp') right bottom / auto 100% no-repeat; border-bottom: 1px solid var(--line); }
.section-hero-inner { padding-block: 22px 30px; }
.section-hero-copy { max-width: 860px; }
.section-hero h1, .consult-hero h1 { font-size: 40px; margin: 6px 0 12px; }
.section-lead { font-size: var(--fs-lead); color: #2d456c; max-width: 760px; margin: 0 0 14px; }
.section-links { display: flex; flex-wrap: wrap; gap: 6px; }

/* Раскладка раздела */
.section-layout { display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(250px, 1fr); gap: 26px; align-items: start; }
.section-main > * + * { margin-top: 26px; }
.section-prose { font-size: 15px; line-height: 1.7; }
.section-prose h2 { font-size: 22px; margin-top: 26px; }
.section-prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.section-prose th, .section-prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.section-prose th { background: var(--surface-soft); color: var(--navy); }
.section-block > h2, .section-block .section-heading h2 { font-size: 22px; }
.section-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-children { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.section-child { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; color: var(--ink); }
.section-child:hover { border-color: #b9d0ec; background: var(--surface-soft); text-decoration: none; }
.section-child .lucide-icon { flex: 0 0 24px; color: var(--blue); margin-top: 2px; }
.section-child strong { display: block; color: var(--navy); font-size: 15px; }
.section-child small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
.section-documents { margin: 0; }
.section-faq + .section-faq { margin-top: 18px; }
.section-sidebar { position: sticky; top: 16px; }
.section-nav ul { list-style: none; padding: 0; margin: 0; }
.section-nav li + li { border-top: 1px solid var(--line); }
.section-nav a { display: block; padding: 8px 0; font-size: 14px; }
.section-phone { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-weight: 700; color: var(--navy); }
.section-phone .lucide-icon { width: 18px; height: 18px; color: var(--blue); }
.muted { color: var(--muted); font-weight: 500; }

/* Поиск */
.search-page h1 { font-size: 34px; }
.search-page .search-form { max-width: 760px; }
.search-count { color: var(--muted); font-size: 14px; margin: 14px 0; }
.search-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.search-types a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13px; color: var(--ink); background: #fff; }
.search-types a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.search-types span { opacity: .7; margin-left: 4px; }
.search-results { list-style: none; padding: 0; margin: 0; max-width: 880px; }
.search-result { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-result h2 { font-size: 19px; margin: 4px 0 6px; }
.search-result p { margin: 0; font-size: 14px; color: #2d456c; }
.search-result mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.search-result-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.search-result-type { padding: 2px 8px; border-radius: var(--r-pill); background: var(--pale); color: var(--blue); font-weight: 700; }
.search-result-document .search-result-type { background: #fdeeee; color: #b42335; }
.search-result-category .search-result-type, .search-result-section .search-result-type { background: var(--positive-soft); color: var(--positive); }
.search-empty { padding: 20px 0; }
.search-suggest { margin-top: 34px; }

/* Каталог: сворачиваемые фильтры */
.catalog-filters > summary { display: none; }
.catalog-filters { margin: 0; }

/* Консультация */
.consult-hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 34px; padding-block: 22px 34px; align-items: start; }
.consult-benefits { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.consult-benefits li, .check-list li { display: flex; gap: 8px; align-items: flex-start; }
.consult-benefits .lucide-icon { width: 18px; height: 18px; color: #fff; background: var(--positive); border-radius: 50%; padding: 3px; flex: 0 0 18px; margin-top: 3px; }
.consult-phone { display: inline-flex; gap: 12px; align-items: center; padding: 12px 18px; border: 1px solid #cddff6; border-radius: var(--r-xl); background: #fff; color: var(--navy); }
.consult-phone .lucide-icon { width: 28px; height: 28px; color: var(--blue); }
.consult-phone strong { display: block; font-size: 22px; }
.consult-phone small { color: var(--muted); font-size: 12px; }
.consult-form-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-xl); background: #fff; box-shadow: var(--shadow); min-height: 260px; }
.consult-form-card h2 { font-size: 22px; }
.consult-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.consult-steps li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.consult-steps li > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--pale); color: var(--blue); font-weight: 800; }
.consult-steps h3 { font-size: 16px; margin-bottom: 4px; }
.consult-steps p { font-size: 13px; color: #2d456c; margin: 0; }
.consult-content > * + * { margin-top: 26px; }
.consult-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consult-columns .sidebar-box { margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li + li { margin-top: 8px; }
.check-list .lucide-icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--positive); margin-top: 3px; }

/* Инструменты */
.tool-card { padding: 22px; border: 1px solid #cddff6; border-radius: var(--r-xl); background: linear-gradient(#fff, #f8fbff); box-shadow: var(--shadow); }
.tool-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.tool-card-head > .lucide-icon { flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--pale); color: var(--blue); }
.tool-card-head h2 { font-size: 22px; margin-bottom: 4px; }
.tool-card-head p { margin: 0; font-size: 14px; color: #2d456c; }
.tool-form { display: grid; gap: 12px; }
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.tool-field input, .tool-field select { min-height: var(--control-h); padding: 8px 10px; border: 1px solid #c9d7e8; border-radius: var(--r-md); background: #fff; color: var(--ink); width: 100%; }
.tool-field input:focus, .tool-field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px #174b8022; }
.stay-trips { display: grid; gap: 10px; }
.stay-trip { display: grid; grid-template-columns: 1fr 1fr 42px; gap: 10px; align-items: end; }
.stay-trip:only-child { grid-template-columns: 1fr 1fr; }
.tool-remove { height: var(--control-h); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--negative); display: grid; place-items: center; }
.tool-remove .lucide-icon { width: 18px; height: 18px; }
.tool-add { width: auto; justify-self: start; }
.tool-add .lucide-icon, .tool-actions .lucide-icon, .path-back .lucide-icon { width: 18px; height: 18px; }
.tool-result { margin-top: 16px; padding: 16px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.tool-result p:last-child { margin-bottom: 0; }
.tool-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.tool-figures > div { padding: 12px 14px; border-radius: var(--r-lg); background: var(--positive-soft); }
.tool-figures > div.is-negative { background: var(--negative-soft); }
.tool-figures strong { display: block; font-size: 28px; color: var(--navy); line-height: 1.1; }
.tool-figures span { font-size: 13px; color: #2d456c; }
.tool-error { color: var(--negative); font-weight: 600; }
.tool-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tool-actions .button-outline { background: #fff; }
.tool-prepare h3 { font-size: 16px; }
.checklist-procedures { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist-procedures button { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; }
.checklist-procedures button[aria-selected=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.checklist-progress { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.checklist-progress-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--surface-sunk); overflow: hidden; }
.checklist-progress-bar span { display: block; height: 100%; width: 0; background: var(--positive); transition: width .25s ease; }
.checklist-prose ul:has(.checklist-item) { list-style: none; padding: 0; }
.checklist-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.checklist-item + .checklist-item { margin-top: 8px; }
.checklist-item input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--positive); flex: 0 0 20px; }
.checklist-item:has(input:checked) { background: var(--positive-soft); border-color: #b9dfc4; }
.path-question { font-size: 18px; font-weight: 700; color: var(--navy); }
.path-options { display: grid; gap: 8px; }
.path-option { text-align: left; padding: 12px 16px; border: 1px solid #c9d7e8; border-radius: var(--r-lg); background: #fff; color: var(--ink); font-size: 15px; }
.path-option:hover, .path-option:focus-visible { border-color: var(--blue); background: var(--pale); }
.path-back { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; border: 0; background: none; color: var(--link); padding: 4px 0; }
.path-result { padding: 4px 0; }
.path-result-label { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--positive-soft); color: var(--positive); font-size: 12px; font-weight: 700; }
.path-result h3 { font-size: 22px; margin: 8px 0; }
.path-links { padding-left: 18px; }
.path-links li + li { margin-top: 6px; }

/* Мобильный хаб и разделы */
@media (max-width: 1100px) {
  .section-layout { grid-template-columns: 1fr; }
  .section-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .section-sidebar .sidebar-box { margin: 0; }
  .section-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consult-hero-inner { grid-template-columns: 1fr; }
  .consult-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .section-hero h1, .consult-hero h1, .search-page h1 { font-size: 30px; }
  .section-lead { font-size: 15px; }
  .section-sidebar, .section-children, .section-cards, .consult-columns, .consult-steps, .tool-grid, .tool-figures { grid-template-columns: 1fr; }
  .tool-card { padding: 16px; }
  .stay-trip { grid-template-columns: 1fr 1fr 42px; }
  /* Хаб: компактный первый экран, фильтры за кнопкой, больше места материалам */
  .category-hero .hero-inner { padding-block: 18px 20px; }
  .category-hero h1 { font-size: 28px; margin-bottom: 10px; }
  .category-hero .hero-description { font-size: 14px; }
  .category-hero .tag-list { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .category-hero .tag-list::-webkit-scrollbar { display: none; }
  .category-hero .tag-list a { flex: 0 0 auto; }
  .category-hero .hero-stats { display: none; }
  .catalog-filters > summary { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 14px; border: 1px solid #c9d7e8; border-radius: var(--r-pill); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
  .catalog-filters > summary::-webkit-details-marker { display: none; }
  .catalog-filters > summary .lucide-icon { width: 18px; height: 18px; color: var(--blue); }
  .catalog-filters[open] > summary { margin-bottom: 10px; }
  .page-category .page-content, .page-section .page-content { padding-bottom: 96px; }
}
@media print {
  .site-header, .site-footer, .consultation-band, .section-sidebar, .section-hero, .tool-actions, .checklist-procedures, .breadcrumbs, #feedot--quiz--80524, [id^="feedot"] { display: none !important; }
  .section-layout { display: block; }
  .tool-card { box-shadow: none; border: 0; padding: 0; }
}
