/* Neighborhood Match: homepage quiz section (loaded on / only). */
.nm { position: relative; background: var(--bg-deep); color: #fff; overflow: hidden; isolation: isolate; }
.nm-bg { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(100deg, rgba(10, 37, 64, 0.97) 0%, rgba(10, 37, 64, 0.88) 45%, rgba(10, 37, 64, 0.72) 100%),
  url("/images/hero-drone-poster.jpg") center / cover no-repeat; }
.nm-wrap { max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.nm-eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.1rem; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: #e3c46f; }
.nm-eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: #e3c46f; }
.nm-title { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 7vw, 5.6rem); line-height: 0.92; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0 0 1.2rem; color: #fff; }
.nm-title em { font-style: normal; color: #e3c46f; }
.nm-lead { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.65; color: rgba(255, 255, 255, 0.82); max-width: 34rem; margin: 0 0 1.6rem; }
.nm-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; max-width: 34rem; }
.nm-points li { display: flex; gap: 0.85rem; align-items: flex-start; color: rgba(255, 255, 255, 0.9); line-height: 1.45; }
.nm-points b { flex: 0 0 auto; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: rgba(227, 196, 111, 0.16); color: #e3c46f; font-size: 0.9rem; font-weight: 700; }
.nm-points strong { color: #fff; font-weight: 600; }

/* The quiz card */
.nm-card { scroll-margin-top: 90px; background: #fff; color: var(--ink); border-radius: 18px; padding: clamp(1.4rem, 3.5vw, 2.2rem); min-height: 31rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); position: relative; }
.nm-card::before { content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 4px; border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--accent), #e3c46f); }
.nm-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 1.6rem; }
.nm-count { margin: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.nm-back, .nm-redo { background: none; border: 0; padding: 0.25rem 0; font: inherit; font-size: 0.88rem; color: var(--accent); cursor: pointer; }
.nm-back:hover, .nm-redo:hover { color: var(--accent-deep); text-decoration: underline; }
.nm-back[hidden] { display: none; }
.nm-progress { height: 6px; background: #e6ebf1; border-radius: 99px; margin: 0.7rem 0 1.5rem; overflow: hidden; }
.nm-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #e3c46f); border-radius: 99px; transition: width 0.35s var(--ease); }
.nm-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.nm-q { font-family: var(--display); font-size: clamp(2rem, 4.2vw, 2.8rem); line-height: 1; text-transform: uppercase; color: var(--bg-deep);
  padding: 0; margin: 0 0 0.5rem; outline: none; }
.nm-hint { color: var(--ink-soft); margin: 0 0 1rem; font-size: 0.95rem; }
.nm-opts { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.nm-opts-2 { grid-template-columns: 1fr 1fr; }
.nm-opt { position: relative; cursor: pointer; display: block; }
.nm-opt input { position: absolute; opacity: 0; pointer-events: none; }
.nm-opt span { display: flex; align-items: center; gap: 0.85rem; min-height: 3.6rem; padding: 0.7rem 1rem; border: 1.5px solid #d7dee8; border-radius: 12px;
  background: #fff; line-height: 1.3; font-weight: 500; transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s; }
.nm-ico { font-size: 1.55rem; line-height: 1; flex: 0 0 auto; }
.nm-opt i { font-style: normal; }
.nm-opt:hover span { border-color: var(--accent-light); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 37, 64, 0.08); }
.nm-opt input:checked + span { border-color: var(--accent); background: #eef6fb; box-shadow: inset 0 0 0 1px var(--accent); }
.nm-opt input:focus-visible + span { outline: 3px solid rgba(31, 111, 156, 0.4); outline-offset: 2px; }

/* Scanning */
.nm-scan { min-height: 24rem; display: grid; place-content: center; justify-items: center; gap: 1.6rem; text-align: center; }
.nm-scan p { margin: 0; font-weight: 500; color: var(--ink-soft); }
.nm-pulse { position: relative; width: 5rem; height: 5rem; }
.nm-pulse span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: nm-ping 1.6s ease-out infinite; }
.nm-pulse span:nth-child(2) { animation-delay: 0.5s; }
.nm-pulse span:nth-child(3) { animation-delay: 1s; }
.nm-pulse::after { content: ""; position: absolute; inset: 1.7rem; border-radius: 50%; background: var(--accent); }
@keyframes nm-ping { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(1.15); opacity: 0; } }

/* Results */
.nm-res { display: grid; gap: 0.9rem; animation: nm-in 0.45s var(--ease); }
@keyframes nm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nm-kicker { margin: 0.2rem 0 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); outline: none; }
.nm-m { border: 1.5px solid #dbe3ec; border-radius: 14px; padding: 1.1rem 1.2rem; background: #fff; }
.nm-m-top { border-color: var(--accent); background: linear-gradient(180deg, #f3f9fd, #fff); box-shadow: 0 10px 28px rgba(31, 111, 156, 0.14); }
.nm-m-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nm-rank { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg-deep); color: #e3c46f;
  font-family: var(--display); font-size: 1.25rem; line-height: 1; padding-top: 0.1rem; }
.nm-m-name { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1; text-transform: uppercase; color: var(--bg-deep); flex: 1 1 auto; }
.nm-pct { font-size: 0.8rem; font-weight: 700; color: #1c7a4d; background: #e4f5ec; padding: 0.3rem 0.65rem; border-radius: 99px; white-space: nowrap; }
.nm-bar { height: 5px; background: #e6ebf1; border-radius: 99px; margin: 0.8rem 0 0.2rem; overflow: hidden; }
.nm-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #e3c46f); border-radius: 99px; }
.nm-m-tag { margin: 0.7rem 0 0.3rem; font-weight: 600; color: var(--accent-deep); }
.nm-m-blurb { margin: 0 0 0.8rem; color: var(--ink-soft); line-height: 1.55; font-size: 0.95rem; }
.nm-chips { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nm-chips li { font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.65rem; border-radius: 99px; background: #eef2f7; color: var(--ink-soft); }
.nm-chips .nm-warn { background: #fdf3dc; color: #8a5a00; }
.nm-link { font-weight: 600; font-size: 0.92rem; color: var(--accent); }
.nm-link:hover { color: var(--accent-deep); text-decoration: underline; }
.nm-locked { background: repeating-linear-gradient(135deg, #f6f8fb, #f6f8fb 10px, #f0f3f8 10px, #f0f3f8 20px); border-style: dashed; }
.nm-locked .nm-m-name { color: var(--ink-mute); }
.nm-locked .nm-pct { background: #eef2f7; color: var(--ink-soft); }
.nm-lockline { margin: 0.7rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Gate form */
.nm-gate { background: var(--bg-deep); color: #fff; border-radius: 14px; padding: 1.3rem 1.3rem 1.1rem; }
.nm-gate-t { margin: 0 0 0.2rem; font-family: var(--display); font-weight: 400; font-size: 1.9rem; text-transform: uppercase; line-height: 1; color: #e3c46f; }
.nm-gate-s { margin: 0 0 1rem; color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; }
.nm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.9rem; }
.nm-in { width: 100%; font: inherit; font-size: 1rem; padding: 0.8rem 0.95rem; border: 1.5px solid transparent; border-radius: 10px; background: #fff; color: var(--ink); }
.nm-in:focus { outline: none; border-color: #e3c46f; box-shadow: 0 0 0 3px rgba(227, 196, 111, 0.35); }
.nm-wide { grid-column: 1 / -1; }
.nm-go { width: 100%; text-align: center; border: 0; cursor: pointer; background: #e3c46f; color: var(--bg-deep); font-weight: 700; padding: 1rem 1.25rem; }
.nm-go:hover { background: #f0d587; color: var(--bg-deep); }
.nm-go:disabled { opacity: 0.7; cursor: wait; }
.nm-msg { min-height: 1.2em; margin: 0.7rem 0 0; font-size: 0.9rem; }
.nm-msg.err { color: #ffb4a8; }
.nm-fine { margin: 0.4rem 0 0.5rem; font-size: 0.74rem; line-height: 1.5; color: rgba(255, 255, 255, 0.6); }
.nm-gate .nm-redo { color: rgba(255, 255, 255, 0.7); }
.nm-gate .nm-redo:hover { color: #fff; }

/* After unlock */
.nm-next { background: #f3f9fd; border: 1.5px solid #cfe3f0; border-radius: 14px; padding: 1.2rem; }
.nm-next p { margin: 0 0 1rem; line-height: 1.55; color: var(--ink); }
.nm-next-btns { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.nm-next-btns .btn { cursor: pointer; border: 0; text-align: center; }
.nm-ghost { background: transparent; color: var(--accent-deep); border: 1.5px solid var(--accent) !important; }
.nm-ghost:hover { background: #fff; color: var(--accent-deep); }

@media (max-width: 960px) {
  .nm-wrap { grid-template-columns: 1fr; }
  .nm-lead, .nm-points { max-width: none; }
}
@media (max-width: 560px) {
  .nm-opts-2, .nm-fields { grid-template-columns: 1fr; }
  .nm-card { min-height: 0; }
  .nm-next-btns .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-res, .nm-pulse span, .nm-progress span, .nm-opt span { animation: none; transition: none; }
}
