/* изм.1 от 17.11.2026 — см. ui-izm1.js */

/* 1. переключатель «Вопрос / Документы / Почта» */
.sub-seg { display: flex; gap: 6px; padding: 4px; background: var(--chip); border-radius: 12px; }
.sub-seg button { flex: 1; min-height: 48px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 650 16px var(--font); cursor: pointer; }
.sub-seg button[aria-current=page] { background: var(--y); color: var(--onacc); }
/* «Документы» и «Почта» убраны из нижнего списка — они теперь внутри «Спросить» */

/* 2. плитки на главной */
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-tiles button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 104px; padding: 12px 8px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: 700 17px/1.2 var(--font); text-align: center; cursor: pointer; }
.home-tiles button svg { width: 34px; height: 34px; }
.home-tiles button:first-child { background: var(--y); border-color: var(--y); color: var(--onacc); }
.home-tiles button:active { filter: brightness(.93); }
@media (min-width: 761px) { .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; } }

/* 3. телефон: разделы внизу под большим пальцем */
@media (max-width: 760px) {
  body.app-shell { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.app-shell .header-navigation { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex; gap: 4px; overflow: visible; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0, 0, 0, .12); }
  body.app-shell .header-navigation button { flex: 1 1 0; min-width: 0; min-height: 60px; padding: 6px 2px; border: 0; border-radius: 12px; background: transparent;
    color: var(--soft); font: 650 11px/1.15 var(--font); gap: 4px; justify-content: center; }
  body.app-shell .header-navigation button svg { width: 26px; height: 26px; }
  body.app-shell .header-navigation button[aria-current=page] { background: var(--y); color: var(--onacc); border: 0; }
  body.app-shell .header-navigation button > span { white-space: normal; text-align: center; }
  /* «Ещё»: расчёты, участники — листом над панелью */
  body.app-shell #tabs { display: none; }
  body.app-shell.more-open #tabs { display: grid; position: fixed; left: 0; right: 0; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 59;
    grid-template-columns: 1fr; gap: 6px; padding: 12px 16px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(0, 0, 0, .18); }
  body.app-shell.more-open #tabs button { min-height: 52px; font-size: 17px; }
}

/* раздел «РД» */
.rd-list { display: grid; gap: 6px; }
.rd-korpus { margin: 14px 0 2px; font-size: 20px; }
.rd-type { margin-top: 6px; font: 650 13px var(--font); color: var(--soft); text-transform: uppercase; letter-spacing: .02em; }
.rd-item { display: grid; gap: 2px; width: 100%; text-align: left; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.rd-item b { font-size: 16px; line-height: 1.3; }
.rd-cipher { font: 600 14px var(--mono, monospace); color: var(--soft); }
.rd-item:active { background: var(--chip); }
@media (max-width: 760px) { body.app-shell .header-navigation button { font-size: 10px; } }

/* «Кому» у проблемы */
.to-box { display: grid; gap: 6px; margin: 8px 0; }
.to-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.to-chip { min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); font: 650 15px var(--font); cursor: pointer; }
.to-chip[aria-pressed=true] { background: var(--y); border-color: var(--y); color: var(--onacc); }
.to-chip[aria-pressed=true]::before { content: '✓ '; }

/* «Документы» дублирует «РД» — убрано из «Ещё» */
#tabs button[data-view=docs] { display: none; }

.construction-work-page { display: grid; gap: 16px; min-width: 0; }
.construction-work-heading { display: grid; justify-items: start; gap: 12px; }
.construction-work-detail { display: grid; gap: 14px; min-width: 0; }
.app-shell .construction-work-menu .act { text-align: left; justify-content: flex-start; padding: 14px 18px; font-size: 17px; }
.app-shell .construction-work-menu .act:hover { outline: 2px solid var(--soft); outline-offset: -2px; }
@media (min-width: 1000px) {
  .construction-work-menu { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}
