/* Suite matcher + shortlist (/<slug>/match/). Uses the site's tokens (src/styles.css). */
.m-top { background: var(--wash); border-bottom: 1px solid var(--line); padding-block: 40px 32px; }
.m-top .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--muted); }
.m-top h1 { margin-top: 12px; font-size: clamp(30px, 4.4vw, 46px); }
.m-top .lede { font-size: 18px; color: var(--ink-2); max-width: 40em; margin: 14px 0 0; }
.m-form { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 28px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.m-form .seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; }
.m-form .seg button, .m-form .seg button + button { border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 13px; }
.m-form .seg button[aria-pressed="true"] { border-color: var(--ink); }
.m-form select { font: 500 15px/1 var(--body); color: var(--ink); padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); }
.q-sel { display: none; }
.m-more { margin: 22px 0 0; text-align: center; }
.m-more .btn { cursor: pointer; }
.m-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; min-height: 38px; align-items: center; }
.m-checks label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.m-checks input { width: 17px; height: 17px; accent-color: var(--ink); }

.m-results { padding-top: 36px; }
.m-head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.m-head .price-note { margin: 6px 0 0; }
.m-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.m-top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 26px; align-items: start; }
.m-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); min-width: 0; }
.m-card.first { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.m-rank { position: absolute; z-index: 2; top: -11px; left: 14px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line-2); font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 8px; border-radius: 2px; }
.m-card.first .m-rank { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--wash); border-radius: 5px 5px 0 0; overflow: hidden; }
.m-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.m-plan { position: absolute; right: 10px; bottom: 10px; width: 38%; background: #fff; border-radius: 4px; padding: 5px; box-shadow: 0 2px 8px rgba(12, 22, 38, 0.25); }
.m-media.plan-only .m-plan { position: static; display: block; width: 70%; margin: 6% auto 0; box-shadow: none; background: transparent; }
.m-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.m-body h3 { font-size: 19px; line-height: 1.2; }
.m-body h3 a { text-decoration: none; }
.m-body h3 a:hover { text-decoration: underline; }
.m-room { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.m-where { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.m-price { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); }
.m-price b { font: 700 26px/1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.m-price small { font-size: 14px; color: var(--muted); }
.m-facts { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.m-why, .m-give { margin-top: 14px; }
.m-why h4, .m-give h4 { margin: 0 0 4px; font: 500 11px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.m-why h4 { color: var(--ok); }
.m-give h4 { color: var(--warn); }
.m-why ul, .m-give ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.m-why li + li, .m-give li + li { margin-top: 3px; }
.m-give ul { color: var(--ink-2); }
.m-cta { display: grid; gap: 8px; margin-top: auto; padding-top: 18px; }
.m-cta .btn { white-space: normal; text-align: center; line-height: 1.2; }
.m-add { cursor: pointer; font: 600 15px/1.2 var(--body); }
.m-add[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.m-body .not-bk { max-width: none; }

#m-rest h3 { margin-top: 36px; font-size: 19px; }
.m-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 16px; }
.tile .m-body { padding: 13px 14px 14px; }
.tile .m-body h3 { font-size: 17px; }
.tile .m-room { font-size: 14px; }
.tile .m-price { margin-top: 10px; }
.tile .m-price b { font-size: 22px; }
.tile .m-facts { font-size: 13px; }
.tile .m-cta { padding-top: 14px; }
.tile .m-cta .btn { padding: 11px 12px; font-size: 14px; }
.tile .not-bk { font-size: 12px; }
.m-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.m-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.m-list .what { min-width: 0; display: grid; gap: 2px; }
.m-list .what a { text-decoration: none; }
.m-list .what small { font-size: 14px; color: var(--muted); }
.m-list .what .mono { color: var(--plan); font-size: 12px; }
.m-list .m-add { padding: 9px 12px; font-size: 14px; flex: none; }
.m-empty { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 22px; border: 1px solid var(--line-2); border-radius: 6px; }
.m-empty p { margin: 0; flex-basis: 100%; }
.m-empty .btn { cursor: pointer; white-space: normal; }

.wrap:has(> .m-shortlist) { display: flex; flex-direction: column; }
.m-shortlist { margin-top: 56px; padding-top: 36px; border-top: 2px solid var(--ink); scroll-margin-top: 16px; }
.m-shortlist.shared { order: -1; margin-top: 32px; padding-top: 0; border-top: 0; padding-bottom: 36px; border-bottom: 2px solid var(--ink); }
#s-grid { margin-top: 20px; max-width: calc(var(--n, 3) * 340px); }
.s-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.s-label { font: 500 11px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.s-vals { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; font-size: 15px; line-height: 1.35; }
.s-vals > div { min-width: 0; overflow-wrap: anywhere; }
.s-vals .best { font-weight: 600; color: var(--ok); }
.s-vals small { color: var(--muted); font-size: 12px; }
.s-heads img, .s-heads .s-plan { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: var(--wash); margin-bottom: 8px; }
.s-heads b { display: block; font: 700 16px/1.2 var(--display); }
.s-heads b a { text-decoration: none; }
.s-heads small { display: block; margin-top: 3px; font-size: 13px; }
.s-remove { margin-top: 6px; padding: 0; border: 0; background: none; font: 500 13px/1 var(--body); color: var(--muted); text-decoration: underline; cursor: pointer; }
.s-buy { border-bottom: 0; }
.s-buy .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding-inline: 10px; }
.s-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 18px; }
.s-actions .btn { cursor: pointer; }
#s-said { color: var(--ok); }
.m-foot { margin: 48px 0 110px; font-size: 14px; color: var(--muted); max-width: 60em; }
.s-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; background: var(--paper); border-top: 1px solid var(--line-2); box-shadow: 0 -4px 14px rgba(12, 22, 38, 0.08); font-weight: 600; }
.s-bar[hidden] { display: none; }
.s-bar .btn { padding: 10px 16px; }

@media (max-width: 900px) {
  .m-top3 { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}
@media (max-width: 640px) {
  /* Phones: the questions are a compact two-column block of selects, so the first pick is on the second screen. */
  .m-top { padding-block: 20px 18px; }
  .m-top h1 { margin-top: 8px; font-size: 27px; }
  .m-top .lede { font-size: 15px; line-height: 1.45; margin-top: 8px; }
  .m-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 14px; margin-top: 16px; }
  .m-form .field { min-width: 0; }
  .m-form .seg { display: none; }
  .m-form .q-sel { display: block; }
  .m-form select { width: 100%; min-width: 0; font-size: 15px; padding: 10px 8px; }
  .m-form .f-must { grid-column: 1 / -1; order: 6; }
  /* Rows: who + budget, kids (its options are long), matters most + area, must-haves. */
  .m-form .field:has(#q-budget) { order: 2; }
  .m-form .field:has(#q-kids) { order: 3; grid-column: 1 / -1; }
  .m-form .field:has(#q-first) { order: 4; }
  .m-form .field:has(#q-area) { order: 5; }
  .m-checks { min-height: 0; gap: 8px 18px; }
  .m-results { padding-top: 24px; }
  .m-top3 { margin-top: 20px; }
  .m-list li { flex-direction: column; align-items: stretch; gap: 10px; }
  .s-vals { gap: 10px; font-size: 14px; }
  .s-heads b { font-size: 14px; }
}

/* Map of the matches: the three picks as numbered yellow pins, the other matches as small ink dots. */
.m-map-block { margin-top: 30px; }
.m-map-block[hidden] { display: none; }
.m-map-block h3 { font-size: 19px; }
.m-map-block p { margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
#m-map { height: 400px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef1f4; z-index: 0; }
.m-pin { display: grid; place-items: center; box-sizing: border-box; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font: 600 12px/1 var(--mono); box-shadow: 0 1px 4px rgba(12, 22, 38, 0.4); }
.m-pin.small { width: 16px; height: 16px; }
.m-pin.top { width: 32px; height: 32px; background: var(--mark); color: var(--ink); border-color: var(--ink); font-size: 14px; }
.m-map-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.m-map-key span { display: inline-flex; align-items: center; gap: 7px; }
.m-map-key .m-pin.top { width: 20px; height: 20px; font-size: 11px; }
.m-map-key .m-pin.small { width: 13px; height: 13px; }
@media (max-width: 640px) { #m-map { height: 300px; } }
