/* Стили страниц «Карта возможностей» и «Конструктор обращения».
   Наследуют палитру основного styles.css и не переопределяют его классы. */

.topnav {
  display: flex;
  gap: 4px;
  margin-right: 6px;
}

.topnav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: background .15s ease, color .15s ease;
}

.topnav a:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* Текущий раздел видно и без цвета — по подчёркиванию и насыщенности. */
.topnav a.is-current {
  color: var(--accent-deep);
  font-weight: 600;
  background: var(--accent-soft);
}

/* Кнопка мобильного меню. На большом экране её нет: раньше она
   оставалась видимой пустой пилюлей рядом с логотипом. */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.page {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--gap-lg) 0 var(--gap-xl);
}

/* Карта — единственная страница-приложение с боковой панелью:
   ей нужна своя прокрутка, остальным — общая, документом. */
.layout-app .page { overflow-y: auto; }

.page-title {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
  color: var(--ink);
}

.page-lead {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 70ch;
}

/* --- Фильтры категорий --- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.filter-chip {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-chip:hover { background: var(--accent-wash); }
.filter-chip.is-active { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }

/* --- Страница карты: карта крупная, слева узкий список названий --- */
.map-page {
  flex: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.map-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--soft);
}
.map-side-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.map-side-head h1 { margin: 0 0 12px; font-size: 18px; color: var(--ink); }

.map-search { width: 100%; margin-bottom: 10px; font-size: 14px; }

.map-area {
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--line);
}
.map-canvas { flex: 1; min-height: 0; position: relative; overflow: hidden; }

