:root {
  --bg: #efefef;
  --drop-font-size: 1.15rem;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #4f5b63;
  --brand: #57c7bd;
  --brand-strong: #34b2a6;
  --line: #d8d8d8;
  --ui-border: #9eb2bf;
  --ui-border-soft: #c7d2da;
  --ui-soft: #f4f8fb;
  --ui-title: #213747;
  --control-radius: 4px;
  --control-border-width: 2px;
  --danger: #b42318;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PT Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.rhs-logo__light {
  display: block;
  width: 114px;
  height: 42px;
}

.hero-banner {
  height: 710px;
  background: url("https://pro.rhsolutions.ru/img/banners/index-installer-banner.webp") center center / cover no-r
epeat;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid #e2e2e2;
}

.hero-card {
  width: min(520px, calc(100% - 30px));
  margin: 0 0 48px 118px;
  background: rgba(255, 255, 255, 0.93);
  padding: 26px 24px 20px;
}

.hero-card h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 44px;
  line-height: 1.08;
}

.hero-card p {
  margin: 18px 0 22px;
  color: #4e5b64;
  font-size: 18px;
  line-height: 1.44;
}

.hero-cta {
  width: 100%;
  min-height: 64px;
  border: none;
  background: var(--brand);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  font-family: "PT Sans", sans-serif;
  text-align: left;
  padding: 0 18px;
  cursor: pointer;
}

.hero-cta:hover {
  background: var(--brand-strong);
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
  position: relative;
}

.panel-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 32px;
  padding-right: 140px;
}

.panel-subtitle {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 1.1rem;
  padding-right: 140px;
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.upload-brand {
  position: absolute;
  top: 20px;
  right: 20px;
  pointer-events: none;
}

.file-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-input {
  position: relative;
  flex: 1 1 340px;
}

.file-input span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  min-height: 64px;
  border-radius: var(--control-radius);
  background: var(--surface);
  border: 2px dashed var(--ui-border);
  color: var(--ui-title);
  font-weight: 700;
  font-size: var(--drop-font-size);
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.file-input.is-dragover span {
  border-color: var(--brand-strong);
  background: #f2fbfa;
  color: #0e534c;
}

.upload-form button {
  min-height: 48px;
  border-radius: var(--control-radius);
  border: none;
  background: var(--brand);
  color: white;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.upload-form button:hover {
  background: var(--brand-strong);
}

.panel-note {
  margin: 14px 2px 0;
  color: #738089;
  font-size: 0.95rem;
}

.status {
  margin: 8px 2px 0;
  color: #24526a;
  font-weight: 600;
}

.status.is-error {
  color: var(--danger);
}

.gauges {
  margin-top: 0;
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

.results-section {
  margin-top: 22px;
}

.results-header {
  display: grid;
  grid-template-columns: 38% 62%;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.results-header.is-hidden {
  display: none;
}

.results-header-left,
.results-header-right {
  min-height: 74px;
  background: var(--brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "PT Sans", sans-serif;
  font-weight: 700;
  font-size: var(--drop-font-size);
  border-right: 1px solid var(--line);
  text-align: center;
  padding: 10px 14px;
}

.results-header-right {
  border-right: none;
}

.gauge-card {
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-top: none;
  border-radius: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 380ms ease forwards;
  overflow: hidden;
}

.gauge-card:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.result-body {
  display: grid;
  grid-template-columns: 38% 14.5% 16% 11% 20.5%;
  align-items: stretch;
  min-height: 214px;
}

.result-body > div {
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.result-body > div:last-child {
  border-right: none;
}

.criterion-cell {
  padding: 22px 24px;
  background: var(--surface);
}

.criterion-name {
  margin: 0 0 8px;
  font-size: var(--drop-font-size);
  line-height: 1.15;
  color: #0e0e0e;
  font-weight: 700;
}

.criterion-description {
  margin: 0;
  color: #242424;
  line-height: 1.3;
  font-size: var(--drop-font-size);
}

.metric-cell {
  background: var(--ui-soft);
  display: grid;
  grid-template-rows: 76px minmax(88px, 1fr);
}

.metric-label,
.metric-value {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.metric-label {
  border-bottom: 1px solid var(--line);
  font-size: var(--drop-font-size);
  line-height: 1.15;
  color: #1d1d1d;
  min-height: 76px;
  font-family: "PT Sans", sans-serif;
  font-weight: 700;
}

.metric-value {
  font-size: var(--drop-font-size);
  font-weight: 700;
  color: #0e0e0e;
  min-height: 88px;
  font-family: "PT Sans", sans-serif;
}

.gauge-cell {
  background: var(--ui-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.gauge-svg {
  width: min(100%, 330px);
  height: auto;
  max-height: 182px;
  display: block;
  background: transparent;
}

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

@media (max-width: 820px) {
  .hero-banner {
    height: 440px;
    background-position: 70% center;
  }

  .hero-card {
    margin: 0 0 18px 14px;
    width: calc(100% - 28px);
    padding: 16px;
  }

  .hero-card h1 {
    font-size: 30px;
  }

  .hero-card p {
    font-size: 16px;
    margin: 12px 0 14px;
  }

  .hero-cta {
    min-height: 50px;
    font-size: 1.1rem;
  }

  .page {
    padding: 18px 12px 44px;
  }

  .upload-form {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-brand {
    position: static;
    margin-left: auto;
  }

  .panel {
    padding-right: 20px;
  }

  .panel-title,
  .panel-subtitle {
    padding-right: 0;
  }

  .upload-form button {
    width: 100%;
  }

  .gauges {
    grid-template-columns: 1fr;
  }

  .results-header {
    grid-template-columns: 1fr;
  }

  .results-header-left,
  .results-header-right {
    border-right: none;
    border-bottom: 1px solid var(--line);
    min-height: 70px;
    font-size: var(--drop-font-size);
  }

  .results-header-right {
    border-bottom: none;
  }

  .result-body {
    grid-template-columns: 1fr;
  }

  .result-body > div {
    border-right: none;
  }

  .criterion-cell {
    padding: 18px 16px;
  }

  .criterion-name {
    font-size: var(--drop-font-size);
  }

  .criterion-description {
    font-size: var(--drop-font-size);
  }

  .metric-label {
    font-size: var(--drop-font-size);
  }

  .metric-value {
    font-size: var(--drop-font-size);
  }
}
