/*
 * HomeownerRateCheck — стиль воронки. Линия «Porch & Slate» (вариант A,
 * решение владельца 21.10): тёплый, дружелюбный «порог дома» — сланцево-
 * графитовый основной цвет, терракота (глина) как единственный акцент,
 * кремовые поверхности, мягкие скругления 12–14px, варианты ответа — ряды с
 * отметкой. Заголовки — Fraunces (мягкий серифа), текст — Inter.
 *
 * Не повторяет ни эталон (зелёный #16a34a, system-ui, скругления Tailwind),
 * ни CarCoverageRates (песочная бумага, чернильный синий + янтарь, Roboto Slab),
 * ни VehicleCoverageRates (холодная бирюза, Barlow Condensed). Префикс
 * классов — `hr-`.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* поверхности — тёплый крем, не белый и не песок */
  --hr-bg: #f6f1e9;
  --hr-bg-deep: #ece4d7;
  --hr-surface: #fffdf9;
  --hr-surface-alt: #f8f3ea;

  /* сланец — основной цвет текста, шапки, аватаров */
  --hr-slate: #2b3440;
  --hr-slate-deep: #1e252e;
  --hr-slate-soft: #5a6675;

  /* терракота — акцент: прогресс, выбранный вариант, кнопка */
  --hr-clay: #c2532b;
  --hr-clay-deep: #9e4020;
  --hr-clay-wash: #f8e4da;
  --hr-clay-tint: #fff8f4;

  --hr-line: #e2d8ca;
  --hr-line-strong: #c9bba5;
  --hr-text: #23282e;
  --hr-muted: #7a7266;
  --hr-error: #9b2f22;
  --hr-error-bg: #f6e3de;

  --hr-radius: 14px;
  --hr-radius-sm: 10px;
  --hr-shadow-card: 0 1px 0 rgba(43, 52, 64, 0.04), 0 14px 32px -18px rgba(43, 52, 64, 0.35);

  --hr-font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hr-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.hr-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hr-bg);
  background-image: linear-gradient(180deg, var(--hr-bg-deep) 0, var(--hr-bg) 220px);
  color: var(--hr-text);
  font-family: var(--hr-font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hr-app *,
.hr-app *::before,
.hr-app *::after {
  box-sizing: border-box;
}

/* ---------- Topbar ---------- */

.hr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--hr-surface);
  border-bottom: 1px solid var(--hr-line);
}

.hr-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--hr-slate);
  text-decoration: none;
}

.hr-brand__mark {
  width: 24px;
  height: 24px;
  flex: none;
}

.hr-topbar__pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hr-slate-soft);
  background: #eef0f3;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

/* ---------- Main / progress ---------- */

.hr-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 48px;
}

.hr-progress {
  width: 100%;
  max-width: 560px;
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.hr-progress__seg {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #e4ddd2;
  transition: background-color 0.25s ease;
}

.hr-progress__seg.is-on {
  background: var(--hr-clay);
}

/* ---------- Card ---------- */

.hr-card {
  width: 100%;
  max-width: 560px;
  background: var(--hr-surface);
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-radius);
  padding: 24px 20px 20px;
  box-shadow: var(--hr-shadow-card);
}

.hr-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hr-clay);
}

.hr-title {
  margin: 0 0 6px;
  font-family: var(--hr-font-head);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--hr-slate);
}

.hr-subtitle {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--hr-muted);
}

.hr-body {
  margin-top: 16px;
}

/* ---------- Options (radio) ---------- */

.hr-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hr-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: 1.5px solid var(--hr-line);
  border-radius: 12px;
  background: #fff;
  color: var(--hr-text);
  font-family: var(--hr-font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.hr-option:hover {
  border-color: var(--hr-line-strong);
  background: var(--hr-surface-alt);
}

.hr-option:active {
  transform: translateY(1px);
}

.hr-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--hr-clay-wash);
  border-color: var(--hr-clay);
}

.hr-option.is-active {
  border-color: var(--hr-clay);
  background: var(--hr-clay-tint);
  box-shadow: 0 0 0 3px var(--hr-clay-wash);
}

.hr-option__mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--hr-clay-wash);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease;
}

