/* «Дело на час» — мастер на час.
   Мир сайта: список дел на листке из тетради в клетку, синяя шариковая ручка,
   жёлтая строительная рулетка и тёмно-синяя рабочая куртка. */

:root {
  --wall: #EDF0F3;        /* фон страницы: светлая стена */
  --paper: #FFFFFF;
  --navy: #1B2F55;        /* рабочая куртка: шапка, тёмные полосы */
  --navy-2: #243C6A;
  --navy-deep: #15264A;
  --tape: #FFC52E;        /* рулетка: главная кнопка, акценты */
  --tape-hi: #FFD35A;
  --ink: #2843A3;         /* шариковая ручка: почерк, ссылки */
  --text: #1E2430;
  --muted: #586274;
  --muted-on-dark: #AAB6CC;
  --rule: #CBD2DC;
  --rule-dark: #34497A;
  --grid: rgba(40, 67, 163, 0.13);
  --margin-red: #E59A9A;
  --display: "Geologica", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --body: "Geologica", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* overflow-x: clip — если что-то окажется шире экрана, страница не растянется и нижняя панель не уедет за край */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wall);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, figure, fieldset { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
button, input { font: inherit; color: inherit; }
.bubble { overflow-wrap: anywhere; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { color: var(--text); }

:focus-visible {
  outline: 3px solid var(--tape);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--tape);
  color: var(--navy);
  border-radius: 6px;
}
.skip:focus { top: 12px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sr-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- полосы ---------- */

.dark { background: var(--navy); color: var(--wall); }
.light { background: var(--paper); color: var(--text); }
.tapeband { background: var(--tape); color: var(--navy); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.35em;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  font: 600 1rem/1.2 var(--body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, filter 0.15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-call { background: var(--tape); color: var(--navy); }
.btn-call:hover { background: var(--tape-hi); color: var(--navy); }

.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--wall); }
.dark .btn-line { border-color: var(--wall); color: var(--wall); }
.dark .btn-line:hover { background: var(--wall); color: var(--navy); }
.dark .light .btn-line { border-color: var(--navy); color: var(--navy); }
.dark .light .btn-line:hover { background: var(--navy); color: var(--wall); }

.btn-navy { background: var(--navy); color: var(--wall); }
.btn-navy:hover { background: var(--navy-deep); color: var(--tape-hi); }

/* мессенджеры рядом с главной кнопкой, тише неё */
.btn-soft {
  min-height: 48px;
  padding: 0 1em;
  border: 1px solid var(--rule-dark);
  background: rgba(237, 240, 243, 0.05);
  color: var(--wall);
}
.btn-soft:hover { border-color: var(--wall); color: var(--wall); }

/* мессенджеры в фирменных цветах: MAX — сине-фиолетовый градиент, Telegram — голубой */
.btn-max, .btn-tg { border-color: transparent; color: #fff; }
.btn-max { background: linear-gradient(100deg, #3A89FB 0%, #3838FF 42%, #8F3FFF 100%); }
.btn-tg { background: linear-gradient(180deg, #2AABEE 0%, #2481CC 100%); }
.btn-max:hover, .btn-tg:hover { border-color: transparent; color: #fff; filter: brightness(1.12); }

.btn-big { min-height: 64px; padding: 0 1.6em 0 1.3em; }
.btn-big svg { width: 22px; height: 22px; }
.btn-stack { display: grid; text-align: left; font-size: 1.0625rem; line-height: 1.15; }
.btn-sub { margin-top: 2px; font-weight: 400; font-size: 0.875rem; }

/* ---------- шапка ---------- */

.top {
  --top-h: 72px;
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--rule-dark);
}
.top .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--top-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--wall);
  text-decoration: none;
}
.brand:hover { color: var(--wall); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-txt { display: grid; gap: 3px; }
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3125rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-sub { font-size: 0.8125rem; line-height: 1.1; color: var(--muted-on-dark); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.nav > a,
.nav summary {
  color: var(--wall);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.nav > a:hover,
.nav summary:hover,
.drop[open] summary { color: var(--tape); }

.drop summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  list-style: none;
}
.drop summary::-webkit-details-marker { display: none; }
.drop summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.15s;
}
.drop[open] summary::after { transform: translateY(1px) rotate(-135deg); }

/* мега-меню: группы услуг и карточка «Не нашли своё дело?» */
.mega {
  position: absolute;
  top: calc(100% + 1px);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  padding: 28px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 30px 60px rgba(10, 20, 45, 0.45);
  max-height: calc(100vh - var(--top-h) - 16px);
  overflow: auto;
}

.svc-label {
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
  color: var(--muted);
  font-size: 0.9375rem;
}
.svc-list { display: grid; gap: 2px; }
.svc-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.svc-link:hover { background: var(--wall); color: var(--text); }
.svc-pic {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border: 1.5px solid var(--navy);
  border-radius: 6px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 7px 7px;
}
.svc-pic svg { display: block; width: 90%; height: auto; overflow: visible; }
.svc-name { display: block; font-weight: 600; font-size: 0.9875rem; line-height: 1.3; }
.svc-hint { display: block; margin-top: 1px; color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }
.svc-link[aria-current="page"] .svc-name { color: var(--ink); }

/* раздел и его страницы: подписи под названием раздела, без рисунков */
.svc-hub + .svc-hub { margin-top: 16px; }
.svc-sub {
  display: grid;
  margin: 4px 0 0 66px;
  padding-left: 12px;
  border-left: 2px solid var(--rule);
}
.svc-sub a {
  display: block;
  padding: 4px 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-decoration: none;
}
.svc-sub a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.svc-sub a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* те же ссылки на тёмном: мобильное меню и 404 */
.menu-panel .svc-sub,
.notfound .svc-sub { border-color: var(--rule-dark); }
.menu-panel .svc-sub a,
.notfound .svc-sub a { color: #C9D2E2; }
.menu-panel .svc-sub a:hover,
.notfound .svc-sub a:hover,
.menu-panel .svc-sub a[aria-current="page"] { color: var(--tape); }
.menu-panel .svc-sub a { padding: 10px 0; font-size: 1rem; }
.menu-panel .svc-label,
.notfound .svc-label { border-color: var(--rule-dark); color: var(--muted-on-dark); }
.menu-panel .svc-link,
.notfound .svc-link { color: var(--wall); }
.menu-panel .svc-link:hover,
.notfound .svc-link:hover { background: var(--navy-2); color: var(--wall); }
.menu-panel .svc-hint,
.notfound .svc-hint { color: var(--muted-on-dark); }
.menu-panel .svc-pic,
.notfound .svc-pic { border-color: var(--paper); }
.menu-panel .svc-link[aria-current="page"] .svc-name { color: var(--tape); }

.mega-card {
  margin-top: 24px;
  padding: 20px;
  border-radius: 10px;
}
.mega-card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.15;
}
.mega-card p + p { margin-top: 10px; color: #C9D2E2; font-size: 0.9375rem; }
.mega-card .btn { width: 100%; margin-top: 18px; }
.mega-card .btn + .btn { margin-top: 8px; }

/* телефон в шапке: номер и часы, чтобы было понятно, можно ли звонить сейчас */
.top-call {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--wall);
  text-decoration: none;
  white-space: nowrap;
}
.top-call:hover { color: var(--wall); }
.top-call-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tape);
  color: var(--navy);
  transition: background-color 0.15s;
}
.top-call-ico svg { width: 18px; height: 18px; }
.top-call:hover .top-call-ico { background: var(--tape-hi); }
.top-call-txt { display: grid; line-height: 1.2; }
.top-call-txt .js-phone { font-weight: 700; font-size: 1.0625rem; }
.top-call-txt small { color: var(--muted-on-dark); font-size: 0.8125rem; }

/* мобильное меню: во весь экран, кнопка звонка всегда внизу */
.menu { display: none; }
.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--wall);
  border-radius: 8px;
  color: var(--wall);
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--wall); color: var(--navy); }
.menu-close-txt,
.menu[open] .menu-open-txt { display: none; }
.menu[open] .menu-close-txt { display: inline; }

.menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--top-h);
  bottom: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-dark);
  background: var(--navy);
}
.menu-nav {
  flex: 1;
  overflow: auto;
  padding: 20px var(--gutter) 28px;
  overscroll-behavior: contain;
}
.menu-group { margin-bottom: 24px; }
.menu-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.menu-sections a {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-dark);
  color: var(--wall);
  font-size: 1.0625rem;
  text-decoration: none;
}
.menu-sections a:hover { color: var(--tape); }
.menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-dark);
}
.menu-actions .btn { padding: 0 0.8em; }
html.menu-open { overflow: hidden; }
html.menu-open .callbar { display: none; }

