:root {
  --color-primary: #3671e9;
  --color-primary-dark: #2b5bc4;
  --color-primary-tint: #eaf0ff;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f7fb;
  --color-border: #d7dce6;
  --color-text: #1c2230;
  --color-text-soft: #57616f;
  --radius: 10px;
  --radius-pill: 30px;
  font-family: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-family: inherit;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  padding: 32px 20px 0;
}

/* ---------- Intro screen ---------- */
#intro-screen {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  text-align: center;
}
#intro-screen p {
  font-size: 17px;
  color: var(--color-text-soft);
  line-height: 1.5;
  margin: 20px 0 28px;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled { background: #b9c2d6; cursor: not-allowed; }

/* ---------- App shell ---------- */
#app { display: none; max-width: 1100px; margin: 0 auto; padding: 24px 20px 100px; }
#app.active { display: block; }

/* Stepper */
.stepper {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.stepper .step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7484;
  background: transparent;
}
.stepper .step .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #aab2c4;
  color: #fff;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.stepper .step.active { background: var(--color-primary-tint); color: var(--color-primary); }
.stepper .step.active .dot { background: var(--color-primary); }
.stepper .step.done { color: #2f9e52; }
.stepper .step.done .dot { background: #37a662; }
.stepper .connector { width: 16px; height: 2px; background: #c3cadb; align-self: center; }

/* Two-panel layout */
.panels {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.panel {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
#panel-left { flex: 1 1 50%; min-width: 0; }
#panel-right { flex: 1 1 50%; min-width: 0; background: linear-gradient(180deg, #f7faff 0%, #ffffff 140px); }

.panel h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-soft);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.question-text, .reaction-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--color-text);
}
.hint {
  font-size: 12px;
  color: var(--color-text-soft);
  margin: 0 0 18px;
}
.reaction-subheading {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--color-text);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chip {
  border: 1.5px solid var(--color-border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all .12s ease;
  user-select: none;
}
.chip:hover { border-color: var(--color-primary); }
.chip.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
/* multi-select chips: checkbox indicator with visible checkmark, softer selected style */
.chip.multi { display: inline-flex; align-items: center; }
.chip.multi::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border: 1.5px solid #b7bfd1;
  border-radius: 4px;
  margin-right: 9px;
  background: #fff;
  flex-shrink: 0;
}
.chip.multi.selected {
  background: var(--color-primary-tint);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.chip.multi.selected::before {
  content: "✓";
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
}

.other-input {
  margin-top: 12px;
  display: none;
}
.other-input.visible { display: block; }
.other-input input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
}

.effect-input, .effect-select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}

/* Right panel reaction */
.reaction-text { font-size: 14px; line-height: 1.5; color: var(--color-text-soft); margin: 0 0 14px; }
.logo-row { display: flex; gap: 10px; flex-wrap: wrap; }
.logo-placeholder {
  min-width: 108px; height: 44px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  padding: 0 12px;
  text-align: center;
}

/* Unified bullet list used across all steps for any enumerated items */
ul.reaction-list { list-style: none; margin: 0 0 14px; padding: 0; }
ul.reaction-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--color-text-soft);
  line-height: 1.4;
}
ul.reaction-list li::before {
  content: "●";
  position: absolute;
  left: 0; top: 0;
  color: var(--color-primary);
  font-size: 13px;
}

/* Solution / current-solution plates */
.plate-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.plate-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
}
.plate-card-header .icon-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.plate-card ul.reaction-list { margin-bottom: 0; }

/* Case cards */
.case-card {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}
.case-card-title { display:flex; align-items:flex-start; gap:10px; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.case-card-title .icon-badge {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.case-card-subtitle { font-size: 12px; color: var(--color-text-soft); margin: 0 0 10px; }
.case-card p.line { font-size: 13px; margin: 0 0 6px; }

/* Result stat cards (Шаг 5) */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.stat-card .icon-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Резюме — таблица без границ */
table.summary-table { width: 100%; border-collapse: collapse; }
table.summary-table td { border: none; padding: 0 0 14px; font-size: 14px; vertical-align: top; }
table.summary-table td.label { color: var(--color-text-soft); white-space: nowrap; padding-right: 16px; width: 1%; }
table.summary-table td.value { color: var(--color-text); }
table.summary-table ul.reaction-list { margin: 0; }
table.summary-table ul.reaction-list li { margin-bottom: 3px; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}
.nav-prompt {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-right: 16px;
  text-align: right;
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.nav .spacer { flex: 1; }

/* ---------- Mobile ---------- */
@media (max-width: 780px) {
  .panels { flex-direction: column; }
  #panel-right {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    border-radius: 16px 16px 0 0;
    max-height: 56px;
    overflow: hidden;
    padding: 16px 20px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    transition: max-height .25s ease;
  }
  #panel-right.expanded {
    max-height: 80vh;
    overflow-y: auto;
  }
  #panel-right h2 { display: none; }
  .sheet-handle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
  }
  .sheet-handle-label { flex: 1; }
  .sheet-handle .badge {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    display: none;
    margin-left: 8px;
    flex-shrink: 0;
  }
  .sheet-handle .badge.show { display: inline-block; }
  .sheet-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    margin-left: 12px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    color: var(--color-text-soft);
    font-size: 14px;
    flex-shrink: 0;
  }
  #panel-right.expanded .sheet-close { display: flex; }
  #app { padding-bottom: 140px; }
  .stat-grid { grid-template-columns: 1fr; }
}
@media (min-width: 781px) {
  .sheet-handle { display: none; }
}

.meeting-hint { font-size: 14px; }

/* ---------- Переход к «Встрече с Orbis» ---------- */
@keyframes dissolveOut {
  0%   { opacity: 1;  filter: blur(0)    contrast(1);   transform: scale(1); }
  30%  { opacity: .8; filter: blur(1px)  contrast(1.15); transform: scale(1.003); }
  65%  { opacity: .35;filter: blur(6px)  contrast(1.35); transform: scale(.995); }
  100% { opacity: 0;  filter: blur(16px) contrast(1.6);  transform: scale(.965); }
}
.panel-dissolving {
  animation: dissolveOut .5s ease forwards;
  pointer-events: none;
}

@keyframes blurIn {
  0%   { opacity: 0; filter: blur(18px); }
  100% { opacity: 1; filter: blur(0); }
}
.panel-blur-in {
  animation: blurIn .6s ease .15s both;
}

.meeting-ghost {
  position: fixed;
  margin: 0;
  z-index: 60;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(28, 34, 48, .12);
}

.site-footer {
  text-align: center;
  font-size: 12px;
  color: #9aa2b1;
  padding: 24px 16px 32px;
}
.site-footer a {
  color: #9aa2b1;
  text-decoration: underline;
}
.site-footer a:hover { color: var(--color-primary); }
