/* Публичные страницы бэкенда (/ и /documents/) в стиле мобильного приложения. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic-wght.6fd02dd74afd.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght.311d352d9323.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --tile: #f2f7f2;
  --tile-hover: #e6f2e7;
  --ink: #282d31;
  --muted: #a5a9a8;
  /* Вторичный текст: читается на белом и на плитке (≥ 7:1). */
  --muted-strong: #4a5055;
  /* Яркий фирменный зелёный — для заливок и иконок. */
  --green: #26c05f;
  /* Тёмный зелёный — для кнопок и зелёного текста: белый на нём ≥ 5:1. */
  --green-dark: #15803d;
  --line: #e9eedc;
  --danger: #e5484d;
  --danger-tile: #fdf0f0;
  --radius-tile: 28px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.55 "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
svg { display: block; }

.page {
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: flex;
  flex-direction: column;
}
.page > main { flex: 1; }

/* Заголовок экрана: крупный жирный текст и круглая кнопка, как «Профиль» */
.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.screen-head h1,
.screen-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}
.round-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tile);
  color: var(--ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background .15s;
}
.round-btn:hover, .round-btn:focus-visible { background: var(--tile-hover); }

/* Карточка фонда — как карточка профиля */
.fund-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px 12px 12px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.fund-mark {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
}
.fund-kicker { font-size: 12px; font-weight: 600; color: var(--ink); }
.fund-name { font-size: 20px; font-weight: 700; line-height: 1.2; }

/* Плитки документов */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 16px 14px 18px 18px;
  border-radius: var(--radius-tile);
  background: var(--tile);
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.tile:hover, .tile:focus-visible { background: var(--tile-hover); }
.tile:active { transform: scale(.98); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tile-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  /* Длинные слова («конфиденциальности») переносятся по слогам с дефисом. */
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.icon-bubble {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--green);
  display: grid;
  place-items: center;
}

.pill--arrow { padding: 2px 10px; font-size: 16px; line-height: 1.2; }

/* Страница документа */
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 20px; }
.doc-meta .pill { background: var(--tile); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover, .btn:focus-visible { background: #116a32; }
.doc-body {
  padding: 22px 20px;
  border-radius: var(--radius-tile);
  background: var(--tile);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.doc-body p { margin: 0 0 12px; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body a { color: var(--green-dark); }
.doc-file {
  padding: 26px 22px 24px;
  border-radius: var(--radius-tile);
  background: var(--tile);
  text-align: center;
}
.doc-file-title { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.empty { padding: 22px 20px; border-radius: var(--radius-tile); background: var(--tile); color: var(--muted-strong); }

/* Контакты */
.contacts-block { margin-top: 30px; }
.section-title { margin: 28px 0 12px; font-size: 20px; font-weight: 800; }
.contacts-block .section-title { margin-top: 0; }
.contacts-fund { margin-top: 18px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  background: var(--tile);
  text-decoration: none;
  transition: background .15s;
}
a.contact-row:hover, a.contact-row:focus-visible { background: var(--tile-hover); }
.contact-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted-strong); }
.contact-value { display: block; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.more-link { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px; color: var(--green-dark); text-decoration: none; }
.more-link:hover, .more-link:focus-visible { text-decoration: underline; }
.requisites { margin: 0; padding: 8px 20px; border-radius: var(--radius-tile); background: var(--tile); }
.requisites > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.requisites > div:last-child { border-bottom: 0; }
.requisites dt { color: var(--muted-strong); font-size: 13px; font-weight: 600; }
.requisites dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.requisites a { color: var(--green-dark); }

.footer { margin-top: 36px; font-size: 12px; color: var(--muted); }
.footer a { color: var(--muted); }

/* Техническая страница / */
.status-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.status-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 24px 28px;
  border-radius: 36px;
  background: var(--tile);
  text-align: center;
}
.status-card .fund-mark { margin: 0 auto 16px; width: 64px; height: 64px; font-size: 28px; }
.status-card .screen-title { margin-bottom: 8px; }
.status-card p { margin: 0 0 20px; color: var(--muted-strong); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg);
  font-weight: 700;
  font-size: 14px;
}
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--green-dark); }
.status.fail { color: var(--danger); }
.status-card.fail { background: var(--danger-tile); }

@media print {
  .round-btn, .btn, .footer { display: none; }
  .doc-body { background: none; padding: 0; }
}
