:root {
  --bg: #efefef;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #4f5b63;
  --brand: #57c7bd;
  --brand-strong: #34b2a6;
  --line: #d8d8d8;
  --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;
}

.site-header {
  background: #f3f3f3;
  border-bottom: 1px solid #e6e6e6;
}

.site-header-inner {
  max-width: 1280px;
  min-height: 56px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #222;
  text-decoration: none;
  margin-right: 6px;
}

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

.role-switch {
  display: inline-flex;
  border: 1px solid #7ecfc7;
}

.role-tab {
  min-width: 112px;
  height: 38px;
  border: none;
  border-right: 1px solid #7ecfc7;
  background: #f3f3f3;
  color: #33958b;
  font-size: 16px;
  font-family: "PT Sans", sans-serif;
  cursor: pointer;
}

.role-tab:last-child {
  border-right: none;
}

.role-tab.is-active {
  background: var(--brand);
  color: #ffffff;
}

.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-nav a {
  color: #111;
  text-decoration: none;
  font-size: 16px;
}

.login-link {
  margin-left: 14px;
  color: #e80045;
  text-decoration: none;
  font-size: 18px;
}

.hero-banner {
  height: 710px;
  background: url("https://pro.rhsolutions.ru/img/banners/index-installer-banner.webp") center center / cover no-repeat;
  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);
}

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

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

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

.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: 4px;
  background: #ffffff;
  border: 2px dashed #9eb2bf;
  color: #213747;
  font-weight: 700;
  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: 4px;
  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: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.gauge-card {
  background: var(--surface);
  border-radius: 8px;
  padding: 18px 18px 16px;
  border: 1px solid #d4dde4;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.06);
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  height: 100%;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 380ms ease forwards;
}

.criterion-name {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.criterion-description {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.4;
  min-height: calc(1.4em * 3);
  max-height: calc(1.4em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gauge-wrap {
  align-self: start;
}

.gauge-svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f8fbfd;
}

.criterion-meta {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #3f5665;
  border-top: 1px solid #e3ebf0;
  padding-top: 10px;
}

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

@media (max-width: 820px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .top-nav {
    width: 100%;
    margin-left: 0;
    gap: 14px;
    flex-wrap: wrap;
  }

  .login-link {
    margin-left: 0;
  }

  .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-form button {
    width: 100%;
  }

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