/* CSM-помощник МКК — Liquid Glass UI (тёмная стеклянная тема). */

:root {
  --bg: #07080d;
  --text: rgba(255, 255, 255, 0.92);
  --hint: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.35);
  --link: #6ab8ff;
  --accent: #4da6ff;
  --accent2: #8b7bff;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --radius: 18px;
  --radius-s: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 14px 16px calc(76px + env(safe-area-inset-bottom));
  font: 15px/1.5 system-ui, -apple-system, "SF Pro Text", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- фон: аврора-орбы + шум ------------------------------------------------ */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -2;
  pointer-events: none;
}
body::before {
  width: 340px; height: 340px;
  top: -120px; left: -100px;
  background: radial-gradient(circle, rgba(77, 166, 255, 0.34), transparent 65%);
  animation: orb-a 16s ease-in-out infinite alternate;
}
body::after {
  width: 380px; height: 380px;
  top: 30%; right: -160px;
  background: radial-gradient(circle, rgba(139, 123, 255, 0.3), transparent 65%);
  animation: orb-b 20s ease-in-out infinite alternate;
}

@keyframes orb-a { to { transform: translate(60px, 90px) scale(1.15); } }
@keyframes orb-b { to { transform: translate(-70px, -60px) scale(0.9); } }

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 110%, rgba(77, 166, 255, 0.14), transparent 55%);
}

/* --- стеклянные поверхности ------------------------------------------------ */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 10px 34px rgba(0, 0, 0, 0.42);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(23, 26, 36, 0.92); }
}