/* --- Конструктор обращения --- */
.appeal-form { max-width: 660px; display: flex; flex-direction: column; gap: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.field > span small { font-weight: 400; color: var(--muted); }
.layout-doc .app-shell { grid-template-columns: minmax(0, 1fr); }
.field :is(input, select, textarea) { min-width: 0; max-width: 100%; }

/* Все поля ввода на сайте выглядят одинаково: одна высота, одна рамка,
   одно поведение при фокусе. Граница намеренно тёмная — светло-серая
   давала контраст 1.6:1, и на ярком экране поля просто не было видно. */
.field input,
.field select,
.field textarea,
.map-search,
.subscribe-form input,
.ask-box input {
  min-height: 44px;             /* палец попадает без прицеливания */
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder,
.map-search::placeholder,
.subscribe-form input::placeholder,
.ask-box input::placeholder { color: var(--muted); }

.field input:focus,
.field select:focus,
.field textarea:focus,
.map-search:focus,
.subscribe-form input:focus,
.ask-box input:focus {
  outline: none;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-hint { margin: -8px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Блок персональных данных выделен рамкой не для красоты: человек должен
   видеть, где начинаются его личные сведения и что с ними будет. */
.field-group {
  min-width: 0;
  margin: 4px 0 18px;
  padding: 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: var(--accent-wash);
}
.field-group legend {
  padding: 0 8px;
  margin-left: -8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-deep);
}
.group-note {
  margin: 0 0 14px;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.field-group .field:last-child { margin-bottom: 0; }

/* Свой флажок вместо системного: синий квадрат от браузера выбивался
   из всей остальной палитры. */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}
.checkbox-field input {
  appearance: none;
  flex: 0 0 20px;
  width: 20px; height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.checkbox-field input:checked {
  border-color: var(--accent-deep);
  background: var(--accent-deep)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.checkbox-field:hover input { border-color: var(--accent-dark); }

/* Кнопки. Три вида и больше не заводим: главное действие, второстепенное
   и ссылка-действие. */
.primary-button {
  align-self: flex-start;
  min-height: 44px;
  background: var(--accent-deep);
  color: var(--paper);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, transform .12s ease;
}
.primary-button:hover { background: var(--accent-hover); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.ghost-button {
  min-height: 40px;
  background: var(--paper);
  border: 1.5px solid var(--accent-deep);
  color: var(--accent-deep);
  border-radius: var(--r-md);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.ghost-button:hover { background: var(--accent-deep); color: var(--paper); }

.appeal-result {
  margin-top: 28px;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--soft);
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.result-head h2 { margin: 0; font-size: 18px; color: var(--ink); }

.appeal-text {
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin: 0 0 18px;
}

.meta-line { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.primary-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
}
.meta-label {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.required-block ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.meta-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.meta-warning {
  margin: 0;
  font-size: 13.5px;
  color: var(--warning);
  background: var(--warning-bg);
  border-radius: 8px;
  padding: 10px 12px;
}

/* --- Кнопка голосового ввода (используется на главной) --- */
.voice-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-self: flex-end;
  margin-right: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.voice-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-button:hover { background: var(--accent-wash); border-color: var(--accent-deep); color: var(--accent-deep); }

.voice-button.is-listening {
  background: #c1272d;
  border-color: #c1272d;
  color: #fff;
  animation: voice-pulse 1.4s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(193, 39, 45, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(193, 39, 45, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-button.is-listening { animation: none; }
}

/* Карта не загрузилась — показываем понятную заглушку вместо пустого блока. */
.map-canvas.map-unavailable {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Список организаций и карточки --- */
.org-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.org-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(15, 34, 51, 0.07); }
.org-card.is-selected {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgba(18, 70, 60, 0.12);
}

.org-card-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 10px; }
.org-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
}
.org-titles { min-width: 0; }
.org-cat {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.org-card h3 { margin: 0; font-size: 15.5px; line-height: 1.3; color: var(--ink); }

.chip-icon { margin-right: 5px; }
.coverage-note {
  padding: 10px 20px 14px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* --- Метка на карте ---
   Обёртку .pin-wrap двигает карта своим transform, поэтому у метки
   собственных сдвигов быть не должно. Форма — SVG-капля с остриём
   ровно по нижней границе: при anchor="bottom" остриё точно в точке. */
.pin-wrap {
  width: 32px;
  height: 42px;
  cursor: pointer;
}

.map-pin {
  position: relative;
  display: block;
  width: 32px;
  height: 42px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(15, 34, 51, .38));
  transition: filter .15s ease, transform .15s ease;
  transform-origin: 50% 100%;   /* растём от острия, а не от центра */
}
.map-pin:hover { transform: scale(1.12); }
.map-pin.is-selected {
  transform: scale(1.2);
  filter: drop-shadow(0 0 0 rgba(0,0,0,0))
          drop-shadow(0 4px 8px rgba(15, 34, 51, .5));
  z-index: 7;
}
.map-pin.is-selected .pin-shape path { stroke: var(--accent-deep); stroke-width: 3.5; }

/* Режим фокуса: на карте осталась одна метка, и она должна читаться
   как ответ на вопрос — крупно, с мягким пульсирующим кругом. */
.map-pin.is-focus {
  transform: scale(1.75);
  z-index: 9;
}
.map-pin.is-focus:hover { transform: scale(1.85); }
.map-pin.is-focus .pin-shape path { stroke: var(--accent-deep); stroke-width: 3; }
.map-pin.is-focus::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -10px;
  width: 26px; height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: rgba(18, 70, 60, .22);
  animation: pin-pulse 1.9s ease-out infinite;
  pointer-events: none;
}
@keyframes pin-pulse {
  0%   { transform: scale(.5); opacity: .85; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .map-pin.is-focus::before { animation: none; opacity: .5; }
}

/* Подсказка под поиском: что именно нашлось и почему. */
.search-hint {
  margin: 10px 0 0;
  padding: 8px 10px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--accent-deep); background: var(--accent-soft);
  border-radius: 9px;
}
.search-hint.is-weak { color: var(--warning); background: var(--warning-bg); }

/* Выход из режима фокуса — поверх карты, всегда на виду. */
.map-reset {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 8;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--accent-deep);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 34, 51, .16);
}
.map-reset:hover { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.map-reset[hidden] { display: none; }

/* Сообщение о состоянии карты — слоем поверх, чтобы не трогать её разметку. */
.map-status {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  max-width: 78%;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  color: var(--muted);
  font-size: 13.5px; line-height: 1.45; text-align: center;
  box-shadow: 0 6px 22px rgba(15, 34, 51, .14);
}
.map-status.is-error { color: var(--ink-soft); }
.map-status[hidden] { display: none; }

/* SVG не должен перехватывать клик: обработчик висит на кнопке-родителе. */
.pin-shape { display: block; width: 32px; height: 42px; pointer-events: none; }

/* Иконка — в круглой части капли, а не по центру всего элемента. */
.pin-icon {
  position: absolute;
  top: 6px; left: 0;
  width: 32px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.pin-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px; font-weight: 700; line-height: 19px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  pointer-events: none;
}

/* ============ Отключения ЖКХ ============ */
.outage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 13px;
  margin-top: 16px;
}
.outage-card {
  border: 1px solid var(--line);
  border-left: 4px solid #2E7D9A;
  border-radius: 13px;
  padding: 16px;
  background: #fff;
}
.outage-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 11px; }
.outage-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--soft); display: grid; place-items: center;
  font-size: 17px; line-height: 1; flex: 0 0 auto;
}
.outage-card h3 { margin: 0; font-size: 15.5px; color: var(--ink); text-transform: capitalize; }
.outage-when { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; color: #2E7D9A; }
.outage-label {
  margin: 0 0 3px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.outage-streets { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); text-transform: capitalize; }
.outage-summary {
  margin: 0 0 11px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  max-height: 4.5em; overflow: hidden;
}
.outage-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding-top: 10px; border-top: 1px solid var(--soft);
}
.outage-source { font-size: 12px; color: var(--muted); }
.outage-link { font-size: 12.5px; font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.outage-link:hover { text-decoration: underline; }

.outage-empty {
  border: 1px dashed var(--line); border-radius: 14px;
  padding: 30px 22px; text-align: center; grid-column: 1 / -1;
}
.outage-empty-title { margin: 0 0 7px; font-size: 16px; font-weight: 600; color: var(--ink-soft); }
.outage-empty-text { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.outage-help { margin-top: 34px; }
.outage-help a { color: var(--accent-deep); font-weight: 600; }

/* Счётчик на групповой метке: сколько служб в одном здании. */
.map-pin-count {
  position: absolute;
  top: -7px; right: -7px;
  rotate: 45deg;
  min-width: 19px; height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px; font-weight: 700; line-height: 19px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* Подсказка над картой — как пользоваться. */
.map-hint {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(15,34,51,.12);
  pointer-events: none;
  max-width: calc(100% - 24px);
}

.outage-updated {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ============ Карта: список названий и панель подробностей ============ */
.org-names {
  flex: 1; min-height: 0; overflow-y: auto;
  list-style: none; margin: 0; padding: 8px;
}
.org-names.is-hidden { display: none; }

.org-name {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  background: none; border: none;
  padding: 9px 10px; border-radius: 9px;
  font: inherit; font-size: 13.5px; line-height: 1.35;
  color: var(--ink-soft); text-align: left; cursor: pointer;
}
.org-name:hover { background: var(--accent-soft); }
.org-name.is-selected { background: var(--accent-deep); color: #fff; }
.org-name-icon { flex: 0 0 auto; font-size: 15px; }
.org-name-text { min-width: 0; }

.org-detail {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 16px 20px;
}
.detail-back {
  background: none; border: none; padding: 0 0 12px;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent-deep); cursor: pointer;
}
.detail-back:hover { text-decoration: underline; }

.detail-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.detail-icon {
  flex: 0 0 auto; width: 36px; height: 36px;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; line-height: 1;
}
.org-detail h2 { margin: 2px 0 0; font-size: 16px; line-height: 1.3; color: var(--ink); }

.detail-phone { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.detail-phone:hover { text-decoration: underline; }
.detail-link {
  display: inline-block; margin-top: 12px;
  font-size: 13.5px; font-weight: 600;
  color: var(--accent-deep); text-decoration: none;
}
.detail-link:hover { text-decoration: underline; }

.map-hint {
  margin: 0; padding: 9px 14px;
  background: #fff; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); text-align: center;
}

@media (max-width: 860px) {
  .map-page { grid-template-columns: 1fr; grid-template-rows: 46vh auto; overflow: auto; }
  .map-area { order: -1; }
  .map-side { border-right: none; border-top: 1px solid var(--line); }
  .org-names, .org-detail { overflow: visible; }
}

/* ============ Анонсы олимпиад: одна карточка = одна олимпиада ============ */
.news-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}
.news-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: 12px;
  padding: 14px 15px;
}
.news-head {
  display: flex; align-items: baseline; gap: 9px;
  flex-wrap: wrap; margin-bottom: 7px;
}
.news-name {
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
  color: var(--ink); text-decoration: none;
}
a.news-name:hover { color: var(--accent-deep); text-decoration: underline; }
.news-status {
  margin: 0 0 6px;
  font-size: 13px; font-weight: 600; color: var(--accent-deep); line-height: 1.4;
}
.news-desc { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.news-subjects { margin: 0; font-size: 12px; color: var(--muted); }

.prep-kind {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 9px; margin-bottom: 9px;
}
.prep-kind.is-private { color: var(--warning); background: var(--warning-bg); }

/* ============ Реальные организации: адрес, телефон, рейтинг ============ */
.place-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.place-head h3 { margin: 0; font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.place-rating {
  flex: 0 0 auto;
  font-size: 11.5px; font-weight: 600;
  color: var(--warning); background: var(--warning-bg);
  border-radius: 999px; padding: 3px 9px;
}
.place-kind { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.place-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.place-links .olymp-secondary { margin-top: 0; padding: 4px 0; }



/* ============ Структура страницы: блоки и якорная навигация ============ */
.page-head { max-width: 70ch; margin-bottom: 22px; }

.section-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.section-tabs a {
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
  background: var(--accent-wash); border-radius: 999px;
  padding: 7px 14px;
  transition: background .15s ease, color .15s ease;
}
.section-tabs a:hover { background: var(--accent-deep); color: #fff; }

/* Блок = один смысловой раздел. Раньше всё шло сплошным потоком. */
.block { padding: 30px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: none; }
.block-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.block-head .section-title { margin: 0; }
.block .section-title { margin: 0 0 8px; }
.block-note {
  margin: 0 0 16px;
  max-width: 70ch;
  font-size: 13.5px; line-height: 1.55; color: var(--muted);
}
.block .filters { margin-bottom: 16px; }
.block .map-search { margin-bottom: 14px; }

/* ============ Публичная лента проблем ============ */
.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.stat-card {
  border: 1px solid var(--line); border-radius: 13px;
  padding: 15px 16px; background: #fff;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-card.is-alert { border-color: var(--danger-line); background: var(--danger-bg); }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-card.is-alert .stat-value { color: var(--danger); }
.stat-label { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

.report-form { max-width: 660px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

.form-status { margin: 10px 0 0; font-size: 13.5px; min-height: 1.2em; }
.form-status.is-ok { color: var(--accent-deep); font-weight: 600; }
.form-status.is-error { color: var(--danger); }

.report-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 13px;
}
.report-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-line);
  border-radius: 13px; padding: 16px; background: #fff;
}
.report-card.is-overdue { border-left-color: var(--danger); }

.report-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 10px; }
.report-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-wash); display: grid; place-items: center;
  font-size: 17px; line-height: 1; flex: 0 0 auto;
}
.report-card h3 { margin: 2px 0 0; font-size: 15px; line-height: 1.3; color: var(--ink); }
.report-text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }

.report-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--soft);
}
.report-count {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px;
}
.report-days { font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.report-days.is-alert { color: var(--danger); font-weight: 600; }

/* ============ Подписка на отключения ============ */
.subscribe-box {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--accent-line);
  border-radius: 15px;
  background: var(--accent-wash);
}
.subscribe-box .section-title { margin: 0 0 8px; }

.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; }
.subscribe-form input { flex: 1 1 220px; }
.subscribe-form .primary-button { flex: 0 0 auto; }
.form-hint {
  margin: 10px 0 0;
  max-width: 56ch;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.page-narrow { max-width: 60ch; }

/* Строка «спросить» внизу разделов: один вход в чат, а не второй чат. */
.ask-box-wrap {
  margin-top: 34px; padding: 22px;
  background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: 16px;
}
.ask-box-wrap .section-title { margin: 0 0 8px; }
.ask-box { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; }
.ask-box input { flex: 1 1 260px; }
.ask-box .primary-button { flex: 0 0 auto; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ask-chips .filter-chip { font-size: 12.5px; }

/* Пометка «вы пришли сюда из чата» — чтобы отфильтрованный список
   не выглядел как поломка, и был очевидный путь назад ко всему. */
.from-chat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 10px 0 0; padding: 9px 11px;
  font-size: 12.5px; line-height: 1.4; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 10px;
}
.from-chat-reset {
  margin-left: auto; padding: 0; border: none; background: none;
  color: var(--accent-deep); font: inherit; font-size: 12.5px; font-weight: 700;
  text-decoration: underline; cursor: pointer;
}
.from-chat-reset:hover { color: var(--accent-hover); }

/* Кнопка «наверх». Скрыта, пока страница не прокручена: показывает её
   класс is-visible из nav.js. */
.to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--accent-deep);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 34, 51, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.to-top:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.to-top svg { width: 22px; height: 22px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity .18s ease, visibility .18s; transform: none; }
}

.my-notifications { margin-top: 18px; }
.notif-title { margin: 0 0 10px; font-size: 14.5px; color: var(--ink); }
.notif-item {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--accent-line);
}
.notif-res { font-size: 13.5px; font-weight: 600; color: var(--accent-deep); text-transform: capitalize; }
.notif-when { font-size: 13.5px; color: var(--ink-soft); }
.notif-streets { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.my-notifications .ghost-button { margin-top: 14px; }


/* С шестым разделом меню сворачивается раньше, без сжатия названий. */
@media (max-width: 980px) {
  /* Ссылки разделов не помещаются в строку — прячем за кнопку. */
  .nav-toggle { display: flex; }
  .topnav {
    position: absolute;
    top: 62px; right: 12px; left: 12px;
    z-index: 30;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--paper);
    box-shadow: 0 18px 44px rgba(15, 34, 51, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .topnav.is-open { opacity: 1; visibility: visible; transform: none; }
  .topnav a { padding: 12px 14px; font-size: 15px; }

  .topbar { position: relative; }
}

/* ============ Телефон ============ */
@media (max-width: 760px) {
  /* На телефоне внешняя рамка .app-shell пропадает, и без собственных
     полей текст упирался прямо в край экрана. */
  .page, .site-footer { padding-left: 14px; padding-right: 14px; }
  .page { padding-top: var(--gap-md); padding-bottom: var(--gap-lg); }
  .page-title { font-size: 24px; }
  .page-lead { font-size: 14.5px; }
  .section-title { font-size: 17px; }

  /* Формы: на телефоне поля идут в столбик и растягиваются на всю ширину. */
  .subscribe-form, .ask-box { flex-direction: column; align-items: stretch; }
  .subscribe-form input, .ask-box input { flex: 1 1 auto; width: 100%; }
  .subscribe-form .primary-button, .ask-box .primary-button { width: 100%; }

  .subscribe-box, .ask-box-wrap { padding: 16px; border-radius: var(--r-lg); }
  .outage-list { grid-template-columns: 1fr; }
  .to-top { width: 44px; height: 44px; }
}


/* ============ Иконки вместо эмодзи ============ */

.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor;
      stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-wrap { display: inline-flex; align-items: center; }

.meta-icon { flex: 0 0 auto; margin-right: 7px; color: var(--muted); }
.org-meta { display: flex; align-items: flex-start; }
.org-meta .meta-icon { margin-top: 2px; }

/* Иконка в кнопке фильтра. */
.chip-icon { margin-right: 6px; color: currentColor; }
.chip-icon .ic { width: 16px; height: 16px; }

/* Иконка категории в списке организаций и в карточке. */
.org-name-icon { color: var(--muted); }
.org-name.is-selected .org-name-icon { color: inherit; }
.org-name-icon .ic { width: 17px; height: 17px; }

.detail-icon, .outage-icon, .report-icon {
  display: grid; place-items: center;
  color: var(--paper);
}
.detail-icon .ic, .outage-icon .ic, .report-icon .ic { width: 18px; height: 18px; }
.outage-icon, .report-icon { background: var(--accent-deep); }

/* Иконка внутри метки на карте. Белая на цветной капле. */
.pin-icon { color: #fff; }
.pin-icon .ic { width: 15px; height: 15px; stroke-width: 2; }
