/* Neighborhood pages (/neighborhoods/, src/pages/hoods.mjs) */
.ph.nb-hero { padding-bottom: var(--sp-8); background: radial-gradient(80% 70% at 90% 0%, rgba(29, 90, 110, .14), transparent 60%); }
.ph.nb-hero h1 { max-width: 18ch; }
.nb-count { margin-top: var(--sp-16); color: var(--ink-2); font-size: 1rem; }
.nb-subs { margin-top: var(--sp-8); color: var(--ink-2); font-size: 1rem; max-width: 62ch; }
.nb-subs b { color: var(--ink); font-weight: 600; }
.nb-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-16); }
.nb-card a { display: grid; gap: var(--sp-8); height: 100%; padding: var(--sp-24); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s; }
.nb-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.nb-photo { display: block; width: 100%; height: auto; max-height: 180px; object-fit: cover; border-radius: var(--radius); }
.nb-card-h { font: 400 1.5rem/1.1 var(--serif); }
.nb-card-s { color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.nb-card-n { color: var(--sea); font: 600 .82rem/1.4 var(--sans); }
.nb-wrap { max-width: 860px; }
.page-narrow:has(.nb-wrap) main { --narrow: 860px; } /* the header takes the body's column (site.css .page-narrow) */
.nb-part { margin-bottom: var(--sp-8); }
.nb-facts { margin: 0; padding: 0 0 0 1.3em; display: grid; gap: var(--sp-16); line-height: 1.6; font-size: 1rem; }
.nb-facts li::marker { color: var(--tile); font-weight: 600; }
.nb-src { display: inline-block; margin-left: .25em; color: var(--ink-3); font-size: .82rem; }
.nb-take { font: 400 1.3rem/1.55 var(--serif); color: var(--ink); margin: 0 0 var(--sp-16); max-width: 62ch; }
.nb-jac { margin: var(--sp-12) 0 0; color: var(--ink-2); line-height: 1.55; }
.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: #fffaf2; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.nb-list li { display: grid; gap: var(--sp-4); padding: var(--sp-12) var(--sp-16); border-bottom: 1px solid var(--line); }
.nb-list li:last-child { border-bottom: 0; }
.nb-list li > a { font-weight: 600; color: var(--ink); }
.nb-k, .nb-st { color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.nb-k a { color: inherit; }
.nb-in { display: block; margin-top: 2px; font-size: .82rem; color: var(--ink-3); }
.nb-more { margin: var(--sp-12) 0 0; font-size: 1rem; }
.nb-grps { display: grid; gap: var(--sp-16); }
.nb-grp h3 { margin: 0 0 var(--sp-8); font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nb-grp ul { list-style: none; margin: 0; padding: 0; columns: 2 14em; column-gap: var(--sp-24); }
.nb-grp li { break-inside: avoid; padding: var(--sp-4) 0; }
.nb-grp a { color: var(--ink); }
.nb-how { margin-top: var(--sp-48); }
.nb-others { margin-top: var(--sp-32); }
.nb-others ul { list-style: none; margin: var(--sp-8) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.nb-others a { display: inline-block; padding: .5em .9em; border-radius: var(--r-tag); background: var(--paper-2); color: var(--ink); text-decoration: none; font-size: .9rem; }
.nb-others a:hover { background: var(--paper-3); }
@media (min-width: 700px) {
  .nb-cards { grid-template-columns: 1fr 1fr; }
  .nb-list li { grid-template-columns: minmax(11em, 15em) 1fr; gap: var(--sp-16); align-items: baseline; }
}
@media (min-width: 1040px) { .nb-cards { grid-template-columns: repeat(3, 1fr); } }
/* the maps (js/hood-map.js); .wc-map and .wc-pop-* come from coming.css, .gu-pop from going-up.css */
.nb-map-box { margin-bottom: clamp(26px, 4vw, 40px); }
.nb-map-box .wc-map-wrap { margin-bottom: var(--sp-12); }
.nb-map { height: clamp(320px, 52vh, 520px); }
.nb-sec .nb-wrap .nb-map { height: clamp(300px, 44vh, 440px); }
.nb-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-16); color: var(--ink-2); font-size: .9rem; }
.nb-legend li { display: inline-flex; align-items: center; gap: var(--sp-8); }
.nb-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fffaf2; vertical-align: .1em; }
.nb-card-h .nb-dot { margin-right: var(--sp-8); width: 11px; height: 11px; vertical-align: .18em; }
.nb-dot.nb-line { width: 16px; height: 4px; border-radius: 2px; box-shadow: none; }
.nb-map-all .nb-map { height: clamp(320px, 40vw, 500px); }
/* the index map's view switch (js/hood-map.js): all 12 areas, or one city's official neighborhoods up close */
.nb-zoom { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: var(--sp-12); padding: var(--sp-4); border-radius: calc(var(--r-ctl) + 3px); background: rgba(24, 34, 46, .07); }
.nb-zoom button { font: 600 .9rem/1 var(--sans); min-height: 38px; padding: .6em 1.05em; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.nb-zoom button:hover { color: var(--ink); }
.nb-zoom button[aria-pressed="true"] { background: #fffaf2; color: var(--ink); box-shadow: 0 1px 3px rgba(24, 34, 46, .18); }
.nb-dot.nb-area { width: 14px; height: 10px; border-radius: 3px; opacity: .45; box-shadow: none; }

/* 2026-11-17 parts (src/pages/hood-parts.mjs): perfect day, then and now, numbers, did you know, what's new,
   folded street stories; on the index: card photos with credit, the quiz, the comparison table */
.nb-card { position: relative; }
.nb-card .nb-pcred { position: absolute; top: calc(var(--sp-24) + var(--sp-8)); right: calc(var(--sp-24) + var(--sp-8)); }
.nb-photo { aspect-ratio: 16 / 10; }
.nb-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: stop; }
.nb-stop { position: relative; display: grid; gap: 2px; padding: var(--sp-12) 0 var(--sp-12) var(--sp-32); border-left: 2px solid var(--line); margin-left: var(--sp-8); }
.nb-stop::before { content: ''; position: absolute; left: -7px; top: calc(var(--sp-12) + 5px); width: 12px; height: 12px; border-radius: 50%; background: var(--tile); box-shadow: 0 0 0 3px #fffaf2; }
.nb-stop:first-child { padding-top: 0; } .nb-stop:first-child::before { top: 5px; }
.nb-stop:last-child { border-left-color: transparent; }
.nb-when { font: 600 .75rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nb-stop > a { font: 400 1.3rem/1.2 var(--serif); color: var(--ink); }
.nb-away { color: var(--ink-3); }
.nb-swipe { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); touch-action: pan-y; user-select: none; background: #e8e2d6; }
.nb-swipe img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.nb-swipe-then { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.nb-swipe-then img { filter: sepia(.18) contrast(1.05); }
.nb-swipe-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: #fffaf2; box-shadow: 0 0 6px rgba(0, 0, 0, .35); pointer-events: none; }
.nb-swipe-line::after { content: '\2194'; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fffaf2; color: var(--ink); font: 700 1.3rem/44px var(--sans); text-align: center; box-shadow: var(--shadow-2); }
/* the two years ride the divider, one each side of it, as on the aerial map's slider (then-now.css .tn-line span) */
.nb-swipe-y { position: absolute; top: var(--sp-12); padding: 2px var(--sp-8); border-radius: var(--r-tag); background: rgba(14, 33, 40, .72); color: #fffaf2; font: 600 .82rem/1.4 var(--sans); white-space: nowrap; pointer-events: none; }
.nb-swipe-y0 { right: calc(100% - var(--x) + var(--sp-12)); } .nb-swipe-y1 { left: calc(var(--x) + var(--sp-12)); }
.nb-swipe-range { position: absolute; left: 0; right: 0; top: 0; height: 100%; width: 100%; margin: 0; opacity: 0; pointer-events: none; } /* keyboard and screen readers; js/hood-swipe.js owns pointer input */
.nb-swipe-now, .nb-swipe-then { cursor: ew-resize; }
.nb-swipe img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.nb-swipe:has(.nb-swipe-range:focus-visible) { outline: 3px solid var(--sea); outline-offset: 2px; }
.nb-swipe figcaption { position: relative; padding: var(--sp-12) var(--sp-16); background: #fffaf2; }
.nb-swipe figcaption .nb-src { display: block; margin: var(--sp-4) 0 0; }
.nb-nums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-12); }
.nb-num a { display: grid; gap: var(--sp-4); height: 100%; padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; }
.nb-num b { font: 400 clamp(1.7rem, 5vw, 2.2rem)/1 var(--serif); color: var(--sea); } /* type-ok: stat-tile figure, matches the stat cards on Homes */
.nb-num span { color: var(--ink-2); font-size: .9rem; line-height: 1.35; }
.nb-dyks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-12); }
.nb-dyk { padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); }
.nb-dyk p { margin: 0 0 var(--sp-8); line-height: 1.5; }
.nb-dyk .nb-dyk-k { font: 600 .75rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nb-dyk .nb-src { margin-left: 0; }
.nb-more-a { font-size: .9rem; }
.nb-new { display: grid; gap: var(--sp-16); }
.nb-new h3 { margin: 0 0 var(--sp-8); font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nb-stage { display: inline-block; padding: 0 var(--sp-8); border-radius: var(--r-tag); background: var(--paper-2); font-size: .75rem; font-weight: 600; }
.nb-st-now-open, .nb-st-soft-open { background: #e3efe5; color: #2b5e36; }
.nb-fold > summary { list-style: none; cursor: pointer; display: inline-block; font: 600 1rem/1.4 var(--sans); color: var(--sea); }
.nb-fold > summary::-webkit-details-marker { display: none; }
.nb-fold > summary::after { content: ' +'; }
.nb-fold[open] > summary::after { content: ' \2212'; }
.nb-fold[open] > summary { margin-bottom: var(--sp-12); }
.nb-quiz { margin: var(--sp-48) 0 0; scroll-margin-top: 80px; }
.nb-quiz-lede { color: var(--ink-2); margin: 0 0 var(--sp-16); }
.nb-qr-img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--sp-16); }
.nb-cmp { margin-top: var(--sp-48); }
.nb-cmp-wrap { overflow-x: auto; border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); }
.nb-cmp-t { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .9rem; }
.nb-cmp-t th, .nb-cmp-t td { padding: var(--sp-8) var(--sp-12); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.nb-cmp-t thead th { font: 600 .75rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.nb-cmp-t tbody th { font-weight: 600; white-space: nowrap; }
.nb-cmp-t tbody th a { color: var(--ink); }
.nb-cmp-t tr:last-child th, .nb-cmp-t tr:last-child td { border-bottom: 0; }
.nb-cmp-t .nb-n { text-align: right; font-variant-numeric: tabular-nums; }
.nb-cmp .fine-print { margin-top: var(--sp-12); }
@media (min-width: 700px) {
  .nb-nums { grid-template-columns: repeat(3, 1fr); }
  .nb-dyks { grid-template-columns: repeat(3, 1fr); }
  .nb-new { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } /* a lone "What's new" or "Home sales" takes the full width */
  .nb-new .nb-list li { grid-template-columns: 1fr; gap: var(--sp-4); }
}
@media (prefers-reduced-motion: no-preference) { .nb-swipe-then, .nb-swipe-line { transition: none; } }

/* My SB link under the header (owner 2026-11-12) */
.nb-week { margin: var(--sp-16) 0 0; }
.nb-week-a { color: var(--sea); font-weight: 600; text-decoration: none; }
.nb-week-a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Area headers stay compact (Zach 2026-11-11: content on the first screen, headers never re-grow). Long names like
   "Upper State, San Roque & Mission Canyon" took three title lines and pushed the week below the screen. */
@media (min-width: 900px) {
  .nb-hero.ph-split h1 { max-width: none; }
  .nb-hero.ph-split h1.nb-long { font-size: 3rem; } /* long area names stay two lines beside the photo */
  .nb-hero.ph-split :is(.nb-count, .nb-subs) { font-size: .9rem; }
}
@media (max-width: 899px) {
  /* 92px at the top up to 899px, not only under 560: 104px + 484px ended tablet headers at 588px (code review 2026-11-22) */
  .ph.nb-hero.ph-split { padding-top: 92px; padding-bottom: 0; }
  .nb-hero.ph-split > .wrap { position: relative; }
  .nb-hero.ph-split .ph-share { position: absolute; top: 0; right: 0; float: none; margin: 0; } /* on the label line, without narrowing the text */
  .nb-hero.ph-split .ph-top { min-height: 34px; }
  .nb-hero.ph-split .ph-top .eyebrow { margin: 0; }
  .nb-hero.ph-split h1 { margin-bottom: var(--sp-8); }
  .nb-hero.ph-split .lede { margin-bottom: 0; font-size: .9rem; }
  .nb-hero.ph-split .nb-count { margin-top: var(--sp-8); font-size: .82rem; }
  /* the neighborhood names: one sideways line that fades at the edge, like the other phone rails */
  .nb-hero.ph-split .nb-subs { margin-top: var(--sp-4); font-size: .82rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline-end: var(--sp-24); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .nb-hero.ph-split .nb-subs::-webkit-scrollbar { display: none; }
  /* the photo takes what is left of the first screen: a 2:1 photo when the text is short, never less than 96px, and
     the header never ends past 576px (92px top padding + 484px). first-screen.mjs fails a header whose text spills. */
  .nb-hero.ph-split .ph-grid { display: flex; flex-direction: column; max-height: 484px; }
  .nb-hero.ph-split .ph-txt { flex: none; }
  .nb-hero.ph-split .pband { flex: 0 1 min(240px, calc((100vw - 48px) / 2)); min-height: 96px; margin-top: var(--sp-8); }
  .nb-hero.ph-split .pband .pph { height: 100%; }
  .nb-hero.ph-split .pband img { height: 100%; aspect-ratio: auto; max-height: none; }
}
/* a three-line area name on a 360px phone needs 385px of text: the photo may go down to 64px there rather than spill
   over the section below (code review 2026-11-22: Upper State spilled 5-8px) */
@media (max-width: 400px) { .nb-hero.ph-split .pband { min-height: 64px; } }
.nb-week .btn { max-width: 100%; white-space: normal; line-height: 1.4; text-align: center; }
/* stacked hero buttons on a phone kept touching (2026-11-23 review) */
.nb-week:has(> .btn) { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
/* side by side on a phone (2026-11-23 review: a 720px table showed only the names): the name column stays put and wraps,
   so the first numbers sit right beside it, and the rest scroll under it */
@media (max-width: 760px) {
  .nb-cmp-t tbody th { white-space: normal; width: 7.5rem; min-width: 7.5rem; }
  .nb-cmp-t tbody th, .nb-cmp-t thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fffaf2; box-shadow: 1px 0 0 var(--line); }
  .nb-cmp-wrap { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
.nb-emo { font-style: normal; }

/* This week in <area> (src/pages/hood-week.mjs): the /events/ photo strip (.evb, event.css), first on the page */
.nb-week-sec { padding: 0 0 var(--sp-16); }
.nb-week-sec .evb-head { flex-wrap: wrap; }
/* the see-all names the reader neighborhood ("All 192 in Downtown SB, Funk Zone, East & Westside, Riviera"): it wraps
   under the heading instead of keeping event.css's one unbroken line, which pushed phones wider than the screen */
.nb-week-sec .evb-h, .nb-week-sec .evb-all { min-width: 0; }
.nb-week-sec .evb-all { flex: 1 1 100%; }
.nb-week-d { font: 500 italic .7em/1 var(--serif); color: var(--tile); margin-left: var(--sp-4); white-space: nowrap; }
.nb-week-sec .evb-card[hidden] { display: none; }
.nb-regs { color: var(--ink-2); line-height: 1.5; }