/* ============================================================
   Rental Matcher — /find-my-rental
   A one-question-at-a-time game. Brand tokens come from site.css;
   nothing here redefines a colour site.css already owns.

   Two rules this file lives by:
     * The game board sits on the SLATE ground. Anything dropped inside
       .rm-board must assume white text on slate (same trap as .calc-out
       on the calculator pages).
     * Every tap target is >= 56px tall. The whole point of the page is that
       a thumb on a phone can finish it without zooming.
   ============================================================ */

.rm-stage { background: var(--ps-slate-deep); padding: 0 0 72px; }
.rm-stage .wrap { max-width: 820px; }

/* --- the board ----------------------------------------------------------- */
.rm-board {
  position: relative;
  background: var(--ps-slate);
  border: 1px solid rgba(193,180,151,.22);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 520px;
}

/* --- progress rail ------------------------------------------------------- */
.rm-rail { height: 8px; background: rgba(255,255,255,.10); position: relative; }
.rm-rail-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ps-sand-deep), var(--ps-sand-light));
  border-radius: 0 6px 6px 0;
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

.rm-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 16px 26px 0;
  font-family: 'Montserrat', sans-serif; font-size: 11.5px;
  letter-spacing: .22em; text-transform: uppercase; font-weight: 600;
  color: rgba(255,255,255,.55);
}
.rm-back {
  background: none; border: 0; cursor: pointer; padding: 6px 0;
  font: inherit; letter-spacing: .18em; color: rgba(255,255,255,.55);
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .2s;
}
.rm-back:hover { color: var(--ps-sand); }
.rm-back[hidden] { display: none; }
/* stays right even on Q1, where the Back button is hidden */
.rm-count { color: var(--ps-sand); margin-left: auto; }

/* --- question ------------------------------------------------------------ */
.rm-panel { padding: 20px 26px 30px; }
.rm-q {
  font-family: 'Abril Fatface', Georgia, serif;
  font-size: clamp(25px, 4.4vw, 36px);
  line-height: 1.14; color: var(--ps-white);
  margin: 10px 0 6px; text-transform: none; letter-spacing: 0;
}
.rm-help { color: rgba(255,255,255,.62); font-size: 15.5px; margin-bottom: 22px; }

/* --- option cards -------------------------------------------------------- */
.rm-opts { display: grid; gap: 11px; }
.rm-opts.cols-2 { grid-template-columns: 1fr 1fr; }

.rm-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 62px; text-align: left;
  padding: 13px 15px;
  background: var(--ps-cream);
  border: 2px solid transparent;
  border-bottom-width: 4px;
  border-bottom-color: rgba(28,36,38,.18);
  border-radius: 13px;
  color: var(--ps-slate);
  font-family: 'Source Sans 3', sans-serif; font-size: 17px;
  cursor: pointer;
  transition: transform .13s ease, border-color .16s, background .16s, box-shadow .16s;
}
.rm-opt:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.rm-opt:active { transform: translateY(1px); border-bottom-width: 2px; }
.rm-opt:focus-visible { outline: 3px solid var(--ps-sand); outline-offset: 3px; }

.rm-opt .ico {
  flex: 0 0 40px; height: 40px; display: grid; place-items: center;
  background: rgba(54,68,71,.08); border-radius: 10px; color: var(--ps-slate);
}
.rm-opt .ico svg { display: block; }
.rm-opt .txt { flex: 1 1 auto; min-width: 0; }
.rm-opt .lab {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.25;
  display: block;
}
.rm-opt .sub {
  display: block; font-size: 14px; line-height: 1.4; margin-top: 2px;
  color: var(--ps-gray);
}
.rm-opt .tick {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(28,36,38,.22);
  display: grid; place-items: center; color: transparent;
  transition: background .16s, border-color .16s, color .16s;
}

.rm-opt.on {
  background: var(--ps-sand);
  border-color: var(--ps-sand-deep);
  border-bottom-color: #8d8365;
}
.rm-opt.on .ico  { background: rgba(28,36,38,.14); }
.rm-opt.on .sub  { color: rgba(28,36,38,.72); }
.rm-opt.on .tick { background: var(--ps-slate-ink); border-color: var(--ps-slate-ink); color: var(--ps-sand); }

