/* onboarding.css - login screen + preference questionnaire (full-page overlays).
   Soft cards, line icons, segmented progress, custom sliders and a clear
   "how much does this matter?" picker. Tokens make it work on light and dark pages. */

/* ---------- page frame ---------- */
.overlay {
  background: var(--bg);
}
.overlay {
  isolation: isolate;
}
.ov-head {
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}
.ov-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  gap: 16px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(10, 47, 115, 0.12);
}
body.dark .ov-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ov-card.wide {
  width: min(600px, 100%);
}
.ov-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ov-sub {
  font-size: 15px;
  line-height: 1.5;
}

/* login: small icon tile instead of the big picture box */
.ov-icon,
.ob-icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef4fd;
  color: var(--brand);
}
.ov-icon .ic,
.ob-icon .ic {
  width: 24px;
  height: 24px;
}
body.dark .ov-icon,
body.dark .ob-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}
.ov-card input:not([type="range"]),
.ov-card select {
  font:
    500 15px Figtree,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.ov-card input:not([type="range"]):focus,
.ov-card select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.35);
}

/* ---------- questionnaire ---------- */
.ob-top {
  display: grid;
  gap: 10px;
}
.ob-top > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.ob-prog {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
}
.ob-prog i {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  transition: background 0.3s;
}
.ob-prog i.done {
  background: var(--brand);
}
.ob-prog i.on {
  background: var(--gold);
}

.ob-step {
  display: grid;
  gap: 18px;
}
.ob-step.fwd {
  animation: obIn 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ob-step.back {
  animation: obBack 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes obIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
}
@keyframes obBack {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
}
.ob-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ob-head .ov-sub {
  margin-top: 6px;
}

.ob-field {
  display: grid;
  gap: 8px;
}
.ob-lab {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.ob-field select {
  width: 100%;
}

/* slider: value pill on the right, filled track, labeled ends */
.ob-range-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
}
.ob-range output {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #eef4fd;
  color: var(--brand);
}
.ob-range output b {
  font:
    800 17px "Bricolage Grotesque",
    sans-serif;
}
.ob-range output small {
  font-size: 12px;
  color: var(--mute);
}
body.dark .ob-range output {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}
.ob-range input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 10px 0 2px;
  border-radius: 99px;
  cursor: pointer;
  background:
    linear-gradient(var(--brand), var(--brand)) 0 0 / var(--fill, 50%) 100% no-repeat,
    var(--line);
}
body.dark .ob-range input[type="range"] {
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / var(--fill, 50%) 100% no-repeat,
    var(--line);
}
.ob-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 2px 8px rgba(10, 47, 115, 0.3);
  transition: transform 0.15s;
}
.ob-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 2px 8px rgba(10, 47, 115, 0.3);
}
.ob-range input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.15);
}
body.dark .ob-range input[type="range"]::-webkit-slider-thumb {
  border-color: var(--gold);
}
body.dark .ob-range input[type="range"]::-moz-range-thumb {
  border-color: var(--gold);
}
.ob-range input[type="range"]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
.ob-ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mute);
}

