:root {
  --orange: #ff4000;
  --orange-dark: #d93600;
  --orange-soft: #fff1eb;
  --navy: #030f26;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #d5d9e0;
  --bg: #f5f6f6;
  --card: #ffffff;
  --error: #c62828;
  --radius: 12px;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); }
button, input, select { font: inherit; color: inherit; }

/* Header */
.site-header {
  background: #fff;
  padding: 18px 16px;
  display: flex;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(3, 15, 38, 0.06);
}
.site-header img { display: block; height: 44px; width: auto; }

/* Main column */
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 16px 64px; }

/* Progress */
.progress { max-width: 550px; margin: 0 auto 36px; text-align: center; }
.progress-track { height: 8px; border: 1px solid #9aa1ad; border-radius: 99px; overflow: hidden; background: #fff; }
.progress-fill { height: 100%; width: 0; background: var(--orange); border-radius: 99px; transition: width 0.35s ease; }
.progress-label { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Step */
.step { animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h1 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--navy);
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.15;
  text-align: center;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.step .sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 520px; }
.step .sub:empty { display: none; }
.form-col { max-width: 420px; margin: 0 auto; }
.form-col.wide { max-width: 640px; }

/* Fields */
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.input, .select {
  width: 100%;
  height: 62px;
  padding: 0 18px;
  font-size: 19px;
  background: #fff;
  border: 1px solid #8d94a0;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23030f26' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.input:focus, .select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(3, 15, 38, 0.12); }
.input.invalid, .select.invalid { border-color: var(--error); }
.error { color: var(--error); font-size: 15px; margin-top: 6px; min-height: 0; }
.error:empty { display: none; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row-3 { display: grid; gap: 12px; grid-template-columns: 1.3fr 1fr 1.2fr; }
.row-city { display: grid; gap: 12px; grid-template-columns: 2fr 1fr; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 64px; padding: 0 24px;
  border: 0; border-radius: 99px;
  background: var(--orange); color: #fff;
  font-size: 19px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, transform 0.05s;
  text-decoration: none;
}
.btn:hover { background: var(--orange-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { background: #e3e4e6; color: #6b7280; cursor: not-allowed; transform: none; }
.btn-primary-wrap { margin-top: 36px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 20px;
  background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 6px 2px;
}
.back:hover { color: var(--navy); }
.back-wrap { max-width: 640px; margin: 0 auto; }
.text-link { background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: 15px; padding: 0; }

/* Option tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin: 0 auto; }
.tiles.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.single { grid-template-columns: 1fr; max-width: 420px; }
.tile {
  min-height: 62px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: 18px; font-weight: 700; color: var(--navy);
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  overflow-wrap: anywhere;
}
.tile:hover { border-color: var(--orange); box-shadow: 0 2px 10px rgba(255, 64, 0, 0.12); }
.tile.selected { border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange); }
.tile small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.more { max-width: 420px; margin: 20px auto 0; }
.filter { margin: 0 auto 16px; max-width: 640px; }
.loading { text-align: center; color: var(--muted); padding: 32px 0; }
.spinner { width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Consent */
.consent { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 18px; }
.consent a { color: var(--muted); }

/* Results */
.results-summary {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 auto 28px; max-width: 640px; color: var(--muted); font-size: 15px;
}
.results-summary strong { color: var(--navy); }
.offers { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.offers-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.offer {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.offer-logo { height: 56px; border-radius: 8px; background: #eef0f3; }
.offer-lines span { display: block; height: 12px; border-radius: 6px; background: #eef0f3; margin: 6px 0; }
.offer-lines span:first-child { width: 70%; height: 16px; }
.offer-lines span:nth-child(2) { width: 90%; }
.offer-lines span:nth-child(3) { width: 55%; }
.offer .btn { width: auto; height: 46px; font-size: 16px; padding: 0 20px; }
.offers-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }
.restart { display: block; margin: 28px auto 0; }

/* Trust strip + footer */
.site-footer { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px 28px; color: var(--muted); font-size: 14px; }
.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  border-top: 1px solid var(--line); padding: 24px 0 18px; font-size: 15px;
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { flex: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-links a { color: #1a56b5; }
.disclaimer { text-align: center; font-size: 12.5px; line-height: 1.6; margin: 16px auto 0; max-width: 640px; }

/* Content pages (privacy, terms, contact) */
.page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 5vw, 48px); }
.page h1 { font-family: var(--serif); font-weight: 400; color: var(--navy); font-size: clamp(30px, 5vw, 40px); line-height: 1.2; margin: 0 0 6px; }
.page h2 { font-size: 20px; color: var(--navy); margin: 32px 0 8px; }
.page .updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.page p, .page li { color: var(--ink); }
.page ul { padding-left: 22px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-top: 24px; }
  .site-header img { height: 38px; }
  .tiles.cols-3, .tiles.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .row-3 > :last-child { grid-column: 1 / -1; }
  .offer { grid-template-columns: 56px 1fr; }
  .offer-logo { height: 44px; }
  .offer .btn { grid-column: 1 / -1; width: 100%; }
}