/* ---------- первый экран ---------- */

.hero {
  position: relative;
  padding: clamp(44px, 6.5vw, 88px) 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: 48px clamp(40px, 6vw, 88px);
  align-items: start;
  padding-bottom: clamp(56px, 7vw, 96px);
}
.hero h1 {
  max-width: 12ch;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--paper);
}
.hero-page { padding-top: clamp(24px, 3.5vw, 44px); }
.hero-page h1 {
  max-width: 15ch;
  font-size: clamp(2.125rem, 5vw, 3.875rem);
  line-height: 1.03;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: clamp(20px, 3vw, 32px);
  color: var(--muted-on-dark);
  font-size: 0.9375rem;
}
.crumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: #6F7FA0;
}
.crumbs a { color: var(--muted-on-dark); }
.crumbs a:hover { color: var(--tape); }

.lead {
  max-width: 32em;
  margin-top: clamp(22px, 3vw, 32px);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: #DCE3EF;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}
.msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.msg-label { margin-right: 2px; color: var(--muted-on-dark); font-size: 1rem; }

.facts {
  display: grid;
  gap: 10px;
  margin-top: 36px;
}
.facts li {
  position: relative;
  padding-left: 30px;
  color: var(--muted-on-dark);
  font-size: 1.0625rem;
}
/* маркер — галочка ручкой, как в списке дел */
.facts li::before,
.dolist li::before,
.factors li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M2 7.4c1.4 1.1 2.8 2.6 4.2 4.6C8.6 7.7 11.8 4 16 1.6' fill='none' stroke='%23FFC52E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.facts li::before { top: 0.36em; }

/* ---------- листок «Список дел» ---------- */

.note {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 430px;
  padding: 34px 26px 30px 62px;
  border-radius: 3px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 44px, var(--margin-red) 44px, var(--margin-red) 46px, transparent 46px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  background-position: 0 0, -1px -1px, -1px -1px;
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06), 0 28px 50px rgba(8, 18, 40, 0.45);
  transform: rotate(1.6deg);
}
/* кусок малярного скотча сверху */
.note::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 118px;
  height: 32px;
  margin-left: -59px;
  background: rgba(232, 220, 182, 0.88);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transform: rotate(-3deg);
}
.note-title {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 2.125rem;
  line-height: 1.1;
}
.note-list { margin-top: 14px; }
.note-list li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 3px 0;
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1.22;
}
.note-box {
  position: relative;
  width: 21px;
  height: 21px;
  margin-top: 6px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  transform: rotate(-4deg);
}
.note-box::after {
  content: "";
  position: absolute;
  left: -2px;
  top: -9px;
  width: 26px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M3 11.5c1.9 1.6 3.9 3.8 5.8 7C12.6 11.6 17.4 5.6 23.6 2' fill='none' stroke='%232843A3' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
}
.note-text { position: relative; justify-self: start; }
/* зачёркивание ручкой: волнистая линия через всю строку */
.note-text::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -6px;
  top: 52%;
  height: 8px;
  margin-top: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.2C20 3.6 38 4.8 60 3.4S100 2.6 119 4' fill='none' stroke='%232843A3' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform-origin: left center;
  transform: scaleX(0);
}
.note-list .is-done .note-text::after { transform: scaleX(1); }
.note-list .is-done .note-box::after { opacity: 1; }
.note-list .is-done .note-text { color: rgba(40, 67, 163, 0.72); }