/* стеклянная кромка-блик сверху */
.glass-edge { position: relative; overflow: hidden; }
.glass-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0.05) 40%, transparent 60%, rgba(255,255,255,0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* --- типографика ----------------------------------------------------------- */
h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 6px 0 6px;
}
h2 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; letter-spacing: -0.2px; }
.sub { color: var(--hint); font-size: 13.5px; }
.hint { color: var(--faint); font-size: 12px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.w500 { font-weight: 500; }
.hidden { display: none !important; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.brand .mark {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 22px rgba(77, 166, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.45);
  flex-shrink: 0;
}
.brand .mark svg { width: 22px; height: 22px; }
.brand h1 { margin: 0; font-size: 21px; }

.gradient-text {
  background: linear-gradient(120deg, #7cc4ff, #b3a1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- иконки-плитки --------------------------------------------------------- */
.icon-tile {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, rgba(77,166,255,0.85), rgba(139,123,255,0.85));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 5px 16px rgba(77, 166, 255, 0.3);
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.violet { background: linear-gradient(135deg, rgba(139,123,255,0.85), rgba(233,109,213,0.8)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 5px 16px rgba(139,123,255,0.3); }
.icon-tile.teal { background: linear-gradient(135deg, rgba(45,206,191,0.85), rgba(77,166,255,0.85)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 5px 16px rgba(45,206,191,0.28); }
.icon-tile.amber { background: linear-gradient(135deg, rgba(255,176,32,0.9), rgba(255,120,80,0.85)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 5px 16px rgba(255,150,60,0.3); }
.icon-tile svg { width: 21px; height: 21px; }

.ic-inline { width: 16px; height: 16px; vertical-align: -3px; }

/* --- карточки ---------------------------------------------------------------- */
.card, .glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 10px 34px rgba(0, 0, 0, 0.42);
}
.card { padding: 13px 14px; margin: 10px 0; }
.card .label {
  display: block;
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.card .value { font-size: 14px; line-height: 1.45; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 10px 0; }
.fact span { display: block; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.fact b { font-size: 13.5px; font-weight: 600; word-break: break-word; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--hint);
  font-size: 12px;
  margin: 3px 5px 3px 0;
}
.badge.accent {
  background: linear-gradient(120deg, rgba(77,166,255,0.25), rgba(139,123,255,0.25));
  border-color: rgba(77, 166, 255, 0.4);
  color: #cfe6ff;
}

/* --- кнопки ------------------------------------------------------------------ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  margin: 10px 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 26px rgba(77, 166, 255, 0.38), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
  -webkit-appearance: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn.secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  color: var(--text);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.btn svg { width: 18px; height: 18px; }

/* --- поля ввода --------------------------------------------------------------- */
input, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  outline: none;
  margin: 6px 0;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus {
  border-color: rgba(77, 166, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.18);
}
textarea { resize: vertical; min-height: 64px; }

/* --- главное меню -------------------------------------------------------------- */
.menu { display: grid; gap: 10px; margin-top: 14px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 26px rgba(0,0,0,0.35);
  transition: transform 0.12s ease, border-color 0.2s;
}
.menu-item:active { transform: scale(0.975); border-color: rgba(77, 166, 255, 0.45); }
.menu-item .body { flex: 1; min-width: 0; }
.menu-item .title { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.menu-item .desc { color: var(--hint); font-size: 12.5px; margin-top: 1px; }
.menu-item .chev { color: var(--faint); }

/* --- гипотезы ------------------------------------------------------------------- */
.hyp {
  background: linear-gradient(165deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  backdrop-filter: blur(20px) saturate(155%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin: 10px 0;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 28px rgba(0,0,0,0.36);
  position: relative;
  overflow: hidden;
}
.hyp::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77,166,255,0.65), transparent);
}
.hyp .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hyp .idx {
  width: 26px; height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(77,166,255,0.9), rgba(139,123,255,0.9));
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.hyp .head b { font-size: 15.5px; flex: 1; line-height: 1.2; letter-spacing: -0.2px; }
.hyp .score {
  font-size: 11px;
  font-weight: 700;
  color: #7cc4ff;
  background: rgba(77, 166, 255, 0.14);
  border: 1px solid rgba(77, 166, 255, 0.3);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.hyp .problem { font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,0.88); }
.hyp .solution {
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(77,166,255,0.14), rgba(139,123,255,0.1));
  border: 1px solid rgba(77, 166, 255, 0.3);
}
.hyp .solution .label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8fc8ff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 4px;
}
.hyp .solution .label svg { width: 13px; height: 13px; }
.hyp .solution .text { font-size: 13px; line-height: 1.45; }

/* --- вопросы / возражения -------------------------------------------------------- */
.q-item { display: flex; gap: 10px; margin: 8px 0; font-size: 13.5px; line-height: 1.45; }
.q-item .n {
  width: 22px; height: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  color: var(--hint);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.obj {
  margin: 9px 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-border);
  font-size: 13px;
  line-height: 1.45;
}
.obj b { display: flex; gap: 7px; align-items: baseline; margin-bottom: 4px; }
.obj span { color: var(--hint); }

.next {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px 13px;
  background: linear-gradient(135deg, rgba(45,206,191,0.14), rgba(77,166,255,0.12));
  border: 1px solid rgba(45, 206, 191, 0.32);
  font-size: 13.5px;
  line-height: 1.45;
}
.next .label {
  display: flex; align-items: center; gap: 6px;
  color: #7fe6d8;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  margin-bottom: 4px;
}
.next .label svg { width: 13px; height: 13px; }

/* --- продукты --------------------------------------------------------------------- */
.prod {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius);
  padding: 12px 13px;
  margin: 8px 0;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.028));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.12s ease, border-color 0.2s;
}
.prod:active { transform: scale(0.98); }
.prod.focused { border-color: rgba(77, 166, 255, 0.5); }
.prod .body { flex: 1; min-width: 0; }
.prod .name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.prod .name .star { color: #ffd35c; display: flex; }
.prod .name .star svg { width: 14px; height: 14px; }
.prod .tagline { color: var(--hint); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod .price { font-size: 12px; font-weight: 600; color: #cfe6ff; margin-top: 3px; }
.prod .arrow { color: var(--faint); display: flex; }
.prod .arrow svg { width: 18px; height: 18px; }

/* --- чекбоксы ------------------------------------------------------------------------ */
.check {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 14px;
  padding: 12px 13px;
  margin: 7px 0;
  cursor: pointer;
  font-size: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024));
  border: 1px solid var(--glass-border);
  transition: border-color 0.15s, background 0.15s;
}
.check.on {
  border-color: rgba(77, 166, 255, 0.55);
  background: linear-gradient(135deg, rgba(77,166,255,0.16), rgba(139,123,255,0.12));
}
.check .box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: all 0.15s;
}
.check .box svg { width: 14px; height: 14px; }
.check.on .box {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(77, 166, 255, 0.4);
}

/* --- нижняя навигация ------------------------------------------------------------------ */
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  padding: 7px;
  gap: 2px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(30, 34, 48, 0.72), rgba(18, 20, 30, 0.68));
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 14px 40px rgba(0, 0, 0, 0.55);
  z-index: 10;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bottom-nav { background: rgba(20, 23, 34, 0.97); }
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0 4px;
  border-radius: 15px;
  transition: background 0.15s, color 0.15s;
}
.bottom-nav a .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 3px;
  width: 40px; height: 26px;
  border-radius: 13px;
}
.bottom-nav a .ic svg { width: 19px; height: 19px; margin: 0 auto; }
.bottom-nav a.active { color: #fff; }
.bottom-nav a.active .ic {
  background: linear-gradient(135deg, rgba(77,166,255,0.95), rgba(139,123,255,0.95));
  box-shadow: 0 4px 14px rgba(77, 166, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* --- прочее ---------------------------------------------------------------------------- */
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.section-title { margin-top: 18px; }

.spin {
  width: 34px; height: 34px;
  margin: 6px auto 12px;
  border: 3.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: rot 0.9s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pdot 1.2s ease-in-out infinite; }
@keyframes pdot { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }

.screen-in { animation: slide-in 0.28s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes slide-in {
  from { transform: translateY(9px); }
  to { transform: translateY(0); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(28, 32, 46, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 13px;
  max-width: 85%;
  text-align: center;
  z-index: 60;
  transition: opacity 0.25s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.toast.hidden { opacity: 0; pointer-events: none; }

.footer-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
}
.footer-note b { color: var(--hint); }

/* --- калькулятор эффекта ---------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.chips .chip {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--hint);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chips .chip.accent {
  background: linear-gradient(135deg, rgba(77,166,255,0.3), rgba(139,123,255,0.3));
  border-color: rgba(77, 166, 255, 0.55);
  color: #e3f1ff;
  box-shadow: 0 4px 14px rgba(77, 166, 255, 0.25);
}

.slider-card { padding: 12px 14px; }
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.slider-head span { color: var(--hint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.slider-head b { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }

input[type="range"] {
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]:focus { box-shadow: none; border: 0; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(77,166,255,0.55), rgba(139,123,255,0.55));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #dfeaff);
  border: 0;
  box-shadow: 0 2px 10px rgba(77, 166, 255, 0.55), inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(77,166,255,0.55), rgba(139,123,255,0.55));
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #dfeaff);
  border: 0;
  box-shadow: 0 2px 10px rgba(77, 166, 255, 0.55);
  cursor: pointer;
}

.eff-accent {
  background: linear-gradient(150deg, rgba(77,166,255,0.13), rgba(139,123,255,0.1)) !important;
  border-color: rgba(77, 166, 255, 0.4);
}
.eff-net {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(45, 206, 191, 0.35);
}
.eff-net .big-num { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; color: #7fe6d8; }
.eff-net .fact b { color: #e9fbf7; }
