/* ============================================================================
   ИНДЕКС МАРКЕТИНГОВОЙ НИЩЕТЫ™ — стили
   Стиль: industrial / brutalist / cyberpunk / diagnostic terminal
   Mobile-first. Брейкпоинты: 375, 430, 768, 1024, 1440
   ============================================================================ */

:root {
  --bg: #050505;
  --bg-elevated: #0d0d0c;
  --acid: #C8FF00;
  --white: #F4F4F0;
  --grey: #8A8A84;
  --red: #FF3B30;
  --yellow: #FFD60A;
  --border: rgba(244, 244, 240, 0.16);
  --border-strong: rgba(244, 244, 240, 0.32);
  --radius: 2px;
  --font-display: 'Oswald', 'Archivo Narrow', sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  --font-body: 'Inter', 'Manrope', sans-serif;
  --max-width: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  position: relative;
}

::selection { background: var(--acid); color: #050505; }

a { color: var(--acid); text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

img, svg { max-width: 100%; display: block; }

/* ---------- Noise / grain overlay ---------- */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanline {
  position: fixed;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
  opacity: 0.5;
  z-index: 998;
  pointer-events: none;
  animation: scan 6s linear infinite;
}

@keyframes scan {
  0% { top: -2px; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scanline { display: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- App shell ---------- */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 20px 100px;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--acid);
  text-transform: uppercase;
}

.display-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

/* ---------- Intro screen ---------- */
.intro-screen {
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding-top: 60px;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--grey);
}

.intro-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.intro-title {
  font-size: 42px;
  color: var(--white);
}

.intro-title .accent { color: var(--acid); }

.intro-subtitle {
  font-size: 16px;
  color: var(--grey);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

.intro-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.06em;
}

.intro-disclaimer {
  font-size: 12px;
  color: var(--grey);
  opacity: 0.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 15px;
  padding: 16px 24px;
  min-height: 52px;
  border-radius: var(--radius);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.btn-primary {
  background: var(--acid);
  color: #050505;
}

.btn-primary:hover { box-shadow: 0 0 24px rgba(200,255,0,0.35); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--white);
}

.btn-outline:hover { border-color: var(--acid); color: var(--acid); }

.btn-ghost {
  background: transparent;
  color: var(--grey);
  text-transform: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px;
  min-height: 44px;
  width: auto;
}
.btn-ghost:hover { color: var(--white); }

.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1; }

/* ---------- Progress bar ---------- */
.progress-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,5,5,0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.progress-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.progress-label .current { color: var(--acid); }

.progress-track {
  height: 6px;
  background: rgba(244,244,240,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--acid);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-back {
  background: none;
  border: none;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 10px;
  padding: 4px 0;
  min-height: 32px;
}
.progress-back:hover { color: var(--acid); }

.micro-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--yellow);
  margin-top: 8px;
  min-height: 16px;
  animation: fadeIn 0.3s ease;
}

/* ---------- Question screen ---------- */
.question-screen { padding-top: 28px; gap: 20px; }

.question-number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--acid);
  letter-spacing: 0.08em;
}

.question-title {
  font-size: 26px;
  color: var(--white);
}

.question-subtitle {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.4;
  margin-top: -8px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--white);
  padding: 16px 18px;
  min-height: 56px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.option-card:hover {
  border-color: var(--border-strong);
  background: #131311;
}

.option-card:active { transform: scale(0.99); }

.option-card.selected {
  border-color: var(--acid);
  background: rgba(200,255,0,0.08);
  box-shadow: 0 0 0 1px var(--acid) inset;
}

.option-marker {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--grey);
}

.option-card.selected .option-marker {
  border-color: var(--acid);
  background: var(--acid);
  color: #050505;
}

.option-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--yellow);
  margin-top: -4px;
  animation: fadeIn 0.3s ease;
}

/* ---------- Slider question ---------- */
.slider-block { margin-top: 12px; }