/* единственная анимация сайта: при загрузке дела по очереди вычёркиваются.
   Показывается один раз, в том числе при «уменьшить движение» — она короткая и не повторяется */
.anim .note-list .is-done .note-text::after {
  transform: scaleX(0);
  animation: strike 0.5s cubic-bezier(0.4, 0, 0.3, 1) forwards;
  animation-delay: calc(0.7s + var(--i) * 0.75s);
}
.anim .note-list .is-done .note-box::after {
  animation: tick 0.25s ease-out forwards;
  animation-delay: calc(1.15s + var(--i) * 0.75s);
}
.anim .note-list .is-done .note-text {
  color: var(--ink);
  animation: fade-done 0.3s linear forwards;
  animation-delay: calc(1.15s + var(--i) * 0.75s);
}
@keyframes strike { to { transform: scaleX(1); } }
@keyframes tick { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-done { to { color: rgba(40, 67, 163, 0.72); } }

.note-sign {
  margin-top: 16px;
  font-family: var(--hand);
  font-size: 1.375rem;
  line-height: 1.2;
  color: rgba(40, 67, 163, 0.8);
}
.note-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed rgba(40, 67, 163, 0.25);
}
.note-cta .btn { min-height: 46px; }
.note-cta a:not(.btn) { font-size: 1rem; }

