/* 2026-11-13 homepage quiz card: headline+subline full width, then quiz card
   left and Buy/Sell form right at equal top and equal height (stacks on
   mobile, quiz first). Brand: navy #002349, cream #f6f1e8, gold #bd9042. */

#hero .bs-hero-inner.hero-split {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  grid-template-areas:
    "copy copy"
    "quiz form";
  gap: 1.15rem 3rem;
  align-items: stretch;
  text-align: left;
  padding-top: 2.1rem;
  padding-bottom: 2.1rem;
}
#hero .hero-split-copy { grid-area: copy; min-width: 0; }
#hero .quiz-tile--home { grid-area: quiz; }
#hero .hero-split-form {
  grid-area: form;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
#hero .hero-split-form .bs-card {
  flex: 1 1 auto;
  width: 100%;
}
#hero .hero-split-copy h1,
#hero .hero-split-copy .bs-lede {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}
/* Full-width headline can sit on one line on desktop so both cards stay
   above the fold at 1280x800 and 1440x900. */
#hero .hero-split-copy h1 {
  max-width: 15ch;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  margin-bottom: .45rem;
}
#hero .hero-split-copy .bs-lede { max-width: none; margin-bottom: 0; }

.quiz-tile, .quiz-tile * { box-sizing: border-box; }

.quiz-tile--home {
  position: relative;
  max-width: none;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.2rem 1.4rem;
  text-align: left;
  background: #f6f1e8;
  color: #002349;
  border: 1px solid rgb(189 144 66 / .55);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgb(0 10 28 / .42);
}
.quiz-tile--home::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  background: #bd9042;
  border-radius: 0 3px 3px 0;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0 0 .7rem;
}
.quiz-progress__label {
  font: 600 .7rem/1 "Open Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9a7330;
}
.quiz-progress__dots { display: flex; gap: 5px; align-items: center; }
.quiz-progress__dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgb(0 35 73 / .18);
}
.quiz-progress__dots span.is-on { background: #bd9042; width: 16px; border-radius: 4px; }

#hero .quiz-tile h2 {
  margin: 0 0 .35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: #002349;
  text-shadow: none;
}
#hero .quiz-tile p {
  margin: 0 0 .85rem;
  font: 400 .9rem/1.45 "Open Sans", "Segoe UI", system-ui, sans-serif;
  color: rgb(0 35 73 / .8);
}

.quiz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 .95rem;
}
.quiz-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1.5px solid rgb(0 35 73 / .2);
  border-radius: 999px;
  background: #fff;
  color: #002349;
  font: 500 .8rem/1.2 "Open Sans", "Segoe UI", system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.quiz-chip:hover,
.quiz-chip:focus-visible {
  border-color: #bd9042;
  background: #002349;
  color: #f6f1e8;
  outline: none;
}
.quiz-chip--wide { flex: 1 1 100%; }

.quiz-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 4px;
  background: #bd9042;
  color: #fff;
  font: 600 .88rem/1.2 "Open Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.quiz-cta:hover,
.quiz-cta:focus-visible {
  background: #a87c33;
  color: #fff;
  outline: 3px solid #bd9042;
  outline-offset: 3px;
}
.quiz-cta--block { display: flex; width: 100%; margin-top: 0; }

/* Sell tab: quiz card hides; center the form under the headline. */
#hero.bs-hero[data-mode="sell"] .bs-hero-inner.hero-split {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "form";
  justify-items: center;
  text-align: center;
}
#hero.bs-hero[data-mode="sell"] .hero-split-copy h1,
#hero.bs-hero[data-mode="sell"] .hero-split-copy .bs-lede {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
#hero.bs-hero[data-mode="sell"] .hero-split-copy h1 { max-width: 15ch; }
#hero.bs-hero[data-mode="sell"] .hero-split-form {
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

