/* Package finder: one question per screen, big buttons, then a recommendation. */

body { min-height: 100vh; min-height: 100svh; }
.finder { -webkit-touch-callout: none; }
.finder {
  min-height: 100vh; min-height: 100svh; max-width: 620px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; }
.dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.dots li { width: 26px; height: 4px; border-radius: 4px; background: rgba(245, 245, 247, .16); transition: background .3s var(--ease); }
.dots li.is-done { background: var(--brass); }
.dots li.is-now { background: var(--snow); }

.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0 12px; }
.step { animation: in .35s var(--ease) both; }
@keyframes in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step__count { color: #b4b4b9; font-size: .875rem; }
.step h1 { margin-top: 8px; font-size: clamp(2.1rem, 9vw, 3.25rem); }
.options { margin-top: 26px; display: grid; gap: 12px; }
.option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; min-height: 76px;
  padding: 17px 20px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(28, 28, 30, .72); color: var(--snow); text-align: left; cursor: pointer; touch-action: manipulation;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.option:hover { border-color: rgba(245, 245, 247, .4); background: rgba(44, 44, 46, .8); }
.option:active { transform: scale(.985); }
.option b { font: 700 1.25rem/1.15 var(--display); letter-spacing: -0.01em; }
.option span { color: #b4b4b9; font-size: .9375rem; line-height: 1.3; }
.option.is-picked { background: var(--snow); border-color: var(--snow); color: #1d1d1f; }
.option.is-picked span { color: #55555a; }

/* the result */
.result__tag { color: var(--brass); font: 500 .875rem/1 var(--text); }
.result h1 { margin-top: 10px; font-size: clamp(2rem, 8.4vw, 3rem); font-weight: 700; }
.result__line { margin-top: 10px; color: var(--snow-2); font-size: 1.125rem; line-height: 1.4; }
.result__price { margin-top: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result__price b { font: 700 3rem/1 var(--display); letter-spacing: -0.03em; }
.result__price span { color: var(--snow-2); font-size: .9375rem; }
.result__why { margin-top: 18px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(28, 28, 30, .6); }
.result__why h2 { font: 500 .8125rem/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--snow-2); }
.result__why p { margin-top: 8px; font-size: 1rem; line-height: 1.45; }
.result__why p.you { color: var(--snow-2); font-size: .9375rem; }
/* the result's two buttons, pinned to the bottom of the screen */
.gobar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: #0e0e0f; border-top: 1px solid rgba(245, 245, 247, .2);
  box-shadow: 0 -14px 24px -8px rgba(0, 0, 0, .7);
}
.gobar[hidden] { display: none; }
.gobar .btn { min-height: 52px; padding: 0 10px; font-weight: 600; }
.gobar .btn--ghost { font-weight: 500; }
.finder.is-result { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.finder.is-result .stage { justify-content: flex-start; padding-top: 22px; }
.result__more { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--snow-2); font-size: .9375rem; line-height: 1.45; }
.result__more b { color: var(--snow); font-weight: 500; }
.result__more a { color: var(--snow); text-underline-offset: 3px; white-space: nowrap; }
.result__more ul { list-style: none; margin: 8px 0 0; padding: 0; }
.result__more li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: var(--snow); }
.result__more li span { color: var(--snow-2); font-variant-numeric: tabular-nums; }
.result__more p + p { margin-top: 8px; }

.foot { display: flex; justify-content: space-between; min-height: 44px; }
.foot .linkish { min-height: 44px; font-size: 1rem; color: #c4c4c9; }
.foot [hidden] { display: none; }
.nojs a { color: var(--brass); }

/* wide enough for three side by side: a phone on its side, tablets, desktop */
@media (min-width: 640px) {
  .options--three { grid-template-columns: repeat(3, 1fr); }
  .foot { order: 3; }
  .gobar { order: 2; position: static; margin: 4px 0 14px; padding: 0; background: none; border: 0; box-shadow: none; }
  .finder.is-result { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .finder.is-result .stage { flex: 0 0 auto; }   /* buttons sit right under the result, not at the page bottom */
}
@media (min-width: 800px) {
  .finder { padding-top: 28px; }
  .options--three .option { min-height: 124px; justify-content: flex-start; padding-top: 22px; }
  .finder { max-width: 760px; }
}
/* short screens: iPhone SE, or Safari with both bars showing */
@media (max-height: 640px) {
  .stage { justify-content: flex-start; padding-top: 14px; }
  .step h1 { font-size: 1.875rem; }
  .option { min-height: 64px; padding: 11px 16px; }
  .options { margin-top: 14px; gap: 8px; }
}
@media (max-height: 420px) {
  .step h1 { font-size: 1.5rem; margin-top: 2px; }
  .options--three .option { min-height: 84px; padding-top: 14px; }
  .stage { padding-bottom: 4px; }
}
