/* The "explore" pages: the quiz, the listings page and the quiz results.
   Same language as the home screen: a photo under a dark scrim, big tight white type, small-caps labels,
   hairlines and pill buttons. style.css has the tokens and shared pieces (header, .hbtn buttons, cursors). */

:root {
  --wrap: 1240px;
}

button.hbtn {
  font-family: inherit;
  cursor: var(--cursor-pointer);
}

/* ======================================================================================
   Photo band: the dark header strip on the listings page and the results page
   ====================================================================================== */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0c0f14;
  color: white;
  padding: 132px 0 56px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.3);
}

.band-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-repeat: no-repeat;
}

.band-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.88) 0%, rgba(8, 10, 14, 0.66) 46%, rgba(8, 10, 14, 0.24) 100%),
    linear-gradient(to top, rgba(8, 10, 14, 0.55) 0%, rgba(8, 10, 14, 0) 60%),
    linear-gradient(to bottom, rgba(8, 10, 14, 0.5) 0%, rgba(8, 10, 14, 0) 26%),
    rgba(8, 10, 14, 0.12);
}

.band-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

.kicker {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.band-title {
  margin: 0 0 16px;
  max-width: 14ch;
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: white;
}

.band-sub {
  max-width: 480px;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
}

.band-search {
  display: block;
  width: 100%;
  max-width: 560px;
  height: 56px;
  margin-top: 30px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font: inherit;
  font-size: 17px;
  text-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.18s ease, border-color 0.18s ease;
  cursor: text;
}

.band-search::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.band-search:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.18);
  border-color: white;
}

.band-search::-webkit-search-cancel-button {
  filter: invert(1);
}

.page-credit {
  position: absolute;
  right: 40px;
  bottom: 14px;
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  text-align: right;
  text-shadow: none;
  transition: opacity 0.3s ease;
}

/* Quiz only: the credit fades out and back in as JS swaps it in step with the photo. */
.page-credit.is-changing {
  opacity: 0;
}

.page-credit a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 2px;
}

.page-credit a:hover {
  color: white;
}

/* results page: your answers as quiet chips under the title */
.band-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 26px 0 0;
  max-width: 860px;
}

.band-chips li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: white;
  text-shadow: none;
}

.band-chips .chip-must {
  background: white;
  border-color: white;
  color: var(--navy);
  font-weight: 600;
}

.band-chips .chip-priority {
  border-color: rgba(255, 255, 255, 0.7);
}

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.band-actions .hbtn {
  text-shadow: none;
}

/* ======================================================================================
   Filter toolbar (listings page)
   ====================================================================================== */
.toolbar {
  background: white;
  border-bottom: 1px solid var(--border);
}

.toolbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 22px;
}

