:root {
  /* Bold Electric (вариант 3) */
  --bg: #0a0a0a; --card: #131313; --ink: #ffffff;
  --muted: #9a9a9a; --accent: #ccff00; --warm: #ff7a45; --strong: #ccff00;
  --ok: #b6e62e; --warnbg: #2a2410; --warnink: #ffd86a; --line: #242424;
  --display: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* Атрибут hidden должен скрывать всегда — иначе display у .sheet/.dropzone и др.
   перебивает его, и элемент остаётся виден (баг шторки установки). */
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 720px; margin: 0 auto; padding: 24px 18px 64px; }
.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

h1 {
  font-family: var(--display); font-weight: 700; font-size: 42px; line-height: .96;
  letter-spacing: -1px; margin: 0 0 14px; text-transform: uppercase; color: #fff;
}
h1 b, h1 .hl { color: var(--accent); font-weight: 700; }
h2 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.5px; margin: 0 0 14px; }
h3 { font-family: var(--display); font-weight: 500; font-size: 17px; margin: 22px 0 8px; }
.lead { font-size: 17px; color: var(--muted); }
.frame { color: var(--muted); }
.science { color: var(--muted); font-size: 13px; margin-top: 22px; }
.science-link { cursor: pointer; margin-top: 12px; }
.science-link span { color: var(--accent); font-weight: 600; white-space: nowrap; }
.science-link:active { opacity: .65; }

.btn {
  display: block; width: 100%; padding: 17px 18px; margin: 10px 0 0;
  border: 0; border-radius: 14px; font-family: var(--display);
  font-size: 16px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  cursor: pointer; transition: transform .05s, opacity .2s;
}
.btn:active { transform: scale(.99); }
.btn.primary { background: var(--accent); color: #0a0a0a; }
.btn.primary:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); text-transform: none; font-family: Inter, sans-serif; font-weight: 600; }

.hero { padding-top: 28px; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 8px; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.rule b { display: block; font-size: 14px; }
.rule span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.3; }

.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; font-weight: 600; }
.case em { color: #0a0a0a; background: var(--accent); font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: middle; }

.why-mini { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 14px 0; }
.why-mini b { color: var(--ink); }

.dropzone {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 220px; border: 2px dashed var(--line); border-radius: 16px;
  background: var(--card); cursor: pointer; overflow: hidden; padding: 10px;
}
.dropzone.drag { border-color: var(--accent); }
.dz-icon { font-size: 34px; }
.dropzone small { display: block; color: var(--muted); margin-top: 6px; }
#preview { max-width: 100%; max-height: 360px; border-radius: 12px; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; color: var(--muted); }
.checkbox input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.privacy { color: var(--muted); font-size: 13px; text-align: center; }

.spinner {
  width: 46px; height: 46px; margin: 40px auto 20px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.axes { display: grid; gap: 16px; margin: 8px 0 4px; }
.axis-label { font-weight: 600; margin-bottom: 6px; }
.bar { height: 12px; background: var(--line); border-radius: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 8px; transition: width .6s ease; }
#warmthBar { background: var(--warm); }
#strengthBar { background: var(--strong); }
.axis-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* Отчёт — визуальная структура */
.rep-hero { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 14px; padding: 16px; margin: 4px 0 14px; }
.rep-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.rep-verdict { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.3; color: var(--ink); margin: 0; }
.rep-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 6px; }
.rep-score { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.rep-score-num { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--accent); }
.rep-score-num::after { content: '/10'; font-size: 15px; color: var(--muted); font-weight: 500; }
.rep-score-lab { font-size: 13px; color: var(--muted); margin: 6px 0 12px; min-height: 32px; }
.rep-score .bar { height: 8px; }
.rep-h { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 22px 0 10px; }
.rep-top3 { list-style: none; counter-reset: t; margin: 0; padding: 0; }
.rep-top3 li { counter-increment: t; position: relative; background: #141509; border: 1px solid #2c3310; border-radius: 12px; padding: 14px 14px 14px 54px; margin: 8px 0; line-height: 1.45; }
.rep-top3 li::before { content: counter(t); position: absolute; left: 12px; top: 12px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #0a0a0a; font-family: var(--display); font-weight: 700; border-radius: 9px; }
.rep-more { margin: 14px 0; }
.rep-more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 8px 0; }
.rep-more p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0 0; }

#blocks .block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.block .b-title { font-weight: 600; margin-bottom: 6px; }
.block .b-reads { color: var(--muted); font-size: 14px; }
.block .b-fix { margin-top: 8px; color: var(--ok); font-size: 14px; }
.block .b-fix::before { content: "→ "; }

.verdict { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.verdict ol { margin: 6px 0 0; padding-left: 20px; }
.verdict li { margin: 6px 0; }

.sci-block { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.sci-block .sci-num { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .04em; color: #0a0a0a; background: var(--accent); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.sci-block h3 { margin: 0 0 6px; }
.sci-block p { margin: 6px 0; color: var(--muted); line-height: 1.6; }
.sci-block p b { color: var(--ink); }
.sci-block ul { margin: 8px 0; padding-left: 18px; color: var(--muted); }
.sci-block li { margin: 4px 0; }
.sci-block li b { color: var(--ink); }
.sci-refs { background: #141509; border: 1px solid #2c3310; border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.sci-refs h3 { margin: 0 0 10px; }
.sci-refs a { display: block; color: var(--accent); text-decoration: none; font-size: 14px; line-height: 1.5; margin: 8px 0; }
.sci-refs a:active { opacity: .7; }

.reshoot { color: var(--muted); margin: 8px 0; }
.disclaimer { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }

.warn { background: var(--warnbg); color: var(--warnink); border: 1px solid #5a4220; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.auth-gate { background: #12180a; border: 1px solid #2c3a14; border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.auth-gate p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-gate p b { color: var(--ink); }
.auth-hello { color: var(--ok); font-size: 14px; margin-top: 14px; }
.auth-hello b { color: var(--ink); }
.tg-wait { color: var(--accent); font-size: 13px; margin: 10px 0 0; }
.tg-wait b { color: var(--ink); }
#tgLoginBox { min-height: 40px; }
.demo { background: #15160a; color: #e8f5a8; border: 1px solid #313812; border-radius: 12px; padding: 14px; margin-bottom: 14px; font-size: 14px; }

.tg-cta { background: #141509; border: 1px solid #2c3310; border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px; margin: 18px 0; }
.tg-cta p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tg-cta p b { color: var(--ink); }
.tg-cta .btn { margin: 0; }

.lead-capture { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 18px 0; }
.lead-capture p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.lead-row { display: flex; gap: 8px; }
.lead-row input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; }
.lead-row .btn { width: auto; margin: 0; white-space: nowrap; }
.lead-msg { margin: 10px 0 0; color: var(--ok); font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #5a1d1d; color: #ffd9d9; padding: 12px 18px; border-radius: 10px;
  max-width: 90%; box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.sheet {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
  padding: 0; animation: fade .2s ease;
}
.sheet-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px 16px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  width: 100%; max-width: 720px;
}
.sheet-card h3 { margin: 0 0 12px; }
.sheet-steps { color: var(--ink); line-height: 1.7; margin: 0 0 16px; }
@media (min-width: 560px) {
  .sheet { align-items: center; }
  .sheet-card { border-radius: 16px; }
}
