/* ============================================================
   Витрина отчёта /tools/report — веер листов, каталог, lightbox
   ============================================================ */

/* --- Веер --- */
.report-showcase .fan-head h2 { margin-bottom: 12px; }
.report-showcase .fan-head p { max-width: 640px; color: var(--muted); font-size: 16px; line-height: 1.55; }

.report-fan {
  position: relative;
  margin-top: 8px;
  padding: 40px 24px 30px;
  border-radius: 16px;
  background: linear-gradient(180deg, #eef1ed, #dfe6df);
  overflow-x: auto;
  overflow-y: hidden;
}
[data-theme="dark"] .report-fan { background: linear-gradient(180deg, #1b2621, #131b17); }

.fan-deck { display: flex; align-items: flex-start; width: max-content; }

.fan-card { position: relative; flex: 0 0 auto; width: 270px; cursor: pointer; }
.fan-card + .fan-card { margin-left: -118px; }
.fan-card:nth-child(2n) { transform: rotate(2.2deg) translateY(12px); }
.fan-card:nth-child(3n) { transform: rotate(-2deg) translateY(-4px); }
.fan-card:nth-child(5n) { transform: rotate(1.3deg) translateY(20px); }
.fan-card:hover { z-index: 20; }
.fan-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.fan-card-window {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 61, 45, .28);
  transition: box-shadow .18s ease;
}
.fan-card:hover .fan-card-window { box-shadow: 0 22px 48px rgba(23, 61, 45, .42); }
.fan-card-window img { display: block; width: 100%; height: auto; }
.fan-card-window::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -16px 20px -8px rgba(23, 61, 45, .22);
  pointer-events: none;
}

.fan-caption {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #3c5146;
  text-align: center;
}
[data-theme="dark"] .fan-caption { color: #c6d3cc; }

.fan-stack {
  position: absolute;
  right: 20px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #173D2D;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(23, 61, 45, .18);
}
[data-theme="dark"] .fan-stack { background: #2b3731; color: #9ce5c3; }

.report-showcase .fan-hint { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* --- Каталог разделов --- */
.report-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.report-section-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.report-section-card h3 { margin: 0 0 8px; font-size: 19px; }
.report-section-card > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.section-pages { display: flex; flex-wrap: wrap; gap: 8px; }
.section-page {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.section-page:hover { background: var(--accent); border-color: var(--brand); color: var(--accent-foreground); }

/* --- Lightbox --- */
.report-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 13, .94);
}
.report-lightbox[hidden] { display: none; }

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  color: #eaf2ed;
  background: rgba(0, 0, 0, .4);
}
.lightbox-title { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-count { margin-left: auto; font-size: 13px; color: #9db0a6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 9px;
  background: transparent;
  color: #eaf2ed;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .1); }

.lightbox-stage {
  flex: 1;
  overflow: auto;
  padding: 24px;
  background: #b7c0b6;
}
[data-theme="dark"] .lightbox-stage { background: #0d1410; }
.lightbox-stage img {
  display: block;
  width: min(794px, 100%);
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .35);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #eaf2ed;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(0, 0, 0, .7); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 720px) {
  .report-sections { grid-template-columns: 1fr; }
  .report-fan { padding: 28px 18px 24px; }
  .fan-card { width: 240px; }
  .fan-card + .fan-card { margin-left: -100px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-stage { padding: 12px; }
}