/* option buttons (room size, gender) */
.ob-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ob-opts button {
  flex: 1 1 auto;
  min-width: 90px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font:
    600 14px Figtree,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.ob-opts button:hover {
  border-color: var(--brand);
}
.ob-opts button[aria-checked="true"] {
  border-color: var(--brand);
  background: #eef4fd;
  box-shadow: inset 0 0 0 1px var(--brand);
  color: var(--brand);
}
body.dark .ob-opts button[aria-checked="true"] {
  background: rgba(255, 200, 61, 0.1);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
  color: var(--gold);
}

/* "How much does this matter?" */
.ob-pris {
  display: grid;
  gap: 10px;
}
.ob-sect {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ob-pri {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.ob-pri-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.ob-pri-h b {
  font-size: 15px;
  color: var(--ink);
}
.ob-hint {
  font-size: 12.5px;
  color: var(--mute);
}
.ob-hint.m2 {
  color: var(--brand);
  font-weight: 600;
}
body.dark .ob-hint.m2 {
  color: var(--gold);
}
.ob-imp {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.ob-imp button {
  border: 0;
  background: none;
  border-radius: 9px;
  padding: 9px 6px;
  cursor: pointer;
  font:
    700 13px Figtree,
    system-ui,
    sans-serif;
  color: var(--mute);
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.ob-imp button:hover {
  color: var(--ink);
}
.ob-imp button[aria-checked="true"].m0 {
  background: var(--line);
  color: var(--ink);
}
.ob-imp button[aria-checked="true"].m1 {
  background: var(--gold);
  color: var(--goldink);
  box-shadow: 0 2px 8px rgba(184, 138, 0, 0.25);
}
.ob-imp button[aria-checked="true"].m2 {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(10, 71, 169, 0.3);
}
.ob-opts button:focus-visible,
.ob-imp button:focus-visible,
.ob-cancel:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* review step */
.ob-sum {
  display: grid;
  gap: 2px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.ob-sum-r {
  display: grid;
  grid-template-columns: 22px 70px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
}
.ob-sum-r + .ob-sum-r {
  border-top: 1px solid var(--line);
}
.ob-sum-r .ic {
  width: 18px;
  height: 18px;
  color: var(--brand);
}
body.dark .ob-sum-r .ic {
  color: var(--gold);
}
.ob-sum-r span {
  color: var(--mute);
}
.ob-sum-r b {
  color: var(--ink);
  font-weight: 700;
}
.ob-group {
  display: grid;
  gap: 8px;
}
.ob-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ob-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--mute);
}
.ob-tag.m1 {
  background: #fff6d6;
  border-color: #ffe39a;
  color: #8a6300;
}
.ob-tag.m2 {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
body.dark .ob-tag.m1 {
  background: rgba(255, 200, 61, 0.12);
  border-color: rgba(255, 200, 61, 0.35);
  color: var(--gold);
}

/* navigation */
.ob-nav {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.ob-nav .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
}
.ob-nav .ic {
  width: 18px;
  height: 18px;
}
.ob-next {
  padding: 13px 24px;
  font-weight: 800;
  margin-left: auto;
} /* stays right when Back is hidden */
.ob-next .ic {
  transition: transform 0.2s;
}
.ob-next:hover .ic {
  transform: translateX(3px);
}
.ob-back {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
body.dark .ob-back {
  color: #fff;
  border-color: var(--line);
}
.ob-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 99px;
  padding: 7px 14px;
  font:
    600 14px Figtree,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.ob-cancel .ic {
  width: 15px;
  height: 15px;
}
.ob-cancel:hover {
  border-color: var(--gold);
}

@media (max-width: 520px) {
  .ov-card {
    padding: 20px;
    border-radius: 20px;
  }
  .ob-head {
    gap: 12px;
  }
  .ob-icon {
    width: 42px;
    height: 42px;
  }
  .ov-card h1 {
    font-size: 22px;
  }
  .ob-imp button {
    font-size: 12px;
    padding: 9px 2px;
  }
}

/* ---------- steady frame: every step has the same card height ----------
   Steps have different amounts of content. With a card that grew and shrank, the centered card
   re-centered on every Continue and the buttons jumped. Now the card keeps one height (the tallest
   step on a laptop screen, or the screen height on small screens), only the step content scrolls,
   and Back / Continue stay exactly where they were. */
.ob-card {
  display: flex;
  flex-direction: column;
  height: min(720px, calc(100dvh - 150px));
  min-height: min(520px, calc(100dvh - 110px));
}
.ob-card > .ob-top,
.ob-card > .ob-nav {
  flex: none;
}
.ob-card > .ob-step {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  /* room for focus rings and the slide-in, without a sideways scrollbar */
  margin: -4px -6px;
  padding: 4px 6px;
  scrollbar-width: thin;
}
.ob-card > .ob-nav {
  margin-top: auto;
}
@media (max-width: 560px) {
  .ob-card {
    height: calc(100dvh - 120px);
    min-height: 0;
  }
}

/* ---------- sign up: "I'm here to" (student, landowner or both) ---------- */
.au-role {
  border: 0;
  margin: 0;
  padding: 0;
}
.au-role legend {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.au-role > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.au-role button {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.au-role button b {
  font-size: 13.5px;
}
.au-role button small {
  font-size: 11.5px;
  color: var(--mute);
}
.au-role button[aria-checked="true"] {
  border-color: var(--brand);
  background: #eef4fd;
  box-shadow: 0 0 0 3px rgba(10, 71, 169, 0.12);
}
.au-role button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
body.dark .au-role button[aria-checked="true"] {
  background: rgba(157, 183, 230, 0.12);
}
@media (max-width: 420px) {
  .au-role > div {
    grid-template-columns: 1fr;
  }
}