/* ---------- рулетка: нижний край первого экрана, верх подвала ---------- */

.tape {
  display: block;
  width: 100%;
  height: 44px;
  box-shadow: inset 0 -2px 0 rgba(27, 47, 85, 0.25);
}
.tape text {
  fill: var(--navy);
  font: 700 13px var(--body);
}
.tape .t-red { fill: #C8322A; }

/* ---------- разделы ---------- */

.section { padding: clamp(56px, 7vw, 96px) 0; }
.section:not(.band) + .section:not(.band) { padding-top: 0; }

.section h2,
.contacts h2,
.cta-photo h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 64px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.section-head p { max-width: 34em; color: var(--muted); }

/* ---------- услуги на главной: категории с рисунками и делами ---------- */

.cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.cat {
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 18px 18px 20px;
  border: 2px solid var(--navy);
  border-radius: 12px;
  background: var(--paper);
}
.cat-pic {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  background-color: #F7F9FC;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: -1px -1px;
}
.cat-pic svg { display: block; width: 84%; height: auto; overflow: visible; }
.cat h3 {
  margin-top: 16px;
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.25;
}
.cat h3 a { color: var(--text); text-decoration: none; }
.cat h3 a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.cats-compact { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.cats-compact .cat { grid-template-rows: auto 1fr; padding: 10px 10px 14px; border-width: 1.5px; }
.cats-compact .cat h3 { margin-top: 10px; font-size: 1rem; }
.cat-tasks { margin-top: 10px; align-self: start; }
.cat-tasks li { border-top: 1px solid var(--rule); }
.cat-tasks li:first-child { border-top: 0; }
.cat-tasks a,
.cat-tasks span {
  display: block;
  padding: 9px 0;
  font-size: 1rem;
  line-height: 1.35;
}
.cat-tasks a { color: var(--ink); text-decoration: none; }
.cat-tasks a:hover { color: var(--text); text-decoration: underline; }
.cat-tasks span { color: var(--muted); }

/* рисунки услуг: тёмно-синие линии, место работы подсвечено жёлтым, отметки карандашом */
.pic .ln { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.pic .fl { fill: var(--navy); }
.pic .th { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; }
.pic .gr { fill: none; stroke: #9AA6B8; stroke-width: 2; stroke-dasharray: 4 5; }
.pic .hl { fill: var(--tape); stroke: var(--navy); stroke-width: 3; stroke-linejoin: round; }
.pic .hs { fill: none; stroke: var(--tape); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.pic .mk { fill: none; stroke: #C8322A; stroke-width: 2.4; stroke-linecap: round; }
.pic .wt { fill: none; stroke: #4F8FD6; stroke-width: 3; stroke-linecap: round; }
.pic .ry { fill: none; stroke: #E9A800; stroke-width: 3; stroke-linecap: round; }
.pic .pa { fill: var(--tape); fill-opacity: 0.35; }
/* трубы и шланги: тёмный контур, жёлтая середина */
.pic .po { fill: none; stroke: var(--navy); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.pic .pi { fill: none; stroke: var(--tape); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- страница услуги ---------- */

.hero-pic {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
}
.hero-pic svg { width: 86%; height: auto; }

.dolist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}
.dolist li {
  position: relative;
  padding: 15px 0 15px 32px;
  border-top: 2px solid var(--navy);
}
.dolist li::before,
.factors li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M2 7.4c1.4 1.1 2.8 2.6 4.2 4.6C8.6 7.7 11.8 4 16 1.6' fill='none' stroke='%232843A3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dolist li::before { top: calc(15px + 0.36em); }

/* прайс: показывается, если в content.js у дел указаны цены */
.pricelist { width: 100%; border-collapse: collapse; }
.pricelist th, .pricelist td {
  padding: 14px 0;
  border-top: 2px solid var(--navy);
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}
.pricelist td { padding-left: 24px; text-align: right; white-space: nowrap; font-weight: 700; }
.pricelist tr:last-child th, .pricelist tr:last-child td { border-bottom: 2px solid var(--navy); }

.types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
}
.types li {
  padding-top: 18px;
  border-top: 4px solid var(--tape);
}
.types h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.types p { margin-top: 8px; }

/* связанные услуги внутри категории */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.related a:hover { background: var(--navy); color: var(--wall); }

/* ---------- список дел: собрать заявку ---------- */

.plan .wrap > .section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.plan .plan-promise {
  max-width: 22em;
  color: var(--tape);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
}
.plan .section-head p:not(.plan-promise) { color: #C9D2E2; }

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px clamp(28px, 4vw, 56px);
  align-items: start;
}
html:not(.js) .builder { display: none; }
.builder-fallback { display: none; }
html:not(.js) .builder-fallback { display: flex; flex-wrap: wrap; gap: 12px; }

.pick { display: grid; gap: 26px; }
.pick-group legend {
  margin-bottom: 12px;
  color: var(--muted-on-dark);
  font-size: 1rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 15px 8px 11px;
  border: 1.5px solid var(--rule-dark);
  border-radius: 8px;
  background: var(--navy-2);
  color: var(--wall);
  font-size: 0.9875rem;
  line-height: 1.25;
  transition: border-color 0.12s, background-color 0.12s, color 0.12s;
}
.chip span::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted-on-dark);
  border-radius: 4px;
}
.chip:hover span { border-color: var(--wall); }
.chip input:focus-visible + span { outline: 3px solid var(--tape); outline-offset: 2px; }
.chip input:checked + span {
  border-color: var(--tape);
  background: var(--tape);
  color: var(--navy);
  font-weight: 600;
}
.chip input:checked + span::before {
  border-color: var(--navy);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M2.5 7.4c1.3 1 2.6 2.4 3.9 4.2C8.6 7.7 11.6 4.2 15.5 2' fill='none' stroke='%231B2F55' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* группы дел: плитки, дела выпадают панелью при наведении (на телефоне — по нажатию) */
.pick-label { margin-bottom: 12px; color: var(--muted-on-dark); font-size: 1rem; }
.pick-groups {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pick-tile { min-width: 0; }
.pick-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 64px;
  padding: 8px 16px 8px 8px;
  border: 1.5px solid var(--rule-dark);
  border-radius: 10px;
  background: var(--navy-2);
  color: var(--wall);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s;
}
.pick-head:hover,
.pick-tile.is-open .pick-head { border-color: var(--tape); }
.pick-head:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
.pick-head::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}
.pick-tile.is-open .pick-head::after { transform: translateY(2px) rotate(-135deg); }
.pick-pic {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border: 1.5px solid var(--paper);
  border-radius: 6px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 7px 7px;
}
.pick-pic svg { display: block; width: 90%; height: auto; overflow: visible; }
.pick-name { display: block; font-weight: 600; font-size: 1rem; line-height: 1.25; }
.pick-hint { display: block; margin-top: 2px; color: var(--muted-on-dark); font-size: 0.8125rem; line-height: 1.35; }
.pick-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  background: var(--tape);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.875rem;
}
.pick-count:empty { display: none; }

/* панель поверх плиток ниже: на всю ширину блока, сразу под строкой с открытой плиткой */
.pick-drop {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  margin-top: 8px;
  padding: 16px;
  border: 1.5px solid var(--tape);
  border-radius: 10px;
  background: var(--navy-deep);
  box-shadow: 0 24px 48px rgba(5, 12, 30, 0.55);
}
.pick-tile.is-open .pick-drop { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .pick-tile.is-open .pick-drop { animation: drop-in 0.14s ease-out; }
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-4px); }
}

/* без мышки (телефон, планшет) и на узком экране — обычная раскрывашка в потоке */
@media (hover: none), (max-width: 640px) {
  .pick-groups { grid-template-columns: minmax(0, 1fr); }
  .pick-head { height: auto; }
  .pick-drop { position: static; box-shadow: none; }
}

.own { display: grid; gap: 8px; }
.own label { color: var(--muted-on-dark); font-size: 1rem; }
.own-row { display: flex; gap: 8px; }
.own input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--rule-dark);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  font-size: 1rem;
}
.own input::placeholder { color: #8A93A3; }
.own input:focus-visible { outline: 3px solid var(--tape); outline-offset: 1px; }
.own .btn { min-height: 48px; }

/* правая колонка: тот же листок из тетради, дела записываются от руки */
.builder .note {
  position: sticky;
  top: 24px;
  max-width: none;
  justify-self: stretch;
  transform: rotate(0.8deg);
  scroll-margin-top: 24px;
}
.note-empty {
  margin-top: 14px;
  font-family: var(--hand);
  font-size: 1.5rem;
  line-height: 1.25;
  color: rgba(40, 67, 163, 0.55);
}
.note-list .note-del {
  margin-left: 8px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: rgba(40, 67, 163, 0.55);
  font: 400 1.125rem/1 var(--body);
  cursor: pointer;
  vertical-align: 3px;
}
.note-list .note-del:hover { color: #C8322A; }
.note-count {
  margin-left: 6px;
  font-size: 1.5rem;
  color: rgba(40, 67, 163, 0.6);
}
.note-when { margin-top: 18px; }
.note-when legend {
  margin-bottom: 8px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.5rem;
}
.note-when .chips { gap: 6px; }
.note-when .chip span {
  min-height: 40px;
  padding: 6px 12px 6px 9px;
  border-color: rgba(40, 67, 163, 0.35);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9375rem;
}
.note-when .chip span::before { border-radius: 50%; border-color: rgba(40, 67, 163, 0.5); }
.note-when .chip:hover span { border-color: var(--ink); }
.note-when .chip input:checked + span { border-color: var(--ink); background: #E8EDFA; color: var(--ink); }
.note-when .chip input:checked + span::before {
  border-color: var(--ink);
  background: radial-gradient(circle, var(--ink) 0 4px, transparent 4.5px);
}
.note-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.note-actions .btn-line { grid-column: 1 / -1; }
.note-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.note-actions[aria-disabled="true"] .btn { opacity: 0.45; pointer-events: none; }

.factors-wrap { margin-top: clamp(44px, 6vw, 64px); }
.factors-wrap h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted-on-dark);
}
.factors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin-top: 12px;
}
.factors li {
  position: relative;
  padding: 14px 0 14px 32px;
  border-top: 1px solid var(--rule-dark);
  font-size: 1.0625rem;
}
.factors li::before {
  top: calc(14px + 0.36em);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M2 7.4c1.4 1.1 2.8 2.6 4.2 4.6C8.6 7.7 11.8 4 16 1.6' fill='none' stroke='%23FFC52E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- как проходит работа: рулетка — линия времени ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  counter-reset: step;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  height: 24px;
  border-radius: 3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='24'%3E%3Cpath d='M0.5 0V12M10.5 0V6M20.5 0V6M30.5 0V6M40.5 0V6M25.5 0V9' stroke='%231B2F55' stroke-opacity='.6'/%3E%3C/svg%3E") 0 0 / 50px 24px repeat-x,
    var(--tape);
  box-shadow: inset 0 -2px 0 rgba(27, 47, 85, 0.2);
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border: 4px solid var(--wall);
  border-radius: 50%;
  background: var(--navy);
  color: var(--tape);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
}
.steps h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
.steps p { margin-top: 8px; font-size: 1.0625rem; }

/* ---------- районы ---------- */

.areas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 64px;
}
.areas-grid h3 {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
}
.areas-grid p { margin-top: 16px; max-width: 34em; }

