/* ============================================================
   Данные по месяцам редактируются в js/app.js, в массиве
   MONTHLY_REPORTS. Чтобы добавить месяц — скопируй один объект
   и подставь новые значения.
   ============================================================ */

:root{
  --bg: #101114;
  --panel: #17181C;
  --panel-2: #1C1E22;
  --border: #2B2D32;
  --border-soft: #212327;
  --text: #E7E7E9;
  --text-muted: #C4C6CE;
  --text-dim: #A3A5AD;
  --accent: #C7A24C;
  --accent-text: #14140F;
  --win: #5CAD7A;
  --loss: #E07364;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 6px;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; padding:0; height:100%; overscroll-behavior-y:none; }
body{
  position: relative;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  /* --app-h держит реальную видимую высоту (см. скрипт внизу файла) —
     100vh/100dvh внутри Telegram WebView часто не совпадает с фактической
     видимой областью, из-за чего фон обрывался/прыгал. */
  min-height: var(--app-h, 100dvh);
  padding-bottom: calc(var(--cta-h, 84px) + 12px);
  overflow-x: hidden;
}
body::before{
  content: "";
  position: fixed;
  top:0; left:-10%; right:-10%;
  height: calc(var(--app-h, 100dvh) + 20%);
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% -5%, rgba(199,162,76,0.16), transparent 60%),
    radial-gradient(ellipse 55% 40% at 105% 20%, rgba(92,173,122,0.11), transparent 60%),
    radial-gradient(ellipse 50% 35% at 15% 78%, rgba(224,115,100,0.08), transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 100%, rgba(199,162,76,0.08), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='300'%3E%3Cg stroke-linecap='round'%3E%3Cline x1='24' y1='24' x2='24' y2='96' stroke='%235CAD7A' stroke-width='2' opacity='0.55'/%3E%3Crect x='16' y='48' width='16' height='34' fill='%235CAD7A' opacity='0.55'/%3E%3Cline x1='64' y1='70' x2='64' y2='170' stroke='%23E07364' stroke-width='2' opacity='0.5'/%3E%3Crect x='56' y='86' width='16' height='58' fill='%23E07364' opacity='0.5'/%3E%3Cline x1='104' y1='30' x2='104' y2='120' stroke='%235CAD7A' stroke-width='2' opacity='0.5'/%3E%3Crect x='96' y='52' width='16' height='42' fill='%235CAD7A' opacity='0.5'/%3E%3Cline x1='144' y1='110' x2='144' y2='210' stroke='%23E07364' stroke-width='2' opacity='0.55'/%3E%3Crect x='136' y='128' width='16' height='52' fill='%23E07364' opacity='0.55'/%3E%3Cline x1='184' y1='60' x2='184' y2='150' stroke='%235CAD7A' stroke-width='2' opacity='0.5'/%3E%3Crect x='176' y='78' width='16' height='46' fill='%235CAD7A' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: auto, auto, auto, auto, 220px 300px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  opacity: 0.22;
  animation: bgDrift 22s ease-in-out infinite alternate;
}
@keyframes bgDrift{
  0%{ transform: translate3d(0,0,0) scale(1); }
  100%{ transform: translate3d(-1.5%,1%,0) scale(1.03); }
}
@media (prefers-reduced-motion: reduce){
  body::before{ animation: none; }
}
.wrap, .cta-bar, .topbar{ position: relative; z-index: 1; }
a{ color:inherit; }
button{ font-family:inherit; }

.wrap{ max-width: 480px; margin:0 auto; padding: 0 18px; }

/* ---------- top bar ---------- */
.topbar{
  position: sticky; top:0; z-index:20;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner{
  max-width:480px; margin:0 auto; padding:13px 18px;
  display:flex; align-items:center; gap:11px;
}
.mark{
  width:32px; height:32px; flex:none; border-radius:50%;
  border:1px solid var(--border); overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--mono); font-weight:600; font-size:12px;
  color: var(--accent); letter-spacing:0.02em;
}
.mark img{ width:100%; height:100%; object-fit:cover; display:block; }
.topbar-text{ flex:1; min-width:0; }
.topbar-title{ font-weight:600; font-size:14px; }
.topbar-sub{ font-family: var(--mono); font-size:11px; color: var(--text-dim); margin-top:2px; display:flex; align-items:center; gap:5px; }
.topbar-sub .live-dot{
  width:6px; height:6px; border-radius:50%; flex:none;
  background: var(--win);
  box-shadow: 0 0 0 0 rgba(92,173,122,0.55);
  animation: liveDotPulse 2.2s ease-in-out infinite;
}
.topbar-sub #subCount{ transition: color .35s ease; }
.topbar-sub #subCount.sub-updated{ color: var(--accent); }
@keyframes liveDotPulse{
  0%{ box-shadow: 0 0 0 0 rgba(92,173,122,0.55); }
  70%{ box-shadow: 0 0 0 5px rgba(92,173,122,0); }
  100%{ box-shadow: 0 0 0 0 rgba(92,173,122,0); }
}
@media (prefers-reduced-motion: reduce){
  .topbar-sub .live-dot{ animation:none; }
}
.topbar-link{
  flex:none; width:30px; height:30px; border-radius:4px;
  border:1px solid var(--border); display:flex; align-items:center; justify-content:center;
  color: var(--text-muted); text-decoration:none;
}
.topbar-link svg{ width:14px; height:14px; }

/* ---------- hero ---------- */
.hero{ padding: 28px 0 6px; }
.eyebrow{
  font-family: var(--mono); font-size:11px; letter-spacing:0.1em;
  color: var(--text-dim); text-transform:uppercase; margin-bottom:10px;
}
.headline{
  font-weight:700; font-size:23px; line-height:1.3; letter-spacing:-0.2px;
  margin: 0 0 10px;
}
.dek{
  font-size:13.5px; color: var(--text-muted); max-width:42ch; margin:0;
}

/* ---------- tabs ---------- */
.tabs{
  display:flex; gap:22px; margin: 26px 0 18px;
  border-bottom:1px solid var(--border-soft);
  overflow-x:auto; scrollbar-width:none;
}
.tabs::-webkit-scrollbar{ display:none; }
.tab{
  font-family: var(--mono); font-size:12.5px; color: var(--text-dim);
  background:none; border:none; cursor:pointer; white-space:nowrap;
  padding: 0 0 11px; border-bottom:2px solid transparent; margin-bottom:-1px;
  transition: color .15s ease, border-color .15s ease;
}
.tab.active{ color: var(--text); border-bottom-color: var(--accent); }

/* ---------- statement (signature element) ---------- */
.statement-stage{ position:relative; }
.statement{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: opacity .18s ease;
}
.statement.switching{ opacity:0; }

.stmt-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:4px; }
.stmt-head .month{ font-weight:600; font-size:15.5px; }
.stmt-head .calls{ font-family: var(--mono); font-size:11px; color: var(--text-dim); white-space:nowrap; }
.stmt-note{ font-size:11.5px; color: var(--text-dim); margin-bottom:14px; }

