:root {
  --navy: #0d223d;
  --navy-2: #142f51;
  --ink: #132238;
  --muted: #64748b;
  --line: #dce4ec;
  --soft: #f2f6fa;
  --white: #fff;
  --amber: #ffb547;
  --amber-dark: #d77a00;
  --teal: #18a58b;
  --shadow: 0 20px 50px rgba(12, 34, 61, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef3f7;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 34%) 1fr;
}

.visual {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(180deg, rgba(8, 26, 48, 0.38) 0%, rgba(8, 26, 48, 0.08) 32%, rgba(8, 26, 48, 0.18) 53%, rgba(8, 26, 48, 0.86) 78%, rgba(8, 26, 48, 0.96) 100%),
    url("assets/iceland-car.webp") center / cover;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-family: Manrope, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.browse-nav {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.18s ease;
}

.browse-nav:hover {
  border-color: var(--amber);
  background: rgba(13, 34, 61, 0.48);
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  display: block;
  flex: none;
  background-image: url("assets/finndu-bil-logo.png");
  background-size: 553% auto;
  background-position: 10% 45%;
  background-repeat: no-repeat;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.visual-copy {
  max-width: 410px;
  margin-top: auto;
  margin-bottom: clamp(28px, 7vh, 100px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Manrope, sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.visual h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
}

.visual-copy > p:last-child {
  max-width: 36ch;
  margin: 0;
  color: #d7e2ed;
  font-size: 1.05rem;
}

.credit {
  color: #aebfd0;
  font-size: 0.75rem;
}

.app {
  min-width: 0;
  padding: 36px clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
}

.panel {
  width: min(780px, 100%);
  margin: auto;
}

.topbar {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.step-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.progress {
  width: 190px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4ed;
}

.progress span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber));
  transition: width 0.35s ease;
}

.card {
  padding: clamp(25px, 4vw, 46px);
  border: 1px solid rgba(194, 208, 221, 0.75);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.question {
  animation: rise 0.3s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.question h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.hint {
  margin: 0 0 27px;
  color: var(--muted);
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  position: relative;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  transition: 0.18s ease;
}

.option:hover {
  border-color: #9bafc1;
  transform: translateY(-1px);
}

.option.selected {
  border-color: var(--amber-dark);
  background: #fff8eb;
  box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.18);
}

.check {
  width: 23px;
  height: 23px;
  flex: none;
  border: 2px solid #c8d4df;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0.75rem;
}

.selected .check {
  border-color: var(--amber-dark);
  background: var(--amber-dark);
  color: white;
}

.range-wrap {
  padding: 8px 0 12px;
}

.range-value {
  margin-bottom: 20px;
  color: var(--navy);
  font-family: Manrope, sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber-dark);
}

.range-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.actions {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  min-height: 49px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.18s ease;
}

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

.primary {
  margin-left: auto;
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 20px rgba(13, 34, 61, 0.2);
}

.primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.secondary {
  background: transparent;
  color: var(--muted);
}

.trust {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.results {
  display: none;
  width: min(900px, 100%);
  margin: auto;
  animation: rise 0.4s ease both;
}

.results-head {
  margin-bottom: 25px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.results h2 {
  margin: 0 0 7px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.results-head p {
  margin: 0;
  color: var(--muted);
}

.reset {
  flex: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.result-list {
  display: grid;
  gap: 16px;
}

.result-card {
  position: relative;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: white;
  box-shadow: 0 12px 34px rgba(12, 34, 61, 0.08);
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 22px;
}

.result-card.with-photo { grid-template-columns: 164px minmax(0, 1fr) auto; }
.result-side { display: grid; justify-items: center; position: relative; }
.result-picture { width: 100%; height: 102px; position: relative; overflow: hidden; border-radius: 14px; background: var(--soft); }
.result-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-picture .rank { position: absolute; top: 7px; left: 7px; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); font-size: 1rem; }
.result-credit { margin-top: 5px; color: var(--muted); font-size: 0.75rem; line-height: 1.35; text-align: center; }
.result-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.rank {
  width: 73px;
  height: 73px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--navy);
  font-family: Manrope, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
}

.result-card:first-child {
  border-color: #e4a642;
  box-shadow: 0 15px 42px rgba(178, 112, 6, 0.14);
}

.result-card:first-child .rank {
  background: #fff3d8;
  color: #9d5b00;
}

.car-name {
  margin: 0 0 5px;
  font-size: 1.25rem;
}

.car-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.88rem;
}

.reason {
  margin: 0;
  color: #31445b;
  font-size: 0.92rem;
}

.result-links {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
}

.result-link {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(11, 111, 97, 0.3);
  color: #0b6f61;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.dealer-link {
  border-color: rgba(13, 34, 61, 0.26);
  color: var(--navy);
}

.result-link:hover {
  border-color: currentColor;
  color: #075347;
}

.result-link span {
  transition: transform 0.18s ease;
}

.result-link:hover span {
  transform: translate(2px, -2px);
}

.score {
  min-width: 92px;
  text-align: right;
}

.score strong {
  display: block;
  color: var(--teal);
  font-family: Manrope, sans-serif;
  font-size: 1.65rem;
}

.score span {
  color: var(--muted);
  font-size: 0.75rem;
}

.disclaimer {
  margin: 20px 5px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 850px) {
  .shell {
    display: block;
  }

  .visual {
    position: relative;
    height: 260px;
    padding: 22px;
    background-position: center 60%;
  }

  .visual-copy {
    margin-top: auto;
    margin-bottom: 0;
  }

  .visual h1 {
    margin-bottom: 8px;
    font-size: 2rem;
  }

  .visual-copy > p:last-child,
  .credit,
  .eyebrow {
    display: none;
  }

  .app {
    padding: 24px 16px 42px;
  }

  .panel {
    margin: 0 auto;
  }

  .card {
    padding: 25px 20px;
    border-radius: 21px;
  }
}

@media (max-width: 600px) {
  .visual {
    height: 210px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .progress {
    width: 120px;
  }

  .result-card {
    grid-template-columns: 58px 1fr;
    padding: 18px;
    gap: 14px;
  }

  .result-card.with-photo { grid-template-columns: 92px minmax(0, 1fr); }
  .result-picture { height: 76px; }
  .result-picture .rank { width: 30px; height: 30px; font-size: 0.85rem; }

  .rank {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    font-size: 1.15rem;
  }

  .score {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    gap: 5px;
    text-align: left;
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reset {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
