:root {
  --blue: #156fb8;
  --blue-dark: #0f5f9d;
  --red: #c62828;
  --green: #167c3a;
  --text: #163047;
  --border: #d6e4ef;
  --bg: #f5f9fc;
  --white: #ffffff;
  --shadow: 0 10px 24px rgba(10, 60, 100, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 14px 14px 32px;
}

.site-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.brand-logo {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  height: auto;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg);
  padding: 4px 0 12px;
  margin-bottom: 8px;
}

.tab-button {
  border: 2px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  min-height: 56px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  background: var(--blue);
  color: var(--white);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-title {
  font-size: 30px;
  line-height: 1.1;
  margin: 12px 0 12px;
  font-weight: 800;
}

.sub-title {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 14px;
  font-weight: 700;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.field-group {
  margin-bottom: 14px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-group label,
.slider-label-row label {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 8px;
}

input[type="text"],
select {
  width: 100%;
  min-height: 54px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  padding: 12px 14px;
  font-size: 17px;
  color: var(--text);
}

.progress-label-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.progress-label {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.progress-percent {
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  color: var(--blue);
}

.progress-track {
  width: 100%;
  height: 18px;
  background: #dbe8f2;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #c5d7e5;
}

.progress-fill {
  width: 0%;
  max-width: 99%;
  height: 100%;
  background: linear-gradient(90deg, #49a2e1 0%, #156fb8 100%);
  transition: width 0.25s ease;
}

.questions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.hidden {
  display: none !important;
}

.question-text {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

.yes-no-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer-button {
  min-height: 54px;
  border-radius: 14px;
  border: 2px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.answer-button.selected {
  background: var(--blue);
  color: var(--white);
}

.section-title {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
}

.metric-card {
  background: #fafdff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

.metric-card:last-child {
  margin-bottom: 0;
}

.metric-value {
  font-size: 52px;
  line-height: 1;
  font-weight: 900;
  word-break: break-word;
}

.metric-label {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.red-value {
  color: var(--red);
  font-weight: 900;
}

.green-value {
  color: var(--green);
  font-weight: 900;
}

.blue-value {
  color: var(--blue);
  font-weight: 900;
}

.large-metric {
  margin-bottom: 16px;
}

.survey-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.survey-image-card {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
}

.survey-image-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.final-question-block {
  margin-top: 18px;
}

.final-question {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
}

.slider-block {
  margin-bottom: 18px;
}

.slider-block:last-child {
  margin-bottom: 0;
}

.slider-label-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.slider-value {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--blue);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  height: 30px;
}

.results-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.savings-submetrics {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submetric {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--green);
}

.disclaimer-list {
  margin: 0;
  padding-left: 22px;
}

.disclaimer-list li {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.45;
}

.disclaimer-list li:last-child {
  margin-bottom: 0;
}

.solution-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.solution-text {
  margin: 16px 0 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
}

.section-footer {
  margin-top: 10px;
}

.footer-logo {
  width: 100%;
  max-width: 170px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .app-shell {
    padding: 20px 20px 42px;
  }

  .panel-title {
    font-size: 36px;
  }

  .sub-title {
    font-size: 24px;
  }

  .metric-value {
    font-size: 62px;
  }

  .question-text {
    font-size: 22px;
  }

  .final-question {
    font-size: 28px;
  }
}
