* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef2f7;
  color: #1f2937;
}

.page {
  min-height: 100vh;
  padding: 24px;
}

.container {
  max-width: 1050px;
  margin: 0 auto;
}

.header {
  margin-bottom: 20px;
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 34px;
}

.subtitle {
  margin: 0;
  color: #556070;
  font-size: 16px;
}

.layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  outline: none;
  transition: 0.2s;
}

input:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

small {
  margin-top: 6px;
  color: #64748b;
  line-height: 1.35;
}

.buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e2e8f0;
  color: #1f2937;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.error {
  min-height: 24px;
  margin-top: 14px;
  color: #b91c1c;
  font-weight: 700;
}

.results-empty,
.visual-empty,
.summary-empty {
  color: #64748b;
}

.result-section {
  margin-bottom: 22px;
}

.result-section:last-child {
  margin-bottom: 0;
}

.result-section h3 {
  margin: 0 0 12px 0;
  font-size: 17px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.highlight-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}

.highlight-title {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.highlight-value {
  font-size: 22px;
  font-weight: 700;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  color: #475569;
  font-weight: 700;
}

.result-value {
  text-align: right;
}

.note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  line-height: 1.45;
  font-size: 14px;
}

/* Профиль */
.profile-wrap {
  width: 100%;
  overflow-x: auto;
}

.profile-svg {
  width: 100%;
  min-height: 280px;
  display: block;
  background: linear-gradient(to bottom, #f8fbff, #ffffff);
  border: 1px solid #dbeafe;
  border-radius: 14px;
}

.profile-caption {
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

/* Сводка */
.summary-box {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  font-family: "Courier New", monospace;
}

.summary-title {
  color: #93c5fd;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.summary-line {
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.summary-line:last-child {
  border-bottom: none;
}

.summary-strong {
  color: #f8fafc;
  font-weight: 700;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .form-grid,
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .result-row {
    flex-direction: column;
  }

  .result-value {
    text-align: left;
  }

  .header h1 {
    font-size: 28px;
  }
}