:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #e9eef8;
  --ink: #101827;
  --muted: #667085;
  --line: #d9e1ee;
  --primary: #172a82;
  --primary-soft: #e8edff;
  --accent: #e41f16;
  --accent-soft: #fff0ef;
  --shadow: 0 12px 30px rgba(16, 24, 39, 0.1);
  --shadow-soft: 0 4px 16px rgba(16, 24, 39, 0.08);
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app { min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.site-hero {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101820;
}
.site-hero img { display: block; width: min(100%, 980px); height: auto; }

.workspace {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 16px 0;
}

.status { min-height: 20px; color: var(--muted); margin-bottom: 10px; }

.content { display: grid; gap: 18px; }
.desktop-only { display: none !important; }
.featured { display: grid; }
.card-list { display: grid; gap: 12px; }
.section-block { display: grid; gap: 10px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-head h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.block-head button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.content-card {
  position: relative;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 5px 13px;
  width: 100%;
  min-height: 122px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  text-align: left;
}
.content-card::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}
.content-card:active { transform: scale(0.99); }
.content-card img,
.image-fallback {
  grid-row: 1 / 4;
  margin-left: 8px;
  width: 106px;
  height: 102px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}
.image-fallback {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 32px;
  font-weight: 900;
}
.content-card span { color: var(--primary); font-size: 12px; font-weight: 800; }
.content-card strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #3e4b44;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-card {
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.featured-card::before { display: none; }
.featured-card img,
.featured-card .image-fallback {
  grid-row: auto;
  margin-left: 0;
  width: 100%;
  height: 224px;
  border-radius: 0;
}
.featured-card span,
.featured-card strong,
.featured-card p { margin-left: 16px; margin-right: 16px; }
.featured-card span { margin-top: 14px; color: var(--primary); }
.featured-card strong { white-space: normal; font-size: 22px; line-height: 1.16; }
.featured-card p { margin-bottom: 16px; -webkit-line-clamp: 3; }
.featured-card { border-bottom: 4px solid var(--accent); }

.plain-card {
  grid-template-columns: 1fr;
  min-height: 0;
  padding-left: 18px;
}
.plain-card img,
.plain-card .image-fallback { display: none; }
.plain-card strong { white-space: normal; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.metric {
  min-height: 78px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #edf2ff);
  color: var(--ink);
  text-align: left;
  padding: 13px;
  box-shadow: var(--shadow-soft);
}
.metric strong { display: block; font-size: 25px; line-height: 1; color: var(--primary); }
.metric span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }

.documents-grid {
  display: grid;
  gap: 10px;
}
.document-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.document-icon {
  grid-row: 1 / 3;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.document-card strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}
.document-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline, .more-list { display: grid; gap: 10px; }
.more-list button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  text-align: left;
  padding: 0 14px;
  font-weight: 800;
}