.slider-value {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--acid);
  text-align: center;
  line-height: 1;
}

.slider-unit {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.08em;
  margin-top: 4px;
  margin-bottom: 20px;
}

input[type="range"] {
  width: 100%;
  height: 44px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(90deg, var(--acid) 0%, var(--acid) var(--fill, 0%), rgba(244,244,240,0.08) var(--fill,0%), rgba(244,244,240,0.08) 100%);
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--acid);
  margin-top: -12px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(200,255,0,0.4);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: rgba(244,244,240,0.08);
  border-radius: 3px;
}
input[type="range"]::-moz-range-progress {
  height: 6px;
  background: var(--acid);
  border-radius: 3px;
}
input[type="range"]::-moz-range-thumb {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--acid);
  cursor: pointer;
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--grey);
  margin-top: 4px;
}

.slider-hint {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow);
  text-align: center;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

/* ---------- Sticky CTA (mobile) ---------- */
.sticky-cta {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
  padding: 20px 20px 24px;
  margin-top: auto;
  z-index: 40;
}

.sticky-cta-inner { max-width: var(--max-width); margin: 0 auto; }

/* ---------- Calculating screen ---------- */
.calc-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding-top: 40px;
}

.calc-title {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--acid);
  letter-spacing: 0.15em;
}

.calc-lines {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  animation: fadeIn 0.25s ease forwards;
}

.calc-line .status-ok { color: var(--grey); }
.calc-line .status-found { color: var(--red); }

.calc-scan {
  width: 48px; height: 48px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.calc-done {
  font-family: var(--font-display);
  color: var(--acid);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

/* ---------- Result screen ---------- */
.result-screen { padding-top: 24px; gap: 28px; }

.result-score-block { text-align: center; }

.result-score-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.result-score {
  font-family: var(--font-display);
  font-size: 88px;
  line-height: 0.95;
  color: var(--white);
}

.result-score .max { font-size: 40px; color: var(--grey); }

.result-level {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
}

.result-level-desc {
  margin-top: 16px;
  font-size: 15px;
  color: var(--grey);
  line-height: 1.5;
  max-width: 480px;
  margin-inline: auto;
}

.section-block {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Main enemy */
.enemy-card { text-align: center; }
.enemy-icon { font-size: 40px; margin-bottom: 8px; }
.enemy-title { font-family: var(--font-display); font-size: 26px; color: var(--red); text-transform: uppercase; }
.enemy-text { color: var(--grey); font-size: 14px; margin-top: 10px; line-height: 1.5; }

/* Profile bars */
.profile-list { display: flex; flex-direction: column; gap: 16px; }
.profile-row { display: flex; flex-direction: column; gap: 6px; }
.profile-row-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.profile-row-label { color: var(--white); }
.profile-row-value { font-family: var(--font-mono); color: var(--acid); }
.profile-bar-track { height: 10px; background: rgba(244,244,240,0.08); border-radius: 5px; overflow: hidden; }
.profile-bar-fill { height: 100%; background: var(--acid); border-radius: 5px; transition: width 0.8s ease; width: 0; }
.profile-bar-fill.high { background: var(--red); }
.profile-bar-fill.mid { background: var(--yellow); }

/* ---------- Poverty tax ---------- */
.tax-form { display: flex; flex-direction: column; gap: 14px; }
.tax-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.tax-field input[type="number"],
.tax-field input[type="range"] { width: 100%; }
.tax-field-value { font-family: var(--font-mono); color: var(--acid); font-size: 13px; margin-top: 4px; }

.tax-result {
  text-align: center;
  margin-top: 8px;
}

.tax-line-strike {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--grey);
  text-decoration: line-through;
}

.tax-line-main {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--red);
  margin-top: 6px;
  line-height: 1.1;
}

.tax-line-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
  margin-top: 6px;
}

.tax-yearly {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.tax-yearly-value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
}