@media (max-width: 960px) {
  #hero .bs-hero-inner.hero-split,
  #hero.bs-hero[data-mode="sell"] .bs-hero-inner.hero-split {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "quiz"
      "form";
    max-width: 820px;
    gap: 1.1rem;
    text-align: center;
    justify-items: stretch;
  }
  #hero .hero-split-copy h1,
  #hero .hero-split-copy .bs-lede,
  #hero.bs-hero[data-mode="sell"] .hero-split-copy h1,
  #hero.bs-hero[data-mode="sell"] .hero-split-copy .bs-lede {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  #hero .hero-split-copy h1 { max-width: 20ch; }
  #hero.bs-hero[data-mode="sell"] .hero-split-copy h1 { max-width: 20ch; }
  .quiz-tile--home { margin: 0 auto; height: auto; }
  #hero .hero-split-form,
  #hero.bs-hero[data-mode="sell"] .hero-split-form {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  #hero .bs-hero-inner.hero-split { padding-top: 1.1rem; padding-bottom: 1.4rem; gap: .95rem; }
  #hero .hero-split-copy h1 { font-size: 1.6rem; }
  #hero .hero-split-copy .bs-lede { margin-bottom: 0; }
  .quiz-tile--home { padding: .95rem .9rem 1rem 1.1rem; border-radius: 14px; }
  #hero .quiz-tile h2 { font-size: 1.3rem; }
  #hero .quiz-tile p { font-size: .84rem; margin-bottom: .7rem; }
  .quiz-chips { gap: 6px; margin-bottom: .8rem; }
  .quiz-chip { min-height: 38px; padding: 0 11px; font-size: .77rem; }
  .quiz-cta { min-height: 48px; }
}
@media (max-width: 390px) {
  #hero .hero-split-copy h1 { font-size: 1.45rem; }
}
#hero .hero-split-copy .bs-lede span { text-wrap: pretty; }

/* Laptop short viewports: keep both cards above the fold at 1280x800. */
@media (min-width: 961px) and (max-height: 850px) {
  #hero .bs-hero-inner.hero-split {
    padding-top: .95rem;
    padding-bottom: .95rem;
    gap: .7rem 2.5rem;
  }
  #hero .hero-split-copy h1 { margin-bottom: .3rem; }
}


/* Size the form to the visible Buy or Sell panel only. The hidden panel
   used to keep its height, which stretched the quiz card and left a hole. */
#hero.bs-hero .bs-card > .bs-panel[hidden] {
  display: none !important;
}

/* Compact the homepage form so both cards can share one height without
   empty space in either. Desktop only; stacked layouts keep their own rhythm. */
@media (min-width: 961px) {
  #hero .bs-tab {
    min-height: 48px;
    font-size: 1rem;
    padding: .5rem .75rem;
    gap: .4rem;
  }
  #hero .bs-panel { padding: .6rem 1.15rem .65rem; }
  #hero .bs-panel-intro { margin-bottom: .3rem; }
  #hero .bs-panel-intro h2 { font-size: 1.42rem; margin-bottom: .1rem; }
  #hero .bs-panel-intro p { font-size: .86rem; }
  #hero .bs-card .field { margin-bottom: .3rem; }
  #hero .bs-card label { margin-bottom: .12rem; }
  #hero .bs-card input,
  #hero .bs-card select { min-height: 42px; }
  #hero .bs-card .bs-submit { min-height: 44px; margin-top: .05rem; }
  #hero .bs-card .form-footnote { margin: .22rem 0 0; }
  #hero .bs-card #home-buy-form .field-hint {
    margin: .12rem 0 0;
  }
  #hero .bs-grid { gap: 0 .75rem; }
  #hero .quiz-tile--home { padding-bottom: 1.45rem; }
}

/* When both cards sit side by side, stretch them to the same height only
   after their content heights are already close, so leftover space is a
   few pixels of padding rather than a hole between chips and the CTA. */
@media (min-width: 961px) {
  #hero.bs-hero[data-mode="buy"] .bs-hero-inner.hero-split {
    align-items: stretch;
  }
  #hero.bs-hero[data-mode="buy"] .quiz-tile--home,
  #hero.bs-hero[data-mode="buy"] .hero-split-form .bs-card {
    height: 100%;
  }
}