.tool {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.tool > span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tool > span b {
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.tool select,
.tool input[type="number"] {
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease;
}

.tool select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236a6f7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.tool select:hover,
.tool input[type="number"]:hover {
  border-color: #c9c9c4;
}

.tool select:focus,
.tool input[type="number"]:focus {
  outline: none;
  border-color: var(--navy);
}

.tool-pair {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-pair input {
  width: 96px;
}

.tool-pair i {
  color: var(--text-muted);
  font-style: normal;
}

.tool-range input[type="range"] {
  width: 170px;
  height: 42px;
  margin: 0;
  accent-color: var(--navy);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover span {
  border-color: #c9c9c4;
}

.chip input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.toolbar-reset {
  align-self: center;
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toolbar-reset:hover {
  color: var(--text);
}

.toolbar-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  background: white;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: var(--cursor-pointer);
}

.toolbar-toggle svg {
  transition: transform 0.2s ease;
}

.toolbar.is-open .toolbar-toggle svg {
  transform: rotate(180deg);
}

/* ======================================================================================
   Results area and listing cards
   ====================================================================================== */
.explore {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 36px 40px 88px;
}

.results-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--text-muted);
}

.results-line strong {
  font-size: 15px;
  color: var(--text);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 30px 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 52px 0 22px;
}

.section-head:first-child {
  margin-top: 0;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.section-head span {
  font-size: 14px;
  color: var(--text-muted);
}

.section-note {
  margin: -8px 0 22px;
  font-size: 14px;
  color: var(--text-muted);
}

.listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(18, 22, 29, 0.08);
  border-radius: 18px;
  overflow: hidden;
  cursor: var(--cursor-pointer);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18, 22, 29, 0.16);
  box-shadow: 0 20px 44px rgba(18, 22, 29, 0.1);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e9e8e4;
  overflow: hidden;
}

.card-media img,
.card-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.listing-card:hover .card-media img,
.listing-card:hover .card-placeholder {
  transform: scale(1.035);
}

.card-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 22, 29, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-match {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.card-match i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa0aa;
}

.card-match.tier-great i {
  background: #1f9d62;
}

.card-match.tier-good i {
  background: #3b82d6;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px 22px;
}

.card-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-dist {
  white-space: nowrap;
}

.listing-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* the title link is stretched over the whole card, so the card opens our detail page */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible::after {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
  border-radius: 18px;
}

.card-price {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.card-price strong {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.card-price-none {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
}

.card-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 8px 0 0;
}

.card-tags li {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0f0ec;
  font-size: 12px;
  font-weight: 500;
}

.card-tags .is-warn {
  background: #fff3d6;
  color: #7a5a00;
}

.card-reasons {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.4;
}

.card-reasons li {
  position: relative;
  padding-left: 18px;
}

.card-reasons li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.reason-good::before {
  content: "\2713";
  color: #1f9d62;
}

.reason-warn::before {
  content: "!";
  left: 5px !important;
  color: #b45309;
}

.reason-info::before {
  content: "\00b7";
  left: 6px !important;
  color: var(--text-muted);
}

.card-ext {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s ease;
}

.card-ext:hover {
  color: var(--orange-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ruled-out {
  margin-top: 56px;
  padding: 0;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.ruled-out summary {
  padding: 22px 0;
  font-weight: 600;
  list-style: none;
}

.ruled-out summary::-webkit-details-marker {
  display: none;
}

.ruled-out summary::after {
  content: "+";
  margin-left: 10px;
  color: var(--text-muted);
}

.ruled-out[open] summary::after {
  content: "–";
}

.ruled-out ul {
  list-style: none;
  padding: 0 0 8px;
  margin: 0;
  columns: 2;
  column-gap: 40px;
}

.ruled-out li {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  padding: 7px 0;
}

.ruled-out li a {
  font-weight: 600;
}

.ruled-out li span {
  font-size: 13px;
  color: var(--text-muted);
}

/* ======================================================================================
   The quiz: a full-screen photo, one big question at a time
   ====================================================================================== */
/* let the quiz stage fill whatever space is left above the footer, so no light strip shows between them */
body.is-quiz main {
  display: flex;
  flex-direction: column;
}

.quiz-stage {
  flex: 1 0 auto;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 66px);
  min-height: calc(100svh - 66px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 72px;
  background: #0c0f14;
  color: white;
}

.quiz-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Slides crossfade in on top of each other, like the home page: the old one stays fully visible
   underneath until the new one has finished fading in, so a step change never dips to black. */
.quiz-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.quiz-bg-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.quiz-bg-slide.is-prev {
  opacity: 1;
  z-index: 1;
}

.quiz-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.92) 0%, rgba(8, 10, 14, 0.78) 52%, rgba(8, 10, 14, 0.5) 100%),
    rgba(8, 10, 14, 0.22);
}

.quiz-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

.quiz {
  max-width: 780px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* thin progress line across the very top of the screen */
.quiz-progress {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.quiz.js .quiz-progress {
  display: block;
}

.quiz-progress-bar {
  height: 100%;
  width: 0;
  background: white;
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.quiz-count {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.quiz-step {
  border: 0;
  padding: 0;
  margin: 0 0 72px;
  min-width: 0;
}

.quiz.js .quiz-step {
  display: none;
  margin: 0;
}

.quiz.js .quiz-step.is-active {
  display: block;
  animation: quiz-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes quiz-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.quiz-step legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 16px;
  font-size: clamp(32px, 5.4vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: white;
}

.quiz-hint {
  max-width: 540px;
  margin: 0 0 34px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.quiz-sub {
  margin: 44px 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

/* budget: one huge number, underlined */
.budget-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 30px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.budget-prefix {
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.budget-row input {
  width: 4.4ch;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: inherit;
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
  cursor: text;
}

.budget-row input::-webkit-outer-spin-button,
.budget-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.budget-suffix {
  margin-left: 6px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

#budget-slider {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 0 22px;
  accent-color: white;
}

.stretch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
}

.stretch input {
  width: 20px;
  height: 20px;
  accent-color: white;
}

/* choices: outlined pills that fill white when picked (the light versions in style.css still serve the sublet form) */
.quiz .pills {
  gap: 12px;
}

.quiz .pill span {
  padding: 14px 26px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.quiz .pill-wide span {
  min-width: min(100%, 500px);
  padding: 17px 24px;
  border-radius: 18px;
}

.quiz .pill:hover span {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.8);
}

.quiz .pill input:checked + span {
  background: white;
  border-color: white;
  color: var(--navy);
  text-shadow: none;
}

.quiz .pill span small {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.quiz .pill input:checked + span small {
  color: rgba(18, 22, 29, 0.62);
}

.quiz .pill input:focus-visible + span {
  outline: 2px solid white;
  outline-offset: 3px;
}

/* must-have / nice-to-have table */
.feature-table {
  width: 100%;
  max-width: 660px;
  border-collapse: collapse;
}

.feature-table th,
.feature-table td {
  padding: 17px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.feature-table thead th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.feature-table tbody th {
  text-align: left;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: white;
}

.radio-cell {
  display: block;
}

.radio-cell input {
  width: 22px;
  height: 22px;
  accent-color: white;
}

/* head-to-head trade-offs */
.compare-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 8px 0 36px;
}

.compare-choice {
  padding: 24px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  font-size: clamp(18px, 2.3vw, 26px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: white;
}

.compare-vs {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.compare-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 660px;
}

.scale-dot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.scale-dot input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.scale-dot .dot {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

/* dots grow toward the ends: the further out, the stronger the preference */
.scale-dot:nth-child(1) .dot,
.scale-dot:nth-child(5) .dot {
  width: 40px;
  height: 40px;
}

.scale-dot:nth-child(3) .dot {
  width: 24px;
  height: 24px;
}

.scale-dot .cap {
  font-size: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.scale-dot:hover .dot {
  border-color: white;
}

.scale-dot input:checked ~ .dot {
  background: white;
  border-color: white;
  transform: scale(1.06);
}

.scale-dot input:checked ~ .cap {
  font-weight: 700;
  color: white;
}

.scale-dot input:focus-visible ~ .dot {
  outline: 2px solid white;
  outline-offset: 3px;
}

.compare-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 660px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.quiz-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 46px;
  text-shadow: none;
}

.quiz-nav .hbtn {
  justify-content: center;
  min-width: 124px;
}

.quiz:not(.js) #quiz-back,
.quiz:not(.js) #quiz-next {
  display: none;
}

.quiz-skip {
  margin: 34px 0 0;
  font-size: 14px;
}

.quiz-skip a {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.quiz-skip a:hover {
  color: white;
  border-color: white;
}

.quiz-stage .page-credit {
  right: 40px;
}

/* ======================================================================================
   Listings & results page, dark edition. This used to be scoped to body.is-browse only; now the
   whole site is dark by default (style.css's tokens), so these apply everywhere that shares these
   components — which also fixes the results page's cards, which used to stay light under its dark
   band.
   ====================================================================================== */
/* the photo darkens and melts into the page at the bottom, so the band has no hard edge */
.band {
  padding-bottom: 72px;
}

.band-bg::after {
  background:
    linear-gradient(to top, #0c0f14 0%, rgba(12, 15, 20, 0) 55%),
    linear-gradient(90deg, rgba(8, 10, 14, 0.94) 0%, rgba(8, 10, 14, 0.82) 50%, rgba(8, 10, 14, 0.5) 100%),
    linear-gradient(to bottom, rgba(8, 10, 14, 0.6) 0%, rgba(8, 10, 14, 0) 30%),
    rgba(8, 10, 14, 0.25);
}

.band-title {
  max-width: 12ch;
  font-size: clamp(44px, 8vw, 104px);
  letter-spacing: -0.05em;
}

.band-sub {
  color: rgba(255, 255, 255, 0.78);
}

.band-search {
  height: 60px;
  max-width: 620px;
  padding-left: 58px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E")
      no-repeat 24px center,
    rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.band-search:focus {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.9' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E")
      no-repeat 24px center,
    rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

/* toolbar: same page colour, a hairline above, dark pills */
.toolbar,
.toolbar-toggle {
  background: #0c0f14;
}

.toolbar {
  border-top: 1px solid var(--border);
}

.toolbar.js .toolbar-inner {
  border-top-color: var(--border);
}

.tool select,
.tool input[type="number"] {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.tool select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239aa0ab' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}

.tool select option {
  background: #161a21;
  color: var(--text);
}

.tool input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.tool select:hover,
.tool input[type="number"]:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.tool select:focus,
.tool input[type="number"]:focus {
  border-color: rgba(255, 255, 255, 0.7);
}

.tool-range input[type="range"] {
  accent-color: var(--orange);
}

.chip span {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
}

.chip:hover span {
  border-color: rgba(255, 255, 255, 0.4);
}

.chip input:checked + span {
  background: white;
  border-color: white;
  color: var(--navy);
}

.chip input:focus-visible + span {
  outline-color: white;
}

.toolbar-reset:hover {
  color: white;
}

/* results */
.explore {
  padding-top: 40px;
}

.results-line {
  padding-bottom: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.results-line strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.results-line .text-link {
  text-decoration: none;
  font-weight: 500;
}

.results-line .text-link:hover {
  color: white;
}

.listing-card {
  background: #141820;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 20px;
}

.listing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55);
}

.card-media {
  background: #1b2029;
}

/* the placeholder tiles are light stone, so tone them down to sit on the dark page */
.card-placeholder {
  filter: brightness(0.3) saturate(0.8) contrast(1.15);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 24, 32, 0.9) 0%, rgba(20, 24, 32, 0) 45%);
}

.card-flag {
  z-index: 1;
  background: var(--orange);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card-body {
  padding: 8px 24px 24px;
  margin-top: -8px;
  position: relative;
}

.card-price strong {
  color: white;
  font-size: 24px;
}

.card-price-none {
  color: var(--text-muted) !important;
}

.card-tags li {
  background: rgba(255, 255, 255, 0.08);
  color: #dfe2e7;
}

.card-tags .is-warn {
  background: rgba(229, 114, 0, 0.2);
  color: #ffb066;
}

.card-ext {
  color: rgba(255, 255, 255, 0.85);
}

.card-ext:hover {
  color: var(--orange-dark);
}

.empty-state {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.16);
}

.error-banner {
  background: rgba(179, 38, 30, 0.22);
  color: #ffb4ab;
}

/* ======================================================================================
   Sign up / log in: a full-screen photo with one narrow form, same look as the quiz
   ====================================================================================== */
body.is-auth main {
  display: flex;
  flex-direction: column;
}

.auth-stage {
  flex: 1 0 auto;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 66px);
  min-height: calc(100svh - 66px);
  display: flex;
  align-items: center;
  padding: 120px 0 72px;
  background: #0c0f14;
  color: white;
}

.auth-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-repeat: no-repeat;
}

.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.94) 0%, rgba(8, 10, 14, 0.8) 55%, rgba(8, 10, 14, 0.5) 100%),
    rgba(8, 10, 14, 0.25);
}

.auth-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

.auth-panel {
  max-width: 440px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 24px rgba(0, 0, 0, 0.25);
}

.auth-title {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.auth-sub {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.auth-panel .error-banner {
  margin: 0 0 22px;
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field > span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.auth-field input {
  height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font: inherit;
  font-size: 17px;
  text-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease;
  cursor: text;
}

.auth-field input:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.14);
}

.auth-field small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.auth-form .hbtn {
  justify-content: center;
  margin-top: 4px;
  border: 0;
  cursor: var(--cursor-pointer);
}

.auth-switch {
  margin: 22px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-switch a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ======================================================================================
   Small screens
   ====================================================================================== */
@media (max-width: 720px) {
  .band {
    padding: 100px 0 40px;
  }
  .band-inner,
  .quiz-wrap,
  .auth-wrap,
  .explore,
  .toolbar-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .band-sub {
    font-size: 16px;
  }
  .page-credit {
    position: static;
    padding: 18px 20px 0;
    text-align: left;
  }
  .quiz-stage .page-credit {
    padding-top: 40px;
  }
  .toolbar-inner {
    gap: 14px 16px;
  }
  /* with JS, the toolbar folds away behind the "Filters" button until it's opened */
  .toolbar.js .toolbar-toggle {
    display: flex;
  }
  .toolbar.js .toolbar-inner {
    display: none;
    border-top: 1px solid var(--border);
  }
  .toolbar.js.is-open .toolbar-inner {
    display: flex;
  }
  .tool-range input[type="range"] {
    width: 140px;
  }
  .toolbar-reset {
    margin-left: 0;
  }
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .ruled-out ul {
    columns: 1;
  }
  .quiz-stage {
    padding: 96px 0 48px;
  }
  .auth-stage {
    padding: 96px 0 48px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
  }
  .auth-stage .page-credit {
    padding-top: 36px;
  }
  .quiz-bg::after {
    background:
      linear-gradient(to top, rgba(8, 10, 14, 0.88) 0%, rgba(8, 10, 14, 0.7) 60%, rgba(8, 10, 14, 0.55) 100%);
  }
  .compare-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .compare-vs {
    text-align: center;
  }
  .compare-ends {
    flex-direction: column;
    gap: 2px;
  }
  .quiz-nav .hbtn {
    flex: 1;
    min-width: 0;
  }
  .quiz .pill-wide span {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listing-card,
  .card-media img,
  .card-placeholder,
  .quiz-progress-bar,
  .quiz-bg-slide,
  .page-credit {
    transition: none;
  }
  .listing-card:hover {
    transform: none;
  }
  .quiz.js .quiz-step.is-active {
    animation: none;
  }
}