.tax-disclaimer {
  font-size: 11px;
  color: var(--grey);
  opacity: 0.7;
  margin-top: 16px;
  line-height: 1.4;
}

/* Scenario cards */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.scenario-card {
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius);
}

.scenario-card .scenario-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--acid);
  margin-bottom: 6px;
}

.scenario-card .scenario-text { font-size: 13px; color: var(--grey); line-height: 1.4; }

/* ---------- Share ---------- */
.share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  padding: 14px;
  min-height: 48px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--white);
}
.share-btn:hover { border-color: var(--acid); color: var(--acid); }

.partner-box {
  border: 1px dashed var(--border-strong);
  padding: 18px;
  border-radius: var(--radius);
  text-align: center;
}
.partner-box p { color: var(--grey); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }

/* Share card (for html2canvas export) */
.share-card-wrapper {
  position: fixed;
  left: -9999px;
  top: 0;
}

.share-card {
  width: 1080px;
  height: 1350px;
  background: #050505;
  color: #F4F4F0;
  font-family: var(--font-body);
  padding: 90px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background-image: radial-gradient(circle at 20% 15%, rgba(200,255,0,0.08), transparent 40%);
}

.share-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 22px;
  color: #8A8A84;
  letter-spacing: 0.1em;
}

.share-card-title {
  font-family: var(--font-display);
  font-size: 74px;
  line-height: 1.05;
  text-transform: uppercase;
  color: #F4F4F0;
  margin-top: 20px;
}
.share-card-title .accent { color: #C8FF00; }

.share-card-score { font-family: var(--font-display); font-size: 220px; color: #F4F4F0; line-height: 0.9; margin-top: 40px; }
.share-card-score .max { color: #8A8A84; font-size: 100px; }

.share-card-level {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  border: 2px solid #C8FF00;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 26px;
  color: #C8FF00;
  letter-spacing: 0.08em;
}

.share-card-block { margin-top: 40px; }
.share-card-label { font-family: var(--font-mono); font-size: 20px; color: #8A8A84; letter-spacing: 0.08em; }
.share-card-value { font-family: var(--font-display); font-size: 44px; color: #FF3B30; margin-top: 8px; text-transform: uppercase; }
.share-card-tax { font-family: var(--font-display); font-size: 40px; color: #C8FF00; margin-top: 8px; }

.share-card-footer {
  font-family: var(--font-mono);
  font-size: 24px;
  color: #8A8A84;
  border-top: 1px solid rgba(244,244,240,0.16);
  padding-top: 30px;
  margin-top: 40px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 22px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.modal-box h3 { font-family: var(--font-display); font-size: 22px; margin: 0 0 10px; text-transform: uppercase; }
.modal-box p { color: var(--grey); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* ---------- Restart footer ---------- */
.restart-footer { text-align: center; margin-top: 8px; }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.final-cta-title { font-family: var(--font-display); font-size: 22px; color: var(--acid); text-transform: uppercase; margin-bottom: 10px; }
.final-cta-text { color: var(--grey); font-size: 14px; line-height: 1.5; max-width: 460px; margin: 0 auto 18px; }

/* ---------- Responsive ---------- */
@media (min-width: 430px) {
  .intro-title { font-size: 46px; }
  .result-score { font-size: 96px; }
}

@media (min-width: 768px) {
  .screen { padding: 32px 24px 100px; }
  .intro-title { font-size: 56px; }
  .question-title { font-size: 30px; }
  .result-score { font-size: 108px; }
  .scenario-grid { grid-template-columns: repeat(3, 1fr); }
  .btn { width: auto; padding: 16px 32px; }
  .sticky-cta .btn-primary { width: 100%; }
}

@media (min-width: 1024px) {
  :root { --max-width: 860px; }
  .intro-title { font-size: 64px; }
}

@media (min-width: 1440px) {
  :root { --max-width: 960px; }
}