.stmt-table{ width:100%; border-collapse:collapse; }
.stmt-table thead th{
  text-align:left; font-family: var(--mono); font-size:10px; letter-spacing:0.06em;
  color: var(--text-dim); font-weight:500; text-transform:uppercase;
  padding-bottom:7px; border-bottom:1px solid var(--border-soft);
}
.stmt-table thead th:last-child{ text-align:right; }
.stmt-table tbody td{
  padding: 9px 0; border-bottom:1px solid var(--border-soft);
  vertical-align:top;
}
.stmt-table tbody tr:last-child td{ border-bottom:none; }
.stmt-table tbody tr{ transition: background-color .12s ease; }
.stmt-table tbody tr:hover, .stmt-table tbody tr:active{ background: var(--panel-2); }
.stmt-table .ticker{ font-family: var(--mono); font-weight:600; font-size:12.5px; }
.stmt-table .desc{ font-size:11px; color: var(--text-dim); margin-top:2px; }
.stmt-table .amt{
  font-family: var(--mono); font-size:12.5px; font-weight:600; text-align:right;
  white-space:nowrap;
}
.amt.win{ color: var(--win); }
.amt.loss{ color: var(--loss); }
.amt.na{ color: var(--text-dim); font-weight:400; }

.total-row{
  display:flex; justify-content:space-between; align-items:baseline;
  border-top: 3px double var(--border); margin-top:4px; padding-top:12px;
}
.total-row .lbl{ font-family: var(--mono); font-size:11px; letter-spacing:0.06em; color: var(--text-muted); text-transform:uppercase; }
.total-row .val{ font-family: var(--mono); font-size:19px; font-weight:600; color: var(--text); }
.total-currency{ font-family: var(--mono); font-size:10.5px; color: var(--text-dim); text-align:right; margin-top:2px; }

.stmt-honesty{
  font-size:11.5px; color: var(--text-dim); margin-top:14px; padding-top:12px;
  border-top:1px solid var(--border-soft);
}