.hr-option.is-active .hr-option__mark {
  background: var(--hr-clay);
}

.hr-option__label {
  flex: 1;
}

/* длинный список (страховщики) — компактнее и в две колонки на широком экране */
.hr-options--dense .hr-option {
  padding: 11px 12px;
  font-size: 14px;
}

.hr-options--dense .hr-option__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

@media (min-width: 480px) {
  .hr-options--dense {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ---------- Inputs ---------- */

.hr-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hr-slate-soft);
}

.hr-input,
.hr-select {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--hr-line);
  border-radius: var(--hr-radius-sm);
  background: #fff;
  color: var(--hr-text);
  font-family: var(--hr-font-body);
  font-size: 16px;
  line-height: 1.3;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.hr-input::placeholder {
  color: #b2a999;
}

.hr-input:focus,
.hr-select:focus {
  border-color: var(--hr-clay);
  box-shadow: 0 0 0 3px var(--hr-clay-wash);
}

.hr-input--center {
  text-align: center;
}

.hr-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235a6675' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.hr-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hr-row {
  display: flex;
  gap: 12px;
}

.hr-row__grow {
  flex: 1;
  min-width: 0;
}

.hr-row__zip {
  width: 128px;
  flex: none;
}

.hr-dob {
  display: flex;
  gap: 12px;
}

.hr-dob__field {
  flex: 1;
}

.hr-dob__field--year {
  flex: 1.4;
}

/* ---------- Buttons / nav ---------- */

.hr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 20px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-family: var(--hr-font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.hr-btn:active {
  transform: translateY(1px);
}

.hr-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.hr-btn--primary {
  background: var(--hr-clay);
  color: #fff;
}

.hr-btn--primary:hover:not(:disabled) {
  background: var(--hr-clay-deep);
}

.hr-btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--hr-clay-wash);
}

.hr-btn--ghost {
  background: transparent;
  color: var(--hr-slate-soft);
  border-color: transparent;
  padding-left: 8px;
  padding-right: 12px;
}

.hr-btn--ghost:hover:not(:disabled) {
  color: var(--hr-slate);
  background: var(--hr-surface-alt);
}

.hr-btn--block {
  display: flex;
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
}

.hr-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.hr-nav__count {
  font-size: 13px;
  color: var(--hr-muted);
}

.hr-error {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: var(--hr-radius-sm);
  background: var(--hr-error-bg);
  color: var(--hr-error);
  font-size: 14px;
  font-weight: 500;
}

.hr-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--hr-muted);
  text-align: center;
}

/* ---------- Phone / consent ---------- */

.hr-final-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hr-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--hr-text);
  cursor: pointer;
}

.hr-consent-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--hr-clay);
  flex: none;
}

.hr-consent {
  padding: 12px 14px;
  border-radius: var(--hr-radius-sm);
  background: var(--hr-surface-alt);
  border: 1px solid var(--hr-line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--hr-muted);
}

.hr-consent p {
  margin: 0;
}

.hr-consent a {
  color: var(--hr-clay-deep);
}

/* ---------- Final (spinner) ---------- */

.hr-final {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px 0 8px;
  color: var(--hr-muted);
  text-align: center;
}

.hr-final__ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--hr-clay-wash);
  border-top-color: var(--hr-clay);
  animation: hr-spin 0.9s linear infinite;
}

@keyframes hr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Footer ---------- */

.hr-footer {
  background: var(--hr-slate);
  color: #c9d1dc;
}

.hr-footer__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 30px;
}

.hr-footer__brand {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.hr-footer__disclaimer {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.6;
}

.hr-footer__disclaimer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hr-footer__copy {
  margin: 0;
  font-size: 12px;
  color: #98a3b1;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
  .hr-topbar {
    padding: 12px 14px;
  }
  .hr-topbar__pill {
    display: none;
  }
  .hr-main {
    padding: 14px 12px 36px;
  }
  .hr-card {
    padding: 20px 16px 16px;
  }
  .hr-title {
    font-size: 23px;
  }
  .hr-row {
    flex-direction: column;
  }
  .hr-row__zip {
    width: 100%;
  }
}