/* the little jolt when a card is chosen */
@keyframes rm-pop { 0% { transform: scale(1); } 45% { transform: scale(1.035); } 100% { transform: scale(1); } }
.rm-opt.pop { animation: rm-pop .26s ease; }

/* --- continue bar (multi-select only) ------------------------------------ */
.rm-foot { margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rm-skip {
  background: none; border: 0; cursor: pointer; font-family: 'Montserrat', sans-serif;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  color: rgba(255,255,255,.5); transition: color .2s;
}
.rm-skip:hover { color: var(--ps-sand); }
.rm-next[disabled] { opacity: .38; cursor: not-allowed; transform: none; }

/* --- floating +XP -------------------------------------------------------- */
.rm-xp {
  position: absolute; z-index: 5; pointer-events: none;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px;
  letter-spacing: .08em; color: var(--ps-sand-light);
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  animation: rm-float 850ms cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes rm-float {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.8); }
  18%  { opacity: 1; transform: translate(-50%, -10px) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(1); }
}

/* --- panel transitions --------------------------------------------------- */
@keyframes rm-in-fwd  { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes rm-in-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.rm-panel.in-fwd  { animation: rm-in-fwd .3s ease; }
.rm-panel.in-back { animation: rm-in-back .3s ease; }

/* ============================================================
   RESULT
   ============================================================ */
.rm-result { padding: 30px 26px 34px; }

.rm-badge {
  text-align: center; position: relative;
  padding: 26px 18px 28px; margin-bottom: 8px;
  background: radial-gradient(120% 130% at 50% 0%, rgba(193,180,151,.20), rgba(193,180,151,0) 70%);
  border-radius: 14px;
}
.rm-badge .eyebrow { color: var(--ps-sand); }
.rm-crest {
  width: 92px; height: 92px; margin: 6px auto 16px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--ps-sand); color: var(--ps-slate-ink);
  box-shadow: 0 0 0 8px rgba(193,180,151,.16), 0 16px 40px rgba(0,0,0,.34);
  animation: rm-crest .6s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes rm-crest { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.rm-title {
  font-family: 'Abril Fatface', Georgia, serif; text-transform: none; letter-spacing: 0;
  font-size: clamp(30px, 5.6vw, 46px); line-height: 1.08; color: var(--ps-white);
}
.rm-tagline { color: rgba(255,255,255,.78); font-size: 17px; margin-top: 12px; max-width: 46ch; margin-inline: auto; }

/* confetti — pure CSS, 14 chips, no library */
.rm-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 14px; }
.rm-confetti i {
  position: absolute; top: -14px; width: 7px; height: 12px; opacity: 0;
  animation: rm-fall 2.6s ease-in forwards;
}
@keyframes rm-fall {
  0%   { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(300px) rotate(540deg); }
}

/* --- answer pills -------------------------------------------------------- */
.rm-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 4px; }
.rm-pill {
  font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(193,180,151,.32);
  color: var(--ps-sand-light);
}

/* --- result blocks ------------------------------------------------------- */
.rm-sec { margin-top: 34px; }
.rm-sec > h3 {
  font-size: 13px; letter-spacing: .26em; color: var(--ps-sand);
  margin-bottom: 4px;
}
.rm-sec > .lede { color: rgba(255,255,255,.66); font-size: 15.5px; margin-bottom: 18px; }

.rm-areas { display: grid; gap: 12px; }
.rm-area {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(193,180,151,.22);
  border-left: 4px solid var(--ps-sand);
  border-radius: 12px; padding: 16px 18px;
}
.rm-area .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rm-area h4 { font-size: 15px; letter-spacing: .06em; color: var(--ps-white); }
.rm-area .city {
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ps-sand-deep);
}
.rm-area p { color: rgba(255,255,255,.80); font-size: 15.5px; margin-top: 7px; }