.stmt-link{
  display:inline-block; margin-top:14px; font-family: var(--mono); font-size:11.5px;
  color: var(--text-muted); text-decoration:none; border-bottom:1px solid var(--border);
}
.stmt-link:hover{ color: var(--text); }

/* ---------- recap slider (paginated year-in-review text) ---------- */
.recap-slider{ margin: 2px 0 4px; }
.recap-track{
  display:flex; overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
}
.recap-track::-webkit-scrollbar{ display:none; }
.recap-slide{
  flex:0 0 100%; scroll-snap-align:start; min-width:0;
}
.recap-slide-inner{
  max-height: 300px; overflow-y:auto;
  padding: 16px 16px 14px;
  -webkit-overflow-scrolling:touch;
}
.recap-slide-inner h4{
  margin:0 0 10px; font-size:13px; font-weight:600; color: var(--accent);
  font-family: var(--mono); letter-spacing:0.01em;
}
.recap-slide-inner p{
  font-size:12.5px; line-height:1.6; color: var(--text-muted); margin:0 0 10px;
}
.recap-slide-inner p:last-child{ margin-bottom:0; }
.recap-dots{ display:flex; justify-content:center; gap:7px; margin-top:10px; }
.recap-dot{
  width:6px; height:6px; padding:0; border-radius:50%; border:none;
  background: var(--border); cursor:pointer; transition: background .15s ease, transform .15s ease;
}
.recap-dot.active{ background: var(--accent); transform: scale(1.35); }
.recap-hint{
  text-align:center; font-family: var(--mono); font-size:10px; color: var(--text-dim);
  margin-top:8px; letter-spacing:0.02em;
}

/* ---------- kpi stats ---------- */
.stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--border-soft); margin:24px 0 6px; border:1px solid var(--border-soft); border-radius:var(--radius); overflow:hidden; }
.stat{ background: var(--panel); padding:13px 10px; text-align:center; }
.stat .num{ font-family: var(--mono); font-weight:600; font-size:17px; color: var(--accent); }
.stat .lbl{ font-size:10px; color: var(--text-dim); margin-top:5px; line-height:1.35; }
.stats-note{ font-size:11px; color: var(--text-dim); margin-top:10px; }

/* ---------- trend chart ---------- */
.trend{ margin: 30px 0 6px; }
.trend-caption{ font-size:12px; color: var(--text-muted); margin-top:4px; }
.trend-scroll{
  margin-top:16px; padding: 0 2px 2px;
  overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  max-width:100%;
  box-sizing:border-box;
}
.trend-scroll::-webkit-scrollbar{ display:none; }
.trend-chart{
  display:flex; align-items:flex-end; gap:16px;
  border-bottom: 1px solid var(--border-soft);
  width:max-content; min-width:100%;
}
.trend-bar{
  flex:0 0 auto; width:52px;
  display:flex; flex-direction:column; align-items:center;
  scroll-snap-align:start;
}
.trend-bar .tb-col{
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  width:100%;
  height:118px; /* value (~16) + gap 6 + fill area 96 */
}
.trend-bar .tb-value{
  font-family: var(--mono); font-size:10.5px; color: var(--text-muted);
  margin-bottom:6px; white-space:nowrap; line-height:1.2; flex:none;
}
.trend-bar .tb-fill-wrap{
  width:100%; max-width:52px; height:96px;
  display:flex; align-items:flex-end; justify-content:center;
  flex:none;
}
.trend-bar .tb-fill{
  width:100%; border-radius:3px 3px 0 0; background: var(--accent);
  min-height:6px;
}
.trend-bar .tb-label{
  font-family: var(--mono); font-size:10.5px; color: var(--text-dim);
  margin-top:8px; white-space:nowrap; line-height:1.2;
}

/* ---------- inside privatka ---------- */
.section-title{ font-weight:600; font-size:15px; margin:32px 0 12px; }
.feature-list{ border-top:1px solid var(--border-soft); }
.feature-item{
  display:flex; gap:14px; padding:12px 0; border-bottom:1px solid var(--border-soft);
  border-left:2px solid var(--accent); padding-left:12px;
}
.feature-item .t{ font-weight:600; font-size:12.5px; flex:none; width:118px; }
.feature-item .d{ font-size:12.5px; color: var(--text-muted); }