.info-card {
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
  box-shadow: var(--shadow-soft);
}
.info-card strong { display: block; margin-bottom: 6px; }
.info-card p { margin: 0; color: #3d4a43; line-height: 1.45; }
.link-card {
  width: 100%;
  border-left: 4px solid var(--primary);
  color: var(--ink);
  text-align: left;
}
.link-card:active { transform: scale(0.99); }
.club-card {
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: linear-gradient(150deg, #ffffff 0%, #eef3ff 54%, #fff0ef 100%);
  padding: 18px;
  box-shadow: var(--shadow);
  border-bottom: 4px solid var(--accent);
}
.club-card strong {
  color: var(--primary);
  font-size: 22px;
  line-height: 1.16;
}
.club-card p {
  margin: 0;
  color: #283349;
  line-height: 1.5;
}
.details-card {
  display: grid;
  gap: 14px;
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.details-card > strong {
  color: var(--primary);
  font-size: 22px;
  line-height: 1.15;
}
.details-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}
.details-card dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}
.details-card dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.details-card dd + dt {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(220, 228, 221, 0.9);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 32, 25, 0.16);
  backdrop-filter: blur(16px);
}
.bottom-nav button {
  display: grid;
  gap: 2px;
  justify-items: center;
  align-content: center;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.bottom-nav .nav-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
}
.bottom-nav svg { width: 20px; height: 20px; fill: currentColor; }
.bottom-nav button small {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav button.active { background: var(--primary); color: #ffffff; }

.reader {
  width: min(100% - 18px, 760px);
  max-height: calc(100dvh - 18px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}
.reader::backdrop { background: rgba(16, 24, 32, 0.5); }
.reader-card {
  position: relative;
  max-height: calc(100dvh - 18px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  line-height: 1.62;
}
.reader-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 246, 241, 0.92);
  color: var(--ink);
  font-size: 24px;
}
.reader-image {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #f2f7ef;
}
.reader-card span { color: var(--primary); font-size: 13px; font-weight: 800; }
.reader-card h2 { margin: 8px 0 14px; font-size: 25px; line-height: 1.16; }
.reader-text { color: #24312a; font-size: 16px; }
.reader-text img { max-width: 100%; height: auto; }
.reader-text p { margin: 0 0 14px; }
.reader-text ul,
.reader-text ol { margin: 0 0 14px; padding-left: 22px; }
.reader-text li { margin: 6px 0; }
.reader-text strong,
.reader-text b { font-weight: 850; }
.reader-text em,
.reader-text i { font-style: italic; }
.reader-text blockquote {
  margin: 16px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
}
.reader-text a { color: var(--primary); font-weight: 800; text-decoration: none; }
.reader-text h2,
.reader-text h3,
.reader-text h4 { margin: 18px 0 10px; line-height: 1.25; }
.modal-form {
  display: grid;
  gap: 12px;
}
.modal-form h2 {
  margin: 4px 48px 4px 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1.16;
}
.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.modal-form input,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}
.modal-form textarea { resize: vertical; min-height: 130px; }
.submit-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}
.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}
.reader-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.reader-gallery a {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--surface-2);
}
.reader-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 760px) {
  .app { padding-bottom: 88px; }
  .workspace { padding-top: 24px; }
  .featured-card img,
  .featured-card .image-fallback { height: 310px; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-block .card-list { grid-template-columns: 1fr; }
  .bottom-nav { left: 50%; right: auto; width: min(520px, calc(100% - 20px)); transform: translateX(-50%); }
}

@media (min-width: 1024px) {
  body {
    background:
      linear-gradient(180deg, #eef3f7 0%, #ffffff 42%, #f4f7fa 100%);
  }
  .app {
    min-height: 100vh;
    padding: 64px 0 0;
  }
  .site-hero {
    position: relative;
    min-height: 430px;
    align-items: stretch;
    background: #101820;
  }
  .site-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.14) 58%, rgba(16, 24, 32, 0.42));
    pointer-events: none;
  }
  .site-hero img {
    width: 100%;
    max-width: none;
    height: 430px;
    object-fit: cover;
  }
  .bottom-nav {
    position: fixed;
    top: 0;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 20;
    display: flex;
    justify-content: center;
    width: 100%;
    transform: none;
    gap: 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    padding: 10px 24px;
    box-shadow: 0 8px 24px rgba(16, 24, 39, 0.08);
  }
  .bottom-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 158px;
    min-height: 44px;
    gap: 8px;
    border-radius: 8px;
    padding: 0 16px;
  }
  .bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
  }
  .bottom-nav button small {
    font-size: 14px;
    line-height: 1;
  }
  .workspace {
    width: min(1180px, calc(100% - 48px));
    margin-top: -338px;
    padding: 0 0 56px;
  }
  .status {
    position: relative;
    z-index: 2;
    color: #ffffff;
  }
  .content {
    position: relative;
    z-index: 2;
    gap: 26px;
  }
  .desktop-only {
    display: grid !important;
  }
  .desktop-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    min-height: 252px;
    color: #ffffff;
  }
  .desktop-intro p {
    margin: 0 0 10px;
    color: #dce6f2;
    font-size: 15px;
    font-weight: 900;
  }
  .desktop-intro h1 {
    margin: 0;
    font-size: 72px;
    line-height: 0.95;
  }
  .desktop-intro span {
    display: block;
    width: min(680px, 100%);
    margin-top: 18px;
    color: #edf4fb;
    font-size: 20px;
    line-height: 1.45;
  }
  .desktop-actions {
    display: flex;
    gap: 12px;
    padding-bottom: 10px;
  }
  .desktop-actions button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: #ffffff;
    color: var(--primary);
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  }
  .desktop-actions button:first-child {
    background: var(--accent);
    color: #ffffff;
  }
  .featured {
    display: none;
  }
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .metric {
    min-height: 104px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(217, 225, 238, 0.86);
  }
  .metric strong {
    font-size: 32px;
  }
  .section-block {
    gap: 16px;
  }
  .block-head h2 {
    font-size: 28px;
  }
  .block-head button {
    border-radius: 8px;
  }
  .card-list,
  .section-block .card-list,
  .desktop-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .content-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    min-height: 356px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(217, 225, 238, 0.86);
    box-shadow: 0 10px 26px rgba(16, 24, 39, 0.08);
  }
  .content-card::before {
    display: none;
  }
  .content-card img,
  .image-fallback {
    grid-row: auto;
    margin-left: 0;
    width: 100%;
    height: 188px;
    border-radius: 0;
  }
  .content-card span,
  .content-card strong,
  .content-card p {
    margin-left: 16px;
    margin-right: 16px;
  }
  .content-card span {
    margin-top: 12px;
    font-size: 13px;
  }
  .content-card strong {
    min-height: 44px;
    white-space: normal;
    font-size: 19px;
    line-height: 1.18;
  }
  .content-card p {
    margin-bottom: 18px;
    font-size: 15px;
    -webkit-line-clamp: 3;
  }
  .mobile-reports {
    display: none;
  }
  .club-card,
  .details-card {
    padding: 28px;
  }
  .club-card strong,
  .details-card > strong {
    font-size: 32px;
  }
  .documents-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .document-card {
    min-height: 104px;
    padding: 16px;
  }
  .reader {
    width: min(100% - 64px, 980px);
  }
  .reader-card {
    padding: 30px;
  }
}

@media (max-width: 380px) {
  .content-card { grid-template-columns: 92px minmax(0, 1fr); }
  .content-card img,
  .image-fallback { width: 92px; height: 88px; }
  .bottom-nav button small { font-size: 9px; }
  .reader-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