/* ---------- вопросы: слева заголовок и «спросите сами», справа список ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px clamp(40px, 7vw, 104px);
  align-items: start;
}
.faq-aside { position: sticky; top: 32px; }
.faq-aside p { max-width: 24em; margin-top: 18px; color: var(--muted); }
.faq-aside .btn { margin-top: 24px; }
.faq details { border-top: 2px solid var(--navy); }
.faq details:last-child { border-bottom: 2px solid var(--navy); }
.faq summary {
  position: relative;
  padding: 22px 60px 22px 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background:
    linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat,
    linear-gradient(var(--navy), var(--navy)) center / 2px 12px no-repeat;
  transition: transform 0.15s ease-out;
}
.faq summary:hover::after { background-color: var(--paper); }
.faq details[open] summary::after {
  transform: rotate(45deg);
  background:
    linear-gradient(var(--tape), var(--tape)) center / 12px 2px no-repeat,
    linear-gradient(var(--tape), var(--tape)) center / 2px 12px no-repeat,
    var(--navy);
}
.faq details p { max-width: 40em; padding: 0 60px 24px 0; }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after, .drop summary::after { transition: none; }
}

/* ---------- плашка «Пришлите фото» с примером переписки ---------- */

.cta-photo { padding: clamp(56px, 7vw, 96px) 0; overflow: hidden; }
.cta-photo .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px clamp(40px, 7vw, 96px);
  align-items: center;
}
.cta-photo h2 { max-width: 13ch; font-size: clamp(2rem, 4.6vw, 3.375rem); line-height: 1.03; }
.cta-photo-text > p { max-width: 31em; margin-top: 20px; }
.cta-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.cta-photo-call { margin-top: 20px; font-size: 1rem; }
.cta-photo-call a { color: var(--navy); font-weight: 700; }
.cta-photo-call a:hover { color: var(--ink); }