/* ---------- archive: monthly recap timeline ---------- */
.archive-list{ border-top:1px solid var(--border-soft); }
.archive-item{
  padding:14px 0 14px 14px; border-bottom:1px solid var(--border-soft);
  border-left:2px solid var(--border);
}
.archive-item .a-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:5px; }
.archive-item .a-month{ font-weight:600; font-size:13px; }
.archive-item .a-total{ font-family: var(--mono); font-size:12.5px; color: var(--win); white-space:nowrap; }
.archive-item .a-total.neutral{ color: var(--text-dim); }
.archive-item .a-desc{ font-size:12.5px; color: var(--text-muted); line-height:1.55; }
.archive-item .a-link{ display:inline-block; margin-top:7px; font-size:11.5px; color: var(--accent); text-decoration:none; border-bottom:1px solid rgba(199,162,76,0.35); }
.archive-note{ font-size:11px; color: var(--text-dim); line-height:1.6; margin-top:10px; }

/* ---------- gallery: proof screenshots (horizontal scroll) ---------- */
.gallery-grid{
  display:flex; gap:8px; margin-top:10px;
  overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory;
  padding:2px 2px 12px; margin-left:-2px; margin-right:-2px;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.gallery-grid::-webkit-scrollbar{ display:none; }
.gallery-cell{
  position:relative; flex:0 0 auto; width:120px; aspect-ratio:3/4; border-radius:7px; overflow:hidden;
  border:1px solid var(--border-soft); background:var(--panel-2); cursor:pointer;
  scroll-snap-align:start;
}
.gallery-cell img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s ease; }
.gallery-cell:active img{ transform:scale(0.96); }
.gallery-cell .g-tag{
  position:absolute; left:5px; bottom:5px; font-family:var(--mono); font-size:9.5px;
  padding:2px 6px; border-radius:999px; background:rgba(16,17,20,0.72); backdrop-filter:blur(2px);
  color: var(--text-muted); border:1px solid var(--border-soft);
}
.gallery-cell .g-tag.win{ color: var(--win); }
.gallery-cell .g-tag.loss{ color: var(--loss); }

.lightbox{
  position:fixed; inset:0; z-index:100; background:rgba(8,9,11,0.92);
  display:none; align-items:center; justify-content:center; padding:24px 16px;
}
.lightbox.open{ display:flex; }
.lightbox-inner{ max-width:480px; width:100%; }
.lightbox-inner img{ width:100%; border-radius:8px; display:block; border:1px solid var(--border-soft); }
.lightbox-caption{ font-size:12.5px; color: var(--text-muted); margin-top:12px; line-height:1.55; text-align:center; }
.lightbox-close{
  position:absolute; top:18px; right:18px; width:34px; height:34px; border-radius:50%;
  background:var(--panel-2); border:1px solid var(--border-soft); color:var(--text);
  font-size:16px; display:flex; align-items:center; justify-content:center; cursor:pointer;
}

/* ---------- footer ---------- */
.footer{ margin-top:34px; padding-top:16px; border-top:1px solid var(--border-soft); }
.disclaimer{ font-size:11px; color: var(--text-dim); line-height:1.6; }
.footlinks{ display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; }
.footlinks a{ font-size:11.5px; color: var(--text-muted); text-decoration:none; border-bottom:1px solid var(--border); }
.madeby{ margin-top:22px; padding-top:16px; text-align:center; }
.madeby a{
  display:inline-flex; align-items:center; gap:6px;
  font-family: var(--mono); font-size:10.5px; letter-spacing:.02em;
  color: var(--text-dim); text-decoration:none;
  padding:6px 12px; border:1px solid var(--border-soft); border-radius:999px;
  transition: color .15s ease, border-color .15s ease;
}
.madeby a:hover{ color: var(--accent); border-color: var(--accent); }
.madeby .dot{ width:5px; height:5px; border-radius:50%; background: var(--accent); flex:none; }

/* ---------- sticky cta ---------- */
.cta-bar{
  position:fixed; left:0; right:0; bottom:0; z-index:30;
  background: var(--bg); border-top:1px solid var(--border-soft);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
}
.cta-inner{ max-width:480px; margin:0 auto; display:flex; align-items:center; gap:12px; }
.cta-info{ flex:1; min-width:0; }
.cta-info .t{ font-weight:600; font-size:13.5px; }
.cta-info .p{ font-family: var(--mono); font-size:11px; color: var(--text-dim); margin-top:1px; }
.cta-btn{
  flex:none; font-weight:600; font-size:13px; color: var(--accent-text);
  background: var(--accent); border:none; border-radius:var(--radius);
  padding: 11px 17px; cursor:pointer;
}
.cta-btn:active{ opacity:0.85; }

@media (prefers-reduced-motion: reduce){ .statement{ transition:none; } }
