/* =========================================================
   Страница публикации (общий раздел) — оформление 2026
   ========================================================= */

.mat-page { max-width: 940px; margin: 0 auto; }

/* ---------- крошки ---------- */
.mat-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.mat-crumbs a { color: var(--brand); text-decoration: none; }
.mat-crumbs a:hover { text-decoration: underline; }
.mat-crumbs span { opacity: .5; }

/* ---------- карточка публикации ---------- */
.mat-card {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.mat-date {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.s2026-main .mat-page .mat-head h1 {
  margin: 6px 0 12px;
  font-family: var(--font);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--heading);
  overflow-wrap: break-word;
}
.mat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tint-3);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.mat-tag em { font-style: normal; color: var(--note); }

/* ---------- авторы ---------- */
.mat-people {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.mat-person {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--tint-5);
}
.mat-person__role {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}
.mat-person b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.mat-person > span:last-child:not(.mat-person__role) {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- документ ---------- */
.mat-doc {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.mat-doc__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  background: var(--tint-5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.s2026-main .mat-page .mat-doc__bar a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand) !important;
  text-decoration: none !important;
}
.s2026-main .mat-page .mat-doc__bar a:hover { text-decoration: underline !important; }
.mat-doc__frame {
  display: block;
  width: 100%;
  height: clamp(480px, 75vh, 820px);
  border: 0;
  background: #f3f6f9;
}

/* ---------- кнопки ---------- */
.mat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.s2026-main .mat-page a.mat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px !important;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand-bg);
  background-image: none !important;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none !important;
  transition: background .15s ease, border-color .15s ease;
}
.s2026-main .mat-page a.mat-btn:hover {
  background: var(--brand-bg-hover);
  border-color: var(--brand-d);
}
.s2026-main .mat-page a.mat-btn--ghost {
  background: var(--surface) !important;
  border-color: var(--line);
  color: var(--brand) !important;
}
.s2026-main .mat-page a.mat-btn--ghost:hover {
  border-color: var(--brand);
  background: var(--tint-2) !important;
}
.s2026-main .mat-page a.mat-actions-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand) !important;
  text-decoration: none !important;
}
.s2026-main .mat-page a.mat-actions-link:hover { text-decoration: underline !important; }

/* ---------- служебные сообщения ---------- */
.mat-note {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.mat-note b {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}
.mat-note p { margin: 0; }
.mat-note--wait {
  border: 1px solid #f0cfcf;
  background: #fdf2f2;
}
.mat-note--wait b { color: #8f1d1d; }
.mat-note--wait p { color: #6b2a2a; }
.mat-note--admin {
  border: 1px solid #c9e3d2;
  background: #f1faf4;
}
.mat-note--admin b { color: #1d6b3a; }
.mat-note--admin p { color: #2b5a3d; }
html[data-theme="dark"] .mat-note--wait { border-color: #5a2a2a; background: #2b1717; }
html[data-theme="dark"] .mat-note--wait b { color: #ffb4b4; }
html[data-theme="dark"] .mat-note--wait p { color: #e8c4c4; }
html[data-theme="dark"] .mat-note--admin { border-color: #29543a; background: #16261c; }
html[data-theme="dark"] .mat-note--admin b { color: #9fe0b5; }
html[data-theme="dark"] .mat-note--admin p { color: #c4e6cf; }

/* ---------- тёмная тема: кнопки ---------- */
html[data-theme="dark"] .s2026-main .mat-page a.mat-btn {
  background: #1f5d85 !important;
  border-color: #1f5d85 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .s2026-main .mat-page a.mat-btn:hover {
  background: #184a69 !important;
  border-color: #184a69 !important;
}
html[data-theme="dark"] .s2026-main .mat-page a.mat-btn--ghost {
  background: var(--surface) !important;
  border-color: #2e4a5e !important;
  color: #a9d6ef !important;
}

/* ---------- адаптив ---------- */
@media (max-width: 700px) {
  .mat-card { padding: 16px; border-radius: 14px; }
  .mat-doc__frame { height: 60vh; min-height: 360px; }
  .mat-actions { flex-direction: column; align-items: stretch; }
  .s2026-main .mat-page a.mat-btn { width: 100%; }
}