.chat {
  justify-self: end;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy);
  color: var(--wall);
  box-shadow: 0 30px 60px rgba(90, 60, 0, 0.3);
  transform: rotate(2deg);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-dark);
  font-weight: 700;
  font-size: 1rem;
}
.chat-head svg { width: 28px; height: 28px; flex: none; }
.chat-body { display: grid; gap: 8px; padding: 18px; }
.bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.4;
}
.bubble.out {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--paper);
  color: var(--text);
}
.bubble.in {
  justify-self: start;
  margin-top: 6px;
  border-bottom-left-radius: 4px;
  background: var(--navy-2);
}
.bubble-photo { width: 66%; padding: 5px; }
.bubble-photo .hero-pic { border-radius: 10px; }

/* ---------- подвал: рулетка сверху, колонки ссылок, большой номер ---------- */

.contacts { padding: 0 0 32px; overflow: hidden; }
.foot-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 64px;
  align-items: end;
  padding: clamp(56px, 7vw, 96px) 0 48px;
  border-bottom: 1px solid var(--rule-dark);
}
.contacts .foot-cta h2 { font-size: clamp(2rem, 4.6vw, 3.375rem); line-height: 1.03; }
.foot-cta p { max-width: 32em; margin-top: 16px; color: #C9D2E2; }
.foot-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.foot-cols {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 48px;
  padding-top: 44px;
}
.foot-svc .foot-links { columns: 2; column-gap: 28px; }
.foot-svc .foot-links li { break-inside: avoid; }

.contact-facts { display: grid; align-content: start; gap: 20px; }
.contact-facts dt { color: var(--muted-on-dark); font-size: 1rem; }
.contact-facts dd { margin: 6px 0 0; font-size: 1.0625rem; }

.foot-label { color: var(--muted-on-dark); font-size: 1rem; }
.foot-links { margin-top: 10px; }
.foot-links a {
  display: block;
  padding: 8px 0;
  color: var(--wall);
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
}
.foot-links a:hover,
.foot-links a[aria-current="page"] { color: var(--tape); }

.foot-phone {
  --phone-k: 0.0775; /* ширина номера ≈ 12.9 em: так он встаёт во всю колонку */
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: clamp(48px, 7vw, 88px);
  color: var(--tape);
  font-family: var(--display);
  font-weight: 800;
  font-size: min(calc((100vw - 2 * var(--gutter)) * var(--phone-k)), calc(var(--wrap) * var(--phone-k)));
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.foot-phone:hover { color: var(--tape-hi); }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-dark);
  color: var(--muted-on-dark);
  font-size: 0.9375rem;
}
.foot a { color: var(--muted-on-dark); }
.foot a:hover { color: var(--tape); }

