.osago-page {
  scroll-padding-top: 120px;
}

@media (min-width: 769px) {
  .osago-page {
    scroll-padding-top: 96px;
  }
}

/* Клик по левому полю — прокрутка вверх; не заходит на футер (bottom задаёт JS) */
.osago-scroll-gutter {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: max(0px, calc((100vw - 1240px) / 2));
  z-index: 40;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.osago-scroll-gutter:focus-visible {
  outline: none;
}

.osago-page footer {
  position: relative;
  z-index: 50;
}

@media (min-width: 1280px) {
  .osago-scroll-gutter {
    display: block;
  }
}

/* Кнопка «На главную» — только вверху страницы, в обычном потоке */
.osago-top-bar {
  padding-top: 110px;
  padding-bottom: 14px;
}

.osago-top-bar .container {
  text-align: left;
}

@media (min-width: 769px) {
  .osago-top-bar {
    padding-top: 140px;
  }
}

.osago-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--accent-dark);
  border: 2px solid var(--accent-dark);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.osago-back:hover {
  background: #1e40af;
  border-color: #1e40af;
  transform: translateY(-1px);
  text-decoration: none;
}

.osago-hero {
  padding-top: 8px;
  padding-bottom: 32px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.osago-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin-bottom: 12px;
}

.osago-hero .subtitle {
  max-width: 560px;
  margin: 0 auto;
}

.osago-hero__tag {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.osago-hero--apply {
  padding-bottom: 28px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}

.section--calc .calc-card {
  max-width: 960px;
}

.calc-card__title {
  font-size: 1.25rem;
  color: var(--accent-dark);
  margin: 0 0 6px;
}

.calc-card__note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.45;
}

.calc-form--wizard {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calc-form:not(.calc-form--wizard) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: visible;
}

@media (min-width: 560px) {
  .calc-form:not(.calc-form--wizard) {
    grid-template-columns: 1fr 1fr;
  }

  .calc-form:not(.calc-form--wizard) .calc-field--full {
    grid-column: 1 / -1;
  }
}

.calc-field > label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.calc-field input:not([type="radio"]):not([type="checkbox"]),
.calc-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.95rem;
}

.calc-field input:not([type="radio"]):not([type="checkbox"]):disabled {
  background: var(--surface-muted);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.85;
}

.calc-vehicle-wrap {
  position: relative;
  overflow: visible;
}

.calc-field input:not([type="radio"]):not([type="checkbox"]):focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.calc-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.calc-submit {
  flex: 1 1 auto;
  min-width: 200px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.calc-submit:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.calc-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.calc-result {
  display: none;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.calc-result.is-visible {
  display: block;
}

.calc-result__price {
  text-align: center;
  margin-bottom: 18px;
}

.calc-result__label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.calc-result__amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.calc-result__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.calc-coefs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.calc-coefs th,
.calc-coefs td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.calc-coefs th {
  color: var(--accent-dark);
  font-weight: 600;
}

.calc-coefs th:last-child,
.calc-coefs td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.calc-coefs td:last-child {
  font-weight: 600;
}

.calc-coefs tbody tr:last-child td {
  border-bottom: none;
}

.calc-coefs .calc-coefs-total td {
  font-weight: 700;
  color: var(--accent-dark);
  border-top: 2px solid var(--accent-border);
  padding-top: 10px;
}

.calc-policy-pick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .calc-policy-pick {
    grid-template-columns: repeat(3, 1fr);
  }
}

.calc-policy-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-policy-btn:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}

.calc-policy-btn strong {
  font-size: 0.92rem;
  color: var(--accent-dark);
}

.calc-policy-btn span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.calc-policy-btn .calc-policy-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.calc-policy-btn--hit {
  border-color: var(--popular-border);
  background: var(--popular-bg);
}

.calc-policy-btn--hit strong {
  color: var(--accent-dark);
}

.osago-api-banner {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  margin-top: 16px;
  line-height: 1.4;
}

.osago-api-banner--error {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  text-align: left;
}

/* Страница ОСАГО: контент слева, заголовки секций по центру */
.osago-page .section--calc,
.osago-page .section--types {
  text-align: left;
}

.osago-page .section--calc .section-title,
.osago-page .section--calc .section-desc,
.osago-page .section--types .section-title,
.osago-page .section--types .section-desc {
  text-align: center;
}

.osago-page .section--calc .section-desc,
.osago-page .section--types .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.osago-page .calc-card {
  text-align: left;
}

.osago-page .price-block {
  text-align: left;
}

.osago-types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.osago-type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-align: left;
  max-width: none;
  width: 100%;
}

.osago-type-card.popular,
.osago-type-card.badge-hit {
  border-color: var(--popular-border);
}

.osago-type-card.badge-hit::before {
  top: 10px;
}

.osago-type-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--accent-dark);
}

.osago-type-card .plan-desc {
  flex-grow: 0;
  margin-bottom: 14px;
  text-align: left;
}

.osago-type-card .price-block {
  margin-bottom: 14px;
  text-align: left;
}

.osago-features {
  list-style: none;
  flex: 1 1 auto;
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
}

.osago-features li {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 6px 0;
  font-size: 0.94rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: left;
}

.osago-features li::before {
  content: "✔";
  color: var(--accent);
  flex-shrink: 0;
  margin: 2px 8px 0 0;
}

.osago-type-card .plan-cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.osago-type-card .types-plan-head {
  margin-bottom: 14px;
  text-align: left;
}

@media (min-width: 900px) {
  .osago-types-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .osago-type-card {
    height: 100%;
  }

  .osago-type-card .types-plan-head {
    min-height: 10.5rem;
  }
}