/* honest-flag block — the "I'll tell you not to do it" voice */
.rm-flags { display: grid; gap: 10px; }
.rm-flag {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(194,106,69,.13);
  border: 1px solid rgba(194,106,69,.42);
  border-radius: 12px; padding: 14px 16px;
  color: rgba(255,255,255,.90); font-size: 15.5px;
}
.rm-flag svg { flex: 0 0 20px; margin-top: 3px; color: #e08a62; }
.rm-flag strong { color: var(--ps-white); }

.rm-note {
  background: rgba(255,255,255,.05); border: 1px dashed rgba(193,180,151,.36);
  border-radius: 12px; padding: 16px 18px; font-size: 15.5px;
  color: rgba(255,255,255,.80);
}
.rm-note a { color: var(--ps-sand); text-decoration: underline; text-underline-offset: 3px; }
.rm-note a:hover { color: var(--ps-sand-light); }

/* --- capture form -------------------------------------------------------- */
.rm-capture {
  margin-top: 34px; background: var(--ps-cream); color: var(--ps-slate);
  border-radius: 14px; padding: 26px 24px 24px;
}
.rm-capture h3 {
  font-family: 'Abril Fatface', Georgia, serif; text-transform: none; letter-spacing: 0;
  font-size: 26px; line-height: 1.15;
}
.rm-capture .why { color: var(--ps-gray); font-size: 15.5px; margin: 8px 0 20px; }
.rm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rm-capture label {
  display: block; font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ps-slate); margin-bottom: 6px;
}
.rm-capture input, .rm-capture textarea {
  width: 100%; font-family: 'Source Sans 3', sans-serif; font-size: 16.5px;
  padding: 12px 14px; border: 1px solid var(--ps-line); border-radius: 9px;
  background: var(--ps-white); color: var(--ps-slate);
}
.rm-capture input:focus, .rm-capture textarea:focus {
  outline: none; border-color: var(--ps-sand-deep); box-shadow: 0 0 0 3px rgba(193,180,151,.3);
}
.rm-capture textarea { min-height: 84px; resize: vertical; }
.rm-field { margin-bottom: 14px; }
.rm-fine { font-size: 13.5px; color: var(--ps-gray); margin-top: 14px; line-height: 1.55; }
.rm-status { margin-top: 12px; font-weight: 600; font-size: 15.5px; min-height: 1.2em; }
.rm-status.ok  { color: #2f6b4f; }
.rm-status.err { color: #a8412a; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.rm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.rm-restart {
  background: none; border: 1px solid rgba(255,255,255,.42); color: var(--ps-white);
  border-radius: 999px; padding: 12px 24px; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; transition: background .2s, border-color .2s;
}
.rm-restart:hover { background: rgba(255,255,255,.12); border-color: var(--ps-white); }

/* --- intro / start card --------------------------------------------------- */
.rm-start { padding: 44px 30px 46px; text-align: center; }
.rm-start .rm-q { margin-top: 0; }
.rm-start .rm-help { max-width: 48ch; margin-inline: auto; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 28px; }
.rm-chip {
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.72);
  border: 1px solid rgba(193,180,151,.3); border-radius: 999px; padding: 7px 14px;
}
.rm-resume {
  margin-top: 16px; font-size: 14.5px; color: rgba(255,255,255,.62);
}
.rm-resume button {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--ps-sand); text-decoration: underline; text-underline-offset: 3px;
}

/* --- keyboard hint -------------------------------------------------------- */
.rm-kbd {
  margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.38);
  font-family: 'Montserrat', sans-serif; letter-spacing: .08em;
}
.rm-kbd b {
  display: inline-block; min-width: 19px; text-align: center;
  border: 1px solid rgba(255,255,255,.3); border-radius: 5px;
  padding: 1px 5px; margin: 0 2px; font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .rm-opts.cols-2 { grid-template-columns: 1fr; }
  .rm-panel, .rm-result { padding-left: 16px; padding-right: 16px; }
  .rm-meta { padding-left: 16px; padding-right: 16px; }
  .rm-capture { padding: 22px 17px; }
  .rm-grid2 { grid-template-columns: 1fr; }
  .rm-opt { font-size: 16px; }
  .rm-opt .sub { font-size: 13.5px; }
  .rm-kbd { display: none; }
  .rm-start { padding: 34px 18px 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .rm-panel.in-fwd, .rm-panel.in-back, .rm-opt.pop,
  .rm-crest, .rm-confetti i, .rm-xp { animation: none; }
  .rm-xp { display: none; }
  .rm-rail-fill { transition: none; }
  .rm-opt:hover { transform: none; }
}