/* ---------- 404: листок, на котором дело не нашлось ---------- */

.notfound { padding: clamp(48px, 8vw, 104px) 0; }
.nf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px clamp(40px, 7vw, 104px);
  align-items: start;
}
.notfound h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.notfound .lead { margin-top: 16px; }
.notfound .note { justify-self: start; margin: 0 0 40px; transform: rotate(-1.4deg); }
.notfound .actions { margin-top: 28px; }
.nf-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}
@media (max-width: 640px) {
  .nf-links { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- нижняя панель на телефоне ---------- */

.callbar { display: none; }

/* ---------- адаптив ---------- */

@media (max-width: 1180px) {
  .mega { gap: 24px; padding: 24px; }
  .mega-card .btn-call { display: none; }
}

@media (max-width: 1080px) {
  .nav, .top-call-txt { display: none; }
  .top-call { margin-left: auto; }
  .menu { display: block; }
  .top .wrap { gap: 12px; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .types { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-svc { grid-column: 1 / -1; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder .note { position: relative; top: 0; max-width: 560px; }
}

@media (max-width: 860px) {
  .hero-grid,
  .section-head,
  .areas-grid,
  .cta-photo .wrap,
  .foot-cta,
  .nf-grid,
  .dolist,
  .factors { grid-template-columns: minmax(0, 1fr); }
  .note { justify-self: start; max-width: 460px; }
  .hero-pic { max-width: 520px; }
  .chat { justify-self: start; max-width: 380px; margin-left: 6px; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-aside { position: static; }
  .foot-svc .foot-links { columns: 2; }

  /* рулетка вертикально */
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps::before {
    left: 16px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 24px;
    height: auto;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='50'%3E%3Cpath d='M0 0.5H12M0 10.5H6M0 20.5H6M0 30.5H6M0 40.5H6M0 25.5H9' stroke='%231B2F55' stroke-opacity='.6'/%3E%3C/svg%3E") 0 0 / 24px 50px repeat-y,
      var(--tape);
    box-shadow: inset -2px 0 0 rgba(27, 47, 85, 0.2);
  }
  .steps li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
  }
  .steps li::before { grid-row: span 2; margin: 0; }
  .steps h3 { padding-top: 14px; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; padding-bottom: 76px; }
  .top { --top-h: 60px; }
  .brand svg { width: 34px; height: 34px; }
  .brand-name { font-size: 1.125rem; }
  .top-call { display: none; } /* на телефоне звонок есть в нижней панели */
  .menu { margin-left: auto; }
  .actions .btn { flex: 1 1 100%; }
  .actions .btn-big { justify-content: flex-start; }
  .msg { flex: 1 1 100%; }
  .msg-label { flex: 1 1 100%; }
  .msg .btn-soft { flex: 1 1 0; }
  .cta-photo-actions .btn,
  .foot-cta-actions .btn { flex: 1 1 100%; }
  .note { padding: 30px 18px 24px 54px; background-position: -8px 0, -1px -1px, -1px -1px; }
  .note-list li { font-size: 1.5rem; }
  .cats { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cat { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; padding: 14px; }
  .cat-pic { grid-row: span 2; align-self: start; background-size: 10px 10px; }
  .cat h3 { margin-top: 0; font-size: 1.1875rem; }
  .cat-tasks { margin-top: 4px; }
  .cats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cats-compact .cat { grid-template-columns: minmax(0, 1fr); padding: 10px 10px 12px; }
  .cats-compact .cat-pic { grid-row: auto; }
  .cats-compact .cat h3 { margin-top: 8px; font-size: 1rem; }
  .note-actions { grid-template-columns: minmax(0, 1fr); }
  .faq summary { padding-right: 52px; font-size: 1.0625rem; }
  .faq details p { padding-right: 0; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .foot-svc .foot-links { columns: 1; }
  .own-row { flex-wrap: wrap; }
  .own .btn { flex: 1 1 100%; }

  .callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -1px 0 var(--rule-dark);
  }
  .callbar .btn { min-height: 52px; padding: 0 0.8em; }
}
