.calculator-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 30px;
  font-family: 'Segoe UI', sans-serif;
}

.calc-block {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.calc-block label {
  display: block;
  margin-top: 20px;
  font-weight: 600;
  color: #333;
}

.calc-block input {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.calc-block button {
  margin-top: 25px;
  padding: 12px 24px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.calc-block button:hover {
  background-color: #005fa3;
}

.result-block {
  background: #f9f9f9;
  padding: 25px;
  border-top: 4px solid #0077cc;
  border-radius: 6px;
  flex: 1;
  min-width: 280px;
}

.result-block h2 {
  margin-top: 0;
  color: #0077cc;
}

.result-output p {
  margin: 12px 0;
  font-size: 17px;
  color: #222;
}

/* ——— Результаты: целевой размер подушки ——— */

.ef-hero {
  text-align: center;
  padding: 18px 12px;
  background: #eef5fb;
  border: 1px solid #d7e6f2;
  border-radius: 8px;
  margin-bottom: 16px;
}

.ef-hero-label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.ef-hero-value {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: #0077cc;
}

.ef-status-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.ef-status-badge.ok {
  background-color: #2e7d32;
}

.ef-status-badge.warn {
  background-color: #f9a825;
  color: #333;
}

.ef-status-badge.bad {
  background-color: #d32f2f;
}

/* ——— Шкала покрытия ——— */

.ef-progress {
  height: 14px;
  background: #e3e3e3;
  border-radius: 8px;
  overflow: hidden;
  margin: 14px 0 6px;
}

.ef-progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s ease;
}

.ef-progress-bar.ok {
  background: linear-gradient(90deg, #43a047, #2e7d32);
}

.ef-progress-bar.warn {
  background: linear-gradient(90deg, #fbc02d, #f9a825);
}

.ef-progress-bar.bad {
  background: linear-gradient(90deg, #ef5350, #d32f2f);
}

.ef-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #777;
}

.ef-coverage {
  font-size: 16px;
  color: #333;
  text-align: center;
  margin: 10px 0 4px;
}

/* ——— Сводка ——— */

.ef-summary {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 6px;
  font-size: 15px;
}

.ef-summary td {
  padding: 8px 6px;
  border-bottom: 1px solid #e4e4e4;
  color: #444;
}

.ef-summary td:last-child {
  text-align: right;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.ef-summary tr:last-child td {
  border-bottom: none;
}

.ef-summary .ef-highlight td {
  background: #f0f0f0;
  font-weight: 600;
}

.ef-summary .ef-surplus-row td:last-child {
  color: #2e7d32;
}

.ef-summary .ef-deficit-row td:last-child {
  color: #d32f2f;
}

/* ——— Срок накопления ——— */

.ef-plan {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
  background: #eef5fb;
  border: 1px solid #d7e6f2;
}

.ef-plan.surplus {
  background: #e9f5ea;
  border-color: #c6e3c8;
}

.ef-plan p {
  margin: 6px 0;
}

.ef-plan strong {
  color: #0077cc;
}

.ef-plan.surplus strong {
  color: #2e7d32;
}

.ef-note {
  margin-top: 14px;
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

.calculator-description {
  max-width: 800px;
  margin: 50px auto;
  padding: 30px;
  background-color: #f2f6fa;
  border-top: 4px solid #0077cc;
  border-radius: 6px;
  line-height: 1.6;
  font-size: 16px;
}

.calculator-description h2,
.calculator-description h3 {
  color: #0077cc;
  margin-top: 20px;
}

.calculator-description code {
  background: #e3ecf4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 15px;
}
